https://github.com/jasperdevir/marchingcubes.js
The Marching Cubes algorithm in Three.JS
https://github.com/jasperdevir/marchingcubes.js
Last synced: about 1 year ago
JSON representation
The Marching Cubes algorithm in Three.JS
- Host: GitHub
- URL: https://github.com/jasperdevir/marchingcubes.js
- Owner: jasperdevir
- Created: 2024-05-31T10:11:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-03T04:31:44.000Z (almost 2 years ago)
- Last Synced: 2025-02-10T17:14:48.590Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 288 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MarchingCubes.js
Implementation of marching cubes mesh generation algorithm within Three.JS.
Inspired by Paul Bourke's: "Polygonising a scalar field" (1996).
https://paulbourke.net/geometry/polygonise/
## Usage
Import MarchingGrid class.
```JavaScript
import { MarchingGrid } from 'MarchingCubes.js';
```
Initialise MarchingGrid with position, dimensions, and material,
generate the mesh, and add it to a scene.
```JavaScript
const grid = new MarchingGrid(position, dimensions, material);
grid.genMesh();
grid.add(scene, true, false);
```