A comparison between original raytrace.ts performance VS a hand-written JS port.
Live Test - both pages show render time in console
- original TypeScript targeting ES2022 code
- hand-written JavaScript
The original TypeScript version and this JS translation are licenced under the Apache-2.0 licence.
- fork or clone this repo
- enter
raytrace
directory (cd raytrace
) npm i
npm run build
- run any local server to test
raytracer.html
orrt.vanilla.html
on your localhost
Check the JSDoc TS annotated file which is fully compliant with TS and it still performs as good as the not-annotated file.