This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#326 2012-07-25 18:00:23

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: JsScratch viewer development thread

ZeroLuck wrote:

Hardmath123 wrote:

will JsScratch work with an offline (local with file:/// path) project?

JavaScript isn't allowed to access files on the local computer... (that's good!)
You would have to upload it first...

Actually, I think XMLHttpRequest 2 with HTML 5 might. I think XMLHttpRequest (1) might also do it, with users permission. Ill check it out for you.


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#327 2012-08-02 09:57:47

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: JsScratch viewer development thread

Have a look at http://scratch.mit.edu/projects/Wes64/2708708. When using turbo, Flash is not very good. JsScratch instead is extremely fluid.

Offline

 

#328 2012-08-02 10:14:58

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: JsScratch viewer development thread

ZeroLuck wrote:

JavaScript isn't allowed to access files on the local computer... (that's good!) You would have to upload it first...

Are you sure? What about the File API? Sure, you can't write files... (unless you use some sort of plugin)

Offline

 

#329 2012-08-02 12:26:43

tpaley
Scratcher
Registered: 2011-05-22
Posts: 100+

Re: JsScratch viewer development thread

I have miner knowledge of JavaScript and not enough math for this but I'd be interested to see how you're making it.


http://i49.tinypic.com/2z82h3d.gif

Offline

 

#330 2012-08-03 18:05:36

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

I think it's time for a new update. I've made a LOT of changes!

-added compiler that converts most scripts to JavaScript - much faster  big_smile
-added all pen blocks - colors might be a little off though
-added some more sound blocks
-added the watchers in their default form - the other two kinds are formatted wrongly

Download!


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#331 2012-08-03 21:48:15

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: JsScratch viewer development thread

Can you make a button to enable/disable the Flash/Java player?


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#332 2012-08-04 03:27:40

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: JsScratch viewer development thread

nathanprocks wrote:

Can you make a button to enable/disable the Flash/Java player?

Yeah, about this, I think the best option is add a div to the sidebar, similar to what was there when the experimental viewer existed. Then you could select between default and JSscratch!

Offline

 

#333 2012-08-04 11:17:09

rookwood101
Scratcher
Registered: 2011-07-29
Posts: 500+

Re: JsScratch viewer development thread

I don't think the random number generation is quite right:

http://scratch.mit.edu/projects/rookwood101/2499554


http://i.imgur.com/zeIZW.png

Offline

 

#334 2012-08-04 14:17:20

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

rookwood101 wrote:

I don't think the random number generation is quite right:

http://scratch.mit.edu/projects/rookwood101/2499554

It only generates integers ATM.

@LS97, I like the idea! I can't add it till Monday though.


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#335 2012-08-04 14:26:18

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: JsScratch viewer development thread

Oooo! Looks interesting. I'll be looking out for the full release. Kinda reminds me of sb2.js.


http://i50.tinypic.com/312u714.jpg

Offline

 

#336 2012-08-04 16:34:31

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: JsScratch viewer development thread

MathWizz wrote:

@LS97, I like the idea! I can't add it till Monday though.

OK, looking forward to it! The current double player kills my memory and my internet connection  tongue  I won't really be using it much till next week anyway.

Offline

 

#337 2012-08-05 06:06:47

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: JsScratch viewer development thread

MathWizz wrote:

Download!

Problem: Chrome won't install anymore the extension just clicking on it after download. I get a message suggesting to use the chrome web store. I followed Chrome instructions for manual installation so I dragged the extension on the extension settings page. But with the last update I don't get the "do you want to install the script" message that I get instead when trying to install-by-drag the previous updates... any advice?

Offline

 

#338 2012-08-05 06:19:04

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: JsScratch viewer development thread

Solved: for some weird reason I had to rename the extension exactly to jsscratchplayer.user.js (in the previous ones I could add a timestamp and install them without any problem).

Now the player works much better (btw: very nice the new loading bar!): the mandelbrot project is fully functional.

Instead, in this project, variable monitors are visible on the Stage when they shouldn't...

Offline

 

#339 2012-08-05 06:50:30

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: JsScratch viewer development thread

I have a question: is dragging already implemented?

Offline

 

#340 2012-08-05 08:15:22

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: JsScratch viewer development thread

s_federici wrote:

I have a question: is dragging already implemented?

Nope.

Offline

 

#341 2012-08-07 12:09:18

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: JsScratch viewer development thread

Even this project when run in turbo mode is much smoother in jsscratch than in flash player. This one in js turbo is incredibly better than in flash turbo. Is it the same in your PCs?

The first project is not fully working in jsscratch. When moving the slider the color doesn't change.

Last edited by s_federici (2012-08-07 12:13:36)

Offline

 

#342 2012-08-07 13:34:41

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

s_federici wrote:

Even this project when run in turbo mode is much smoother in jsscratch than in flash player. This one in js turbo is incredibly better than in flash turbo. Is it the same in your PCs?

The first project is not fully working in jsscratch. When moving the slider the color doesn't change.

Yes, they are smother, though the first one actually is faster in the flash player. I'm guessing the color doesn't change because the color effect is not supported ATM.


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#343 2012-08-13 02:22:50

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: JsScratch viewer development thread

I just noticed that the obsolete stretch blocks work in JsScratch player. Normally you have to download the project.  tongue


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#344 2012-08-13 06:50:16

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: JsScratch viewer development thread

In this project by loolo78, whereas in the flash player the polyhedron is always completed when you center the mouse, in jsscratch this doesn't happen every time.

Offline

 

#345 2012-08-13 08:56:45

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

nathanprocks wrote:

I just noticed that the obsolete stretch blocks work in JsScratch player. Normally you have to download the project.  tongue

Yesh.  big_smile

s_federici wrote:

In this project by loolo78, whereas in the flash player the polyhedron is always completed when you center the mouse, in jsscratch this doesn't happen every time.

I think I have fixed that bug in my dev version. I'll post an update soon.


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#346 2012-08-13 09:52:59

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: JsScratch viewer development thread

Yay! And what about the option to disable the js/flash player?

Offline

 

#347 2012-08-13 10:14:24

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

LS97 wrote:

Yay! And what about the option to disable the js/flash player?

Soon, maybe. I don't really feel like messing with the main css ATM.  tongue


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#348 2012-08-14 03:38:52

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: JsScratch viewer development thread

I don't know if the counting is reliable, but when this project is run in flash player it says 31FPS, whereas jsscratch it says 40FPS.

Then, if you switch to turbo, whereas flash says 166FPS, jsscratch says 500/1000FPS...

Last edited by s_federici (2012-08-14 03:39:08)

Offline

 

#349 2012-08-14 03:46:05

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: JsScratch viewer development thread

How do you run a project in JsScratch? I've uploaded my file to my personal host and set that as the URL for the "project" attribute, but it doesn't load.  hmm


http://i50.tinypic.com/312u714.jpg

Offline

 

#350 2012-08-14 08:52:34

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

BirdByte wrote:

How do you run a project in JsScratch? I've uploaded my file to my personal host and set that as the URL for the "project" attribute, but it doesn't load.  hmm

That's because of cross origin stuff.  hmm


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

Board footer