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

#1 2012-07-18 16:50:37

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

JavaScript - Scratch Effects

I remember sending the ST an email about decompressing images in a scratch file. John Maloney responded with this:

John Maloney wrote:

Hi, MathWizz.

That's definitely an ambitious project, but it sounds as though you are making good progress. You may have trouble implementing all of the features of Scratch in HTML5. The note/drum blocks seem especially difficult, and the image effects could be too slow to be useable. Still, even without some features it would be great to have an HTML5 Scratch viewer that can run Scratch projects on a wide variety of devices...

Anyway... I think this proves him wrong: https://dl.dropbox.com/u/6274273/webgl/filters.htm
Scratch chokes on the same image.  smile

Last edited by MathWizz (2012-07-20 10:31:17)


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

Offline

 

#2 2012-07-18 17:05:12

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: JavaScript - Scratch Effects

Nice effect. May want to read over your post though.


You can now reach me on Twitter @johnnydean1_

Offline

 

#3 2012-07-18 17:08:42

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: JavaScript - Scratch Effects

I could give advice if you're having problems reading the images in the .sb format. (: It took ages making Kurt read them properly...


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#4 2012-07-18 17:19:10

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

Re: JavaScript - Scratch Effects

blob8108 wrote:

I could give advice if you're having problems reading the images in the .sb format. (: It took ages making Kurt read them properly...

No no, they're fine now. This was ~2 years ago.  tongue


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

Offline

 

#5 2012-07-18 17:50:16

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: JavaScript - Scratch Effects

MathWizz wrote:

blob8108 wrote:

I could give advice if you're having problems reading the images in the .sb format. (: It took ages making Kurt read them properly...

No no, they're fine now. This was ~2 years ago.  tongue

Oh, good  smile  the run-length encoding was the hardest part... I still haven't written the encoder for it, so images saved with Kurt are much larger than with Scratch...  tongue


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#6 2012-07-18 18:20:10

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: JavaScript - Scratch Effects

It appears black on Safari, but works fine on chrome.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#7 2012-07-18 19:51:01

Jackieee
New Scratcher
Registered: 2012-07-05
Posts: 100+

Re: JavaScript - Scratch Effects

WebGL doesn't work on Chrome on XP :'(

Offline

 

#8 2012-07-18 20:04:38

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

Re: JavaScript - Scratch Effects

Jackieee wrote:

WebGL doesn't work on Chrome on XP :'(

What version of chrome?


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

Offline

 

#9 2012-07-19 10:17:36

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: JavaScript - Scratch Effects

Nice. Glad to see progress on something like this. JsScratch, right?

Offline

 

#10 2012-07-19 10:25:50

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

Re: JavaScript - Scratch Effects

scimonster wrote:

Nice. Glad to see progress on something like this. JsScratch, right?

Yeah.  big_smile


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

Offline

 

#11 2012-07-19 12:01:06

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

Re: JavaScript - Scratch Effects


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

Offline

 

#12 2012-07-19 12:05:23

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: JavaScript - Scratch Effects

Nothing happens. Seems familiar. I'm feeling left out.  sad


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#13 2012-07-19 12:25:07

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

Re: JavaScript - Scratch Effects

Hardmath123 wrote:

Nothing happens. Seems familiar. I'm feeling left out.  sad

Get chrome.  roll


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

Offline

 

#14 2012-07-19 12:37:40

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: JavaScript - Scratch Effects

MathWizz wrote:

Hardmath123 wrote:

Nothing happens. Seems familiar. I'm feeling left out.  sad

Get chrome.  roll

I thought Chrome and Safari both use the WebKit layout engine; what works on one should work on the other.
Gecko is still best though. :3

Offline

 

#15 2012-07-19 12:42:47

Jackieee
New Scratcher
Registered: 2012-07-05
Posts: 100+

Re: JavaScript - Scratch Effects

MathWizz wrote:

Jackieee wrote:

WebGL doesn't work on Chrome on XP :'(

What version of chrome?

Any version above 10.

Offline

 

#16 2012-07-19 12:59:58

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

Re: JavaScript - Scratch Effects

Now you overwrote the fisheye  sad
Awesome anyway! How's JSScratch coming along? Reading its thread, I see you made a userscript, but where's the actual player now?

Offline

 

#17 2012-07-19 13:09:10

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

Re: JavaScript - Scratch Effects

LS97 wrote:

Now you overwrote the fisheye  sad
Awesome anyway! How's JSScratch coming along? Reading its thread, I see you made a userscript, but where's the actual player now?

It's still where is was before... Just  a little out of date.  tongue


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

Offline

 

#18 2012-07-19 16:55:23

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: JavaScript - Scratch Effects

Looking good. Nice to see some HTML5 and Javascript. Its a powerful combination and *can* be better than more commonly used ones (E.G Java, C++, etc.)


You can now reach me on Twitter @johnnydean1_

Offline

 

#19 2012-07-20 10:15:51

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

Re: JavaScript - Scratch Effects

Muhahahahaha.

Note the sliders at the top of the canvas.  wink

Last edited by MathWizz (2012-07-20 10:18:10)


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

Offline

 

#20 2012-07-20 10:19:06

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: JavaScript - Scratch Effects

Whatever you just did, it was the right thing.

IT WORKS, and it's TOTALLY AWESOME (even by my standards, which is really saying something)  big_smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#21 2012-07-20 10:22:21

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

Re: JavaScript - Scratch Effects

Hardmath123 wrote:

Whatever you just did, it was the right thing.

0.o Odd.

Hardmath123 wrote:

IT WORKS, and it's TOTALLY AWESOME (even by my standards, which is really saying something)  big_smile

Thanks! :DDD


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

Offline

 

#22 2012-07-20 10:24:14

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: JavaScript - Scratch Effects

MathWizz wrote:

Hardmath123 wrote:

Whatever you just did, it was the right thing.

0.o Odd.

Hardmath123 wrote:

IT WORKS, and it's TOTALLY AWESOME (even by my standards, which is really saying something)  big_smile

Thanks! :DDD

Why do you need WebGL for this though? You can probably make it with standard 2d canvas with a little hacking, right?

grrrrrrrrrrr wrote:

The following errors need to be corrected before the message can be posted:

    * At least 60 seconds have to pass between posts. Please wait a little while and try posting again.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#23 2012-07-20 10:26:24

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

Re: JavaScript - Scratch Effects

Hardmath123 wrote:

MathWizz wrote:

Hardmath123 wrote:

Whatever you just did, it was the right thing.

0.o Odd.

Hardmath123 wrote:

IT WORKS, and it's TOTALLY AWESOME (even by my standards, which is really saying something)  big_smile

Thanks! :DDD

Why do you need WebGL for this though? You can probably make it with standard 2d canvas with a little hacking, right?

Looping through all of the pixels WITHOUT changing pixels values is laggy. With an image this size, days would pass before finishing (jk  tongue ). Just looping through a 32x32 pixel image for color detection is slow.  hmm

Last edited by MathWizz (2012-07-20 10:27:56)


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

Offline

 

#24 2012-07-20 10:29:07

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: JavaScript - Scratch Effects

Cool!


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#25 2012-07-20 10:35:51

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: JavaScript - Scratch Effects

MathWizz wrote:

Hardmath123 wrote:

MathWizz wrote:

Hardmath123 wrote:

Whatever you just did, it was the right thing.

0.o Odd.

Thanks! :DDD

Why do you need WebGL for this though? You can probably make it with standard 2d canvas with a little hacking, right?

Looping through all of the pixels WITHOUT changing pixels values is laggy. With an image this size, days would pass before finishing (jk  tongue ). Just looping through a 32x32 pixel image for color detection is slow.  hmm

Ah yes, webgl is linked almost directly to the graphics card, right? Speed is a problem with JS.  sad


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

Board footer