Class RootScene

Hierarchy

Implements

Constructors

Properties

_mainCamera: null | ICamera<ICameraEvent, ICameraEventTypes> = null
_renderCamera: undefined | ICamera<ICameraEvent, ICameraEventTypes>
_sceneBoundingRadius: number = 0
_sceneBounds: Box3B = ...
_v1: Vector3 = ...
_v2: Vector3 = ...
assetType: "model" = ...
autoNearFarEnabled: boolean = true

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

background: null | "environment" | Color | ITexture = null
backgroundColor: null | Color = null
backgroundIntensity: number = 1

The intensity for the environment light.

clone: ((recursive?) => this)

Type declaration

    • (recursive?): this
    • Parameters

      • Optional recursive: boolean

      Returns this

copy: ((source, recursive?, ...args) => this)

Type declaration

    • (source, recursive?, ...args): this
    • Parameters

      • source: this
      • Optional recursive: boolean
      • Rest ...args: any[]

      Returns this

The default camera in the scene

dispatchEvent: ((event) => void)

Type declaration

envMapIntensity: number = 1

The intensity for the environment light.

environment: null | ITexture = null
fixedEnvMapDirection: boolean = false

Fixed direction environment reflections irrespective of camera position.

getObjectById: (<T>(id) => undefined | T)

Type declaration

getObjectByName: (<T>(name) => undefined | T)

Type declaration

getObjectByProperty: (<T>(name, value) => undefined | T)

Type declaration

isRootScene: true = true

The root object where all imported objects are added.

parent: null
refreshUi: any = ...
remove: ((...object) => this)

Type declaration

traverse: ((callback) => void)

Type declaration

traverseAncestors: ((callback) => void)

Type declaration

traverseVisible: ((callback) => void)

Type declaration

uiConfig: UiObjectConfig<any, string, any>

Accessors

Methods

  • Returns the bounding box of the scene model root.

    Parameters

    • precise: boolean = false
    • ignoreInvisible: boolean = true
    • ignoreWidgets: boolean = true
    • Optional ignoreObject: ((obj) => boolean)
        • (obj): boolean
        • Parameters

          Returns boolean

    Returns Box3B

  • Refreshes the scene active camera near far values, based on the scene bounding box. This is called automatically every time the camera is updated.

    Returns void

  • Parameters

    • rootObject: undefined | Object3D<Event, string> = undefined

      The object to point at.

    • centerOffset: Vector3 = ...

      The distance offset from the object to point at.

    • targetOffset: Vector3 = ...

      The distance offset for the target from the center of object to point at.

    Returns void

    Deprecated

    Sets the camera pointing towards the object at a specific distance.

  • Sets the backgroundColor property from a string, number or Color, and updates the scene.

    Parameters

    • color: null | string | number | Color

    Returns void

  • Mark the scene dirty, and force render in the next frame.

    Parameters

    • Optional options: IObjectSetDirtyOptions

      set refreshScene to true to mark that any object transformations have changed. It might trigger effects like frame fade depening on plugins.

    Returns this

  • Equivalent to setDirty({refreshScene: true}), dispatches 'sceneUpdate' event with the specified options.

    Parameters

    Returns this

    Deprecated

    use refreshScene

  • Parameters

    • material: {
          defines: Record<string, undefined | string | number>;
          uniforms: {
              [name: string]: IUniform;
          };
      }
      • defines: Record<string, undefined | string | number>
      • uniforms: {
            [name: string]: IUniform;
        }

    Returns this

Generated using TypeDoc