Simple 3d engine with JavaScript canvas

This weekend I was testing the canvas element in JavaScript. It was pretty easy so I decided to make a very simple 3d engine. The engine only consists of a simple scene graph where the camera is fixed at origo and pointing along the Z-axis. The "pipeline" consists of two steps, transformation and rendering.

All transformations are represented by 4x4 matrices which are pushed to a matrix-stack as the code traverses the scene graph. After the transformations are done the scene is rendered. The renderer only supports solid faces and edges. Since the objects aren't sorted before they are drawn all faces and lines are transparent.

I never got the inheritance to work properly in JavaScript so there is no base class for objects just one implementation of a cube-class.

A demo of the engine can be found at:
http://slackers.se/resources/demo/j3d/demo.html

The latest source is available in the project repository at:
https://projektserver.se/svn/tiny/javascript/j3d/

2 comments:

longge said...

http://uggloveshoes.vox.com/
http://uggshoe.vox.com/
http://uggloveshoes.webs.com/apps/blog/
http://warmugg.webs.com/apps/blog/
http://uggloveshoes.weebly.com/
http://ugggg.weebly.com/
http://uggloveshoes.wordpress.com/
http://uggloveboots.wordpress.com/
http://pulse.yahoo.com/_AYKQMFYOZ26I3OTTDFMBU4QBDQ/blog/
http://pulse.yahoo.com/_RDDQ2DFI4RDOV4Y2L47DLPM6C4/blog/

123 said...

http://remind.com.br/projetos/criar-blog-gratis/replicahandbags69/
http://remind.com.br/projetos/criar-blog-gratis/ureplicawatches/
http://remind.com.br/projetos/criar-blog-gratis/ureplicawatches1987/
http://replbags.livejournal.com/
http://replcawatche.livejournal.com/
http://repldbags.livejournal.com/
http://replica69bags.insanejournal.com/
http://replicabag242.livejournal.com/
http://replicacheap.21classes.com/weblogCategory/1951uut1lrg4t
http://replicacheap.ayubd.com/