gltf-model (component)

Other topics

Loading a glTF model via URL

<a-scene>
  <a-entity gltf-model="url(https://cdn.rawgit.com/KhronosGroup/glTF-Sample-Models/9176d098/1.0/Duck/glTF/Duck.gltf)" position="0 0 -5"></a-entity>
</a-scene>

Loading a gltf-model via the asset system

<a-scene>
  <a-assets>
    <a-asset-item id="duck" src="https://cdn.rawgit.com/KhronosGroup/glTF-Sample-Models/9176d098/1.0/Duck/glTF/Duck.gltf"></a-asset-item>
  </a-assets>

  <a-entity gltf-model="#duck" position="0 0 -5"></a-entity>
</a-scene>

Syntax:

  • <a-entity gltf-model="url(https://cdn.rawgit.com/KhronosGroup/glTF-Sample-Models/9176d098/1.0/Duck/glTF/Duck.gltf)"></a-entity>
  • <a-entity gltf-model="#duck"></a-entity>

Parameters:

ParameterDetails
url(...)will load the glTF model wrapped from the URL wrapped in url()
#examplewill load the <a-asset-item> with the ID example

Contributors

Topic Id: 10758

Example Ids: 32265,32266

This site is not affiliated with any of the contributors.