erichlof / CanvasRayTracer

A Ray Tracer that uses only pure JavaScript and the Canvas API to render realistic images on any device with a browser. It is a CPU-Only software renderer mainly intended as a fun side-project as well as an educational resource on the art of traditional/classic CPU Ray Tracing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CanvasRayTracer

A Ray Tracer that uses only pure JavaScript and the Canvas API to render realistic images on any device with a browser. It is a CPU-Only software renderer mainly intended as a fun side-project as well as an educational resource on the art of traditional/classic CPU Ray Tracing.

Try the Live Demo Note: it may take a few seconds to get going!

CanvasRayTracer_sample


Note: the additional 'RayTracingMovieMaker' is very much a W.I.P. and isn't quite functional yet. As soon as it is though, I will include a link to its demo as well. My final goal for this little movie maker will be to let you render a series of ray-traced still images, where either the camera moves from frame to frame, or objects in the scene move from frame to frame, or both.
After it renders the 1st frame (like the picture above), it will update any moving scene objects, and then automatically start rendering the 2nd frame. It will allow the user to save each completed animation frame to the hard drive as a .png file. Then, using a free online gif maker tool, like ezGIF, you'll be able to dump all of the saved ray-traced animation frames (.png files) into the ezGIF maker tool, and it will quickly produce a GIF animation that you can save and share with others.

About

A Ray Tracer that uses only pure JavaScript and the Canvas API to render realistic images on any device with a browser. It is a CPU-Only software renderer mainly intended as a fun side-project as well as an educational resource on the art of traditional/classic CPU Ray Tracing.

License:Creative Commons Zero v1.0 Universal


Languages

Language:JavaScript 96.9%Language:CSS 1.6%Language:HTML 1.5%