Mesh and voxel builders used by the 3D renderer and voxel utilities.
Key exports
Vec3(x,y,z)— vertex constructorMesh(vertices?, edges?)— wireframe meshCubeMesh(size?),GridMesh(size?, step?),AxesMesh(length?)VoxelMesh(voxels, voxelSize?),VoxelGrid(options?)SphereMesh(radius?, segments?, rings?)— UV spherePyramidMesh(base?, height?)— four-sided pyramidCylinderMesh(radius?, height?, segments?)— cylinder along Y axisConeMesh(radius?, height?, segments?)— cone with apex at topTorusMesh(majorRadius?, minorRadius?, majorSegments?, minorSegments?)— torus (donut)PlaneMesh(width?, depth?, subdivisionsW?, subdivisionsD?)— flat XZ planeHemisphereMesh(radius?, segments?, rings?)— top half of a UV sphereWedgeMesh(width?, height?, depth?)— triangular prism wedgeTubeMesh(outerRadius?, innerRadius?, height?, segments?)— hollow cylinder (pipe)ArrowMesh(shaftRadius?, shaftHeight?, headRadius?, headHeight?, segments?)— 3D arrowPrismMesh(radius?, height?, sides?)— regular n-sided prismStairsMesh(steps?, width?, stepHeight?, stepDepth?)— stepped staircaseIcosphereMesh(radius?)— icosahedron (geodesic sphere)
Notes
- Mesh objects are
{ vertices: [...], edges: [...], faces?: [...] }used bygui-render. - New mesh types include
facesarrays for solid rendering. VoxelGridprovides a mutable voxel set with helper methods andtoMesh().