@omnidotdev/rdk 0.2.0 → 0.2.1

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/build/index.js CHANGED
@@ -240,16 +240,16 @@ React keys must be passed directly to JSX without using spread:
240
240
  function z(u) {
241
241
  return typeof u == "object" && u !== null && u.$$typeof === gA;
242
242
  }
243
- var v = gE, gA = Symbol.for("react.transitional.element"), QA = Symbol.for("react.portal"), iA = Symbol.for("react.fragment"), hA = Symbol.for("react.strict_mode"), sA = Symbol.for("react.profiler"), AA = Symbol.for("react.consumer"), yA = Symbol.for("react.context"), NA = Symbol.for("react.forward_ref"), pA = Symbol.for("react.suspense"), XA = Symbol.for("react.suspense_list"), BI = Symbol.for("react.memo"), vA = Symbol.for("react.lazy"), wI = Symbol.for("react.activity"), WA = Symbol.for("react.client.reference"), zA = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, kA = Object.prototype.hasOwnProperty, CI = Array.isArray, _A = console.createTask ? console.createTask : function() {
243
+ var j = gE, gA = Symbol.for("react.transitional.element"), QA = Symbol.for("react.portal"), iA = Symbol.for("react.fragment"), hA = Symbol.for("react.strict_mode"), sA = Symbol.for("react.profiler"), AA = Symbol.for("react.consumer"), yA = Symbol.for("react.context"), NA = Symbol.for("react.forward_ref"), pA = Symbol.for("react.suspense"), XA = Symbol.for("react.suspense_list"), BI = Symbol.for("react.memo"), vA = Symbol.for("react.lazy"), wI = Symbol.for("react.activity"), WA = Symbol.for("react.client.reference"), zA = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, kA = Object.prototype.hasOwnProperty, CI = Array.isArray, _A = console.createTask ? console.createTask : function() {
244
244
  return null;
245
245
  };
246
- v = {
246
+ j = {
247
247
  react_stack_bottom_frame: function(u) {
248
248
  return u();
249
249
  }
250
250
  };
251
- var $A, uA = {}, FI = v.react_stack_bottom_frame.bind(
252
- v,
251
+ var $A, uA = {}, FI = j.react_stack_bottom_frame.bind(
252
+ j,
253
253
  k
254
254
  )(), sI = _A(w(k)), QI = {};
255
255
  Gg.Fragment = iA, Gg.jsx = function(u, oA, JA) {
@@ -290,7 +290,7 @@ const eQ = BE(null), Pg = () => {
290
290
  children: o
291
291
  }) => {
292
292
  const [r, w] = Xg([]), [N, k] = Xg(/* @__PURE__ */ new Set()), d = WI(/* @__PURE__ */ new Set()), { scene: J, camera: U, gl: q } = tQ(), f = vg(
293
- async (v, gA) => {
293
+ async (j, gA) => {
294
294
  try {
295
295
  if (gA) {
296
296
  const QA = /* @__PURE__ */ new Set([
@@ -303,25 +303,25 @@ const eQ = BE(null), Pg = () => {
303
303
  }
304
304
  d.current = QA, k(QA);
305
305
  }
306
- await v.init({
306
+ await j.init({
307
307
  scene: J,
308
308
  camera: U,
309
309
  renderer: q
310
- }), w((QA) => [...QA, v]);
310
+ }), w((QA) => [...QA, j]);
311
311
  } catch (QA) {
312
312
  throw console.error("[XRSessionProvider] Failed to register backend:", QA), QA;
313
313
  }
314
314
  },
315
315
  [J, U, q]
316
316
  ), O = vg(
317
- (v, gA) => {
317
+ (j, gA) => {
318
318
  gA && (d.current.delete(gA), k((QA) => {
319
319
  const iA = new Set(QA);
320
320
  return iA.delete(gA), iA;
321
321
  })), w((QA) => {
322
- const iA = QA.filter((hA) => hA !== v);
322
+ const iA = QA.filter((hA) => hA !== j);
323
323
  try {
324
- v.dispose?.();
324
+ j.dispose?.();
325
325
  } catch (hA) {
326
326
  console.error("[XRSessionProvider] Error disposing backend:", hA);
327
327
  }
@@ -331,9 +331,9 @@ const eQ = BE(null), Pg = () => {
331
331
  []
332
332
  );
333
333
  HB(() => {
334
- r.forEach((v) => {
334
+ r.forEach((j) => {
335
335
  try {
336
- v.update?.();
336
+ j.update?.();
337
337
  } catch (gA) {
338
338
  console.error("[XRSessionProvider] Backend update error:", gA);
339
339
  }
@@ -366,26 +366,26 @@ var rE = { 144: function(a, o, r) {
366
366
  U.exports = z = function() {
367
367
  return gA;
368
368
  }, U.exports.__esModule = !0, U.exports.default = U.exports;
369
- var v, gA = {}, QA = Object.prototype, iA = QA.hasOwnProperty, hA = Object.defineProperty || function(x, m, j) {
370
- x[m] = j.value;
369
+ var j, gA = {}, QA = Object.prototype, iA = QA.hasOwnProperty, hA = Object.defineProperty || function(x, m, v) {
370
+ x[m] = v.value;
371
371
  }, sA = typeof Symbol == "function" ? Symbol : {}, AA = sA.iterator || "@@iterator", yA = sA.asyncIterator || "@@asyncIterator", NA = sA.toStringTag || "@@toStringTag";
372
- function pA(x, m, j) {
373
- return Object.defineProperty(x, m, { value: j, enumerable: !0, configurable: !0, writable: !0 }), x[m];
372
+ function pA(x, m, v) {
373
+ return Object.defineProperty(x, m, { value: v, enumerable: !0, configurable: !0, writable: !0 }), x[m];
374
374
  }
375
375
  try {
376
376
  pA({}, "");
377
377
  } catch {
378
- pA = function(m, j, CA) {
379
- return m[j] = CA;
378
+ pA = function(m, v, CA) {
379
+ return m[v] = CA;
380
380
  };
381
381
  }
382
- function XA(x, m, j, CA) {
382
+ function XA(x, m, v, CA) {
383
383
  var IA = m && m.prototype instanceof CI ? m : CI, MA = Object.create(IA.prototype), dA = new lA(CA || []);
384
- return hA(MA, "_invoke", { value: JA(x, j, dA) }), MA;
384
+ return hA(MA, "_invoke", { value: JA(x, v, dA) }), MA;
385
385
  }
386
- function BI(x, m, j) {
386
+ function BI(x, m, v) {
387
387
  try {
388
- return { type: "normal", arg: x.call(m, j) };
388
+ return { type: "normal", arg: x.call(m, v) };
389
389
  } catch (CA) {
390
390
  return { type: "throw", arg: CA };
391
391
  }
@@ -407,24 +407,24 @@ var rE = { 144: function(a, o, r) {
407
407
  var QI = $A.prototype = CI.prototype = Object.create(uA);
408
408
  function u(x) {
409
409
  ["next", "throw", "return"].forEach((function(m) {
410
- pA(x, m, (function(j) {
411
- return this._invoke(m, j);
410
+ pA(x, m, (function(v) {
411
+ return this._invoke(m, v);
412
412
  }));
413
413
  }));
414
414
  }
415
415
  function oA(x, m) {
416
- function j(IA, MA, dA, AI) {
416
+ function v(IA, MA, dA, AI) {
417
417
  var jA = BI(x[IA], x, MA);
418
418
  if (jA.type !== "throw") {
419
419
  var YI = jA.arg, dI = YI.value;
420
420
  return dI && O(dI) == "object" && iA.call(dI, "__await") ? m.resolve(dI.__await).then((function(hI) {
421
- j("next", hI, dA, AI);
421
+ v("next", hI, dA, AI);
422
422
  }), (function(hI) {
423
- j("throw", hI, dA, AI);
423
+ v("throw", hI, dA, AI);
424
424
  })) : m.resolve(dI).then((function(hI) {
425
425
  YI.value = hI, dA(YI);
426
426
  }), (function(hI) {
427
- return j("throw", hI, dA, AI);
427
+ return v("throw", hI, dA, AI);
428
428
  }));
429
429
  }
430
430
  AI(jA.arg);
@@ -433,51 +433,51 @@ var rE = { 144: function(a, o, r) {
433
433
  hA(this, "_invoke", { value: function(IA, MA) {
434
434
  function dA() {
435
435
  return new m((function(AI, jA) {
436
- j(IA, MA, AI, jA);
436
+ v(IA, MA, AI, jA);
437
437
  }));
438
438
  }
439
439
  return CA = CA ? CA.then(dA, dA) : dA();
440
440
  } });
441
441
  }
442
- function JA(x, m, j) {
442
+ function JA(x, m, v) {
443
443
  var CA = vA;
444
444
  return function(IA, MA) {
445
445
  if (CA === WA) throw Error("Generator is already running");
446
446
  if (CA === zA) {
447
447
  if (IA === "throw") throw MA;
448
- return { value: v, done: !0 };
448
+ return { value: j, done: !0 };
449
449
  }
450
- for (j.method = IA, j.arg = MA; ; ) {
451
- var dA = j.delegate;
450
+ for (v.method = IA, v.arg = MA; ; ) {
451
+ var dA = v.delegate;
452
452
  if (dA) {
453
- var AI = YA(dA, j);
453
+ var AI = YA(dA, v);
454
454
  if (AI) {
455
455
  if (AI === kA) continue;
456
456
  return AI;
457
457
  }
458
458
  }
459
- if (j.method === "next") j.sent = j._sent = j.arg;
460
- else if (j.method === "throw") {
461
- if (CA === vA) throw CA = zA, j.arg;
462
- j.dispatchException(j.arg);
463
- } else j.method === "return" && j.abrupt("return", j.arg);
459
+ if (v.method === "next") v.sent = v._sent = v.arg;
460
+ else if (v.method === "throw") {
461
+ if (CA === vA) throw CA = zA, v.arg;
462
+ v.dispatchException(v.arg);
463
+ } else v.method === "return" && v.abrupt("return", v.arg);
464
464
  CA = WA;
465
- var jA = BI(x, m, j);
465
+ var jA = BI(x, m, v);
466
466
  if (jA.type === "normal") {
467
- if (CA = j.done ? zA : wI, jA.arg === kA) continue;
468
- return { value: jA.arg, done: j.done };
467
+ if (CA = v.done ? zA : wI, jA.arg === kA) continue;
468
+ return { value: jA.arg, done: v.done };
469
469
  }
470
- jA.type === "throw" && (CA = zA, j.method = "throw", j.arg = jA.arg);
470
+ jA.type === "throw" && (CA = zA, v.method = "throw", v.arg = jA.arg);
471
471
  }
472
472
  };
473
473
  }
474
474
  function YA(x, m) {
475
- var j = m.method, CA = x.iterator[j];
476
- if (CA === v) return m.delegate = null, j === "throw" && x.iterator.return && (m.method = "return", m.arg = v, YA(x, m), m.method === "throw") || j !== "return" && (m.method = "throw", m.arg = new TypeError("The iterator does not provide a '" + j + "' method")), kA;
475
+ var v = m.method, CA = x.iterator[v];
476
+ if (CA === j) return m.delegate = null, v === "throw" && x.iterator.return && (m.method = "return", m.arg = j, YA(x, m), m.method === "throw") || v !== "return" && (m.method = "throw", m.arg = new TypeError("The iterator does not provide a '" + v + "' method")), kA;
477
477
  var IA = BI(CA, x.iterator, m.arg);
478
478
  if (IA.type === "throw") return m.method = "throw", m.arg = IA.arg, m.delegate = null, kA;
479
479
  var MA = IA.arg;
480
- return MA ? MA.done ? (m[x.resultName] = MA.value, m.next = x.nextLoc, m.method !== "return" && (m.method = "next", m.arg = v), m.delegate = null, kA) : MA : (m.method = "throw", m.arg = new TypeError("iterator result is not an object"), m.delegate = null, kA);
480
+ return MA ? MA.done ? (m[x.resultName] = MA.value, m.next = x.nextLoc, m.method !== "return" && (m.method = "next", m.arg = j), m.delegate = null, kA) : MA : (m.method = "throw", m.arg = new TypeError("iterator result is not an object"), m.delegate = null, kA);
481
481
  }
482
482
  function lI(x) {
483
483
  var m = { tryLoc: x[0] };
@@ -496,9 +496,9 @@ var rE = { 144: function(a, o, r) {
496
496
  if (m) return m.call(x);
497
497
  if (typeof x.next == "function") return x;
498
498
  if (!isNaN(x.length)) {
499
- var j = -1, CA = function IA() {
500
- for (; ++j < x.length; ) if (iA.call(x, j)) return IA.value = x[j], IA.done = !1, IA;
501
- return IA.value = v, IA.done = !0, IA;
499
+ var v = -1, CA = function IA() {
500
+ for (; ++v < x.length; ) if (iA.call(x, v)) return IA.value = x[v], IA.done = !1, IA;
501
+ return IA.value = j, IA.done = !0, IA;
502
502
  };
503
503
  return CA.next = CA;
504
504
  }
@@ -514,9 +514,9 @@ var rE = { 144: function(a, o, r) {
514
514
  return { __await: x };
515
515
  }, u(oA.prototype), pA(oA.prototype, yA, (function() {
516
516
  return this;
517
- })), gA.AsyncIterator = oA, gA.async = function(x, m, j, CA, IA) {
517
+ })), gA.AsyncIterator = oA, gA.async = function(x, m, v, CA, IA) {
518
518
  IA === void 0 && (IA = Promise);
519
- var MA = new oA(XA(x, m, j, CA), IA);
519
+ var MA = new oA(XA(x, m, v, CA), IA);
520
520
  return gA.isGeneratorFunction(m) ? MA : MA.next().then((function(dA) {
521
521
  return dA.done ? dA.value : MA.next();
522
522
  }));
@@ -525,17 +525,17 @@ var rE = { 144: function(a, o, r) {
525
525
  })), pA(QI, "toString", (function() {
526
526
  return "[object Generator]";
527
527
  })), gA.keys = function(x) {
528
- var m = Object(x), j = [];
529
- for (var CA in m) j.push(CA);
530
- return j.reverse(), function IA() {
531
- for (; j.length; ) {
532
- var MA = j.pop();
528
+ var m = Object(x), v = [];
529
+ for (var CA in m) v.push(CA);
530
+ return v.reverse(), function IA() {
531
+ for (; v.length; ) {
532
+ var MA = v.pop();
533
533
  if (MA in m) return IA.value = MA, IA.done = !1, IA;
534
534
  }
535
535
  return IA.done = !0, IA;
536
536
  };
537
537
  }, gA.values = eI, lA.prototype = { constructor: lA, reset: function(x) {
538
- if (this.prev = 0, this.next = 0, this.sent = this._sent = v, this.done = !1, this.delegate = null, this.method = "next", this.arg = v, this.tryEntries.forEach(cI), !x) for (var m in this) m.charAt(0) === "t" && iA.call(this, m) && !isNaN(+m.slice(1)) && (this[m] = v);
538
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = j, this.done = !1, this.delegate = null, this.method = "next", this.arg = j, this.tryEntries.forEach(cI), !x) for (var m in this) m.charAt(0) === "t" && iA.call(this, m) && !isNaN(+m.slice(1)) && (this[m] = j);
539
539
  }, stop: function() {
540
540
  this.done = !0;
541
541
  var x = this.tryEntries[0].completion;
@@ -544,28 +544,28 @@ var rE = { 144: function(a, o, r) {
544
544
  }, dispatchException: function(x) {
545
545
  if (this.done) throw x;
546
546
  var m = this;
547
- function j(jA, YI) {
548
- return MA.type = "throw", MA.arg = x, m.next = jA, YI && (m.method = "next", m.arg = v), !!YI;
547
+ function v(jA, YI) {
548
+ return MA.type = "throw", MA.arg = x, m.next = jA, YI && (m.method = "next", m.arg = j), !!YI;
549
549
  }
550
550
  for (var CA = this.tryEntries.length - 1; CA >= 0; --CA) {
551
551
  var IA = this.tryEntries[CA], MA = IA.completion;
552
- if (IA.tryLoc === "root") return j("end");
552
+ if (IA.tryLoc === "root") return v("end");
553
553
  if (IA.tryLoc <= this.prev) {
554
554
  var dA = iA.call(IA, "catchLoc"), AI = iA.call(IA, "finallyLoc");
555
555
  if (dA && AI) {
556
- if (this.prev < IA.catchLoc) return j(IA.catchLoc, !0);
557
- if (this.prev < IA.finallyLoc) return j(IA.finallyLoc);
556
+ if (this.prev < IA.catchLoc) return v(IA.catchLoc, !0);
557
+ if (this.prev < IA.finallyLoc) return v(IA.finallyLoc);
558
558
  } else if (dA) {
559
- if (this.prev < IA.catchLoc) return j(IA.catchLoc, !0);
559
+ if (this.prev < IA.catchLoc) return v(IA.catchLoc, !0);
560
560
  } else {
561
561
  if (!AI) throw Error("try statement without catch or finally");
562
- if (this.prev < IA.finallyLoc) return j(IA.finallyLoc);
562
+ if (this.prev < IA.finallyLoc) return v(IA.finallyLoc);
563
563
  }
564
564
  }
565
565
  }
566
566
  }, abrupt: function(x, m) {
567
- for (var j = this.tryEntries.length - 1; j >= 0; --j) {
568
- var CA = this.tryEntries[j];
567
+ for (var v = this.tryEntries.length - 1; v >= 0; --v) {
568
+ var CA = this.tryEntries[v];
569
569
  if (CA.tryLoc <= this.prev && iA.call(CA, "finallyLoc") && this.prev < CA.finallyLoc) {
570
570
  var IA = CA;
571
571
  break;
@@ -579,24 +579,24 @@ var rE = { 144: function(a, o, r) {
579
579
  return x.type === "break" || x.type === "continue" ? this.next = x.arg : x.type === "return" ? (this.rval = this.arg = x.arg, this.method = "return", this.next = "end") : x.type === "normal" && m && (this.next = m), kA;
580
580
  }, finish: function(x) {
581
581
  for (var m = this.tryEntries.length - 1; m >= 0; --m) {
582
- var j = this.tryEntries[m];
583
- if (j.finallyLoc === x) return this.complete(j.completion, j.afterLoc), cI(j), kA;
582
+ var v = this.tryEntries[m];
583
+ if (v.finallyLoc === x) return this.complete(v.completion, v.afterLoc), cI(v), kA;
584
584
  }
585
585
  }, catch: function(x) {
586
586
  for (var m = this.tryEntries.length - 1; m >= 0; --m) {
587
- var j = this.tryEntries[m];
588
- if (j.tryLoc === x) {
589
- var CA = j.completion;
587
+ var v = this.tryEntries[m];
588
+ if (v.tryLoc === x) {
589
+ var CA = v.completion;
590
590
  if (CA.type === "throw") {
591
591
  var IA = CA.arg;
592
- cI(j);
592
+ cI(v);
593
593
  }
594
594
  return IA;
595
595
  }
596
596
  }
597
597
  throw Error("illegal catch attempt");
598
- }, delegateYield: function(x, m, j) {
599
- return this.delegate = { iterator: eI(x), resultName: m, nextLoc: j }, this.method === "next" && (this.arg = v), kA;
598
+ }, delegateYield: function(x, m, v) {
599
+ return this.delegate = { iterator: eI(x), resultName: m, nextLoc: v }, this.method === "next" && (this.arg = j), kA;
600
600
  } }, gA;
601
601
  }
602
602
  U.exports = z, U.exports.__esModule = !0, U.exports.default = U.exports;
@@ -676,7 +676,7 @@ var rE = { 144: function(a, o, r) {
676
676
  return E && typeof Symbol == "function" && E.constructor === Symbol && E !== Symbol.prototype ? "symbol" : typeof E;
677
677
  }, z(B);
678
678
  }
679
- function v(B) {
679
+ function j(B) {
680
680
  var E = (function(D) {
681
681
  if (z(D) != "object" || !D) return D;
682
682
  var s = D[Symbol.toPrimitive];
@@ -692,14 +692,14 @@ var rE = { 144: function(a, o, r) {
692
692
  function gA(B, E) {
693
693
  for (var D = 0; D < E.length; D++) {
694
694
  var s = E[D];
695
- s.enumerable = s.enumerable || !1, s.configurable = !0, "value" in s && (s.writable = !0), Object.defineProperty(B, v(s.key), s);
695
+ s.enumerable = s.enumerable || !1, s.configurable = !0, "value" in s && (s.writable = !0), Object.defineProperty(B, j(s.key), s);
696
696
  }
697
697
  }
698
698
  function QA(B, E, D) {
699
699
  return E && gA(B.prototype, E), D && gA(B, D), Object.defineProperty(B, "prototype", { writable: !1 }), B;
700
700
  }
701
701
  function iA(B, E, D) {
702
- return (E = v(E)) in B ? Object.defineProperty(B, E, { value: D, enumerable: !0, configurable: !0, writable: !0 }) : B[E] = D, B;
702
+ return (E = j(E)) in B ? Object.defineProperty(B, E, { value: D, enumerable: !0, configurable: !0, writable: !0 }) : B[E] = D, B;
703
703
  }
704
704
  d.r(U), d.d(U, { hasBrowserEnv: () => $g, hasStandardBrowserEnv: () => yQ, hasStandardBrowserWebWorkerEnv: () => FQ, navigator: () => AB, origin: () => cQ });
705
705
  var hA, sA = d(756), AA = d.n(sA), yA = (hA = (hA = typeof document < "u" && document.currentScript ? document.currentScript.src : void 0) || "/index.js", function(B) {
@@ -3103,7 +3103,7 @@ return ret;
3103
3103
  for (s = 0; s < y; s++) e = M[s], E.call(null, B[e], e, B);
3104
3104
  }
3105
3105
  }
3106
- function j(B, E) {
3106
+ function v(B, E) {
3107
3107
  E = E.toLowerCase();
3108
3108
  const D = Object.keys(B);
3109
3109
  let s, c = D.length;
@@ -3134,7 +3134,7 @@ return ret;
3134
3134
  return E = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(B) : B && B.buffer && _A(B.buffer), E;
3135
3135
  }, isString: $A, isNumber: FI, isBoolean: (B) => B === !0 || B === !1, isObject: sI, isPlainObject: QI, isReadableStream: cI, isRequest: lA, isResponse: eI, isHeaders: x, isUndefined: CI, isDate: u, isFile: oA, isBlob: JA, isRegExp: YI, isFunction: uA, isStream: (B) => sI(B) && uA(B.pipe), isURLSearchParams: lI, isTypedArray: MA, isFileList: YA, forEach: m, merge: function B() {
3136
3136
  const { caseless: E } = IA(this) && this || {}, D = {}, s = (c, M) => {
3137
- const y = E && j(D, M) || M;
3137
+ const y = E && v(D, M) || M;
3138
3138
  QI(D[y]) && QI(c) ? D[y] = B(D[y], c) : QI(c) ? D[y] = B({}, c) : kA(c) ? D[y] = c.slice() : D[y] = c;
3139
3139
  };
3140
3140
  for (let c = 0, M = arguments.length; c < M; c++) arguments[c] && m(arguments[c], s);
@@ -3194,7 +3194,7 @@ return ret;
3194
3194
  }, toCamelCase: (B) => B.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, (function(E, D, s) {
3195
3195
  return D.toUpperCase() + s;
3196
3196
  })), noop: () => {
3197
- }, toFiniteNumber: (B, E) => B != null && Number.isFinite(B = +B) ? B : E, findKey: j, global: CA, isContextDefined: IA, ALPHABET: mB, generateString: (B = 16, E = mB.ALPHA_DIGIT) => {
3197
+ }, toFiniteNumber: (B, E) => B != null && Number.isFinite(B = +B) ? B : E, findKey: v, global: CA, isContextDefined: IA, ALPHABET: mB, generateString: (B = 16, E = mB.ALPHA_DIGIT) => {
3198
3198
  let D = "";
3199
3199
  const { length: s } = E;
3200
3200
  for (; B--; ) D += E[Math.random() * s | 0];
@@ -4673,7 +4673,7 @@ const { ARToolkit: Ig } = rQ(), jI = function(a, o, r) {
4673
4673
  var J = new GE();
4674
4674
  window.addEventListener("arjs-video-loaded", (function(U) {
4675
4675
  var q = U.detail.component, f = q.clientWidth, O = q.clientHeight, z = 320 / Math.max(f, O / 3 * 4);
4676
- const v = f * z, gA = O * z, QA = Math.max(v, gA / 3 * 4), iA = Math.max(gA, v / 4 * 3), hA = (QA - v) / 2, sA = (iA - gA) / 2;
4676
+ const j = f * z, gA = O * z, QA = Math.max(j, gA / 3 * 4), iA = Math.max(gA, j / 4 * 3), hA = (QA - j) / 2, sA = (iA - gA) / 2;
4677
4677
  d.canvas.style.clientWidth = QA + "px", d.canvas.style.clientHeight = iA + "px", d.canvas.width = QA, d.canvas.height = iA;
4678
4678
  var AA = d.canvas.getContext("2d");
4679
4679
  J.postMessage({ type: "init", pw: QA, ph: iA, marker: k, param: d.cameraParam }), J.onmessage = function(yA) {
@@ -4684,7 +4684,7 @@ const { ARToolkit: Ig } = rQ(), jI = function(a, o, r) {
4684
4684
  window.dispatchEvent(pA);
4685
4685
  }
4686
4686
  if (yA && yA.data && yA.data.type === "loaded") {
4687
- var XA = JSON.parse(yA.data.proj), BI = QA / v, vA = iA / gA;
4687
+ var XA = JSON.parse(yA.data.proj), BI = QA / j, vA = iA / gA;
4688
4688
  XA[0] *= BI, XA[4] *= BI, XA[8] *= BI, XA[12] *= BI, XA[1] *= vA, XA[5] *= vA, XA[9] *= vA, XA[13] *= vA, (function(kA, CI) {
4689
4689
  var _A = [];
4690
4690
  for (var $A in CI) _A[$A] = CI[$A];
@@ -4700,7 +4700,7 @@ const { ARToolkit: Ig } = rQ(), jI = function(a, o, r) {
4700
4700
  w({ data: { type: Ig.NFT_MARKER, matrix: zA, msg: yA.data.type } }), a.context.arController.showObject = !0;
4701
4701
  } else a.context.arController.showObject = !1;
4702
4702
  (function() {
4703
- AA.fillStyle = "black", AA.fillRect(0, 0, QA, iA), AA.drawImage(q, 0, 0, f, O, hA, sA, v, gA);
4703
+ AA.fillStyle = "black", AA.fillRect(0, 0, QA, iA), AA.drawImage(q, 0, 0, f, O, hA, sA, j, gA);
4704
4704
  var kA = AA.getImageData(0, 0, QA, iA);
4705
4705
  J.postMessage({ type: "process", imagedata: kA }, [kA.data.buffer]);
4706
4706
  })();
@@ -5029,8 +5029,8 @@ const Fg = VA, bI = function(a, o) {
5029
5029
  };
5030
5030
  bI.prototype._onSourceProcessed = function() {
5031
5031
  var a = this.subMarkersControls[0].object3d.quaternion;
5032
- if (this.enabled !== !1) for (var o = this.subMarkersControls.filter((function(v) {
5033
- return v.object3d.visible === !0;
5032
+ if (this.enabled !== !1) for (var o = this.subMarkersControls.filter((function(j) {
5033
+ return j.object3d.visible === !0;
5034
5034
  })), r = Object.keys(o).length, w = new THREE.Vector3(), N = new THREE.Quaternion(), k = new THREE.Vector3(), d = new THREE.Matrix4(), J = 0; J < r; J++) for (var U = o[J], q = 0; q < r; q++) {
5035
5035
  var f = o[q];
5036
5036
  if (J !== q) {
@@ -5122,7 +5122,7 @@ const NE = bI, LB = { navigateToLearnerPage: function(a, o) {
5122
5122
  return w.subMarkersControls.push(U), U = q("topleft", -d, -J), w.subMarkersControls.push(U), U = q("topright", +d, -J), w.subMarkersControls.push(U), U = q("bottomleft", -d, +J), w.subMarkersControls.push(U), U = q("bottomright", +d, +J), w.subMarkersControls.push(U), w;
5123
5123
  function q(f, O, z) {
5124
5124
  console.log("buildSubMarkerControls", f, O, z);
5125
- var v = { parameters: {}, poseMatrix: new BA.Matrix4().makeTranslation(O, 0, z).toArray() };
5125
+ var j = { parameters: {}, poseMatrix: new BA.Matrix4().makeTranslation(O, 0, z).toArray() };
5126
5126
  return a === "artoolkit" ? (function(gA, QA) {
5127
5127
  var iA = document.createElement("a");
5128
5128
  iA.href = ZI.baseURL;
@@ -5132,7 +5132,7 @@ const NE = bI, LB = { navigateToLearnerPage: function(a, o) {
5132
5132
  var NA = document.createElement("a");
5133
5133
  return NA.href = yA, NA.href;
5134
5134
  }
5135
- })(v.parameters, f) : console.assert(!1), v;
5135
+ })(j.parameters, f) : console.assert(!1), j;
5136
5136
  }
5137
5137
  } }, kE = LB;
5138
5138
  var oQ = yI.AI;
@@ -5157,14 +5157,14 @@ const jE = ({
5157
5157
  let O = !1;
5158
5158
  return (async () => {
5159
5159
  try {
5160
- const v = J.find((sA) => sA.getInternal?.()?.arContext);
5161
- if (!v || O) return;
5162
- const QA = v.getInternal?.()?.arContext, iA = d.current;
5160
+ const j = J.find((sA) => sA.getInternal?.()?.arContext);
5161
+ if (!j || O) return;
5162
+ const QA = j.getInternal?.()?.arContext, iA = d.current;
5163
5163
  if (!QA || !iA) return;
5164
5164
  if (iA.visible = !1, q.current = !1, !QA.arController) {
5165
5165
  requestAnimationFrame(() => {
5166
5166
  if (!d.current || O) return;
5167
- const AA = v.getInternal?.()?.arContext;
5167
+ const AA = j.getInternal?.()?.arContext;
5168
5168
  if (!AA?.arController) return;
5169
5169
  const yA = new oQ(AA, d.current, {
5170
5170
  type: a ? "pattern" : o ? "barcode" : "unknown",
@@ -5183,13 +5183,13 @@ const jE = ({
5183
5183
  ...r
5184
5184
  });
5185
5185
  f.current = hA, q.current = !0;
5186
- } catch (v) {
5187
- console.error("Failed to initialize fiducial backend:", v);
5186
+ } catch (j) {
5187
+ console.error("Failed to initialize fiducial backend:", j);
5188
5188
  }
5189
5189
  })(), () => {
5190
5190
  O = !0;
5191
- const v = f.current;
5192
- typeof v?.dispose == "function" && v.dispose(), q.current = !1;
5191
+ const j = f.current;
5192
+ typeof j?.dispose == "function" && j.dispose(), q.current = !1;
5193
5193
  };
5194
5194
  }, [J, a, o, r]), HB(() => {
5195
5195
  const O = d.current;
@@ -5309,7 +5309,7 @@ const PE = ({
5309
5309
  }) => {
5310
5310
  const { backends: J } = Pg(), { camera: U } = tQ(), [q] = Xg(() => new iE()), [f] = Xg(() => Math.random().toString(36).slice(2, 11)), O = WI(!1), z = vg(() => {
5311
5311
  N?.();
5312
- }, [N]), v = vg(
5312
+ }, [N]), j = vg(
5313
5313
  (gA) => {
5314
5314
  k?.(gA);
5315
5315
  },
@@ -5330,7 +5330,7 @@ const PE = ({
5330
5330
  longitude: o,
5331
5331
  altitude: r || 0,
5332
5332
  onAttached: z,
5333
- onGpsUpdate: v
5333
+ onGpsUpdate: j
5334
5334
  }), dB || (ng = (AA) => {
5335
5335
  const yA = AA.position ?? AA;
5336
5336
  gg.forEach((NA) => {
@@ -5371,7 +5371,7 @@ const PE = ({
5371
5371
  o,
5372
5372
  r,
5373
5373
  z,
5374
- v
5374
+ j
5375
5375
  ]), HB(() => {
5376
5376
  !w || !U || !gg.get(f)?.isAttached || q.lookAt(U.position);
5377
5377
  }), EE(/* @__PURE__ */ xI.jsx("group", { children: d }), q);
@@ -5757,19 +5757,19 @@ class xE extends aE {
5757
5757
  const z = w.screenOrientation ? KI.degToRad(w.screenOrientation) : 0;
5758
5758
  if (w.smoothingFactor < 1) {
5759
5759
  if (w.lastOrientation) {
5760
- const v = w.smoothingFactor;
5760
+ const j = w.smoothingFactor;
5761
5761
  q = w._getSmoothedAngle(
5762
5762
  q,
5763
5763
  w.lastOrientation.alpha,
5764
- v
5764
+ j
5765
5765
  ), f = w._getSmoothedAngle(
5766
5766
  f + Math.PI,
5767
5767
  w.lastOrientation.beta,
5768
- v
5768
+ j
5769
5769
  ), O = w._getSmoothedAngle(
5770
5770
  O + w.HALF_PI,
5771
5771
  w.lastOrientation.gamma,
5772
- v,
5772
+ j,
5773
5773
  Math.PI
5774
5774
  );
5775
5775
  } else
@@ -5781,16 +5781,16 @@ class xE extends aE {
5781
5781
  };
5782
5782
  }
5783
5783
  if (Rg) {
5784
- const v = new qB();
5784
+ const j = new qB();
5785
5785
  d(
5786
- v,
5786
+ j,
5787
5787
  q,
5788
5788
  w.smoothingFactor < 1 ? f - Math.PI : f,
5789
5789
  w.smoothingFactor < 1 ? O - Math.PI / 2 : O,
5790
5790
  z
5791
5791
  );
5792
5792
  const gA = new sQ().setFromQuaternion(
5793
- v,
5793
+ j,
5794
5794
  "YXZ"
5795
5795
  );
5796
5796
  let QA = KI.degToRad(360 - U.webkitCompassHeading);
@@ -5798,7 +5798,7 @@ class xE extends aE {
5798
5798
  QA,
5799
5799
  w.lastCompassY,
5800
5800
  w.smoothingFactor
5801
- )), w.lastCompassY = QA, gA.y = QA + (w.orientationOffset || 0), v.setFromEuler(gA), w.object.quaternion.copy(v);
5801
+ )), w.lastCompassY = QA, gA.y = QA + (w.orientationOffset || 0), j.setFromEuler(gA), w.object.quaternion.copy(j);
5802
5802
  } else
5803
5803
  d(
5804
5804
  w.object.quaternion,
@@ -5816,9 +5816,9 @@ class xE extends aE {
5816
5816
  }, this._orderAngle = function(J, U, q = w.TWO_PI) {
5817
5817
  return U > J && Math.abs(U - J) < q / 2 || J > U && Math.abs(U - J) > q / 2 ? { left: J, right: U } : { left: U, right: J };
5818
5818
  }, this._getSmoothedAngle = function(J, U, q, f = w.TWO_PI) {
5819
- const O = w._orderAngle(J, U, f), z = O.left, v = O.right;
5819
+ const O = w._orderAngle(J, U, f), z = O.left, j = O.right;
5820
5820
  O.left = 0, O.right -= z, O.right < 0 && (O.right += f);
5821
- let gA = v == U ? (1 - q) * O.right + q * O.left : q * O.right + (1 - q) * O.left;
5821
+ let gA = j == U ? (1 - q) * O.right + q * O.left : q * O.right + (1 - q) * O.left;
5822
5822
  return gA += z, gA >= f && (gA -= f), gA;
5823
5823
  }, this.updateAlphaOffset = function() {
5824
5824
  w.initialOffset = !1;
@@ -5844,7 +5844,7 @@ class xE extends aE {
5844
5844
  f.classList.add(pE);
5845
5845
  const O = document.createElement("button");
5846
5846
  if (O.classList.add(uE), document.body.appendChild(J), this.enableInlineStyling === !0) {
5847
- const v = {
5847
+ const j = {
5848
5848
  fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'",
5849
5849
  display: "flex",
5850
5850
  position: "fixed",
@@ -5887,8 +5887,8 @@ class xE extends aE {
5887
5887
  color: "#2e7cf1",
5888
5888
  cursor: "pointer"
5889
5889
  };
5890
- for (let sA in v)
5891
- J.style[sA] = v[sA];
5890
+ for (let sA in j)
5891
+ J.style[sA] = j[sA];
5892
5892
  for (let sA in gA)
5893
5893
  U.style[sA] = gA[sA];
5894
5894
  for (let sA in QA)
@@ -5943,30 +5943,21 @@ const VE = (a) => {
5943
5943
  video: { facingMode: "environment" }
5944
5944
  },
5945
5945
  null
5946
- ), w.on("webcamstarted", (v) => {
5947
- O.background = v.texture;
5948
- }), w.on("webcamerror", (v) => {
5949
- console.error("[geolocationBackend] webcam error:", v);
5950
- }), N = new xE(q), N.on("deviceorientationgranted", (v) => {
5951
- v.target?.connect?.();
5952
- }), N.on("deviceorientationerror", (v) => {
5953
- console.error("[geolocationBackend] Device orientation error:", v);
5954
- });
5955
- try {
5956
- N.requestOrientationPermissions ? await N.requestOrientationPermissions() : N.createObtainPermissionGestureDialog && N.createObtainPermissionGestureDialog();
5957
- } catch (v) {
5958
- console.warn(
5959
- "[geolocationBackend] Could not request orientation permissions:",
5960
- v
5961
- );
5962
- }
5963
- N.init?.(), r.on("gpserror", (v) => {
5964
- console.error("[geolocationBackend] gps error:", v);
5946
+ ), w.on("webcamstarted", (j) => {
5947
+ O.background = j.texture;
5948
+ }), w.on("webcamerror", (j) => {
5949
+ console.error("[geolocationBackend] webcam error:", j);
5950
+ }), N = new xE(q), N.on("deviceorientationgranted", (j) => {
5951
+ j.target?.connect?.();
5952
+ }), N.on("deviceorientationerror", (j) => {
5953
+ console.error("[geolocationBackend] Device orientation error:", j);
5954
+ }), N.init?.(), r.on("gpserror", (j) => {
5955
+ console.error("[geolocationBackend] gps error:", j);
5965
5956
  }), r.startGps(), typeof o.fakeLat == "number" && typeof o.fakeLon == "number" && r.fakeGps(o.fakeLon, o.fakeLat);
5966
5957
  const z = () => {
5967
5958
  if (!J || !d) return;
5968
- const v = window.innerWidth, gA = window.innerHeight;
5969
- J.setSize(v, gA, !1), d.aspect = v / gA, d.updateProjectionMatrix?.();
5959
+ const j = window.innerWidth, gA = window.innerHeight;
5960
+ J.setSize(j, gA, !1), d.aspect = j / gA, d.updateProjectionMatrix?.();
5970
5961
  };
5971
5962
  z(), window.addEventListener("resize", z), k = z, this._locar = r, this._webcam = w, this._deviceOrientation = N, this._scene = O, this._camera = q;
5972
5963
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnidotdev/rdk",
3
3
  "description": "AR.js with react-three-fiber",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "build/index.js",