Collada
Updated
Loads a Collada .dae model.
- Type
comp-collada- Script class
ColladaComponent- Per entity
- One
- Version
- 1.0.0
Read about it in Models and meshes: what it does, how to use it from a script, and examples.
Events
Section titled “Events”Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.
Collada::readyCollada::error
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Load a Collada modelAn animated Collada (.dae) character on a turntable, with its texture beside the file: the script centres it, scales it to 1.4 m and plays the first clip stored in the file.
Watch the character turn on the turntable while it plays its clip; the log lists the clips. Drag to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(ColladaComponent); if (component) log(component.props);}