1.4.7 • Published 2 years ago
@bitheral/marching-cubes v1.4.7
A Marching Cubes algorithm package for Three.js
This package is in part a port of Paul Bourke's marching cubes algorithm, to help create an environment using the Three.js library.
This package was developed in concurrence with my dissertation project, which is a procedural environment generator using WebGL. It is recommended to check out the project for a more complete example.
Installation
npm install @bitheral/marching-cubes
Usage
import { VolumeNew: Volume } from '@bitheral/marching-cubes';
import { Vector3, Mesh, MeshBasicMaterial } from 'three';
// Create Marching Cubes volume
const volume = new Volume(32, new Vector3(), new Vector3());
volume.March();
// Create Three.js mesh
const geometry = volume.geometry;
const material = new MeshBasicMaterial({ color: 0x00ff00 });
const mesh = new Mesh(geometry, material);
// Add mesh to scene...
1.4.7
2 years ago
1.4.6
2 years ago
1.4.5
2 years ago
1.4.4
2 years ago
1.4.3
2 years ago
1.4.2
2 years ago
1.4.1
2 years ago
1.3.2
2 years ago
1.3.1
2 years ago
1.0.0
3 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago
0.0.1
3 years ago