Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aleksandrhovhannisyan/raycasting-js
Demo of 2D and 3D raycasting in JavaScript using an HTML canvas.
https://github.com/aleksandrhovhannisyan/raycasting-js
canvas demoscene gamedev javascript raycasting
Last synced: about 2 months ago
JSON representation
Demo of 2D and 3D raycasting in JavaScript using an HTML canvas.
- Host: GitHub
- URL: https://github.com/aleksandrhovhannisyan/raycasting-js
- Owner: AleksandrHovhannisyan
- License: mit
- Created: 2024-06-29T00:27:06.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-08-25T18:13:14.000Z (4 months ago)
- Last Synced: 2024-08-25T19:30:06.442Z (4 months ago)
- Topics: canvas, demoscene, gamedev, javascript, raycasting
- Language: JavaScript
- Homepage: https://raycasting-from-scratch.netlify.app/
- Size: 246 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 2D and 3D Raycasting with JavaScript Canvas
> Demo of 2D and 3D raycasting using JavaScript and an HTML canvas.
[View live demo](https://raycasting-from-scratch.netlify.app/)
![A top-down 2D scene depicting the player as a black dot with a line pointing in the direction it is facing. A yellow cone of view in front of it intersects with walls.](./screenshot.png)
No libraries, all from scratch.
Resources/references:
- [Coding Challenge #145: 2D Raycasting ](https://www.youtube.com/watch?v=TOEi6T2mtHo)
- [Coding Challenge #146: Rendering Raycasting ](https://www.youtube.com/watch?v=vYgIKn7iDH8)Inspired by one of [tsoding](https://www.twitch.tv/tsoding)'s streams where he implemented a 3D raycaster with canvas:
- [https://github.com/tsoding/raycasting](https://github.com/tsoding/raycasting)
## Running Locally
- Clone the repo.
- `cd src`
- `npx serve .`View the app running at `localhost:3000`.