Fade a sign in on a wall
Updated
A Decal limited to the alley wall, so it never paints the plants in front, fades in with a tween when the mural is revealed.
Press Reveal the mural to fade the picture in on the wall. Drag to orbit the camera, scroll to zoom.
Fade a sign in on a wall
#pragma lifecycle(startup)
function startup() { const decal = findEntity('Graffiti').getComponent(DecalComponent); decal.setProps({ opacity: 0, targets: [findEntity('Alley Wall')] });
on('mural/reveal', async () => { await Tween.value(0, 1, (value) => decal.setProps({ opacity: value }), { duration: 2, ease: Ease.InOutSine }); log('Mural revealed'); });}How it works
Section titled “How it works”The script is explained step by step in Fade a sign in on a wall.
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.
GraffitiReveal.xrproj