Spot Light Projector
Updated
Projects an image through a spot light, like a gobo.
- Type
comp-spot-light-projector- Script class
SpotLightProjectorComponent- Per entity
- One
- Version
- 1.2.0
Read about it in Spot light effects: what it does, how to use it from a script, and examples.
Properties
Section titled “Properties”The props the runtime declares for this component, with their defaults and accepted ranges.
| Prop | Default | Range |
|---|---|---|
zoom |
0. |
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
An iris that opensA stage spotlight projects a star pattern through its Spot Light Projector; pressing Start the show grows the image from a pinpoint to full size by tweening the projector's zoom.
Press Start the show and watch the stars open across the stage floor and wall. 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(SpotLightProjectorComponent); if (component) log(component.props);}