Selaa lähdekoodia

Update UI

customisations
alemart 9 kuukautta sitten
vanhempi
commit
52ce2893c4

+ 68
- 0
demos/assets/demo.css Näytä tiedosto

@@ -0,0 +1,68 @@
1
+body {
2
+    background-color: #673ab6;
3
+    background-image: url(../assets/poster.svg);
4
+    background-position: center;
5
+    background-repeat: no-repeat;
6
+    height: 100vh;
7
+    margin: 0;
8
+    padding: 0;
9
+}
10
+
11
+#scan {
12
+    width: 100%;
13
+    height: 100%;
14
+    object-fit: contain;
15
+    opacity: 0.75;
16
+}
17
+
18
+#about, #sponsor {
19
+    position: absolute;
20
+    width: 64px;
21
+    height: 64px;
22
+
23
+    opacity: 0.5;
24
+    outline: none;
25
+    -webkit-tap-highlight-color: transparent;
26
+    cursor: pointer;
27
+
28
+    background-color: transparent;
29
+    background-size: cover;
30
+    border-color: white;
31
+    border-style: solid;
32
+    border-width: 2px;
33
+    border-radius: 64px;
34
+}
35
+
36
+#about:active, #about:focus, #sponsor:active, #sponsor:focus {
37
+    background-color: #ffd500;
38
+    border-color: #ffd500;
39
+    opacity: 1.0;
40
+}
41
+
42
+#about {
43
+    top: 24px;
44
+    right: 24px;
45
+    background-image: url(../assets/info.svg);
46
+}
47
+
48
+#sponsor {
49
+    top: calc(50% - 32px);
50
+    right: 24px;
51
+    background-image: url(../assets/heart.svg);
52
+}
53
+
54
+@media screen and (orientation: portrait) {
55
+    #about {
56
+        left: 24px;
57
+        bottom: 24px;
58
+        top: initial;
59
+        right: initial;
60
+    }
61
+
62
+    #sponsor {
63
+        left: calc(50% - 32px);
64
+        bottom: 24px;
65
+        top: initial;
66
+        right: initial;
67
+    }
68
+}

+ 57
- 0
demos/assets/heart.svg Näytä tiedosto

@@ -0,0 +1,57 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<svg
3
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+   xmlns:cc="http://creativecommons.org/ns#"
5
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+   xmlns:svg="http://www.w3.org/2000/svg"
7
+   xmlns="http://www.w3.org/2000/svg"
8
+   id="svg954"
9
+   version="1.1"
10
+   fill="none"
11
+   viewBox="0 0 24 24"
12
+   height="800px"
13
+   width="800px">
14
+  <metadata
15
+     id="metadata960">
16
+    <rdf:RDF>
17
+      <cc:Work
18
+         rdf:about="">
19
+        <dc:format>image/svg+xml</dc:format>
20
+        <dc:type
21
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
22
+        <dc:title></dc:title>
23
+      </cc:Work>
24
+    </rdf:RDF>
25
+  </metadata>
26
+  <defs
27
+     id="defs958">
28
+    <marker
29
+       style="overflow:visible"
30
+       id="marker2126"
31
+       refX="0.0"
32
+       refY="0.0"
33
+       orient="auto">
34
+      <path
35
+         transform="scale(0.8) translate(12.5,0)"
36
+         style="fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-opacity:1;fill:#c6afe9;fill-opacity:1"
37
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
38
+         id="path2124" />
39
+    </marker>
40
+    <marker
41
+       style="overflow:visible"
42
+       id="Arrow1Lstart"
43
+       refX="0.0"
44
+       refY="0.0"
45
+       orient="auto">
46
+      <path
47
+         transform="scale(0.8) translate(12.5,0)"
48
+         style="fill-rule:evenodd;stroke:none;stroke-width:1pt;stroke-opacity:1;fill:#c6afe9;fill-opacity:1"
49
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
50
+         id="path1842" />
51
+    </marker>
52
+  </defs>
53
+  <path
54
+     id="rect1653"
55
+     d="M 5.4894119,7.1116441 C 3.6899104,8.9111456 3.6871183,11.825949 5.4832538,13.622102 l 8.56e-5,8.6e-5 1.8101979,1.810199 0.6074449,0.607444 2.2888548,2.288855 c 1.002844,1.002845 2.617552,1.002845 3.620396,0 l 2.288856,-2.288856 0.607443,-0.607443 1.810198,-1.810198 c 1.796135,-1.796138 1.793381,-4.7110079 -0.0062,-6.5105418 -1.799519,-1.7995183 -4.714355,-1.8022905 -6.5105,-0.00616 v 0 C 10.203932,5.3093536 7.2890638,5.312107 5.4895299,7.1115428 Z"
56
+     style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00199676;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
57
+</svg>

+ 63
- 0
demos/assets/info.svg Näytä tiedosto

@@ -0,0 +1,63 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+<svg
5
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+   xmlns:cc="http://creativecommons.org/ns#"
7
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+   xmlns:svg="http://www.w3.org/2000/svg"
9
+   xmlns="http://www.w3.org/2000/svg"
10
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+   width="800"
13
+   height="800"
14
+   viewBox="0 0 211.66666 211.66667"
15
+   version="1.1"
16
+   id="svg8"
17
+   inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
18
+   sodipodi:docname="info.svg">
19
+  <defs
20
+     id="defs2" />
21
+  <sodipodi:namedview
22
+     id="base"
23
+     pagecolor="#ffffff"
24
+     bordercolor="#666666"
25
+     borderopacity="1.0"
26
+     inkscape:pageopacity="0.0"
27
+     inkscape:pageshadow="2"
28
+     inkscape:zoom="0.49497475"
29
+     inkscape:cx="204.4552"
30
+     inkscape:cy="415.0457"
31
+     inkscape:document-units="mm"
32
+     inkscape:current-layer="layer1"
33
+     showgrid="false"
34
+     units="px"
35
+     inkscape:window-width="1600"
36
+     inkscape:window-height="876"
37
+     inkscape:window-x="0"
38
+     inkscape:window-y="0"
39
+     inkscape:window-maximized="1" />
40
+  <metadata
41
+     id="metadata5">
42
+    <rdf:RDF>
43
+      <cc:Work
44
+         rdf:about="">
45
+        <dc:format>image/svg+xml</dc:format>
46
+        <dc:type
47
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
48
+        <dc:title></dc:title>
49
+      </cc:Work>
50
+    </rdf:RDF>
51
+  </metadata>
52
+  <g
53
+     inkscape:label="Camada 1"
54
+     inkscape:groupmode="layer"
55
+     id="layer1"
56
+     transform="translate(0,-85.333317)">
57
+    <path
58
+       style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.50196078"
59
+       d="M 400 146.14062 A 53.321998 53.321998 0 0 0 346.67773 199.46289 A 53.321998 53.321998 0 0 0 400 252.78516 A 53.321998 53.321998 0 0 0 453.32227 199.46289 A 53.321998 53.321998 0 0 0 400 146.14062 z M 388.36523 315.83789 C 372.51258 315.83789 359.75 328.30266 359.75 343.78516 L 359.75 625.91406 C 359.75 641.39663 372.51258 653.85938 388.36523 653.85938 L 411.63477 653.85938 C 427.48739 653.85938 440.25 641.39663 440.25 625.91406 L 440.25 343.78516 C 440.25 328.30266 427.48739 315.83789 411.63477 315.83789 L 388.36523 315.83789 z "
60
+       transform="matrix(0.26458333,0,0,0.26458333,0,85.333317)"
61
+       id="path870" />
62
+  </g>
63
+</svg>

+ 0
- 56
demos/hello-aframe/demo.css Näytä tiedosto

@@ -1,56 +0,0 @@
1
-body {
2
-    background-color: #673ab6;
3
-    background-image: url("../assets/poster.svg");
4
-    background-position: center;
5
-    background-repeat: no-repeat;
6
-    height: 100vh;
7
-    margin: 0;
8
-    padding: 0;
9
-}
10
-
11
-#about {
12
-    position: absolute;
13
-    right: 0px;
14
-    top: 0px;
15
-    width: 80px;
16
-    height: 80px;
17
-
18
-    display: flex;
19
-    align-items: center;
20
-    margin: 0;
21
-    padding: 0;
22
-
23
-    color: #fff;
24
-    font-size: 56px;
25
-    font-weight: bold;
26
-    font-family: monospace;
27
-    text-decoration: none;
28
-    text-align: center;
29
-
30
-    border-width: 0 0 2px 2px;
31
-    border-radius: 0 0 0 8px;
32
-    border-style: solid;
33
-    border-color: #673ab6;
34
-    background: linear-gradient(0deg, #7e56c2 0%, #9574cd 100%);
35
-    -webkit-tap-highlight-color: transparent;
36
-}
37
-
38
-#about:hover {
39
-    border-color: #6742b8;
40
-    background: linear-gradient(0deg, #8b72cb 0%, #c894ff 100%);
41
-}
42
-
43
-#about:active {
44
-    border-color: #ddc300;
45
-    background: linear-gradient(0deg, #ffd500 0%, #ffff00 100%);
46
-}
47
-
48
-#about::before {
49
-    content: '\24D8';
50
-    width: 100%;
51
-    text-align: center;
52
-}
53
-
54
-#about:focus {
55
-    outline: none;
56
-}

+ 4
- 1
demos/hello-aframe/index.html Näytä tiedosto

@@ -4,7 +4,7 @@
4 4
         <meta charset="utf-8">
5 5
         <meta name="viewport" content="width=device-width,initial-scale=1">
6 6
         <title>encantar.js WebAR demo with A-Frame</title>
7
-        <link href="demo.css" rel="stylesheet">
7
+        <link href="../assets/demo.css" rel="stylesheet">
8 8
         <script src="../../dist/encantar.min.js"></script>
9 9
         <script src="https://cdn.jsdelivr.net/npm/aframe@1.4.2/dist/aframe-v1.4.2.min.js"></script>
10 10
         <script src="../../plugins/aframe-with-encantar.js"></script>
@@ -59,6 +59,9 @@
59 59
                     <!-- The about button -->
60 60
                     <a id="about" href="NOTICE.html" draggable="false"></a>
61 61
 
62
+                    <!-- The sponsor button -->
63
+                    <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
64
+
62 65
                     <!-- The scan gimmick -->
63 66
                     <a-entity ar-scan-gimmick="opacity: 0.75"></a-entity>
64 67
 

+ 4
- 1
demos/hello-aframe/video.html Näytä tiedosto

@@ -4,7 +4,7 @@
4 4
         <meta charset="utf-8">
5 5
         <meta name="viewport" content="width=device-width,initial-scale=1">
6 6
         <title>encantar.js WebAR demo with A-Frame</title>
7
-        <link href="demo.css" rel="stylesheet">
7
+        <link href="../assets/demo.css" rel="stylesheet">
8 8
         <script src="../../dist/encantar.min.js"></script>
9 9
         <script src="https://cdn.jsdelivr.net/npm/aframe@1.4.2/dist/aframe-v1.4.2.min.js"></script>
10 10
         <script src="../../plugins/aframe-with-encantar.js"></script>
@@ -59,6 +59,9 @@
59 59
                     <!-- The about button -->
60 60
                     <a id="about" href="NOTICE.html" draggable="false"></a>
61 61
 
62
+                    <!-- The sponsor button -->
63
+                    <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
64
+
62 65
                     <!-- The scan gimmick -->
63 66
                     <a-entity ar-scan-gimmick="opacity: 0.75"></a-entity>
64 67
 

+ 0
- 63
demos/hello-babylon/demo.css Näytä tiedosto

@@ -1,63 +0,0 @@
1
-body {
2
-    background-color: #673ab6;
3
-    background-image: url("../assets/poster.svg");
4
-    background-position: center;
5
-    background-repeat: no-repeat;
6
-    height: 100vh;
7
-    margin: 0;
8
-    padding: 0;
9
-}
10
-
11
-#scan {
12
-    width: 100%;
13
-    height: 100%;
14
-    object-fit: contain;
15
-    opacity: 0.75;
16
-}
17
-
18
-#about {
19
-    position: absolute;
20
-    right: 0px;
21
-    top: 0px;
22
-    width: 80px;
23
-    height: 80px;
24
-
25
-    display: flex;
26
-    align-items: center;
27
-    margin: 0;
28
-    padding: 0;
29
-
30
-    color: #fff;
31
-    font-size: 56px;
32
-    font-weight: bold;
33
-    font-family: monospace;
34
-    text-decoration: none;
35
-    text-align: center;
36
-
37
-    border-width: 0 0 2px 2px;
38
-    border-radius: 0 0 0 8px;
39
-    border-style: solid;
40
-    border-color: #673ab6;
41
-    background: linear-gradient(0deg, #7e56c2 0%, #9574cd 100%);
42
-    -webkit-tap-highlight-color: transparent;
43
-}
44
-
45
-#about:hover {
46
-    border-color: #6742b8;
47
-    background: linear-gradient(0deg, #8b72cb 0%, #c894ff 100%);
48
-}
49
-
50
-#about:active {
51
-    border-color: #ddc300;
52
-    background: linear-gradient(0deg, #ffd500 0%, #ffff00 100%);
53
-}
54
-
55
-#about::before {
56
-    content: '\24D8';
57
-    width: 100%;
58
-    text-align: center;
59
-}
60
-
61
-#about:focus {
62
-    outline: none;
63
-}

+ 3
- 2
demos/hello-babylon/index.html Näytä tiedosto

@@ -4,7 +4,7 @@
4 4
         <meta charset="utf-8">
5 5
         <meta name="viewport" content="width=device-width,initial-scale=1">
6 6
         <title>encantar.js WebAR demo with babylon.js</title>
7
-        <link href="demo.css" rel="stylesheet">
7
+        <link href="../assets/demo.css" rel="stylesheet">
8 8
         <script src="../../dist/encantar.min.js"></script>
9 9
         <script src="https://cdn.jsdelivr.net/npm/babylonjs@7.29.0/babylon.min.js"></script>
10 10
         <script src="https://cdn.jsdelivr.net/npm/babylonjs-loaders@7.29.0/babylonjs.loaders.min.js"></script>
@@ -14,8 +14,9 @@
14 14
     <body>
15 15
         <div id="ar-viewport">
16 16
             <div id="ar-hud" hidden>
17
-                <img id="scan" src="../assets/scan.png" draggable="false">
18 17
                 <a id="about" href="NOTICE.html" draggable="false"></a>
18
+                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
19
+                <img id="scan" src="../assets/scan.png" draggable="false">
19 20
             </div>
20 21
         </div>
21 22
         <img id="mage" src="../assets/mage.webp" hidden>

+ 3
- 2
demos/hello-babylon/video.html Näytä tiedosto

@@ -4,7 +4,7 @@
4 4
         <meta charset="utf-8">
5 5
         <meta name="viewport" content="width=device-width,initial-scale=1">
6 6
         <title>encantar.js WebAR demo with babylon.js</title>
7
-        <link href="demo.css" rel="stylesheet">
7
+        <link href="../assets/demo.css" rel="stylesheet">
8 8
         <script src="../../dist/encantar.min.js"></script>
9 9
         <script src="https://cdn.jsdelivr.net/npm/babylonjs@7.29.0/babylon.min.js"></script>
10 10
         <script src="https://cdn.jsdelivr.net/npm/babylonjs-loaders@7.29.0/babylonjs.loaders.min.js"></script>
@@ -14,8 +14,9 @@
14 14
     <body>
15 15
         <div id="ar-viewport">
16 16
             <div id="ar-hud" hidden>
17
-                <img id="scan" src="../assets/scan.png" draggable="false">
18 17
                 <a id="about" href="NOTICE.html" draggable="false"></a>
18
+                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
19
+                <img id="scan" src="../assets/scan.png" draggable="false">
19 20
             </div>
20 21
         </div>
21 22
         <img id="mage" src="../assets/mage.webp" hidden>

+ 0
- 63
demos/hello-three/demo.css Näytä tiedosto

@@ -1,63 +0,0 @@
1
-body {
2
-    background-color: #673ab6;
3
-    background-image: url("../assets/poster.svg");
4
-    background-position: center;
5
-    background-repeat: no-repeat;
6
-    height: 100vh;
7
-    margin: 0;
8
-    padding: 0;
9
-}
10
-
11
-#scan {
12
-    width: 100%;
13
-    height: 100%;
14
-    object-fit: contain;
15
-    opacity: 0.75;
16
-}
17
-
18
-#about {
19
-    position: absolute;
20
-    right: 0px;
21
-    top: 0px;
22
-    width: 80px;
23
-    height: 80px;
24
-
25
-    display: flex;
26
-    align-items: center;
27
-    margin: 0;
28
-    padding: 0;
29
-
30
-    color: #fff;
31
-    font-size: 56px;
32
-    font-weight: bold;
33
-    font-family: monospace;
34
-    text-decoration: none;
35
-    text-align: center;
36
-
37
-    border-width: 0 0 2px 2px;
38
-    border-radius: 0 0 0 8px;
39
-    border-style: solid;
40
-    border-color: #673ab6;
41
-    background: linear-gradient(0deg, #7e56c2 0%, #9574cd 100%);
42
-    -webkit-tap-highlight-color: transparent;
43
-}
44
-
45
-#about:hover {
46
-    border-color: #6742b8;
47
-    background: linear-gradient(0deg, #8b72cb 0%, #c894ff 100%);
48
-}
49
-
50
-#about:active {
51
-    border-color: #ddc300;
52
-    background: linear-gradient(0deg, #ffd500 0%, #ffff00 100%);
53
-}
54
-
55
-#about::before {
56
-    content: '\24D8';
57
-    width: 100%;
58
-    text-align: center;
59
-}
60
-
61
-#about:focus {
62
-    outline: none;
63
-}

+ 3
- 2
demos/hello-three/index.html Näytä tiedosto

@@ -4,7 +4,7 @@
4 4
         <meta charset="utf-8">
5 5
         <meta name="viewport" content="width=device-width,initial-scale=1">
6 6
         <title>encantar.js WebAR demo with three.js</title>
7
-        <link href="demo.css" rel="stylesheet">
7
+        <link href="../assets/demo.css" rel="stylesheet">
8 8
         <script src="../../dist/encantar.min.js"></script>
9 9
         <script src="https://cdn.jsdelivr.net/npm/three@0.147.0/build/three.min.js"></script>
10 10
         <script src="https://cdn.jsdelivr.net/npm/three@0.147.0/examples/js/loaders/GLTFLoader.js"></script>
@@ -14,8 +14,9 @@
14 14
     <body>
15 15
         <div id="ar-viewport">
16 16
             <div id="ar-hud" hidden>
17
-                <img id="scan" src="../assets/scan.png" draggable="false">
18 17
                 <a id="about" href="NOTICE.html" draggable="false"></a>
18
+                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
19
+                <img id="scan" src="../assets/scan.png" draggable="false">
19 20
             </div>
20 21
         </div>
21 22
         <img id="mage" src="../assets/mage.webp" hidden>

+ 3
- 2
demos/hello-three/video.html Näytä tiedosto

@@ -4,7 +4,7 @@
4 4
         <meta charset="utf-8">
5 5
         <meta name="viewport" content="width=device-width,initial-scale=1">
6 6
         <title>encantar.js WebAR demo with three.js</title>
7
-        <link href="demo.css" rel="stylesheet">
7
+        <link href="../assets/demo.css" rel="stylesheet">
8 8
         <script src="../../dist/encantar.min.js"></script>
9 9
         <script src="https://cdn.jsdelivr.net/npm/three@0.147.0/build/three.min.js"></script>
10 10
         <script src="https://cdn.jsdelivr.net/npm/three@0.147.0/examples/js/loaders/GLTFLoader.js"></script>
@@ -14,8 +14,9 @@
14 14
     <body>
15 15
         <div id="ar-viewport">
16 16
             <div id="ar-hud" hidden>
17
-                <img id="scan" src="../assets/scan.png" draggable="false">
18 17
                 <a id="about" href="NOTICE.html" draggable="false"></a>
18
+                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
19
+                <img id="scan" src="../assets/scan.png" draggable="false">
19 20
             </div>
20 21
         </div>
21 22
         <img id="mage" src="../assets/mage.webp" hidden>

+ 0
- 63
demos/hello-webgl/demo.css Näytä tiedosto

@@ -1,63 +0,0 @@
1
-body {
2
-    background-color: #673ab6;
3
-    background-image: url("../assets/poster.svg");
4
-    background-position: center;
5
-    background-repeat: no-repeat;
6
-    height: 100vh;
7
-    margin: 0;
8
-    padding: 0;
9
-}
10
-
11
-#scan {
12
-    width: 100%;
13
-    height: 100%;
14
-    object-fit: contain;
15
-    opacity: 0.75;
16
-}
17
-
18
-#about {
19
-    position: absolute;
20
-    right: 0px;
21
-    top: 0px;
22
-    width: 80px;
23
-    height: 80px;
24
-
25
-    display: flex;
26
-    align-items: center;
27
-    margin: 0;
28
-    padding: 0;
29
-
30
-    color: #fff;
31
-    font-size: 56px;
32
-    font-weight: bold;
33
-    font-family: monospace;
34
-    text-decoration: none;
35
-    text-align: center;
36
-
37
-    border-width: 0 0 2px 2px;
38
-    border-radius: 0 0 0 8px;
39
-    border-style: solid;
40
-    border-color: #673ab6;
41
-    background: linear-gradient(0deg, #7e56c2 0%, #9574cd 100%);
42
-    -webkit-tap-highlight-color: transparent;
43
-}
44
-
45
-#about:hover {
46
-    border-color: #6742b8;
47
-    background: linear-gradient(0deg, #8b72cb 0%, #c894ff 100%);
48
-}
49
-
50
-#about:active {
51
-    border-color: #ddc300;
52
-    background: linear-gradient(0deg, #ffd500 0%, #ffff00 100%);
53
-}
54
-
55
-#about::before {
56
-    content: '\24D8';
57
-    width: 100%;
58
-    text-align: center;
59
-}
60
-
61
-#about:focus {
62
-    outline: none;
63
-}

+ 3
- 2
demos/hello-webgl/index.html Näytä tiedosto

@@ -4,15 +4,16 @@
4 4
         <meta charset="utf-8">
5 5
         <meta name="viewport" content="width=device-width,initial-scale=1">
6 6
         <title>encantar.js WebAR demo with WebGL</title>
7
-        <link href="demo.css" rel="stylesheet">
7
+        <link href="../assets/demo.css" rel="stylesheet">
8 8
         <script src="../../dist/encantar.min.js"></script>
9 9
         <script src="demo.js"></script>
10 10
     </head>
11 11
     <body>
12 12
         <div id="ar-viewport">
13 13
             <div id="ar-hud" hidden>
14
-                <img id="scan" src="../assets/scan.png" draggable="false">
15 14
                 <a id="about" href="NOTICE.html" draggable="false"></a>
15
+                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
16
+                <img id="scan" src="../assets/scan.png" draggable="false">
16 17
             </div>
17 18
         </div>
18 19
         <img id="it-works" src="../assets/it-works.png" hidden>

+ 3
- 2
demos/hello-webgl/video.html Näytä tiedosto

@@ -4,15 +4,16 @@
4 4
         <meta charset="utf-8">
5 5
         <meta name="viewport" content="width=device-width,initial-scale=1">
6 6
         <title>encantar.js WebAR demo with WebGL</title>
7
-        <link href="demo.css" rel="stylesheet">
7
+        <link href="../assets/demo.css" rel="stylesheet">
8 8
         <script src="../../dist/encantar.min.js"></script>
9 9
         <script src="demo.js"></script>
10 10
     </head>
11 11
     <body>
12 12
         <div id="ar-viewport">
13 13
             <div id="ar-hud" hidden>
14
-                <img id="scan" src="../assets/scan.png" draggable="false">
15 14
                 <a id="about" href="NOTICE.html" draggable="false"></a>
15
+                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
16
+                <img id="scan" src="../assets/scan.png" draggable="false">
16 17
             </div>
17 18
         </div>
18 19
         <img id="it-works" src="../assets/it-works.png" hidden>

+ 0
- 63
demos/hello-world/demo.css Näytä tiedosto

@@ -1,63 +0,0 @@
1
-body {
2
-    background-color: #673ab6;
3
-    background-image: url("../assets/poster.svg");
4
-    background-position: center;
5
-    background-repeat: no-repeat;
6
-    height: 100vh;
7
-    margin: 0;
8
-    padding: 0;
9
-}
10
-
11
-#scan {
12
-    width: 100%;
13
-    height: 100%;
14
-    object-fit: contain;
15
-    opacity: 0.75;
16
-}
17
-
18
-#about {
19
-    position: absolute;
20
-    right: 0px;
21
-    top: 0px;
22
-    width: 80px;
23
-    height: 80px;
24
-
25
-    display: flex;
26
-    align-items: center;
27
-    margin: 0;
28
-    padding: 0;
29
-
30
-    color: #fff;
31
-    font-size: 56px;
32
-    font-weight: bold;
33
-    font-family: monospace;
34
-    text-decoration: none;
35
-    text-align: center;
36
-
37
-    border-width: 0 0 2px 2px;
38
-    border-radius: 0 0 0 8px;
39
-    border-style: solid;
40
-    border-color: #673ab6;
41
-    background: linear-gradient(0deg, #7e56c2 0%, #9574cd 100%);
42
-    -webkit-tap-highlight-color: transparent;
43
-}
44
-
45
-#about:hover {
46
-    border-color: #6742b8;
47
-    background: linear-gradient(0deg, #8b72cb 0%, #c894ff 100%);
48
-}
49
-
50
-#about:active {
51
-    border-color: #ddc300;
52
-    background: linear-gradient(0deg, #ffd500 0%, #ffff00 100%);
53
-}
54
-
55
-#about::before {
56
-    content: '\24D8';
57
-    width: 100%;
58
-    text-align: center;
59
-}
60
-
61
-#about:focus {
62
-    outline: none;
63
-}

+ 3
- 2
demos/hello-world/index.html Näytä tiedosto

@@ -4,15 +4,16 @@
4 4
         <meta charset="utf-8">
5 5
         <meta name="viewport" content="width=device-width,initial-scale=1">
6 6
         <title>encantar.js WebAR template</title>
7
-        <link href="demo.css" rel="stylesheet">
7
+        <link href="../assets/demo.css" rel="stylesheet">
8 8
         <script src="../../dist/encantar.min.js"></script>
9 9
         <script src="demo.js"></script>
10 10
     </head>
11 11
     <body>
12 12
         <div id="ar-viewport">
13 13
             <div id="ar-hud" hidden>
14
-                <img id="scan" src="../assets/scan.png" draggable="false">
15 14
                 <a id="about" href="NOTICE.html" draggable="false"></a>
15
+                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
16
+                <img id="scan" src="../assets/scan.png" draggable="false">
16 17
             </div>
17 18
         </div>
18 19
         <img id="mage" src="../assets/mage.webp" hidden>

+ 3
- 2
demos/hello-world/video.html Näytä tiedosto

@@ -4,15 +4,16 @@
4 4
         <meta charset="utf-8">
5 5
         <meta name="viewport" content="width=device-width,initial-scale=1">
6 6
         <title>encantar.js WebAR template</title>
7
-        <link href="demo.css" rel="stylesheet">
7
+        <link href="../assets/demo.css" rel="stylesheet">
8 8
         <script src="../../dist/encantar.min.js"></script>
9 9
         <script src="demo.js"></script>
10 10
     </head>
11 11
     <body>
12 12
         <div id="ar-viewport">
13 13
             <div id="ar-hud" hidden>
14
-                <img id="scan" src="../assets/scan.png" draggable="false">
15 14
                 <a id="about" href="NOTICE.html" draggable="false"></a>
15
+                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
16
+                <img id="scan" src="../assets/scan.png" draggable="false">
16 17
             </div>
17 18
         </div>
18 19
         <img id="mage" src="../assets/mage.webp" hidden>

+ 0
- 56
demos/pointer-demo/demo.css Näytä tiedosto

@@ -1,56 +0,0 @@
1
-body {
2
-    background-color: #673ab6;
3
-    background-image: url("../assets/poster.svg");
4
-    background-position: center;
5
-    background-repeat: no-repeat;
6
-    height: 100vh;
7
-    margin: 0;
8
-    padding: 0;
9
-}
10
-
11
-#about {
12
-    position: absolute;
13
-    right: 0px;
14
-    top: 0px;
15
-    width: 80px;
16
-    height: 80px;
17
-
18
-    display: flex;
19
-    align-items: center;
20
-    margin: 0;
21
-    padding: 0;
22
-
23
-    color: #fff;
24
-    font-size: 56px;
25
-    font-weight: bold;
26
-    font-family: monospace;
27
-    text-decoration: none;
28
-    text-align: center;
29
-
30
-    border-width: 0 0 2px 2px;
31
-    border-radius: 0 0 0 8px;
32
-    border-style: solid;
33
-    border-color: #673ab6;
34
-    background: linear-gradient(0deg, #7e56c2 0%, #9574cd 100%);
35
-    -webkit-tap-highlight-color: transparent;
36
-}
37
-
38
-#about:hover {
39
-    border-color: #6742b8;
40
-    background: linear-gradient(0deg, #8b72cb 0%, #c894ff 100%);
41
-}
42
-
43
-#about:active {
44
-    border-color: #ddc300;
45
-    background: linear-gradient(0deg, #ffd500 0%, #ffff00 100%);
46
-}
47
-
48
-#about::before {
49
-    content: '\24D8';
50
-    width: 100%;
51
-    text-align: center;
52
-}
53
-
54
-#about:focus {
55
-    outline: none;
56
-}

+ 2
- 1
demos/pointer-demo/index.html Näytä tiedosto

@@ -4,7 +4,7 @@
4 4
         <meta charset="utf-8">
5 5
         <meta name="viewport" content="width=device-width,initial-scale=1">
6 6
         <title>encantar.js pointer demo</title>
7
-        <link href="demo.css" rel="stylesheet">
7
+        <link href="../assets/demo.css" rel="stylesheet">
8 8
         <script src="../../dist/encantar.min.js"></script>
9 9
         <script src="demo.js"></script>
10 10
     </head>
@@ -12,6 +12,7 @@
12 12
         <div id="ar-viewport">
13 13
             <div id="ar-hud" hidden>
14 14
                 <a id="about" href="NOTICE.html" draggable="false"></a>
15
+                <a id="sponsor" href="https://github.com/sponsors/alemart" draggable="false"></a>
15 16
             </div>
16 17
         </div>
17 18
     </body>

+ 0
- 3
src/ui/fullscreen-button.ts Näytä tiedosto

@@ -94,9 +94,6 @@ export class FullscreenButton
94 94
         button.style.width = BUTTON_SIZE + 'px';
95 95
         button.style.height = BUTTON_SIZE + 'px';
96 96
 
97
-        button.style.display = 'flex';
98
-        button.style.alignItems = 'center';
99
-        button.style.padding = '2px';
100 97
         button.style.opacity = '0.5';
101 98
         button.style.cursor = 'pointer';
102 99
         button.style.outline = 'none';

Loading…
Peruuta
Tallenna