Fade a capture in once it is drawn
Updated
A Gaussian splat capture stays invisible while it downloads and decodes, then fades in over two seconds: a Behavior script waits on whenDrawn and tweens the Splat Mesh opacity.
Wait for the capture to download (about 12 MB) and watch it fade in. Drag to orbit the camera, scroll to zoom.
Fade a capture in once it is drawn
#pragma lifecycle(startup)
async function startup() { const capture = self.parent.getComponent(SplatMeshComponent); capture.setProps({ opacity: 0 });
await capture.whenDrawn(); log('Capture drawn: fading it in');
Tween.value(0, 1, (value) => capture.setProps({ opacity: value }), { duration: 2, ease: Ease.InOutSine });}How it works
Section titled “How it works”The script is explained step by step in Fade a capture in once it is drawn.
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.
SplatFadeIn.xrproj