https://github.com/dubniczky/3d-raycasting
Web demo of a custom traversable 2D map with 3D simulated visuals using raycasting
https://github.com/dubniczky/3d-raycasting
3d javascript math p3 raytracing web
Last synced: about 1 year ago
JSON representation
Web demo of a custom traversable 2D map with 3D simulated visuals using raycasting
- Host: GitHub
- URL: https://github.com/dubniczky/3d-raycasting
- Owner: dubniczky
- License: mit
- Created: 2022-08-14T09:19:18.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-14T10:15:21.000Z (almost 4 years ago)
- Last Synced: 2025-02-06T19:49:26.641Z (over 1 year ago)
- Topics: 3d, javascript, math, p3, raytracing, web
- Language: JavaScript
- Homepage:
- Size: 154 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# 3D Raycasting
A web demo of a traversable 2D map with 3D visuals. 3D effect is achieved with a technique called "ray casting", where for every rendered vertical pixel of the screen, a ray is cast from the camera object and the first collision with an object in 2D space is recorded. The wall is drawn based on the programmed characteristics and distance of the object hit.
## Support ❤️
If you find the project useful, please consider supporting, or contributing.
[](https://www.buymeacoffee.com/dubniczky)
## Live Demo
View the live web demo on GitHub Pages: [site](https://dubniczky.github.io/3D-Raycasting/)
## Math
Source reference: [clemson.edu pdf](https://people.cs.clemson.edu/~dhouse/courses/405/notes/raycast.pdf)