Properties
objectPickConfiguration
Holds the ObjectPickConfiguration for pick filtering.
By default the viewer filters the objects from
ObjectClicked and
ObjectDoubleClicked events the following way: -
Null materials are ignored - Materials with visible=false are ignored - Transparent materials
with opacity=0 are ignored - SpeckleGhostMaterial material instances are ignored
Accessors
allObjects
Gets the parent three.js object for all loaded scene content.
Returns: Object3D
clippingPlanes
Gets or set the clipping Planes for the scene. Anything outside the volume determined by the clipping planes will get visually clipped.
clippingVolume
Gets or set the clipping volume for the renderer as a Box3. Anything outside the clipping volume is not interactible by default.
indirectIBL
Sets the texture for indirect image based lighting. Works as per existing three.js Scene documentation.
indirectIBLIntensity
Sets the envMapIntensity for all SpeckleStandardMaterials in the scene.
intersections
Gets the Intersections instance associated with the renderer.
Returns: Intersections
needsRender
Signals the renderer that it needs to render at least one frame. Assigning a false value has no effect.
pipeline
Gets or sets the renderer’s Pipeline.
renderer
Gets the underlying SpeckleWebGLRenderer which is small extension of WebGLRenderer.
Returns: SpeckleWebGLRenderer
renderingCamera
Gets the currently rendering Camera.
Returns: Camera
renderingStats
Gets the up to date RenderingStats.
Returns: RenderingStats
scene
Gets the underlying three.js Scene.
Returns: Scene
sceneBox
Gets the total bounds of the scene.
Returns: Box3
sceneCenter
Gets the center of the total bounds of the scene.
Returns: Vector3
sceneSphere
Gets the sphere encompasing the entire scene.
Returns: Sphere
shadowcatcher
Gets The Shadowcatcher🛸 instance associated with the renderer.
Returns: Shadowcatcher
shadowMapNeedsUpdate
Signals the renderer to render the shadowmap.
sunLight
Gets the DirectionalLight sun instance.
Returns: DirectionalLight
Methods
addRenderTree
Generator function which takes the id of a render tree, builds the batches, then adds the batches to the scene. The function will yield after each batch has been created, allowing for user defined code to be run in the following fashion.
Parameters:
- subtreeId: The id of the render tree to add to the scene
Returns: AsyncGenerator
boxFromObjects
Builds the bounds of the provided object ids as a Box3.
Parameters:
- objectIds: An array of ids that participate in the bounds calculation
Returns: Box3
cancelRenderTree
Cancels any ongoing render tree adding operations. Effective cancelling happens as soon as the current running generator step yields.
Parameters:
- objectIds: An array of ids that participate in the bounds calculation
Returns: void
enableLayers
Enables/Disables ObjectLayers from rendering. By default all layers are enabled.
Parameters:
- objectIds: An array of ids that participate in the bounds calculation
Returns: void
getBatch
Gets a Batch by id.
Parameters:
Returns: Batch
getBatchMaterial
Gets the default material of the provided NodeRenderView. It’s originally defined material.
Parameters:
Returns: Material
getMaterial
Gets the current material of the provided [NodeRenderView](/dev
Parameters:
Returns: Material
getObject
Gets the associated BatchObject with the provided NodeRenderView.
Parameters:
Returns: BatchObject
getObjects
Gets all BatchObject instances from the renderer.
Returns: BatchObject[]
removeRenderTree
Removes the specified render tree along with all it’s generated objects from the scene.
Parameters:
- subtreeId: The id of the render tree to remove from the scene
Returns: void
renderViewFromIntersection
Takes an intersection result produced by intersections and outputs the intersected NodeRenderView.
Parameters:
Returns: NodeRenderView
resetMaterials
Resets all object materials to their original default.
Returns: void
resetPipeline
Resets the current rendering pipeline.
Returns: void
resize
Manually resizes the renderer.
Returns: void
setMaterial
There are several overloads of this method.
Sets the material instance to the specified rvs.
Parameters:
Creates a material based on the intersection between RenderMaterial, DisplayStyle and MaterialOptions. Because this method does not discriminate based on the render view’s geometry type (mesh, lines, points) it needs to be able to build materials suitable for all gometry types.
Parameters:
Returns: void
Sets the filter material to the specified rvs. FilterMaterials are a set of predefined material types which are commonly used.
Parameters:
Returns: void
setSunLightConfiguration
Sets the provided SunLightConfiguration.
Parameters:
Returns: void
updateShadowCatcher
Updates The Shadowcatcher🛸.
Parameters:
Returns: void
Typedefs
ObjectPickConfiguration
- pickedObjectsFilter: The filtering predicate
You can accept or reject each picked object from ObjectClicked and ObjectDoubleClicked events, based on thier NodeRenderView and Material
RenderingStats
Details regarding rendering state.
SunLightConfiguration
- elevation: Elevation in polar coordinates
- azimuth: Azimuth in polar coordinates
- radius: Distance from the camera target
Last modified on July 18, 2026