Modelcomponentdata

ModelComponentData interface

Data specification for ModelComponent, see ComponentManager.create() on how to create a component

Signature:

export interface ModelComponentData extends Component3DData 

Extends: Component3DData

Properties

PropertyModifiersTypeDescription
animations?Record<string, boolean>(Optional) An object containing the names of the animations to play at start.
id?string(Optional) if not provided, an auto id will be generated
name?string(Optional) name for the component. Defaults to ""
position?XYZ(Optional) Position of the component in the space. Defaults to {x: 0, y: 0, z: 0}
renderMode?"default" | "toon" | "glitch" | "ghost"(Optional) Model render mode. Defaults to "default"
rotation?XYZ(Optional) Rotation of the component in the space. Defaults to {x: 0, y: 0, z: 0}
scale?XYZ(Optional) Scale of the component in the space. Defaults to {x: 1, y: 1, z: 1}
type"model"
urlstringurl of the gltf/glb file