Composable Function

SpatialGltfModel

This composable renders a glTF or .glb model that is loaded asynchronously from the provided source.

SpatialGltfModelSample

@Composable
@SubspaceComposable
public fun SpatialGltfModelSample(modifier: SubspaceModifier) {
    val duckModelUri =
        "https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/main/Models/Duck/glTF-Binary/Duck.glb"
    val state =
        rememberSpatialGltfModelState(SpatialGltfModelSource.fromUri(Uri.parse(duckModelUri)))
    SpatialGltfModel(state = state, modifier = modifier)
}

Last updated: