@novorender/web_app / downloadGLTF
Function: downloadGLTF()
function downloadGLTF(
url,
baseObjectId?,
abortController?,
extension?): Promise<readonly RenderStateDynamicObject[]>
Load a gltf file from url.
Parameters
Parameter | Type | Description |
---|---|---|
url | URL | Url to gltf or glb file. |
baseObjectId ? | number | The base (start) object id to assign to the loaded object for picking. |
abortController ? | AbortController | Optional 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:
Currently the only extensions supported is KHR_materials_unlit.