Fbx
Updated
Loads an FBX model.
- Type
comp-fbx- Script class
FBXComponent- 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.
FBX::readyFBX::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 an FBX model and play its clipAn animated FBX (.fbx) cube on a turntable, drawn with an amber Standard material that overrides its own: the script sizes it to 0.6 m and plays the animation clip stored in the file.
Watch the cube play the rotation clip from its FBX file; the log names the clip. 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(FBXComponent); if (component) log(component.props);}