Creates a new SceneManager instance
Configuration options
Three.js camera (perspective or orthographic)
Canvas element being rendered to
Orbit controls for camera
Last render time in milliseconds
OptionalonCalled after every rendered frame, for consumers that track render stats.
Three.js WebGL renderer
Three.js scene
Static ReadonlydefaultDefault extrusion color
Gets the current background color
Current background color
Sets the background color
Color value as number, string, or Color instance
Gets the current bounding box color
Color representation or undefined if not set
Sets the bounding box color
Color value or undefined to hide the bounding box
Sets the build volume dimensions
Partial build volume properties (x, y, z, smallGrid)
Gets the current end layer (1-based index)
End layer number
Sets the end layer (1-based index)
Layer number to end rendering at
Gets the current extrusion color(s)
Color or array of colors for extruded paths
Sets the extrusion color(s)
Color value(s) as number, string, Color instance, or array of ColorRepresentation
Gets the current last segment color
Color representation or undefined if not set
Gets whether single layer mode is enabled
True if single layer mode is active
Sets single layer mode
True to enable single layer mode
Gets the current start layer (1-based index)
Start layer number
Sets the start layer (1-based index)
Layer number to start rendering from
Gets the current top layer color
Color representation or undefined if not set
Gets the current travel move color
Current travel move color
Sets the travel move color
Color value as number, string, or Color instance
Renders all visible paths in the scene
ExperimentalRenders paths incrementally using an animation loop
Number of paths to render per frame
Promise that resolves when rendering is complete
Updates the clipping planes for the 3D preview based on the start and end layers.
This method calculates the minimum and maximum Z values from the specified start and end layers. A bound that is unset — or that sits at the very end of the layer stack — leaves that side of the range unbounded: an endLayer equal to the layer count is no restriction, so moves outside the printed layers (travel moves above the top layer, most commonly) stay visible.
It then updates the clipping planes for shader materials and line clipping using these Z values.
WebGL-based G-code preview renderer