-
Notifications
You must be signed in to change notification settings - Fork 2
/
building.html
132 lines (119 loc) · 6.5 KB
/
building.html
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!-- <!DOCTYPE html>
<html>
<head>
<script src="https://aframe.io/releases/1.4.1/aframe.min.js"></script>
<script src="interior-parallax.js"></script>
</head>
<body>
<a-scene>
<a-entity position="-1 -1 -3" rotation="90 0 0">
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
<a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
<a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
<a-plane id="window"
interior-parallax="
path: https://cdn.glitch.global/42044d7c-847c-4275-8e47-bc5ebbeb3640/;
px:ao1z9-sve70-001.png?v=1677364876129; nx:ao1z9-sve70-002.png?v=1677364877590;
py:ao1z9-sve70-003.png?v=1677364880161; ny:ao1z9-sve70-004.png?v=1677364883136;
pz:ao1z9-sve70-005.png?v=1677364885826; nz:ao1z9-sve70-006.png?v=1677364888191;"
side="double"
position="0 0 -4" rotation="-90 0 0" width="4" height="4"
></a-plane>
<a-plane id="window2"
interior-parallax="
equirectangular: https://cdn.glitch.global/42044d7c-847c-4275-8e47-bc5ebbeb3640/tu09tpc-a-large-bed-in-a-room.jpeg?v=1677370054339;"
side="double"
position="4 0 -4" rotation="-90 0 0" width="4" height="4"
></a-plane>
<a-plane id="window3"
interior-parallax="
equirectangular: https://cdn.glitch.global/42044d7c-847c-4275-8e47-bc5ebbeb3640/pixexid-6308af11-7cac-4a02-8565-658f51e634a4.jpeg?v=1677381243964;"
side="double"
position="-4 0 -4" rotation="-90 0 0" width="4" height="4"
></a-plane>
</a-entity>
<a-sky color="#ECECEC"></a-sky>
</a-scene>
</body>
</html> -->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>aframe-shader-buildings simple example</title>
<meta name="description" content="A simple example of aframe-shader-buildings">
<script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/aframe-extras@fb96ab2/dist/aframe-extras.controls.min.js"></script>
<script src="dist/main.js"></script><script src="https://unpkg.com/aframe-shader-buildings@^1.1.0/dist/main.js"></script>
<script src="https://unpkg.com/aframe-simple-sun-sky@^1.2.3/simple-sun-sky.js"></script>
<script src="interior-parallax.js"></script>
</head>
<body>
<a-scene background="color:#87cefa">
<a-assets>
<img id="brick" src="./assets/TexturesCom_Wall_BrickPlain1_512_albedo.jpg">
</a-assets>
<a-shader-buildings sun-position="-0.3 1.0 0.7" wall-src="#brick" wall-color="#675342" buildings=
'[{"x":-5,"z":-25,"xCoreSections":3,"xWingSections":5,"zCoreSections":2,"zWingSections":3,"ySections":2}]'
>
<a-plane id="window1"
interior-parallax="
path: https://cdn.glitch.global/42044d7c-847c-4275-8e47-bc5ebbeb3640/;
px:ao1z9-sve70-001.png?v=1677364876129; nx:ao1z9-sve70-002.png?v=1677364877590;
py:ao1z9-sve70-003.png?v=1677364880161; ny:ao1z9-sve70-004.png?v=1677364883136;
pz:ao1z9-sve70-005.png?v=1677364885826; nz:ao1z9-sve70-006.png?v=1677364888191;"
side="double"
position="-7.5 2.1 -9.9" rotation="0 0 0" width="3" height="3"
></a-plane>
<a-plane id="window2"
interior-parallax="equirectangular: https://cdn.glitch.global/42044d7c-847c-4275-8e47-bc5ebbeb3640/tu09tpc-a-large-bed-in-a-room.jpeg?v=1677370054339"
side="double"
position="-12.5 2.1 -9.9" rotation="0 0 0" width="3" height="3"
></a-plane>
<a-plane id="window3"
interior-parallax="
path: https://cdn.glitch.global/42044d7c-847c-4275-8e47-bc5ebbeb3640/;
px:ao1z9-sve70-001.png?v=1677364876129; nx:ao1z9-sve70-002.png?v=1677364877590;
py:ao1z9-sve70-003.png?v=1677364880161; ny:ao1z9-sve70-004.png?v=1677364883136;
pz:ao1z9-sve70-005.png?v=1677364885826; nz:ao1z9-sve70-006.png?v=1677364888191;"
side="double"
position="-17.5 2.1 -9.9" rotation="0 0 0" width="3" height="3"
></a-plane>
<a-plane id="window3"
interior-parallax="
path: https://cdn.glitch.global/42044d7c-847c-4275-8e47-bc5ebbeb3640/;
px:ao1z9-sve70-001.png?v=1677364876129; nx:ao1z9-sve70-002.png?v=1677364877590;
py:ao1z9-sve70-003.png?v=1677364880161; ny:ao1z9-sve70-004.png?v=1677364883136;
pz:ao1z9-sve70-005.png?v=1677364885826; nz:ao1z9-sve70-006.png?v=1677364888191;"
side="double"
position="-7.5 6.1 -9.9" rotation="0 0 0" width="3" height="3"
></a-plane>
<a-plane id="window4"
interior-parallax="
path: https://cdn.glitch.global/42044d7c-847c-4275-8e47-bc5ebbeb3640/;
px:ao1z9-sve70-001.png?v=1677364876129; nx:ao1z9-sve70-002.png?v=1677364877590;
py:ao1z9-sve70-003.png?v=1677364880161; ny:ao1z9-sve70-004.png?v=1677364883136;
pz:ao1z9-sve70-005.png?v=1677364885826; nz:ao1z9-sve70-006.png?v=1677364888191;"
side="double"
position="-12.5 6.1 -9.9" rotation="0 0 0" width="3" height="3"
></a-plane>
<a-plane id="window5"
interior-parallax="
path: https://cdn.glitch.global/42044d7c-847c-4275-8e47-bc5ebbeb3640/;
px:ao1z9-sve70-001.png?v=1677364876129; nx:ao1z9-sve70-002.png?v=1677364877590;
py:ao1z9-sve70-003.png?v=1677364880161; ny:ao1z9-sve70-004.png?v=1677364883136;
pz:ao1z9-sve70-005.png?v=1677364885826; nz:ao1z9-sve70-006.png?v=1677364888191;"
side="double"
position="-17.5 6.1 -9.9" rotation="0 0 0" width="3" height="3"
></a-plane>
</a-shader-buildings>
<a-entity id="rig" movement-controls="fly:true; speed:0.6;" position="-13 3.5 1">
<a-entity camera look-controls position="0 1.6 0"></a-entity>
</a-entity>
<a-plane position="0 -0.05 0" rotation="-90 0 0" width="2000" height="2000" color="#276B48"></a-plane>
<a-simple-sun-sky sun-position="-0.3 1.0 0.7"></a-simple-sun-sky>
<a-entity light="type: ambient; color: #BBB"></a-entity>
<a-entity light="type: directional; color: #FFF; intensity: 0.6" position="-0.3 1.0 0.7"></a-entity>
</a-scene>
</body>
</html>