Background
Updated
Solid background color of the scene.
- Type
comp-background- Script class
BackgroundComponent- Per entity
- One
- Version
- 1.0.0
Read about it in Environment and sky: what it does, how to use it from a script, and examples.
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Draw your own mouse cursorA Cursor component on the camera draws the runtime Lobby demo's pointer image in place of the system cursor over the view. Clicking the crate switches between the custom and the system cursor.
Move the mouse over the view to see the custom pointer; click the crate to switch to the system cursor and back. 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(BackgroundComponent); if (component) log(component.props);}