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
raytracedirectory (cd raytrace) npm inpm run build- run any local server to test
raytracer.htmlorrt.vanilla.htmlon 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.