n-gltf

altspace/components. n-gltf

Load a 3D model as a native asset, and attach it to this node. As a native asset, the model will be inaccessible from javascript, but may have better performance, materials, and colliders than normal SDK objects. This feature is a work in progress, with improvements going out periodically. Because of the higher-fidelity material system, using this feature may cause framerates to drop, so proceed with caution.

Extends

Members

sceneIndex :int

If the model file describes multiple scenes, load this one instead of the default.

url :string

The URL of a glTF model.

Methods

getBoundingBox() → {Promise}

Returns a promise that resolves with a THREE.Box3

Events

n-gltf-loaded

Emitted when the glTF model is finished loading