Represents a scene that contains multiple meshes. It tracks the global bounding box as meshes are added and maintains a mapping between g3d instance indices and meshes.

Hierarchy

  • Scene

Constructors

Properties

builder: SceneBuilder
insertables: InsertableMesh[] = ...
meshes: (Mesh | InsertableMesh | InstancedMesh)[] = []

Accessors

  • get material(): Material
  • Gets the current material override or undefined if none.

    Returns Material

  • set material(value: Material): void
  • Sets and apply a material override to the scene, set to undefined to remove override.

    Parameters

    • value: Material

    Returns void

Methods

  • Unloads and disposes all meshes and leaves the scene ready to add new ones.

    Returns void

  • Returns the scene bounding box. Returns undefined if scene is empty.

    Parameters

    • target: Box3 = ...

    Returns Box3

  • Returns the THREE.Mesh in which this instance is represented along with index For merged mesh, index refers to submesh index For instanced mesh, index refers to instance index.

    Parameters

    • instance: number

    Returns Submesh[]

Generated using TypeDoc