FilamentAsset

actual class FilamentAsset

FilamentAsset owns a loaded glTF 2.0 asset and all its Filament objects.

A FilamentAsset represents a complete glTF scene with a hierarchy of entities, each having a Transform component. Some entities also have Renderable, Light, Camera, or animation components.

Assets own strong references to VertexBuffer, IndexBuffer, Texture objects, and optionally an Animator for skeletal animations. External resource loading (textures, buffer data) is handled separately via ResourceLoader.

Note: Only the default glTF scene is loaded; other glTF scenes are ignored.

See also

expect class FilamentAsset

FilamentAsset owns a loaded glTF 2.0 asset and all its Filament objects.

A FilamentAsset represents a complete glTF scene with a hierarchy of entities, each having a Transform component. Some entities also have Renderable, Light, Camera, or animation components.

Assets own strong references to VertexBuffer, IndexBuffer, Texture objects, and optionally an Animator for skeletal animations. External resource loading (textures, buffer data) is handled separately via ResourceLoader.

Note: Only the default glTF scene is loaded; other glTF scenes are ignored.

See also

actual class FilamentAsset

FilamentAsset owns a loaded glTF 2.0 asset and all its Filament objects.

A FilamentAsset represents a complete glTF scene with a hierarchy of entities, each having a Transform component. Some entities also have Renderable, Light, Camera, or animation components.

Assets own strong references to VertexBuffer, IndexBuffer, Texture objects, and optionally an Animator for skeletal animations. External resource loading (textures, buffer data) is handled separately via ResourceLoader.

Note: Only the default glTF scene is loaded; other glTF scenes are ignored.

See also

actual class FilamentAsset

FilamentAsset owns a loaded glTF 2.0 asset and all its Filament objects.

A FilamentAsset represents a complete glTF scene with a hierarchy of entities, each having a Transform component. Some entities also have Renderable, Light, Camera, or animation components.

Assets own strong references to VertexBuffer, IndexBuffer, Texture objects, and optionally an Animator for skeletal animations. External resource loading (textures, buffer data) is handled separately via ResourceLoader.

Note: Only the default glTF scene is loaded; other glTF scenes are ignored.

See also

actual class FilamentAsset

FilamentAsset owns a loaded glTF 2.0 asset and all its Filament objects.

A FilamentAsset represents a complete glTF scene with a hierarchy of entities, each having a Transform component. Some entities also have Renderable, Light, Camera, or animation components.

Assets own strong references to VertexBuffer, IndexBuffer, Texture objects, and optionally an Animator for skeletal animations. External resource loading (textures, buffer data) is handled separately via ResourceLoader.

Note: Only the default glTF scene is loaded; other glTF scenes are ignored.

See also

Constructors

Link copied to clipboard
constructor(nativeHandle: MemorySegment?)
constructor(nativeHandle: CPointer<FilaFilamentAsset>?)
constructor(jsAsset: gltfio_FilamentAsset, _engine: Engine? = null)

Properties

Link copied to clipboard
var nativeHandle: MemorySegment?
var nativeHandle: CPointer<FilaFilamentAsset>?

Functions

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 fun getAssetInstanceCount(): Int

Returns the number of instances created from this asset (>= 1 unless detached).

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "throws at runtime with embind 'unbound types' — the vector return type is unregistered in the web prebuilt.")
expect fun getAssetInstanceCount(): Int

Returns the number of instances created from this asset (>= 1 unless detached).

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "throws at runtime with embind 'unbound types' — the vector return type is unregistered in the web prebuilt.")
actual fun getAssetInstanceCount(): Int

Returns the number of instances created from this asset (>= 1 unless detached).

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "throws at runtime with embind 'unbound types' — the vector return type is unregistered in the web prebuilt.")
actual fun getAssetInstanceCount(): Int

Returns the number of instances created from this asset (>= 1 unless detached).

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "throws at runtime with embind 'unbound types' — the vector return type is unregistered in the web prebuilt.")
actual fun getAssetInstanceCount(): Int

Returns the number of instances created from this asset (>= 1 unless detached).

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 fun getAssetInstances(): Array<FilamentInstance>

Returns every FilamentInstance created from this asset.

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

Returns every FilamentInstance created from this asset.

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

Returns every FilamentInstance created from this asset.

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

Returns every FilamentInstance created from this asset.

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

Returns every FilamentInstance created from this asset.

Link copied to clipboard
actual fun getBoundingBox(): Box

Gets the bounding box computed from the min/max values in the glTF accessors.

expect fun getBoundingBox(): Box

Gets the bounding box computed from the min/max values in the glTF accessors.

actual fun getBoundingBox(): Box

Gets the bounding box computed from the min/max values in the glTF accessors.

actual fun getBoundingBox(): Box

Gets the bounding box computed from the min/max values in the glTF accessors.

actual fun getBoundingBox(): Box

Gets the bounding box computed from the min/max values in the glTF accessors.

Link copied to clipboard

Gets the entities representing cameras. All of these have a Camera component.

Gets the entities representing cameras. All of these have a Camera component.

Gets the entities representing cameras. All of these have a Camera component.

Gets the entities representing cameras. All of these have a Camera component.

Gets the entities representing cameras. All of these have a Camera component.

Link copied to clipboard
actual fun getEngine(): Engine

Returns the Engine associated with the AssetLoader that created this asset.

expect fun getEngine(): Engine

Returns the Engine associated with the AssetLoader that created this asset.

actual fun getEngine(): Engine

Returns the Engine associated with the AssetLoader that created this asset.

actual fun getEngine(): Engine

Returns the Engine associated with the AssetLoader that created this asset.

actual fun getEngine(): Engine

Returns the Engine associated with the AssetLoader that created this asset.

Link copied to clipboard
actual fun getEntities(): IntArray

Gets the list of entities, one per glTF node. All have a Transform component; some also have a Renderable and/or Light component.

expect fun getEntities(): IntArray

Gets the list of entities, one per glTF node. All have a Transform component; some also have a Renderable and/or Light component.

actual fun getEntities(): IntArray

Gets the list of entities, one per glTF node. All have a Transform component; some also have a Renderable and/or Light component.

actual fun getEntities(): IntArray

Gets the list of entities, one per glTF node. All have a Transform component; some also have a Renderable and/or Light component.

actual fun getEntities(): IntArray

Gets the list of entities, one per glTF node. All have a Transform component; some also have a Renderable and/or Light component.

Link copied to clipboard
actual fun getEntitiesByName(name: String): IntArray

Gets all entities whose name label matches name exactly.

expect fun getEntitiesByName(name: String): IntArray

Gets all entities whose name label matches name exactly.

actual fun getEntitiesByName(name: String): IntArray

Gets all entities whose name label matches name exactly.

actual fun getEntitiesByName(name: String): IntArray

Gets all entities whose name label matches name exactly.

actual fun getEntitiesByName(name: String): IntArray

Gets all entities whose name label matches name exactly.

Link copied to clipboard
actual fun getEntitiesByPrefix(prefix: String): IntArray

Gets all entities whose name label starts with prefix.

expect fun getEntitiesByPrefix(prefix: String): IntArray

Gets all entities whose name label starts with prefix.

actual fun getEntitiesByPrefix(prefix: String): IntArray

Gets all entities whose name label starts with prefix.

actual fun getEntitiesByPrefix(prefix: String): IntArray

Gets all entities whose name label starts with prefix.

actual fun getEntitiesByPrefix(prefix: String): IntArray

Gets all entities whose name label starts with prefix.

Link copied to clipboard
actual fun getEntityCount(): Int

Gets the number of entities returned by getEntities.

expect fun getEntityCount(): Int

Gets the number of entities returned by getEntities.

actual fun getEntityCount(): Int

Gets the number of entities returned by getEntities.

actual fun getEntityCount(): Int

Gets the number of entities returned by getEntities.

actual fun getEntityCount(): Int

Gets the number of entities returned by getEntities.

Link copied to clipboard
actual fun getExtras(entity: Entity): String?

Gets the glTF extras string for the given node entity (or for the asset itself), if any.

expect fun getExtras(entity: Entity): String?

Gets the glTF extras string for the given node entity (or for the asset itself), if any.

actual fun getExtras(entity: Entity): String?

Gets the glTF extras string for the given node entity (or for the asset itself), if any.

actual fun getExtras(entity: Entity): String?

Gets the glTF extras string for the given node entity (or for the asset itself), if any.

actual fun getExtras(entity: Entity): String?

Gets the glTF extras string for the given node entity (or for the asset itself), if any.

Link copied to clipboard

Returns the first entity with the given name, or 0 if none exists.

Returns the first entity with the given name, or 0 if none exists.

Returns the first entity with the given name, or 0 if none exists.

Returns the first entity with the given name, or 0 if none exists.

Returns the first entity with the given name, or 0 if none exists.

Link copied to clipboard

Convenience accessor for the first instance (getAssetInstances[0]).

Convenience accessor for the first instance (getAssetInstances[0]).

Convenience accessor for the first instance (getAssetInstances[0]).

Convenience accessor for the first instance (getAssetInstances[0]).

Convenience accessor for the first instance (getAssetInstances[0]).

Link copied to clipboard

Gets the entities representing lights. All of these have a Light component.

Gets the entities representing lights. All of these have a Light component.

Gets the entities representing lights. All of these have a Light component.

Gets the entities representing lights. All of these have a Light component.

Gets the entities representing lights. All of these have a Light component.

Link copied to clipboard
@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "returns an empty array — not exposed by filament.js.")
actual fun getMorphTargetNames(entity: Entity): Array<String>

Gets the morph target names declared on the given entity, in target order.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "returns an empty array — not exposed by filament.js.")
expect fun getMorphTargetNames(entity: Entity): Array<String>

Gets the morph target names declared on the given entity, in target order.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "returns an empty array — not exposed by filament.js.")
actual fun getMorphTargetNames(entity: Entity): Array<String>

Gets the morph target names declared on the given entity, in target order.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "returns an empty array — not exposed by filament.js.")
actual fun getMorphTargetNames(entity: Entity): Array<String>

Gets the morph target names declared on the given entity, in target order.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "returns an empty array — not exposed by filament.js.")
actual fun getMorphTargetNames(entity: Entity): Array<String>

Gets the morph target names declared on the given entity, in target order.

Link copied to clipboard
actual fun getName(entity: Entity): String?

Gets the name label for the given entity, or null if it has none.

expect fun getName(entity: Entity): String?

Gets the name label for the given entity, or null if it has none.

actual fun getName(entity: Entity): String?

Gets the name label for the given entity, or null if it has none.

actual fun getName(entity: Entity): String?

Gets the name label for the given entity, or null if it has none.

actual fun getName(entity: Entity): String?

Gets the name label for the given entity, or null if it has none.

Link copied to clipboard

Gets the entities that have Renderable components.

Gets the entities that have Renderable components.

Gets the entities that have Renderable components.

Gets the entities that have Renderable components.

Gets the entities that have Renderable components.

Link copied to clipboard

Gets the URIs of all externally-referenced buffers/textures (to feed ResourceLoader).

Gets the URIs of all externally-referenced buffers/textures (to feed ResourceLoader).

Gets the URIs of all externally-referenced buffers/textures (to feed ResourceLoader).

Gets the URIs of all externally-referenced buffers/textures (to feed ResourceLoader).

Gets the URIs of all externally-referenced buffers/textures (to feed ResourceLoader).

Link copied to clipboard
actual fun getRoot(): Entity

Gets the transform root of the asset, an extra entity with no matching glTF node.

expect fun getRoot(): Entity

Gets the transform root of the asset, an extra entity with no matching glTF node.

actual fun getRoot(): Entity

Gets the transform root of the asset, an extra entity with no matching glTF node.

actual fun getRoot(): Entity

Gets the transform root of the asset, an extra entity with no matching glTF node.

actual fun getRoot(): Entity

Gets the transform root of the asset, an extra entity with no matching glTF node.

Link copied to clipboard
Link copied to clipboard
actual fun popRenderable(): Entity

Pops a ready renderable off the async-load queue, or returns 0 if none is ready.

expect fun popRenderable(): Entity

Pops a ready renderable off the async-load queue, or returns 0 if none is ready.

actual fun popRenderable(): Entity

Pops a ready renderable off the async-load queue, or returns 0 if none is ready.

actual fun popRenderable(): Entity

Pops a ready renderable off the async-load queue, or returns 0 if none is ready.

actual fun popRenderable(): Entity

Pops a ready renderable off the async-load queue, or returns 0 if none is ready.

Link copied to clipboard
actual fun popRenderables(entities: IntArray): Int

Pops up to entities.size ready renderables off the async-load queue into entities.

expect fun popRenderables(entities: IntArray): Int

Pops up to entities.size ready renderables off the async-load queue into entities.

actual fun popRenderables(entities: IntArray): Int

Pops up to entities.size ready renderables off the async-load queue into entities.

actual fun popRenderables(entities: IntArray): Int

Pops up to entities.size ready renderables off the async-load queue into entities.

actual fun popRenderables(entities: IntArray): Int

Pops up to entities.size ready renderables off the async-load queue into entities.

Link copied to clipboard
actual fun releaseSourceData()

Reclaims CPU-side memory for URI strings, binding lists, and raw animation data.

expect fun releaseSourceData()

Reclaims CPU-side memory for URI strings, binding lists, and raw animation data.

actual fun releaseSourceData()

Reclaims CPU-side memory for URI strings, binding lists, and raw animation data.

actual fun releaseSourceData()

Reclaims CPU-side memory for URI strings, binding lists, and raw animation data.

actual fun releaseSourceData()

Reclaims CPU-side memory for URI strings, binding lists, and raw animation data.