An iris that opens
Updated
A 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.
An iris that opens
#pragma lifecycle(startup)
let projector;
function startup() { projector = findEntity('Stage Projector').getComponent(SpotLightProjectorComponent); projector.setProps({ zoom: 0.05 }); // almost closed
on('show/start', async () => { await Tween.value(0.05, 1, (value) => projector.setProps({ zoom: value }), { duration: 1.2, ease: Ease.OutQuad, }); log('Iris open'); });}How it works
Section titled “How it works”The script is explained step by step in An iris that opens.
Open it in XR Creator
Section titled “Open it in XR Creator”Download the project file below, then import it in XR Hub with Projects › New › Import, as described in Projects and templates. It opens in XR Creator with the same scene you see running above, each script already attached to its Behavior entity. From there you can edit the scripts, adjust components and their props, preview your changes, and deploy the result as a world of your own.
IrisProjector.xrproj