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