https://github.com/a-type/webgl-marchingcubes
A WebGL implementation of the marching cubes algorithm for deformable terrain
https://github.com/a-type/webgl-marchingcubes
Last synced: about 1 year ago
JSON representation
A WebGL implementation of the marching cubes algorithm for deformable terrain
- Host: GitHub
- URL: https://github.com/a-type/webgl-marchingcubes
- Owner: a-type
- License: mit
- Created: 2014-03-29T18:31:00.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2024-07-31T19:55:17.000Z (almost 2 years ago)
- Last Synced: 2025-03-27T19:50:23.510Z (over 1 year ago)
- Language: JavaScript
- Size: 969 KB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
webgl-marchingcubes
===================
A WebGL implementation of the marching cubes algorithm for deformable terrain
##Running the App Right Now
If you just want to take a look, you can do that here: http://gforrest-static.s3-website-us-east-1.amazonaws.com/marchingcubes/index.html
##Running the App Locally
###Prerequisites
If you don't already have a static file serving solution, you'll need [Node.js](http://nodejs.org/). You won't need to install any other packages, though.
First, host the files. You can do this using Node.js and `fileserver.js`, located in the root directory.
> node fileserver.js
This will host the directory on `http://localhost:8888/index.html`. Navigate there to view the scene.
##Controls
Use WASD to move the camera. Use the left mouse button and mouse pan to change the camera angle. Use Q to build a block and E to destroy one.
##Alternate Terrain
To generate the scene with flat terrain instead of Perlin noise, add a hash to the URL: `http://localhost:8888/index.html#flat`.
To generate smoothed terrain, try `#smooth` instead. Personally, I prefer the blocky style, but it's still pretty cool!
##Screenshots

The perlin noise generated terrain version

A simple demonstration of shadows and deformable terrain in the flat generation version.