Skip to content

luma/raytraceInAWeekend

Repository files navigation

Raytracing in a weekend

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.

Prerequisites

  • 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.

Setup

git clone https://github.com/luma/raytraceInAWeekend.git
cd raytraceInAWeekend/
npm i

Project layout

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 is src/index.ts.
  • index.html what you open in your browser to actually render anything.

Usage

npm run build
# Or for local dev
npm run watch

Then open index.html in your browser of choice.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published