Proof of concept processing module

196 views
Skip to first unread message

Brad Miller

unread,
Apr 21, 2013, 11:00:48 PM4/21/13
to sku...@googlegroups.com

Hi,

I just committed a little sunday afternoon project. I think I figured out out a good way to wrap processing-js. I've got a little demo working of circle that expands and contracts and follows the mouse around. If you've ever looked at the processing-js page you'll know the demo I'm talking about.

Lots more functions to wrap, and I've got more work to do on a better way to expose some of the things that processing exposes as global variables, but I think this is going to work very nicely! If anyone is interested in helping out let me know!

If you want to take a look, clone the repository and then open up the proctest.html file under doc/static

Brad

Brad Miller, Ph.D.
http://reputablejournal.com

David Holmes

unread,
Apr 22, 2013, 9:48:13 AM4/22/13
to sku...@googlegroups.com
Brad,
That's pretty neat. I have an interest in contributing to Skulpt and would like to discuss my ideas. Would you please connect with me on my personal email? david.ge...@gmail.com
Thanks
David


--
 
---
You received this message because you are subscribed to the Google Groups "Skulpt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skulpt+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

delgado...@gmail.com

unread,
Dec 30, 2013, 12:45:50 AM12/30/13
to sku...@googlegroups.com
Brad
 
Thank you very much for providing this processing-js addon.  I would like to help and add the missing functions so that I can use height, width, bezier and the like.  I have a couple of questions:
 
1. Is it a matter of adding elements to the skulpt / src / lib / processing / __init__.js file?
2. Is this kind of wrapping necessary for using processing js libraries, such as toxiclibs.js?
 
If you point me in the right direction I wouldnt mind doing the labor, I may be deterred though if this is necessary every time I need to use another javascript library alongside processing js.

Brad

unread,
Dec 31, 2013, 2:04:41 PM12/31/13
to sku...@googlegroups.com
Hi Raymond,

I'm glad someone else is interested in hacking on the processing stuff. See below for some answers:


On Sunday, December 29, 2013 10:45:50 PM UTC-7, delgado...@gmail.com wrote:
Brad
 
Thank you very much for providing this processing-js addon.  I would like to help and add the missing functions so that I can use height, width, bezier and the like.  I have a couple of questions:
 
1. Is it a matter of adding elements to the skulpt / src / lib / processing / __init__.js file?

Yes, hopefully what I have already done can serve as a pattern for you to follow.  What I have done may or may not be the best way to do it.  Feel free to let me know if you get into it and think you have a better way. 

 
2. Is this kind of wrapping necessary for using processing js libraries, such as toxiclibs.js?

This is a good question  I haven’t looked at any of the processing libraries.  If these are simply used behind the scenes by processing.js then probably no further work is needed other than to include the JS files.  But if you want to make them act like python modules, or if they expose additional functions that you can call as a user of the library then my guess is that yes, you are going to have to wrap them in some way.  You can look at something like Math or the random module to see how to do a pretty simple wrapper. 

It would be nice to come up with a general way to automatically wrap various javascript libraries, but I haven’t really found the solution yet. 


 
If you point me in the right direction I wouldnt mind doing the labor, I may be deterred though if this is necessary every time I need to use another javascript library alongside processing js.

Feel free to contact me once you've taken a look and we can try to work out any specific issues you run into.
Message has been deleted

michael.f...@gmail.com

unread,
Oct 23, 2018, 2:34:16 AM10/23/18
to Skulpt
Hi,I want to use width or heigth instead of environment.width,how to update the source code

在 2013年12月30日星期一 UTC+8下午1:45:50,Ray Delgado写道:

Muthukrishnan Tr

unread,
Mar 5, 2019, 9:49:00 AM3/5/19
to Skulpt
Hi Brad,

Please let me know how to import module from another module. Kindly reply asap.

Muthukrishnan Tr

unread,
Mar 6, 2019, 1:20:31 AM3/6/19
to Skulpt
Its quite urgent can anyone please help me on this import module...
Thanks in Advance.


Regards,
MuthuTR
Reply all
Reply to author
Forward
0 new messages