Optional
objectProcessor: IObjectProcessorCalls dispose on current old environment map, background map when it is changed. Runtime only (not serialized)
For 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
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.
Unique number of the object instance. Expects a Integer
Searches through an object and its children, starting with the object itself, and returns the first with a matching name.
String to match to the children's Object3D.name property.
Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.
the property name to search for.
value of the given property.
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.
Traverse only upgraded objects with extra options
Like traverse, but the callback will only be executed for visible objects
use envMapIntensity instead
Main camera that the user controls
Main camera that the user controls
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.
Add any object to the scene.
Optional
options: AddObjectOptionsAdd any processed scene object to the scene.
Optional
options: AddObjectOptionsrenamed to addObject
Optional
obj: IObject3D<Dispose the scene and clear all resources. WARNING - Not fully implemented yet, just clears the scene.
Refreshes the scene active camera near far values, based on the scene bounding box. This is called automatically every time the camera fov is updated.
Find objects by name exact match in the complete hierarchy.
name
Optional
parent: IObject3D<optional 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: AddObjectOptionsOptional
ev: {Refreshes the scene active camera near far values, based on the scene bounding box. This is called automatically every time the camera is updated.
For visualizing the scene bounds. API incomplete.
Optional
event: Partial<({ object: IObject3D<IObject3DEventMap, IGeometry<NormalBufferAttributes, BufferGeometryEventMap> | undefined, IMaterial<...> | ... 1 more ... | undefined>; geometry: IGeometry<...>; bubbleToParent: boolean; } & AnyOptions & { ...; }) | ({ ...; } & Omit<...>) | { ...; }> & ISceneSetDirtyOptions & { ...; }renamed to clearSceneModels
The object to point at.
The distance offset from the object to point at.
The distance offset for the target from the center of object to point at.
Sets the backgroundColor property from a string, number or Color, and updates the scene.
Mark the scene dirty, and force render in the next frame.
Optional
options: ISceneSetDirtyOptionsset refreshScene
to true to mark that any object transformations have changed. It might trigger effects like frame fade depening on plugins.
Serialize the scene properties
Optional
meta: anyEquivalent 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.