1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < meta charset ="utf-8 " />
5+ < title > 360° Image Gallery</ title >
6+ < meta name ="description " content ="360° Image Gallery - A-Frame " />
7+ < script src ="https://aframe.io/releases/1.0.4/aframe.min.js "> </ script >
8+ < script src ="https://unpkg.com/aframe-event-set-component@5/dist/aframe-event-set-component.min.js "> </ script >
9+ < script src ="
https://unpkg.com/[email protected] /dist/aframe-layout-component.min.js "
> </ script > 10+ < script src ="
https://unpkg.com/[email protected] /dist/aframe-template-component.min.js "
> </ script > 11+ < script src ="
https://unpkg.com/[email protected] /dist/aframe-proxy-event-component.min.js "
> </ script > 12+
13+ <!-- Image link template to be reused. -->
14+ < script id ="link " type ="text/html ">
15+ < a-entity class = "link"
16+ geometry = "primitive: plane; height: 1; width: 1"
17+ material = "shader: flat; src: ${thumb}"
18+ event-set__mouseenter = "scale: 1.2 1.2 1"
19+ event-set__mouseleave = "scale: 1 1 1"
20+ event-set__click = "_target: #image-360; _delay: 300; material.src: ${src}"
21+ proxy-event = "event: click; to: #image-360; as: fade"
22+ sound = "on: click; src: #click-sound" > </ a-entity >
23+ </ script >
24+
25+ < script src ="https://code.jquery.com/jquery-3.4.1.min.js "> </ script >
26+
27+
28+
29+
30+ </ head >
31+ < body >
32+ < a-scene
33+ cursor ="rayOrigin: mouse "
34+ inspector =""
35+ keyboard-shortcuts =""
36+ screenshot =""
37+ vr-mode-ui =""
38+ device-orientation-permission-ui =""
39+ >
40+ < a-assets >
41+ <!-- Thumbnail Area -->
42+ < img id ="room_1_thumb " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2FIMG_0012.JPG?v=1600952802696 "/>
43+ < img id ="room_2_thumb " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2FIMG_0013.JPG?v=1600952804089 "/>
44+ < img id ="corridor_thumb " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2FIMG_0014.JPG?v=1600952803040 "/>
45+ < img id ="hall_elev_thumb " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2FIMG_0015.JPG?v=1600952808661 "/>
46+ < img id ="hall_info_thumb " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2FIMG_0016.JPG?v=1600952804951 "/>
47+ < img id ="mart_door_thumb " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2FIMG_0018.JPG?v=1600952806413 "/>
48+ < img id ="mart_inside_thumb " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2FIMG_0019.JPG?v=1600952806948 "/>
49+ < img id ="classroom_thumb " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2F%EA%B0%95%EC%9D%98%EC%8B%A4.jpg?v=1600974398919 "/>
50+ < img id ="projectroom_thumb " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2FIMG_0023.JPG?v=1600952801401 "/>
51+ < img id ="lounge_thumb " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2FIMG_0021.JPG?v=1600952804206 "/>
52+ < img id ="second_floor_thumb " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2FIMG_0022.JPG?v=1600952803705 "/>
53+ < img id ="frontdoor_thumb " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2Fcopy.jpg?v=1600972963842 "/>
54+
55+ < audio
56+ id ="click-sound "
57+ crossorigin ="anonymous "
58+ src ="https://cdn.aframe.io/360-image-gallery-boilerplate/audio/click.ogg "
59+ > </ audio >
60+
61+ <!-- 360 Image Area -->
62+ < img id ="arrow " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2Farrow.png?v=1600960871536 "/>
63+ < img id ="room_1 " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2F%EA%B8%B0%EC%88%99%EC%82%AC.jpg?v=1600976153915 "/>
64+ < img id ="room_2 " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2FIMG_0013.JPG?v=1600952804089 "/>
65+ < img id ="corridor " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2F%EA%B8%B0%EC%88%99%EC%82%AC%EB%B3%B5%EB%8F%84.jpg?v=1600975670217 "/>
66+ < img id ="hall_elev " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2F1%EC%B8%B5%EC%97%98%EB%B2%A0%EC%95%9E%EC%8B%9D%EB%8B%B9.jpg?v=1600976423781 "/>
67+ < img id ="hall_info " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2F1%EC%B8%B5%EB%A1%9C%EB%B9%84_1.jpg?v=1600976705798 "/>
68+ < img id ="mart_door " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2F%ED%8E%B8%EC%9D%98%EC%A0%90.jpg?v=1600974709115 "/>
69+ < img id ="mart_inside " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2FIMG_0019.JPG?v=1600952806948 "/>
70+ < img id ="classroom " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2F%EA%B0%95%EC%9D%98%EC%8B%A4.jpg?v=1600974398919 "/>
71+ < img id ="projectroom " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2F%ED%9A%8C%EC%9D%98%EC%8B%A4.jpg?v=1600975436155 "/>
72+ < img id ="lounge " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2F%ED%9C%B4%EA%B2%8C%EC%8B%A4.jpg?v=1600975032619 "/>
73+ < img id ="second_floor " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2F2%EC%B8%B5%EB%A1%9C%EB%B9%84.jpg?v=1600975537564 "/>
74+ < img id ="frontdoor " crossorigin ="anonymous " src ="https://cdn.glitch.com/eeddf875-83e1-4df8-a4a2-623255956007%2F%EC%9E%85%EA%B5%AC.jpg?v=1600977053597 "/>
75+
76+
77+ </ a-assets >
78+
79+ <!-- entities -->
80+
81+ < a-image id ="to_room_1_arrow " src ="https://cdn.glitch.com/05db70f4-ac72-4b1e-b0c6-1c8ddde01b68%2F%E2%80%94Pngtree%E2%80%94map%20location%20marker%20icon%20in_5004115.png?v=1600970563497 " position ="" rotation ="0 150 0 "> </ a-image >
82+ < a-entity id ="to_room_1 " layout ="margin: 1.5; angle: 0; columns: 3 " position ="5 0 -6 " rotation ="0 270 0 " visible ="false ">
83+ < a-entity template ="src: #link " data-src ="#room_1 " data-thumb ="#room_1_thumb "> </ a-entity >
84+ </ a-entity >
85+
86+ < a-image id ="to_room_2_arrow " src ="https://cdn.glitch.com/05db70f4-ac72-4b1e-b0c6-1c8ddde01b68%2F%E2%80%94Pngtree%E2%80%94map%20location%20marker%20icon%20in_5004115.png?v=1600970563497 " position ="" rotation ="0 150 0 "> </ a-image >
87+ < a-entity id ="to_room_2 " layout ="margin: 1.5; angle: 0; columns: 3 " position ="5 0 -5 " rotation ="0 270 0 " visible ="false ">
88+ < a-entity template ="src: #link " data-src ="#room_2 " data-thumb ="#room_2_thumb "> </ a-entity >
89+ </ a-entity >
90+
91+ < a-image id ="to_corridor_arrow " src ="https://cdn.glitch.com/05db70f4-ac72-4b1e-b0c6-1c8ddde01b68%2F%E2%80%94Pngtree%E2%80%94map%20location%20marker%20icon%20in_5004115.png?v=1600970563497 " position ="" rotation ="0 150 0 "> </ a-image >
92+ < a-entity id ="to_corridor " layout ="margin: 1.5; angle: 0; columns: 3 " position ="5 0 -4 " rotation ="0 270 0 " visible ="false ">
93+ < a-entity template ="src: #link " data-src ="#corridor " data-thumb ="#corridor_thumb "> </ a-entity >
94+ </ a-entity >
95+
96+ < a-image id ="to_hall_elev_arrow " src ="https://cdn.glitch.com/05db70f4-ac72-4b1e-b0c6-1c8ddde01b68%2F%E2%80%94Pngtree%E2%80%94map%20location%20marker%20icon%20in_5004115.png?v=1600970563497 " position ="" rotation ="0 150 0 "> </ a-image >
97+ < a-entity id ="to_hall_elev " layout ="margin: 1.5; angle: 0; columns: 3 " position ="5 0 -3 " rotation ="0 270 0 " visible ="false ">
98+ < a-entity template ="src: #link " data-src ="#hall_elev " data-thumb ="#hall_elev_thumb "> </ a-entity >
99+ </ a-entity >
100+
101+ < a-image id ="to_hall_info_arrow " src ="https://cdn.glitch.com/05db70f4-ac72-4b1e-b0c6-1c8ddde01b68%2F%E2%80%94Pngtree%E2%80%94map%20location%20marker%20icon%20in_5004115.png?v=1600970563497 " position ="-2 -0.72655 3.50001 " rotation ="0 150 0 "> </ a-image >
102+ < a-entity id ="to_hall_info " layout ="margin: 1.5; angle: 0; columns: 3 " position ="-2 -0.72655 3.5 " rotation ="0 150 0 " visible ="false ">
103+ < a-entity template ="src: #link " data-src ="#hall_info " data-thumb ="#hall_info_thumb "> </ a-entity >
104+ </ a-entity >
105+
106+ < a-image id ="to_mart_door_arrow " src ="https://cdn.glitch.com/05db70f4-ac72-4b1e-b0c6-1c8ddde01b68%2F%E2%80%94Pngtree%E2%80%94map%20location%20marker%20icon%20in_5004115.png?v=1600970563497 " position ="" rotation ="0 150 0 "> </ a-image >
107+ < a-entity id ="to_mart_door " layout ="margin: 1.5; angle: 0; columns: 3 " position ="5 0 -1 " rotation ="0 270 0 " visible ="false ">
108+ < a-entity template ="src: #link " data-src ="#mart_door " data-thumb ="#mart_door_thumb "> </ a-entity >
109+ </ a-entity >
110+
111+ < a-image id ="to_mart_inside_arrow " src ="https://cdn.glitch.com/05db70f4-ac72-4b1e-b0c6-1c8ddde01b68%2F%E2%80%94Pngtree%E2%80%94map%20location%20marker%20icon%20in_5004115.png?v=1600970563497 " position ="" rotation ="0 150 0 "> </ a-image >
112+ < a-entity id ="to_mart_inside " layout ="margin: 1.5; angle: 0; columns: 3 " position ="5 0 0 " rotation ="0 270 0 " visible ="false ">
113+ < a-entity template ="src: #link " data-src ="#mart_inside " data-thumb ="#mart_inside_thumb "> </ a-entity >
114+ </ a-entity >
115+
116+ < a-image id ="to_classroom_arrow " src ="https://cdn.glitch.com/05db70f4-ac72-4b1e-b0c6-1c8ddde01b68%2F%E2%80%94Pngtree%E2%80%94map%20location%20marker%20icon%20in_5004115.png?v=1600970563497 " position ="" rotation ="0 150 0 "> </ a-image >
117+ < a-entity id ="to_classroom " layout ="margin: 1.5; angle: 0; columns: 3 " position ="5 0 1 " rotation ="0 270 0 " visible ="false ">
118+ < a-entity template ="src: #link " data-src ="#classroom " data-thumb ="#classroom_thumb "> </ a-entity >
119+ </ a-entity >
120+
121+ < a-image id ="to_projectroom_arrow " src ="https://cdn.glitch.com/05db70f4-ac72-4b1e-b0c6-1c8ddde01b68%2F%E2%80%94Pngtree%E2%80%94map%20location%20marker%20icon%20in_5004115.png?v=1600970563497 " position ="" rotation ="0 150 0 "> </ a-image >
122+ < a-entity id ="to_projectroom " layout ="margin: 1.5; angle: 0; columns: 3 " position ="5 0 2 " rotation ="0 270 0 " visible ="false ">
123+ < a-entity template ="src: #link " data-src ="#projectroom " data-thumb ="#projectroom_thumb "> </ a-entity >
124+ </ a-entity >
125+
126+ < a-image id ="to_lounge_arrow " src ="https://cdn.glitch.com/05db70f4-ac72-4b1e-b0c6-1c8ddde01b68%2F%E2%80%94Pngtree%E2%80%94map%20location%20marker%20icon%20in_5004115.png?v=1600970563497 " position ="" rotation ="0 150 0 "> </ a-image >
127+ < a-entity id ="to_lounge " layout ="margin: 1.5; angle: 0; columns: 3 " position ="5 0 3 " rotation ="0 270 0 " visible ="false ">
128+ < a-entity template ="src: #link " data-src ="#lounge " data-thumb ="#lounge_thumb "> </ a-entity >
129+ </ a-entity >
130+
131+ < a-image id ="to_second_floor_arrow " src ="https://cdn.glitch.com/05db70f4-ac72-4b1e-b0c6-1c8ddde01b68%2F%E2%80%94Pngtree%E2%80%94map%20location%20marker%20icon%20in_5004115.png?v=1600970563497 " position ="" rotation ="0 150 0 "> </ a-image >
132+ < a-entity id ="to_second_floor " layout ="margin: 1.5; angle: 0; columns: 3 " position ="5 0 4 " rotation ="0 270 0 " visible ="false ">
133+ < a-entity template ="src: #link " data-src ="#second_floor " data-thumb ="#second_floor_thumb "> </ a-entity >
134+ </ a-entity >
135+
136+ < a-image id ="to_frontdoor_arrow " src ="https://cdn.glitch.com/05db70f4-ac72-4b1e-b0c6-1c8ddde01b68%2F%E2%80%94Pngtree%E2%80%94map%20location%20marker%20icon%20in_5004115.png?v=1600970563497 " position ="" rotation ="0 150 0 "> </ a-image >
137+ < a-entity id ="to_frontdoor " layout ="margin: 1.5; angle: 0; columns: 3 " position ="5 0 5 " rotation ="0 270 0 " visible ="false ">
138+ < a-entity template ="src: #link " data-src ="#frontdoor " data-thumb ="#frontdoor_thumb "> </ a-entity >
139+ </ a-entity >
140+
141+
142+
143+
144+
145+
146+ <!-- 360-degree image. -->
147+ < a-sky
148+ id ="image-360 "
149+ radius ="10 "
150+ src ="#frontdoor "
151+ animation__fade ="property: components.material.material.color; type: color; from: #FFF; to: #000; dur: 300; startEvents: fade "
152+ animation__fadeback ="property: components.material.material.color; type: color; from: #000; to: #FFF; dur: 300; startEvents: animationcomplete__fade "
153+ material =""
154+ geometry =""
155+ _delay ="300 "
156+ > </ a-sky >
157+
158+
159+
160+ <!-- Camera + cursor. -->
161+ < a-entity
162+ camera =""
163+ look-controls ="pointerLockEnabled:true "
164+ position =""
165+ rotation ="0 150 0 "
166+ data-aframe-inspector-original-camera =""
167+ >
168+ < a-cursor
169+ id ="cursor "
170+ animation__click ="property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150 "
171+ animation__fusing ="property: fusing; startEvents: fusing; from: 1 1 1; to: 0.1 0.1 0.1; dur: 1500 "
172+ event-set__mouseenter ="[object Object] "
173+ event-set__mouseleave ="[object Object] "
174+ raycaster ="objects: .link "
175+ material =""
176+ cursor =""
177+ geometry =""
178+ color ="springgreen "
179+ > </ a-cursor >
180+ </ a-entity >
181+ < div class ="a-loader-title " style ="display: none; ">
182+ 360° Image Gallery
183+ </ div >
184+
185+ </ a-scene >
186+ </ body >
187+ </ html >
188+
189+ < script src ="script.js ">
190+
191+ </ script >
0 commit comments