Sunday, October 2, 2011

HTML5 / JavaScript raycaster demo

Lately I have been playing around with raycasting, a technique used for rendering 3D worlds, just for the fun of it.
Once I had a working version in C#, I decided to port it to HTML5 (rendering on a canvas) as an exercise.
It supports texture mapping and uses a simple lighting and shadow effect to make it feel a little more realistic.

View the demo here: http://www.dottech.nl/raycaster/
It's best viewed in Chrome but it also works in Firefox and should work in IE9 (didn't test that).

Source code is available on GitHub: http://github.com/Stribe/HTML5-Raycaster

/Ruud