123456789101112131415161718192021222324252627282930313233343536 |
- var sceneReadyBehavior = require('../../behavior-scene/scene-ready');
- var handleDecodedXML = require('../../behavior-scene/util').handleDecodedXML;
- var xmlCode = `<xr-scene ar-system="modes:Plane" id="xr-scene" bind:ready="handleReady" bind:arReady="handleARReady" bind:log="handleLog">
- <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
- <xr-asset-load type="gltf" asset-id="gltf-item" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/just_a_girl/scene.gltf" />
- <xr-asset-material asset-id="standard-mat" effect="standard" />
- </xr-assets>
- <xr-node>
- <xr-node node-id="camera-target" position="0 0 0"></xr-node>
- <xr-ar-tracker mode="Plane">
- <xr-node>
- <xr-mesh id="ar-tracker-mesh" geometry="cube" scale="0.5 0.05 0.5" material="standard" />
- </xr-node>
- </xr-ar-tracker>
- <xr-node node-id="setitem">
- <xr-gltf model="gltf-item" scale="0.006 0.006 0.006"></xr-gltf>
- </xr-node>
- <xr-camera
- id="camera" node-id="camera" position="1 1 1" clear-color="0.925 0.925 0.925 1"
- target="camera-target" background="ar" is-ar-camera
- camera-orbit-control
- ></xr-camera>
- </xr-node>
- <xr-node node-id="lights">
- <xr-light type="ambient" color="1 1 1" intensity="1" />
- <xr-light type="directional" rotation="180 0 0" color="1 1 1" intensity="3" />
- </xr-node>
- </xr-scene>
- `;
- Page({
- behaviors:[sceneReadyBehavior],
- data: {
- xmlCode: '<div class="codeWrap">' + handleDecodedXML(xmlCode) + '</div>',
- }
- });
|