processing.js with the interpreter

View: New views
1 Messages — Rating Filter:   Alert me  

processing.js with the interpreter

by Thomas Winningham :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Heya Mochis!

This isn't all that special other than two great things go better
together, but here are two different Processing.js interpreters based
on MochiKit's interpreter demo.

http://winningham.googlepages.com/processing

Just thought it might be a fun play thing for about a minute ;p
MochiKit's iterators and events are rather fun to use with this.

Here's a blue circle animating on black:

forEach(range(0,40),
    function(frameNumber){
        var moveValue=frameNumber*2;
        callLater((1/30)*frameNumber,
        function(){
            p.background(0);
            p.fill(100,100,255);
            p.ellipse(50+(frameNumber * moveValue/20),
                50+moveValue,
                80,80);
    }
);
});


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to mochikit@...
To unsubscribe from this group, send email to mochikit-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

LightInTheBox - Buy quality products at wholesale price