Documentation is work in progress and not completeEditor
3D System

GeometryFactory

GeometryFactory is a set of pure functions that create BufferGeometry instances from a GeometryConfig. It supports six primitives plus extrusion from SVG paths. Every mesh it creates has castShadow and receiveShadow set to true.

Box

ParameterDefaultRangeDescription
width1> 0Width along X
height1> 0Height along Y
depth1> 0Depth along Z
widthSegments11-10Subdivisions along width
heightSegments11-10Subdivisions along height
depthSegments11-10Subdivisions along depth

Sphere

ParameterDefaultRangeDescription
radius0.5> 0Sphere radius
widthSegments / segments323-64Horizontal segments. Higher is smoother
heightSegmentshalf of widthSegments2-32Vertical segments

Height segments default to Math.max(2, Math.round(widthSegments / 2)) when not specified.

Cylinder

ParameterDefaultRangeDescription
radiusTop0.5>= 0Top circle radius. Set to 0 for a cone shape
radiusBottom0.5>= 0Bottom circle radius
height1> 0Height along Y
radialSegments / segments163-64Faces around the circumference

Cone

ParameterDefaultRangeDescription
radius0.5> 0Base circle radius
height1> 0Height from base to apex
radialSegments / segments163-64Faces around the circumference

Torus

ParameterDefaultRangeDescription
radius0.5> 0Distance from torus center to tube center
tubeRadius0.2> 0Radius of the tube cross-section
radialSegments163-32Segments around the tube cross-section
tubularSegments / segments1003-200Segments around the ring

Capsule

ParameterDefaultRangeDescription
radius0.5> 0Radius of the capsule
height1> 0Length of the middle cylindrical section
radialSegments / segments163-64Segments around the circumference

Cap segments are hardcoded to 8.

Extrusion from SVG Shapes

extrudeFromShapes() takes an array of THREE.Shape objects parsed from SVG paths and creates an ExtrudeGeometry, centered after creation.

ParameterDefaultRangeDescription
extrudeDepth0.50.01-5How far the shape is extruded along Z
bevelEnabledtrueWhether to add beveled edges
bevelThickness0.050-0.5How deep the bevel cuts into the shape
bevelSize0.030-0.5How far the bevel extends outward
bevelSegments31-8Smoothness of the bevel curve

At bevelSegments: 1 the bevel is a simple chamfer; at higher values it becomes a smooth curve.