-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathhome.html
714 lines (713 loc) · 22.3 KB
/
home.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, user-scalable=no"
/>
<title>Lvr</title>
<meta
name="description"
content="Virtual and Augmented reality for everyone"
/>
<link rel="shortcut icon" href="assets/images/favicon.png" />
<link rel="manifest" href="manifest.json" />
<meta name="theme-color" content="#000" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="application-name" content="Lvr" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta
name="apple-mobile-web-app-status-bar-style"
content="black-translucent"
/>
<meta name="apple-mobile-web-app-title" content="Lvr" />
<link rel="apple-touch-icon" href="assets/images/favicon.png" />
<meta name="msapplication-TileImage" content="assets/images/favicon.png" />
<meta name="msapplication-TileColor" content="#000" />
<meta name="msapplication-tap-highlight" content="no" />
<meta property="og:site_name" content="Lvr" />
<meta property="og:url" content="https://lean-vr.firebaseapp.app" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Lvr" />
<meta
property="og:description"
content="Virtual and Augmented reality for everyone"
/>
<meta property="og:image" content="assets/images/favicon.png" />
<meta name="twitter:site" content="@liyasthomas" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Lvr" />
<meta
name="twitter:description"
content="Virtual and Augmented reality for everyone"
/>
<meta name="twitter:image" content="assets/images/favicon.png" />
<meta name="twitter:url" content="https://lean-vr.firebaseapp.app" />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons"
/>
<link rel="stylesheet" href="assets/css/style.min.css" />
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", function () {
navigator.serviceWorker
.register("sw.js")
.then(function (registration) {
console.log(
"ServiceWorker registration successful with scope: ",
registration.scope
);
})
.catch(function (err) {
console.log("ServiceWorker registration failed: ", err);
});
});
}
</script>
<!--A-Frame.js v1.2.0 (https://github.com/aframevr/aframe/releases)(https://cdn.rawgit.com/aframevr/aframe/v1.2.0/dist/aframe-master.min.js)(https://aframe.io/releases/0.9.2/aframe.min.js)-->
<script src="assets/js/aframe.min.js"></script>
<!--AR.js v2.2.2 (https://github.com/jeromeetienne/AR.js/releases)(https://cdn.rawgit.com/jeromeetienne/AR.js/2.2.2/aframe/build/aframe-ar.js)(https://jeromeetienne.github.io/AR.js/aframe/build/aframe-ar.js)-->
<script src="assets/js/aframe-ar.js"></script>
<!--A-Frame-extras.js v6.1.1 (https://github.com/donmccurdy/aframe-extras/releases)(https://cdn.rawgit.com/donmccurdy/aframe-extras/v6.1.1/dist/aframe-extras.min.js)-->
<script src="assets/js/aframe-extras.min.js"></script>
</head>
<body>
<main role="main">
<div id="actions">
<!--
<div class="toolbar space">
<div class="button">
<i class="material-icons">close</i>
</div>
<a href="https://github.com/liyasthomas/lvr" target="_blank">
<div class="button">
<i class="material-icons">help_outline</i>
</div>
</a>
</div>
-->
<div class="toolbar bottom">
<div id="snap-button" title="Snap!"></div>
</div>
<div class="toolbar sliders">
<!--Brightness slider-->
<div id="bslider" class="slider closed">
<label for="b" title="Brightness"
><i class="material-icons ico">brightness_medium</i></label
>
<input type="range" min="0" max="200" id="b" value="100" step="1" />
<output for="range" id="bPointSize">100٪</output>
<i
class="material-icons res"
onclick="resetB()"
title="Reset Brightness"
>refresh</i
>
</div>
<!--Saturate slider-->
<div id="sslider" class="slider closed">
<label for="s" title="Saturation"
><i class="material-icons ico">tonality</i></label
>
<input type="range" min="0" max="200" id="s" value="100" step="1" />
<output for="range" id="sPointSize">100٪</output>
<i
class="material-icons res"
onclick="resetS()"
title="Reset Saturation"
>refresh</i
>
</div>
<!--Contrast slider-->
<div id="cslider" class="slider closed">
<label for="c" title="Contrast"
><i class="material-icons ico">exposure</i></label
>
<input type="range" min="0" max="200" id="c" value="100" step="1" />
<output for="range" id="cPointSize">100٪</output>
<i
class="material-icons res"
onclick="resetC()"
title="Reset Contrast"
>refresh</i
>
</div>
<!--Opacity slider-->
<div id="oslider" class="slider closed">
<label for="o" title="Opacity"
><i class="material-icons ico">opacity</i></label
>
<input type="range" min="0" max="100" id="o" value="100" step="1" />
<output for="range" id="oPointSize">100٪</output>
<i
class="material-icons res"
onclick="resetO()"
title="Reset Opacity"
>refresh</i
>
</div>
<!--Scale/zoom slider-->
<div id="zslider" class="slider closed">
<label for="z" title="Scale"
><i class="material-icons ico">straighten</i></label
>
<input type="range" min="0" max="2" id="z" value="1" step=".1" />
<output for="range" id="zPointSize">1×</output>
<i class="material-icons res" onclick="resetZ()" title="Reset Scale"
>refresh</i
>
</div>
</div>
<div class="toolbar">
<!--More toggle-->
<label for="toggleMore">
<input type="checkbox" onclick="toggleMore()" id="toggleMore" />
<div class="button" title="Tuning">
<i class="off material-icons">tune</i>
<i class="on material-icons">photo_filter</i>
</div>
</label>
<div id="more" class="slider closed">
<!--Brightness toggle-->
<label for="toggleBrightness">
<input
type="checkbox"
onclick="toggleBrightness()"
id="toggleBrightness"
/>
<div class="button" title="Brightness">
<i class="off material-icons">brightness_low</i>
<i class="on material-icons">brightness_high</i>
</div>
</label>
<!--Saturate toggle-->
<label for="toggleSaturate">
<input
type="checkbox"
onclick="toggleSaturate()"
id="toggleSaturate"
/>
<div class="button" title="Saturation">
<i class="off material-icons">tonality</i>
<i class="on material-icons">tonality</i>
</div>
</label>
<!--Contrast toggle-->
<label for="toggleContrast">
<input
type="checkbox"
onclick="toggleContrast()"
id="toggleContrast"
/>
<div class="button" title="Contrast">
<i class="off material-icons">exposure</i>
<i class="on material-icons">exposure</i>
</div>
</label>
<!--Opacity toggle-->
<label for="toggleOpacity">
<input
type="checkbox"
onclick="toggleOpacity()"
id="toggleOpacity"
/>
<div class="button" title="Opacity">
<i class="off material-icons">opacity</i>
<i class="on material-icons">opacity</i>
</div>
</label>
<!--Scale/zoom toggle-->
<label for="toggleScale">
<input type="checkbox" onclick="toggleScale()" id="toggleScale" />
<div class="button" title="Scale">
<i class="off material-icons">straighten</i>
<i class="on material-icons">straighten</i>
</div>
</label>
<!--Grid toggle-->
<label for="toggleGrid">
<input type="checkbox" onclick="toggleGrid()" id="toggleGrid" />
<div class="button" title="Grid">
<i class="off material-icons">grid_off</i>
<i class="on material-icons">grid_on</i>
</div>
</label>
</div>
<!--Flip toggle-->
<!--
<label for="toggleFlip">
<input type="checkbox" onclick="toggleFlip()" id="toggleFlip">
<div class="button" title="Flip">
<i class="off material-icons">flip_to_back</i>
<i class="on material-icons">flip_to_front</i>
</div>
</label>
-->
<!--Camera toggle-->
<!--
<label for="toggleCamera">
<input type="checkbox" onclick="toggleCamera()" id="toggleCamera">
<div class="button" title="Toggle camara">
<i class="off material-icons">camera_rear</i>
<i class="on material-icons">camera_front</i>
</div>
</label>
-->
<a id="download-link" style="display: none"></a>
<script src="assets/js/merge.js"></script>
<script src="assets/js/capture.min.js"></script>
<script src="assets/js/index.js"></script>
</div>
<div id="grid" class="hidden">
<table>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
</div>
</main>
<a-scene
id="app"
embedded
vr-mode-ui="enabled: false"
arjs="debugUIEnabled: false; sourceType: webcam; trackingMethod: best; detectionMode: mono_and_matrix; matrixCodeType: 3x3;"
>
<!--Assets-->
<a-assets>
<audio id="blip1" src="assets/audio/blip1.wav" preload="auto"></audio>
<audio id="blip2" src="assets/audio/blip2.wav" preload="auto"></audio>
<img id="image1" src="assets/images/favicon.png" />
<!--<video id="video1" playsinline webkit-playsinline autoplay loop="true" src="assets/video/city.mp4"></video>-->
<!--<video id="feed"></video>-->
<a-asset-item
id="apple"
src="assets/gltf/apple/scene.gltf"
></a-asset-item>
<a-asset-item id="egg" src="assets/gltf/egg/scene.gltf"></a-asset-item>
<a-asset-item
id="ice"
src="assets/gltf/penguin/scene.gltf"
></a-asset-item>
<a-asset-item
id="orange"
src="assets/gltf/orange/scene.gltf"
></a-asset-item>
<a-asset-item
id="umbrella"
src="assets/gltf/umbrella/scene.gltf"
></a-asset-item>
</a-assets>
<!--Camera-->
<a-entity camera>
<!--cursor-->
<a-entity
cursor="fuse: true;"
position="0 0 -1"
geometry="primitive: ring; radiusInner: 0.01; radiusOuter: 0.013;"
material="color: white; shader: flat; opacity: 0.4;"
>
<a-animation
begin="cursor-fusing"
easing="ease-in"
attribute="scale"
dur="1500"
fill="backwards"
from="1 1 1"
to="0.1 0.1 0.1"
>
</a-animation>
<a-animation
begin="click"
easing="ease-in"
attribute="scale"
dur="150"
from="0.1 0.1 0.1"
to="1 1 1"
>
</a-animation>
</a-entity>
</a-entity>
<!--Barcode marker [1]-->
<a-marker type="barcode" value="1">
<a-text
side="double"
position="0 1.75 0.5"
scale="0.5 0.5 0.5"
value="Lvr"
align="center"
rotation="-90 0 0"
>
</a-text>
<a-text
side="double"
position="0 1.6 1"
scale="0.2 0.2 0.2"
font="https://cdn.aframe.io/fonts/Monoid.fnt"
value="Virtual & Augmented Reality\nby Liyas Thomas"
align="center"
>
<a-animation
attribute="position"
from="0 1.6 1"
to="0 1.65 1"
direction="alternate"
dur="500"
repeat="indefinite"
easing="ease-in-out-cubic"
>
</a-animation>
</a-text>
</a-marker>
<!--Barcode marker [2]-->
<a-marker type="barcode" value="2">
<a-text
side="double"
position="0 1.75 0.5"
scale="0.5 0.5 0.5"
value="Lvr"
align="center"
rotation="-90 0 0"
>
</a-text>
<a-plane color="aquamarine" rotation="-90 0 0"> </a-plane>
<a-circle
color="deeppink"
radius="0.5"
position="0 0.5 0"
rotation="-90 0 0"
>
</a-circle>
<a-triangle color="yellow" position="0 1 0"> </a-triangle>
<a-ring
position="0 2 0"
color="teal"
rotation="0 1 0"
radius-inner="0.45"
radius-outer=".5"
>
</a-ring>
</a-marker>
<!--Barcode marker [3]-->
<a-marker type="barcode" value="3">
<a-text
side="double"
position="0 1.75 0.5"
scale="0.5 0.5 0.5"
value="Lvr"
align="center"
rotation="-90 0 0"
>
</a-text>
<a-box position="0 0.5 0" material="opacity: 0.5; color: skyblue;">
<a-box
scale="0.5 0.5 0.5"
material="opacity: 0.75; side: double; color: yellowgreen;"
>
</a-box>
</a-box>
<a-cone
color="tomato"
radius-bottom="0.5"
position="0 1 0"
radius-top="0"
>
</a-cone>
<a-sphere
radius="0.5"
segments-height="53"
position="0 2 0"
material="color: yellow;"
>
</a-sphere>
</a-marker>
<!--Barcode marker [4]-->
<a-marker type="barcode" value="4">
<a-text
side="double"
position="0 1.75 0.5"
scale="0.5 0.5 0.5"
value="Lvr"
align="center"
rotation="-90 0 0"
>
</a-text>
<a-triangle color="yellow" position="0 1 0">
<a-animation
attribute="rotation"
to="0 360 0"
dur="5000"
easing="linear"
repeat="indefinite"
>
</a-animation>
<a-animation
attribute="material.color"
from="yellow"
to="green"
dur="1000"
direction="alternate"
repeat="indefinite"
>
</a-animation>
</a-triangle>
<a-ring
position="0 2 0"
color="teal"
rotation="0 1 0"
radius-inner="0.45"
radius-outer=".5"
>
<a-animation
attribute="rotation"
to="360 360 360"
dur="5000"
easing="linear"
repeat="indefinite"
>
</a-animation>
</a-ring>
</a-marker>
<!--Barcode marker [5]-->
<a-marker type="barcode" value="5">
<a-text
side="double"
position="0 1.75 0.5"
scale="0.5 0.5 0.5"
value="Lvr"
align="center"
rotation="-90 0 0"
>
</a-text>
<a-box
id="cube"
position="0 0.5 0"
material="opacity: 0.5; color: skyblue;"
sound="src: #blip2; on: click"
shadow
>
<a-animation
begin="click"
attribute="rotation"
to="360 360 0"
dur="2000"
fill="both"
direction="alternate"
easing="linear"
>
</a-animation>
<a-box
scale="0.5 0.5 0.5"
material="opacity: 0.75; side: double; color: yellowgreen;"
>
<a-animation
attribute="rotation"
to="360 360 360"
dur="5000"
easing="linear"
repeat="indefinite"
>
</a-animation>
</a-box>
</a-box>
<a-cone
color="tomato"
radius-bottom="0.5"
position="0 1 0"
radius-top="0"
shadow
>
<a-animation
attribute="geometry.radiusTop"
from="0"
to="0.5"
dur="2000"
fill="both"
direction="alternate"
repeat="indefinite"
>
</a-animation>
</a-cone>
<a-sphere
radius="0.5"
segments-height="53"
position="0 2 0"
material="color: red;"
shadow
>
<a-animation
attribute="position"
dur="1000"
from="0 2 0"
to="0 3 0"
direction="alternate-reverse"
easing="ease-out-bounce"
repeat="indefinite"
>
</a-animation>
</a-sphere>
</a-marker>
<!--preset marker [Hiro]-->
<a-marker preset="hiro">
<a-text
side="double"
position="0 1.75 0.5"
scale="0.5 0.5 0.5"
value="Lvr"
align="center"
rotation="-90 0 0"
>
</a-text>
<a-image src="#image1"></a-image>
<!--<a-video src="#video1" position="0 1 0"></a-video>-->
</a-marker>
<!--preset marker [Kanji]-->
<a-marker preset="kanji">
<a-text
side="double"
position="0 1.75 0.5"
scale="0.5 0.5 0.5"
value="Lvr"
align="center"
rotation="-90 0 0"
>
</a-text>
<!--<a-plane position="0 1 -1" color="#ffffff" material="src:#feed"></a-plane>-->
</a-marker>
<!--Custom marker [A]-->
<a-marker preset="custom" type="pattern" url="assets/patt/A-90.patt">
<a-text
side="double"
position="0 1.75 0.5"
scale="0.5 0.5 0.5"
value="Lvr"
align="center"
rotation="-90 0 0"
>
</a-text>
<a-entity
gltf-model="#apple"
scale="0.05 0.05 0.05"
animation-mixer
></a-entity>
</a-marker>
<!--Custom marker [B]-->
<a-marker preset="custom" type="pattern" url="assets/patt/B-90.patt">
<a-text
side="double"
position="0 1.75 0.5"
scale="0.5 0.5 0.5"
value="Lvr"
align="center"
rotation="-90 0 0"
>
</a-text>
<a-entity
gltf-model="#egg"
scale="0.5 0.5 0.5"
animation-mixer
></a-entity>
</a-marker>
<!--Custom marker [C]-->
<a-marker preset="custom" type="pattern" url="assets/patt/C-90.patt">
<a-text
side="double"
position="0 1.75 0.5"
scale="0.5 0.5 0.5"
value="Lvr"
align="center"
rotation="-90 0 0"
>
</a-text>
<a-entity
gltf-model="#ice"
scale="0.5 0.5 0.5"
animation-mixer
></a-entity>
</a-marker>
<!--Custom marker [D]-->
<a-marker preset="custom" type="pattern" url="assets/patt/D-90.patt">
<a-text
side="double"
position="0 1.75 0.5"
scale="0.5 0.5 0.5"
value="Lvr"
align="center"
rotation="-90 0 0"
>
</a-text>
<a-entity
gltf-model="#orange"
scale="2.5 2.5 2.5"
animation-mixer
></a-entity>
</a-marker>
<!--Custom marker [F]-->
<a-marker preset="custom" type="pattern" url="assets/patt/U-colored.patt">
<a-text
side="double"
position="0 1.75 0.5"
scale="0.5 0.5 0.5"
value="Lvr"
align="center"
rotation="-90 0 0"
>
</a-text>
<a-entity
gltf-model="#umbrella"
scale="2.5 2.5 2.5"
animation-mixer
></a-entity>
</a-marker>
<!--Custom marker [G]-->
<!--
<a-marker preset="custom" type="pattern" url="assets/patt/G-90.patt">
<a-text side="double" position="0 1.75 0.5" scale="0.5 0.5 0.5" value="Lvr" align="center" rotation="-90 0 0">
</a-text>
</a-marker>
-->
<!--Custom marker and barcode [6]-->
<!--
<a-marker preset="custom" type="pattern" url="assets/patt/6.patt">
<a-text side="double" position="0 1.75 0.5" scale="0.5 0.5 0.5" value="Lvr" align="center" rotation="-90 0 0">
</a-text>
</a-marker>
-->
<!--Barcode marker [6]-->
<!--
<a-marker type="barcode" value="6">
<a-text side="double" position="0 1.75 0.5" scale="0.5 0.5 0.5" value="Lvr" align="center" rotation="-90 0 0">
</a-text>
</a-marker>
-->
<!--custom colored marker [2]-->
<!--
<a-marker preset="custom" type="pattern" url="assets/patt/colored.patt">
<a-text side="double" position="0 1.75 0.5" scale="0.5 0.5 0.5" value="Lvr" align="center" rotation="-90 0 0">
</a-text>
</a-marker>
-->
<!--Sound-->
<a-entity sound="src: #blip1; autoplay: true;"></a-entity>
<a-entity sound="src: #blip2; autoplay: true;"></a-entity>
</a-scene>
<noscript>
<a href="/">No JavaScript? Go home kid!</a>
</noscript>
<script async src="assets/js/script.min.js"></script>
</body>
</html>