FilamentInstance

actual class FilamentInstance

FilamentInstance provides access to a hierarchy of entities instanced from a glTF asset.

Every entity has a TransformManager component. Some entities also have Name or Renderable components. Instances share material and geometry data with the parent FilamentAsset but maintain independent entity hierarchies, transforms, and animation states.

Key features:

  • Independent entity tree for each instance

  • Skeletal animation via getAnimator() (independent per-instance or shared from asset)

  • Material variant switching via applyMaterialVariant()

  • Skin/skeleton access for joint manipulation

  • Independent bounding box and transform root

Animation ownership: Each instance has its own Animator, but it can also be obtained from the parent FilamentAsset. Using the asset's animator means all instances share the same animation frame; using instance animators allows independent control.

See also

expect class FilamentInstance

FilamentInstance provides access to a hierarchy of entities instanced from a glTF asset.

Every entity has a TransformManager component. Some entities also have Name or Renderable components. Instances share material and geometry data with the parent FilamentAsset but maintain independent entity hierarchies, transforms, and animation states.

Key features:

  • Independent entity tree for each instance

  • Skeletal animation via getAnimator() (independent per-instance or shared from asset)

  • Material variant switching via applyMaterialVariant()

  • Skin/skeleton access for joint manipulation

  • Independent bounding box and transform root

Animation ownership: Each instance has its own Animator, but it can also be obtained from the parent FilamentAsset. Using the asset's animator means all instances share the same animation frame; using instance animators allows independent control.

See also

actual class FilamentInstance

FilamentInstance provides access to a hierarchy of entities instanced from a glTF asset.

Every entity has a TransformManager component. Some entities also have Name or Renderable components. Instances share material and geometry data with the parent FilamentAsset but maintain independent entity hierarchies, transforms, and animation states.

Key features:

  • Independent entity tree for each instance

  • Skeletal animation via getAnimator() (independent per-instance or shared from asset)

  • Material variant switching via applyMaterialVariant()

  • Skin/skeleton access for joint manipulation

  • Independent bounding box and transform root

Animation ownership: Each instance has its own Animator, but it can also be obtained from the parent FilamentAsset. Using the asset's animator means all instances share the same animation frame; using instance animators allows independent control.

See also

actual class FilamentInstance

FilamentInstance provides access to a hierarchy of entities instanced from a glTF asset.

Every entity has a TransformManager component. Some entities also have Name or Renderable components. Instances share material and geometry data with the parent FilamentAsset but maintain independent entity hierarchies, transforms, and animation states.

Key features:

  • Independent entity tree for each instance

  • Skeletal animation via getAnimator() (independent per-instance or shared from asset)

  • Material variant switching via applyMaterialVariant()

  • Skin/skeleton access for joint manipulation

  • Independent bounding box and transform root

Animation ownership: Each instance has its own Animator, but it can also be obtained from the parent FilamentAsset. Using the asset's animator means all instances share the same animation frame; using instance animators allows independent control.

See also

actual class FilamentInstance

FilamentInstance provides access to a hierarchy of entities instanced from a glTF asset.

Every entity has a TransformManager component. Some entities also have Name or Renderable components. Instances share material and geometry data with the parent FilamentAsset but maintain independent entity hierarchies, transforms, and animation states.

Key features:

  • Independent entity tree for each instance

  • Skeletal animation via getAnimator() (independent per-instance or shared from asset)

  • Material variant switching via applyMaterialVariant()

  • Skin/skeleton access for joint manipulation

  • Independent bounding box and transform root

Animation ownership: Each instance has its own Animator, but it can also be obtained from the parent FilamentAsset. Using the asset's animator means all instances share the same animation frame; using instance animators allows independent control.

See also

Constructors

Link copied to clipboard
actual constructor()

Create a new FilamentInstance.

expect constructor()

Create a new FilamentInstance.

constructor(nativeHandle: MemorySegment?)
actual constructor()

Create a new FilamentInstance.

constructor(nativeHandle: CPointer<FilaFilamentInstance>?)
actual constructor()

Create a new FilamentInstance.

constructor(jsInstance: gltfio_FilamentInstance)
actual constructor()

Create a new FilamentInstance.

Properties

Link copied to clipboard
actual val animator: Animator

Returns the animation engine for this instance.

expect val animator: Animator

Returns the animation engine for this instance.

actual val animator: Animator

Returns the animation engine for this instance.

actual val animator: Animator

Returns the animation engine for this instance.

actual val animator: Animator

Returns the animation engine for this instance.

Link copied to clipboard
actual val asset: FilamentAsset

Gets the FilamentAsset that owns this instance.

expect val asset: FilamentAsset

Gets the FilamentAsset that owns this instance.

actual val asset: FilamentAsset

Gets the FilamentAsset that owns this instance.

actual val asset: FilamentAsset

Gets the FilamentAsset that owns this instance.

actual val asset: FilamentAsset

Gets the FilamentAsset that owns this instance.

Link copied to clipboard
actual val boundingBox: Box

Gets the axis-aligned bounding box from the min/max values in the glTF accessors, transformed for this instance.

expect val boundingBox: Box

Gets the axis-aligned bounding box from the min/max values in the glTF accessors, transformed for this instance.

actual val boundingBox: Box

Gets the axis-aligned bounding box from the min/max values in the glTF accessors, transformed for this instance.

actual val boundingBox: Box

Gets the axis-aligned bounding box from the min/max values in the glTF accessors, transformed for this instance.

actual val boundingBox: Box

Gets the axis-aligned bounding box from the min/max values in the glTF accessors, transformed for this instance.

Link copied to clipboard
actual val entities: IntArray

Gets the entities of this instance, one per glTF node. All have a Transform component; some also have a Renderable or Name component.

expect val entities: IntArray

Gets the entities of this instance, one per glTF node. All have a Transform component; some also have a Renderable or Name component.

actual val entities: IntArray

Gets the entities of this instance, one per glTF node. All have a Transform component; some also have a Renderable or Name component.

actual val entities: IntArray

Gets the entities of this instance, one per glTF node. All have a Transform component; some also have a Renderable or Name component.

actual val entities: IntArray

Gets the entities of this instance, one per glTF node. All have a Transform component; some also have a Renderable or Name component.

Link copied to clipboard
actual val entityCount: Int

Gets the number of entities returned by getEntities.

expect val entityCount: Int

Gets the number of entities returned by getEntities.

actual val entityCount: Int

Gets the number of entities returned by getEntities.

actual val entityCount: Int

Gets the number of entities returned by getEntities.

actual val entityCount: Int

Gets the number of entities returned by getEntities.

Link copied to clipboard
@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "throws at runtime with embind 'unbound types' — the vector return type is unregistered in the web prebuilt.")
actual val materialInstances: List<MaterialInstance>

Gets all material instances of this instance. These are already bound to renderables.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "throws at runtime with embind 'unbound types' — the vector return type is unregistered in the web prebuilt.")
expect val materialInstances: List<MaterialInstance>

Gets all material instances of this instance. These are already bound to renderables.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "throws at runtime with embind 'unbound types' — the vector return type is unregistered in the web prebuilt.")
actual val materialInstances: List<MaterialInstance>

Gets all material instances of this instance. These are already bound to renderables.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "throws at runtime with embind 'unbound types' — the vector return type is unregistered in the web prebuilt.")
actual val materialInstances: List<MaterialInstance>

Gets all material instances of this instance. These are already bound to renderables.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "throws at runtime with embind 'unbound types' — the vector return type is unregistered in the web prebuilt.")
actual val materialInstances: List<MaterialInstance>

Gets all material instances of this instance. These are already bound to renderables.

Link copied to clipboard

Gets the names of all material variants declared in the asset, in variant-index order.

Gets the names of all material variants declared in the asset, in variant-index order.

Gets the names of all material variants declared in the asset, in variant-index order.

Gets the names of all material variants declared in the asset, in variant-index order.

Gets the names of all material variants declared in the asset, in variant-index order.

Link copied to clipboard
var nativeHandle: CPointer<FilaFilamentInstance>?
Link copied to clipboard
val FilamentInstance.nativeObject: MemorySegment?
val FilamentInstance.nativeObject: gltfio_FilamentInstance
Link copied to clipboard
actual val root: Entity

Gets the transform root entity of this instance, which has no matching glTF node.

expect val root: Entity

Gets the transform root entity of this instance, which has no matching glTF node.

actual val root: Entity

Gets the transform root entity of this instance, which has no matching glTF node.

actual val root: Entity

Gets the transform root entity of this instance, which has no matching glTF node.

actual val root: Entity

Gets the transform root entity of this instance, which has no matching glTF node.

Link copied to clipboard
actual val skinCount: Int

Gets the number of skins declared in the asset.

expect val skinCount: Int

Gets the number of skins declared in the asset.

actual val skinCount: Int

Gets the number of skins declared in the asset.

actual val skinCount: Int

Gets the number of skins declared in the asset.

actual val skinCount: Int

Gets the number of skins declared in the asset.

Link copied to clipboard
actual val skinNames: List<String>

Gets the names of all skins, in skin-index order.

expect val skinNames: List<String>

Gets the names of all skins, in skin-index order.

actual val skinNames: List<String>

Gets the names of all skins, in skin-index order.

actual val skinNames: List<String>

Gets the names of all skins, in skin-index order.

actual val skinNames: List<String>

Gets the names of all skins, in skin-index order.

Functions

Link copied to clipboard
actual fun applyMaterialVariant(variantIndex: Int)

Applies the material variant at variantIndex to all primitives in this instance. Ignored if the index is out of bounds.

expect fun applyMaterialVariant(variantIndex: Int)

Applies the material variant at variantIndex to all primitives in this instance. Ignored if the index is out of bounds.

actual fun applyMaterialVariant(variantIndex: Int)

Applies the material variant at variantIndex to all primitives in this instance. Ignored if the index is out of bounds.

actual fun applyMaterialVariant(variantIndex: Int)

Applies the material variant at variantIndex to all primitives in this instance. Ignored if the index is out of bounds.

actual fun applyMaterialVariant(variantIndex: Int)

Applies the material variant at variantIndex to all primitives in this instance. Ignored if the index is out of bounds.

Link copied to clipboard
actual fun attachSkin(skinIndex: Int, target: Entity)

Attaches the given skin to the given node entity, which must have an associated mesh with BONE_INDICES and BONE_WEIGHTS attributes. No-op if the skin index or target is invalid.

expect fun attachSkin(skinIndex: Int, target: Entity)

Attaches the given skin to the given node entity, which must have an associated mesh with BONE_INDICES and BONE_WEIGHTS attributes. No-op if the skin index or target is invalid.

actual fun attachSkin(skinIndex: Int, target: Entity)

Attaches the given skin to the given node entity, which must have an associated mesh with BONE_INDICES and BONE_WEIGHTS attributes. No-op if the skin index or target is invalid.

actual fun attachSkin(skinIndex: Int, target: Entity)

Attaches the given skin to the given node entity, which must have an associated mesh with BONE_INDICES and BONE_WEIGHTS attributes. No-op if the skin index or target is invalid.

actual fun attachSkin(skinIndex: Int, target: Entity)

Attaches the given skin to the given node entity, which must have an associated mesh with BONE_INDICES and BONE_WEIGHTS attributes. No-op if the skin index or target is invalid.

Link copied to clipboard
actual fun detachSkin(skinIndex: Int, target: Entity)

Detaches the given skin from the given node entity. No-op if skin index or target is invalid.

expect fun detachSkin(skinIndex: Int, target: Entity)

Detaches the given skin from the given node entity. No-op if skin index or target is invalid.

actual fun detachSkin(skinIndex: Int, target: Entity)

Detaches the given skin from the given node entity. No-op if skin index or target is invalid.

actual fun detachSkin(skinIndex: Int, target: Entity)

Detaches the given skin from the given node entity. No-op if skin index or target is invalid.

actual fun detachSkin(skinIndex: Int, target: Entity)

Detaches the given skin from the given node entity. No-op if skin index or target is invalid.

Link copied to clipboard
actual fun getJointCountAt(skinIndex: Int): Int

Gets the number of joints in the skin at skinIndex.

expect fun getJointCountAt(skinIndex: Int): Int

Gets the number of joints in the skin at skinIndex.

actual fun getJointCountAt(skinIndex: Int): Int

Gets the number of joints in the skin at skinIndex.

actual fun getJointCountAt(skinIndex: Int): Int

Gets the number of joints in the skin at skinIndex.

actual fun getJointCountAt(skinIndex: Int): Int

Gets the number of joints in the skin at skinIndex.

Link copied to clipboard
actual fun getJointsAt(skinIndex: Int): IntArray

Gets the joint entities of the skin at skinIndex.

expect fun getJointsAt(skinIndex: Int): IntArray

Gets the joint entities of the skin at skinIndex.

actual fun getJointsAt(skinIndex: Int): IntArray

Gets the joint entities of the skin at skinIndex.

actual fun getJointsAt(skinIndex: Int): IntArray

Gets the joint entities of the skin at skinIndex.

actual fun getJointsAt(skinIndex: Int): IntArray

Gets the joint entities of the skin at skinIndex.