Interface IKHRInteractivityExportContext
getAnimationIndex(animation: AnimationGroup): number | undefined;
getCameraIndex(camera: Camera): number | undefined;
getMaterialIndex(material: Material): number | undefined;
getNodeCount(): number;
getNodeIndex(node: Node): number | undefined;
getRootIndex?(
collection: KhrInteractivityRootCollection,
entity: object,
): number | undefined;
setNodeExtension(
nodeIndex: number,
extensionName: string,
value: unknown,
): void;
}
Methods
get Animation Index
-
Gets the final glTF animation index for a Babylon animation group.
Parameters
- animation: AnimationGroup
Babylon animation group to resolve
Returns number | undefined
final glTF animation index, or undefined when the animation was not exported
- animation: AnimationGroup
get Camera Index
-
Gets the final glTF camera index for a Babylon camera.
Parameters
- camera: Camera
Babylon camera to resolve
Returns number | undefined
final glTF camera index, or undefined when the camera was not exported
- camera: Camera
get Material Index
-
Gets the final glTF material index for a Babylon material.
Parameters
- material: Material
Babylon material to resolve
Returns number | undefined
final glTF material index, or undefined when the material was not exported
- material: Material
get Node Count
-
Gets the final number of glTF nodes.
Returns number
final glTF node count
get Node Index
-
Gets the final glTF node index for a Babylon node.
Parameters
- node: Node
Babylon node to resolve
Returns number | undefined
final glTF node index, or undefined when the node was not exported
- node: Node
Optionalget Root Index
-
Gets the final glTF index for an imported Babylon entity in a root collection.
Parameters
- collection: KhrInteractivityRootCollection
target glTF root collection
- entity: object
imported Babylon entity associated with the source entry
Returns number | undefined
final glTF index, or undefined when the entity was not exported uniquely
- collection: KhrInteractivityRootCollection
set Node Extension
-
Writes a companion extension on an already-exported glTF node.
Parameters
- nodeIndex: number
final glTF node index
- extensionName: string
companion extension name
- value: unknown
companion extension payload
Returns void
- nodeIndex: number
Final entity remapping context exposed to a KHR_interactivity export provider.