Model

The model tag imports a model in one of the supported formats. The model must meet the Cross Origin Resource Sharing (CORS) restrictions of the browser. The model and all available resources (e.g., textures, animation, etc.) are loaded and added to the scene for viewing. Optionally one or all of the animations may be started.

The supported formats are:

  • glTF V2 (.gltf)
  • OBJ (.obj)
  • Collada (.dae)

 

  • src – Defines the URL of the object. The model is loaded from this location with the path component set as the default path for additional resources. The model is loaded asynchronously. The default is the empty string.
  • playonload – Specifies the name of the animation to start playing when the model is fully loaded. Use ‘*’ to indicate all animations are the play. The default is to not start any animation.
  • duration – Overrides the animation duration associated with the model’s animation. This value applies to all animations of the model. The default is to not override the value specified in the model’s animation.