« Previous | Next »
Toxiclibs.js – open-source computational design
Published on Jan. 10, 2011
by Kyle
I have initiated a new open-source project titled Toxiclibs.js. Toxiclibs.js is a JavaScript port of Karsten Schmidt‘s expansive toxiclibs library.
Contributed libraries are an excellent perk of using Processing, and to me there is no library that stands as strong as Karsten’s. Toxiclibs encapsulates a lot of the complexity involved with common computational design problems and has a very large scope of what it can accomplish.
A great deal of my work involves using HTML5′s canvas tag for generative design; much of the time with the help of Processing.js. Repeatedly, I have spent the time of stripping out references to toxiclibs to make my code work with PJS. I worked-around porting the library for some time because it felt like too large of a project to do by myself. Last week as I was working on a WebGL visualization, I decided it was worth it to port the Vec3D class, and couldn’t stop there. I decided that this has to be done, I badly want these libraries and there have got to be many others thinking the same thing. I encourage anyone interested to contribute to the project.
I am hosting my source at gitHub, http://github.com/hapticdata/toxiclibsjs, and I have prepared an intial round of examples that you can view at http://haptic-data.com/toxiclibsjs.
The code already includes several classes for both 2D and 3D use, there are currently examples on several topics, such as using the TColor class for blending, converting and modifying colors, using Line2D, Vec2D and many others. If you aren’t a PJS user, one of the great things about this library is that it has no dependency on Processing.js. This is all JavaScript, with no dependencies, it can be used with other libraries, such as Raphael.js, or it can be used by itself.
Leave a response
Trackback URL: Toxiclibs.js – open-source computational design.










Comments on Toxiclibs.js – open-source computational design
5 Responses
Tweets that mention Toxiclibs.js – open source computational design | labs.hapticdata.com -- Topsy.com
11/01/11
[...] This post was mentioned on Twitter by David Humphrey. David Humphrey said: Wow, @hapticdata started a port of toxiclibs to JavaScript http://labs.hapticdata.com/2011/01/toxiclibs-js-open-source-computational-design/ [...]
toxi
13/01/11
Hi Kyle,
this is absolutely great news and exactly something I really hoped would happen one day (soon). From the start, the libraries have been designed in such a way as to make porting to other languages/environments quite easy and I too already ported some bits to JS & AS3 in the past. Incidentally, I also started preparing a community questionnaire about these endeavors, which I’ll send out very soon.
With your porting effort to JS especially, it would be great if we could coordinate things a little bit before you get carried away too far (if you don’t mind!
This is mainly in order to ensure the key design philosophies are kept alive as much as possible within the different language idioms. For example, I’d really love for this JS library to remain independent from Processing.js, as you already have stated yourself. There’re other JS graphics engines which would be interesting to use in conjunction with toxiclibs.js (e.g. MrDoob’s three.js). There’re also key design patterns like fluid interfaces (method chaining) & inheritance, which are heavily used throughout the original codebase and they too should be kept on the JS side (e.g. John’s popular inheritance solution: http://ejohn.org/blog/simple-javascript-inheritance/).
Finally (for now), you/we should sort a namespace & source file packaging system in order to keep the concept of the original modules/packages and to allow for smaller file sizes through pick & mix…
Kyle, this all is VERY exciting, please stay in touch!
Bestest, Karsten.
Toxiclibs.js gets VerletPhysics2D | labs.hapticdata.com
24/05/11
[...] « Previous [...]
New CAN Javascript Feature: Flocking.js by Lucas Dupin (@lucasdupin) | CreativeApplications.Net
14/09/11
[...] on Craig Reynolds research and is based on 3 simple rules: Separation Cohesion Attraction Uses toxiclibs for vector math and all code is commented at: http://lucasdup.in/js/bg.js The idea is a bunch of [...]
New CAN Javascript Feature: Flocking.js by Lucas Dupin (@lucasdupin) | CreativeApplications.Net
14/09/11
[...] on Craig Reynolds research and is based on 3 simple rules: Separation Cohesion Attraction Uses toxiclibs for vector math and all code is commented at: http://lucasdup.in/js/bg.js The idea is a bunch of [...]
Leave a Reply