aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJames Barnett <noreply@jamesbarnett.xyz>2022-01-05 16:11:14 +0000
committerJames Barnett <noreply@jamesbarnett.xyz>2022-01-05 16:11:14 +0000
commitc9a18567dc5ff5775e9f494233c5bb7d599a88cb (patch)
tree4632ba830b6052d107beaaca1950c2e3c86d54ce /README.md
parent16b0f20415efd3ed2c181df74a473ebd5265892b (diff)
downloadjs-raytracer-c9a18567dc5ff5775e9f494233c5bb7d599a88cb.tar.xz
js-raytracer-c9a18567dc5ff5775e9f494233c5bb7d599a88cb.zip
Update readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md34
1 files changed, 33 insertions, 1 deletions
diff --git a/README.md b/README.md
index 12e6bc8..c394ba6 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,33 @@
-# js-raytracer \ No newline at end of file
+# JS Raytracer
+A minimal ray tracing engine written from scratch in JS (TypeScript).
+
+![](.github/output.png)
+
+View an interactive demo [here](https://jamesbarnett.io/raytracer).
+
+No graphics APIs or libraries are used, only a single HTML5 canvas call to draw the generated bitmap image.
+
+Various effects are supported, including recursive optical reflections and refractions, and [Phong shading](https://en.wikipedia.org/wiki/Phong_reflection_model).
+Basic multi-threading is implemented using the [Web Workers API](https://developer.mozilla.org/en-US/docs/Web/API/).
+
+## Building locally
+You will need NodeJS >= 10.
+
+Clone this repo and build with webpack:
+
+```
+$ git clone https://github.com/jamesbarnett91/js-raytracer.git
+$ cd js-raytracer
+$ npm install
+$ npm run serve
+```
+
+This will build the project and start a webpack dev server listening on port 9000. Navigate to `http://localhost:9000/` in you browser to view the project. This also enables hot-compiling/reloading on change.
+
+Alternatively, you can build a distributable with `npm run build`. This will compile and bundle the project into `./dist`.
+
+## Useful resources
+
+- https://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-ray-tracing
+- https://tmcw.github.io/literate-raytracer/
+- https://github.com/ssloy/tinyraytracer \ No newline at end of file