@vincentt-xr/sdk 2.0.0-alpha.20 → 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 +770 -762
- 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
|
|
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 { d as
|
|
21
|
-
import { g as
|
|
22
|
-
import { a as
|
|
23
|
-
import { useTexture as
|
|
24
|
-
import { a as
|
|
25
|
-
import { j as
|
|
26
|
-
import { k as
|
|
27
|
-
import { D as Re, M as
|
|
28
|
-
import { c as
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { a as
|
|
34
|
-
import { d as
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
), Ct = "rgba(20,40,110,0.88)",
|
|
43
|
-
function
|
|
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
|
+
ee(e.x, t.x, r, s),
|
|
37
|
+
ee(e.y, t.y, r, s)
|
|
38
|
+
), zr = (e, t, r, s, a = new ut()) => a.set(
|
|
39
|
+
ee(e.x, t.x, r, s),
|
|
40
|
+
ee(e.y, t.y, r, s),
|
|
41
|
+
ee(e.z, t.z, r, s)
|
|
42
|
+
), Ct = "rgba(20,40,110,0.88)", _t = 24, kt = 512;
|
|
43
|
+
function qr({
|
|
44
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
50
|
opacity: o = 1,
|
|
51
51
|
name: c,
|
|
52
52
|
overlay: i = !0,
|
|
53
53
|
position: l,
|
|
54
|
-
rotation:
|
|
55
|
-
scale:
|
|
54
|
+
rotation: p,
|
|
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,30 +66,30 @@ function zr({
|
|
|
66
66
|
x(() => () => {
|
|
67
67
|
g.dispose();
|
|
68
68
|
}, [g]);
|
|
69
|
-
const
|
|
70
|
-
return
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
return
|
|
74
|
-
|
|
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
|
-
}, []), /* @__PURE__ */
|
|
78
|
+
}, []), /* @__PURE__ */ z(
|
|
79
79
|
"mesh",
|
|
80
80
|
{
|
|
81
|
-
ref:
|
|
81
|
+
ref: m,
|
|
82
82
|
name: c,
|
|
83
83
|
position: l,
|
|
84
|
-
rotation:
|
|
85
|
-
scale:
|
|
84
|
+
rotation: p,
|
|
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
95
|
opacity: o,
|
|
@@ -101,44 +101,44 @@ function zr({
|
|
|
101
101
|
}
|
|
102
102
|
);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function vt(e) {
|
|
105
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
|
|
107
|
-
return
|
|
106
|
+
const d = document.createElement("canvas");
|
|
107
|
+
return d.width = t, d.height = r, d;
|
|
108
108
|
})(), i = c.getContext("2d");
|
|
109
109
|
i.clearRect(0, 0, t, r);
|
|
110
110
|
const l = Math.min(o, Math.min(t, r) / 2);
|
|
111
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
|
|
113
|
-
return
|
|
112
|
+
const p = new me.CanvasTexture(c);
|
|
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: o } =
|
|
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
|
-
i === null && !
|
|
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
131
|
}, [t, i]);
|
|
132
|
-
const
|
|
132
|
+
const d = t ? l : e, f = W(() => {
|
|
133
133
|
if (!n.isPerspectiveCamera)
|
|
134
134
|
return [10, 10];
|
|
135
|
-
const
|
|
136
|
-
return [
|
|
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
137
|
}, [n, o]);
|
|
138
|
-
return c ? /* @__PURE__ */
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
138
|
+
return c ? /* @__PURE__ */ S("group", { position: [0, 0, -1], children: r ? /* @__PURE__ */ z(ne, { children: [
|
|
139
|
+
/* @__PURE__ */ z("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
|
|
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,
|
|
@@ -167,10 +167,10 @@ const qr = ({
|
|
|
167
167
|
"inverted-mask"
|
|
168
168
|
)
|
|
169
169
|
] })
|
|
170
|
-
] }) : /* @__PURE__ */
|
|
171
|
-
s &&
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
170
|
+
] }) : /* @__PURE__ */ z(ne, { children: [
|
|
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,
|
|
@@ -182,25 +182,25 @@ const qr = ({
|
|
|
182
182
|
}
|
|
183
183
|
)
|
|
184
184
|
] }),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ z("mesh", { position: [0, 0, 0], renderOrder: a, children: [
|
|
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,
|
|
@@ -208,50 +208,50 @@ const qr = ({
|
|
|
208
208
|
fallback: a = "camera",
|
|
209
209
|
onStatusChange: n,
|
|
210
210
|
fit: o = "cover",
|
|
211
|
-
anchors: c =
|
|
211
|
+
anchors: c = yt,
|
|
212
212
|
renderOrder: i = 100,
|
|
213
213
|
visible: l = !0,
|
|
214
|
-
maskFeather:
|
|
215
|
-
maskErode:
|
|
214
|
+
maskFeather: p = 4,
|
|
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:
|
|
227
|
+
source: { kind: "texture", texture: m },
|
|
228
228
|
fit: o,
|
|
229
229
|
anchors: c,
|
|
230
230
|
renderOrder: i,
|
|
231
231
|
visible: l,
|
|
232
|
-
maskTexture:
|
|
232
|
+
maskTexture: u ? e : null,
|
|
233
233
|
maskChannel: "green",
|
|
234
234
|
maskInvert: s,
|
|
235
|
-
maskFeather:
|
|
236
|
-
maskErode:
|
|
235
|
+
maskFeather: p,
|
|
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: o, error: c } =
|
|
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, o = a / n, c =
|
|
249
|
+
const a = document.documentElement.clientWidth, n = document.documentElement.clientHeight, o = a / n, c = le / ue;
|
|
250
250
|
let i, l;
|
|
251
|
-
o > c ? (l = n, 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
281
|
if (f === o.current) return;
|
|
282
282
|
o.current = f;
|
|
283
|
-
const { x:
|
|
284
|
-
a.offset.set(
|
|
285
|
-
}), /* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
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 Ae = (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
304
|
for (const o of Object.keys(a)) {
|
|
305
|
-
if (r >=
|
|
306
|
-
if (!
|
|
305
|
+
if (r >= Lt) return;
|
|
306
|
+
if (!Ot.test(o)) continue;
|
|
307
307
|
const c = a[o], i = [...n, o];
|
|
308
|
-
typeof c == "number" ? Number.isFinite(c) && (t[`--vincentt-${
|
|
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
|
-
...
|
|
338
|
-
position:
|
|
339
|
-
rotation:
|
|
340
|
-
scale:
|
|
341
|
-
visible:
|
|
337
|
+
...V,
|
|
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
346
|
...Re,
|
|
347
|
-
assetUrl:
|
|
348
|
-
material: { ...Re.material, ...
|
|
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
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
|
-
position: Ce(
|
|
500
|
-
rotation: Ce(
|
|
499
|
+
...V,
|
|
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,13 +536,13 @@ const B = (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,
|
|
@@ -552,103 +553,103 @@ function Jr(e = {}) {
|
|
|
552
553
|
onRecordingPause: c,
|
|
553
554
|
onRecordingResume: i,
|
|
554
555
|
onRecordingStop: l,
|
|
555
|
-
onRecordingComplete:
|
|
556
|
-
onError:
|
|
556
|
+
onRecordingComplete: p,
|
|
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
|
|
562
|
-
if ((C = MediaRecorder.isTypeSupported) != null && C.call(MediaRecorder,
|
|
563
|
-
}, [r]),
|
|
564
|
-
async (
|
|
561
|
+
const b = [r, ...Zt].filter(Boolean);
|
|
562
|
+
for (const A of b)
|
|
563
|
+
if ((C = MediaRecorder.isTypeSupported) != null && C.call(MediaRecorder, A)) return A;
|
|
564
|
+
}, [r]), N = F(
|
|
565
|
+
async (b) => {
|
|
565
566
|
const C = new MediaStream();
|
|
566
|
-
if (
|
|
567
|
-
let
|
|
567
|
+
if (b.getTracks().forEach((A) => C.addTrack(A)), t) {
|
|
568
|
+
let A;
|
|
568
569
|
if (t instanceof MediaStream)
|
|
569
|
-
|
|
570
|
+
A = t;
|
|
570
571
|
else {
|
|
571
|
-
const
|
|
572
|
-
|
|
572
|
+
const w = typeof t == "object" ? { audio: t } : { audio: !0, video: !1 };
|
|
573
|
+
A = await navigator.mediaDevices.getUserMedia(w);
|
|
573
574
|
}
|
|
574
|
-
|
|
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
|
-
async (
|
|
583
|
-
|
|
582
|
+
), B = F(
|
|
583
|
+
async (b, C) => {
|
|
584
|
+
h($("start")), T(null), E(null);
|
|
584
585
|
try {
|
|
585
|
-
let
|
|
586
|
+
let A;
|
|
586
587
|
if (f)
|
|
587
|
-
|
|
588
|
+
A = f, u.current = A;
|
|
588
589
|
else {
|
|
589
|
-
if (!
|
|
590
|
-
|
|
590
|
+
if (!b) throw new Error("start(stream) requires a MediaStream.");
|
|
591
|
+
A = await N(b);
|
|
591
592
|
}
|
|
592
|
-
const
|
|
593
|
-
|
|
594
|
-
const
|
|
595
|
-
|
|
596
|
-
var
|
|
597
|
-
((
|
|
598
|
-
},
|
|
599
|
-
const
|
|
600
|
-
type:
|
|
593
|
+
const w = _(), Z = {};
|
|
594
|
+
w && (Z.mimeType = w), s && (Z.bitsPerSecond = s);
|
|
595
|
+
const j = new MediaRecorder(A, Z);
|
|
596
|
+
j.ondataavailable = (I) => {
|
|
597
|
+
var J;
|
|
598
|
+
((J = I.data) == null ? void 0 : J.size) > 0 && (g.current.push(I.data), a == null || a(I.data));
|
|
599
|
+
}, j.onstop = () => {
|
|
600
|
+
const I = new Blob(g.current, {
|
|
601
|
+
type: w ?? "video/webm"
|
|
601
602
|
});
|
|
602
|
-
E(
|
|
603
|
-
},
|
|
604
|
-
} catch (
|
|
605
|
-
const
|
|
606
|
-
console.error("start(stream) failed",
|
|
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();
|
|
605
|
+
} catch (A) {
|
|
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
|
-
|
|
611
|
+
N,
|
|
612
|
+
_,
|
|
612
613
|
s,
|
|
613
614
|
a,
|
|
614
615
|
n,
|
|
615
|
-
|
|
616
|
+
p,
|
|
616
617
|
o,
|
|
617
|
-
|
|
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
|
-
}, [i]),
|
|
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
|
}
|
|
636
637
|
}, []);
|
|
637
|
-
return x(() => () =>
|
|
638
|
-
status:
|
|
639
|
-
start:
|
|
640
|
-
stop:
|
|
638
|
+
return x(() => () => Y(), []), {
|
|
639
|
+
status: M,
|
|
640
|
+
start: B,
|
|
641
|
+
stop: H,
|
|
641
642
|
pause: te,
|
|
642
643
|
resume: re,
|
|
643
|
-
clear:
|
|
644
|
-
isRecording:
|
|
645
|
-
isPaused:
|
|
646
|
-
recordedBlob:
|
|
647
|
-
error:
|
|
648
|
-
getActiveStream: () =>
|
|
644
|
+
clear: Y,
|
|
645
|
+
isRecording: M === "recording" || M === "paused",
|
|
646
|
+
isPaused: M === "paused",
|
|
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 {
|
|
@@ -658,37 +659,37 @@ const Zt = async (e, t = {}) => {
|
|
|
658
659
|
const o = n instanceof Error ? n : new Error(String(n));
|
|
659
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, [o, c] =
|
|
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: o, capturePhoto: f, clear:
|
|
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
687
|
let o = n.length;
|
|
687
688
|
const c = new Uint8Array(o);
|
|
688
689
|
for (; o--; )
|
|
689
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,13 +749,13 @@ 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 i =
|
|
752
|
+
const i = ke(t, !1);
|
|
752
753
|
i.volume = a, i.addEventListener("ended", () => {
|
|
753
754
|
i.currentTime = 0;
|
|
754
755
|
}), n.push(i);
|
|
755
756
|
}
|
|
756
757
|
this.pools.set(t, { els: n, next: 0, volume: a });
|
|
757
|
-
const o =
|
|
758
|
+
const o = _e(n[0]);
|
|
758
759
|
return this.ready.set(t, o), o;
|
|
759
760
|
}
|
|
760
761
|
/** Subscribe to mute-state changes (for a toggle UI). Fires immediately with
|
|
@@ -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);
|
|
@@ -816,7 +817,7 @@ 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,
|
|
@@ -826,119 +827,126 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
826
827
|
preload: c = "auto",
|
|
827
828
|
onReady: i,
|
|
828
829
|
onPlay: l,
|
|
829
|
-
onPause:
|
|
830
|
-
onEnded:
|
|
830
|
+
onPause: p,
|
|
831
|
+
onEnded: d,
|
|
831
832
|
onError: f
|
|
832
|
-
},
|
|
833
|
-
const
|
|
834
|
-
|
|
835
|
-
|
|
833
|
+
}, m) {
|
|
834
|
+
const u = R(null);
|
|
835
|
+
u.current === null && typeof Audio < "u" && (u.current = new Audio());
|
|
836
|
+
const g = R(0), M = R(null), h = F(async () => {
|
|
837
|
+
const T = u.current;
|
|
838
|
+
if (T)
|
|
836
839
|
try {
|
|
837
|
-
await
|
|
838
|
-
} catch (
|
|
839
|
-
const
|
|
840
|
-
throw f == null || f(
|
|
840
|
+
await T.play();
|
|
841
|
+
} catch (_) {
|
|
842
|
+
const N = _ instanceof Error ? _ : new Error(String(_));
|
|
843
|
+
throw f == null || f(N), N;
|
|
841
844
|
}
|
|
842
|
-
}, [f]),
|
|
843
|
-
var
|
|
844
|
-
return (
|
|
845
|
+
}, [f]), y = F(() => {
|
|
846
|
+
var T;
|
|
847
|
+
return (T = u.current) == null ? void 0 : T.pause();
|
|
845
848
|
}, []), E = F(() => {
|
|
846
|
-
const
|
|
847
|
-
|
|
849
|
+
const T = u.current;
|
|
850
|
+
T && (T.pause(), T.currentTime = 0, g.current = 0);
|
|
848
851
|
}, []);
|
|
849
|
-
|
|
850
|
-
|
|
852
|
+
st(
|
|
853
|
+
m,
|
|
851
854
|
() => ({
|
|
852
|
-
play:
|
|
853
|
-
pause:
|
|
855
|
+
play: h,
|
|
856
|
+
pause: y,
|
|
854
857
|
stop: E,
|
|
855
858
|
get current() {
|
|
856
|
-
return
|
|
859
|
+
return u.current;
|
|
857
860
|
}
|
|
858
861
|
}),
|
|
859
|
-
[
|
|
862
|
+
[y, h, E]
|
|
860
863
|
), x(() => {
|
|
861
|
-
g.current = 0,
|
|
864
|
+
g.current = 0, M.current = null;
|
|
862
865
|
}, [t]), x(() => {
|
|
863
|
-
|
|
866
|
+
const T = u.current;
|
|
867
|
+
T && (T.preload = c, T.muted = n, T.loop = !1, T.getAttribute("src") !== t && (T.src = t));
|
|
868
|
+
}, [t, c, n]), x(() => {
|
|
869
|
+
const T = u.current;
|
|
870
|
+
return () => {
|
|
871
|
+
T && (T.pause(), T.removeAttribute("src"), T.load());
|
|
872
|
+
};
|
|
873
|
+
}, []), x(() => {
|
|
874
|
+
u.current && (u.current.volume = nr(o));
|
|
864
875
|
}, [o]), x(() => {
|
|
865
|
-
|
|
876
|
+
ar(a, M.current, t) && (M.current = t, h().catch(() => {
|
|
866
877
|
}));
|
|
867
878
|
}, [a, t]);
|
|
868
|
-
const
|
|
879
|
+
const L = F(() => {
|
|
869
880
|
g.current += 1;
|
|
870
|
-
const
|
|
871
|
-
if (
|
|
872
|
-
const
|
|
873
|
-
|
|
881
|
+
const T = Math.max(1, Math.floor(s));
|
|
882
|
+
if (sr(r, g.current, T) === "replay") {
|
|
883
|
+
const _ = u.current;
|
|
884
|
+
_ && (_.currentTime = 0, h().catch(() => {
|
|
874
885
|
}));
|
|
875
886
|
return;
|
|
876
887
|
}
|
|
877
|
-
g.current = 0,
|
|
878
|
-
}, [s,
|
|
879
|
-
return
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
);
|
|
897
|
-
}
|
|
898
|
-
const
|
|
899
|
-
return x(() => U.onMuteChange(t), []), e;
|
|
900
|
-
}, nr = (e = {}) => {
|
|
901
|
-
const { auto: t = !1 } = e, r = A(e.env ?? Ke()), s = A(e.constraints);
|
|
888
|
+
g.current = 0, d == null || d();
|
|
889
|
+
}, [s, d, h, r]);
|
|
890
|
+
return x(() => {
|
|
891
|
+
const T = u.current;
|
|
892
|
+
if (!T) return;
|
|
893
|
+
const N = [
|
|
894
|
+
["canplaythrough", () => i == null ? void 0 : i()],
|
|
895
|
+
["play", () => l == null ? void 0 : l()],
|
|
896
|
+
["pause", () => p == null ? void 0 : p()],
|
|
897
|
+
["ended", L],
|
|
898
|
+
["error", () => f == null ? void 0 : f(new Error(`Unable to load audio: ${t}`))]
|
|
899
|
+
];
|
|
900
|
+
for (const [B, H] of N) T.addEventListener(B, H);
|
|
901
|
+
return () => {
|
|
902
|
+
for (const [B, H] of N) T.removeEventListener(B, H);
|
|
903
|
+
};
|
|
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());
|
|
907
|
+
return x(() => P.onMuteChange(t), []), e;
|
|
908
|
+
}, or = (e = {}) => {
|
|
909
|
+
const { auto: t = !1 } = e, r = R(e.env ?? je()), s = R(e.constraints);
|
|
902
910
|
s.current = e.constraints;
|
|
903
|
-
const [a, n] =
|
|
904
|
-
const
|
|
905
|
-
if (
|
|
906
|
-
const
|
|
907
|
-
return n((
|
|
908
|
-
}, []),
|
|
909
|
-
async (
|
|
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;
|
|
916
|
+
}, []), p = F(
|
|
917
|
+
async (d) => {
|
|
910
918
|
const f = ++i.current;
|
|
911
919
|
n("requesting"), c(null);
|
|
912
|
-
const
|
|
913
|
-
{ constraints: (
|
|
920
|
+
const m = await Ze(
|
|
921
|
+
{ constraints: (d == null ? void 0 : d.constraints) ?? s.current, keepStream: !1 },
|
|
914
922
|
r.current
|
|
915
923
|
);
|
|
916
|
-
return f !== i.current || (n(
|
|
924
|
+
return f !== i.current || (n(m.state), c(m.reason)), m.state;
|
|
917
925
|
},
|
|
918
926
|
[]
|
|
919
927
|
);
|
|
920
928
|
return x(() => {
|
|
921
|
-
let
|
|
929
|
+
let d = () => {
|
|
922
930
|
}, f = !0;
|
|
923
|
-
return t ?
|
|
924
|
-
f && (n((
|
|
925
|
-
}, r.current).then((
|
|
926
|
-
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();
|
|
927
935
|
}), () => {
|
|
928
|
-
f = !1, i.current += 1,
|
|
936
|
+
f = !1, i.current += 1, d();
|
|
929
937
|
};
|
|
930
|
-
}, [t, l,
|
|
938
|
+
}, [t, l, p]), W(
|
|
931
939
|
() => ({
|
|
932
940
|
state: a,
|
|
933
941
|
reason: o,
|
|
934
|
-
canPrompt:
|
|
942
|
+
canPrompt: Je(a),
|
|
935
943
|
usable: a === "granted",
|
|
936
|
-
request:
|
|
944
|
+
request: p,
|
|
937
945
|
refresh: l
|
|
938
946
|
}),
|
|
939
|
-
[a, o,
|
|
947
|
+
[a, o, p, l]
|
|
940
948
|
);
|
|
941
|
-
},
|
|
949
|
+
}, ir = {
|
|
942
950
|
display: "flex",
|
|
943
951
|
flexDirection: "column",
|
|
944
952
|
alignItems: "center",
|
|
@@ -951,7 +959,7 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
951
959
|
background: "#111827",
|
|
952
960
|
color: "#f9fafb",
|
|
953
961
|
fontFamily: "system-ui, sans-serif"
|
|
954
|
-
},
|
|
962
|
+
}, cr = {
|
|
955
963
|
font: "inherit",
|
|
956
964
|
padding: "10px 18px",
|
|
957
965
|
borderRadius: 8,
|
|
@@ -959,58 +967,58 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
959
967
|
background: "#2563eb",
|
|
960
968
|
color: "#fff",
|
|
961
969
|
cursor: "pointer"
|
|
962
|
-
},
|
|
970
|
+
}, fs = ({
|
|
963
971
|
children: e,
|
|
964
972
|
fallback: t,
|
|
965
973
|
auto: r = !1,
|
|
966
974
|
constraints: s,
|
|
967
975
|
requestLabel: a = "Allow camera"
|
|
968
976
|
}) => {
|
|
969
|
-
const n =
|
|
970
|
-
if (n.usable) return /* @__PURE__ */
|
|
971
|
-
if (t) return /* @__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) });
|
|
972
980
|
const { state: o, reason: c, canPrompt: i, request: l } = n;
|
|
973
|
-
return /* @__PURE__ */
|
|
974
|
-
/* @__PURE__ */
|
|
975
|
-
/* @__PURE__ */
|
|
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(
|
|
976
984
|
"button",
|
|
977
985
|
{
|
|
978
986
|
type: "button",
|
|
979
987
|
onClick: () => void l(),
|
|
980
988
|
disabled: !i || o === "requesting",
|
|
981
989
|
"aria-disabled": !i || o === "requesting",
|
|
982
|
-
style: { ...
|
|
990
|
+
style: { ...cr, opacity: i && o !== "requesting" ? 1 : 0.5 },
|
|
983
991
|
children: o === "requesting" ? "Waiting…" : o === "denied" ? "Try again" : a
|
|
984
992
|
}
|
|
985
993
|
)
|
|
986
994
|
] });
|
|
987
|
-
},
|
|
995
|
+
}, lr = () => {
|
|
988
996
|
var e;
|
|
989
997
|
return {
|
|
990
998
|
enumerateDevices: typeof navigator < "u" && ((e = navigator.mediaDevices) != null && e.enumerateDevices) ? () => navigator.mediaDevices.enumerateDevices() : void 0
|
|
991
999
|
};
|
|
992
|
-
},
|
|
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()) => {
|
|
993
1001
|
if (!e.enumerateDevices) return [];
|
|
994
1002
|
try {
|
|
995
1003
|
return (await e.enumerateDevices()).filter((r) => r.kind === "videoinput").map((r) => ({
|
|
996
1004
|
deviceId: r.deviceId,
|
|
997
1005
|
label: r.label,
|
|
998
|
-
facing:
|
|
1006
|
+
facing: mr(r.label)
|
|
999
1007
|
}));
|
|
1000
1008
|
} catch {
|
|
1001
1009
|
return [];
|
|
1002
1010
|
}
|
|
1003
|
-
},
|
|
1011
|
+
}, hs = (e, t) => e.find((r) => r.facing === t) ?? null, Oe = nt(null), gs = ({
|
|
1004
1012
|
cache: e,
|
|
1005
1013
|
disposeUnreferencedOnUnmount: t = !0,
|
|
1006
1014
|
children: r
|
|
1007
1015
|
}) => {
|
|
1008
|
-
const s = e ??
|
|
1016
|
+
const s = e ?? Le();
|
|
1009
1017
|
return x(() => () => {
|
|
1010
1018
|
t && s.disposeUnreferenced();
|
|
1011
|
-
}, [s, t]), /* @__PURE__ */
|
|
1012
|
-
},
|
|
1013
|
-
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({
|
|
1014
1022
|
value: null,
|
|
1015
1023
|
status: "idle",
|
|
1016
1024
|
error: null
|
|
@@ -1022,22 +1030,22 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1022
1030
|
}
|
|
1023
1031
|
let i = !0;
|
|
1024
1032
|
const l = s.get(e.key);
|
|
1025
|
-
return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }), s.acquire(e, a).then((
|
|
1026
|
-
i && c({ value:
|
|
1027
|
-
}).catch((
|
|
1028
|
-
i && c({ value: null, status: "error", error:
|
|
1033
|
+
return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }), s.acquire(e, a).then((p) => {
|
|
1034
|
+
i && c({ value: p, status: "ready", error: null });
|
|
1035
|
+
}).catch((p) => {
|
|
1036
|
+
i && c({ value: null, status: "error", error: p });
|
|
1029
1037
|
}), () => {
|
|
1030
1038
|
i = !1, s.release(e.key, a);
|
|
1031
1039
|
};
|
|
1032
1040
|
}, [s, n, r, a]), o;
|
|
1033
|
-
},
|
|
1034
|
-
const t =
|
|
1035
|
-
return
|
|
1041
|
+
}, Ss = (e) => {
|
|
1042
|
+
const t = Ge(), r = e ?? t;
|
|
1043
|
+
return it(
|
|
1036
1044
|
(s) => r.subscribe(s),
|
|
1037
1045
|
() => r.getStats(),
|
|
1038
1046
|
() => r.getStats()
|
|
1039
1047
|
);
|
|
1040
|
-
}, oe = 1,
|
|
1048
|
+
}, oe = 1, ze = Object.freeze({
|
|
1041
1049
|
version: oe,
|
|
1042
1050
|
trackers: {
|
|
1043
1051
|
face: { enabled: !0, numFaces: 1, targetFps: null, holdMs: 250, predictMs: 0, smoothing: 0 },
|
|
@@ -1065,13 +1073,13 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1065
1073
|
fallbacks: { onUnsupported: "degrade", delegate: "auto" },
|
|
1066
1074
|
assets: { holisticModelUrl: null, semanticSegmentationModelUrl: null },
|
|
1067
1075
|
updatedAt: 0
|
|
1068
|
-
}),
|
|
1076
|
+
}), U = (e, t, r, s, a, n) => {
|
|
1069
1077
|
if (e === void 0) return t;
|
|
1070
1078
|
if (typeof e != "number" || !Number.isFinite(e))
|
|
1071
1079
|
return n(`${a}: not a number, kept ${t}`), t;
|
|
1072
1080
|
const o = Math.min(s, Math.max(r, e));
|
|
1073
1081
|
return o !== e && n(`${a}: ${e} clamped to ${o}`), o;
|
|
1074
|
-
},
|
|
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 = [
|
|
1075
1083
|
"tiers",
|
|
1076
1084
|
"budget",
|
|
1077
1085
|
"initialTier",
|
|
@@ -1079,32 +1087,32 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1079
1087
|
"maxTier",
|
|
1080
1088
|
"adaptive",
|
|
1081
1089
|
"historySize"
|
|
1082
|
-
],
|
|
1090
|
+
], ve = (e) => {
|
|
1083
1091
|
const t = {};
|
|
1084
|
-
for (const r of
|
|
1092
|
+
for (const r of fr) e[r] !== void 0 && (t[r] = e[r]);
|
|
1085
1093
|
return t;
|
|
1086
|
-
},
|
|
1087
|
-
var c, i, l,
|
|
1088
|
-
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);
|
|
1089
1097
|
return {
|
|
1090
1098
|
version: oe,
|
|
1091
1099
|
trackers: {
|
|
1092
1100
|
face: {
|
|
1093
|
-
enabled:
|
|
1101
|
+
enabled: G((c = a.face) == null ? void 0 : c.enabled, n.face.enabled, "trackers.face.enabled", s),
|
|
1094
1102
|
numFaces: Math.round(
|
|
1095
|
-
|
|
1103
|
+
U((i = a.face) == null ? void 0 : i.numFaces, n.face.numFaces, 1, 10, "trackers.face.numFaces", s)
|
|
1096
1104
|
),
|
|
1097
|
-
targetFps:
|
|
1098
|
-
holdMs:
|
|
1099
|
-
predictMs:
|
|
1100
|
-
(
|
|
1105
|
+
targetFps: Q((l = a.face) == null ? void 0 : l.targetFps, n.face.targetFps, "trackers.face.targetFps", s),
|
|
1106
|
+
holdMs: U((p = a.face) == null ? void 0 : p.holdMs, n.face.holdMs, 0, 5e3, "trackers.face.holdMs", s),
|
|
1107
|
+
predictMs: U(
|
|
1108
|
+
(d = a.face) == null ? void 0 : d.predictMs,
|
|
1101
1109
|
n.face.predictMs,
|
|
1102
1110
|
0,
|
|
1103
1111
|
1e3,
|
|
1104
1112
|
"trackers.face.predictMs",
|
|
1105
1113
|
s
|
|
1106
1114
|
),
|
|
1107
|
-
smoothing:
|
|
1115
|
+
smoothing: U(
|
|
1108
1116
|
(f = a.face) == null ? void 0 : f.smoothing,
|
|
1109
1117
|
n.face.smoothing,
|
|
1110
1118
|
0,
|
|
@@ -1114,47 +1122,47 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1114
1122
|
)
|
|
1115
1123
|
},
|
|
1116
1124
|
hand: {
|
|
1117
|
-
enabled:
|
|
1118
|
-
targetFps:
|
|
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)
|
|
1119
1127
|
},
|
|
1120
1128
|
gesture: {
|
|
1121
|
-
enabled:
|
|
1122
|
-
targetFps:
|
|
1123
|
-
(
|
|
1129
|
+
enabled: G((g = a.gesture) == null ? void 0 : g.enabled, n.gesture.enabled, "trackers.gesture.enabled", s),
|
|
1130
|
+
targetFps: Q(
|
|
1131
|
+
(M = a.gesture) == null ? void 0 : M.targetFps,
|
|
1124
1132
|
n.gesture.targetFps,
|
|
1125
1133
|
"trackers.gesture.targetFps",
|
|
1126
1134
|
s
|
|
1127
1135
|
)
|
|
1128
1136
|
},
|
|
1129
1137
|
body: {
|
|
1130
|
-
enabled:
|
|
1131
|
-
targetFps:
|
|
1138
|
+
enabled: G((h = a.body) == null ? void 0 : h.enabled, n.body.enabled, "trackers.body.enabled", s),
|
|
1139
|
+
targetFps: Q((y = a.body) == null ? void 0 : y.targetFps, n.body.targetFps, "trackers.body.targetFps", s)
|
|
1132
1140
|
},
|
|
1133
1141
|
holistic: {
|
|
1134
|
-
enabled:
|
|
1135
|
-
targetFps:
|
|
1136
|
-
(
|
|
1142
|
+
enabled: G((E = a.holistic) == null ? void 0 : E.enabled, n.holistic.enabled, "trackers.holistic.enabled", s),
|
|
1143
|
+
targetFps: Q(
|
|
1144
|
+
(L = a.holistic) == null ? void 0 : L.targetFps,
|
|
1137
1145
|
n.holistic.targetFps,
|
|
1138
1146
|
"trackers.holistic.targetFps",
|
|
1139
1147
|
s
|
|
1140
1148
|
),
|
|
1141
|
-
hands:
|
|
1142
|
-
(
|
|
1149
|
+
hands: X(
|
|
1150
|
+
(T = a.holistic) == null ? void 0 : T.hands,
|
|
1143
1151
|
["both", "left", "right", "none"],
|
|
1144
1152
|
n.holistic.hands,
|
|
1145
1153
|
"trackers.holistic.hands",
|
|
1146
1154
|
s
|
|
1147
1155
|
),
|
|
1148
|
-
holdMs:
|
|
1149
|
-
(
|
|
1156
|
+
holdMs: U(
|
|
1157
|
+
(_ = a.holistic) == null ? void 0 : _.holdMs,
|
|
1150
1158
|
n.holistic.holdMs,
|
|
1151
1159
|
0,
|
|
1152
1160
|
5e3,
|
|
1153
1161
|
"trackers.holistic.holdMs",
|
|
1154
1162
|
s
|
|
1155
1163
|
),
|
|
1156
|
-
predictMs:
|
|
1157
|
-
(
|
|
1164
|
+
predictMs: U(
|
|
1165
|
+
(N = a.holistic) == null ? void 0 : N.predictMs,
|
|
1158
1166
|
n.holistic.predictMs,
|
|
1159
1167
|
0,
|
|
1160
1168
|
1e3,
|
|
@@ -1162,8 +1170,8 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1162
1170
|
s
|
|
1163
1171
|
),
|
|
1164
1172
|
analysisMaxDimension: Math.round(
|
|
1165
|
-
|
|
1166
|
-
(
|
|
1173
|
+
U(
|
|
1174
|
+
(B = a.holistic) == null ? void 0 : B.analysisMaxDimension,
|
|
1167
1175
|
n.holistic.analysisMaxDimension,
|
|
1168
1176
|
128,
|
|
1169
1177
|
2048,
|
|
@@ -1171,13 +1179,13 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1171
1179
|
s
|
|
1172
1180
|
)
|
|
1173
1181
|
),
|
|
1174
|
-
outputFaceBlendshapes:
|
|
1175
|
-
(
|
|
1182
|
+
outputFaceBlendshapes: G(
|
|
1183
|
+
(H = a.holistic) == null ? void 0 : H.outputFaceBlendshapes,
|
|
1176
1184
|
n.holistic.outputFaceBlendshapes,
|
|
1177
1185
|
"trackers.holistic.outputFaceBlendshapes",
|
|
1178
1186
|
s
|
|
1179
1187
|
),
|
|
1180
|
-
confidence:
|
|
1188
|
+
confidence: U(
|
|
1181
1189
|
(te = a.holistic) == null ? void 0 : te.confidence,
|
|
1182
1190
|
n.holistic.confidence,
|
|
1183
1191
|
0,
|
|
@@ -1185,7 +1193,7 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1185
1193
|
"trackers.holistic.confidence",
|
|
1186
1194
|
s
|
|
1187
1195
|
),
|
|
1188
|
-
delegate:
|
|
1196
|
+
delegate: X(
|
|
1189
1197
|
(re = a.holistic) == null ? void 0 : re.delegate,
|
|
1190
1198
|
["auto", "GPU", "CPU"],
|
|
1191
1199
|
n.holistic.delegate,
|
|
@@ -1194,14 +1202,14 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1194
1202
|
)
|
|
1195
1203
|
},
|
|
1196
1204
|
segmentation: {
|
|
1197
|
-
enabled:
|
|
1198
|
-
(
|
|
1205
|
+
enabled: G(
|
|
1206
|
+
(Y = a.segmentation) == null ? void 0 : Y.enabled,
|
|
1199
1207
|
n.segmentation.enabled,
|
|
1200
1208
|
"trackers.segmentation.enabled",
|
|
1201
1209
|
s
|
|
1202
1210
|
),
|
|
1203
|
-
quality:
|
|
1204
|
-
(
|
|
1211
|
+
quality: X(
|
|
1212
|
+
(b = a.segmentation) == null ? void 0 : b.quality,
|
|
1205
1213
|
["low", "medium", "high"],
|
|
1206
1214
|
n.segmentation.quality,
|
|
1207
1215
|
"trackers.segmentation.quality",
|
|
@@ -1209,21 +1217,21 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1209
1217
|
)
|
|
1210
1218
|
},
|
|
1211
1219
|
semanticSegmentation: {
|
|
1212
|
-
enabled:
|
|
1220
|
+
enabled: G(
|
|
1213
1221
|
(C = a.semanticSegmentation) == null ? void 0 : C.enabled,
|
|
1214
1222
|
n.semanticSegmentation.enabled,
|
|
1215
1223
|
"trackers.semanticSegmentation.enabled",
|
|
1216
1224
|
s
|
|
1217
1225
|
),
|
|
1218
|
-
preset:
|
|
1219
|
-
(
|
|
1220
|
-
|
|
1226
|
+
preset: X(
|
|
1227
|
+
(A = a.semanticSegmentation) == null ? void 0 : A.preset,
|
|
1228
|
+
xt,
|
|
1221
1229
|
n.semanticSegmentation.preset,
|
|
1222
1230
|
"trackers.semanticSegmentation.preset",
|
|
1223
1231
|
s
|
|
1224
1232
|
),
|
|
1225
|
-
quality:
|
|
1226
|
-
(
|
|
1233
|
+
quality: X(
|
|
1234
|
+
(w = a.semanticSegmentation) == null ? void 0 : w.quality,
|
|
1227
1235
|
["low", "medium", "high"],
|
|
1228
1236
|
n.semanticSegmentation.quality,
|
|
1229
1237
|
"trackers.semanticSegmentation.quality",
|
|
@@ -1232,11 +1240,11 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1232
1240
|
}
|
|
1233
1241
|
},
|
|
1234
1242
|
perf: {
|
|
1235
|
-
targetFps:
|
|
1236
|
-
camRes: Math.round(
|
|
1237
|
-
cameraZoom:
|
|
1238
|
-
analysisScale:
|
|
1239
|
-
(
|
|
1243
|
+
targetFps: U((Z = e.perf) == null ? void 0 : Z.targetFps, t.perf.targetFps, 0, 120, "perf.targetFps", s),
|
|
1244
|
+
camRes: Math.round(U((j = e.perf) == null ? void 0 : j.camRes, t.perf.camRes, 160, 3840, "perf.camRes", s)),
|
|
1245
|
+
cameraZoom: U((I = e.perf) == null ? void 0 : I.cameraZoom, t.perf.cameraZoom, 1, 3, "perf.cameraZoom", s),
|
|
1246
|
+
analysisScale: U(
|
|
1247
|
+
(J = e.perf) == null ? void 0 : J.analysisScale,
|
|
1240
1248
|
t.perf.analysisScale,
|
|
1241
1249
|
0.25,
|
|
1242
1250
|
1,
|
|
@@ -1245,8 +1253,8 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1245
1253
|
)
|
|
1246
1254
|
},
|
|
1247
1255
|
lifecycle: {
|
|
1248
|
-
pauseWhenHidden:
|
|
1249
|
-
(
|
|
1256
|
+
pauseWhenHidden: G(
|
|
1257
|
+
(pe = e.lifecycle) == null ? void 0 : pe.pauseWhenHidden,
|
|
1250
1258
|
t.lifecycle.pauseWhenHidden,
|
|
1251
1259
|
"lifecycle.pauseWhenHidden",
|
|
1252
1260
|
s
|
|
@@ -1254,26 +1262,26 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1254
1262
|
},
|
|
1255
1263
|
quality: o,
|
|
1256
1264
|
camera: {
|
|
1257
|
-
facingMode:
|
|
1258
|
-
(
|
|
1265
|
+
facingMode: X(
|
|
1266
|
+
(he = e.camera) == null ? void 0 : he.facingMode,
|
|
1259
1267
|
["user", "environment"],
|
|
1260
1268
|
t.camera.facingMode,
|
|
1261
1269
|
"camera.facingMode",
|
|
1262
1270
|
s
|
|
1263
1271
|
),
|
|
1264
|
-
deviceId: ((
|
|
1265
|
-
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)
|
|
1266
1274
|
},
|
|
1267
1275
|
fallbacks: {
|
|
1268
|
-
onUnsupported:
|
|
1269
|
-
(
|
|
1276
|
+
onUnsupported: X(
|
|
1277
|
+
(Se = e.fallbacks) == null ? void 0 : Se.onUnsupported,
|
|
1270
1278
|
["block", "degrade"],
|
|
1271
1279
|
t.fallbacks.onUnsupported,
|
|
1272
1280
|
"fallbacks.onUnsupported",
|
|
1273
1281
|
s
|
|
1274
1282
|
),
|
|
1275
|
-
delegate:
|
|
1276
|
-
(
|
|
1283
|
+
delegate: X(
|
|
1284
|
+
(Te = e.fallbacks) == null ? void 0 : Te.delegate,
|
|
1277
1285
|
["auto", "GPU", "CPU"],
|
|
1278
1286
|
t.fallbacks.delegate,
|
|
1279
1287
|
"fallbacks.delegate",
|
|
@@ -1281,14 +1289,14 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1281
1289
|
)
|
|
1282
1290
|
},
|
|
1283
1291
|
assets: {
|
|
1284
|
-
holisticModelUrl:
|
|
1285
|
-
(
|
|
1292
|
+
holisticModelUrl: we(
|
|
1293
|
+
(Me = e.assets) == null ? void 0 : Me.holisticModelUrl,
|
|
1286
1294
|
t.assets.holisticModelUrl,
|
|
1287
1295
|
"assets.holisticModelUrl",
|
|
1288
1296
|
s
|
|
1289
1297
|
),
|
|
1290
|
-
semanticSegmentationModelUrl:
|
|
1291
|
-
(
|
|
1298
|
+
semanticSegmentationModelUrl: we(
|
|
1299
|
+
(Ee = e.assets) == null ? void 0 : Ee.semanticSegmentationModelUrl,
|
|
1292
1300
|
t.assets.semanticSegmentationModelUrl,
|
|
1293
1301
|
"assets.semanticSegmentationModelUrl",
|
|
1294
1302
|
s
|
|
@@ -1296,7 +1304,7 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1296
1304
|
},
|
|
1297
1305
|
updatedAt: typeof e.updatedAt == "number" && Number.isFinite(e.updatedAt) ? e.updatedAt : t.updatedAt
|
|
1298
1306
|
};
|
|
1299
|
-
},
|
|
1307
|
+
}, De = (e, t, r = Date.now()) => K({ ...t, updatedAt: r }, e), qe = (e) => JSON.stringify(K({}, e)), We = (e) => {
|
|
1300
1308
|
const t = [];
|
|
1301
1309
|
let r = e;
|
|
1302
1310
|
if (typeof e == "string")
|
|
@@ -1304,22 +1312,22 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1304
1312
|
r = JSON.parse(e);
|
|
1305
1313
|
} catch {
|
|
1306
1314
|
return {
|
|
1307
|
-
config:
|
|
1315
|
+
config: K(),
|
|
1308
1316
|
migrated: !0,
|
|
1309
1317
|
warnings: ["not valid JSON; defaults used"]
|
|
1310
1318
|
};
|
|
1311
1319
|
}
|
|
1312
1320
|
if (!r || typeof r != "object")
|
|
1313
1321
|
return {
|
|
1314
|
-
config:
|
|
1322
|
+
config: K(),
|
|
1315
1323
|
migrated: !0,
|
|
1316
1324
|
warnings: ["not an object; defaults used"]
|
|
1317
1325
|
};
|
|
1318
1326
|
const s = r, a = s.version !== oe;
|
|
1319
1327
|
return a && t.push(
|
|
1320
1328
|
`migrated from version ${String(s.version ?? "none")} to ${oe}`
|
|
1321
|
-
), { config:
|
|
1322
|
-
},
|
|
1329
|
+
), { config: K(s, ze, t), migrated: a, warnings: t };
|
|
1330
|
+
}, Ts = [
|
|
1323
1331
|
"face",
|
|
1324
1332
|
"hand",
|
|
1325
1333
|
"gesture",
|
|
@@ -1327,7 +1335,7 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1327
1335
|
"holistic",
|
|
1328
1336
|
"segmentation",
|
|
1329
1337
|
"semanticSegmentation"
|
|
1330
|
-
],
|
|
1338
|
+
], pr = (e) => ({
|
|
1331
1339
|
perf: {
|
|
1332
1340
|
targetFps: e.perf.targetFps > 0 ? e.perf.targetFps : void 0,
|
|
1333
1341
|
camRes: e.perf.camRes,
|
|
@@ -1336,25 +1344,25 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1336
1344
|
},
|
|
1337
1345
|
lifecycle: { pauseWhenHidden: e.lifecycle.pauseWhenHidden },
|
|
1338
1346
|
quality: e.quality
|
|
1339
|
-
}),
|
|
1347
|
+
}), hr = (e) => ({
|
|
1340
1348
|
facingMode: e.camera.facingMode,
|
|
1341
1349
|
...e.camera.deviceId ? { deviceId: e.camera.deviceId } : {},
|
|
1342
1350
|
...e.camera.mirrored === "auto" ? {} : { mirrored: e.camera.mirrored }
|
|
1343
|
-
}),
|
|
1351
|
+
}), q = (e) => e === null ? {} : { targetFps: e }, gr = (e, t) => {
|
|
1344
1352
|
const r = e.trackers;
|
|
1345
1353
|
return {
|
|
1346
1354
|
face: {
|
|
1347
1355
|
numFaces: r.face.numFaces,
|
|
1348
|
-
...
|
|
1356
|
+
...q(r.face.targetFps),
|
|
1349
1357
|
holdMs: r.face.holdMs,
|
|
1350
1358
|
predictMs: r.face.predictMs,
|
|
1351
1359
|
active: r.face.enabled
|
|
1352
1360
|
},
|
|
1353
|
-
hand: { ...
|
|
1354
|
-
gesture: { ...
|
|
1361
|
+
hand: { ...q(r.hand.targetFps), active: r.hand.enabled },
|
|
1362
|
+
gesture: { ...q(r.gesture.targetFps), active: r.gesture.enabled },
|
|
1355
1363
|
body: { active: r.body.enabled },
|
|
1356
1364
|
holistic: {
|
|
1357
|
-
...
|
|
1365
|
+
...q(r.holistic.targetFps),
|
|
1358
1366
|
hands: r.holistic.hands,
|
|
1359
1367
|
holdMs: r.holistic.holdMs,
|
|
1360
1368
|
predictMs: r.holistic.predictMs,
|
|
@@ -1372,21 +1380,21 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1372
1380
|
active: r.semanticSegmentation.enabled
|
|
1373
1381
|
}
|
|
1374
1382
|
}[t];
|
|
1375
|
-
},
|
|
1383
|
+
}, yr = (e, t) => {
|
|
1376
1384
|
const r = e.trackers;
|
|
1377
1385
|
switch (t) {
|
|
1378
|
-
case
|
|
1379
|
-
return { numFaces: r.face.numFaces, ...
|
|
1380
|
-
case
|
|
1381
|
-
return { ...
|
|
1382
|
-
case
|
|
1383
|
-
return { ...
|
|
1384
|
-
case
|
|
1385
|
-
return { ...
|
|
1386
|
-
case
|
|
1386
|
+
case k.FACE_TRACKER:
|
|
1387
|
+
return { numFaces: r.face.numFaces, ...q(r.face.targetFps) };
|
|
1388
|
+
case k.HAND_TRACKER:
|
|
1389
|
+
return { ...q(r.hand.targetFps) };
|
|
1390
|
+
case k.GESTURE_TRACKER:
|
|
1391
|
+
return { ...q(r.gesture.targetFps) };
|
|
1392
|
+
case k.BODY_TRACKER:
|
|
1393
|
+
return { ...q(r.body.targetFps) };
|
|
1394
|
+
case k.HOLISTIC_TRACKER: {
|
|
1387
1395
|
const s = r.holistic;
|
|
1388
1396
|
return {
|
|
1389
|
-
...
|
|
1397
|
+
...q(s.targetFps),
|
|
1390
1398
|
hands: s.hands,
|
|
1391
1399
|
holdMs: s.holdMs,
|
|
1392
1400
|
predictMs: s.predictMs,
|
|
@@ -1401,9 +1409,9 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1401
1409
|
...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {}
|
|
1402
1410
|
};
|
|
1403
1411
|
}
|
|
1404
|
-
case
|
|
1412
|
+
case k.BACKGROUND_SEGMENTATION:
|
|
1405
1413
|
return { quality: r.segmentation.quality };
|
|
1406
|
-
case
|
|
1414
|
+
case k.SEMANTIC_SEGMENTATION:
|
|
1407
1415
|
return {
|
|
1408
1416
|
preset: r.semanticSegmentation.preset,
|
|
1409
1417
|
quality: r.semanticSegmentation.quality,
|
|
@@ -1412,275 +1420,275 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
|
|
|
1412
1420
|
default:
|
|
1413
1421
|
return {};
|
|
1414
1422
|
}
|
|
1415
|
-
},
|
|
1423
|
+
}, Sr = (e) => {
|
|
1416
1424
|
const t = e.trackers, r = [];
|
|
1417
|
-
return t.face.enabled && r.push(
|
|
1418
|
-
},
|
|
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 = () => {
|
|
1419
1427
|
try {
|
|
1420
1428
|
return typeof localStorage < "u" ? localStorage : null;
|
|
1421
1429
|
} catch {
|
|
1422
1430
|
return null;
|
|
1423
1431
|
}
|
|
1424
|
-
},
|
|
1432
|
+
}, Tr = (e = ce, t = fe()) => {
|
|
1425
1433
|
if (!t) return null;
|
|
1426
1434
|
try {
|
|
1427
1435
|
const r = t.getItem(e);
|
|
1428
|
-
return r ?
|
|
1436
|
+
return r ? We(r) : null;
|
|
1429
1437
|
} catch {
|
|
1430
1438
|
return null;
|
|
1431
1439
|
}
|
|
1432
|
-
},
|
|
1440
|
+
}, Ue = (e, t = ce, r = fe()) => {
|
|
1433
1441
|
if (!r) return !1;
|
|
1434
1442
|
try {
|
|
1435
|
-
return r.setItem(t,
|
|
1443
|
+
return r.setItem(t, qe(e)), !0;
|
|
1436
1444
|
} catch {
|
|
1437
1445
|
return !1;
|
|
1438
1446
|
}
|
|
1439
|
-
},
|
|
1447
|
+
}, Mr = (e = ce, t = fe()) => {
|
|
1440
1448
|
if (t)
|
|
1441
1449
|
try {
|
|
1442
1450
|
t.removeItem(e);
|
|
1443
1451
|
} catch {
|
|
1444
1452
|
}
|
|
1445
|
-
},
|
|
1446
|
-
const { storageKey: t =
|
|
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);
|
|
1447
1455
|
f.current = o, x(() => {
|
|
1448
1456
|
if (!r) {
|
|
1449
|
-
|
|
1457
|
+
d(!0);
|
|
1450
1458
|
return;
|
|
1451
1459
|
}
|
|
1452
|
-
const
|
|
1453
|
-
if (
|
|
1454
|
-
const
|
|
1455
|
-
f.current =
|
|
1460
|
+
const h = Tr(t, s);
|
|
1461
|
+
if (h) {
|
|
1462
|
+
const y = K(h.config, n);
|
|
1463
|
+
f.current = y, c(y), l(h.warnings), h.migrated && Ue(y, t, s);
|
|
1456
1464
|
}
|
|
1457
|
-
|
|
1465
|
+
d(!0);
|
|
1458
1466
|
}, [r, t, s, n]);
|
|
1459
|
-
const
|
|
1460
|
-
(
|
|
1467
|
+
const m = F(
|
|
1468
|
+
(h, y) => (f.current = h, c(h), l(y), r && Ue(h, t, s), h),
|
|
1461
1469
|
[r, t, s]
|
|
1462
|
-
),
|
|
1463
|
-
(
|
|
1464
|
-
const
|
|
1465
|
-
return
|
|
1470
|
+
), u = F(
|
|
1471
|
+
(h) => {
|
|
1472
|
+
const y = [], E = K({ ...h, updatedAt: Date.now() }, f.current, y);
|
|
1473
|
+
return m(E, y);
|
|
1466
1474
|
},
|
|
1467
|
-
[
|
|
1475
|
+
[m]
|
|
1468
1476
|
), g = F(() => {
|
|
1469
|
-
const
|
|
1470
|
-
return f.current =
|
|
1471
|
-
}, [n, r, t, s]),
|
|
1472
|
-
(
|
|
1473
|
-
const
|
|
1474
|
-
return
|
|
1477
|
+
const h = De(n, {}, 0);
|
|
1478
|
+
return f.current = h, c(h), l([]), r && Mr(t, s), h;
|
|
1479
|
+
}, [n, r, t, s]), M = F(
|
|
1480
|
+
(h) => {
|
|
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);
|
|
1475
1483
|
},
|
|
1476
|
-
[
|
|
1484
|
+
[m]
|
|
1477
1485
|
);
|
|
1478
|
-
return
|
|
1486
|
+
return W(
|
|
1479
1487
|
() => ({
|
|
1480
1488
|
config: o,
|
|
1481
|
-
hydrated:
|
|
1489
|
+
hydrated: p,
|
|
1482
1490
|
warnings: i,
|
|
1483
|
-
update:
|
|
1491
|
+
update: u,
|
|
1484
1492
|
reset: g,
|
|
1485
|
-
importJson:
|
|
1486
|
-
json:
|
|
1487
|
-
providerProps:
|
|
1488
|
-
cameraRequest:
|
|
1489
|
-
trackerProps: (
|
|
1490
|
-
modelOptions: (
|
|
1491
|
-
enabledModels:
|
|
1493
|
+
importJson: M,
|
|
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)
|
|
1492
1500
|
}),
|
|
1493
|
-
[o,
|
|
1501
|
+
[o, p, i, u, g, M]
|
|
1494
1502
|
);
|
|
1495
1503
|
};
|
|
1496
1504
|
export {
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1505
|
+
Hr as AspectRatioContainer,
|
|
1506
|
+
rr as AudioEngine,
|
|
1507
|
+
rs as AudioPlayer,
|
|
1500
1508
|
$r as Axes,
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
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,
|
|
1506
1514
|
Re as DEFAULT_MESH_RENDERER,
|
|
1507
|
-
|
|
1508
|
-
|
|
1515
|
+
bn as DEFAULT_MESH_RENDERER_RENDER_STATE,
|
|
1516
|
+
As as DEFAULT_PERFORMANCE_BUDGET,
|
|
1509
1517
|
Rs as DEFAULT_PIXEL_SNAP_INCREMENT,
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
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,
|
|
1519
1527
|
Cs as DEFAULT_SCREEN_TRANSFORM_2D,
|
|
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
|
-
|
|
1528
|
+
_s as DEFAULT_SCREEN_TRANSFORM_ROOT,
|
|
1529
|
+
ze as DEFAULT_TRACKING_CONFIG,
|
|
1530
|
+
V as DEFAULT_TRANSFORM_3D,
|
|
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,
|
|
1551
1559
|
Xr as SpriteAnimation,
|
|
1552
|
-
|
|
1553
|
-
|
|
1560
|
+
Ts as TRACKER_KINDS,
|
|
1561
|
+
ce as TRACKING_CONFIG_STORAGE_KEY,
|
|
1554
1562
|
oe as TRACKING_CONFIG_VERSION,
|
|
1555
|
-
|
|
1556
|
-
|
|
1563
|
+
Da as TextLabel,
|
|
1564
|
+
Kr as ThemeProvider,
|
|
1557
1565
|
Rt as Transform3D,
|
|
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
|
-
|
|
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,
|
|
1576
|
+
P as audio,
|
|
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,
|
|
1599
1607
|
$s as isFeedPointInSource,
|
|
1600
1608
|
Xs as isMirroredSourceKind,
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1609
|
+
us as isMuted,
|
|
1610
|
+
ps as listCameras,
|
|
1611
|
+
Tr as loadTrackingConfig,
|
|
1612
|
+
Ba as mapScreenImageSettingsToProps,
|
|
1613
|
+
Ha as mapScreenTextInnerShadowToProps,
|
|
1606
1614
|
$a as mapScreenTextSettingsToProps,
|
|
1607
|
-
|
|
1615
|
+
Ks as mediaToScreenPixels,
|
|
1608
1616
|
Xa as mergeScreenShapeSettings,
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
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
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
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,
|
|
1644
|
+
K as resolveTrackingConfig,
|
|
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,
|
|
1659
|
+
ee as smoothNumber,
|
|
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,
|
|
1682
1690
|
Ra as viewportToFeed,
|
|
1683
|
-
|
|
1684
|
-
|
|
1691
|
+
Fa as worldToFeed,
|
|
1692
|
+
xa as worldToScreenPixels,
|
|
1685
1693
|
Ca as worldToTracker
|
|
1686
1694
|
};
|