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