Selaa lähdekoodia

Simplify error message

customisations
alemart 1 vuosi sitten
vanhempi
commit
b9511e0a26

+ 2
- 2
demos/hello-aframe/demo.js Näytä tiedosto

@@ -8,8 +8,8 @@ async function startARSession(canvas)
8 8
 {
9 9
     if(!Martins.isSupported()) {
10 10
         throw new Error(
11
-            'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
12
-            'Your user agent is ' + navigator.userAgent
11
+            'This device is not compatible with AR.\n\n' +
12
+            'User agent: ' + navigator.userAgent
13 13
         );
14 14
     }
15 15
 

+ 2
- 2
demos/hello-three/demo.js Näytä tiedosto

@@ -107,8 +107,8 @@ window.addEventListener('load', () => {
107 107
     {
108 108
         if(!Martins.isSupported()) {
109 109
             throw new Error(
110
-                'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
111
-                'Your user agent is ' + navigator.userAgent
110
+                'This device is not compatible with AR.\n\n' +
111
+                'User agent: ' + navigator.userAgent
112 112
             );
113 113
         }
114 114
 

+ 2
- 2
demos/hello-webgl/demo.js Näytä tiedosto

@@ -912,8 +912,8 @@ window.addEventListener('load', async function() {
912 912
     {
913 913
         if(!Martins.isSupported()) {
914 914
             throw new Error(
915
-                'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
916
-                'Your user agent is ' + navigator.userAgent
915
+                'This device is not compatible with AR.\n\n' +
916
+                'User agent: ' + navigator.userAgent
917 917
             );
918 918
         }
919 919
 

+ 2
- 2
demos/hello-world/demo.js Näytä tiedosto

@@ -23,8 +23,8 @@ window.addEventListener('load', async function() {
23 23
     {
24 24
         if(!Martins.isSupported()) {
25 25
             throw new Error(
26
-                'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
27
-                'Your user agent is ' + navigator.userAgent
26
+                'This device is not compatible with AR.\n\n' +
27
+                'User agent: ' + navigator.userAgent
28 28
             );
29 29
         }
30 30
 

+ 2
- 2
demos/touch-three/demo.js Näytä tiedosto

@@ -137,8 +137,8 @@ window.addEventListener('load', () => {
137 137
     {
138 138
         if(!Martins.isSupported()) {
139 139
             throw new Error(
140
-                'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
141
-                'Your user agent is ' + navigator.userAgent
140
+                'This device is not compatible with AR.\n\n' +
141
+                'User agent: ' + navigator.userAgent
142 142
             );
143 143
         }
144 144
 

+ 8
- 8
docs/getting-started/activate-your-webcam.md Näytä tiedosto

@@ -11,8 +11,8 @@ async function startARSession()
11 11
 {
12 12
     if(!Martins.isSupported()) {
13 13
         throw new Error(
14
-            'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
15
-            'Your user agent is ' + navigator.userAgent
14
+            'This device is not compatible with AR.\n\n' +
15
+            'User agent: ' + navigator.userAgent
16 16
         );
17 17
     }
18 18
 
@@ -156,8 +156,8 @@ async function startARSession()
156 156
 {
157 157
     if(!Martins.isSupported()) {
158 158
         throw new Error(
159
-            'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
160
-            'Your user agent is ' + navigator.userAgent
159
+            'This device is not compatible with AR.\n\n' +
160
+            'User agent: ' + navigator.userAgent
161 161
         );
162 162
     }
163 163
 
@@ -202,8 +202,8 @@ async function startARSession()
202 202
 {
203 203
     if(!Martins.isSupported()) {
204 204
         throw new Error(
205
-            'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
206
-            'Your user agent is ' + navigator.userAgent
205
+            'This device is not compatible with AR.\n\n' +
206
+            'User agent: ' + navigator.userAgent
207 207
         );
208 208
     }
209 209
 
@@ -256,8 +256,8 @@ async function startARSession()
256 256
 {
257 257
     if(!Martins.isSupported()) {
258 258
         throw new Error(
259
-            'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
260
-            'Your user agent is ' + navigator.userAgent
259
+            'This device is not compatible with AR.\n\n' +
260
+            'User agent: ' + navigator.userAgent
261 261
         );
262 262
     }
263 263
 

+ 2
- 2
docs/getting-started/next-steps.md Näytä tiedosto

@@ -13,8 +13,8 @@ async function startARSession()
13 13
 {
14 14
     if(!Martins.isSupported()) {
15 15
         throw new Error(
16
-            'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
17
-            'Your user agent is ' + navigator.userAgent
16
+            'This device is not compatible with AR.\n\n' +
17
+            'User agent: ' + navigator.userAgent
18 18
         );
19 19
     }
20 20
 

+ 8
- 8
docs/getting-started/set-up-the-session.md Näytä tiedosto

@@ -34,8 +34,8 @@ window.onload = async function()
34 34
     try {
35 35
         if(!Martins.isSupported()) {
36 36
             throw new Error(
37
-                'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
38
-                'Your user agent is ' + navigator.userAgent
37
+                'This device is not compatible with AR.\n\n' +
38
+                'User agent: ' + navigator.userAgent
39 39
             );
40 40
         }
41 41
 
@@ -65,8 +65,8 @@ window.onload = async function()
65 65
     try {
66 66
         if(!Martins.isSupported()) {
67 67
             throw new Error(
68
-                'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
69
-                'Your user agent is ' + navigator.userAgent
68
+                'This device is not compatible with AR.\n\n' +
69
+                'User agent: ' + navigator.userAgent
70 70
             );
71 71
         }
72 72
 
@@ -99,8 +99,8 @@ window.onload = async function()
99 99
     try {
100 100
         if(!Martins.isSupported()) {
101 101
             throw new Error(
102
-                'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
103
-                'Your user agent is ' + navigator.userAgent
102
+                'This device is not compatible with AR.\n\n' +
103
+                'User agent: ' + navigator.userAgent
104 104
             );
105 105
         }
106 106
 
@@ -162,8 +162,8 @@ async function startARSession()
162 162
 {
163 163
     if(!Martins.isSupported()) {
164 164
         throw new Error(
165
-            'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
166
-            'Your user agent is ' + navigator.userAgent
165
+            'This device is not compatible with AR.\n\n' +
166
+            'User agent: ' + navigator.userAgent
167 167
         );
168 168
     }
169 169
 

+ 4
- 4
docs/getting-started/set-up-the-tracker.md Näytä tiedosto

@@ -139,8 +139,8 @@ window.onload = async function()
139 139
     try {
140 140
         if(!Martins.isSupported()) {
141 141
             throw new Error(
142
-                'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
143
-                'Your user agent is ' + navigator.userAgent
142
+                'This device is not compatible with AR.\n\n' +
143
+                'User agent: ' + navigator.userAgent
144 144
             );
145 145
         }
146 146
 
@@ -180,8 +180,8 @@ window.onload = async function()
180 180
     try {
181 181
         if(!Martins.isSupported()) {
182 182
             throw new Error(
183
-                'Use a browser/device compatible with WebGL2 and WebAssembly. ' +
184
-                'Your user agent is ' + navigator.userAgent
183
+                'This device is not compatible with AR.\n\n' +
184
+                'User agent: ' + navigator.userAgent
185 185
             );
186 186
         }
187 187
 

Loading…
Peruuta
Tallenna