createModelInstance

fun createModelInstance(buffer: Buffer, resourceResolver: (resourceFileName: String) -> Buffer? = { null }): ModelInstance

Creates a Model from the contents of a GLB or GLTF Buffer.

See also


fun createModelInstance(assetFileLocation: String, resourceResolver: (resourceFileName: String) -> Buffer? = { context.assets.readBuffer(getFolderPath(assetFileLocation, it)) }): ModelInstance

Creates a Model from the contents of a GLB or GLTF asset file and get its default instance.

See also


fun createModelInstance(@RawRes rawResId: Int, resourceResolver: (resourceFileName: String) -> Buffer? = { null }): ModelInstance
fun createModelInstance(file: File, resourceResolver: (resourceFileName: String) -> Buffer? = { resourceFile -> File(file.parent, resourceFile).readBuffer() }): ModelInstance

Creates a Model from the contents of a GLB or GLTF raw file and get its default instance.

See also