-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathindex.wxml
88 lines (88 loc) · 2.78 KB
/
index.wxml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<xr-scene id="xr-scene" bind:ready="handleReady">
<xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
<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-mesh node-id="floor-plane" position="0 -1 0" rotation="0 0 0" scale="10 1 10" geometry="plane"
uniforms="u_baseColorFactor:1 1 1 1" receive-shadow
></xr-mesh>
<!-- glTF -->
<xr-node wx:if="{{gltfLoaded}}">
<xr-node
wx:for="{{gltfIdList}}" wx:for-item="gltfId"
wx:key="gltfId"
>
<xr-gltf
wx:if="{{gltfId == 0}}"
position="-1 -0.46 -1" rotation="0 0 0"
scale="0.6 0.6 0.6"
model="gltf-{{gltfId}}"
cast-shadow
></xr-gltf>
<xr-gltf
wx:if="{{gltfId == 1}}"
position="1 -0.98 -1" rotation="0 0 0"
scale="0.015 0.015 0.015"
model="gltf-{{gltfId}}"
cast-shadow
></xr-gltf>
</xr-node>
</xr-node>
<!-- Image -->
<xr-node wx:if="{{imageLoaded}}">
<xr-node
wx:for="{{imageIdList}}" wx:for-item="imageId"
wx:key="imageId"
>
<xr-mesh
wx:if="{{imageId === 2}}"
position="1 1 0" scale="1 1 0.2"
geometry="cube" material="texture-mat-{{imageId}}"
cast-shadow
/>
<xr-mesh
wx:if="{{imageId === 3}}"
position="-1 1 0" scale="1 1 0.2"
geometry="cube" material="texture-mat-{{imageId}}"
cast-shadow
/>
</xr-node>
</xr-node>
<!-- Video -->
<xr-node wx:if="{{videoLoaded}}">
<xr-node
wx:for="{{videoIdList}}" wx:for-item="videoId"
wx:key="videoId"
>
<xr-mesh
wx:if="{{videoId === 4}}"
node-id="mesh-cube" position="0 -0.5 1" scale="0.8 1.4 0.8"
geometry="cube" material="video-mat-{{videoId}}"
cast-shadow
/>
<xr-mesh
wx:if="{{videoId === 5}}"
node-id="mesh-cube" position="-1.5 -0.6 1" scale="1.2 0.8 0.8"
geometry="cube" material="video-mat-{{videoId}}"
cast-shadow
/>
<xr-mesh
wx:if="{{videoId === 6}}"
node-id="mesh-cube" position="1.5 -0.6 1" scale="1.2 0.8 0.8"
geometry="cube" material="video-mat-{{videoId}}"
cast-shadow
/>
</xr-node>
</xr-node>
<xr-camera
id="camera" node-id="camera" position="0 3 5" clear-color="0.8 0.8 0.8 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="1" />
<xr-light type="directional" rotation="40 170 0" color="1 1 1" intensity="3" cast-shadow/>
</xr-node>
</xr-scene>