3 ms·
Great demo. A couple of years ago, I wrote a Javascript implementation myself: https://github.com/avik-das/js-raycast https://github.com/avik-das/js-raycast A
by akdas 7y ago
Great demo.
A couple of years ago, I wrote a Javascript implementation myself: https://github.com/avik-das/js-raycast https://github.com/avik-das/js-raycast
And then, when asm.js (precursor to WebAssembly) became a thing, I rewrote it in C and compiled it to asm.js: https://github.com/avik-das/emcc-raycast https://github.com/avik-das/emcc-raycast
I'd already written a ray tracer (so a fully 3D renderer) prior to that in college, so it was fun to learn about a more limited algorithm that was better suited to older hardware.
- MuffinFlavored 7y agoWhat was performance like js-raycast vs emcc-raycast?
- akdas 7y agoAt the time I wrote those, I was actually surprised because I didn't see much improvement using emcc-raycast. In both implementations, you can see that I'm allocating objects/structs all over the place, so that probably brings down the performance.