Git Product home page Git Product logo

webtracer's Introduction

  • A pathtracer written in rust - runs in the web and includes an editor
  • Rendering is parallelized and utilizes all cpu cores
  • You can easily edit scenes and move the camera (see how to use)
  • Based on Ray Tracing in One Weekend tutorial series - supports spheres, bricks, lights, image-based textures...
    • note: images, due to DOM weirdness, have to be baked into the binary, so if you want to add your custom images, you'll have to rebuild the project (feel free to message me how to do so)
  • Try out the live demo: Live Demo

Screenshots

Screenshot of the UI Example render 1 Example render 2 More images can be found here

How to use

  • Upon loading the webpage, you will be in "normal mode", click onto the rendered image to enter "pointerlock mode" and move around using the mouse and keyboard
  • Press [F] or [R] to render - the screen will go white, that is normal. Check progress in the console ([F12]). Download the output using [U]. Then press [Y] to re-unlock the screen
  • Press [T] to toggle the settings panel
  • You can also edit objects ([E], [C], [X], in "pointerlock mode") and easily mess around with different parameters
  • To save and share the scenes you created, download and upload their the .xml representation (Buttons under settings)
  • Controls:

F           - Full render
R           - Preview render
Y           - Unlock screen after render
T           - Toggle settings
  • Controls - "pointerlock mode":

W, S, A, D  - Move
Arrow keys  - Move
J, K        - Move down, up
Mouse move  - Rotate camera
Q           - Reset camera to starting position
E           - Edit the object in the center of the screen
X           - Delete the object in the center of the screen
C           - Create a new object in the center of the screen

How to build

Run the build script - rust and wasm-pack are requiered Use a static file server like sfz to host.

webtracer's People

Contributors

shapur1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.