1234567891011121314151617181920212223242526272829303132 |
- var sceneReadyBehavior = require('../../behavior-scene/scene-ready');
- var handleDecodedXML = require('../../behavior-scene/util').handleDecodedXML;
- var xmlCode = `<xr-scene id="xr-scene" ar-system="modes:Marker" bind:ready="handleReady" bind:tick="handleTick" bind:log="handleLog">
- <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-footprint/data.json" />
- <xr-asset-load type="gltf" asset-id="gltf-table" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/metal_table/scene.gltf" />
- </xr-assets>
- <xr-env env-data="env1"/>
- <xr-node wx:if="loaded">
- <xr-node node-id="camera-target" position="0 0 0"></xr-node>
- <xr-node node-id="table-wrap" position="0 0 0">
- <xr-gltf node-id="mesh-gltf-table" position="0 -1 0" rotation="0 45 0" scale="0.5 0.5 0.5" model="gltf-table"></xr-gltf>
- </xr-node>
- <xr-camera
- id="camera" node-id="camera" position="2 1 2" clear-color="0.925 0.925 0.925 1"
- target="camera-target" background="ar"
- camera-orbit-control=""
- ></xr-camera>
- </xr-node>
- <xr-node node-id="lights">
- <xr-light type="ambient" color="1 1 1" intensity="0.2" />
- <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>',
- }
- });
|