1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <xr-scene id="xr-scene" bind:ready="handleReady" bind:tick="handleTick">
- <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
- <xr-asset-load
- type="env-data" asset-id="env1" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/env-test.bin"
- />
- <xr-asset-load type="gltf" asset-id="night_car_landscape" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/night_car_landscape.glb" />
- <xr-asset-load type="gltf" asset-id="bedroom" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/bedroom.glb" />
- </xr-assets>
- <xr-env env-data="{{env}}" />
- <xr-node>
- <xr-node node-id="camera-target" position="0 0 0"></xr-node>
- <xr-node layer="1">
- <xr-asset-post-process asset-id="bloom1" type="bloom" is-hdr data="radius: {{bloomRadius_0}}, intensity: {{bloomIntensity}}, threshold: {{bloomThreshold}}, softThreshold: 0.8"/>
- <xr-asset-post-process asset-id="bloom2" type="bloom" is-hdr data="radius: {{bloomRadius_1}}, intensity: {{bloomIntensity}}, threshold: {{bloomThreshold}}, softThreshold: 0.8"/>
- <xr-gltf node-id="gltf_1" position="0 0 0" rotation="0 0 0" scale="0.01 0.01 0.01" model="night_car_landscape"></xr-gltf>
- </xr-node>
- <xr-node layer="2">
- <xr-asset-post-process asset-id="blur" type="blur" data="radius: {{blurRadius}}"/>
- <xr-asset-post-process asset-id="vignette" type="vignette" data="color:1 0 0 1,intensity:{{vignetteIntensity}},smoothness:{{vignetteSmoothness}},roundness:{{vignetteRoundness}}"/>
- <xr-gltf node-id="gltf_2" position="0.5 -1 -2" rotation="0 0 0" scale="1 1 1" model="bedroom"></xr-gltf>
- </xr-node>
- <xr-node layer="3">
- <!-- xr-basic -->
- <xr-asset-post-process asset-id="fxaa" type="fxaa"/>
- <xr-asset-material asset-id="standard-mat" effect="standard" />
- <xr-mesh node-id="mesh-plane" position="0 -0.02 -4" rotation="0 0 0" scale="5 1 5" geometry="plane" material="standard-mat" uniforms="u_baseColorFactor:0.48 0.78 0.64 1" receive-shadow></xr-mesh>
- <xr-mesh id="cube" node-id="mesh-cube" position="-1 0.5 -3.5" scale="1 1 1" rotation="0 45 0" geometry="cube" material="standard-mat" uniforms="u_baseColorFactor:0.298 0.764 0.85 1" cast-shadow></xr-mesh>
- <xr-mesh node-id="mesh-sphere" position="0 1.25 -5" scale="1.25 1.25 1.25" geometry="sphere" material="standard-mat" uniforms="u_baseColorFactor:0.937 0.176 0.368 1" cast-shadow></xr-mesh>
- <xr-mesh node-id="mesh-cylinder" position="1 0.7 -3.5" scale="1 0.7 1" geometry="cylinder" material="standard-mat" uniforms="u_baseColorFactor:1 0.776 0.364 1" cast-shadow></xr-mesh>
- </xr-node>
- <xr-camera
- id="camera" node-id="camera" position="0 0 {{cameraPosition}}" clear-color="{{clearColor}}"
- near="0.1"
- far="2000"
- target="{{cameraTarget}}" background="{{background}}" camera-orbit-control=""
- cull-mask="{{cullMask}}"
- post-process="{{pp}}"
- ></xr-camera>
- </xr-node>
- <xr-node node-id="lights">
- <xr-light type="ambient" color="1 1 1" intensity="{{aIntensity}}" />
- <xr-light type="directional" rotation="40 180 0" color="1 1 1" intensity="{{dIntensity}}" />
- </xr-node>
- </xr-scene>
|