Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lostjared/masterpiece3d.javascript
Conversion of an old C++ OpenGL GLUT demo to JavaScript/WebGL
https://github.com/lostjared/masterpiece3d.javascript
javascript-demo opengl-demo puzzle-game webgl
Last synced: about 1 month ago
JSON representation
Conversion of an old C++ OpenGL GLUT demo to JavaScript/WebGL
- Host: GitHub
- URL: https://github.com/lostjared/masterpiece3d.javascript
- Owner: lostjared
- License: unlicense
- Created: 2024-05-27T23:14:24.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-28T12:47:46.000Z (7 months ago)
- Last Synced: 2024-05-29T20:05:36.835Z (7 months ago)
- Topics: javascript-demo, opengl-demo, puzzle-game, webgl
- Language: JavaScript
- Homepage: http://lostsidedead.biz/mp3d
- Size: 284 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MasterPiece3D.JavaScript
![screenshot](https://github.com/lostjared/MasterPiece3D.JavaScript/blob/main/mp3d.jpg)
![screenshot2](https://github.com/lostjared/MasterPiece3D.JavaScript/blob/main/mp3d_per.jpg)
Conversion of an old C++ OpenGL GLUT demo to JavaScript/WebGL
This is a WebGL-based block game where the player can control falling
blocks, rotate their colors, and attempt to match colors in a grid.The original project source code can be found here:
https://github.com/lostjared/Old.Learning.Projects/tree/master/mp3d_win32_vs.net2003## Features
- Control falling blocks using keyboard inputs.
- Rotate block colors using the Up arrow key.
- Move blocks left, right, and down using arrow keys.
- New blocks are released when last block it set to the grid.
- Basic game mechanics implemented with WebGL for rendering.## Controls
- **Arrow Keys**: Move the block left, right, and down.
- **Up Arrow Key**: Rotate the colors
- **H / h**: Reset rotation angles.
- **D / d**: Set specific rotation angle for the block.
- **V / v**: Set different specific rotation angles.### Prerequisites
- Web browser with WebGL support (most modern browsers).
- Web Server (can use Python)To View this locally run in this directory
```bash
python3 -m http.server 3000
```
then point your web browser to localhost:3000## Project Structure
- `index.html`: The main HTML file.
- `main.js`: The main JavaScript file containing game logic and WebGL
rendering.
- `gl-matrix.js`: A library for matrix operations (used for
transformations in WebGL).