@vincentt-xr/sdk 2.0.0-alpha.19 → 2.0.0-alpha.20
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/GROUNDING.md +3 -1
- package/components.json +3 -1
- package/dist/Scenes--qAbN6iP.cjs +1 -0
- package/dist/Scenes-icIQpHtV.js +58 -0
- package/dist/components/Button/index.d.ts +5 -1
- package/dist/editor-defs/types.d.ts +4 -1
- package/dist/editor-scenes.cjs +1 -1
- package/dist/editor-scenes.js +1 -1
- package/dist/entries/core.d.ts +1 -0
- package/dist/main.cjs +1 -1
- package/dist/main.js +498 -494
- package/dist/scenes/Scenes.d.ts +4 -1
- package/dist/scenes/navigate.d.ts +5 -0
- package/package.json +1 -1
- package/settings.json +1 -1
- package/dist/Scenes-BX0bR1j4.js +0 -44
- package/dist/Scenes-Dtt8UGE8.cjs +0 -1
package/dist/main.js
CHANGED
|
@@ -1,60 +1,61 @@
|
|
|
1
1
|
var Be = Object.defineProperty;
|
|
2
2
|
var $e = (e, t, r) => t in e ? Be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var D = (e, t, r) => $e(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { j as
|
|
5
|
-
import { b8 as
|
|
4
|
+
import { j as _, J as Xe, u as He, as as Ke, at as je, au as Ve, av as Ze, aw as Ye, ax as Je } from "./index-BDxJWWyy.js";
|
|
5
|
+
import { b8 as bs, az as Rs, b9 as As, M as Fs, P as Cs, L as xs, w as _s, ay as ks, ba as vs, b5 as ws, b6 as Ds, aA as Ps, c as Us, z as Ns, y as Ls, d as Is, k as Os, aR as Gs, aS as zs, aT as qs, aU as Ws, n as Bs, aV as $s, i as Xs, aB as Hs, O as Ks, aW as js, aC as Vs, aD as Zs, aX as Ys, aY as Js, b3 as Qs, p as ea, A as ta, b7 as ra, r as sa, K as aa, a3 as na, aI as oa, aZ as ia, aJ as ca, aK as la, aL as ua, aH as da, aM as ma, aN as fa, aE as pa, aO as ha, a_ as ga, b4 as ya, aP as Sa, a$ as Ta, t as Ma, aF as Ea, aG as ba, b0 as Ra, b1 as Aa, aQ as Fa, b2 as Ca } from "./index-BDxJWWyy.js";
|
|
6
6
|
import { S as Qe } from "./contexts-Cl-4dUOI.js";
|
|
7
|
-
import { X as
|
|
8
|
-
import { S as
|
|
9
|
-
import { jsxs as O, jsx as
|
|
10
|
-
import { useRef as A, useMemo as z, useEffect as x, useState as
|
|
7
|
+
import { X as _a } from "./contexts-Cl-4dUOI.js";
|
|
8
|
+
import { S as va, T as wa } from "./TextLabel-fEF1o3wE.js";
|
|
9
|
+
import { jsxs as O, jsx as y, Fragment as ne } from "react/jsx-runtime";
|
|
10
|
+
import { useRef as A, useMemo as z, useEffect as x, useState as k, Suspense as et, useCallback as F, forwardRef as tt, useImperativeHandle as rt, useContext as st, createContext as at, useId as nt, useSyncExternalStore as ot } from "react";
|
|
11
11
|
import * as de from "three";
|
|
12
12
|
import { MathUtils as it, Vector2 as ct, Vector3 as lt, DoubleSide as se, RepeatWrapping as Ee, LinearFilter as be } from "three";
|
|
13
|
-
import { D as
|
|
13
|
+
import { D as Pa, H as Ua, G as Na, E as La, J as Ia, K as Oa, P as Ga, S as za, C as qa, I as Wa, L as Ba, M as $a, F as Xa, B as Ha } from "./index-D5NbXaCn.js";
|
|
14
14
|
import { useThree as ut, useFrame as Pe } from "@react-three/fiber";
|
|
15
15
|
import { R as dt } from "./uv-DJU_XfmN.js";
|
|
16
16
|
import { c as Ue, b as mt } from "./selectors-J06V0eDb.js";
|
|
17
17
|
import { u as ft, a as pt, s as ht, F as gt } from "./drawNormalizedCrop-D606u5-F.js";
|
|
18
|
-
import { d as
|
|
18
|
+
import { d as ja, b as Va, r as Za } from "./drawNormalizedCrop-D606u5-F.js";
|
|
19
19
|
import { S as yt, c as St, D as L, L as Tt } from "./index-CM3jkleV.js";
|
|
20
|
-
import { d as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { D as
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
20
|
+
import { d as Ja, R as Qa, a as en, e as tn, b as rn, f as sn } from "./index-CM3jkleV.js";
|
|
21
|
+
import { g as Mt } from "./Scenes-icIQpHtV.js";
|
|
22
|
+
import { a as nn, b as on, u as cn } from "./Scenes-icIQpHtV.js";
|
|
23
|
+
import { useTexture as Et } from "@react-three/drei";
|
|
24
|
+
import { a as bt } from "./context-DTxSQvp4.js";
|
|
25
|
+
import { j as K, T as Rt } from "./renderPasses-C0wu5Cwg.js";
|
|
26
|
+
import { k as un, D as dn, E as mn, M as fn, h as pn, S as hn, l as gn, g as yn, n as Sn, r as Tn } from "./renderPasses-C0wu5Cwg.js";
|
|
27
|
+
import { D as Re, M as At } from "./index-Bn72laBn.js";
|
|
28
|
+
import { c as En, n as bn } from "./index-Bn72laBn.js";
|
|
29
|
+
import { M as An } from "./index-CbBCl2ZU.js";
|
|
30
|
+
import { u as Cn } from "./useXRCapabilities-DPUOvpdf.js";
|
|
30
31
|
import { g as Ne } from "./cache-Mu-VO_6E.js";
|
|
31
|
-
import { D as
|
|
32
|
-
import { a as
|
|
33
|
-
import { d as
|
|
34
|
-
const J = (e, t, r, s) => it.damp(e, t, Math.max(0, r), Math.max(0, s)),
|
|
32
|
+
import { D as _n, X as kn, c as vn, u as wn } from "./cache-Mu-VO_6E.js";
|
|
33
|
+
import { a as Ft } from "./segmentation-DccvYBBO.js";
|
|
34
|
+
import { d as Pn, b as Un, e as Nn, f as Ln, g as In, h as On, i as Gn } from "./segmentation-DccvYBBO.js";
|
|
35
|
+
const J = (e, t, r, s) => it.damp(e, t, Math.max(0, r), Math.max(0, s)), Or = (e, t, r, s, a = new ct()) => a.set(
|
|
35
36
|
J(e.x, t.x, r, s),
|
|
36
37
|
J(e.y, t.y, r, s)
|
|
37
|
-
),
|
|
38
|
+
), Gr = (e, t, r, s, a = new lt()) => a.set(
|
|
38
39
|
J(e.x, t.x, r, s),
|
|
39
40
|
J(e.y, t.y, r, s),
|
|
40
41
|
J(e.z, t.z, r, s)
|
|
41
|
-
),
|
|
42
|
-
function
|
|
43
|
-
color: e =
|
|
42
|
+
), Ct = "rgba(20,40,110,0.88)", xt = 24, _t = 512;
|
|
43
|
+
function zr({
|
|
44
|
+
color: e = Ct,
|
|
44
45
|
borderColor: t,
|
|
45
46
|
borderWidth: r = 0,
|
|
46
|
-
borderRadius: s =
|
|
47
|
-
resolution: a =
|
|
47
|
+
borderRadius: s = xt,
|
|
48
|
+
resolution: a = _t,
|
|
48
49
|
aspect: n = 1,
|
|
49
50
|
opacity: o = 1,
|
|
50
51
|
name: c,
|
|
51
52
|
overlay: i = !0,
|
|
52
53
|
position: l,
|
|
53
|
-
rotation:
|
|
54
|
-
scale:
|
|
54
|
+
rotation: h,
|
|
55
|
+
scale: m,
|
|
55
56
|
visible: f
|
|
56
57
|
}) {
|
|
57
|
-
const u = A(null),
|
|
58
|
+
const u = A(null), d = A(null), g = z(() => kt({
|
|
58
59
|
width: Math.round(a * Math.max(n, 0.05)),
|
|
59
60
|
height: Math.round(a),
|
|
60
61
|
color: e,
|
|
@@ -63,16 +64,16 @@ function Or({
|
|
|
63
64
|
borderRadius: s
|
|
64
65
|
}), [e, t, r, s, a, n]);
|
|
65
66
|
x(() => () => {
|
|
66
|
-
|
|
67
|
-
}, [
|
|
68
|
-
const T = A(null),
|
|
69
|
-
return
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
72
|
-
return
|
|
73
|
-
T.current = E,
|
|
67
|
+
g.dispose();
|
|
68
|
+
}, [g]);
|
|
69
|
+
const T = A(null), p = A(o);
|
|
70
|
+
return p.current !== o && (p.current = o, T.current = null, d.current && (d.current.opacity = o)), x(() => {
|
|
71
|
+
const S = u.current;
|
|
72
|
+
if (S)
|
|
73
|
+
return S.userData.setOpacity = (E) => {
|
|
74
|
+
T.current = E, d.current && (d.current.opacity = E);
|
|
74
75
|
}, () => {
|
|
75
|
-
delete
|
|
76
|
+
delete S.userData.setOpacity;
|
|
76
77
|
};
|
|
77
78
|
}, []), /* @__PURE__ */ O(
|
|
78
79
|
"mesh",
|
|
@@ -80,16 +81,16 @@ function Or({
|
|
|
80
81
|
ref: u,
|
|
81
82
|
name: c,
|
|
82
83
|
position: l,
|
|
83
|
-
rotation:
|
|
84
|
-
scale:
|
|
84
|
+
rotation: h,
|
|
85
|
+
scale: m,
|
|
85
86
|
visible: f,
|
|
86
87
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ y("planeGeometry", { args: [1, 1] }),
|
|
89
|
+
/* @__PURE__ */ y(
|
|
89
90
|
"meshBasicMaterial",
|
|
90
91
|
{
|
|
91
|
-
ref:
|
|
92
|
-
map:
|
|
92
|
+
ref: d,
|
|
93
|
+
map: g,
|
|
93
94
|
transparent: !0,
|
|
94
95
|
opacity: o,
|
|
95
96
|
depthTest: !i,
|
|
@@ -102,42 +103,42 @@ function Or({
|
|
|
102
103
|
}
|
|
103
104
|
function kt(e) {
|
|
104
105
|
const { width: t, height: r, color: s, borderColor: a, borderWidth: n, borderRadius: o } = e, c = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(t, r) : (() => {
|
|
105
|
-
const
|
|
106
|
-
return
|
|
106
|
+
const m = document.createElement("canvas");
|
|
107
|
+
return m.width = t, m.height = r, m;
|
|
107
108
|
})(), i = c.getContext("2d");
|
|
108
109
|
i.clearRect(0, 0, t, r);
|
|
109
110
|
const l = Math.min(o, Math.min(t, r) / 2);
|
|
110
111
|
i.beginPath(), i.moveTo(l, 0), i.lineTo(t - l, 0), i.quadraticCurveTo(t, 0, t, l), i.lineTo(t, r - l), i.quadraticCurveTo(t, r, t - l, r), i.lineTo(l, r), i.quadraticCurveTo(0, r, 0, r - l), i.lineTo(0, l), i.quadraticCurveTo(0, 0, l, 0), i.closePath(), i.fillStyle = s, i.fill(), a && n > 0 && (i.lineWidth = n, i.strokeStyle = a, i.stroke());
|
|
111
|
-
const
|
|
112
|
-
return
|
|
112
|
+
const h = new de.CanvasTexture(c);
|
|
113
|
+
return h.needsUpdate = !0, h;
|
|
113
114
|
}
|
|
114
|
-
const
|
|
115
|
+
const qr = ({
|
|
115
116
|
segmentationMask: e,
|
|
116
117
|
segmentation: t,
|
|
117
118
|
invert: r = !1,
|
|
118
119
|
customBackground: s,
|
|
119
120
|
renderOrder: a = dt.BACKGROUND
|
|
120
121
|
}) => {
|
|
121
|
-
const { camera: n, size: o } = ut(), c = Ue(), i = mt(
|
|
122
|
+
const { camera: n, size: o } = ut(), c = Ue(), i = mt(_.BACKGROUND_SEGMENTATION), l = t ? i == null ? void 0 : i.backgroundSegmentationMask : void 0, h = A(!1);
|
|
122
123
|
x(() => {
|
|
123
124
|
if (!t) {
|
|
124
|
-
|
|
125
|
+
h.current = !1;
|
|
125
126
|
return;
|
|
126
127
|
}
|
|
127
|
-
i === null && !
|
|
128
|
+
i === null && !h.current && (console.warn(
|
|
128
129
|
`[VideoBackground] segmentation="${t}" set but no matching <Segmentation> component is mounted; rendering unmasked.`
|
|
129
|
-
),
|
|
130
|
+
), h.current = !0);
|
|
130
131
|
}, [t, i]);
|
|
131
|
-
const
|
|
132
|
+
const m = t ? l : e, f = z(() => {
|
|
132
133
|
if (!n.isPerspectiveCamera)
|
|
133
134
|
return [10, 10];
|
|
134
|
-
const u = n, T = (u.position.z || 5) - -1,
|
|
135
|
-
return [
|
|
135
|
+
const u = n, T = (u.position.z || 5) - -1, p = u.fov * Math.PI / 180, S = 2 * Math.tan(p / 2) * T;
|
|
136
|
+
return [S * (o.width / o.height), S];
|
|
136
137
|
}, [n, o]);
|
|
137
|
-
return c ? /* @__PURE__ */
|
|
138
|
+
return c ? /* @__PURE__ */ y("group", { position: [0, 0, -1], children: r ? /* @__PURE__ */ O(ne, { children: [
|
|
138
139
|
/* @__PURE__ */ O("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ y("planeGeometry", { args: f }),
|
|
141
|
+
/* @__PURE__ */ y(
|
|
141
142
|
"meshBasicMaterial",
|
|
142
143
|
{
|
|
143
144
|
map: c,
|
|
@@ -148,14 +149,14 @@ const Gr = ({
|
|
|
148
149
|
}
|
|
149
150
|
)
|
|
150
151
|
] }),
|
|
151
|
-
s &&
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
152
|
+
s && m && /* @__PURE__ */ O("mesh", { position: [0, 0, 0], renderOrder: a, children: [
|
|
153
|
+
/* @__PURE__ */ y("planeGeometry", { args: f }),
|
|
154
|
+
/* @__PURE__ */ y(
|
|
154
155
|
"meshBasicMaterial",
|
|
155
156
|
{
|
|
156
157
|
map: typeof s == "string" ? void 0 : s,
|
|
157
158
|
color: typeof s == "string" ? s : void 0,
|
|
158
|
-
alphaMap:
|
|
159
|
+
alphaMap: m,
|
|
159
160
|
transparent: !1,
|
|
160
161
|
alphaTest: 0.5,
|
|
161
162
|
depthTest: !1,
|
|
@@ -167,9 +168,9 @@ const Gr = ({
|
|
|
167
168
|
)
|
|
168
169
|
] })
|
|
169
170
|
] }) : /* @__PURE__ */ O(ne, { children: [
|
|
170
|
-
s &&
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
171
|
+
s && m && /* @__PURE__ */ O("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
|
|
172
|
+
/* @__PURE__ */ y("planeGeometry", { args: f }),
|
|
173
|
+
/* @__PURE__ */ y(
|
|
173
174
|
"meshBasicMaterial",
|
|
174
175
|
{
|
|
175
176
|
map: typeof s == "string" ? void 0 : s,
|
|
@@ -182,20 +183,20 @@ const Gr = ({
|
|
|
182
183
|
)
|
|
183
184
|
] }),
|
|
184
185
|
/* @__PURE__ */ O("mesh", { position: [0, 0, 0], renderOrder: a, children: [
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ y("planeGeometry", { args: f }),
|
|
187
|
+
/* @__PURE__ */ y(
|
|
187
188
|
"meshBasicMaterial",
|
|
188
189
|
{
|
|
189
190
|
map: c,
|
|
190
|
-
alphaMap:
|
|
191
|
+
alphaMap: m,
|
|
191
192
|
transparent: !1,
|
|
192
|
-
alphaTest:
|
|
193
|
+
alphaTest: m ? 0.5 : void 0,
|
|
193
194
|
depthTest: !1,
|
|
194
195
|
depthWrite: !1,
|
|
195
196
|
toneMapped: !1,
|
|
196
197
|
side: se
|
|
197
198
|
},
|
|
198
|
-
|
|
199
|
+
m ? "with-mask" : "no-mask"
|
|
199
200
|
)
|
|
200
201
|
] })
|
|
201
202
|
] }) }) : null;
|
|
@@ -210,16 +211,16 @@ const Gr = ({
|
|
|
210
211
|
anchors: c = gt,
|
|
211
212
|
renderOrder: i = 100,
|
|
212
213
|
visible: l = !0,
|
|
213
|
-
maskFeather:
|
|
214
|
-
maskErode:
|
|
214
|
+
maskFeather: h = 4,
|
|
215
|
+
maskErode: m = 0.7,
|
|
215
216
|
...f
|
|
216
217
|
}) => {
|
|
217
218
|
const u = Ue();
|
|
218
219
|
if (x(() => {
|
|
219
220
|
n == null || n(t, r);
|
|
220
221
|
}, [t, r, n]), !u) return null;
|
|
221
|
-
const
|
|
222
|
-
return !
|
|
222
|
+
const d = t === "ready" && e;
|
|
223
|
+
return !d && !ht(t, a) ? null : /* @__PURE__ */ y(
|
|
223
224
|
yt,
|
|
224
225
|
{
|
|
225
226
|
...f,
|
|
@@ -228,21 +229,21 @@ const Gr = ({
|
|
|
228
229
|
anchors: c,
|
|
229
230
|
renderOrder: i,
|
|
230
231
|
visible: l,
|
|
231
|
-
maskTexture:
|
|
232
|
+
maskTexture: d ? e : null,
|
|
232
233
|
maskChannel: "green",
|
|
233
234
|
maskInvert: s,
|
|
234
|
-
maskFeather:
|
|
235
|
-
maskErode:
|
|
235
|
+
maskFeather: h,
|
|
236
|
+
maskErode: m
|
|
236
237
|
}
|
|
237
238
|
);
|
|
238
|
-
},
|
|
239
|
+
}, vt = ({ active: e = !0, ...t }) => {
|
|
239
240
|
const { texture: r, status: s, error: a } = pt(e);
|
|
240
|
-
return /* @__PURE__ */
|
|
241
|
-
},
|
|
241
|
+
return /* @__PURE__ */ y(Le, { ...t, mask: r, status: s, error: a });
|
|
242
|
+
}, wt = ({ bodyId: e, subject: t, numBodies: r, active: s = !0, ...a }) => {
|
|
242
243
|
const { texture: n, status: o, error: c } = ft({ bodyId: e, subject: t, numBodies: r, active: s });
|
|
243
|
-
return /* @__PURE__ */
|
|
244
|
-
},
|
|
245
|
-
const [t, r] =
|
|
244
|
+
return /* @__PURE__ */ y(Le, { ...a, mask: n, status: o, error: c });
|
|
245
|
+
}, Wr = ({ bodyId: e, subject: t, numBodies: r, ...s }) => e !== void 0 || t ? /* @__PURE__ */ y(wt, { ...s, bodyId: e, subject: t, numBodies: r }) : /* @__PURE__ */ y(vt, { ...s }), ce = 9, le = 16, Br = ({ children: e }) => {
|
|
246
|
+
const [t, r] = k({ width: 0, height: 0 });
|
|
246
247
|
return x(() => {
|
|
247
248
|
const s = () => {
|
|
248
249
|
const a = document.documentElement.clientWidth, n = document.documentElement.clientHeight, o = a / n, c = ce / le;
|
|
@@ -250,7 +251,7 @@ const Gr = ({
|
|
|
250
251
|
o > c ? (l = n, i = l * ce / le) : (i = a, l = i * le / ce), r({ width: i, height: l });
|
|
251
252
|
};
|
|
252
253
|
return s(), window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
|
|
253
|
-
}, []), /* @__PURE__ */
|
|
254
|
+
}, []), /* @__PURE__ */ y(
|
|
254
255
|
"div",
|
|
255
256
|
{
|
|
256
257
|
style: {
|
|
@@ -261,64 +262,64 @@ const Gr = ({
|
|
|
261
262
|
justifyContent: "center",
|
|
262
263
|
backgroundColor: "#0d0d0d"
|
|
263
264
|
},
|
|
264
|
-
children: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ y("div", { style: { width: t.width, height: t.height, position: "relative" }, children: e })
|
|
265
266
|
}
|
|
266
267
|
);
|
|
267
|
-
},
|
|
268
|
+
}, $r = ({ size: e = 0.25, ...t }) => /* @__PURE__ */ y("axesHelper", { args: [e], ...t }), Dt = { left: -1, right: 1, top: 1, bottom: -1 }, Pt = (e, t, r) => {
|
|
268
269
|
const s = e % t, a = Math.floor(e / t);
|
|
269
270
|
return { x: s / t, y: (r - 1 - a) / r };
|
|
270
|
-
},
|
|
271
|
+
}, Ut = ({
|
|
271
272
|
sheet: e,
|
|
272
273
|
contentAspect: t,
|
|
273
274
|
renderOrder: r,
|
|
274
275
|
name: s
|
|
275
276
|
}) => {
|
|
276
|
-
const a =
|
|
277
|
-
return Pe((
|
|
278
|
-
a.wrapS = Ee, a.wrapT = Ee, a.magFilter = be, a.minFilter = be, a.generateMipmaps = !1, a.repeat.set(1 / e.cols, 1 / e.rows), n.current +=
|
|
277
|
+
const a = Et(e.url), n = A(0), o = A(-1), c = bt(), [i, l] = t != null ? St(c, t) : [1, 1];
|
|
278
|
+
return Pe((h, m) => {
|
|
279
|
+
a.wrapS = Ee, a.wrapT = Ee, a.magFilter = be, a.minFilter = be, a.generateMipmaps = !1, a.repeat.set(1 / e.cols, 1 / e.rows), n.current += m;
|
|
279
280
|
const f = Math.floor(n.current * e.fps) % e.frames;
|
|
280
281
|
if (f === o.current) return;
|
|
281
282
|
o.current = f;
|
|
282
|
-
const { x: u, y:
|
|
283
|
-
a.offset.set(u,
|
|
283
|
+
const { x: u, y: d } = Pt(f, e.cols, e.rows);
|
|
284
|
+
a.offset.set(u, d);
|
|
284
285
|
}), /* @__PURE__ */ O("mesh", { name: s, renderOrder: r, scale: [i, l, 1], children: [
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ y("planeGeometry", { args: [1, 1] }),
|
|
287
|
+
/* @__PURE__ */ y("meshBasicMaterial", { map: a, transparent: !0, toneMapped: !1, depthWrite: !1 })
|
|
287
288
|
] });
|
|
288
|
-
},
|
|
289
|
+
}, Xr = ({
|
|
289
290
|
sheet: e,
|
|
290
|
-
anchors: t =
|
|
291
|
+
anchors: t = Dt,
|
|
291
292
|
contentAspect: r,
|
|
292
293
|
renderOrder: s = 10,
|
|
293
294
|
name: a = "spriteAnimation"
|
|
294
|
-
}) => /* @__PURE__ */
|
|
295
|
-
function
|
|
296
|
-
return
|
|
295
|
+
}) => /* @__PURE__ */ y(et, { fallback: null, children: /* @__PURE__ */ y(Qe, { anchors: t, children: /* @__PURE__ */ y(Ut, { sheet: e, contentAspect: r, renderOrder: s, name: a }) }) }), Nt = 64, Lt = 3, It = /^[A-Za-z][A-Za-z0-9]{0,39}$/, Ot = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, Gt = /^(?:rgb|rgba|hsl|hsla)\([0-9a-z.,%\s/+-]{1,60}\)$/i, zt = /^-?[0-9]{1,4}(?:\.[0-9]{1,4})?(?:px|em|rem|%)?$/, qt = /^[A-Za-z0-9 ,'"_-]{1,120}$/;
|
|
296
|
+
function Wt(e) {
|
|
297
|
+
return Ot.test(e) || Gt.test(e) || zt.test(e) || qt.test(e);
|
|
297
298
|
}
|
|
298
299
|
const Ae = (e) => e.map((t) => t.replace(/[A-Z]/g, (r) => `-${r.toLowerCase()}`)).join("-");
|
|
299
|
-
function
|
|
300
|
+
function Bt(e) {
|
|
300
301
|
const t = {};
|
|
301
302
|
let r = 0;
|
|
302
303
|
const s = (a, n) => {
|
|
303
304
|
for (const o of Object.keys(a)) {
|
|
304
|
-
if (r >=
|
|
305
|
-
if (!
|
|
305
|
+
if (r >= Nt) return;
|
|
306
|
+
if (!It.test(o)) continue;
|
|
306
307
|
const c = a[o], i = [...n, o];
|
|
307
|
-
typeof c == "number" ? Number.isFinite(c) && (t[`--vincentt-${Ae(i)}`] = String(c), r++) : typeof c == "string" ?
|
|
308
|
+
typeof c == "number" ? Number.isFinite(c) && (t[`--vincentt-${Ae(i)}`] = String(c), r++) : typeof c == "string" ? Wt(c) && (t[`--vincentt-${Ae(i)}`] = c, r++) : c && typeof c == "object" && !Array.isArray(c) && i.length < Lt && s(c, i);
|
|
308
309
|
}
|
|
309
310
|
};
|
|
310
311
|
return e && typeof e == "object" && s(e, []), t;
|
|
311
312
|
}
|
|
312
|
-
function
|
|
313
|
-
const s = { display: "contents", ...
|
|
314
|
-
return /* @__PURE__ */
|
|
313
|
+
function Hr({ theme: e, className: t, children: r }) {
|
|
314
|
+
const s = { display: "contents", ...Bt(e) };
|
|
315
|
+
return /* @__PURE__ */ y("div", { className: t, style: s, children: r });
|
|
315
316
|
}
|
|
316
317
|
const ue = (e, t) => ({
|
|
317
318
|
x: (t == null ? void 0 : t.x) ?? e.x,
|
|
318
319
|
y: (t == null ? void 0 : t.y) ?? e.y,
|
|
319
320
|
z: (t == null ? void 0 : t.z) ?? e.z
|
|
320
321
|
});
|
|
321
|
-
function
|
|
322
|
+
function Kr({
|
|
322
323
|
src: e,
|
|
323
324
|
position: t,
|
|
324
325
|
rotation: r,
|
|
@@ -331,16 +332,16 @@ function Xr({
|
|
|
331
332
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
332
333
|
locked: c
|
|
333
334
|
}) {
|
|
334
|
-
const [i, l,
|
|
335
|
+
const [i, l, h] = [t == null ? void 0 : t.x, t == null ? void 0 : t.y, t == null ? void 0 : t.z], [m, f, u] = [r == null ? void 0 : r.x, r == null ? void 0 : r.y, r == null ? void 0 : r.z], [d, g, T] = [s == null ? void 0 : s.x, s == null ? void 0 : s.y, s == null ? void 0 : s.z], p = z(
|
|
335
336
|
() => ({
|
|
336
337
|
...K,
|
|
337
|
-
position: ue(K.position, { x: i, y: l, z:
|
|
338
|
-
rotation: ue(K.rotation, { x:
|
|
339
|
-
scale: ue(K.scale, { x:
|
|
338
|
+
position: ue(K.position, { x: i, y: l, z: h }),
|
|
339
|
+
rotation: ue(K.rotation, { x: m, y: f, z: u }),
|
|
340
|
+
scale: ue(K.scale, { x: d, y: g, z: T }),
|
|
340
341
|
visible: a
|
|
341
342
|
}),
|
|
342
|
-
[i, l,
|
|
343
|
-
),
|
|
343
|
+
[i, l, h, m, f, u, d, g, T, a]
|
|
344
|
+
), S = z(
|
|
344
345
|
() => ({
|
|
345
346
|
...Re,
|
|
346
347
|
assetUrl: e,
|
|
@@ -348,10 +349,10 @@ function Xr({
|
|
|
348
349
|
}),
|
|
349
350
|
[e, n]
|
|
350
351
|
);
|
|
351
|
-
return /* @__PURE__ */
|
|
352
|
+
return /* @__PURE__ */ y(Rt, { value: p, children: /* @__PURE__ */ y(At, { value: S }) });
|
|
352
353
|
}
|
|
353
|
-
const
|
|
354
|
-
const [t, r] =
|
|
354
|
+
const $t = (e) => Array.isArray(e) ? e : [e], Xt = (e) => {
|
|
355
|
+
const [t, r] = k(null);
|
|
355
356
|
return x(() => {
|
|
356
357
|
if (!e) return;
|
|
357
358
|
let s = !0, a = null;
|
|
@@ -371,7 +372,7 @@ const Bt = (e) => Array.isArray(e) ? e : [e], $t = (e) => {
|
|
|
371
372
|
};
|
|
372
373
|
}, [e]), e && (t == null ? void 0 : t.url) === e ? t.texture : null;
|
|
373
374
|
};
|
|
374
|
-
function
|
|
375
|
+
function jr({
|
|
375
376
|
colour: e,
|
|
376
377
|
texture: t,
|
|
377
378
|
size: r = 1,
|
|
@@ -383,25 +384,25 @@ function Hr({
|
|
|
383
384
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
384
385
|
locked: o
|
|
385
386
|
}) {
|
|
386
|
-
const c = A(null), i = A(/* @__PURE__ */ new Map()), l =
|
|
387
|
-
for (const [f, { original: u, own:
|
|
388
|
-
f.material = u,
|
|
387
|
+
const c = A(null), i = A(/* @__PURE__ */ new Map()), l = Xt(t), h = e !== void 0 || l !== null, m = () => {
|
|
388
|
+
for (const [f, { original: u, own: d }] of i.current)
|
|
389
|
+
f.material = u, d.forEach((g) => g.dispose());
|
|
389
390
|
i.current.clear();
|
|
390
391
|
};
|
|
391
392
|
return Pe(() => {
|
|
392
|
-
!
|
|
393
|
+
!h || !c.current || c.current.traverse((f) => {
|
|
393
394
|
const u = f;
|
|
394
395
|
if (!u.isMesh || i.current.has(u)) return;
|
|
395
|
-
const
|
|
396
|
-
var
|
|
397
|
-
const
|
|
398
|
-
return e !== void 0 && ((
|
|
396
|
+
const d = u.material, g = $t(d).map((T) => {
|
|
397
|
+
var S;
|
|
398
|
+
const p = T.clone();
|
|
399
|
+
return e !== void 0 && ((S = p.color) == null || S.set(e)), l && (p.map = l, p.needsUpdate = !0), p;
|
|
399
400
|
});
|
|
400
|
-
u.material = Array.isArray(
|
|
401
|
+
u.material = Array.isArray(d) ? g : g[0], i.current.set(u, { original: d, own: g });
|
|
401
402
|
});
|
|
402
|
-
}), x(() => (
|
|
403
|
+
}), x(() => (m(), m), [e, l]), /* @__PURE__ */ y("group", { ref: c, visible: s, scale: r, children: a });
|
|
403
404
|
}
|
|
404
|
-
function
|
|
405
|
+
function Vr({
|
|
405
406
|
className: e,
|
|
406
407
|
children: t,
|
|
407
408
|
// `name` and `locked` are editor metadata; neither changes rendering.
|
|
@@ -410,16 +411,16 @@ function Kr({
|
|
|
410
411
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
411
412
|
locked: s
|
|
412
413
|
}) {
|
|
413
|
-
return /* @__PURE__ */
|
|
414
|
+
return /* @__PURE__ */ y("div", { className: e, children: t });
|
|
414
415
|
}
|
|
415
|
-
const
|
|
416
|
-
function
|
|
416
|
+
const Ht = 2048;
|
|
417
|
+
function Kt(e) {
|
|
417
418
|
return e <= 32 || e >= 127 && e <= 160 || e === 173 || e === 92 || e === 1564 || e === 6158 || e >= 8192 && e <= 8207 || e >= 8232 && e <= 8238 || e >= 8288 && e <= 8303 || e === 12288 || e === 65279 || e >= 917504 && e <= 917631;
|
|
418
419
|
}
|
|
419
|
-
function
|
|
420
|
-
if (typeof e != "string" || e.length === 0 || e.length >
|
|
420
|
+
function jt(e) {
|
|
421
|
+
if (typeof e != "string" || e.length === 0 || e.length > Ht) return;
|
|
421
422
|
for (const s of e)
|
|
422
|
-
if (
|
|
423
|
+
if (Kt(s.codePointAt(0) ?? 0)) return;
|
|
423
424
|
const t = e.toLowerCase();
|
|
424
425
|
return t.startsWith("https://") || t.startsWith("http://") || t.startsWith("mailto:") || t.startsWith("#") || t.startsWith("/") && !t.startsWith("//") ? e : void 0;
|
|
425
426
|
}
|
|
@@ -434,44 +435,46 @@ const Fe = {
|
|
|
434
435
|
textDecoration: "none",
|
|
435
436
|
cursor: "pointer"
|
|
436
437
|
};
|
|
437
|
-
function
|
|
438
|
+
function Zr({
|
|
438
439
|
label: e,
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
440
|
+
action: t,
|
|
441
|
+
target: r,
|
|
442
|
+
link: s,
|
|
443
|
+
onTap: a,
|
|
444
|
+
color: n,
|
|
445
|
+
visible: o = !0,
|
|
446
|
+
className: c,
|
|
447
|
+
children: i,
|
|
445
448
|
// `name` and `locked` are editor metadata; neither changes rendering.
|
|
446
449
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
447
|
-
name:
|
|
450
|
+
name: l,
|
|
448
451
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
449
|
-
locked:
|
|
452
|
+
locked: h
|
|
450
453
|
}) {
|
|
451
|
-
if (!
|
|
452
|
-
const
|
|
453
|
-
if (
|
|
454
|
-
const
|
|
455
|
-
return /* @__PURE__ */
|
|
454
|
+
if (!o) return null;
|
|
455
|
+
const m = n ? { ...Fe, background: n } : Fe, f = t === "scene" && !a && typeof r == "string" && r ? r : void 0, u = t === "scene" ? void 0 : jt(s), d = f ? () => Mt(f) : a, g = i ?? e;
|
|
456
|
+
if (u) {
|
|
457
|
+
const T = /^https?:/i.test(u);
|
|
458
|
+
return /* @__PURE__ */ y(
|
|
456
459
|
"a",
|
|
457
460
|
{
|
|
458
|
-
href:
|
|
459
|
-
className:
|
|
460
|
-
style:
|
|
461
|
-
onClick:
|
|
462
|
-
...
|
|
463
|
-
children:
|
|
461
|
+
href: u,
|
|
462
|
+
className: c,
|
|
463
|
+
style: m,
|
|
464
|
+
onClick: d,
|
|
465
|
+
...T ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
466
|
+
children: g
|
|
464
467
|
}
|
|
465
468
|
);
|
|
466
469
|
}
|
|
467
|
-
return /* @__PURE__ */
|
|
470
|
+
return /* @__PURE__ */ y("button", { type: "button", className: c, style: m, onClick: d, children: g });
|
|
468
471
|
}
|
|
469
472
|
const Ce = (e, t) => ({
|
|
470
473
|
x: (t == null ? void 0 : t.x) ?? e.x,
|
|
471
474
|
y: (t == null ? void 0 : t.y) ?? e.y,
|
|
472
475
|
z: (t == null ? void 0 : t.z) ?? e.z
|
|
473
476
|
});
|
|
474
|
-
function
|
|
477
|
+
function Yr({
|
|
475
478
|
type: e = L.type,
|
|
476
479
|
color: t = L.color,
|
|
477
480
|
intensity: r = L.intensity,
|
|
@@ -482,21 +485,21 @@ function Vr({
|
|
|
482
485
|
angle: c = L.angle,
|
|
483
486
|
penumbra: i = L.penumbra,
|
|
484
487
|
position: l,
|
|
485
|
-
rotation:
|
|
486
|
-
showHelper:
|
|
488
|
+
rotation: h,
|
|
489
|
+
showHelper: m = L.showHelper,
|
|
487
490
|
// `name` and `locked` are editor metadata; neither changes rendering.
|
|
488
491
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
489
492
|
name: f,
|
|
490
493
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
491
494
|
locked: u
|
|
492
495
|
}) {
|
|
493
|
-
const [
|
|
496
|
+
const [d, g, T] = [l == null ? void 0 : l.x, l == null ? void 0 : l.y, l == null ? void 0 : l.z], [p, S, E] = [h == null ? void 0 : h.x, h == null ? void 0 : h.y, h == null ? void 0 : h.z], q = z(
|
|
494
497
|
() => ({
|
|
495
498
|
...K,
|
|
496
|
-
position: Ce(K.position, { x:
|
|
497
|
-
rotation: Ce(K.rotation, { x:
|
|
499
|
+
position: Ce(K.position, { x: d, y: g, z: T }),
|
|
500
|
+
rotation: Ce(K.rotation, { x: p, y: S, z: E })
|
|
498
501
|
}),
|
|
499
|
-
[
|
|
502
|
+
[d, g, T, p, S, E]
|
|
500
503
|
), b = z(
|
|
501
504
|
() => ({
|
|
502
505
|
enabled: s,
|
|
@@ -508,11 +511,11 @@ function Vr({
|
|
|
508
511
|
angle: c,
|
|
509
512
|
penumbra: i,
|
|
510
513
|
decay: o,
|
|
511
|
-
showHelper:
|
|
514
|
+
showHelper: m
|
|
512
515
|
}),
|
|
513
|
-
[s, e, t, r, a, n, c, i, o,
|
|
516
|
+
[s, e, t, r, a, n, c, i, o, m]
|
|
514
517
|
);
|
|
515
|
-
return /* @__PURE__ */
|
|
518
|
+
return /* @__PURE__ */ y(Tt, { settings: b, transform: q });
|
|
516
519
|
}
|
|
517
520
|
const B = (e) => {
|
|
518
521
|
switch (e) {
|
|
@@ -532,13 +535,13 @@ const B = (e) => {
|
|
|
532
535
|
case "clear":
|
|
533
536
|
return "idle";
|
|
534
537
|
}
|
|
535
|
-
},
|
|
538
|
+
}, Vt = [
|
|
536
539
|
"video/mp4",
|
|
537
540
|
"video/webm;codecs=vp9",
|
|
538
541
|
"video/webm;codecs=vp8",
|
|
539
542
|
"video/webm"
|
|
540
543
|
];
|
|
541
|
-
function
|
|
544
|
+
function Jr(e = {}) {
|
|
542
545
|
const {
|
|
543
546
|
audio: t = !1,
|
|
544
547
|
mimeType: r,
|
|
@@ -549,12 +552,12 @@ function Zr(e = {}) {
|
|
|
549
552
|
onRecordingPause: c,
|
|
550
553
|
onRecordingResume: i,
|
|
551
554
|
onRecordingStop: l,
|
|
552
|
-
onRecordingComplete:
|
|
553
|
-
onError:
|
|
555
|
+
onRecordingComplete: h,
|
|
556
|
+
onError: m,
|
|
554
557
|
passThroughStream: f
|
|
555
|
-
} = e, u = A(null),
|
|
558
|
+
} = e, u = A(null), d = A(null), g = A([]), [T, p] = k("idle"), [S, E] = k(null), [q, b] = k(null), w = F(() => {
|
|
556
559
|
var C;
|
|
557
|
-
const M = [r, ...
|
|
560
|
+
const M = [r, ...Vt].filter(Boolean);
|
|
558
561
|
for (const R of M)
|
|
559
562
|
if ((C = MediaRecorder.isTypeSupported) != null && C.call(MediaRecorder, R)) return R;
|
|
560
563
|
}, [r]), W = F(
|
|
@@ -572,16 +575,16 @@ function Zr(e = {}) {
|
|
|
572
575
|
}
|
|
573
576
|
if (!C.getTracks().length)
|
|
574
577
|
throw new Error("No tracks available in combined stream.");
|
|
575
|
-
return
|
|
578
|
+
return d.current = C, C;
|
|
576
579
|
},
|
|
577
580
|
[t]
|
|
578
581
|
), Q = F(
|
|
579
582
|
async (M, C) => {
|
|
580
|
-
|
|
583
|
+
p(B("start")), b(null), E(null);
|
|
581
584
|
try {
|
|
582
585
|
let R;
|
|
583
586
|
if (f)
|
|
584
|
-
R = f,
|
|
587
|
+
R = f, d.current = R;
|
|
585
588
|
else {
|
|
586
589
|
if (!M) throw new Error("start(stream) requires a MediaStream.");
|
|
587
590
|
R = await W(M);
|
|
@@ -591,16 +594,16 @@ function Zr(e = {}) {
|
|
|
591
594
|
const H = new MediaRecorder(R, j);
|
|
592
595
|
H.ondataavailable = (N) => {
|
|
593
596
|
var Z;
|
|
594
|
-
((Z = N.data) == null ? void 0 : Z.size) > 0 && (
|
|
597
|
+
((Z = N.data) == null ? void 0 : Z.size) > 0 && (g.current.push(N.data), a == null || a(N.data));
|
|
595
598
|
}, H.onstop = () => {
|
|
596
|
-
const N = new Blob(
|
|
599
|
+
const N = new Blob(g.current, {
|
|
597
600
|
type: v ?? "video/webm"
|
|
598
601
|
});
|
|
599
|
-
E(N), n == null || n(N),
|
|
600
|
-
}, u.current = H, H.start(C),
|
|
602
|
+
E(N), n == null || n(N), h == null || h(N), g.current = [], p(B("complete"));
|
|
603
|
+
}, u.current = H, H.start(C), p(B("started")), o == null || o();
|
|
601
604
|
} catch (R) {
|
|
602
605
|
const v = R instanceof Error ? R : new Error(String(R));
|
|
603
|
-
console.error("start(stream) failed", v), b(v),
|
|
606
|
+
console.error("start(stream) failed", v), b(v), p(B("fail")), m == null || m(v);
|
|
604
607
|
}
|
|
605
608
|
},
|
|
606
609
|
[
|
|
@@ -609,24 +612,24 @@ function Zr(e = {}) {
|
|
|
609
612
|
s,
|
|
610
613
|
a,
|
|
611
614
|
n,
|
|
612
|
-
|
|
615
|
+
h,
|
|
613
616
|
o,
|
|
614
|
-
|
|
617
|
+
m,
|
|
615
618
|
f
|
|
616
619
|
]
|
|
617
620
|
), ee = F(() => {
|
|
618
621
|
const M = u.current;
|
|
619
|
-
!M || M.state === "inactive" || (
|
|
622
|
+
!M || M.state === "inactive" || (p(B("stop")), M.stop(), l == null || l());
|
|
620
623
|
}, [l]), te = F(() => {
|
|
621
624
|
const M = u.current;
|
|
622
|
-
(M == null ? void 0 : M.state) === "recording" && (M.pause(),
|
|
625
|
+
(M == null ? void 0 : M.state) === "recording" && (M.pause(), p(B("pause")), c == null || c());
|
|
623
626
|
}, [c]), re = F(() => {
|
|
624
627
|
const M = u.current;
|
|
625
|
-
(M == null ? void 0 : M.state) === "paused" && (M.resume(),
|
|
628
|
+
(M == null ? void 0 : M.state) === "paused" && (M.resume(), p(B("resume")), i == null || i());
|
|
626
629
|
}, [i]), V = F(() => {
|
|
627
630
|
var M;
|
|
628
631
|
try {
|
|
629
|
-
u.current && (u.current.onstop = null, u.current.state !== "inactive" && u.current.stop()), u.current = null, (M =
|
|
632
|
+
u.current && (u.current.onstop = null, u.current.state !== "inactive" && u.current.stop()), u.current = null, (M = d.current) == null || M.getTracks().forEach((C) => C.stop()), d.current = null, E(null), p(B("clear")), g.current = [], b(null);
|
|
630
633
|
} catch (C) {
|
|
631
634
|
console.error("clear failed", C);
|
|
632
635
|
}
|
|
@@ -640,12 +643,12 @@ function Zr(e = {}) {
|
|
|
640
643
|
clear: V,
|
|
641
644
|
isRecording: T === "recording" || T === "paused",
|
|
642
645
|
isPaused: T === "paused",
|
|
643
|
-
recordedBlob:
|
|
646
|
+
recordedBlob: S,
|
|
644
647
|
error: q,
|
|
645
|
-
getActiveStream: () =>
|
|
648
|
+
getActiveStream: () => d.current
|
|
646
649
|
};
|
|
647
650
|
}
|
|
648
|
-
const
|
|
651
|
+
const Zt = async (e, t = {}) => {
|
|
649
652
|
var r, s, a;
|
|
650
653
|
(r = t.onCaptureStart) == null || r.call(t), await Promise.resolve();
|
|
651
654
|
try {
|
|
@@ -655,37 +658,37 @@ const Vt = async (e, t = {}) => {
|
|
|
655
658
|
const o = n instanceof Error ? n : new Error(String(n));
|
|
656
659
|
throw (a = t.onError) == null || a.call(t, o), o;
|
|
657
660
|
}
|
|
658
|
-
},
|
|
661
|
+
}, Qr = (e = {}) => {
|
|
659
662
|
const { session: t } = He(), {
|
|
660
663
|
captureFrame: r = t.captureFrame,
|
|
661
664
|
onCaptureStart: s,
|
|
662
665
|
onCaptureComplete: a,
|
|
663
666
|
onError: n
|
|
664
|
-
} = e, [o, c] =
|
|
665
|
-
c("capturing"), l(null),
|
|
667
|
+
} = e, [o, c] = k("idle"), [i, l] = k(null), [h, m] = k(null), f = F(async () => {
|
|
668
|
+
c("capturing"), l(null), m(null);
|
|
666
669
|
try {
|
|
667
|
-
const
|
|
670
|
+
const d = await Zt(r, {
|
|
668
671
|
onCaptureStart: s,
|
|
669
672
|
onCaptureComplete: a,
|
|
670
673
|
onError: n
|
|
671
674
|
});
|
|
672
|
-
return l(
|
|
673
|
-
} catch (
|
|
674
|
-
const
|
|
675
|
-
return
|
|
675
|
+
return l(d), c("completed"), d;
|
|
676
|
+
} catch (d) {
|
|
677
|
+
const g = d instanceof Error ? d : new Error(String(d));
|
|
678
|
+
return m(g), c("error"), null;
|
|
676
679
|
}
|
|
677
680
|
}, [r, s, a, n]), u = F(() => {
|
|
678
|
-
c("idle"), l(null),
|
|
681
|
+
c("idle"), l(null), m(null);
|
|
679
682
|
}, []);
|
|
680
|
-
return { status: o, capturePhoto: f, clear: u, dataUrl: i, error:
|
|
681
|
-
},
|
|
683
|
+
return { status: o, capturePhoto: f, clear: u, dataUrl: i, error: h };
|
|
684
|
+
}, es = (e, t) => {
|
|
682
685
|
const r = e.split(","), s = r[0].match(/:(.*?);/), a = s ? s[1] : "application/octet-stream", n = atob(r[r.length - 1]);
|
|
683
686
|
let o = n.length;
|
|
684
687
|
const c = new Uint8Array(o);
|
|
685
688
|
for (; o--; )
|
|
686
689
|
c[o] = n.charCodeAt(o);
|
|
687
690
|
return new File([c], t, { type: a });
|
|
688
|
-
},
|
|
691
|
+
}, Yt = 4, Jt = 50, Qt = 5e3, ae = (e) => Math.min(1, Math.max(0, e)), xe = (e) => new Promise((t) => {
|
|
689
692
|
if (e.readyState >= 4) {
|
|
690
693
|
t();
|
|
691
694
|
return;
|
|
@@ -694,18 +697,18 @@ const Vt = async (e, t = {}) => {
|
|
|
694
697
|
const s = () => {
|
|
695
698
|
r || (r = !0, t());
|
|
696
699
|
};
|
|
697
|
-
e.addEventListener("canplaythrough", s, { once: !0 }), e.addEventListener("error", s, { once: !0 }), setTimeout(s,
|
|
698
|
-
}),
|
|
700
|
+
e.addEventListener("canplaythrough", s, { once: !0 }), e.addEventListener("error", s, { once: !0 }), setTimeout(s, Qt);
|
|
701
|
+
}), _e = (e, t) => {
|
|
699
702
|
const r = document.createElement("audio");
|
|
700
703
|
return r.src = e, r.loop = t, r.preload = "auto", r.setAttribute("playsinline", ""), r.setAttribute("webkit-playsinline", ""), r.load(), r;
|
|
701
|
-
},
|
|
704
|
+
}, er = (e) => {
|
|
702
705
|
e.muted = !0, e.play().then(() => {
|
|
703
706
|
e.pause(), e.currentTime = 0, e.muted = !1;
|
|
704
707
|
}).catch(() => {
|
|
705
708
|
e.muted = !1;
|
|
706
709
|
});
|
|
707
710
|
};
|
|
708
|
-
class
|
|
711
|
+
class tr {
|
|
709
712
|
constructor(t = {}) {
|
|
710
713
|
D(this, "sfxPoolSize");
|
|
711
714
|
D(this, "coalesceMs");
|
|
@@ -720,7 +723,7 @@ class er {
|
|
|
720
723
|
D(this, "lastPlayed", /* @__PURE__ */ new Map());
|
|
721
724
|
/** Readiness promises so a loading gate can await decode/buffer. */
|
|
722
725
|
D(this, "ready", /* @__PURE__ */ new Map());
|
|
723
|
-
this.sfxPoolSize = t.sfxPoolSize ??
|
|
726
|
+
this.sfxPoolSize = t.sfxPoolSize ?? Yt, this.coalesceMs = t.coalesceMs ?? Jt;
|
|
724
727
|
}
|
|
725
728
|
/**
|
|
726
729
|
* Create + buffer the looping music element. Await in the loading gate so the
|
|
@@ -731,7 +734,7 @@ class er {
|
|
|
731
734
|
const s = ae(r);
|
|
732
735
|
if (this.musicWanted = { url: t, volume: s }, this.musicUrl === t && this.musicReady)
|
|
733
736
|
return this.music && (this.music.volume = s), this.musicReady;
|
|
734
|
-
this.music && (this.music.pause(), this.music.currentTime = 0, this.music.removeAttribute("src"), this.music.load()), this.music =
|
|
737
|
+
this.music && (this.music.pause(), this.music.currentTime = 0, this.music.removeAttribute("src"), this.music.load()), this.music = _e(t, !0), this.musicUrl = t, this.music.volume = s;
|
|
735
738
|
const a = xe(this.music);
|
|
736
739
|
return this.musicReady = a, a;
|
|
737
740
|
}
|
|
@@ -745,7 +748,7 @@ class er {
|
|
|
745
748
|
if (s) return s;
|
|
746
749
|
const a = ae(r), n = [];
|
|
747
750
|
for (let c = 0; c < this.sfxPoolSize; c += 1) {
|
|
748
|
-
const i =
|
|
751
|
+
const i = _e(t, !1);
|
|
749
752
|
i.volume = a, i.addEventListener("ended", () => {
|
|
750
753
|
i.currentTime = 0;
|
|
751
754
|
}), n.push(i);
|
|
@@ -769,7 +772,7 @@ class er {
|
|
|
769
772
|
* then start the music. All elements are already buffered, so this is instant.
|
|
770
773
|
*/
|
|
771
774
|
setMuted(t) {
|
|
772
|
-
t !== this.muted && (this.muted = t, this.muted || this.pools.forEach((r) => r.els.forEach(
|
|
775
|
+
t !== this.muted && (this.muted = t, this.muted || this.pools.forEach((r) => r.els.forEach(er)), this.applyMusic(), this.listeners.forEach((r) => r(this.muted)));
|
|
773
776
|
}
|
|
774
777
|
toggleMuted() {
|
|
775
778
|
this.setMuted(!this.muted);
|
|
@@ -813,7 +816,7 @@ class er {
|
|
|
813
816
|
}), this.muted && !this.music.paused && this.music.pause());
|
|
814
817
|
}
|
|
815
818
|
}
|
|
816
|
-
const
|
|
819
|
+
const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math.floor(r)) ? "replay" : "ended", sr = (e, t, r) => e && t !== r, ar = (e) => Math.min(100, Math.max(0, e)) / 100, ts = tt(function({
|
|
817
820
|
src: t,
|
|
818
821
|
playMode: r = "once",
|
|
819
822
|
loopCount: s = 1,
|
|
@@ -823,12 +826,12 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
823
826
|
preload: c = "auto",
|
|
824
827
|
onReady: i,
|
|
825
828
|
onPlay: l,
|
|
826
|
-
onPause:
|
|
827
|
-
onEnded:
|
|
829
|
+
onPause: h,
|
|
830
|
+
onEnded: m,
|
|
828
831
|
onError: f
|
|
829
832
|
}, u) {
|
|
830
|
-
const
|
|
831
|
-
const b =
|
|
833
|
+
const d = A(null), g = A(0), T = A(null), p = F(async () => {
|
|
834
|
+
const b = d.current;
|
|
832
835
|
if (b)
|
|
833
836
|
try {
|
|
834
837
|
await b.play();
|
|
@@ -836,47 +839,47 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
836
839
|
const W = w instanceof Error ? w : new Error(String(w));
|
|
837
840
|
throw f == null || f(W), W;
|
|
838
841
|
}
|
|
839
|
-
}, [f]),
|
|
842
|
+
}, [f]), S = F(() => {
|
|
840
843
|
var b;
|
|
841
|
-
return (b =
|
|
844
|
+
return (b = d.current) == null ? void 0 : b.pause();
|
|
842
845
|
}, []), E = F(() => {
|
|
843
|
-
const b =
|
|
844
|
-
b && (b.pause(), b.currentTime = 0,
|
|
846
|
+
const b = d.current;
|
|
847
|
+
b && (b.pause(), b.currentTime = 0, g.current = 0);
|
|
845
848
|
}, []);
|
|
846
849
|
rt(
|
|
847
850
|
u,
|
|
848
851
|
() => ({
|
|
849
|
-
play:
|
|
850
|
-
pause:
|
|
852
|
+
play: p,
|
|
853
|
+
pause: S,
|
|
851
854
|
stop: E,
|
|
852
855
|
get current() {
|
|
853
|
-
return
|
|
856
|
+
return d.current;
|
|
854
857
|
}
|
|
855
858
|
}),
|
|
856
|
-
[
|
|
859
|
+
[S, p, E]
|
|
857
860
|
), x(() => {
|
|
858
|
-
|
|
861
|
+
g.current = 0, T.current = null;
|
|
859
862
|
}, [t]), x(() => {
|
|
860
|
-
|
|
863
|
+
d.current && (d.current.volume = ar(o));
|
|
861
864
|
}, [o]), x(() => {
|
|
862
|
-
|
|
865
|
+
sr(a, T.current, t) && (T.current = t, p().catch(() => {
|
|
863
866
|
}));
|
|
864
867
|
}, [a, t]);
|
|
865
868
|
const q = F(() => {
|
|
866
|
-
|
|
869
|
+
g.current += 1;
|
|
867
870
|
const b = Math.max(1, Math.floor(s));
|
|
868
|
-
if (
|
|
869
|
-
const w =
|
|
870
|
-
w && (w.currentTime = 0,
|
|
871
|
+
if (rr(r, g.current, b) === "replay") {
|
|
872
|
+
const w = d.current;
|
|
873
|
+
w && (w.currentTime = 0, p().catch(() => {
|
|
871
874
|
}));
|
|
872
875
|
return;
|
|
873
876
|
}
|
|
874
|
-
|
|
875
|
-
}, [s,
|
|
876
|
-
return /* @__PURE__ */
|
|
877
|
+
g.current = 0, m == null || m();
|
|
878
|
+
}, [s, m, p, r]);
|
|
879
|
+
return /* @__PURE__ */ y(
|
|
877
880
|
"audio",
|
|
878
881
|
{
|
|
879
|
-
ref:
|
|
882
|
+
ref: d,
|
|
880
883
|
src: t,
|
|
881
884
|
preload: c,
|
|
882
885
|
autoPlay: !1,
|
|
@@ -886,28 +889,28 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
886
889
|
style: { display: "none" },
|
|
887
890
|
onCanPlayThrough: i,
|
|
888
891
|
onPlay: l,
|
|
889
|
-
onPause:
|
|
892
|
+
onPause: h,
|
|
890
893
|
onEnded: q,
|
|
891
894
|
onError: () => f == null ? void 0 : f(new Error(`Unable to load audio: ${t}`))
|
|
892
895
|
}
|
|
893
896
|
);
|
|
894
|
-
}), U = new
|
|
895
|
-
const [e, t] =
|
|
897
|
+
}), U = new tr(), rs = (e, t) => U.prefetchMusic(e, t), ss = (e, t) => U.registerSound(e, t), as = (e, t) => U.startMusic(e, t), ns = () => U.stopMusic(), os = (e, t) => U.playOneShot(e, t), is = (e) => U.setMuted(e), cs = () => U.toggleMuted(), ls = () => U.isMuted(), us = (e) => U.onMuteChange(e), ds = () => {
|
|
898
|
+
const [e, t] = k(U.isMuted());
|
|
896
899
|
return x(() => U.onMuteChange(t), []), e;
|
|
897
|
-
},
|
|
900
|
+
}, nr = (e = {}) => {
|
|
898
901
|
const { auto: t = !1 } = e, r = A(e.env ?? Ke()), s = A(e.constraints);
|
|
899
902
|
s.current = e.constraints;
|
|
900
|
-
const [a, n] =
|
|
901
|
-
const
|
|
902
|
-
if (
|
|
903
|
+
const [a, n] = k("unknown"), [o, c] = k(null), i = A(0), l = F(async () => {
|
|
904
|
+
const m = ++i.current, f = await je(r.current);
|
|
905
|
+
if (m !== i.current) return a;
|
|
903
906
|
const u = f.state === "unknown" ? "unknown" : f.state;
|
|
904
|
-
return n((
|
|
905
|
-
}, []),
|
|
906
|
-
async (
|
|
907
|
+
return n((d) => d === "requesting" ? d : u), u !== "blocked" && c(null), u;
|
|
908
|
+
}, []), h = F(
|
|
909
|
+
async (m) => {
|
|
907
910
|
const f = ++i.current;
|
|
908
911
|
n("requesting"), c(null);
|
|
909
912
|
const u = await Ve(
|
|
910
|
-
{ constraints: (
|
|
913
|
+
{ constraints: (m == null ? void 0 : m.constraints) ?? s.current, keepStream: !1 },
|
|
911
914
|
r.current
|
|
912
915
|
);
|
|
913
916
|
return f !== i.current || (n(u.state), c(u.reason)), u.state;
|
|
@@ -915,27 +918,27 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
915
918
|
[]
|
|
916
919
|
);
|
|
917
920
|
return x(() => {
|
|
918
|
-
let
|
|
921
|
+
let m = () => {
|
|
919
922
|
}, f = !0;
|
|
920
|
-
return t ?
|
|
921
|
-
f && (n((
|
|
923
|
+
return t ? h() : l(), Ze((u) => {
|
|
924
|
+
f && (n((d) => d === "requesting" ? d : u.state === "unknown" ? "unknown" : u.state), u.state !== "blocked" && c(null));
|
|
922
925
|
}, r.current).then((u) => {
|
|
923
|
-
f ?
|
|
926
|
+
f ? m = u : u();
|
|
924
927
|
}), () => {
|
|
925
|
-
f = !1, i.current += 1,
|
|
928
|
+
f = !1, i.current += 1, m();
|
|
926
929
|
};
|
|
927
|
-
}, [t, l,
|
|
930
|
+
}, [t, l, h]), z(
|
|
928
931
|
() => ({
|
|
929
932
|
state: a,
|
|
930
933
|
reason: o,
|
|
931
934
|
canPrompt: Ye(a),
|
|
932
935
|
usable: a === "granted",
|
|
933
|
-
request:
|
|
936
|
+
request: h,
|
|
934
937
|
refresh: l
|
|
935
938
|
}),
|
|
936
|
-
[a, o,
|
|
939
|
+
[a, o, h, l]
|
|
937
940
|
);
|
|
938
|
-
},
|
|
941
|
+
}, or = {
|
|
939
942
|
display: "flex",
|
|
940
943
|
flexDirection: "column",
|
|
941
944
|
alignItems: "center",
|
|
@@ -948,7 +951,7 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
948
951
|
background: "#111827",
|
|
949
952
|
color: "#f9fafb",
|
|
950
953
|
fontFamily: "system-ui, sans-serif"
|
|
951
|
-
},
|
|
954
|
+
}, ir = {
|
|
952
955
|
font: "inherit",
|
|
953
956
|
padding: "10px 18px",
|
|
954
957
|
borderRadius: 8,
|
|
@@ -956,48 +959,48 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
956
959
|
background: "#2563eb",
|
|
957
960
|
color: "#fff",
|
|
958
961
|
cursor: "pointer"
|
|
959
|
-
},
|
|
962
|
+
}, ms = ({
|
|
960
963
|
children: e,
|
|
961
964
|
fallback: t,
|
|
962
965
|
auto: r = !1,
|
|
963
966
|
constraints: s,
|
|
964
967
|
requestLabel: a = "Allow camera"
|
|
965
968
|
}) => {
|
|
966
|
-
const n =
|
|
967
|
-
if (n.usable) return /* @__PURE__ */
|
|
968
|
-
if (t) return /* @__PURE__ */
|
|
969
|
+
const n = nr({ auto: r, constraints: s });
|
|
970
|
+
if (n.usable) return /* @__PURE__ */ y(ne, { children: e });
|
|
971
|
+
if (t) return /* @__PURE__ */ y(ne, { children: t(n) });
|
|
969
972
|
const { state: o, reason: c, canPrompt: i, request: l } = n;
|
|
970
|
-
return /* @__PURE__ */ O("div", { style:
|
|
971
|
-
/* @__PURE__ */
|
|
972
|
-
/* @__PURE__ */
|
|
973
|
+
return /* @__PURE__ */ O("div", { style: or, role: "region", "aria-label": "Camera access", children: [
|
|
974
|
+
/* @__PURE__ */ y("p", { "aria-live": "polite", style: { margin: 0 }, children: (c == null ? void 0 : c.message) ?? Je[o] }),
|
|
975
|
+
/* @__PURE__ */ y(
|
|
973
976
|
"button",
|
|
974
977
|
{
|
|
975
978
|
type: "button",
|
|
976
979
|
onClick: () => void l(),
|
|
977
980
|
disabled: !i || o === "requesting",
|
|
978
981
|
"aria-disabled": !i || o === "requesting",
|
|
979
|
-
style: { ...
|
|
982
|
+
style: { ...ir, opacity: i && o !== "requesting" ? 1 : 0.5 },
|
|
980
983
|
children: o === "requesting" ? "Waiting…" : o === "denied" ? "Try again" : a
|
|
981
984
|
}
|
|
982
985
|
)
|
|
983
986
|
] });
|
|
984
|
-
},
|
|
987
|
+
}, cr = () => {
|
|
985
988
|
var e;
|
|
986
989
|
return {
|
|
987
990
|
enumerateDevices: typeof navigator < "u" && ((e = navigator.mediaDevices) != null && e.enumerateDevices) ? () => navigator.mediaDevices.enumerateDevices() : void 0
|
|
988
991
|
};
|
|
989
|
-
},
|
|
992
|
+
}, lr = /\b(back|rear|environment|world)\b/i, ur = /\b(front|user|facetime|selfie)\b/i, dr = (e) => lr.test(e) ? "environment" : ur.test(e) ? "user" : null, fs = async (e = cr()) => {
|
|
990
993
|
if (!e.enumerateDevices) return [];
|
|
991
994
|
try {
|
|
992
995
|
return (await e.enumerateDevices()).filter((r) => r.kind === "videoinput").map((r) => ({
|
|
993
996
|
deviceId: r.deviceId,
|
|
994
997
|
label: r.label,
|
|
995
|
-
facing:
|
|
998
|
+
facing: dr(r.label)
|
|
996
999
|
}));
|
|
997
1000
|
} catch {
|
|
998
1001
|
return [];
|
|
999
1002
|
}
|
|
1000
|
-
},
|
|
1003
|
+
}, ps = (e, t) => e.find((r) => r.facing === t) ?? null, Ie = at(null), hs = ({
|
|
1001
1004
|
cache: e,
|
|
1002
1005
|
disposeUnreferencedOnUnmount: t = !0,
|
|
1003
1006
|
children: r
|
|
@@ -1005,9 +1008,9 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1005
1008
|
const s = e ?? Ne();
|
|
1006
1009
|
return x(() => () => {
|
|
1007
1010
|
t && s.disposeUnreferenced();
|
|
1008
|
-
}, [s, t]), /* @__PURE__ */
|
|
1009
|
-
}, Oe = () => st(Ie) ?? Ne(),
|
|
1010
|
-
const { enabled: r = !0 } = t, s = Oe(), a = nt(), n = (e == null ? void 0 : e.key) ?? null, [o, c] =
|
|
1011
|
+
}, [s, t]), /* @__PURE__ */ y(Ie.Provider, { value: s, children: r });
|
|
1012
|
+
}, Oe = () => st(Ie) ?? Ne(), gs = (e, t = {}) => {
|
|
1013
|
+
const { enabled: r = !0 } = t, s = Oe(), a = nt(), n = (e == null ? void 0 : e.key) ?? null, [o, c] = k({
|
|
1011
1014
|
value: null,
|
|
1012
1015
|
status: "idle",
|
|
1013
1016
|
error: null
|
|
@@ -1019,15 +1022,15 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1019
1022
|
}
|
|
1020
1023
|
let i = !0;
|
|
1021
1024
|
const l = s.get(e.key);
|
|
1022
|
-
return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }), s.acquire(e, a).then((
|
|
1023
|
-
i && c({ value:
|
|
1024
|
-
}).catch((
|
|
1025
|
-
i && c({ value: null, status: "error", error:
|
|
1025
|
+
return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }), s.acquire(e, a).then((h) => {
|
|
1026
|
+
i && c({ value: h, status: "ready", error: null });
|
|
1027
|
+
}).catch((h) => {
|
|
1028
|
+
i && c({ value: null, status: "error", error: h });
|
|
1026
1029
|
}), () => {
|
|
1027
1030
|
i = !1, s.release(e.key, a);
|
|
1028
1031
|
};
|
|
1029
1032
|
}, [s, n, r, a]), o;
|
|
1030
|
-
},
|
|
1033
|
+
}, ys = (e) => {
|
|
1031
1034
|
const t = Oe(), r = e ?? t;
|
|
1032
1035
|
return ot(
|
|
1033
1036
|
(s) => r.subscribe(s),
|
|
@@ -1068,7 +1071,7 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1068
1071
|
return n(`${a}: not a number, kept ${t}`), t;
|
|
1069
1072
|
const o = Math.min(s, Math.max(r, e));
|
|
1070
1073
|
return o !== e && n(`${a}: ${e} clamped to ${o}`), o;
|
|
1071
|
-
}, Y = (e, t, r, s) => e === void 0 ? t : e === null ? null : typeof e != "number" || !Number.isFinite(e) || e <= 0 ? (s(`${r}: invalid fps, kept ${t}`), t) : (e > 120 && s(`${r}: ${e} clamped to 120`), Math.min(120, e)),
|
|
1074
|
+
}, Y = (e, t, r, s) => e === void 0 ? t : e === null ? null : typeof e != "number" || !Number.isFinite(e) || e <= 0 ? (s(`${r}: invalid fps, kept ${t}`), t) : (e > 120 && s(`${r}: ${e} clamped to 120`), Math.min(120, e)), mr = [
|
|
1072
1075
|
"tiers",
|
|
1073
1076
|
"budget",
|
|
1074
1077
|
"initialTier",
|
|
@@ -1076,13 +1079,13 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1076
1079
|
"maxTier",
|
|
1077
1080
|
"adaptive",
|
|
1078
1081
|
"historySize"
|
|
1079
|
-
],
|
|
1082
|
+
], ke = (e) => {
|
|
1080
1083
|
const t = {};
|
|
1081
|
-
for (const r of
|
|
1084
|
+
for (const r of mr) e[r] !== void 0 && (t[r] = e[r]);
|
|
1082
1085
|
return t;
|
|
1083
1086
|
}, I = (e, t, r, s) => e === void 0 ? t : typeof e != "boolean" ? (s(`${r}: not a boolean, kept ${t}`), t) : e, $ = (e, t, r, s, a) => e === void 0 ? r : t.includes(e) ? e : (a(`${s}: "${String(e)}" is not one of ${t.join(" | ")}, kept ${r}`), r), ve = (e, t, r, s) => e === void 0 ? t : e === null ? null : typeof e != "string" || !/^https?:\/\//.test(e) ? (s(`${r}: not an http(s) URL, kept ${t === null ? "the SDK default" : t}`), t) : e, X = (e = {}, t = Ge, r = []) => {
|
|
1084
|
-
var c, i, l,
|
|
1085
|
-
const s = (We) => r.push(We), a = e.trackers ?? {}, n = t.trackers, o = e.quality === void 0 ? t.quality === !1 ? !1 :
|
|
1087
|
+
var c, i, l, h, m, f, u, d, g, T, p, S, E, q, b, w, W, Q, ee, te, re, V, M, C, R, v, j, H, N, Z, fe, pe, he, ge, ye, Se, Te, Me;
|
|
1088
|
+
const s = (We) => r.push(We), a = e.trackers ?? {}, n = t.trackers, o = e.quality === void 0 ? t.quality === !1 ? !1 : ke(t.quality) : e.quality === !1 ? !1 : typeof e.quality == "object" && e.quality !== null ? ke(e.quality) : (s("quality: must be an object or false, kept base"), t.quality);
|
|
1086
1089
|
return {
|
|
1087
1090
|
version: oe,
|
|
1088
1091
|
trackers: {
|
|
@@ -1092,9 +1095,9 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1092
1095
|
P((i = a.face) == null ? void 0 : i.numFaces, n.face.numFaces, 1, 10, "trackers.face.numFaces", s)
|
|
1093
1096
|
),
|
|
1094
1097
|
targetFps: Y((l = a.face) == null ? void 0 : l.targetFps, n.face.targetFps, "trackers.face.targetFps", s),
|
|
1095
|
-
holdMs: P((
|
|
1098
|
+
holdMs: P((h = a.face) == null ? void 0 : h.holdMs, n.face.holdMs, 0, 5e3, "trackers.face.holdMs", s),
|
|
1096
1099
|
predictMs: P(
|
|
1097
|
-
(
|
|
1100
|
+
(m = a.face) == null ? void 0 : m.predictMs,
|
|
1098
1101
|
n.face.predictMs,
|
|
1099
1102
|
0,
|
|
1100
1103
|
1e3,
|
|
@@ -1112,10 +1115,10 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1112
1115
|
},
|
|
1113
1116
|
hand: {
|
|
1114
1117
|
enabled: I((u = a.hand) == null ? void 0 : u.enabled, n.hand.enabled, "trackers.hand.enabled", s),
|
|
1115
|
-
targetFps: Y((
|
|
1118
|
+
targetFps: Y((d = a.hand) == null ? void 0 : d.targetFps, n.hand.targetFps, "trackers.hand.targetFps", s)
|
|
1116
1119
|
},
|
|
1117
1120
|
gesture: {
|
|
1118
|
-
enabled: I((
|
|
1121
|
+
enabled: I((g = a.gesture) == null ? void 0 : g.enabled, n.gesture.enabled, "trackers.gesture.enabled", s),
|
|
1119
1122
|
targetFps: Y(
|
|
1120
1123
|
(T = a.gesture) == null ? void 0 : T.targetFps,
|
|
1121
1124
|
n.gesture.targetFps,
|
|
@@ -1124,8 +1127,8 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1124
1127
|
)
|
|
1125
1128
|
},
|
|
1126
1129
|
body: {
|
|
1127
|
-
enabled: I((
|
|
1128
|
-
targetFps: Y((
|
|
1130
|
+
enabled: I((p = a.body) == null ? void 0 : p.enabled, n.body.enabled, "trackers.body.enabled", s),
|
|
1131
|
+
targetFps: Y((S = a.body) == null ? void 0 : S.targetFps, n.body.targetFps, "trackers.body.targetFps", s)
|
|
1129
1132
|
},
|
|
1130
1133
|
holistic: {
|
|
1131
1134
|
enabled: I((E = a.holistic) == null ? void 0 : E.enabled, n.holistic.enabled, "trackers.holistic.enabled", s),
|
|
@@ -1214,7 +1217,7 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1214
1217
|
),
|
|
1215
1218
|
preset: $(
|
|
1216
1219
|
(R = a.semanticSegmentation) == null ? void 0 : R.preset,
|
|
1217
|
-
|
|
1220
|
+
Ft,
|
|
1218
1221
|
n.semanticSegmentation.preset,
|
|
1219
1222
|
"trackers.semanticSegmentation.preset",
|
|
1220
1223
|
s
|
|
@@ -1316,7 +1319,7 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1316
1319
|
return a && t.push(
|
|
1317
1320
|
`migrated from version ${String(s.version ?? "none")} to ${oe}`
|
|
1318
1321
|
), { config: X(s, Ge, t), migrated: a, warnings: t };
|
|
1319
|
-
},
|
|
1322
|
+
}, Ss = [
|
|
1320
1323
|
"face",
|
|
1321
1324
|
"hand",
|
|
1322
1325
|
"gesture",
|
|
@@ -1324,7 +1327,7 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1324
1327
|
"holistic",
|
|
1325
1328
|
"segmentation",
|
|
1326
1329
|
"semanticSegmentation"
|
|
1327
|
-
],
|
|
1330
|
+
], fr = (e) => ({
|
|
1328
1331
|
perf: {
|
|
1329
1332
|
targetFps: e.perf.targetFps > 0 ? e.perf.targetFps : void 0,
|
|
1330
1333
|
camRes: e.perf.camRes,
|
|
@@ -1333,11 +1336,11 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1333
1336
|
},
|
|
1334
1337
|
lifecycle: { pauseWhenHidden: e.lifecycle.pauseWhenHidden },
|
|
1335
1338
|
quality: e.quality
|
|
1336
|
-
}),
|
|
1339
|
+
}), pr = (e) => ({
|
|
1337
1340
|
facingMode: e.camera.facingMode,
|
|
1338
1341
|
...e.camera.deviceId ? { deviceId: e.camera.deviceId } : {},
|
|
1339
1342
|
...e.camera.mirrored === "auto" ? {} : { mirrored: e.camera.mirrored }
|
|
1340
|
-
}), G = (e) => e === null ? {} : { targetFps: e },
|
|
1343
|
+
}), G = (e) => e === null ? {} : { targetFps: e }, hr = (e, t) => {
|
|
1341
1344
|
const r = e.trackers;
|
|
1342
1345
|
return {
|
|
1343
1346
|
face: {
|
|
@@ -1369,18 +1372,18 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1369
1372
|
active: r.semanticSegmentation.enabled
|
|
1370
1373
|
}
|
|
1371
1374
|
}[t];
|
|
1372
|
-
},
|
|
1375
|
+
}, gr = (e, t) => {
|
|
1373
1376
|
const r = e.trackers;
|
|
1374
1377
|
switch (t) {
|
|
1375
|
-
case
|
|
1378
|
+
case _.FACE_TRACKER:
|
|
1376
1379
|
return { numFaces: r.face.numFaces, ...G(r.face.targetFps) };
|
|
1377
|
-
case
|
|
1380
|
+
case _.HAND_TRACKER:
|
|
1378
1381
|
return { ...G(r.hand.targetFps) };
|
|
1379
|
-
case
|
|
1382
|
+
case _.GESTURE_TRACKER:
|
|
1380
1383
|
return { ...G(r.gesture.targetFps) };
|
|
1381
|
-
case
|
|
1384
|
+
case _.BODY_TRACKER:
|
|
1382
1385
|
return { ...G(r.body.targetFps) };
|
|
1383
|
-
case
|
|
1386
|
+
case _.HOLISTIC_TRACKER: {
|
|
1384
1387
|
const s = r.holistic;
|
|
1385
1388
|
return {
|
|
1386
1389
|
...G(s.targetFps),
|
|
@@ -1398,9 +1401,9 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1398
1401
|
...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {}
|
|
1399
1402
|
};
|
|
1400
1403
|
}
|
|
1401
|
-
case
|
|
1404
|
+
case _.BACKGROUND_SEGMENTATION:
|
|
1402
1405
|
return { quality: r.segmentation.quality };
|
|
1403
|
-
case
|
|
1406
|
+
case _.SEMANTIC_SEGMENTATION:
|
|
1404
1407
|
return {
|
|
1405
1408
|
preset: r.semanticSegmentation.preset,
|
|
1406
1409
|
quality: r.semanticSegmentation.quality,
|
|
@@ -1409,16 +1412,16 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1409
1412
|
default:
|
|
1410
1413
|
return {};
|
|
1411
1414
|
}
|
|
1412
|
-
},
|
|
1415
|
+
}, yr = (e) => {
|
|
1413
1416
|
const t = e.trackers, r = [];
|
|
1414
|
-
return t.face.enabled && r.push(
|
|
1417
|
+
return t.face.enabled && r.push(_.FACE_TRACKER), t.hand.enabled && r.push(_.HAND_TRACKER), t.gesture.enabled && r.push(_.GESTURE_TRACKER), t.body.enabled && r.push(_.BODY_TRACKER), t.holistic.enabled && r.push(_.HOLISTIC_TRACKER), t.segmentation.enabled && r.push(_.BACKGROUND_SEGMENTATION), t.semanticSegmentation.enabled && r.push(_.SEMANTIC_SEGMENTATION), r;
|
|
1415
1418
|
}, ie = "vincentt.xr.tracking-config", me = () => {
|
|
1416
1419
|
try {
|
|
1417
1420
|
return typeof localStorage < "u" ? localStorage : null;
|
|
1418
1421
|
} catch {
|
|
1419
1422
|
return null;
|
|
1420
1423
|
}
|
|
1421
|
-
},
|
|
1424
|
+
}, Sr = (e = ie, t = me()) => {
|
|
1422
1425
|
if (!t) return null;
|
|
1423
1426
|
try {
|
|
1424
1427
|
const r = t.getItem(e);
|
|
@@ -1433,250 +1436,251 @@ const tr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1433
1436
|
} catch {
|
|
1434
1437
|
return !1;
|
|
1435
1438
|
}
|
|
1436
|
-
},
|
|
1439
|
+
}, Tr = (e = ie, t = me()) => {
|
|
1437
1440
|
if (t)
|
|
1438
1441
|
try {
|
|
1439
1442
|
t.removeItem(e);
|
|
1440
1443
|
} catch {
|
|
1441
1444
|
}
|
|
1442
|
-
},
|
|
1443
|
-
const { storageKey: t = ie, persist: r = !0 } = e, s = e.storage, a = A(e.initial), n = z(() => X(a.current ?? {}), []), [o, c] =
|
|
1445
|
+
}, Ts = (e = {}) => {
|
|
1446
|
+
const { storageKey: t = ie, persist: r = !0 } = e, s = e.storage, a = A(e.initial), n = z(() => X(a.current ?? {}), []), [o, c] = k(n), [i, l] = k([]), [h, m] = k(!r), f = A(o);
|
|
1444
1447
|
f.current = o, x(() => {
|
|
1445
1448
|
if (!r) {
|
|
1446
|
-
|
|
1449
|
+
m(!0);
|
|
1447
1450
|
return;
|
|
1448
1451
|
}
|
|
1449
|
-
const
|
|
1450
|
-
if (
|
|
1451
|
-
const
|
|
1452
|
-
f.current =
|
|
1452
|
+
const p = Sr(t, s);
|
|
1453
|
+
if (p) {
|
|
1454
|
+
const S = X(p.config, n);
|
|
1455
|
+
f.current = S, c(S), l(p.warnings), p.migrated && De(S, t, s);
|
|
1453
1456
|
}
|
|
1454
|
-
|
|
1457
|
+
m(!0);
|
|
1455
1458
|
}, [r, t, s, n]);
|
|
1456
1459
|
const u = F(
|
|
1457
|
-
(
|
|
1460
|
+
(p, S) => (f.current = p, c(p), l(S), r && De(p, t, s), p),
|
|
1458
1461
|
[r, t, s]
|
|
1459
|
-
),
|
|
1460
|
-
(
|
|
1461
|
-
const
|
|
1462
|
-
return u(E,
|
|
1462
|
+
), d = F(
|
|
1463
|
+
(p) => {
|
|
1464
|
+
const S = [], E = X({ ...p, updatedAt: Date.now() }, f.current, S);
|
|
1465
|
+
return u(E, S);
|
|
1463
1466
|
},
|
|
1464
1467
|
[u]
|
|
1465
|
-
),
|
|
1466
|
-
const
|
|
1467
|
-
return f.current =
|
|
1468
|
+
), g = F(() => {
|
|
1469
|
+
const p = we(n, {}, 0);
|
|
1470
|
+
return f.current = p, c(p), l([]), r && Tr(t, s), p;
|
|
1468
1471
|
}, [n, r, t, s]), T = F(
|
|
1469
|
-
(
|
|
1470
|
-
const
|
|
1471
|
-
return
|
|
1472
|
+
(p) => {
|
|
1473
|
+
const S = qe(p);
|
|
1474
|
+
return S.warnings.some((E) => E.startsWith("not valid JSON") || E.startsWith("not an object")) ? (l([`import: ${S.warnings[0]}; config unchanged`]), f.current) : u(we(S.config, {}, Date.now()), S.warnings);
|
|
1472
1475
|
},
|
|
1473
1476
|
[u]
|
|
1474
1477
|
);
|
|
1475
1478
|
return z(
|
|
1476
1479
|
() => ({
|
|
1477
1480
|
config: o,
|
|
1478
|
-
hydrated:
|
|
1481
|
+
hydrated: h,
|
|
1479
1482
|
warnings: i,
|
|
1480
|
-
update:
|
|
1481
|
-
reset:
|
|
1483
|
+
update: d,
|
|
1484
|
+
reset: g,
|
|
1482
1485
|
importJson: T,
|
|
1483
1486
|
json: ze(o),
|
|
1484
|
-
providerProps:
|
|
1485
|
-
cameraRequest:
|
|
1486
|
-
trackerProps: (
|
|
1487
|
-
modelOptions: (
|
|
1488
|
-
enabledModels:
|
|
1487
|
+
providerProps: fr(o),
|
|
1488
|
+
cameraRequest: pr(o),
|
|
1489
|
+
trackerProps: (p) => hr(o, p),
|
|
1490
|
+
modelOptions: (p) => gr(o, p),
|
|
1491
|
+
enabledModels: yr(o)
|
|
1489
1492
|
}),
|
|
1490
|
-
[o,
|
|
1493
|
+
[o, h, i, d, g, T]
|
|
1491
1494
|
);
|
|
1492
1495
|
};
|
|
1493
1496
|
export {
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1497
|
+
Br as AspectRatioContainer,
|
|
1498
|
+
tr as AudioEngine,
|
|
1499
|
+
ts as AudioPlayer,
|
|
1500
|
+
$r as Axes,
|
|
1501
|
+
Zr as Button,
|
|
1499
1502
|
Je as CAMERA_PERMISSION_MESSAGES,
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
+
ms as CameraPermissionGate,
|
|
1504
|
+
_n as DEFAULT_ASSET_BUDGET_BYTES,
|
|
1505
|
+
un as DEFAULT_MATERIAL_FILL,
|
|
1503
1506
|
Re as DEFAULT_MESH_RENDERER,
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1507
|
+
En as DEFAULT_MESH_RENDERER_RENDER_STATE,
|
|
1508
|
+
bs as DEFAULT_PERFORMANCE_BUDGET,
|
|
1509
|
+
Rs as DEFAULT_PIXEL_SNAP_INCREMENT,
|
|
1510
|
+
As as DEFAULT_QUALITY_TIERS,
|
|
1511
|
+
Fs as DEFAULT_REFERENCE_PIXELS_PER_UNIT,
|
|
1512
|
+
Pa as DEFAULT_SCREEN_GLASS,
|
|
1513
|
+
dn as DEFAULT_SCREEN_GRADIENT,
|
|
1514
|
+
Ua as DEFAULT_SCREEN_IMAGE_SCENE_SETTINGS,
|
|
1515
|
+
Na as DEFAULT_SCREEN_IMAGE_SETTINGS,
|
|
1516
|
+
La as DEFAULT_SCREEN_SHAPE_SETTINGS,
|
|
1517
|
+
Ia as DEFAULT_SCREEN_TEXT_SCENE_SETTINGS,
|
|
1518
|
+
Oa as DEFAULT_SCREEN_TEXT_SHADOW_LAYER,
|
|
1519
|
+
Cs as DEFAULT_SCREEN_TRANSFORM_2D,
|
|
1520
|
+
xs as DEFAULT_SCREEN_TRANSFORM_ROOT,
|
|
1518
1521
|
Ge as DEFAULT_TRACKING_CONFIG,
|
|
1519
1522
|
K as DEFAULT_TRANSFORM_3D,
|
|
1520
|
-
|
|
1523
|
+
mn as EXTERNAL_BACKGROUND_RENDER_LAYER,
|
|
1521
1524
|
gt as FULL_SCREEN_ANCHORS,
|
|
1522
|
-
|
|
1523
|
-
|
|
1525
|
+
Vr as HtmlRegion,
|
|
1526
|
+
Yr as Light,
|
|
1524
1527
|
Tt as LightObject,
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1528
|
+
Ja as LookAt,
|
|
1529
|
+
fn as MAX_RENDER_GROUP_PASSES,
|
|
1530
|
+
pn as MaterialFill,
|
|
1531
|
+
An as MeshMaterial,
|
|
1532
|
+
At as MeshRenderer,
|
|
1533
|
+
Kr as Model,
|
|
1534
|
+
jr as Object3D,
|
|
1535
|
+
zr as Panel,
|
|
1536
|
+
Wr as PersonCutout,
|
|
1537
|
+
Ga as PinToMesh,
|
|
1538
|
+
Qa as RenderGroupLayer,
|
|
1539
|
+
en as SCREEN_IMAGE_MASK_CHANNELS,
|
|
1540
|
+
nn as Scene,
|
|
1541
|
+
tn as SceneObjectRenderer,
|
|
1542
|
+
on as Scenes,
|
|
1543
|
+
za as ScreenGlassMaterial,
|
|
1544
|
+
hn as ScreenGradientMaterial,
|
|
1542
1545
|
yt as ScreenImage,
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
+
qa as ScreenShape,
|
|
1547
|
+
va as ScreenSpaceUI,
|
|
1548
|
+
rn as ScreenText,
|
|
1546
1549
|
Qe as ScreenTransform,
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
+
sn as SequentialRenderPasses,
|
|
1551
|
+
Xr as SpriteAnimation,
|
|
1552
|
+
Ss as TRACKER_KINDS,
|
|
1550
1553
|
ie as TRACKING_CONFIG_STORAGE_KEY,
|
|
1551
1554
|
oe as TRACKING_CONFIG_VERSION,
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1555
|
+
wa as TextLabel,
|
|
1556
|
+
Hr as ThemeProvider,
|
|
1557
|
+
Rt as Transform3D,
|
|
1558
|
+
qr as VideoBackground,
|
|
1559
|
+
kn as XRAssetCache,
|
|
1560
|
+
hs as XRAssetCacheProvider,
|
|
1561
|
+
_s as XRMediaSource,
|
|
1562
|
+
_ as XRModel,
|
|
1563
|
+
ks as XRProvider,
|
|
1564
|
+
vs as XRQualityController,
|
|
1565
|
+
_a as XRScene,
|
|
1566
|
+
ws as XR_FALLBACK_MESSAGES,
|
|
1567
|
+
Ds as XR_MODEL_ASSET_URLS,
|
|
1565
1568
|
U as audio,
|
|
1566
1569
|
Ye as canPromptForCamera,
|
|
1567
|
-
|
|
1568
|
-
|
|
1570
|
+
Tr as clearTrackingConfig,
|
|
1571
|
+
Ps as clientToScreenPixels,
|
|
1569
1572
|
St as computeContainScale,
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1573
|
+
Us as computeFeedCrop,
|
|
1574
|
+
Ns as computeFitLayout,
|
|
1575
|
+
vn as createAssetCache,
|
|
1576
|
+
Ls as createFallbackReason,
|
|
1577
|
+
gn as createTwoStopGradient,
|
|
1578
|
+
es as dataURLtoFile,
|
|
1579
|
+
Pn as defineGltfAsset,
|
|
1580
|
+
Un as defineTextureAsset,
|
|
1581
|
+
Nn as defineVideoAsset,
|
|
1582
|
+
Is as detectXRCapabilities,
|
|
1583
|
+
Ln as disposeObject3D,
|
|
1584
|
+
ja as drawNormalizedCrop,
|
|
1585
|
+
yr as enabledModels,
|
|
1586
|
+
In as estimateGeometryBytes,
|
|
1587
|
+
On as estimateObjectBytes,
|
|
1588
|
+
Gn as estimateTextureBytes,
|
|
1589
|
+
Os as feedSidedName,
|
|
1590
|
+
Gs as feedToScreenPixels,
|
|
1591
|
+
zs as feedToSource,
|
|
1592
|
+
qs as feedToTracker,
|
|
1593
|
+
Ws as feedToViewport,
|
|
1594
|
+
Bs as feedToWorld,
|
|
1595
|
+
ps as findCameraByFacing,
|
|
1593
1596
|
Ne as getDefaultAssetCache,
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
$
|
|
1604
|
-
|
|
1605
|
-
|
|
1597
|
+
yn as getRenderGroupLayer,
|
|
1598
|
+
Mt as goToScene,
|
|
1599
|
+
$s as isFeedPointInSource,
|
|
1600
|
+
Xs as isMirroredSourceKind,
|
|
1601
|
+
ls as isMuted,
|
|
1602
|
+
fs as listCameras,
|
|
1603
|
+
Sr as loadTrackingConfig,
|
|
1604
|
+
Wa as mapScreenImageSettingsToProps,
|
|
1605
|
+
Ba as mapScreenTextInnerShadowToProps,
|
|
1606
|
+
$a as mapScreenTextSettingsToProps,
|
|
1607
|
+
Hs as mediaToScreenPixels,
|
|
1608
|
+
Xa as mergeScreenShapeSettings,
|
|
1609
|
+
Ks as mergeScreenTransform2D,
|
|
1606
1610
|
we as mergeTrackingConfig,
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1611
|
+
js as mirrorFeedX,
|
|
1612
|
+
bn as normalizeMeshRendererRenderState,
|
|
1613
|
+
Ha as normalizeScreenGlass,
|
|
1614
|
+
Sn as normalizeScreenGradient,
|
|
1615
|
+
Vs as normalizedToScreenPixels,
|
|
1616
|
+
Zs as normalizedToTransform2DPixels,
|
|
1617
|
+
us as onMuteChange,
|
|
1618
|
+
Ys as orientSourcePoint,
|
|
1619
|
+
Js as orientedSize,
|
|
1620
|
+
Qs as otherSide,
|
|
1617
1621
|
qe as parseTrackingConfig,
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
+
ea as personLeftSign,
|
|
1623
|
+
ta as personSide,
|
|
1624
|
+
os as playOneShot,
|
|
1625
|
+
rs as prefetchMusic,
|
|
1622
1626
|
je as queryCameraPermission,
|
|
1623
|
-
|
|
1624
|
-
|
|
1627
|
+
ss as registerSound,
|
|
1628
|
+
Tn as renderSequentialPasses,
|
|
1625
1629
|
Ve as requestCameraAccess,
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1630
|
+
ra as resolveModelAssetUrl,
|
|
1631
|
+
Va as resolveNormalizedCrop,
|
|
1632
|
+
Za as resolvePersonCutoutStatus,
|
|
1633
|
+
sa as resolveQualityConfig,
|
|
1634
|
+
aa as resolveScreenTransform2D,
|
|
1635
|
+
na as resolveTrackerSupport,
|
|
1632
1636
|
X as resolveTrackingConfig,
|
|
1633
1637
|
De as saveTrackingConfig,
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1638
|
+
oa as screenPixelsToClient,
|
|
1639
|
+
ia as screenPixelsToFeed,
|
|
1640
|
+
ca as screenPixelsToMedia,
|
|
1641
|
+
la as screenPixelsToNormalized,
|
|
1642
|
+
ua as screenPixelsToScreenSpace,
|
|
1643
|
+
da as screenPixelsToUnits,
|
|
1644
|
+
ma as screenPointToRay,
|
|
1645
|
+
fa as screenSpaceToScreenPixels,
|
|
1646
|
+
pa as screenTransform2DScale,
|
|
1647
|
+
ha as screenUnitsToPixels,
|
|
1644
1648
|
ze as serializeTrackingConfig,
|
|
1645
|
-
|
|
1649
|
+
is as setMuted,
|
|
1646
1650
|
ht as shouldDrawFallback,
|
|
1647
1651
|
J as smoothNumber,
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1652
|
+
Or as smoothVector2,
|
|
1653
|
+
Gr as smoothVector3,
|
|
1654
|
+
ga as sourceToFeed,
|
|
1655
|
+
as as startMusic,
|
|
1656
|
+
ns as stopMusic,
|
|
1653
1657
|
Ze as subscribeCameraPermission,
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1658
|
+
ya as swapSidedName,
|
|
1659
|
+
pr as toCameraRequest,
|
|
1660
|
+
gr as toModelOptions,
|
|
1661
|
+
fr as toProviderProps,
|
|
1662
|
+
hr as toTrackerProps,
|
|
1663
|
+
cs as toggleMuted,
|
|
1664
|
+
Sa as trackerPointToScreenPixels,
|
|
1665
|
+
Ta as trackerToFeed,
|
|
1666
|
+
Ma as trackerToWorld,
|
|
1667
|
+
Ea as transform2DPixelsToNormalized,
|
|
1668
|
+
nr as useCameraPermission,
|
|
1669
|
+
Qr as useFrameCapture,
|
|
1670
|
+
Jr as useMediaRecorder,
|
|
1671
|
+
ds as useMuted,
|
|
1668
1672
|
pt as usePersonMaskTexture,
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1673
|
+
cn as useSceneSample,
|
|
1674
|
+
bt as useScreenRectAspect,
|
|
1675
|
+
gs as useXRAsset,
|
|
1672
1676
|
Oe as useXRAssetCache,
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1677
|
+
ys as useXRAssetStats,
|
|
1678
|
+
Cn as useXRCapabilities,
|
|
1679
|
+
wn as useXRQuality,
|
|
1680
|
+
Ts as useXRTrackingConfig,
|
|
1681
|
+
ba as viewportSizeToTransform2DPixels,
|
|
1682
|
+
Ra as viewportToFeed,
|
|
1683
|
+
Aa as worldToFeed,
|
|
1684
|
+
Fa as worldToScreenPixels,
|
|
1685
|
+
Ca as worldToTracker
|
|
1682
1686
|
};
|