readGltf Function

Produce a RenderGraphic from a glTF asset suitable for use in view decorations.

readGltf(args: ReadGltfGraphicsArgs): Promise<GltfGraphic | undefined>

@returns a graphic produced from the glTF asset's default scene, or undefined if a graphic could not be produced from the asset. The returned graphic also includes the bounding boxes of the glTF model in world and local coordiantes.

@note Support for the full glTF 2.0 specification is currently a work in progress. If a particular glTF asset fails to load and/or display properly, please submit an issue.

@see Example decorator for an example of a decorator that reads and displays a glTF asset.

Parameter Type Description
args ReadGltfGraphicsArgs  

Returns - Promise<GltfGraphic | undefined>

a graphic produced from the glTF asset's default scene, or undefined if a graphic could not be produced from the asset. The returned graphic also includes the bounding boxes of the glTF model in world and local coordiantes.

Defined in

Last Updated: 20 April, 2024