1 | <!DOCTYPE html>
|
2 |
|
3 | <html lang="en">
|
4 | <head>
|
5 | <meta charset="utf-8">
|
6 | <meta name="viewport" content="width=device-width">
|
7 | <title>CrossBrowdy API documentation Namespace: Motion</title>
|
8 |
|
9 | |
10 |
|
11 |
|
12 | <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
|
13 |
|
14 | <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
|
15 |
|
16 | </head>
|
17 |
|
18 | <body style="min-width:800px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
19 |
|
20 | <div class="navbar navbar-default navbar-fixed-top ">
|
21 | <div class="container">
|
22 | <div class="navbar-header">
|
23 | <a class="navbar-brand" href="index.html">CrossBrowdy API documentation</a>
|
24 | <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
|
25 | <span class="icon-bar"></span>
|
26 | <span class="icon-bar"></span>
|
27 | <span class="icon-bar"></span>
|
28 | </button>
|
29 | </div>
|
30 | <div class="navbar-collapse collapse" id="topNavigation">
|
31 | <ul class="nav navbar-nav">
|
32 |
|
33 | <li class="dropdown">
|
34 | <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
|
35 | <ul class="dropdown-menu inline">
|
36 | <li><a href="CB_Arrays.html">CB_Arrays</a></li><li><a href="CB_AudioDetector.html">CB_AudioDetector</a></li><li><a href="CB_Client.html">CB_Client</a></li><li><a href="CB_Collisions.html">CB_Collisions</a></li><li><a href="CB_Configuration.html">CB_Configuration</a></li><li><a href="CB_Configuration.CrossBase.html">CB_Configuration.CrossBase</a></li><li><a href="CB_Configuration.CrossBrowdy.html">CB_Configuration.CrossBrowdy</a></li><li><a href="CB_Controllers.html">CB_Controllers</a></li><li><a href="CB_Controllers_Proprietary.html">CB_Controllers_Proprietary</a></li><li><a href="CB_Controllers_Proprietary.WII.html">CB_Controllers_Proprietary.WII</a></li><li><a href="CB_Controllers_Proprietary.WII_U.html">CB_Controllers_Proprietary.WII_U</a></li><li><a href="CB_Device.html">CB_Device</a></li><li><a href="CB_Device.AmbientLight.html">CB_Device.AmbientLight</a></li><li><a href="CB_Device.Battery.html">CB_Device.Battery</a></li><li><a href="CB_Device.Location.html">CB_Device.Location</a></li><li><a href="CB_Device.Motion.html">CB_Device.Motion</a></li><li><a href="CB_Device.Orientation.html">CB_Device.Orientation</a></li><li><a href="CB_Device.Proximity.html">CB_Device.Proximity</a></li><li><a href="CB_Device.Vibration.html">CB_Device.Vibration</a></li><li><a href="CB_Elements.html">CB_Elements</a></li><li><a href="CB_Events.html">CB_Events</a></li><li><a href="CB_Keyboard.html">CB_Keyboard</a></li><li><a href="CB_Keyboard.chars.html">CB_Keyboard.chars</a></li><li><a href="CB_Keyboard.extended.html">CB_Keyboard.extended</a></li><li><a href="CB_Keyboard.keys.html">CB_Keyboard.keys</a></li><li><a href="CB_Modules.html">CB_Modules</a></li><li><a href="CB_Mouse.html">CB_Mouse</a></li><li><a href="CB_Mouse.CursorImage.html">CB_Mouse.CursorImage</a></li><li><a href="CB_Net.html">CB_Net</a></li><li><a href="CB_Net.Fetch.html">CB_Net.Fetch</a></li><li><a href="CB_Net.REST.html">CB_Net.REST</a></li><li><a href="CB_Net.Sockets.html">CB_Net.Sockets</a></li><li><a href="CB_Net.Sockets.SockJS.html">CB_Net.Sockets.SockJS</a></li><li><a href="CB_Net.XHR.html">CB_Net.XHR</a></li><li><a href="CB_Pointer.html">CB_Pointer</a></li><li><a href="CB_Screen.html">CB_Screen</a></li><li><a href="CB_Speaker.html">CB_Speaker</a></li><li><a href="CB_Touch.html">CB_Touch</a></li><li><a href="CB_baseSymbols.html">CB_baseSymbols</a></li>
|
37 | </ul>
|
38 | </li>
|
39 |
|
40 | <li class="dropdown">
|
41 | <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
|
42 | <ul class="dropdown-menu inline">
|
43 | <li><a href="CB_AudioFile.html">CB_AudioFile</a></li><li><a href="CB_AudioFileCache.html">CB_AudioFileCache</a></li><li><a href="CB_AudioFileSprites.html">CB_AudioFileSprites</a></li><li><a href="CB_AudioFileSpritesPool.html">CB_AudioFileSpritesPool</a></li><li><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></li><li><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></li><li><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></li><li><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></li><li><a href="CB_Canvas.html">CB_Canvas</a></li><li><a href="CB_GraphicSprites.html">CB_GraphicSprites</a></li><li><a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a></li>
|
44 | </ul>
|
45 | </li>
|
46 |
|
47 | <li class="dropdown">
|
48 | <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
|
49 | <ul class="dropdown-menu inline">
|
50 | <li><a href="global.html#CB_BASE_NAME">CB_BASE_NAME</a></li><li><a href="global.html#CB_CREDITS_DEFAULT">CB_CREDITS_DEFAULT</a></li><li><a href="global.html#CB_NAME">CB_NAME</a></li><li><a href="global.html#CB_OPTIONS">CB_OPTIONS</a></li><li><a href="global.html#CB_VERSION">CB_VERSION</a></li><li><a href="global.html#CB_addCredits">CB_addCredits</a></li><li><a href="global.html#CB_baseToBase">CB_baseToBase</a></li><li><a href="global.html#CB_baseToInt">CB_baseToInt</a></li><li><a href="global.html#CB_br2nl">CB_br2nl</a></li><li><a href="global.html#CB_brToNl">CB_brToNl</a></li><li><a href="global.html#CB_combineArraysOrObjects">CB_combineArraysOrObjects</a></li><li><a href="global.html#CB_combineAutomatically">CB_combineAutomatically</a></li><li><a href="global.html#CB_combineJSON">CB_combineJSON</a></li><li><a href="global.html#CB_combineURIParameters">CB_combineURIParameters</a></li><li><a href="global.html#CB_combineURLParameters">CB_combineURLParameters</a></li><li><a href="global.html#CB_console">CB_console</a></li><li><a href="global.html#CB_copyObject">CB_copyObject</a></li><li><a href="global.html#CB_countDecimalDigits">CB_countDecimalDigits</a></li><li><a href="global.html#CB_countDecimalPart">CB_countDecimalPart</a></li><li><a href="global.html#CB_countDecimals">CB_countDecimals</a></li><li><a href="global.html#CB_countIntegerDigits">CB_countIntegerDigits</a></li><li><a href="global.html#CB_countIntegerPart">CB_countIntegerPart</a></li><li><a href="global.html#CB_credits">CB_credits</a></li><li><a href="global.html#CB_forEach">CB_forEach</a></li><li><a href="global.html#CB_forceString">CB_forceString</a></li><li><a href="global.html#CB_getBase64StringObject">CB_getBase64StringObject</a></li><li><a href="global.html#CB_getCookie">CB_getCookie</a></li><li><a href="global.html#CB_getDatum">CB_getDatum</a></li><li><a href="global.html#CB_getJSONPropertyValue">CB_getJSONPropertyValue</a></li><li><a href="global.html#CB_getLZStringObject">CB_getLZStringObject</a></li><li><a href="global.html#CB_getValueIndex">CB_getValueIndex</a></li><li><a href="global.html#CB_getValuePath">CB_getValuePath</a></li><li><a href="global.html#CB_includeJSFile">CB_includeJSFile</a></li><li><a href="global.html#CB_indexOf">CB_indexOf</a></li><li><a href="global.html#CB_init">CB_init</a></li><li><a href="global.html#CB_intToBase">CB_intToBase</a></li><li><a href="global.html#CB_isArray">CB_isArray</a></li><li><a href="global.html#CB_isEmail">CB_isEmail</a></li><li><a href="global.html#CB_isFileLocal">CB_isFileLocal</a></li><li><a href="global.html#CB_isString">CB_isString</a></li><li><a href="global.html#CB_lastIndexOf">CB_lastIndexOf</a></li><li><a href="global.html#CB_ltrim">CB_ltrim</a></li><li><a href="global.html#CB_nl2br">CB_nl2br</a></li><li><a href="global.html#CB_nlToBr">CB_nlToBr</a></li><li><a href="global.html#CB_numberFormat">CB_numberFormat</a></li><li><a href="global.html#CB_numberOfDecimalDigits">CB_numberOfDecimalDigits</a></li><li><a href="global.html#CB_numberOfDecimals">CB_numberOfDecimals</a></li><li><a href="global.html#CB_numberOfIntegerDigits">CB_numberOfIntegerDigits</a></li><li><a href="global.html#CB_parseJSON">CB_parseJSON</a></li><li><a href="global.html#CB_parseString">CB_parseString</a></li><li><a href="global.html#CB_regularExpressionString">CB_regularExpressionString</a></li><li><a href="global.html#CB_renderString">CB_renderString</a></li><li><a href="global.html#CB_replaceAll">CB_replaceAll</a></li><li><a href="global.html#CB_rtrim">CB_rtrim</a></li><li><a href="global.html#CB_scriptPath">CB_scriptPath</a></li><li><a href="global.html#CB_scriptPathCalculate">CB_scriptPathCalculate</a></li><li><a href="global.html#CB_setCookie">CB_setCookie</a></li><li><a href="global.html#CB_setDatum">CB_setDatum</a></li><li><a href="global.html#CB_sizeOf">CB_sizeOf</a></li><li><a href="global.html#CB_sizeof">CB_sizeof</a></li><li><a href="global.html#CB_stringifyJSON">CB_stringifyJSON</a></li><li><a href="global.html#CB_symmetricCall">CB_symmetricCall</a></li><li><a href="global.html#CB_symmetricCallClear">CB_symmetricCallClear</a></li><li><a href="global.html#CB_this">CB_this</a></li><li><a href="global.html#CB_trim">CB_trim</a></li>
|
51 | </ul>
|
52 | </li>
|
53 |
|
54 | </ul>
|
55 |
|
56 | <div class="col-sm-3 col-md-3">
|
57 | <form class="navbar-form" role="search">
|
58 | <div class="input-group">
|
59 | <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
|
60 | <div class="input-group-btn">
|
61 | <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
|
62 | </div>
|
63 | </div>
|
64 | </form>
|
65 | </div>
|
66 |
|
67 | </div>
|
68 |
|
69 | </div>
|
70 | </div>
|
71 |
|
72 |
|
73 | <div class="container" id="toc-content" style="width:100%;">
|
74 | <div class="row" style="width:100%;">
|
75 |
|
76 |
|
77 | <div class="col-md-8" style="width:85%;">
|
78 |
|
79 | <div id="main">
|
80 |
|
81 |
|
82 |
|
83 | <h1 class="page-title">Namespace: Motion</h1>
|
84 |
|
85 | <section>
|
86 |
|
87 | <header>
|
88 |
|
89 | <h2>
|
90 | <span class="ancestors"><a href="CB_Device.html">CB_Device</a>.</span>
|
91 |
|
92 | Motion
|
93 | </h2>
|
94 |
|
95 |
|
96 | </header>
|
97 |
|
98 |
|
99 | <article>
|
100 | <div class="container-overview">
|
101 |
|
102 |
|
103 | <div class="description"><p>Static class to manage the device's motion. It will return itself if it is tried to be instantiated.</p></div>
|
104 |
|
105 |
|
106 |
|
107 | <dl class="details">
|
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 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
138 | <dd class="tag-source">
|
139 | <ul class="dummy">
|
140 | <li>
|
141 | <a href="CrossBase_device_CB_Device.js.html">CrossBase/device/CB_Device.js</a>,
|
142 | <a href="CrossBase_device_CB_Device.js.html#sunlight-1-line-605">line 605</a>
|
143 | </li>
|
144 | </ul>
|
145 | </dd>
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 |
|
152 |
|
153 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
154 | <dd class="tag-todo">
|
155 | <ul>
|
156 | <li>Normalize more differences between web clients.</li>
|
157 | </ul>
|
158 | </dd>
|
159 |
|
160 | </dl>
|
161 |
|
162 |
|
163 |
|
164 |
|
165 | </div>
|
166 |
|
167 |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 |
|
175 |
|
176 |
|
177 |
|
178 | <h3 class="subsection-title">Members</h3>
|
179 |
|
180 | <dl>
|
181 |
|
182 | <hr>
|
183 | <dt class="name" id=".cordova_getAccelerationConstantly_lastId">
|
184 | <h4 id=".cordova_getAccelerationConstantly_lastId"><span class="type-signature"><static, readonly> </span>cordova_getAccelerationConstantly_lastId<span class="type-signature"> :integer|null</span></h4>
|
185 |
|
186 |
|
187 | </dt>
|
188 | <dd>
|
189 |
|
190 | <div class="description">
|
191 | <p>Keeps the last watch ID that gets the acceleration constantly using the <a href="https://github.com/apache/cordova-plugin-device-motion">Apache Cordova's Device Motion plugin</a>. Used by the <a href="CB_Device.Motion.html#.cordova_getAccelerationConstantly"><code>CB_Device.Motion.cordova_getAccelerationConstantly</code></a> function.</p>
|
192 | </div>
|
193 |
|
194 |
|
195 |
|
196 | <h5>Type:</h5>
|
197 | <ul>
|
198 | <li>
|
199 |
|
200 | <span class="param-type">integer</span>
|
201 | |
|
202 |
|
203 | <span class="param-type">null</span>
|
204 |
|
205 |
|
206 |
|
207 | </li>
|
208 | </ul>
|
209 |
|
210 |
|
211 |
|
212 | <dl class="details">
|
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 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
243 | <dd class="tag-source">
|
244 | <ul class="dummy">
|
245 | <li>
|
246 | <a href="CrossBase_device_CB_Device.js.html">CrossBase/device/CB_Device.js</a>,
|
247 | <a href="CrossBase_device_CB_Device.js.html#sunlight-1-line-614">line 614</a>
|
248 | </li>
|
249 | </ul>
|
250 | </dd>
|
251 |
|
252 |
|
253 |
|
254 |
|
255 |
|
256 |
|
257 |
|
258 | </dl>
|
259 |
|
260 |
|
261 |
|
262 | </dd>
|
263 |
|
264 | </dl>
|
265 |
|
266 |
|
267 |
|
268 | <h3 class="subsection-title">Methods</h3>
|
269 |
|
270 | <dl>
|
271 |
|
272 | <hr>
|
273 | <dt>
|
274 | <h4 class="name" id=".cordova_getAcceleration"><span class="type-signature"><static> </span>cordova_getAcceleration<span class="signature">(callbackOk, callbackError)</span><span class="type-signature"> → {undefined|false}</span></h4>
|
275 |
|
276 |
|
277 | </dt>
|
278 | <dd>
|
279 |
|
280 |
|
281 | <div class="description">
|
282 | <p>Gets the acceleration using the <a href="https://github.com/apache/cordova-plugin-device-motion">Apache Cordova's Device Motion plugin</a>. Uses "navigator.accelerometer.getCurrentAcceleration" internally.</p>
|
283 | </div>
|
284 |
|
285 |
|
286 |
|
287 |
|
288 |
|
289 |
|
290 |
|
291 |
|
292 | <h5>Parameters:</h5>
|
293 |
|
294 |
|
295 | <table class="params table table-striped">
|
296 | <thead>
|
297 | <tr>
|
298 |
|
299 | <th style="width:12%; min-width:110px;">Name</th>
|
300 |
|
301 |
|
302 | <th style="width:12%; min-width:110px;">Type</th>
|
303 |
|
304 |
|
305 |
|
306 |
|
307 |
|
308 | <th class="last" style="min-width:310px;">Description</th>
|
309 | </tr>
|
310 | </thead>
|
311 |
|
312 | <tbody>
|
313 |
|
314 |
|
315 | <tr>
|
316 |
|
317 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackOk</code></td>
|
318 |
|
319 |
|
320 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
321 |
|
322 |
|
323 | <span class="param-type">function</span>
|
324 |
|
325 |
|
326 |
|
327 |
|
328 | </td>
|
329 |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The function that will be called when it succeeds getting the acceleration. The event object received will already be normalized by the <a href="CB_Device.Motion.html#.cordova_getAccelerationNormalized"><code>CB_Device.Motion.cordova_getAccelerationNormalized</code></a> function automatically. Following the same rules as in <a href="https://github.com/apache/cordova-plugin-device-motion">https://github.com/apache/cordova-plugin-device-motion</a> ("navigator.accelerometer.getCurrentAcceleration" function).</p></td>
|
335 | </tr>
|
336 |
|
337 |
|
338 |
|
339 | <tr>
|
340 |
|
341 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackError</code></td>
|
342 |
|
343 |
|
344 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
345 |
|
346 |
|
347 | <span class="param-type">function</span>
|
348 |
|
349 |
|
350 |
|
351 |
|
352 | </td>
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The function that will be called if there is any error getting the acceleration. Following the same rules as in <a href="https://github.com/apache/cordova-plugin-device-motion">https://github.com/apache/cordova-plugin-device-motion</a> ("navigator.accelerometer.getCurrentAcceleration" function).</p></td>
|
359 | </tr>
|
360 |
|
361 |
|
362 | </tbody>
|
363 | </table>
|
364 |
|
365 |
|
366 |
|
367 |
|
368 | <dl class="details">
|
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 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
399 | <dd class="tag-source">
|
400 | <ul class="dummy">
|
401 | <li>
|
402 | <a href="CrossBase_device_CB_Device.js.html">CrossBase/device/CB_Device.js</a>,
|
403 | <a href="CrossBase_device_CB_Device.js.html#sunlight-1-line-661">line 661</a>
|
404 | </li>
|
405 | </ul>
|
406 | </dd>
|
407 |
|
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 |
|
414 | </dl>
|
415 |
|
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 |
|
428 | <h5>Returns:</h5>
|
429 |
|
430 |
|
431 | <div class="param-desc">
|
432 | <p>Returns false in the case that the <a href="https://github.com/apache/cordova-plugin-device-motion">Apache Cordova's Device Motion plugin</a> is not supported or undefined otherwise.</p>
|
433 | </div>
|
434 |
|
435 |
|
436 |
|
437 | <dl>
|
438 | <dt>
|
439 | Type
|
440 | </dt>
|
441 | <dd>
|
442 |
|
443 | <span class="param-type">undefined</span>
|
444 | |
|
445 |
|
446 | <span class="param-type">false</span>
|
447 |
|
448 |
|
449 |
|
450 | </dd>
|
451 | </dl>
|
452 |
|
453 |
|
454 |
|
455 |
|
456 |
|
457 | </dd>
|
458 |
|
459 |
|
460 |
|
461 | <hr>
|
462 | <dt>
|
463 | <h4 class="name" id=".cordova_getAccelerationConstantly"><span class="type-signature"><static> </span>cordova_getAccelerationConstantly<span class="signature">( [callbackOkOrId] [, callbackError] [, options])</span><span class="type-signature"> → {integer|undefined|false}</span></h4>
|
464 |
|
465 |
|
466 | </dt>
|
467 | <dd>
|
468 |
|
469 |
|
470 | <div class="description">
|
471 | <p>Starts or stops getting the acceleration constantly at a regular interval. Uses the <a href="https://github.com/apache/cordova-plugin-device-motion">Apache Cordova's Device Motion plugin</a> ("navigator.accelerometer.watchAcceleration" and "navigator.accelerometer.clearWatch" functions).</p>
|
472 | </div>
|
473 |
|
474 |
|
475 |
|
476 |
|
477 |
|
478 |
|
479 |
|
480 |
|
481 | <h5>Parameters:</h5>
|
482 |
|
483 |
|
484 | <table class="params table table-striped">
|
485 | <thead>
|
486 | <tr>
|
487 |
|
488 | <th style="width:12%; min-width:110px;">Name</th>
|
489 |
|
490 |
|
491 | <th style="width:12%; min-width:110px;">Type</th>
|
492 |
|
493 |
|
494 | <th style="width:12%; min-width:110px;">Argument</th>
|
495 |
|
496 |
|
497 |
|
498 | <th style="width:12%; min-width:110px;">Default</th>
|
499 |
|
500 |
|
501 | <th class="last" style="min-width:310px;">Description</th>
|
502 | </tr>
|
503 | </thead>
|
504 |
|
505 | <tbody>
|
506 |
|
507 |
|
508 | <tr>
|
509 |
|
510 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackOkOrId</code></td>
|
511 |
|
512 |
|
513 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
514 |
|
515 |
|
516 | <span class="param-type">function</span>
|
517 | |
|
518 |
|
519 | <span class="param-type">integer</span>
|
520 |
|
521 |
|
522 |
|
523 |
|
524 | </td>
|
525 |
|
526 |
|
527 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
528 |
|
529 | <optional><br>
|
530 |
|
531 |
|
532 |
|
533 |
|
534 |
|
535 | </td>
|
536 |
|
537 |
|
538 |
|
539 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
540 |
|
541 | <a href="CB_Device.Motion.html#.cordova_getAccelerationConstantly_lastId"><code>CB_Device.Motion.cordova_getAccelerationConstantly_lastId</code></a>
|
542 |
|
543 | </td>
|
544 |
|
545 |
|
546 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>In the case that we want to start getting the acceleration, use a function callback that will be called regularly when the acceleration is gotten successfully (using the "navigator.accelerometer.watchAcceleration" function) and the event object received will already be normalized by the <a href="CB_Device.Motion.html#.cordova_getAccelerationNormalized"><code>CB_Device.Motion.cordova_getAccelerationNormalized</code></a> function automatically. To stop getting the acceleration, use the watch ID that we want to stop (using the "navigator.accelerometer.clearWatch" function). Following the same rules as the first parameter of the "navigator.accelerometer.watchAcceleration" function (when we want to start watching) or the first parameter of "navigator.accelerometer.clearWatch" function (when we want to stop watching) described in <a href="https://github.com/apache/cordova-plugin-device-motion">https://github.com/apache/cordova-plugin-device-motion</a>.</p></td>
|
547 | </tr>
|
548 |
|
549 |
|
550 |
|
551 | <tr>
|
552 |
|
553 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackError</code></td>
|
554 |
|
555 |
|
556 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
557 |
|
558 |
|
559 | <span class="param-type">function</span>
|
560 |
|
561 |
|
562 |
|
563 |
|
564 | </td>
|
565 |
|
566 |
|
567 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
568 |
|
569 | <optional><br>
|
570 |
|
571 |
|
572 |
|
573 |
|
574 |
|
575 | </td>
|
576 |
|
577 |
|
578 |
|
579 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
580 |
|
581 | </td>
|
582 |
|
583 |
|
584 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Callback that will be called if there is any error getting the acceleration. Only used when we want to start getting the acceleration ("callbackOkOrId" is a function). Following the same rules as the second parameter of the "navigator.accelerometer.watchAcceleration" function described in <a href="https://github.com/apache/cordova-plugin-device-motion">https://github.com/apache/cordova-plugin-device-motion</a>.</p></td>
|
585 | </tr>
|
586 |
|
587 |
|
588 |
|
589 | <tr>
|
590 |
|
591 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>options</code></td>
|
592 |
|
593 |
|
594 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
595 |
|
596 |
|
597 | <span class="param-type">Object</span>
|
598 |
|
599 |
|
600 |
|
601 |
|
602 | </td>
|
603 |
|
604 |
|
605 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
606 |
|
607 | <optional><br>
|
608 |
|
609 |
|
610 |
|
611 |
|
612 |
|
613 | </td>
|
614 |
|
615 |
|
616 |
|
617 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
618 |
|
619 | </td>
|
620 |
|
621 |
|
622 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Object that represents the desired options. Only used when we want to start getting the acceleration ("callbackOkOrId" is a function). Following the same rules as the third parameter of the "navigator.accelerometer.watchAcceleration" function described in <a href="https://github.com/apache/cordova-plugin-device-motion">https://github.com/apache/cordova-plugin-device-motion</a>.</p></td>
|
623 | </tr>
|
624 |
|
625 |
|
626 | </tbody>
|
627 | </table>
|
628 |
|
629 |
|
630 |
|
631 |
|
632 | <dl class="details">
|
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 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
663 | <dd class="tag-source">
|
664 | <ul class="dummy">
|
665 | <li>
|
666 | <a href="CrossBase_device_CB_Device.js.html">CrossBase/device/CB_Device.js</a>,
|
667 | <a href="CrossBase_device_CB_Device.js.html#sunlight-1-line-678">line 678</a>
|
668 | </li>
|
669 | </ul>
|
670 | </dd>
|
671 |
|
672 |
|
673 |
|
674 |
|
675 |
|
676 |
|
677 |
|
678 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
679 | <dd class="tag-todo">
|
680 | <ul>
|
681 | <li>Add parameters to keep old callbacks and options.</li>
|
682 | </ul>
|
683 | </dd>
|
684 |
|
685 | </dl>
|
686 |
|
687 |
|
688 |
|
689 |
|
690 |
|
691 |
|
692 |
|
693 |
|
694 |
|
695 |
|
696 |
|
697 |
|
698 |
|
699 | <h5>Returns:</h5>
|
700 |
|
701 |
|
702 | <div class="param-desc">
|
703 | <p>Returns false in the case that <a href="https://github.com/apache/cordova-plugin-device-motion">Apache Cordova's Device Motion plugin</a> is not supported. In the case that we want to start getting the acceleration ("callbackOkOrId" is a function), it will return the watch ID that has been created. In the case that we want to stop getting the acceleration ("callbackOkOrId" is a watch ID), it will return undefined.</p>
|
704 | </div>
|
705 |
|
706 |
|
707 |
|
708 | <dl>
|
709 | <dt>
|
710 | Type
|
711 | </dt>
|
712 | <dd>
|
713 |
|
714 | <span class="param-type">integer</span>
|
715 | |
|
716 |
|
717 | <span class="param-type">undefined</span>
|
718 | |
|
719 |
|
720 | <span class="param-type">false</span>
|
721 |
|
722 |
|
723 |
|
724 | </dd>
|
725 | </dl>
|
726 |
|
727 |
|
728 |
|
729 |
|
730 |
|
731 | </dd>
|
732 |
|
733 |
|
734 |
|
735 | <hr>
|
736 | <dt>
|
737 | <h4 class="name" id=".cordova_getAccelerationConstantlyDisable"><span class="type-signature"><static> </span>cordova_getAccelerationConstantlyDisable<span class="signature">( [id])</span><span class="type-signature"> → {undefined|false}</span></h4>
|
738 |
|
739 |
|
740 | </dt>
|
741 | <dd>
|
742 |
|
743 |
|
744 | <div class="description">
|
745 | <p>Stops getting the acceleration constantly at a regular interval. Uses the <a href="https://github.com/apache/cordova-plugin-device-motion">Apache Cordova's Device Motion plugin</a> ("navigator.accelerometer.clearWatch" function).</p>
|
746 | </div>
|
747 |
|
748 |
|
749 |
|
750 |
|
751 |
|
752 |
|
753 |
|
754 |
|
755 | <h5>Parameters:</h5>
|
756 |
|
757 |
|
758 | <table class="params table table-striped">
|
759 | <thead>
|
760 | <tr>
|
761 |
|
762 | <th style="width:12%; min-width:110px;">Name</th>
|
763 |
|
764 |
|
765 | <th style="width:12%; min-width:110px;">Type</th>
|
766 |
|
767 |
|
768 | <th style="width:12%; min-width:110px;">Argument</th>
|
769 |
|
770 |
|
771 |
|
772 | <th style="width:12%; min-width:110px;">Default</th>
|
773 |
|
774 |
|
775 | <th class="last" style="min-width:310px;">Description</th>
|
776 | </tr>
|
777 | </thead>
|
778 |
|
779 | <tbody>
|
780 |
|
781 |
|
782 | <tr>
|
783 |
|
784 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>id</code></td>
|
785 |
|
786 |
|
787 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
788 |
|
789 |
|
790 | <span class="param-type">integer</span>
|
791 |
|
792 |
|
793 |
|
794 |
|
795 | </td>
|
796 |
|
797 |
|
798 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
799 |
|
800 | <optional><br>
|
801 |
|
802 |
|
803 |
|
804 |
|
805 |
|
806 | </td>
|
807 |
|
808 |
|
809 |
|
810 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
811 |
|
812 | <a href="CB_Device.Motion.html#.cordova_getAccelerationConstantly_lastId"><code>CB_Device.Motion.cordova_getAccelerationConstantly_lastId</code></a>
|
813 |
|
814 | </td>
|
815 |
|
816 |
|
817 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The watch ID that we want to stop. Following the same rules as the first parameter of the "navigator.accelerometer.clearWatch" function described in <a href="https://github.com/apache/cordova-plugin-device-motion">https://github.com/apache/cordova-plugin-device-motion</a>.</p></td>
|
818 | </tr>
|
819 |
|
820 |
|
821 | </tbody>
|
822 | </table>
|
823 |
|
824 |
|
825 |
|
826 |
|
827 | <dl class="details">
|
828 |
|
829 |
|
830 |
|
831 |
|
832 |
|
833 |
|
834 |
|
835 |
|
836 |
|
837 |
|
838 |
|
839 |
|
840 |
|
841 |
|
842 |
|
843 |
|
844 |
|
845 |
|
846 |
|
847 |
|
848 |
|
849 |
|
850 |
|
851 |
|
852 |
|
853 |
|
854 |
|
855 |
|
856 |
|
857 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
858 | <dd class="tag-source">
|
859 | <ul class="dummy">
|
860 | <li>
|
861 | <a href="CrossBase_device_CB_Device.js.html">CrossBase/device/CB_Device.js</a>,
|
862 | <a href="CrossBase_device_CB_Device.js.html#sunlight-1-line-708">line 708</a>
|
863 | </li>
|
864 | </ul>
|
865 | </dd>
|
866 |
|
867 |
|
868 |
|
869 |
|
870 |
|
871 |
|
872 |
|
873 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
874 | <dd class="tag-todo">
|
875 | <ul>
|
876 | <li>Add parameters to keep old callbacks and options.</li>
|
877 | </ul>
|
878 | </dd>
|
879 |
|
880 | </dl>
|
881 |
|
882 |
|
883 |
|
884 |
|
885 |
|
886 |
|
887 |
|
888 |
|
889 |
|
890 |
|
891 |
|
892 |
|
893 |
|
894 | <h5>Returns:</h5>
|
895 |
|
896 |
|
897 | <div class="param-desc">
|
898 | <p>Returns false in the case that <a href="https://github.com/apache/cordova-plugin-device-motion">Apache Cordova's Device Motion plugin</a> is not supported or undefined otherwise.</p>
|
899 | </div>
|
900 |
|
901 |
|
902 |
|
903 | <dl>
|
904 | <dt>
|
905 | Type
|
906 | </dt>
|
907 | <dd>
|
908 |
|
909 | <span class="param-type">undefined</span>
|
910 | |
|
911 |
|
912 | <span class="param-type">false</span>
|
913 |
|
914 |
|
915 |
|
916 | </dd>
|
917 | </dl>
|
918 |
|
919 |
|
920 |
|
921 |
|
922 |
|
923 | </dd>
|
924 |
|
925 |
|
926 |
|
927 | <hr>
|
928 | <dt>
|
929 | <h4 class="name" id=".cordova_getAccelerationNormalized"><span class="type-signature"><static> </span>cordova_getAccelerationNormalized<span class="signature">(accelerometerData)</span><span class="type-signature"> → {Event}</span></h4>
|
930 |
|
931 |
|
932 | </dt>
|
933 | <dd>
|
934 |
|
935 |
|
936 | <div class="description">
|
937 | <p>Normalizes the data gotten from the <a href="https://github.com/apache/cordova-plugin-device-motion">Apache Cordova's Device Motion plugin</a> to try to match the <a href="https://developer.mozilla.org/docs/Web/API/DeviceMotionEvent">Device Motion Event</a> and follow always the same rules as much as possible.</p>
|
938 | </div>
|
939 |
|
940 |
|
941 |
|
942 |
|
943 |
|
944 |
|
945 |
|
946 |
|
947 | <h5>Parameters:</h5>
|
948 |
|
949 |
|
950 | <table class="params table table-striped">
|
951 | <thead>
|
952 | <tr>
|
953 |
|
954 | <th style="width:12%; min-width:110px;">Name</th>
|
955 |
|
956 |
|
957 | <th style="width:12%; min-width:110px;">Type</th>
|
958 |
|
959 |
|
960 |
|
961 |
|
962 |
|
963 | <th class="last" style="min-width:310px;">Description</th>
|
964 | </tr>
|
965 | </thead>
|
966 |
|
967 | <tbody>
|
968 |
|
969 |
|
970 | <tr>
|
971 |
|
972 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>accelerometerData</code></td>
|
973 |
|
974 |
|
975 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
976 |
|
977 |
|
978 | <span class="param-type">Object</span>
|
979 |
|
980 |
|
981 |
|
982 |
|
983 | </td>
|
984 |
|
985 |
|
986 |
|
987 |
|
988 |
|
989 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The acceleration object that we want to normalize.</p></td>
|
990 | </tr>
|
991 |
|
992 |
|
993 | </tbody>
|
994 | </table>
|
995 |
|
996 |
|
997 |
|
998 |
|
999 | <dl class="details">
|
1000 |
|
1001 |
|
1002 |
|
1003 |
|
1004 |
|
1005 |
|
1006 |
|
1007 |
|
1008 |
|
1009 |
|
1010 |
|
1011 |
|
1012 |
|
1013 |
|
1014 |
|
1015 |
|
1016 |
|
1017 |
|
1018 |
|
1019 |
|
1020 |
|
1021 |
|
1022 |
|
1023 |
|
1024 |
|
1025 |
|
1026 |
|
1027 |
|
1028 |
|
1029 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
1030 | <dd class="tag-source">
|
1031 | <ul class="dummy">
|
1032 | <li>
|
1033 | <a href="CrossBase_device_CB_Device.js.html">CrossBase/device/CB_Device.js</a>,
|
1034 | <a href="CrossBase_device_CB_Device.js.html#sunlight-1-line-722">line 722</a>
|
1035 | </li>
|
1036 | </ul>
|
1037 | </dd>
|
1038 |
|
1039 |
|
1040 |
|
1041 |
|
1042 |
|
1043 |
|
1044 |
|
1045 | <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
|
1046 | <dd class="tag-todo">
|
1047 | <ul>
|
1048 | <li>Normalize the values without gravity too (accelerometerData.acceleration.x, accelerometerData.acceleration.y, accelerometerData.acceleration.z) if possible (needs gyroscope probably) and maybe more properties.</li>
|
1049 | </ul>
|
1050 | </dd>
|
1051 |
|
1052 | </dl>
|
1053 |
|
1054 |
|
1055 |
|
1056 |
|
1057 |
|
1058 |
|
1059 |
|
1060 |
|
1061 |
|
1062 |
|
1063 |
|
1064 |
|
1065 |
|
1066 | <h5>Returns:</h5>
|
1067 |
|
1068 |
|
1069 | <div class="param-desc">
|
1070 | <p>Returns the given acceleration object again but normalized (if possible).</p>
|
1071 | </div>
|
1072 |
|
1073 |
|
1074 |
|
1075 | <dl>
|
1076 | <dt>
|
1077 | Type
|
1078 | </dt>
|
1079 | <dd>
|
1080 |
|
1081 | <span class="param-type">Event</span>
|
1082 |
|
1083 |
|
1084 |
|
1085 | </dd>
|
1086 | </dl>
|
1087 |
|
1088 |
|
1089 |
|
1090 |
|
1091 |
|
1092 | </dd>
|
1093 |
|
1094 |
|
1095 |
|
1096 | <hr>
|
1097 | <dt>
|
1098 | <h4 class="name" id=".cordova_isAccelerationSupported"><span class="type-signature"><static> </span>cordova_isAccelerationSupported<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
|
1099 |
|
1100 |
|
1101 | </dt>
|
1102 | <dd>
|
1103 |
|
1104 |
|
1105 | <div class="description">
|
1106 | <p>Tells whether the <a href="https://github.com/apache/cordova-plugin-device-motion">Apache Cordova's Device Motion plugin</a> is available or not.</p>
|
1107 | </div>
|
1108 |
|
1109 |
|
1110 |
|
1111 |
|
1112 |
|
1113 |
|
1114 |
|
1115 |
|
1116 |
|
1117 |
|
1118 | <dl class="details">
|
1119 |
|
1120 |
|
1121 |
|
1122 |
|
1123 |
|
1124 |
|
1125 |
|
1126 |
|
1127 |
|
1128 |
|
1129 |
|
1130 |
|
1131 |
|
1132 |
|
1133 |
|
1134 |
|
1135 |
|
1136 |
|
1137 |
|
1138 |
|
1139 |
|
1140 |
|
1141 |
|
1142 |
|
1143 |
|
1144 |
|
1145 |
|
1146 |
|
1147 |
|
1148 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
1149 | <dd class="tag-source">
|
1150 | <ul class="dummy">
|
1151 | <li>
|
1152 | <a href="CrossBase_device_CB_Device.js.html">CrossBase/device/CB_Device.js</a>,
|
1153 | <a href="CrossBase_device_CB_Device.js.html#sunlight-1-line-648">line 648</a>
|
1154 | </li>
|
1155 | </ul>
|
1156 | </dd>
|
1157 |
|
1158 |
|
1159 |
|
1160 |
|
1161 |
|
1162 |
|
1163 |
|
1164 | </dl>
|
1165 |
|
1166 |
|
1167 |
|
1168 |
|
1169 |
|
1170 |
|
1171 |
|
1172 |
|
1173 |
|
1174 |
|
1175 |
|
1176 |
|
1177 |
|
1178 | <h5>Returns:</h5>
|
1179 |
|
1180 |
|
1181 |
|
1182 |
|
1183 | <dl>
|
1184 | <dt>
|
1185 | Type
|
1186 | </dt>
|
1187 | <dd>
|
1188 |
|
1189 | <span class="param-type">boolean</span>
|
1190 |
|
1191 |
|
1192 |
|
1193 | </dd>
|
1194 | </dl>
|
1195 |
|
1196 |
|
1197 |
|
1198 |
|
1199 |
|
1200 | </dd>
|
1201 |
|
1202 |
|
1203 |
|
1204 | <hr>
|
1205 | <dt>
|
1206 | <h4 class="name" id=".isSupported"><span class="type-signature"><static> </span>isSupported<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
|
1207 |
|
1208 |
|
1209 | </dt>
|
1210 | <dd>
|
1211 |
|
1212 |
|
1213 | <div class="description">
|
1214 | <p>Tells whether the <a href="https://developer.mozilla.org/docs/Web/API/DeviceMotionEvent">Device Motion Event</a> (used by the <a href="https://developer.mozilla.org/docs/Web/API/Detecting_device_orientation">Device Orientation API</a> or compatible one) is supported or not.</p>
|
1215 | </div>
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 |
|
1226 | <dl class="details">
|
1227 |
|
1228 |
|
1229 |
|
1230 |
|
1231 |
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 |
|
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 |
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 |
|
1249 |
|
1250 |
|
1251 |
|
1252 |
|
1253 |
|
1254 |
|
1255 |
|
1256 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
1257 | <dd class="tag-source">
|
1258 | <ul class="dummy">
|
1259 | <li>
|
1260 | <a href="CrossBase_device_CB_Device.js.html">CrossBase/device/CB_Device.js</a>,
|
1261 | <a href="CrossBase_device_CB_Device.js.html#sunlight-1-line-622">line 622</a>
|
1262 | </li>
|
1263 | </ul>
|
1264 | </dd>
|
1265 |
|
1266 |
|
1267 |
|
1268 |
|
1269 |
|
1270 |
|
1271 |
|
1272 | </dl>
|
1273 |
|
1274 |
|
1275 |
|
1276 |
|
1277 |
|
1278 |
|
1279 |
|
1280 |
|
1281 |
|
1282 |
|
1283 |
|
1284 |
|
1285 |
|
1286 | <h5>Returns:</h5>
|
1287 |
|
1288 |
|
1289 |
|
1290 |
|
1291 | <dl>
|
1292 | <dt>
|
1293 | Type
|
1294 | </dt>
|
1295 | <dd>
|
1296 |
|
1297 | <span class="param-type">boolean</span>
|
1298 |
|
1299 |
|
1300 |
|
1301 | </dd>
|
1302 | </dl>
|
1303 |
|
1304 |
|
1305 |
|
1306 |
|
1307 |
|
1308 | </dd>
|
1309 |
|
1310 |
|
1311 |
|
1312 | <hr>
|
1313 | <dt>
|
1314 | <h4 class="name" id=".onChange"><span class="type-signature"><static> </span>onChange<span class="signature">(eventFunction [, keepOldFunction] [, useCapture])</span><span class="type-signature"> → {undefined|false}</span></h4>
|
1315 |
|
1316 |
|
1317 | </dt>
|
1318 | <dd>
|
1319 |
|
1320 |
|
1321 | <div class="description">
|
1322 | <p>Sets a function to execute for the <a href="https://developer.mozilla.org/docs/Web/API/DeviceMotionEvent">Device Motion Event</a> (used by the <a href="https://developer.mozilla.org/docs/Web/API/Detecting_device_orientation">Device Orientation API</a> or compatible one) or removes it.</p>
|
1323 | </div>
|
1324 |
|
1325 |
|
1326 |
|
1327 |
|
1328 |
|
1329 |
|
1330 |
|
1331 |
|
1332 | <h5>Parameters:</h5>
|
1333 |
|
1334 |
|
1335 | <table class="params table table-striped">
|
1336 | <thead>
|
1337 | <tr>
|
1338 |
|
1339 | <th style="width:12%; min-width:110px;">Name</th>
|
1340 |
|
1341 |
|
1342 | <th style="width:12%; min-width:110px;">Type</th>
|
1343 |
|
1344 |
|
1345 | <th style="width:12%; min-width:110px;">Argument</th>
|
1346 |
|
1347 |
|
1348 |
|
1349 | <th style="width:12%; min-width:110px;">Default</th>
|
1350 |
|
1351 |
|
1352 | <th class="last" style="min-width:310px;">Description</th>
|
1353 | </tr>
|
1354 | </thead>
|
1355 |
|
1356 | <tbody>
|
1357 |
|
1358 |
|
1359 | <tr>
|
1360 |
|
1361 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>eventFunction</code></td>
|
1362 |
|
1363 |
|
1364 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1365 |
|
1366 |
|
1367 | <span class="param-type">function</span>
|
1368 | |
|
1369 |
|
1370 | <span class="param-type">null</span>
|
1371 |
|
1372 |
|
1373 |
|
1374 |
|
1375 | </td>
|
1376 |
|
1377 |
|
1378 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1379 |
|
1380 |
|
1381 |
|
1382 |
|
1383 |
|
1384 | </td>
|
1385 |
|
1386 |
|
1387 |
|
1388 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1389 |
|
1390 | </td>
|
1391 |
|
1392 |
|
1393 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The function that will be called when the event is fired. Following the same rules as in <a href="https://developer.mozilla.org/docs/Web/API/DeviceMotionEvent">https://developer.mozilla.org/docs/Web/API/DeviceMotionEvent</a>. If a null value is used, the event will be removed.</p></td>
|
1394 | </tr>
|
1395 |
|
1396 |
|
1397 |
|
1398 | <tr>
|
1399 |
|
1400 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>keepOldFunction</code></td>
|
1401 |
|
1402 |
|
1403 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1404 |
|
1405 |
|
1406 | <span class="param-type">boolean</span>
|
1407 |
|
1408 |
|
1409 |
|
1410 |
|
1411 | </td>
|
1412 |
|
1413 |
|
1414 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1415 |
|
1416 | <optional><br>
|
1417 |
|
1418 |
|
1419 |
|
1420 |
|
1421 |
|
1422 | </td>
|
1423 |
|
1424 |
|
1425 |
|
1426 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1427 |
|
1428 | true
|
1429 |
|
1430 | </td>
|
1431 |
|
1432 |
|
1433 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Defines whether we want to keep any possible previous event listener or not.</p></td>
|
1434 | </tr>
|
1435 |
|
1436 |
|
1437 |
|
1438 | <tr>
|
1439 |
|
1440 | <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>useCapture</code></td>
|
1441 |
|
1442 |
|
1443 | <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1444 |
|
1445 |
|
1446 | <span class="param-type">float</span>
|
1447 |
|
1448 |
|
1449 |
|
1450 |
|
1451 | </td>
|
1452 |
|
1453 |
|
1454 | <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1455 |
|
1456 | <optional><br>
|
1457 |
|
1458 |
|
1459 |
|
1460 |
|
1461 |
|
1462 | </td>
|
1463 |
|
1464 |
|
1465 |
|
1466 | <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
|
1467 |
|
1468 | false
|
1469 |
|
1470 | </td>
|
1471 |
|
1472 |
|
1473 | <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Defines whether the event we want to add will use capture or not. This parameter will be effective only if the current client supports the <a href="https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener">addEventListener</a> method and will be used as its third parameter.</p></td>
|
1474 | </tr>
|
1475 |
|
1476 |
|
1477 | </tbody>
|
1478 | </table>
|
1479 |
|
1480 |
|
1481 |
|
1482 |
|
1483 | <dl class="details">
|
1484 |
|
1485 |
|
1486 |
|
1487 |
|
1488 |
|
1489 |
|
1490 |
|
1491 |
|
1492 |
|
1493 |
|
1494 |
|
1495 |
|
1496 |
|
1497 |
|
1498 |
|
1499 |
|
1500 |
|
1501 |
|
1502 |
|
1503 |
|
1504 |
|
1505 |
|
1506 |
|
1507 |
|
1508 |
|
1509 |
|
1510 |
|
1511 |
|
1512 |
|
1513 | <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
1514 | <dd class="tag-source">
|
1515 | <ul class="dummy">
|
1516 | <li>
|
1517 | <a href="CrossBase_device_CB_Device.js.html">CrossBase/device/CB_Device.js</a>,
|
1518 | <a href="CrossBase_device_CB_Device.js.html#sunlight-1-line-636">line 636</a>
|
1519 | </li>
|
1520 | </ul>
|
1521 | </dd>
|
1522 |
|
1523 |
|
1524 |
|
1525 |
|
1526 |
|
1527 |
|
1528 |
|
1529 | </dl>
|
1530 |
|
1531 |
|
1532 |
|
1533 |
|
1534 |
|
1535 |
|
1536 |
|
1537 |
|
1538 |
|
1539 |
|
1540 |
|
1541 |
|
1542 |
|
1543 | <h5>Returns:</h5>
|
1544 |
|
1545 |
|
1546 | <div class="param-desc">
|
1547 | <p>Returns false in the case that the <a href="https://developer.mozilla.org/docs/Web/API/DeviceMotionEvent">Device Motion Event</a> is not supported or undefined otherwise.</p>
|
1548 | </div>
|
1549 |
|
1550 |
|
1551 |
|
1552 | <dl>
|
1553 | <dt>
|
1554 | Type
|
1555 | </dt>
|
1556 | <dd>
|
1557 |
|
1558 | <span class="param-type">undefined</span>
|
1559 | |
|
1560 |
|
1561 | <span class="param-type">false</span>
|
1562 |
|
1563 |
|
1564 |
|
1565 | </dd>
|
1566 | </dl>
|
1567 |
|
1568 |
|
1569 |
|
1570 |
|
1571 |
|
1572 | </dd>
|
1573 |
|
1574 | </dl>
|
1575 |
|
1576 |
|
1577 |
|
1578 |
|
1579 |
|
1580 | </article>
|
1581 |
|
1582 | </section>
|
1583 |
|
1584 |
|
1585 |
|
1586 |
|
1587 | </div>
|
1588 | </div>
|
1589 |
|
1590 | <div class="clearfix"></div>
|
1591 |
|
1592 |
|
1593 | <div class="col-md-3">
|
1594 | <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
|
1595 | </div>
|
1596 |
|
1597 |
|
1598 | </div>
|
1599 | </div>
|
1600 |
|
1601 |
|
1602 | <div class="modal fade" id="searchResults">
|
1603 | <div class="modal-dialog">
|
1604 | <div class="modal-content">
|
1605 | <div class="modal-header">
|
1606 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
1607 | <h4 class="modal-title">Search results</h4>
|
1608 | </div>
|
1609 | <div class="modal-body"></div>
|
1610 | <div class="modal-footer">
|
1611 | <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
1612 | </div>
|
1613 | </div>
|
1614 | </div>
|
1615 | </div>
|
1616 |
|
1617 |
|
1618 | <footer>
|
1619 |
|
1620 |
|
1621 | <span class="copyright">
|
1622 | <a href="printable/" target="_blank">See a more printer-friendly version</a><hr /><span style="color:#000000">© <address style="display:inline; font-style:normal;"><a href="https://crossbrowdy.com/" target="_blank">CrossBrowdy</a> API documentation</address> by <a href="https://joanalbamaldonado.com/" target="_blank">Joan Alba Maldonado</a> - <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International</a><br />DocStrap Copyright © 2012-2015 The contributors to the JSDoc3 and DocStrap projects.</span>
|
1623 | </span>
|
1624 |
|
1625 | <span class="jsdoc-message">
|
1626 | Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a>
|
1627 |
|
1628 | on Wed Mar 22nd 2023
|
1629 |
|
1630 | using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
1631 | </span>
|
1632 | </footer>
|
1633 |
|
1634 | <script src="scripts/docstrap.lib.js"></script>
|
1635 | <script src="scripts/toc.js"></script>
|
1636 |
|
1637 | <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
|
1638 |
|
1639 |
|
1640 | <script>
|
1641 | $( function () {
|
1642 | $( "[id*='$']" ).each( function () {
|
1643 | var $this = $( this );
|
1644 |
|
1645 | $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
|
1646 | } );
|
1647 |
|
1648 | $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
|
1649 | var $this = $( this );
|
1650 |
|
1651 | var example = $this.find( "code" );
|
1652 | exampleText = example.html();
|
1653 | var lang = /{@lang (.*?)}/.exec( exampleText );
|
1654 | if ( lang && lang[1] ) {
|
1655 | exampleText = exampleText.replace( lang[0], "" );
|
1656 | example.html( exampleText );
|
1657 | lang = lang[1];
|
1658 | } else {
|
1659 | var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
|
1660 | lang = langClassMatch ? langClassMatch[1] : "javascript";
|
1661 | }
|
1662 |
|
1663 | if ( lang ) {
|
1664 |
|
1665 | $this
|
1666 | .addClass( "sunlight-highlight-" + lang )
|
1667 | .addClass( "linenums" )
|
1668 | .html( example.html() );
|
1669 |
|
1670 | }
|
1671 | } );
|
1672 |
|
1673 | Sunlight.highlightAll( {
|
1674 | lineNumbers : true,
|
1675 | showMenu : true,
|
1676 | enableDoclinks : true
|
1677 | } );
|
1678 |
|
1679 | $.catchAnchorLinks( {
|
1680 | navbarOffset: 10
|
1681 | } );
|
1682 | $( "#toc" ).toc( {
|
1683 | anchorName : function ( i, heading, prefix ) {
|
1684 | return $( heading ).attr( "id" ) || ( prefix + i );
|
1685 | },
|
1686 | selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
|
1687 | showAndHide : false,
|
1688 | smoothScrolling: true
|
1689 | } );
|
1690 |
|
1691 | $( "#main span[id^='toc']" ).addClass( "toc-shim" );
|
1692 | $( '.dropdown-toggle' ).dropdown();
|
1693 |
|
1694 | $( "table" ).each( function () {
|
1695 | var $this = $( this );
|
1696 | $this.addClass('table');
|
1697 | } );
|
1698 |
|
1699 | } );
|
1700 | </script>
|
1701 |
|
1702 |
|
1703 |
|
1704 |
|
1705 |
|
1706 | <script>
|
1707 | $( function () {
|
1708 | $( '#main' ).localScroll( {
|
1709 | offset : { top : 60 }
|
1710 | } );
|
1711 | $( "dt.name" ).each( function () {
|
1712 | var $this = $( this ).find("h4");
|
1713 | var icon = $( "<i/>" ).addClass( "icon-plus-sign" ).addClass( "pull-right" ).addClass( "icon-white" );
|
1714 | var dt = $(this);
|
1715 | var children = dt.next( "dd" );
|
1716 |
|
1717 | dt.prepend( icon ).css( {cursor : "pointer"} );
|
1718 | dt.addClass( "member-collapsed" ).addClass( "member" );
|
1719 |
|
1720 |
|
1721 | children.hide();
|
1722 |
|
1723 | dt.children().on( "click", function () {
|
1724 | children = dt.next( "dd" );
|
1725 | children.slideToggle( "fast", function () {
|
1726 |
|
1727 | if ( children.is( ":visible" ) ) {
|
1728 | icon.addClass( "icon-minus-sign" ).removeClass( "icon-plus-sign" ).removeClass( "icon-white" );
|
1729 | dt.addClass( "member-open" ).animate( "member-collapsed" );
|
1730 | } else {
|
1731 | icon.addClass( "icon-plus-sign" ).removeClass( "icon-minus-sign" ).addClass( "icon-white" );
|
1732 | dt.addClass( "member-collapsed" ).removeClass( "member-open" );
|
1733 | }
|
1734 | } );
|
1735 | } );
|
1736 |
|
1737 | } );
|
1738 | } );
|
1739 | </script>
|
1740 |
|
1741 |
|
1742 |
|
1743 |
|
1744 |
|
1745 |
|
1746 | <script type="text/javascript">
|
1747 | $(document).ready(function() {
|
1748 | SearcherDisplay.init();
|
1749 | });
|
1750 | </script>
|
1751 |
|
1752 |
|
1753 | </body>
|
1754 | </html> |
\ | No newline at end of file |