decord/source/1629_Sensor.js

95 lines
2.4 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 1629
2026-07-25 08:10:48 +00:00
// Function ID: 18224
2026-07-20 16:05:17 +00:00
// Name: Sensor
2026-07-23 10:11:24 +00:00
// Dependencies: [6, 7, 1607, 1619, 1590]
2026-07-20 16:05:17 +00:00
// Module 1629 (Sensor)
2026-07-23 10:11:24 +00:00
import _classCallCheck from "_classCallCheck";
import _defineProperties from "_defineProperties";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
export default (() => {
2026-07-20 16:05:17 +00:00
class Sensor {
constructor(arg0, arg1) {
2026-07-23 10:11:24 +00:00
tmp = outer1_2(this, Sensor);
2026-07-20 16:05:17 +00:00
this.listenersNumber = 0;
this.sensorId = null;
this.sensorType = arg0;
this.config = arg1;
2026-07-23 10:11:24 +00:00
if (arg0 === Sensor(outer1_1[2]).SensorType.ROTATION) {
2026-07-20 16:05:17 +00:00
tmp5 = Sensor;
2026-07-23 10:11:24 +00:00
tmp6 = outer1_1;
2026-07-20 16:05:17 +00:00
num2 = 3;
2026-07-23 10:11:24 +00:00
obj2 = Sensor(outer1_1[3]);
mutable = obj2.makeMutable({ qw: 0, qx: 0, qy: 0, qz: 0, yaw: 0, pitch: 0, roll: 0, interfaceOrientation: 0 });
2026-07-20 16:05:17 +00:00
} else {
tmp2 = Sensor;
2026-07-23 10:11:24 +00:00
tmp3 = outer1_1;
2026-07-20 16:05:17 +00:00
num = 3;
2026-07-23 10:11:24 +00:00
obj = Sensor(outer1_1[3]);
mutable = obj.makeMutable({ x: 0, y: 0, z: 0, interfaceOrientation: 0 });
2026-07-20 16:05:17 +00:00
}
this.data = mutable;
return;
}
}
let obj = {
key: "register",
value: function register(arg0) {
let config;
let sensorType;
const self = this;
({ config, sensorType } = this);
2026-07-23 10:11:24 +00:00
const ReanimatedModule = Sensor(outer1_1[4]).ReanimatedModule;
2026-07-20 16:05:17 +00:00
let num = -1;
if ("auto" !== config.interval) {
num = config.interval;
}
self.sensorId = ReanimatedModule.registerSensor(sensorType, num, config.iosReferenceFrame, arg0);
return -1 !== self.sensorId;
}
};
const items = [obj, , , , ];
obj = {
key: "isRunning",
value: function isRunning() {
let tmp = -1 !== this.sensorId;
if (tmp) {
tmp = null !== this.sensorId;
}
return tmp;
}
};
items[1] = obj;
obj = {
key: "isAvailable",
value: function isAvailable() {
return -1 !== this.sensorId;
}
};
items[2] = obj;
items[3] = {
key: "getSharedValue",
value: function getSharedValue() {
return this.data;
}
};
items[4] = {
key: "unregister",
value: function unregister() {
const self = this;
let tmp = null !== this.sensorId;
if (tmp) {
tmp = -1 !== self.sensorId;
}
if (tmp) {
2026-07-23 10:11:24 +00:00
const ReanimatedModule = Sensor(outer1_1[4]).ReanimatedModule;
2026-07-20 16:05:17 +00:00
ReanimatedModule.unregisterSensor(self.sensorId);
}
self.sensorId = null;
}
};
return callback(Sensor, items);
2026-07-23 10:11:24 +00:00
})();