Interface: FilamentInstance
Every asset loaded has at least one FilamentInstance. You can load multiple instances of the same asset.
Provides access to a hierarchy of entities that have been instanced from a glTF asset.
Every entity has a TransformManager component, and some entities also have Name or Renderable components.
Extends
Properties
entityCount
readonly
entityCount:number
Gets the number of entities returned by entities.
Inherited from
FilamentInstanceBase
.entityCount
Defined in
src/types/FilamentInstanceBase.ts:35
getEntities()
getEntities: () =>
Entity
[]
Gets the list of entities, one for each glTF node. All of these have a Transform component. Some of the returned entities may also have a Renderable component and/or a Light component.
Returns
Entity
[]
Inherited from
FilamentInstanceBase
.getEntities
Defined in
src/types/FilamentInstanceBase.ts:22
Methods
createAnimator()
createAnimator(
nameComponentManager
):FilamentAnimator
Parameters
• nameComponentManager: NameComponentManager
Returns
Inherited from
FilamentInstanceBase
.createAnimator
Defined in
src/types/FilamentInstanceBase.ts:16
getBoundingBox()
getBoundingBox():
AABB
Gets the bounding box computed from the supplied min / max values in glTF accessors.
This does not return a bounding box over all FilamentInstance, it's just a straightforward AAAB that can be determined at load time from the asset data.
Returns
Inherited from
FilamentInstanceBase
.getBoundingBox
Defined in
src/types/FilamentInstanceBase.ts:30
getRoot()
getRoot():
Entity
Gets the transform root for the asset, which has no matching glTF node.
This node exists for convenience, allowing users to transform the entire asset. For instanced assets, this is a "super root" where each of its children is a root in a particular instance. This allows users to transform all instances en masse if they wish to do so.