12345678910111213141516171819202122232425262728 |
- var sceneReadyBehavior = require('../../behavior-scene/scene-ready');
- var handleDecodedXML = require('../../behavior-scene/util').handleDecodedXML;
- var xmlCode = `<xr-scene id="xr-scene">
- <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
- <xr-asset-load type="gltf" asset-id="gltf-just_a_girl" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/just_a_girl/scene.gltf" />
- </xr-assets>
- <xr-node>
- <xr-node node-id="camera-target" position="0 0 0"></xr-node>
- <xr-gltf node-id="gltf-just_a_girl" position="0 -0.5 0" rotation="0 0 0" scale="0.01 0.01 0.01" model="gltf-just_a_girl"></xr-gltf>
- <xr-camera
- id="camera" node-id="camera" position="0 0.4 1.6" clear-color="0.9 0.9 0.9 1"
- target="camera-target"
- camera-orbit-control=""
- ></xr-camera>
- </xr-node>
- <xr-node node-id="lights">
- <xr-light type="ambient" color="1 1 1" intensity="0.3" />
- <xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="2" />
- </xr-node>
- </xr-scene>
- `;
- Page({
- behaviors:[sceneReadyBehavior],
- data: {
- xmlCode: '<div class="codeWrap">' + handleDecodedXML(xmlCode) + '</div>',
- }
- });
|