threo.js > Cube Demos
All code on this page available on GitHub at cube-demos
WebGL Cubed
A demo file that incorporates Three.js textures created using binary images that have bee re-encoded as base64 strings. This allows the image data to be hosted on a different server than the master HTML file.
10000 Cubes Demo
This demo uses WebGLrenderer2. There's ten thousand cubes all rotating in real-time. It's faster. Is it ten times faaster? Or more? I'm not sure and I don't really care. I can now manipulate more objects than my tiny brain could possibly deal with (in the near future anyway).
Updates
2011-02-03: A couple of what I thought were minor tweaks and now the code loads in a few seconds and runs fast. This is fun!
Notes
Here is a demo that will bring your computer to its knees. One thousand partially-transparent Phong-shaded red cubes all twirling in different directions as the camera swirls around. Allow a good minute or so just for the demo to load.
Once I've got the hang of particles and shaders and all the good stuff that's coming out of three.js and WebGL, I'm sure I'll look back at this demo with a sheepish smile. But coming from that old world of using AutoLISP and AutoCAD to translate vector geometry this is all a breath of fresh air combined with magic combined with DIY rocket science.
2011-02-02