Skip to main content

@novorender/web_app / downloadGLTF

Function: downloadGLTF()

function downloadGLTF(
url,
baseObjectId?,
abortController?,
extension?): Promise<readonly RenderStateDynamicObject[]>

Load a gltf file from url.

Parameters

ParameterTypeDescription
urlURLUrl to gltf or glb file.
baseObjectId?numberThe base (start) object id to assign to the loaded object for picking.
abortController?AbortControllerOptional abort controller.
extension?"gltf" | "glb"-

Returns

Promise<readonly RenderStateDynamicObject[]>

An array of dynamic render state objects ready to be assigned to RenderState.dynamic.

Remarks

Only a subset of the features in glTF2 specs are supported. More specifically, unsupported features are:

Sparse accessors

Animation

Camera

Skin

Currently the only extensions supported is KHR_materials_unlit.

Defined in

@novorender/core3d/gltf/index.ts:26