File: MarchingCubes.md | Updated: 11/15/2025
A marching cubes implementation.
Port of: http://webglsamples.org/blob/blob.html
MarchingCubes is an addon, and must be imported explicitly, see Installation#Addons.
import { MarchingCubes } from 'three/addons/objects/MarchingCubes.js';
Constructs a new marching cubes instance.
resolution | The effect's resolution.
---|---
material | The cube's material.
enableUvs | Whether texture coordinates should be animated or not. Default is false.
enableColors | Whether colors should be animated or not. Default is false.
maxPolyCount | The maximum size of the geometry buffers. Default is 10000.
Whether colors should be animated or not.
Default is false.
Whether texture coordinates should be animated or not.
Default is false.
This flag can be used for type testing.
Default is true.
Adds a reciprocal ball (nice and blobby) that, to be fast, fades to zero after a fixed distance, determined by strength and subtract.
ballx | The x-coordinate of the ball.
---|---
bally | The y-coordinate of the ball.
ballz | The z-coordinate of the ball.
strength | The strength factor.
subtract | The subtract factor.
colors | The color.
Adds a plane along the x-axis.
strength | The strength factor.
---|---
subtract | The subtract factor.
Adds a plane along the y-axis.
strength | The strength factor.
---|---
subtract | The subtract factor.
Adds a plane along the z-axis.
strength | The strength factor.
---|---
subtract | The subtract factor.
Applies a blur with the given intensity.
intensity | The intensity of the blur. Default is 1.
---|---
Returns the cell value for the given coordinates.
x | The x value.
---|---
y | The y value.
z | The z value.
Returns: The value.
Resets the effect.
Sets the cell value for the given coordinates.
x | The x value.
---|---
y | The y value.
z | The z value.
value | The value to set.
Updates the effect.