Turn and soften the environment
Updated
An outdoor HDRI lights a set of statues and shows as the sky; at start the script turns it 90 degrees, blurs and dims the backdrop and softens the lighting, all on the scene root’s Environment.
Orbit around the chrome and amber statues to see the HDRI reflected in them, behind its softened backdrop. Drag to orbit the camera, scroll to zoom.
Turn and soften the environment
#pragma lifecycle(startup)
function startup() { const root = scene.findEntity(scene.rootId); const env = root.getComponent(EnvironmentComponent); if (!env) { log('No Environment on the scene root'); return; } // Turn the HDRI so its bright window faces the statues, and blur the backdrop. env.setProps({ rotation: 90, backgroundBlur: 0.3, backgroundIntensity: 0.5, intensity: 0.8 });}How it works
Section titled “How it works”The script is explained step by step in Turn and soften the environment.
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.
GalleryEnvironment.xrproj