Why this?
// Shorten some names. var math = Math;
// Shorten some names. var math = Math;
I had a really, really ugly trick that saved me a couple of bytes which I removed before posting to HN. I figured out I was using canvas.getImageData() and canvas.putImageData(). So I did this: var tID = "tImageDatA"; canvas["ge"+tID](); canvas["pu"+tID"](); You can see that in the original source: http://gabrielgambetta.com/tiny_raytracer_full.js
Not my proudest hack :D
Is that BASIC CODE mixed in with bugs bunny??! Raytracer or no raytracer, this is exceedingly cool.
BBC Basic was amazing in hindsight.
Bugs Boni !
E=Math,F=E.sqrt,G=E.max