API reference
API reference
Select your platform
No SDKs available
No versions available

GLXFManager

GLXFManager

class GLXFManager(val context: <Error class: unknown class>)
GLXFManager is a class that manages GLXF files.

Constructors

NameSummary
GLXFManager
constructor(context: <Error class: unknown class>)

Types

NameSummary
Companion
object Companion

Properties

NameSummary
context
val context: <Error class: unknown class>
: the context of the GLXFManager, a.k.a. the Spatial activity object.

Functions

NameSummary
addReloadedGLXFUris
fun addReloadedGLXFUris(toReloadUris: Set<<Error class: unknown class>>, basePath: File)
deleteGLXF
fun deleteGLXF(entity: Entity)
fun deleteGLXF(glxfInfo: GLXFInfo)
Deletes root entity and all children. Removes references to the deleted GLXFInfo from the maps.
deleteGLXFEntityAndGetDeletedChildren
fun deleteGLXFEntityAndGetDeletedChildren(entity: Entity): Set<Entity>
Deletes a GLXF entity and get the deleted children.
getGLXFInfo
fun getGLXFInfo(keyName: String): GLXFInfo
Returns the GLXFInfo object for the given keyName.
getNestedGLXFInfo
fun getNestedGLXFInfo(parentInfo: GLXFInfo, childName: String): GLXFInfo?
Gets the nested GLXFInfo for a given child name.
fun getNestedGLXFInfo(parentInfo: GLXFInfo, childNamePathList: List<String>): GLXFInfo?
Gets the nested GLXFInfo for a given list of child names.
hasGLXFInfoForUri
fun hasGLXFInfoForUri(uri: <Error class: unknown class>): Boolean
Checks if there is a GLXFInfo object for a given URI.
inflateComposition
suspend fun inflateComposition(compositionName: String, assetFolderPath: String = "scenes", rootEntity: Entity = Entity.createGlobal_UnderDevelopment(), keyName: String? = null, onLoaded: (GLXFInfo) -> Unit = {}): GLXFInfo?
Parses the Composition glxf file and calls inflateGLXF, inflates a GLXF file into a GLXFInfo object, adds it to the map of GLXFInfo objects, and sets the GLXF component on the root entity of the GLXF file.
inflateGLXF
suspend fun inflateGLXF(uri: <Error class: unknown class>, rootEntity: Entity = Entity.createGlobal_UnderDevelopment(), keyName: String? = null, onLoaded: (GLXFInfo) -> Unit = {}): GLXFInfo?
Inflates a GLXF file into a GLXFInfo object, adds it to the map of GLXFInfo objects, and sets the GLXF component on the root entity of the GLXF file.
reloadGLXFsFromFile
suspend fun reloadGLXFsFromFile(oldFileName: <Error class: unknown class>, newFileName: <Error class: unknown class>, meshManager: MeshManager): <Error class: unknown class>
Reloads GLXFs from a file.
setReloadType
fun setReloadType(reloadType: GLXFReloadType)
Developer can pick how GLXFs reload
tryGetGLXFInfo
fun tryGetGLXFInfo(keyName: String): GLXFInfo?
Returns the GLXFInfo object for the given keyName, or null if it doesn’t exist.

Companion

object Companion

Functions

NameSummary
isSupportedGLXFExtension
fun isSupportedGLXFExtension(fileName: String): Boolean
Did you find this page helpful?
Thumbs up icon
Thumbs down icon