Skip to main content

function.downloadGLTF

API > downloadGLTF

Function: downloadGLTF

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.

Source

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

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.