Optional
objectProcessor: IObjectProcessorFor Programmatically toggling autoNearFar. This property is not supposed to be in the UI or serialized. Use camera.userData.autoNearFar for UI and serialization This is used in PickingPlugin autoNearFar will still be disabled if this is true and camera.userData.autoNearFar is false
Defines the background of the scene.
Valid inputs are:
Custom property for background tint, or just background color rendered in the shader
The intensity for the environment light.
Array with object's children.
Returns a clone of this
object and optionally all descendants.
Optional
recursive: booleanIf true, descendants of the object are also cloned. Default true
Copy the given object into this object
Optional
recursive: booleanIf true, descendants of the object are also copied. Default true
Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.
Readonly
defaultThe default camera in the scene
Fire an event type.
The event that gets fired.
The default environment map used when rendering materials in the scene
The intensity for the environment light.
Rotation in radians of the default environment map. Same as environment.rotation.
Note - this is not serialized here, but inside the texture.
Fixed direction environment reflections irrespective of camera position.
Searches through an object and its children, starting with the object itself, and returns the first with a matching id.
Searches through an object and its children, starting with the object itself, and returns the first with a matching name.
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
Readonly
isReadonly
modelThe root object where all imported objects are added.
Object's parent in the scene graph.
Group for info on manually grouping objects.
Extra textures/envmaps that can be used by objects/materials/plugins and will be serialized.
Executes the callback on this object and all descendants.
Executes the callback on all ancestors.
Like traverse, but the callback will only be executed for visible objects
use envMapIntensity instead
use envMapIntensity instead
Main camera that the user controls
Main camera that the user controls
Minimum Camera near plane
Get the threejs scene object
Camera that in currently being rendered.
Camera that in currently being rendered.
Adds a listener to an event type.
The type of event to listen to.
The function that gets called when the event is fired.
Find objects by name exact match in the complete hierarchy.
name
Optional
parent: IObject3Doptional root node to start search from
Array of found objects
Use getObjectByName instead.
Deserialize the scene properties
object from toJSON
Optional
meta: anyReturns the bounding box of the whole scene (model root and other meta objects).
To get the bounds of just the objects added by the user(not by plugins) use new Box3B().expandByObject(scene.modelRoot)
Optional
ignoreObject: (obj: Object3D) => booleanLoad model root scene exported to GLTF format. Used internally by ThreeViewer.addSceneObject.
Optional
options: AddObjectOptionsFor visualizing the scene bounds. API incomplete.
Optional
event: Partial<ISceneEvent> & IObjectSetDirtyOptionsrenamed to clearSceneModels
Mark the scene dirty, and force render in the next frame.
Optional
options: IObjectSetDirtyOptionsset refreshScene
to true to mark that any object transformations have changed. It might trigger effects like frame fade depening on plugins.
Equivalent to setDirty({refreshScene: true}), dispatches 'sceneUpdate' event with the specified options.
Optional
options: AnyOptions
Create a scene instance. This is done automatically in the ThreeViewer and must not be created separately.