This is a TypeScript implementation of a simple Raytracer, which was made by following Peter Shirley's Raytracing in one weekend ebook.
We're targetting Canvas in a web browser as our rendering target to keep things simple.
- Node 9.8 or above. There's a
.nvmrc
file in the root dir if you use nvm. - The Ray Tracing in one weekend book from either here or on Kindle.
git clone https://github.com/luma/raytraceInAWeekend.git
cd raytraceInAWeekend/
npm i
The source is TypeScript and we're using Webpack for asset compilation.
The basic structure is as follows
dist/
the complied bundle created by Webpack.src/
the raw TypeScript source, the entry point issrc/index.ts
.index.html
what you open in your browser to actually render anything.
npm run build
# Or for local dev
npm run watch
Then open index.html
in your browser of choice.