1.4.7 • Published 1 year ago

@bitheral/marching-cubes v1.4.7

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

A Marching Cubes algorithm package for Three.js

Version License Dependencies Size

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

1 year ago

1.4.6

1 year ago

1.4.5

1 year ago

1.4.4

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.0.0

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.1

1 year ago