@galacean/effects-plugin-orientation-transformer 2.0.0-alpha.8 → 2.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,14 +3,34 @@
3
3
  * Description: Galacean Effects player orientation transformer plugin
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,意绮
6
- * Version: v2.0.0-alpha.8
6
+ * Version: v2.0.0-beta.0
7
7
  */
8
8
 
9
9
  'use strict';
10
10
 
11
11
  Object.defineProperty(exports, '__esModule', { value: true });
12
12
 
13
- var effects = require('@galacean/effects');
13
+ var EFFECTS = require('@galacean/effects');
14
+
15
+ function _interopNamespace(e) {
16
+ if (e && e.__esModule) return e;
17
+ var n = Object.create(null);
18
+ if (e) {
19
+ Object.keys(e).forEach(function (k) {
20
+ if (k !== 'default') {
21
+ var d = Object.getOwnPropertyDescriptor(e, k);
22
+ Object.defineProperty(n, k, d.get ? d : {
23
+ enumerable: true,
24
+ get: function () { return e[k]; }
25
+ });
26
+ }
27
+ });
28
+ }
29
+ n["default"] = e;
30
+ return Object.freeze(n);
31
+ }
32
+
33
+ var EFFECTS__namespace = /*#__PURE__*/_interopNamespace(EFFECTS);
14
34
 
15
35
  function _set_prototype_of(o, p) {
16
36
  _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
@@ -34,75 +54,6 @@ function _inherits(subClass, superClass) {
34
54
  if (superClass) _set_prototype_of(subClass, superClass);
35
55
  }
36
56
 
37
- var OrientationComponent = /*#__PURE__*/ function(ItemBehaviour) {
38
- _inherits(OrientationComponent, ItemBehaviour);
39
- function OrientationComponent() {
40
- return ItemBehaviour.apply(this, arguments);
41
- }
42
- var _proto = OrientationComponent.prototype;
43
- _proto.fromData = function fromData(data) {
44
- ItemBehaviour.prototype.fromData.call(this, data);
45
- var targets = data.content.options.targets;
46
- if (targets) {
47
- this.targets = targets.map(function(t) {
48
- return {
49
- name: t.name,
50
- xMin: +t.xMin || 0,
51
- yMin: +t.yMin || 0,
52
- xMax: +t.xMax || 0,
53
- yMax: +t.yMax || 0,
54
- vMin: +t.vMin || 0,
55
- hMin: +t.hMin || 0,
56
- vMax: +t.vMax || 0,
57
- hMax: +t.hMax || 0
58
- };
59
- });
60
- }
61
- };
62
- _proto.start = function start() {
63
- var _this_item_composition;
64
- var transformer = (_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.loaderData.deviceTransformer;
65
- if (transformer) {
66
- var _this_targets;
67
- (_this_targets = this.targets) == null ? void 0 : _this_targets.forEach(function(target) {
68
- return transformer.addTarget(target);
69
- });
70
- transformer.initComposition();
71
- }
72
- };
73
- _proto.update = function update(dt) {
74
- var _this_item_composition;
75
- var transformer = (_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.loaderData.deviceTransformer;
76
- if (transformer) {
77
- transformer.updateOrientation();
78
- }
79
- };
80
- _proto.onDestroy = function onDestroy() {
81
- var _this = this;
82
- var _this_targets;
83
- (_this_targets = this.targets) == null ? void 0 : _this_targets.forEach(function(target) {
84
- var _this_item_composition_loaderData_deviceTransformer, _this_item_composition;
85
- return (_this_item_composition = _this.item.composition) == null ? void 0 : (_this_item_composition_loaderData_deviceTransformer = _this_item_composition.loaderData.deviceTransformer) == null ? void 0 : _this_item_composition_loaderData_deviceTransformer.removeTarget(target.name);
86
- });
87
- };
88
- return OrientationComponent;
89
- }(effects.ItemBehaviour);
90
-
91
- /**
92
- * 水平旋转变化起始角(手机处于改角度时无变化)
93
- */ var VERTICAL_INIT_DEGREE = 45;
94
- var TransformVFXItem = /*#__PURE__*/ function(VFXItem) {
95
- _inherits(TransformVFXItem, VFXItem);
96
- function TransformVFXItem(engine, props) {
97
- var _this;
98
- _this = VFXItem.call(this, engine, props) || this;
99
- var component = _this.addComponent(OrientationComponent);
100
- component.fromData(props);
101
- return _this;
102
- }
103
- return TransformVFXItem;
104
- }(effects.VFXItem);
105
-
106
57
  var CompositionTransformerAcceler = /*#__PURE__*/ function() {
107
58
  function CompositionTransformerAcceler(composition) {
108
59
  this.composition = composition;
@@ -121,10 +72,12 @@ var CompositionTransformerAcceler = /*#__PURE__*/ function() {
121
72
  }
122
73
  var _proto = CompositionTransformerAcceler.prototype;
123
74
  _proto.update = function update(param) {
124
- var x = param.x, y = param.y;
75
+ var x = param.x, y = param.y, beta = param.beta, gamma = param.gamma;
125
76
  this.currentEvent = {
126
77
  x: x,
127
- y: y
78
+ y: y,
79
+ beta: beta,
80
+ gamma: gamma
128
81
  };
129
82
  };
130
83
  _proto.updateOrientation = function updateOrientation() {
@@ -168,7 +121,7 @@ var CompositionTransformerAcceler = /*#__PURE__*/ function() {
168
121
  delete this.records[name];
169
122
  };
170
123
  _proto.moveLayer = function moveLayer(name, param) {
171
- var x = param.x, y = param.y;
124
+ var x = param.x, y = param.y, b = param.beta, g = param.gamma;
172
125
  var _this_records_name;
173
126
  var layer = (_this_records_name = this.records[name]) == null ? void 0 : _this_records_name.item;
174
127
  if (layer) {
@@ -179,12 +132,12 @@ var CompositionTransformerAcceler = /*#__PURE__*/ function() {
179
132
  if (target) {
180
133
  var _layer_transform, _layer_transform1;
181
134
  var position = [
182
- initPosition[0] + 1.2 * mapRange((beta - this.gammaRange[0]) / (this.gammaRange[1] - this.gammaRange[0]), target.xMin, target.xMax),
183
- initPosition[1] + 1.2 * mapRange((gamma - this.betaRange[0]) / (this.betaRange[1] - this.betaRange[0]), target.yMin, target.yMax),
135
+ initPosition[0] + 1.2 * mapRange(normalize(beta, this.gammaRange[0], this.gammaRange[1]), target.xMin, target.xMax),
136
+ initPosition[1] + 1.2 * mapRange(normalize(gamma, this.betaRange[0], this.betaRange[1]), target.yMin, target.yMax),
184
137
  initPosition[2]
185
138
  ];
186
- var br = (clamp(x * 2, this.betaRange) - this.betaRange[0]) / (this.betaRange[1] - this.betaRange[0]);
187
- var gr = (clamp(y * 2 - VERTICAL_INIT_DEGREE, this.gammaRange) - this.gammaRange[0]) / (this.gammaRange[1] - this.gammaRange[0]);
139
+ var br = normalize(clamp(g * 0.8, this.gammaRange), this.gammaRange[0], this.gammaRange[1]);
140
+ var gr = normalize(clamp(b * 0.8, this.betaRange), this.betaRange[0], this.betaRange[1]);
188
141
  var rotation = [
189
142
  initRotation[0] + mapRange(gr, target.hMin, target.hMax),
190
143
  initRotation[1] + mapRange(br, target.vMin, target.vMax),
@@ -210,9 +163,19 @@ function clamp(x, range) {
210
163
  function mapRange(t, min, max) {
211
164
  return min + (max - min) * t;
212
165
  }
166
+ function normalize(a, min, max) {
167
+ return (a - min) / (max - min);
168
+ }
213
169
 
214
- function getObjectType(obj) {
215
- return Object.prototype.toString.call(obj);
170
+ function _extends() {
171
+ _extends = Object.assign || function assign(target) {
172
+ for(var i = 1; i < arguments.length; i++){
173
+ var source = arguments[i];
174
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
175
+ }
176
+ return target;
177
+ };
178
+ return _extends.apply(this, arguments);
216
179
  }
217
180
 
218
181
  /**
@@ -224,7 +187,7 @@ function getObjectType(obj) {
224
187
  var flagAlpha = true;
225
188
  var flagBeta = true;
226
189
  var flagGamma = true;
227
- if (getObjectType(validRange.alpha) === "[object Array]" && validRange.alpha.length >= 2) {
190
+ if (EFFECTS.isArray(validRange.alpha) && validRange.alpha.length >= 2) {
228
191
  var referAlphaA = angleObj.alpha + validRange.alpha[0];
229
192
  var referAlphaB = angleObj.alpha + validRange.alpha[1];
230
193
  referAlphaA = referAlphaA < 0 ? referAlphaA + 360 : referAlphaA;
@@ -235,72 +198,15 @@ function getObjectType(obj) {
235
198
  flagAlpha = angleObj.alpha > referAlphaA || angleObj.alpha < referAlphaB;
236
199
  }
237
200
  }
238
- if (getObjectType(validRange.beta) === "[object Array]" && validRange.beta.length >= 2) {
201
+ if (EFFECTS.isArray(validRange.beta) && validRange.beta.length >= 2) {
239
202
  flagBeta = angleObj.beta >= validRange.beta[0] && angleObj.beta <= validRange.beta[1];
240
203
  }
241
- if (getObjectType(validRange.gamma) === "[object Array]" && validRange.gamma.length >= 2) {
204
+ if (EFFECTS.isArray(validRange.gamma) && validRange.gamma.length >= 2) {
242
205
  flagGamma = angleObj.gamma >= validRange.gamma[0] && angleObj.gamma <= validRange.gamma[1];
243
206
  }
244
207
  return flagAlpha && flagBeta && flagGamma;
245
208
  }
246
209
 
247
- function _extends() {
248
- _extends = Object.assign || function assign(target) {
249
- for(var i = 1; i < arguments.length; i++){
250
- var source = arguments[i];
251
- for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
252
- }
253
- return target;
254
- };
255
- return _extends.apply(this, arguments);
256
- }
257
-
258
- function deepMerge(target, args) {
259
- if (!effects.isObject(target) && !effects.isArray(target)) {
260
- return target;
261
- }
262
- var result = effects.isArray(target) ? [].concat(target) : _extends({}, target);
263
- var length = arguments.length;
264
- for(var index = 1; index < length; index++){
265
- var source = arguments[index] || {};
266
- if (effects.isObject(source)) {
267
- var prop = void 0;
268
- for(prop in source){
269
- if (source.hasOwnProperty(prop)) {
270
- if (effects.isObject(result[prop]) && effects.isObject(source[prop])) {
271
- result[prop] = deepMerge(result[prop], source[prop]);
272
- } else if (effects.isObject(source[prop])) {
273
- result[prop] = deepMerge(source[prop]);
274
- } else if (effects.isArray(source[prop])) {
275
- result[prop] = deepMerge(source[prop]);
276
- } else {
277
- result[prop] = source[prop];
278
- }
279
- }
280
- }
281
- for(prop in result){
282
- if (effects.isObject(result[prop]) && result.hasOwnProperty(prop) && !source.hasOwnProperty(prop)) {
283
- result[prop] = deepMerge(result[prop]);
284
- }
285
- }
286
- }
287
- }
288
- if (length === 1) {
289
- for(var prop1 in result){
290
- if (effects.isObject(result[prop1]) && result.hasOwnProperty(prop1)) {
291
- result[prop1] = deepMerge(result[prop1]);
292
- }
293
- }
294
- }
295
- return result;
296
- }
297
-
298
- function isIOS() {
299
- var str = navigator.userAgent.toLowerCase();
300
- var ver = str.match(/cpu (iphone )?os (.*?) like mac os/);
301
- return ver ? parseInt(ver[2], 10) : 0;
302
- }
303
-
304
210
  /**
305
211
  * 稳定区间
306
212
  */ var STABLE_RANGE = 3;
@@ -414,7 +320,7 @@ function getLinearRegressionFixedVal(valuePool) {
414
320
  return fx(valuePool.length / 2);
415
321
  }
416
322
 
417
- var useJSBridge = isIOS() && typeof window.AlipayJSBridge !== "undefined";
323
+ var useJSBridge = EFFECTS.isIOSByUA() && typeof window.AlipayJSBridge !== "undefined";
418
324
  var useWindVane = typeof window.WindVane !== "undefined";
419
325
  // 默认参数
420
326
  var defaultOptions = {
@@ -451,7 +357,11 @@ var DeviceOrientation = /*#__PURE__*/ function() {
451
357
  z: 0
452
358
  };
453
359
  this.stoped = false;
454
- this.options = deepMerge(defaultOptions, options);
360
+ // 模拟简单的 deep merge
361
+ var validRange = _extends({}, defaultOptions.validRange, options.validRange);
362
+ var mergeOptions = _extends({}, defaultOptions, options);
363
+ mergeOptions.validRange = validRange;
364
+ this.options = mergeOptions;
455
365
  var stableRange = this.options.stableRange;
456
366
  this.filterX = new Filtering({
457
367
  stableRange: stableRange
@@ -472,13 +382,11 @@ var DeviceOrientation = /*#__PURE__*/ function() {
472
382
  }
473
383
  var timefragment = 0; // 时间片计时
474
384
  var nowts = 0; // 当前时间
475
- var referGamma = 0; // 初始化角度,作为单独一个用户的空间旋转的参照
476
- var referBeta = 0;
385
+ // 初始化角度,作为单独一个用户的空间旋转的参照
386
+ var referGamma = NaN, referBeta = NaN;
477
387
  var alpha;
478
388
  var beta;
479
389
  var gamma;
480
- var gammaFixed;
481
- var betaFixed;
482
390
  var isInValidDegRange;
483
391
  var x; // 最终输出的 x
484
392
  var y; // 最终输出的 y
@@ -486,26 +394,26 @@ var DeviceOrientation = /*#__PURE__*/ function() {
486
394
  if (_this.stoped) {
487
395
  return;
488
396
  }
489
- alpha = e.alpha; // 垂直于屏幕的轴 0 ~ 360
490
- beta = e.beta; // 横向 X 轴 -180 ~ 180
491
- gamma = e.gamma; // 纵向 Y 轴 -90 ~ 90
492
- if (!referBeta) {
493
- referBeta = beta || 0;
494
- }
495
- if (!referGamma) {
496
- referGamma = gamma || 0;
497
- }
498
- //
397
+ alpha = e.alpha || 0; // 垂直于屏幕的轴 0 ~ 360
398
+ beta = e.beta || 0; // 横向 X 轴 -180 ~ 180
399
+ gamma = e.gamma || 0; // 纵向 Y 轴 -90 ~ 90
499
400
  isInValidDegRange = angleLimit.call(_this, {
500
401
  alpha: alpha,
501
402
  beta: beta,
502
403
  gamma: gamma
503
404
  }, _this.options.validRange);
405
+ if (isNaN(referGamma)) {
406
+ referGamma = gamma;
407
+ _this.filterX.lastValue = gamma;
408
+ }
409
+ if (isNaN(referBeta)) {
410
+ referBeta = beta;
411
+ _this.filterY.lastValue = beta;
412
+ }
504
413
  if (isInValidDegRange) {
505
414
  // 最终结果值
506
415
  if (_this.options.X) {
507
- gammaFixed = gamma - referGamma;
508
- x = _this.options.relativeGamma ? gammaFixed : gamma;
416
+ x = _this.options.relativeGamma ? gamma - referGamma : gamma;
509
417
  x = _this.filterX.stableFix(x);
510
418
  x = _this.filterX.changeLimit(x);
511
419
  x = _this.filterX.linearRegressionMedian(+x);
@@ -513,9 +421,7 @@ var DeviceOrientation = /*#__PURE__*/ function() {
513
421
  x = 0;
514
422
  }
515
423
  if (_this.options.Y) {
516
- // beta 相对 referBeta 的角度
517
- betaFixed = beta - referBeta;
518
- y = _this.options.relativeBeta ? betaFixed : beta;
424
+ y = _this.options.relativeBeta ? beta - referBeta : beta;
519
425
  y = _this.filterY.stableFix(y);
520
426
  y = _this.filterY.changeLimit(y);
521
427
  y = _this.filterY.linearRegressionMedian(+y);
@@ -527,15 +433,15 @@ var DeviceOrientation = /*#__PURE__*/ function() {
527
433
  window.requestAnimationFrame(function() {
528
434
  callback(x, y, {
529
435
  alpha: alpha,
530
- beta: beta,
531
- gamma: gamma
436
+ beta: y - referBeta,
437
+ gamma: x - referGamma
532
438
  });
533
439
  });
534
440
  } else {
535
441
  callback(x, y, {
536
442
  alpha: alpha,
537
- beta: beta,
538
- gamma: gamma
443
+ beta: y - referBeta,
444
+ gamma: x - referGamma
539
445
  });
540
446
  }
541
447
  _this.lastX = x;
@@ -568,7 +474,7 @@ var DeviceOrientation = /*#__PURE__*/ function() {
568
474
  }
569
475
  };
570
476
  document.addEventListener("motion.gyro", this.watchListener, false);
571
- } else if (useJSBridge) {
477
+ } else if (useJSBridge && !EFFECTS.isMiniProgram()) {
572
478
  switchIOSEvent(true, this.options.interval / 1000);
573
479
  this.watchListener = function(e) {
574
480
  if (e && "data" in e) {
@@ -604,7 +510,7 @@ var DeviceOrientation = /*#__PURE__*/ function() {
604
510
  }
605
511
  };
606
512
  _proto.unWatch = function unWatch() {
607
- effects.assertExist(this.watchListener);
513
+ EFFECTS.assertExist(this.watchListener);
608
514
  if (useWindVane) {
609
515
  switchWindVane(false);
610
516
  document.removeEventListener("motion.gyro", this.watchListener);
@@ -651,9 +557,9 @@ function switchWindVane(open, interval) {
651
557
  frequency: interval
652
558
  };
653
559
  window.WindVane.call("WVMotion", "listenGyro", params, function(e) {
654
- console.info("call WVMotion success");
560
+ console.info("Call WVMotion success.");
655
561
  }, function(e) {
656
- console.error("call WVMotion failed:" + JSON.stringify(e));
562
+ console.error("Call WVMotion failed: " + JSON.stringify(e) + ".");
657
563
  });
658
564
  }
659
565
 
@@ -693,10 +599,13 @@ function switchWindVane(open, interval) {
693
599
  validRange: this.validRange,
694
600
  stableRange: 3
695
601
  });
696
- this.accelerMotion.watch(function(x, y) {
602
+ this.accelerMotion.watch(function(x, y, param) {
603
+ var beta = param.beta, gamma = param.gamma;
697
604
  var motion = {
698
605
  x: x,
699
- y: y
606
+ y: y,
607
+ beta: beta,
608
+ gamma: gamma
700
609
  };
701
610
  _this.dispatchMotion(motion);
702
611
  });
@@ -800,7 +709,7 @@ var OrientationPluginLoader = /*#__PURE__*/ function(AbstractPlugin) {
800
709
  this.unbindAccelerDocumentEvent();
801
710
  };
802
711
  return OrientationPluginLoader;
803
- }(effects.AbstractPlugin);
712
+ }(EFFECTS.AbstractPlugin);
804
713
  // 是否是手动关闭,如果是,那么 resume 时不要恢复
805
714
  var closeManually = false;
806
715
  /**
@@ -819,11 +728,83 @@ function openDeviceMotion() {
819
728
  getAdapter().connect();
820
729
  }
821
730
 
822
- effects.registerPlugin("orientation-transformer", OrientationPluginLoader, TransformVFXItem);
823
- var version = "2.0.0-alpha.8";
824
- effects.logger.info("plugin orientation transformer version: " + version);
731
+ function __decorate(decorators, target, key, desc) {
732
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
733
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
734
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
735
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
736
+ }
737
+ typeof SuppressedError === "function" ? SuppressedError : function _SuppressedError(error, suppressed, message) {
738
+ var e = new Error(message);
739
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
740
+ };
741
+
742
+ exports.OrientationComponent = /*#__PURE__*/ function(Behaviour) {
743
+ _inherits(OrientationComponent, Behaviour);
744
+ function OrientationComponent() {
745
+ return Behaviour.apply(this, arguments);
746
+ }
747
+ var _proto = OrientationComponent.prototype;
748
+ _proto.fromData = function fromData(data) {
749
+ Behaviour.prototype.fromData.call(this, data);
750
+ var targets = data.options.targets;
751
+ if (targets) {
752
+ this.targets = targets.map(function(t) {
753
+ return {
754
+ name: t.name,
755
+ xMin: +t.xMin || 0,
756
+ yMin: +t.yMin || 0,
757
+ xMax: +t.xMax || 0,
758
+ yMax: +t.yMax || 0,
759
+ vMin: +t.vMin || 0,
760
+ hMin: +t.hMin || 0,
761
+ vMax: +t.vMax || 0,
762
+ hMax: +t.hMax || 0
763
+ };
764
+ });
765
+ }
766
+ };
767
+ _proto.start = function start() {
768
+ var _this_item_composition;
769
+ var transformer = (_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.loaderData.deviceTransformer;
770
+ if (transformer) {
771
+ var _this_targets;
772
+ (_this_targets = this.targets) == null ? void 0 : _this_targets.forEach(function(target) {
773
+ return transformer.addTarget(target);
774
+ });
775
+ transformer.initComposition();
776
+ }
777
+ };
778
+ _proto.update = function update(dt) {
779
+ var _this_item_composition;
780
+ var transformer = (_this_item_composition = this.item.composition) == null ? void 0 : _this_item_composition.loaderData.deviceTransformer;
781
+ if (transformer) {
782
+ transformer.updateOrientation();
783
+ }
784
+ };
785
+ _proto.onDestroy = function onDestroy() {
786
+ var _this = this;
787
+ var _this_targets;
788
+ (_this_targets = this.targets) == null ? void 0 : _this_targets.forEach(function(target) {
789
+ var _this_item_composition_loaderData_deviceTransformer, _this_item_composition;
790
+ return (_this_item_composition = _this.item.composition) == null ? void 0 : (_this_item_composition_loaderData_deviceTransformer = _this_item_composition.loaderData.deviceTransformer) == null ? void 0 : _this_item_composition_loaderData_deviceTransformer.removeTarget(target.name);
791
+ });
792
+ };
793
+ return OrientationComponent;
794
+ }(EFFECTS.Behaviour);
795
+ exports.OrientationComponent = __decorate([
796
+ EFFECTS.effectsClass("OrientationComponent")
797
+ ], exports.OrientationComponent);
798
+
799
+ EFFECTS.registerPlugin("orientation-transformer", OrientationPluginLoader, EFFECTS.VFXItem);
800
+ var version = "2.0.0-beta.0";
801
+ EFFECTS.logger.info("Plugin orientation transformer version: " + version + ".");
802
+ if (version !== EFFECTS__namespace.version) {
803
+ console.error("注意:请统一 Orientation Transformer 插件与 Player 版本,不统一的版本混用会有不可预知的后果!", "\nAttention: Please ensure the Orientation Transformer plugin is synchronized with the Player version. Mixing and matching incompatible versions may result in unpredictable consequences!");
804
+ }
825
805
 
826
806
  exports.OrientationAdapterAcceler = OrientationAdapterAcceler;
807
+ exports.OrientationPluginLoader = OrientationPluginLoader;
827
808
  exports.closeDeviceMotion = closeDeviceMotion;
828
809
  exports.getAdapter = getAdapter;
829
810
  exports.openDeviceMotion = openDeviceMotion;