@vincentt-xr/sdk 2.0.0-alpha.7 → 2.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GROUNDING.md +1109 -13
- package/dist/{DebuggerUI-BjOMr8q_.js → DebuggerUI-C-ldiozL.js} +1 -1
- package/dist/{DebuggerUI-B6bP6P9r.cjs → DebuggerUI-CWX5EtQv.cjs} +1 -1
- package/dist/FaceMeshRenderer-BEEXZwS6.cjs +158 -0
- package/dist/FaceMeshRenderer-UuH5sTXG.js +1322 -0
- package/dist/FaceRetouch-C7h7x9kd.js +683 -0
- package/dist/FaceRetouch-DqftT26Y.cjs +134 -0
- package/dist/GLTFLoader-C5q63sKO.js +1633 -0
- package/dist/GLTFLoader-Cb_CRwmG.cjs +1 -0
- package/dist/SegmentationOverlay-DQuW3dsc.js +133 -0
- package/dist/SegmentationOverlay-aWVod8Kl.cjs +1 -0
- package/dist/assets/cache.d.ts +99 -0
- package/dist/assets/estimate.d.ts +11 -0
- package/dist/assets/index.d.ts +7 -0
- package/dist/assets/loaders.d.ts +28 -0
- package/dist/assets/react.d.ts +33 -0
- package/dist/calibration/calibration.d.ts +70 -0
- package/dist/calibration/index.d.ts +6 -0
- package/dist/calibration/storage.d.ts +13 -0
- package/dist/calibration/types.d.ts +53 -0
- package/dist/calibration/useXRCalibration.d.ts +46 -0
- package/dist/camera/CameraPermissionGate.d.ts +26 -0
- package/dist/camera/devices.d.ts +26 -0
- package/dist/camera/index.d.ts +8 -0
- package/dist/camera/permission.d.ts +86 -0
- package/dist/camera/useCameraPermission.d.ts +35 -0
- package/dist/capabilities/detect.d.ts +45 -0
- package/dist/capabilities/index.d.ts +5 -0
- package/dist/capabilities/types.d.ts +120 -0
- package/dist/capabilities/useXRCapabilities.d.ts +18 -0
- package/dist/compat/environment.d.ts +5 -0
- package/dist/compat/index.d.ts +4 -0
- package/dist/compat/run.d.ts +18 -0
- package/dist/compat/scenarios.d.ts +10 -0
- package/dist/compat/types.d.ts +101 -0
- package/dist/components/BodyTracker/index.d.ts +9 -0
- package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +33 -3
- package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +12 -0
- package/dist/components/FaceMesh/canonical/shaders.d.ts +1 -1
- package/dist/components/FaceMesh/index.d.ts +1 -1
- package/dist/components/GestureListener/index.d.ts +11 -0
- package/dist/components/HandTracker/index.d.ts +10 -0
- package/dist/components/HolisticTracker/index.d.ts +69 -0
- package/dist/components/HolisticTracker/settings.d.ts +58 -0
- package/dist/components/HolisticTracker/signals.d.ts +49 -0
- package/dist/components/IrisEffect/IrisMaterial.d.ts +73 -0
- package/dist/components/IrisEffect/index.d.ts +51 -0
- package/dist/components/IrisEffect/settings.d.ts +117 -0
- package/dist/components/LipEffect/LipEffect.d.ts +7 -1
- package/dist/components/LipEffect/LipEffectMaterial.d.ts +43 -7
- package/dist/components/LipEffect/LipEffects.d.ts +9 -0
- package/dist/components/LipEffect/defaults.d.ts +27 -4
- package/dist/components/LipEffect/index.d.ts +11 -3
- package/dist/components/LipEffect/settings.d.ts +271 -0
- package/dist/components/LipEffect/types.d.ts +56 -9
- package/dist/components/LipEffect/useLipDesignTextures.d.ts +11 -0
- package/dist/components/LipEffect/uvGuide.d.ts +59 -0
- package/dist/components/PersonCutout/index.d.ts +50 -0
- package/dist/components/PersonCutout/personCutout.d.ts +16 -0
- package/dist/components/ScreenImage/components/ScreenImageBody.d.ts +1 -1
- package/dist/components/ScreenImage/index.d.ts +3 -1
- package/dist/components/ScreenImage/materials/ScreenImageBlendMaterial.d.ts +1 -1
- package/dist/components/ScreenImage/materials/ScreenImageMaskMaterial.d.ts +11 -0
- package/dist/components/ScreenImage/source.d.ts +6 -0
- package/dist/components/ScreenImage/types.d.ts +18 -0
- package/dist/components/SegmentationOverlay/SegmentationOverlay.d.ts +37 -0
- package/dist/components/SegmentationOverlay/SegmentationOverlayMaterial.d.ts +31 -0
- package/dist/components/SegmentationOverlay/index.d.ts +9 -0
- package/dist/components/SegmentationOverlay/maskTexture.d.ts +23 -0
- package/dist/components/SegmentationOverlay/providers.d.ts +72 -0
- package/dist/components/SegmentationOverlay/settings.d.ts +65 -0
- package/dist/components/XRProvider/index.d.ts +16 -2
- package/dist/components/XRViewport/hooks/useViewportExternalFaces.d.ts +1 -1
- package/dist/components/XRViewport/hooks/useViewportMediaSource.d.ts +1 -1
- package/dist/components/XRViewport/hooks/useViewportPipeline.d.ts +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/constants/index.d.ts +4 -1
- package/dist/contexts-CO0sd4JQ.cjs +1 -0
- package/dist/{contexts-ByhzppYl.js → contexts-FzlnnMYD.js} +252 -246
- package/dist/coordinates/feed.d.ts +52 -0
- package/dist/coordinates/index.d.ts +5 -0
- package/dist/coordinates/spaces.d.ts +49 -0
- package/dist/coordinates/viewport.d.ts +22 -0
- package/dist/coordinates/world.d.ts +15 -0
- package/dist/debug-ui/gesture-settings/index.d.ts +14 -0
- package/dist/debug-ui/holistic-tracker-settings/index.d.ts +16 -0
- package/dist/debug-ui/index.d.ts +14 -0
- package/dist/debug-ui/iris-effect-settings/index.d.ts +12 -0
- package/dist/debug-ui/lip-effect-settings/index.d.ts +15 -0
- package/dist/debug-ui/media-source.cjs +1 -1
- package/dist/debug-ui/media-source.js +1 -1
- package/dist/debug-ui/product-hotspots/index.d.ts +24 -0
- package/dist/debug-ui/segmentation-overlay-settings/index.d.ts +12 -0
- package/dist/debug-ui/xr-diagnostics/index.d.ts +25 -0
- package/dist/debug-ui.cjs +3 -3
- package/dist/debug-ui.js +2057 -1687
- package/dist/detector-K8aej4MB.js +59 -0
- package/dist/detector-ijypGtse.cjs +1 -0
- package/dist/entries/core.d.ts +18 -1
- package/dist/entries/face-effects.d.ts +11 -3
- package/dist/entries/low-level.d.ts +22 -3
- package/dist/entries/product.d.ts +11 -0
- package/dist/entries/tracking.d.ts +24 -1
- package/dist/face-effects.cjs +155 -1
- package/dist/face-effects.js +1134 -2197
- package/dist/gestures/definitions.d.ts +85 -0
- package/dist/gestures/detector.d.ts +87 -0
- package/dist/gestures/index.d.ts +8 -0
- package/dist/gestures/measures.d.ts +101 -0
- package/dist/gestures/settings.d.ts +49 -0
- package/dist/{getFaceInfo-C4QpCQIY.js → getFaceInfo-BkZfaQs-.js} +5 -5
- package/dist/{getFaceInfo-fA1bFBub.cjs → getFaceInfo-ahPxQFGu.cjs} +1 -1
- package/dist/hooks/selectors.d.ts +68 -1
- package/dist/hooks/useCalibrationFaceTracker.d.ts +1 -1
- package/dist/hooks/useFaceInfo.d.ts +13 -1
- package/dist/hooks/useFaceInfos.d.ts +1 -1
- package/dist/hooks/useGesture.d.ts +32 -0
- package/dist/hooks/useIrisTracking.d.ts +45 -0
- package/dist/hooks/useXRDiagnostics.d.ts +81 -0
- package/dist/hooks/useXRModel.d.ts +7 -0
- package/dist/hooks/useXRSession/facade.d.ts +42 -2
- package/dist/hooks/useXRSession/index.d.ts +2 -2
- package/dist/hooks/useXRSession/reason.d.ts +3 -1
- package/dist/hooks/useXRSession/registry.d.ts +14 -0
- package/dist/hooks/useXRSession/store.d.ts +52 -3
- package/dist/index--RgGzZ6X.cjs +47 -0
- package/dist/{index-VJ0SJwmG.js → index-CHVbH0hz.js} +4 -4
- package/dist/index-CeVkgsag.cjs +1 -0
- package/dist/index-CnGox6Xr.js +3054 -0
- package/dist/{index-ByoNj0QP.js → index-CsUdQ-pn.js} +113 -111
- package/dist/{index-BjmTe9eM.cjs → index-DKBAh6hV.cjs} +1 -1
- package/dist/index-DsZwTfG0.cjs +1 -0
- package/dist/index-Dw6tj2Mi.js +144 -0
- package/dist/index-OCPjOaeP.cjs +1 -0
- package/dist/{index-DXT3WccE.js → index-s9pF4zkG.js} +1065 -1101
- package/dist/internal-BYza1h8_.cjs +1 -0
- package/dist/{internal-Dmk1cTXq.js → internal-vsfNQycj.js} +15 -16
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +2 -2
- package/dist/iris/compute.d.ts +25 -0
- package/dist/iris/index.d.ts +4 -0
- package/dist/iris/lead.d.ts +19 -0
- package/dist/iris/types.d.ts +87 -0
- package/dist/landmarkMask-CbTFzBYG.js +224 -0
- package/dist/landmarkMask-u7es2k4X.cjs +1 -0
- package/dist/low-level.cjs +1 -1
- package/dist/low-level.js +1085 -634
- package/dist/main.cjs +1 -1
- package/dist/main.js +1519 -465
- package/dist/measures-9dQPdw96.js +154 -0
- package/dist/measures-KfJzpvod.cjs +1 -0
- package/dist/models/Base/index.d.ts +49 -0
- package/dist/models/Body/index.d.ts +1 -1
- package/dist/models/Face/index.d.ts +1 -1
- package/dist/models/Hand/GestureTracking.d.ts +1 -1
- package/dist/models/Hand/HandTracking.d.ts +1 -1
- package/dist/models/Holistic/index.d.ts +49 -0
- package/dist/models/Holistic/result.d.ts +68 -0
- package/dist/models/SemanticSegmentation/index.d.ts +31 -0
- package/dist/models/SemanticSegmentation/presets.d.ts +28 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/product/ProductDimensions.d.ts +16 -0
- package/dist/product/ProductHotspot.d.ts +16 -0
- package/dist/product/ProductViewer.d.ts +9 -0
- package/dist/product/details.d.ts +53 -0
- package/dist/product/index.d.ts +14 -0
- package/dist/product/loadModelViewer.d.ts +4 -0
- package/dist/product/types.d.ts +71 -0
- package/dist/product/useProductAr.d.ts +37 -0
- package/dist/product/useProductDetails.d.ts +60 -0
- package/dist/product.cjs +1 -0
- package/dist/product.js +414 -0
- package/dist/providers-C0Dlhh9Z.js +365 -0
- package/dist/providers-YNwkmNeK.cjs +62 -0
- package/dist/quality/XRQualityController.d.ts +25 -0
- package/dist/quality/controller.d.ts +33 -0
- package/dist/quality/index.d.ts +6 -0
- package/dist/quality/types.d.ts +100 -0
- package/dist/quality/useXRQuality.d.ts +28 -0
- package/dist/{renderGroups-KZk6eRiY.js → renderGroups-CN1cGFUo.js} +1 -1
- package/dist/{renderGroups-80H3DpTl.cjs → renderGroups-O4KmaMl9.cjs} +1 -1
- package/dist/renderPasses-Cg-zqmEz.cjs +21 -0
- package/dist/renderPasses-NnKZVfBy.js +1460 -0
- package/dist/scene-object.cjs +1 -1
- package/dist/scene-object.js +2 -2
- package/dist/screenTransform-BenfCtZt.js +44 -0
- package/dist/screenTransform-BiXdpVf0.cjs +1 -0
- package/dist/segmentation-9PhSvc-R.cjs +1 -0
- package/dist/segmentation-CeOTKemr.js +5 -0
- package/dist/segmentation2d/faceMemory.d.ts +28 -0
- package/dist/segmentation2d/faceRegions.d.ts +24 -0
- package/dist/segmentation2d/index.d.ts +9 -0
- package/dist/segmentation2d/maskUv.d.ts +23 -0
- package/dist/segmentation2d/rasterize.d.ts +14 -0
- package/dist/segmentation2d/types.d.ts +46 -0
- package/dist/selectors-C5G1PMYL.js +195 -0
- package/dist/selectors-Du_PsVnW.cjs +1 -0
- package/dist/{session-CpkiK5YA.cjs → session-BBr0yN8h.cjs} +7 -7
- package/dist/{session-DLFN_VII.js → session-Cy0m7l7-.js} +76 -76
- package/dist/settings-DRR7-snV.cjs +1 -0
- package/dist/settings-aQk845NJ.js +73 -0
- package/dist/subjects/index.d.ts +2 -0
- package/dist/subjects/select.d.ts +62 -0
- package/dist/subjects/types.d.ts +55 -0
- package/dist/tracking-config/apply.d.ts +57 -0
- package/dist/tracking-config/index.d.ts +7 -0
- package/dist/tracking-config/resolve.d.ts +25 -0
- package/dist/tracking-config/storage.d.ts +8 -0
- package/dist/tracking-config/types.d.ts +106 -0
- package/dist/tracking-config/useXRTrackingConfig.d.ts +38 -0
- package/dist/tracking.cjs +1 -1
- package/dist/tracking.js +1056 -383
- package/dist/types/compositor.d.ts +21 -0
- package/dist/types/holistic.d.ts +121 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/model.d.ts +22 -2
- package/dist/types/nodes.d.ts +27 -2
- package/dist/types/segmentation.d.ts +19 -0
- package/dist/types/session.d.ts +41 -3
- package/dist/useFaceInfo-Blf7FCu3.js +303 -0
- package/dist/useFaceInfo-C5mO8NQY.cjs +1 -0
- package/dist/useXRCapabilities-B1R2ghy-.cjs +1 -0
- package/dist/useXRCapabilities-C68v__wB.js +30 -0
- package/dist/utils/fns.d.ts +6 -3
- package/dist/utils/integrity.d.ts +4 -1
- package/dist/utils/updateThrottle.d.ts +2 -0
- package/dist/utils/useStableUniforms.d.ts +18 -0
- package/docs/api/adaptive-quality.mdx +104 -0
- package/docs/api/asset-lifecycle.mdx +78 -0
- package/docs/api/camera-permission.mdx +142 -0
- package/docs/api/coordinate-spaces.mdx +165 -0
- package/docs/api/cross-camera.mdx +88 -0
- package/docs/api/diagnostics-calibration.mdx +97 -0
- package/docs/api/face-effects.mdx +6 -0
- package/docs/api/face-mesh.mdx +4 -2
- package/docs/api/gestures.mdx +173 -0
- package/docs/api/holistic-tracker.mdx +159 -0
- package/docs/api/iris-tracking.mdx +242 -0
- package/docs/api/multi-subject.mdx +95 -0
- package/docs/api/person-cutout.mdx +136 -0
- package/docs/api/product-ar.mdx +111 -0
- package/docs/api/product-details.mdx +78 -0
- package/docs/api/screen-space-coordinates.mdx +4 -1
- package/docs/api/segmentation-overlay.mdx +301 -0
- package/docs/api/session-lifecycle.mdx +136 -0
- package/docs/api/trackers.mdx +5 -0
- package/docs/api/tracking-config.mdx +108 -0
- package/docs/docs.json +23 -1
- package/docs/examples/lip-shaders.mdx +224 -0
- package/docs/guides/lip-effect-textures.mdx +292 -0
- package/docs/guides/lip-uv-template.png +0 -0
- package/docs/guides/lip-uv-template.svg +1 -0
- package/package.json +13 -1
- package/dist/FaceMeshRenderer-C5l6VLdO.cjs +0 -155
- package/dist/FaceMeshRenderer-wjAHrJzP.js +0 -1270
- package/dist/FaceRetouch-BkJzoA79.cjs +0 -134
- package/dist/FaceRetouch-DwbKQJAN.js +0 -551
- package/dist/contexts-Dr62It_K.cjs +0 -1
- package/dist/index-9dlAQAhy.js +0 -1462
- package/dist/index-BpEf2BBb.cjs +0 -1
- package/dist/index-CyUUurQT.cjs +0 -1
- package/dist/index-DCiMbxC3.cjs +0 -1
- package/dist/index-DpI-qo5X.cjs +0 -17
- package/dist/index-DyVF4vEW.js +0 -111
- package/dist/internal-Cq-TEQ5Y.cjs +0 -1
- package/dist/renderLayers-lDtL0_43.cjs +0 -1
- package/dist/renderLayers-zrK2pv5O.js +0 -13
- package/dist/renderPasses-BOoBSr8z.cjs +0 -21
- package/dist/renderPasses-BcquyVtu.js +0 -1500
- package/dist/selectors-B8H97CKA.js +0 -59
- package/dist/selectors-CZLKT2Iv.cjs +0 -1
- package/dist/useFaceInfo-BJ8-_MOs.cjs +0 -1
- package/dist/useFaceInfo-Dk426LTu.js +0 -62
- package/dist/useFaceResults-CtetsO9M.js +0 -19
- package/dist/useFaceResults-wBJF3zyp.cjs +0 -1
package/dist/low-level.js
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { u as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
1
|
+
import { u as ie, X as D, a as he, z as $, m as ge, d as ye, A as we, s as be, g as ee } from "./index-CnGox6Xr.js";
|
|
2
|
+
import { I as At, G as Lt, C as _t, J as Xt, f as Ot, V as zt, K as Dt, L as Pt, B as Vt, H as $t, M as Bt, N as Nt, O as Wt, P as Ht, Q as qt, W as Gt, R as Ut, T as jt, U as Kt, E as Qt } from "./index-CnGox6Xr.js";
|
|
3
|
+
import { u as Se } from "./index-CsUdQ-pn.js";
|
|
4
|
+
import { H as Jt, a as Zt } from "./index-CsUdQ-pn.js";
|
|
5
|
+
import { a as ve } from "./selectors-C5G1PMYL.js";
|
|
6
|
+
import { k as tr, j as rr, u as ar, c as nr, o as sr, f as ir, l as or, g as lr, m as cr, p as dr, e as ur, d as mr, b as fr, n as pr, i as hr, h as gr } from "./selectors-C5G1PMYL.js";
|
|
7
|
+
import { useEffect as A, useState as M, useRef as _, useCallback as xe, useLayoutEffect as Re, useMemo as G, Children as Ce, isValidElement as Ee } from "react";
|
|
8
|
+
import { e as Me } from "./getFaceInfo-BkZfaQs-.js";
|
|
9
|
+
import { c as wr, b as br } from "./getFaceInfo-BkZfaQs-.js";
|
|
10
|
+
import { jsx as b, jsxs as X, Fragment as N } from "react/jsx-runtime";
|
|
11
|
+
import { PerspectiveCamera as ke } from "@react-three/drei";
|
|
12
|
+
import { S as vr, g as xr, b as Rr, c as Cr, u as Er } from "./index-CHVbH0hz.js";
|
|
13
|
+
import { u as oe } from "./measures-9dQPdw96.js";
|
|
14
|
+
import { H as kr, O as Tr, P as Ir, h as Fr, a as Ar, c as Lr, f as _r, d as Xr, e as Or, g as zr, m as Dr, b as Pr, t as Vr, i as $r } from "./measures-9dQPdw96.js";
|
|
15
|
+
import { h as Nr } from "./hasFullUnitUVBounds-BGvcFsQM.js";
|
|
16
|
+
import { X as Te, a as Ie, b as Fe } from "./contexts-FzlnnMYD.js";
|
|
17
|
+
import { B as Hr, M as qr, h as Gr, i as Ur, T as jr, c as Kr, j as Qr, k as Yr, g as Jr, e as Zr, f as ea, r as ta, t as ra, d as aa, u as na } from "./contexts-FzlnnMYD.js";
|
|
18
|
+
import { c as ia, g as oa, s as la, a as ca } from "./detector-K8aej4MB.js";
|
|
19
|
+
import { v as ua, j as ma, I as fa, M as pa, S as ha, m as ga, k as ya, w as wa, l as ba, c as Sa, n as va, q as xa, x as Ra, r as Ca, t as Ea, o as Ma, u as ka, p as Ta, s as Ia, b as Fa, a as Aa } from "./providers-C0Dlhh9Z.js";
|
|
20
|
+
import * as z from "three";
|
|
17
21
|
const B = ({
|
|
18
22
|
children: e,
|
|
19
23
|
config: t,
|
|
20
|
-
style:
|
|
21
|
-
}) => /* @__PURE__ */
|
|
24
|
+
style: a
|
|
25
|
+
}) => /* @__PURE__ */ b(
|
|
22
26
|
"div",
|
|
23
27
|
{
|
|
24
28
|
"data-render-target": t.name,
|
|
@@ -30,88 +34,88 @@ const B = ({
|
|
|
30
34
|
pointerEvents: t.pointerEvents ?? "none",
|
|
31
35
|
zIndex: t.zIndex,
|
|
32
36
|
opacity: t.hidden ? 0 : 1,
|
|
33
|
-
...
|
|
37
|
+
...a
|
|
34
38
|
},
|
|
35
39
|
children: e
|
|
36
40
|
}
|
|
37
|
-
),
|
|
41
|
+
), U = ({
|
|
38
42
|
canvas: e,
|
|
39
43
|
layout: t,
|
|
40
|
-
media:
|
|
44
|
+
media: a,
|
|
41
45
|
mirrored: r,
|
|
42
|
-
filter:
|
|
46
|
+
filter: n
|
|
43
47
|
}) => {
|
|
44
|
-
const
|
|
45
|
-
e.width !==
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
},
|
|
48
|
+
const c = Math.round(t.destination.width), u = Math.round(t.destination.height);
|
|
49
|
+
e.width !== c && (e.width = c), e.height !== u && (e.height = u);
|
|
50
|
+
const d = e.getContext("2d");
|
|
51
|
+
d && (d.setTransform(1, 0, 0, 1, 0, 0), d.clearRect(0, 0, c, u), r && (d.translate(c, 0), d.scale(-1, 1)), n && (d.filter = n), d.drawImage(a, t.offsetX, t.offsetY, t.drawWidth, t.drawHeight), n && (d.filter = "none"), d.setTransform(1, 0, 0, 1, 0, 0));
|
|
52
|
+
}, le = ({
|
|
49
53
|
canvasRef: e,
|
|
50
54
|
enabled: t = !0,
|
|
51
|
-
fps:
|
|
55
|
+
fps: a = 30,
|
|
52
56
|
imageRef: r,
|
|
53
|
-
layout:
|
|
54
|
-
mirrored:
|
|
55
|
-
sourceKind:
|
|
56
|
-
videoRef:
|
|
57
|
+
layout: n,
|
|
58
|
+
mirrored: c,
|
|
59
|
+
sourceKind: u,
|
|
60
|
+
videoRef: d
|
|
57
61
|
}) => {
|
|
58
|
-
|
|
62
|
+
A(() => {
|
|
59
63
|
if (!t) {
|
|
60
|
-
const
|
|
61
|
-
|
|
64
|
+
const p = e.current, g = p == null ? void 0 : p.getContext("2d");
|
|
65
|
+
p && g && g.clearRect(0, 0, p.width, p.height);
|
|
62
66
|
return;
|
|
63
67
|
}
|
|
64
|
-
let
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
if (!
|
|
70
|
-
if (
|
|
71
|
-
const
|
|
72
|
-
if (!
|
|
68
|
+
let i = 0, f = 0;
|
|
69
|
+
const h = a > 0 ? 1e3 / a : 0, s = (p) => {
|
|
70
|
+
if (i = requestAnimationFrame(s), h > 0 && p - f < h) return;
|
|
71
|
+
f = p;
|
|
72
|
+
const g = e.current;
|
|
73
|
+
if (!g || !n) return;
|
|
74
|
+
if (u === "image") {
|
|
75
|
+
const l = r.current;
|
|
76
|
+
if (!l || !l.complete || l.naturalWidth <= 0 || l.naturalHeight <= 0)
|
|
73
77
|
return;
|
|
74
|
-
|
|
75
|
-
canvas:
|
|
76
|
-
layout:
|
|
77
|
-
media:
|
|
78
|
-
mirrored:
|
|
78
|
+
U({
|
|
79
|
+
canvas: g,
|
|
80
|
+
layout: n,
|
|
81
|
+
media: l,
|
|
82
|
+
mirrored: c
|
|
79
83
|
});
|
|
80
84
|
return;
|
|
81
85
|
}
|
|
82
|
-
const
|
|
83
|
-
!
|
|
84
|
-
canvas:
|
|
85
|
-
layout:
|
|
86
|
-
media:
|
|
87
|
-
mirrored:
|
|
86
|
+
const o = d.current;
|
|
87
|
+
!o || o.readyState < 2 || o.videoWidth <= 0 || o.videoHeight <= 0 || U({
|
|
88
|
+
canvas: g,
|
|
89
|
+
layout: n,
|
|
90
|
+
media: o,
|
|
91
|
+
mirrored: c
|
|
88
92
|
});
|
|
89
93
|
};
|
|
90
|
-
return
|
|
91
|
-
cancelAnimationFrame(
|
|
94
|
+
return i = requestAnimationFrame(s), () => {
|
|
95
|
+
cancelAnimationFrame(i);
|
|
92
96
|
};
|
|
93
|
-
}, [e, t,
|
|
94
|
-
},
|
|
97
|
+
}, [e, t, a, r, n, c, u, d]);
|
|
98
|
+
}, Ae = ({
|
|
95
99
|
canvasRef: e,
|
|
96
100
|
imageRef: t,
|
|
97
|
-
layer:
|
|
101
|
+
layer: a,
|
|
98
102
|
layout: r,
|
|
99
|
-
mirrored:
|
|
100
|
-
onCaptureTarget:
|
|
101
|
-
sourceKind:
|
|
102
|
-
videoRef:
|
|
103
|
-
}) => (
|
|
103
|
+
mirrored: n,
|
|
104
|
+
onCaptureTarget: c,
|
|
105
|
+
sourceKind: u,
|
|
106
|
+
videoRef: d
|
|
107
|
+
}) => (le({
|
|
104
108
|
canvasRef: e,
|
|
105
109
|
imageRef: t,
|
|
106
110
|
layout: r,
|
|
107
|
-
mirrored:
|
|
108
|
-
sourceKind:
|
|
109
|
-
videoRef:
|
|
110
|
-
}),
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
return
|
|
114
|
-
}, [e,
|
|
111
|
+
mirrored: n,
|
|
112
|
+
sourceKind: u,
|
|
113
|
+
videoRef: d
|
|
114
|
+
}), A(() => {
|
|
115
|
+
const i = e.current;
|
|
116
|
+
if (i)
|
|
117
|
+
return c == null || c(i), () => c == null ? void 0 : c(void 0);
|
|
118
|
+
}, [e, c]), /* @__PURE__ */ b(B, { config: a, children: /* @__PURE__ */ b(
|
|
115
119
|
"canvas",
|
|
116
120
|
{
|
|
117
121
|
ref: e,
|
|
@@ -124,84 +128,84 @@ const B = ({
|
|
|
124
128
|
background: "#000"
|
|
125
129
|
}
|
|
126
130
|
}
|
|
127
|
-
) })),
|
|
131
|
+
) })), St = ({
|
|
128
132
|
canvasRef: e,
|
|
129
133
|
controlInsetTop: t,
|
|
130
|
-
debugVisible:
|
|
134
|
+
debugVisible: a,
|
|
131
135
|
fps: r = 15,
|
|
132
|
-
imageRef:
|
|
133
|
-
layer:
|
|
134
|
-
layout:
|
|
135
|
-
mirrored:
|
|
136
|
-
sourceKind:
|
|
137
|
-
videoRef:
|
|
138
|
-
viewportSize:
|
|
136
|
+
imageRef: n,
|
|
137
|
+
layer: c,
|
|
138
|
+
layout: u,
|
|
139
|
+
mirrored: d,
|
|
140
|
+
sourceKind: i,
|
|
141
|
+
videoRef: f,
|
|
142
|
+
viewportSize: h
|
|
139
143
|
}) => {
|
|
140
|
-
|
|
144
|
+
le({
|
|
141
145
|
canvasRef: e,
|
|
142
|
-
enabled:
|
|
146
|
+
enabled: a,
|
|
143
147
|
fps: r,
|
|
144
|
-
imageRef:
|
|
145
|
-
layout:
|
|
146
|
-
mirrored:
|
|
147
|
-
sourceKind:
|
|
148
|
-
videoRef:
|
|
148
|
+
imageRef: n,
|
|
149
|
+
layout: u,
|
|
150
|
+
mirrored: d,
|
|
151
|
+
sourceKind: i,
|
|
152
|
+
videoRef: f
|
|
149
153
|
});
|
|
150
|
-
const
|
|
151
|
-
return /* @__PURE__ */
|
|
154
|
+
const s = Math.min(220, Math.max(120, h.width * 0.22)), p = h.width > 0 && h.height > 0 ? h.width / h.height : 1, g = Math.min(h.height - 24, Math.max(t ?? 16, 16));
|
|
155
|
+
return /* @__PURE__ */ b(B, { config: c, children: /* @__PURE__ */ b(
|
|
152
156
|
"canvas",
|
|
153
157
|
{
|
|
154
158
|
ref: e,
|
|
155
159
|
style: {
|
|
156
160
|
position: "absolute",
|
|
157
161
|
left: 16,
|
|
158
|
-
top:
|
|
159
|
-
width:
|
|
160
|
-
height:
|
|
161
|
-
aspectRatio: `${
|
|
162
|
-
opacity:
|
|
162
|
+
top: g,
|
|
163
|
+
width: a ? s : 1,
|
|
164
|
+
height: a ? "auto" : 1,
|
|
165
|
+
aspectRatio: `${p}`,
|
|
166
|
+
opacity: a ? 0.85 : 0,
|
|
163
167
|
borderRadius: 10,
|
|
164
|
-
border:
|
|
168
|
+
border: a ? "1px solid rgba(255,255,255,0.16)" : "none",
|
|
165
169
|
pointerEvents: "none",
|
|
166
170
|
objectFit: "contain",
|
|
167
171
|
background: "#000"
|
|
168
172
|
}
|
|
169
173
|
}
|
|
170
174
|
) });
|
|
171
|
-
},
|
|
175
|
+
}, Le = {
|
|
172
176
|
audio: !1,
|
|
173
177
|
video: {
|
|
174
178
|
facingMode: "user",
|
|
175
179
|
frameRate: { ideal: 30, max: 60 }
|
|
176
180
|
}
|
|
177
|
-
},
|
|
181
|
+
}, _e = {
|
|
178
182
|
name: "viewport-live",
|
|
179
183
|
clearColor: "#000000",
|
|
180
184
|
pointerEvents: "none",
|
|
181
185
|
zIndex: 0
|
|
182
|
-
},
|
|
186
|
+
}, Xe = {
|
|
183
187
|
name: "viewport-ui",
|
|
184
188
|
clearColor: "transparent",
|
|
185
189
|
pointerEvents: "auto",
|
|
186
190
|
zIndex: 5
|
|
187
|
-
},
|
|
191
|
+
}, Oe = {
|
|
188
192
|
name: "viewport-scene",
|
|
189
193
|
clearColor: "transparent",
|
|
190
194
|
pointerEvents: "auto",
|
|
191
195
|
zIndex: 1
|
|
192
|
-
},
|
|
196
|
+
}, O = {
|
|
193
197
|
webcam: { icon: "◉", label: "Webcam" },
|
|
194
198
|
image: { icon: "▣", label: "Images" },
|
|
195
199
|
video: { icon: "▶", label: "Videos" }
|
|
196
|
-
},
|
|
200
|
+
}, ze = ({
|
|
197
201
|
imageRef: e,
|
|
198
202
|
selectedSource: t,
|
|
199
|
-
videoRef:
|
|
200
|
-
}) => /* @__PURE__ */
|
|
201
|
-
/* @__PURE__ */
|
|
203
|
+
videoRef: a
|
|
204
|
+
}) => /* @__PURE__ */ X(N, { children: [
|
|
205
|
+
/* @__PURE__ */ b(
|
|
202
206
|
"video",
|
|
203
207
|
{
|
|
204
|
-
ref:
|
|
208
|
+
ref: a,
|
|
205
209
|
style: {
|
|
206
210
|
position: "absolute",
|
|
207
211
|
width: 1,
|
|
@@ -211,7 +215,7 @@ const B = ({
|
|
|
211
215
|
}
|
|
212
216
|
}
|
|
213
217
|
),
|
|
214
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ b(
|
|
215
219
|
"img",
|
|
216
220
|
{
|
|
217
221
|
ref: e,
|
|
@@ -225,13 +229,13 @@ const B = ({
|
|
|
225
229
|
}
|
|
226
230
|
}
|
|
227
231
|
)
|
|
228
|
-
] }),
|
|
232
|
+
] }), te = ({
|
|
229
233
|
dock: e,
|
|
230
234
|
label: t,
|
|
231
|
-
onChange:
|
|
235
|
+
onChange: a,
|
|
232
236
|
options: r,
|
|
233
|
-
value:
|
|
234
|
-
}) => /* @__PURE__ */
|
|
237
|
+
value: n
|
|
238
|
+
}) => /* @__PURE__ */ b(
|
|
235
239
|
"div",
|
|
236
240
|
{
|
|
237
241
|
style: {
|
|
@@ -248,7 +252,7 @@ const B = ({
|
|
|
248
252
|
boxShadow: "0 12px 30px rgba(0,0,0,0.18)",
|
|
249
253
|
backdropFilter: "blur(10px)"
|
|
250
254
|
},
|
|
251
|
-
children: /* @__PURE__ */
|
|
255
|
+
children: /* @__PURE__ */ X(
|
|
252
256
|
"label",
|
|
253
257
|
{
|
|
254
258
|
style: {
|
|
@@ -259,12 +263,12 @@ const B = ({
|
|
|
259
263
|
fontWeight: 700
|
|
260
264
|
},
|
|
261
265
|
children: [
|
|
262
|
-
/* @__PURE__ */
|
|
263
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ b("span", { children: t }),
|
|
267
|
+
/* @__PURE__ */ b(
|
|
264
268
|
"select",
|
|
265
269
|
{
|
|
266
|
-
value:
|
|
267
|
-
onChange: (
|
|
270
|
+
value: n,
|
|
271
|
+
onChange: (c) => a(c.target.value),
|
|
268
272
|
style: {
|
|
269
273
|
minWidth: 180,
|
|
270
274
|
maxWidth: "calc(100vw - 52px)",
|
|
@@ -275,31 +279,31 @@ const B = ({
|
|
|
275
279
|
color: "#e5eefb",
|
|
276
280
|
padding: "0 10px"
|
|
277
281
|
},
|
|
278
|
-
children: r.map((
|
|
282
|
+
children: r.map((c) => /* @__PURE__ */ b("option", { value: c.id, style: { color: "#111827" }, children: c.label }, c.id))
|
|
279
283
|
}
|
|
280
284
|
)
|
|
281
285
|
]
|
|
282
286
|
}
|
|
283
287
|
)
|
|
284
288
|
}
|
|
285
|
-
),
|
|
289
|
+
), De = ({
|
|
286
290
|
dock: e,
|
|
287
291
|
imageOptions: t,
|
|
288
|
-
selectedImageId:
|
|
292
|
+
selectedImageId: a,
|
|
289
293
|
selectedSource: r,
|
|
290
|
-
selectedVideoId:
|
|
291
|
-
setSelectedImageId:
|
|
292
|
-
setSelectedSource:
|
|
293
|
-
setSelectedVideoId:
|
|
294
|
-
showMediaControls:
|
|
295
|
-
videoOptions:
|
|
294
|
+
selectedVideoId: n,
|
|
295
|
+
setSelectedImageId: c,
|
|
296
|
+
setSelectedSource: u,
|
|
297
|
+
setSelectedVideoId: d,
|
|
298
|
+
showMediaControls: i,
|
|
299
|
+
videoOptions: f
|
|
296
300
|
}) => {
|
|
297
|
-
const [
|
|
298
|
-
return
|
|
301
|
+
const [h, s] = M(!1), p = ["webcam", "image", "video"].filter((g) => g === "image" ? t.length > 0 : g === "video" ? f.length > 0 : !0);
|
|
302
|
+
return i ? h ? /* @__PURE__ */ b(
|
|
299
303
|
"button",
|
|
300
304
|
{
|
|
301
305
|
type: "button",
|
|
302
|
-
onClick: () =>
|
|
306
|
+
onClick: () => s(!1),
|
|
303
307
|
"aria-label": "Open media controls",
|
|
304
308
|
title: "Open media controls",
|
|
305
309
|
style: {
|
|
@@ -320,8 +324,8 @@ const B = ({
|
|
|
320
324
|
},
|
|
321
325
|
children: "≡"
|
|
322
326
|
}
|
|
323
|
-
) : /* @__PURE__ */
|
|
324
|
-
/* @__PURE__ */
|
|
327
|
+
) : /* @__PURE__ */ X(N, { children: [
|
|
328
|
+
/* @__PURE__ */ X(
|
|
325
329
|
"div",
|
|
326
330
|
{
|
|
327
331
|
style: {
|
|
@@ -336,7 +340,7 @@ const B = ({
|
|
|
336
340
|
maxWidth: "calc(100vw - 32px)"
|
|
337
341
|
},
|
|
338
342
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ b(
|
|
340
344
|
"div",
|
|
341
345
|
{
|
|
342
346
|
style: {
|
|
@@ -351,15 +355,15 @@ const B = ({
|
|
|
351
355
|
backdropFilter: "blur(10px)",
|
|
352
356
|
overflowX: "auto"
|
|
353
357
|
},
|
|
354
|
-
children:
|
|
355
|
-
const
|
|
356
|
-
return /* @__PURE__ */
|
|
358
|
+
children: p.map((g) => {
|
|
359
|
+
const o = g === r;
|
|
360
|
+
return /* @__PURE__ */ X(
|
|
357
361
|
"button",
|
|
358
362
|
{
|
|
359
363
|
type: "button",
|
|
360
|
-
onClick: () =>
|
|
361
|
-
"aria-pressed":
|
|
362
|
-
title:
|
|
364
|
+
onClick: () => u(g),
|
|
365
|
+
"aria-pressed": o,
|
|
366
|
+
title: O[g].label,
|
|
363
367
|
style: {
|
|
364
368
|
border: "none",
|
|
365
369
|
borderRadius: 999,
|
|
@@ -370,26 +374,26 @@ const B = ({
|
|
|
370
374
|
alignItems: "center",
|
|
371
375
|
justifyContent: "center",
|
|
372
376
|
gap: 8,
|
|
373
|
-
background:
|
|
374
|
-
color:
|
|
377
|
+
background: o ? "rgba(56, 189, 248, 0.18)" : "rgba(255,255,255,0.04)",
|
|
378
|
+
color: o ? "#e0f2fe" : "rgba(229,238,251,0.82)",
|
|
375
379
|
cursor: "pointer",
|
|
376
380
|
flex: "0 0 auto"
|
|
377
381
|
},
|
|
378
382
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ b("span", { style: { fontSize: 14, lineHeight: 1 }, children: O[g].icon }),
|
|
384
|
+
/* @__PURE__ */ b("span", { style: { fontSize: 12, fontWeight: 700, letterSpacing: "0.01em" }, children: O[g].label })
|
|
381
385
|
]
|
|
382
386
|
},
|
|
383
|
-
|
|
387
|
+
g
|
|
384
388
|
);
|
|
385
389
|
})
|
|
386
390
|
}
|
|
387
391
|
),
|
|
388
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ b(
|
|
389
393
|
"button",
|
|
390
394
|
{
|
|
391
395
|
type: "button",
|
|
392
|
-
onClick: () =>
|
|
396
|
+
onClick: () => s(!0),
|
|
393
397
|
"aria-label": "Close media controls",
|
|
394
398
|
title: "Close media controls",
|
|
395
399
|
style: {
|
|
@@ -410,55 +414,55 @@ const B = ({
|
|
|
410
414
|
]
|
|
411
415
|
}
|
|
412
416
|
),
|
|
413
|
-
r === "image" && t.length > 0 && /* @__PURE__ */
|
|
414
|
-
|
|
417
|
+
r === "image" && t.length > 0 && /* @__PURE__ */ b(
|
|
418
|
+
te,
|
|
415
419
|
{
|
|
416
420
|
dock: e,
|
|
417
421
|
label: "Image Asset",
|
|
418
422
|
options: t,
|
|
419
|
-
value:
|
|
420
|
-
onChange:
|
|
423
|
+
value: a,
|
|
424
|
+
onChange: c
|
|
421
425
|
}
|
|
422
426
|
),
|
|
423
|
-
r === "video" &&
|
|
424
|
-
|
|
427
|
+
r === "video" && f.length > 0 && /* @__PURE__ */ b(
|
|
428
|
+
te,
|
|
425
429
|
{
|
|
426
430
|
dock: e,
|
|
427
431
|
label: "Video Asset",
|
|
428
|
-
options:
|
|
429
|
-
value:
|
|
430
|
-
onChange:
|
|
432
|
+
options: f,
|
|
433
|
+
value: n,
|
|
434
|
+
onChange: d
|
|
431
435
|
}
|
|
432
436
|
)
|
|
433
437
|
] }) : null;
|
|
434
|
-
},
|
|
438
|
+
}, Pe = ({
|
|
435
439
|
containerRef: e,
|
|
436
440
|
displayCanvasRef: t,
|
|
437
|
-
imageOptions:
|
|
441
|
+
imageOptions: a,
|
|
438
442
|
imageRef: r,
|
|
439
|
-
layout:
|
|
440
|
-
managesOwnMedia:
|
|
441
|
-
mediaDock:
|
|
442
|
-
mode:
|
|
443
|
-
overlayContent:
|
|
444
|
-
renderOutputs:
|
|
445
|
-
sceneContent:
|
|
446
|
-
selectedImageId:
|
|
447
|
-
selectedSource:
|
|
448
|
-
selectedVideoId:
|
|
449
|
-
setSceneRenderOutputs:
|
|
450
|
-
setSelectedImageId:
|
|
443
|
+
layout: n,
|
|
444
|
+
managesOwnMedia: c,
|
|
445
|
+
mediaDock: u,
|
|
446
|
+
mode: d,
|
|
447
|
+
overlayContent: i,
|
|
448
|
+
renderOutputs: f,
|
|
449
|
+
sceneContent: h,
|
|
450
|
+
selectedImageId: s,
|
|
451
|
+
selectedSource: p,
|
|
452
|
+
selectedVideoId: g,
|
|
453
|
+
setSceneRenderOutputs: o,
|
|
454
|
+
setSelectedImageId: l,
|
|
451
455
|
setSelectedSource: m,
|
|
452
|
-
setSelectedVideoId:
|
|
453
|
-
showMediaControls:
|
|
456
|
+
setSelectedVideoId: w,
|
|
457
|
+
showMediaControls: S,
|
|
454
458
|
style: R,
|
|
455
|
-
videoOptions:
|
|
459
|
+
videoOptions: x,
|
|
456
460
|
videoRef: E,
|
|
457
|
-
viewportSize:
|
|
458
|
-
mirrored:
|
|
461
|
+
viewportSize: v,
|
|
462
|
+
mirrored: y
|
|
459
463
|
}) => {
|
|
460
|
-
const { session:
|
|
461
|
-
return /* @__PURE__ */
|
|
464
|
+
const { session: k } = ie();
|
|
465
|
+
return /* @__PURE__ */ X(
|
|
462
466
|
"div",
|
|
463
467
|
{
|
|
464
468
|
ref: e,
|
|
@@ -470,576 +474,568 @@ const B = ({
|
|
|
470
474
|
...R
|
|
471
475
|
},
|
|
472
476
|
children: [
|
|
473
|
-
/* @__PURE__ */
|
|
474
|
-
|
|
475
|
-
|
|
477
|
+
/* @__PURE__ */ b(ze, { imageRef: r, selectedSource: p, videoRef: E }),
|
|
478
|
+
d === "dom" && c && /* @__PURE__ */ b(
|
|
479
|
+
Ae,
|
|
476
480
|
{
|
|
477
481
|
canvasRef: t,
|
|
478
482
|
imageRef: r,
|
|
479
483
|
videoRef: E,
|
|
480
|
-
layer:
|
|
481
|
-
layout:
|
|
482
|
-
mirrored:
|
|
483
|
-
onCaptureTarget:
|
|
484
|
-
sourceKind:
|
|
484
|
+
layer: _e,
|
|
485
|
+
layout: n,
|
|
486
|
+
mirrored: y,
|
|
487
|
+
onCaptureTarget: k._setCaptureTarget,
|
|
488
|
+
sourceKind: p === "image" ? "image" : "video"
|
|
485
489
|
}
|
|
486
490
|
),
|
|
487
|
-
(
|
|
488
|
-
|
|
491
|
+
(d === "r3f" || d === "hybrid") && /* @__PURE__ */ b(B, { config: Oe, children: /* @__PURE__ */ b(
|
|
492
|
+
Te,
|
|
489
493
|
{
|
|
490
|
-
onRenderOutputs:
|
|
494
|
+
onRenderOutputs: o,
|
|
491
495
|
renderOutputs: {
|
|
492
|
-
sceneColor:
|
|
493
|
-
sceneDepth:
|
|
496
|
+
sceneColor: f.sceneColor || f.finalColor,
|
|
497
|
+
sceneDepth: f.sceneDepth
|
|
494
498
|
},
|
|
495
|
-
renderTargetSize:
|
|
499
|
+
renderTargetSize: v,
|
|
496
500
|
style: { width: "100%", height: "100%" },
|
|
497
|
-
children:
|
|
501
|
+
children: h
|
|
498
502
|
}
|
|
499
503
|
) }),
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
|
|
502
|
-
|
|
504
|
+
/* @__PURE__ */ X(B, { config: Xe, children: [
|
|
505
|
+
c && /* @__PURE__ */ b(
|
|
506
|
+
De,
|
|
503
507
|
{
|
|
504
|
-
dock:
|
|
505
|
-
imageOptions:
|
|
506
|
-
selectedImageId:
|
|
507
|
-
selectedSource:
|
|
508
|
-
selectedVideoId:
|
|
509
|
-
setSelectedImageId:
|
|
508
|
+
dock: u,
|
|
509
|
+
imageOptions: a,
|
|
510
|
+
selectedImageId: s,
|
|
511
|
+
selectedSource: p,
|
|
512
|
+
selectedVideoId: g,
|
|
513
|
+
setSelectedImageId: l,
|
|
510
514
|
setSelectedSource: m,
|
|
511
|
-
setSelectedVideoId:
|
|
512
|
-
showMediaControls:
|
|
513
|
-
videoOptions:
|
|
515
|
+
setSelectedVideoId: w,
|
|
516
|
+
showMediaControls: S,
|
|
517
|
+
videoOptions: x
|
|
514
518
|
}
|
|
515
519
|
),
|
|
516
|
-
|
|
520
|
+
i
|
|
517
521
|
] })
|
|
518
522
|
]
|
|
519
523
|
}
|
|
520
524
|
);
|
|
521
|
-
},
|
|
525
|
+
}, Ve = 5, $e = 1, Be = (e, t) => t, Ne = "brightness(2.2) contrast(1.5) saturate(1.25)", We = ({
|
|
522
526
|
enabled: e,
|
|
523
527
|
displayMirrored: t,
|
|
524
|
-
imageRef:
|
|
528
|
+
imageRef: a,
|
|
525
529
|
layout: r,
|
|
526
|
-
mode:
|
|
527
|
-
numFaces:
|
|
528
|
-
selectedSource:
|
|
529
|
-
sourceStream:
|
|
530
|
-
videoRef:
|
|
530
|
+
mode: n,
|
|
531
|
+
numFaces: c,
|
|
532
|
+
selectedSource: u,
|
|
533
|
+
sourceStream: d,
|
|
534
|
+
videoRef: i
|
|
531
535
|
}) => {
|
|
532
|
-
const { session:
|
|
533
|
-
ready:
|
|
534
|
-
node:
|
|
535
|
-
error:
|
|
536
|
-
} =
|
|
537
|
-
numFaces:
|
|
538
|
-
}), [m,
|
|
539
|
-
node:
|
|
540
|
-
enabled:
|
|
541
|
-
selectedSource:
|
|
542
|
-
onFrame:
|
|
543
|
-
R(null),
|
|
536
|
+
const { session: f } = ie(), h = _(null), s = _(!1), p = _(document.createElement("canvas")), {
|
|
537
|
+
ready: g,
|
|
538
|
+
node: o,
|
|
539
|
+
error: l
|
|
540
|
+
} = Se(D.FACE_TRACKER, {
|
|
541
|
+
numFaces: c ?? (n === "head-binding" ? $e : Ve)
|
|
542
|
+
}), [m, w] = M("idle"), [S, R] = M(null), x = e && g && !!o, E = oe({
|
|
543
|
+
node: x ? o : null,
|
|
544
|
+
enabled: x,
|
|
545
|
+
selectedSource: u,
|
|
546
|
+
onFrame: xe(() => {
|
|
547
|
+
R(null), w("ready");
|
|
544
548
|
}, [])
|
|
545
549
|
});
|
|
546
|
-
return
|
|
550
|
+
return A(() => {
|
|
547
551
|
if (!e || !r) return;
|
|
548
|
-
const
|
|
549
|
-
const
|
|
550
|
-
if (
|
|
551
|
-
if (
|
|
552
|
-
if (!
|
|
553
|
-
} else if (
|
|
552
|
+
const v = () => {
|
|
553
|
+
const C = u === "image" ? a.current : i.current;
|
|
554
|
+
if (C) {
|
|
555
|
+
if (C instanceof HTMLImageElement) {
|
|
556
|
+
if (!C.complete || C.naturalWidth <= 0 || C.naturalHeight <= 0) return;
|
|
557
|
+
} else if (C.readyState < 2 || C.videoWidth <= 0 || C.videoHeight <= 0)
|
|
554
558
|
return;
|
|
555
|
-
|
|
556
|
-
canvas:
|
|
559
|
+
U({
|
|
560
|
+
canvas: p.current,
|
|
557
561
|
layout: r,
|
|
558
|
-
media:
|
|
562
|
+
media: C,
|
|
559
563
|
mirrored: t,
|
|
560
|
-
filter:
|
|
564
|
+
filter: u === "webcam" ? Ne : void 0
|
|
561
565
|
});
|
|
562
566
|
}
|
|
563
567
|
};
|
|
564
|
-
if (
|
|
565
|
-
|
|
568
|
+
if (u === "image") {
|
|
569
|
+
v();
|
|
566
570
|
return;
|
|
567
571
|
}
|
|
568
|
-
let
|
|
569
|
-
const
|
|
570
|
-
|
|
572
|
+
let y = 0;
|
|
573
|
+
const k = () => {
|
|
574
|
+
y = requestAnimationFrame(k), v();
|
|
571
575
|
};
|
|
572
|
-
return
|
|
573
|
-
}, [t, e,
|
|
574
|
-
var
|
|
576
|
+
return y = requestAnimationFrame(k), () => cancelAnimationFrame(y);
|
|
577
|
+
}, [t, e, a, r, u, i]), A(() => {
|
|
578
|
+
var P;
|
|
575
579
|
if (!e) {
|
|
576
|
-
|
|
580
|
+
w("idle"), R(null), s.current = !1, h.current = null;
|
|
577
581
|
return;
|
|
578
582
|
}
|
|
579
583
|
if (!r) {
|
|
580
|
-
|
|
584
|
+
w("initializing");
|
|
581
585
|
return;
|
|
582
586
|
}
|
|
583
|
-
const
|
|
584
|
-
|
|
585
|
-
let
|
|
587
|
+
const v = (d == null ? void 0 : d.id) ?? (((P = i.current) == null ? void 0 : P.srcObject) instanceof MediaStream ? i.current.srcObject.id : "none"), k = u === "webcam" ? `webcam:${v}` : u;
|
|
588
|
+
h.current !== k && (s.current = !1, h.current = k);
|
|
589
|
+
let C = !1;
|
|
586
590
|
return (async () => {
|
|
587
591
|
try {
|
|
588
|
-
|
|
589
|
-
const
|
|
590
|
-
if (
|
|
591
|
-
canvas:
|
|
592
|
-
sourceKind:
|
|
593
|
-
}), await
|
|
592
|
+
w("initializing");
|
|
593
|
+
const F = !s.current;
|
|
594
|
+
if (F && await f.setFrameSource({
|
|
595
|
+
canvas: p.current,
|
|
596
|
+
sourceKind: u
|
|
597
|
+
}), await f._setRenderSize(
|
|
594
598
|
Math.round(r.destination.width),
|
|
595
599
|
Math.round(r.destination.height)
|
|
596
|
-
),
|
|
597
|
-
R(null),
|
|
598
|
-
} catch (
|
|
599
|
-
if (
|
|
600
|
-
|
|
600
|
+
), F && (await f.start(), s.current = !0), C) return;
|
|
601
|
+
R(null), w("initializing");
|
|
602
|
+
} catch (F) {
|
|
603
|
+
if (C) return;
|
|
604
|
+
w("error"), R(F instanceof Error ? F.message : "Failed to initialize SDK face tracking");
|
|
601
605
|
}
|
|
602
606
|
})(), () => {
|
|
603
|
-
|
|
607
|
+
C = !0;
|
|
604
608
|
};
|
|
605
|
-
}, [e, r,
|
|
606
|
-
!
|
|
607
|
-
}, [
|
|
608
|
-
|
|
609
|
-
}, [
|
|
610
|
-
|
|
611
|
-
}, [
|
|
609
|
+
}, [e, r, u, f, d, i]), A(() => {
|
|
610
|
+
!x && e && !l && w("initializing");
|
|
611
|
+
}, [x, e, l]), A(() => {
|
|
612
|
+
l && (w("error"), R(l.message));
|
|
613
|
+
}, [l]), A(() => () => {
|
|
614
|
+
s.current = !1, f.stop();
|
|
615
|
+
}, [f]), {
|
|
612
616
|
activeDelegate: "GPU",
|
|
613
617
|
faces: E,
|
|
614
618
|
status: m,
|
|
615
|
-
error:
|
|
619
|
+
error: S
|
|
616
620
|
};
|
|
617
|
-
},
|
|
621
|
+
}, He = (e, t) => e === "auto" ? t === "webcam" ? "cover" : "contain" : e, qe = ({
|
|
618
622
|
imageOptions: e,
|
|
619
623
|
initialImageId: t,
|
|
620
|
-
initialSource:
|
|
624
|
+
initialSource: a,
|
|
621
625
|
initialVideoId: r,
|
|
622
|
-
source:
|
|
623
|
-
videoOptions:
|
|
626
|
+
source: n,
|
|
627
|
+
videoOptions: c
|
|
624
628
|
}) => {
|
|
625
|
-
var
|
|
626
|
-
const
|
|
629
|
+
var i, f, h, s;
|
|
630
|
+
const u = (n == null ? void 0 : n.kind) ?? a ?? "webcam";
|
|
627
631
|
return {
|
|
628
|
-
selectedSource:
|
|
629
|
-
selectedImageId: (
|
|
630
|
-
selectedVideoId: (
|
|
632
|
+
selectedSource: u === "image" && e.length === 0 || u === "video" && c.length === 0 ? "webcam" : u,
|
|
633
|
+
selectedImageId: (n == null ? void 0 : n.kind) === "image" ? n.assetId ?? ((i = e[0]) == null ? void 0 : i.id) ?? "" : t ?? ((f = e[0]) == null ? void 0 : f.id) ?? "",
|
|
634
|
+
selectedVideoId: (n == null ? void 0 : n.kind) === "video" ? n.assetId ?? ((h = c[0]) == null ? void 0 : h.id) ?? "" : r ?? ((s = c[0]) == null ? void 0 : s.id) ?? ""
|
|
631
635
|
};
|
|
632
|
-
},
|
|
636
|
+
}, Ge = (e, t, a) => {
|
|
633
637
|
if (e.width <= 0 || e.height <= 0 || t.width <= 0 || t.height <= 0)
|
|
634
638
|
return null;
|
|
635
|
-
const r =
|
|
636
|
-
return {
|
|
637
|
-
|
|
638
|
-
destination: t,
|
|
639
|
-
drawWidth: i,
|
|
640
|
-
drawHeight: o,
|
|
641
|
-
offsetX: (t.width - i) * 0.5,
|
|
642
|
-
offsetY: (t.height - o) * 0.5,
|
|
643
|
-
scale: r
|
|
644
|
-
};
|
|
645
|
-
}, Ve = (e) => {
|
|
639
|
+
const r = he(e, t, a);
|
|
640
|
+
return r ? { source: e, destination: t, ...r } : null;
|
|
641
|
+
}, Ue = (e) => {
|
|
646
642
|
if (!e) return { width: 0, height: 0 };
|
|
647
643
|
const t = e.getBoundingClientRect();
|
|
648
644
|
return {
|
|
649
645
|
width: t.width || e.clientWidth,
|
|
650
646
|
height: t.height || e.clientHeight
|
|
651
647
|
};
|
|
652
|
-
},
|
|
653
|
-
const [t,
|
|
654
|
-
return
|
|
648
|
+
}, je = (e) => {
|
|
649
|
+
const [t, a] = M({ width: 0, height: 0 });
|
|
650
|
+
return Re(() => {
|
|
655
651
|
const r = e.current;
|
|
656
652
|
if (!r) return;
|
|
657
|
-
let
|
|
658
|
-
const
|
|
659
|
-
const
|
|
660
|
-
|
|
661
|
-
(
|
|
653
|
+
let n = 0;
|
|
654
|
+
const c = () => {
|
|
655
|
+
const f = Ue(r);
|
|
656
|
+
a(
|
|
657
|
+
(h) => h.width === f.width && h.height === f.height ? h : f
|
|
662
658
|
);
|
|
663
|
-
},
|
|
664
|
-
|
|
659
|
+
}, u = () => {
|
|
660
|
+
c(), n && cancelAnimationFrame(n), n = requestAnimationFrame(c);
|
|
665
661
|
};
|
|
666
|
-
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
const
|
|
670
|
-
return window.addEventListener("resize",
|
|
671
|
-
|
|
662
|
+
u();
|
|
663
|
+
const d = new ResizeObserver(u);
|
|
664
|
+
d.observe(r);
|
|
665
|
+
const i = window.visualViewport;
|
|
666
|
+
return window.addEventListener("resize", u), window.addEventListener("orientationchange", u), i == null || i.addEventListener("resize", u), i == null || i.addEventListener("scroll", u), () => {
|
|
667
|
+
n && cancelAnimationFrame(n), d.disconnect(), window.removeEventListener("resize", u), window.removeEventListener("orientationchange", u), i == null || i.removeEventListener("resize", u), i == null || i.removeEventListener("scroll", u);
|
|
672
668
|
};
|
|
673
669
|
}, [e]), t;
|
|
674
|
-
},
|
|
670
|
+
}, Ke = ({
|
|
675
671
|
enabled: e,
|
|
676
672
|
selectedSource: t
|
|
677
673
|
}) => {
|
|
678
|
-
const
|
|
674
|
+
const a = ve(D.FACE_TRACKER);
|
|
679
675
|
return {
|
|
680
|
-
faces:
|
|
681
|
-
trackerStatus:
|
|
676
|
+
faces: oe({ node: a, enabled: e, selectedSource: t }),
|
|
677
|
+
trackerStatus: a ? "ready" : "idle"
|
|
682
678
|
};
|
|
683
|
-
},
|
|
679
|
+
}, re = (e) => {
|
|
684
680
|
e && (e.pause(), e.removeAttribute("src"), e.srcObject = null, e.load());
|
|
685
|
-
},
|
|
681
|
+
}, ae = (e) => {
|
|
686
682
|
e && e.removeAttribute("src");
|
|
687
|
-
},
|
|
683
|
+
}, Qe = ({
|
|
688
684
|
enabled: e,
|
|
689
685
|
imageAsset: t,
|
|
690
|
-
selectedSource:
|
|
686
|
+
selectedSource: a,
|
|
691
687
|
videoAsset: r
|
|
692
688
|
}) => {
|
|
693
|
-
const
|
|
694
|
-
return
|
|
689
|
+
const n = _(null), c = _(null), [u, d] = M(null), [i, f] = M({ width: 0, height: 0 }), [h, s] = M("idle"), [p, g] = M(null);
|
|
690
|
+
return A(() => {
|
|
695
691
|
if (!e) {
|
|
696
|
-
|
|
692
|
+
re(n.current), ae(c.current), d(null), f({ width: 0, height: 0 }), s("idle"), g(null);
|
|
697
693
|
return;
|
|
698
694
|
}
|
|
699
|
-
let
|
|
700
|
-
const m = (
|
|
701
|
-
|
|
702
|
-
},
|
|
703
|
-
|
|
704
|
-
},
|
|
705
|
-
|
|
706
|
-
const
|
|
707
|
-
if (
|
|
708
|
-
|
|
695
|
+
let o = !1, l = null;
|
|
696
|
+
const m = (v, y) => {
|
|
697
|
+
o || (f({ width: v, height: y }), s("ready"), g(null));
|
|
698
|
+
}, w = () => {
|
|
699
|
+
re(n.current), ae(c.current), l == null || l.getTracks().forEach((v) => v.stop()), l = null, d(null);
|
|
700
|
+
}, S = async () => {
|
|
701
|
+
s("requesting");
|
|
702
|
+
const v = await navigator.mediaDevices.getUserMedia(Le);
|
|
703
|
+
if (o) {
|
|
704
|
+
v.getTracks().forEach((k) => k.stop());
|
|
709
705
|
return;
|
|
710
706
|
}
|
|
711
|
-
|
|
712
|
-
const
|
|
713
|
-
|
|
714
|
-
}, R = async (
|
|
715
|
-
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
},
|
|
719
|
-
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
}), m(
|
|
707
|
+
l = v, d(v);
|
|
708
|
+
const y = n.current;
|
|
709
|
+
y && (y.srcObject = v, y.muted = !0, y.playsInline = !0, y.autoplay = !0, await y.play(), m(y.videoWidth, y.videoHeight));
|
|
710
|
+
}, R = async (v) => {
|
|
711
|
+
s("requesting"), d(null);
|
|
712
|
+
const y = n.current;
|
|
713
|
+
y && (y.src = v, y.muted = !0, y.loop = !0, y.playsInline = !0, y.autoplay = !0, y.crossOrigin = "anonymous", await y.play(), m(y.videoWidth, y.videoHeight));
|
|
714
|
+
}, x = async (v) => {
|
|
715
|
+
s("requesting"), d(null);
|
|
716
|
+
const y = c.current;
|
|
717
|
+
y && (await new Promise((k, C) => {
|
|
718
|
+
y.onload = () => k(), y.onerror = () => C(new Error("Unable to load image")), y.src = v;
|
|
719
|
+
}), m(y.naturalWidth, y.naturalHeight));
|
|
724
720
|
};
|
|
725
|
-
return
|
|
721
|
+
return w(), (async () => {
|
|
726
722
|
try {
|
|
727
|
-
if (
|
|
728
|
-
await
|
|
723
|
+
if (a === "webcam") {
|
|
724
|
+
await S();
|
|
729
725
|
return;
|
|
730
726
|
}
|
|
731
|
-
if (
|
|
727
|
+
if (a === "video") {
|
|
732
728
|
if (!(r != null && r.src)) throw new Error("Missing video source");
|
|
733
729
|
await R(r.src);
|
|
734
730
|
return;
|
|
735
731
|
}
|
|
736
732
|
if (!(t != null && t.src)) throw new Error("Missing image source");
|
|
737
|
-
await
|
|
738
|
-
} catch (
|
|
739
|
-
if (
|
|
740
|
-
|
|
733
|
+
await x(t.src);
|
|
734
|
+
} catch (v) {
|
|
735
|
+
if (o) return;
|
|
736
|
+
s("error"), g(v instanceof Error ? v.message : `Unable to initialize ${a}`);
|
|
741
737
|
}
|
|
742
738
|
})(), () => {
|
|
743
|
-
|
|
739
|
+
o = !0, w();
|
|
744
740
|
};
|
|
745
|
-
}, [e, t,
|
|
746
|
-
videoRef:
|
|
747
|
-
imageRef:
|
|
748
|
-
stream:
|
|
749
|
-
mediaSize:
|
|
750
|
-
status:
|
|
751
|
-
error:
|
|
741
|
+
}, [e, t, a, r]), {
|
|
742
|
+
videoRef: n,
|
|
743
|
+
imageRef: c,
|
|
744
|
+
stream: u,
|
|
745
|
+
mediaSize: i,
|
|
746
|
+
status: h,
|
|
747
|
+
error: p
|
|
752
748
|
};
|
|
753
|
-
},
|
|
749
|
+
}, Ye = ({
|
|
754
750
|
enabled: e,
|
|
755
751
|
imageRef: t,
|
|
756
|
-
selectedSource:
|
|
752
|
+
selectedSource: a,
|
|
757
753
|
status: r,
|
|
758
|
-
videoRef:
|
|
754
|
+
videoRef: n
|
|
759
755
|
}) => {
|
|
760
|
-
const [
|
|
761
|
-
return
|
|
756
|
+
const [c, u] = M(null);
|
|
757
|
+
return A(() => {
|
|
762
758
|
if (!e || r !== "ready") {
|
|
763
|
-
|
|
759
|
+
u((f) => (f == null || f.dispose(), null));
|
|
764
760
|
return;
|
|
765
761
|
}
|
|
766
|
-
const
|
|
767
|
-
if (!
|
|
768
|
-
const
|
|
769
|
-
return
|
|
770
|
-
|
|
762
|
+
const d = a === "image" ? t.current : n.current;
|
|
763
|
+
if (!d) return;
|
|
764
|
+
const i = a === "image" ? new z.Texture(d) : new z.VideoTexture(d);
|
|
765
|
+
return i.colorSpace = z.SRGBColorSpace, i.minFilter = z.LinearFilter, i.magFilter = z.LinearFilter, i.generateMipmaps = !1, i.needsUpdate = !0, u((f) => (f == null || f.dispose(), i)), () => {
|
|
766
|
+
i.dispose();
|
|
771
767
|
};
|
|
772
|
-
}, [e, t,
|
|
773
|
-
},
|
|
768
|
+
}, [e, t, a, r, n]), c;
|
|
769
|
+
}, Je = ({
|
|
774
770
|
externalTracker: e,
|
|
775
771
|
imageOptions: t,
|
|
776
|
-
layout:
|
|
772
|
+
layout: a,
|
|
777
773
|
managesOwnMedia: r,
|
|
778
|
-
mediaError:
|
|
779
|
-
mediaFitMode:
|
|
780
|
-
mediaSize:
|
|
781
|
-
mediaStatus:
|
|
782
|
-
mirrored:
|
|
783
|
-
selectedImage:
|
|
784
|
-
selectedImageId:
|
|
785
|
-
selectedSource:
|
|
786
|
-
selectedVideo:
|
|
787
|
-
selectedVideoId:
|
|
788
|
-
setMirrored:
|
|
789
|
-
setSelectedImageId:
|
|
774
|
+
mediaError: n,
|
|
775
|
+
mediaFitMode: c,
|
|
776
|
+
mediaSize: u,
|
|
777
|
+
mediaStatus: d,
|
|
778
|
+
mirrored: i,
|
|
779
|
+
selectedImage: f,
|
|
780
|
+
selectedImageId: h,
|
|
781
|
+
selectedSource: s,
|
|
782
|
+
selectedVideo: p,
|
|
783
|
+
selectedVideoId: g,
|
|
784
|
+
setMirrored: o,
|
|
785
|
+
setSelectedImageId: l,
|
|
790
786
|
setSelectedSource: m,
|
|
791
|
-
setSelectedVideoId:
|
|
792
|
-
setShowMediaControls:
|
|
787
|
+
setSelectedVideoId: w,
|
|
788
|
+
setShowMediaControls: S,
|
|
793
789
|
showMediaControls: R,
|
|
794
|
-
tracker:
|
|
790
|
+
tracker: x,
|
|
795
791
|
videoOptions: E,
|
|
796
|
-
viewportSize:
|
|
792
|
+
viewportSize: v
|
|
797
793
|
}) => {
|
|
798
|
-
const
|
|
794
|
+
const y = s === "image" ? `${O.image.label}: ${(f == null ? void 0 : f.label) ?? ""}` : s === "video" ? `${O.video.label}: ${(p == null ? void 0 : p.label) ?? ""}` : O.webcam.label;
|
|
799
795
|
return {
|
|
800
|
-
activeDelegate: r ?
|
|
801
|
-
faces: r ?
|
|
796
|
+
activeDelegate: r ? x.activeDelegate : null,
|
|
797
|
+
faces: r ? x.faces : e.faces,
|
|
802
798
|
imageOptions: t,
|
|
803
|
-
layout:
|
|
804
|
-
mediaError:
|
|
805
|
-
mediaFitMode:
|
|
806
|
-
mediaLabel:
|
|
807
|
-
mediaStatus:
|
|
808
|
-
mirrored:
|
|
809
|
-
selectedImageId:
|
|
810
|
-
selectedSource:
|
|
811
|
-
selectedVideoId:
|
|
812
|
-
setMirrored:
|
|
813
|
-
setSelectedImageId:
|
|
799
|
+
layout: a,
|
|
800
|
+
mediaError: n,
|
|
801
|
+
mediaFitMode: c,
|
|
802
|
+
mediaLabel: y,
|
|
803
|
+
mediaStatus: d,
|
|
804
|
+
mirrored: i,
|
|
805
|
+
selectedImageId: h,
|
|
806
|
+
selectedSource: s,
|
|
807
|
+
selectedVideoId: g,
|
|
808
|
+
setMirrored: o,
|
|
809
|
+
setSelectedImageId: l,
|
|
814
810
|
setSelectedSource: m,
|
|
815
|
-
setSelectedVideoId:
|
|
816
|
-
setShowMediaControls:
|
|
811
|
+
setSelectedVideoId: w,
|
|
812
|
+
setShowMediaControls: S,
|
|
817
813
|
showMediaControls: R,
|
|
818
|
-
trackerError: r ?
|
|
819
|
-
trackerStatus: r ?
|
|
814
|
+
trackerError: r ? x.error : null,
|
|
815
|
+
trackerStatus: r ? x.status : e.trackerStatus,
|
|
820
816
|
videoOptions: E,
|
|
821
|
-
viewportSize:
|
|
822
|
-
mediaSize:
|
|
817
|
+
viewportSize: v,
|
|
818
|
+
mediaSize: u
|
|
823
819
|
};
|
|
824
|
-
},
|
|
820
|
+
}, Ze = ({
|
|
825
821
|
mediaTexture: e,
|
|
826
822
|
previewMode: t,
|
|
827
|
-
renderOutputs:
|
|
823
|
+
renderOutputs: a,
|
|
828
824
|
sceneRenderOutputs: r
|
|
829
|
-
}) =>
|
|
825
|
+
}) => G(
|
|
830
826
|
() => ({
|
|
831
|
-
requested:
|
|
827
|
+
requested: a,
|
|
832
828
|
previewMode: t,
|
|
833
829
|
mediaColorTexture: e,
|
|
834
830
|
sceneColorTexture: r.sceneColorTexture,
|
|
835
|
-
finalColorTexture:
|
|
831
|
+
finalColorTexture: a.finalColor ? r.sceneColorTexture : null,
|
|
836
832
|
sceneDepthTexture: r.sceneDepthTexture,
|
|
837
833
|
estimatedDepthTexture: null,
|
|
838
834
|
available: {
|
|
839
835
|
mediaColor: e !== null,
|
|
840
836
|
sceneColor: r.sceneColorTexture !== null,
|
|
841
|
-
finalColor: !!(
|
|
837
|
+
finalColor: !!(a.finalColor && r.sceneColorTexture),
|
|
842
838
|
sceneDepth: r.sceneDepthTexture !== null,
|
|
843
839
|
estimatedDepth: !1
|
|
844
840
|
}
|
|
845
841
|
}),
|
|
846
|
-
[e, t,
|
|
847
|
-
),
|
|
842
|
+
[e, t, a, r]
|
|
843
|
+
), et = ({
|
|
848
844
|
fitMode: e,
|
|
849
845
|
imageOptions: t,
|
|
850
|
-
initialImageId:
|
|
846
|
+
initialImageId: a,
|
|
851
847
|
initialMirrored: r,
|
|
852
|
-
initialSource:
|
|
853
|
-
initialVideoId:
|
|
854
|
-
mediaStrategy:
|
|
855
|
-
previewMode:
|
|
856
|
-
renderOutputs:
|
|
857
|
-
showMediaControlsByDefault:
|
|
858
|
-
source:
|
|
859
|
-
videoOptions:
|
|
848
|
+
initialSource: n,
|
|
849
|
+
initialVideoId: c,
|
|
850
|
+
mediaStrategy: u,
|
|
851
|
+
previewMode: d,
|
|
852
|
+
renderOutputs: i,
|
|
853
|
+
showMediaControlsByDefault: f,
|
|
854
|
+
source: h,
|
|
855
|
+
videoOptions: s
|
|
860
856
|
}) => {
|
|
861
|
-
const
|
|
862
|
-
() =>
|
|
857
|
+
const p = _(null), g = _(null), o = je(p), l = G(
|
|
858
|
+
() => qe({
|
|
863
859
|
imageOptions: t,
|
|
864
|
-
initialImageId:
|
|
865
|
-
initialSource:
|
|
866
|
-
initialVideoId:
|
|
867
|
-
source:
|
|
868
|
-
videoOptions:
|
|
860
|
+
initialImageId: a,
|
|
861
|
+
initialSource: n,
|
|
862
|
+
initialVideoId: c,
|
|
863
|
+
source: h,
|
|
864
|
+
videoOptions: s
|
|
869
865
|
}),
|
|
870
|
-
[t,
|
|
871
|
-
), [m,
|
|
872
|
-
|
|
873
|
-
), [
|
|
866
|
+
[t, a, n, c, h, s]
|
|
867
|
+
), [m, w] = M(r), [S, R] = M(f), [x, E] = M(
|
|
868
|
+
l.selectedSource
|
|
869
|
+
), [v, y] = M(l.selectedImageId), [k, C] = M(l.selectedVideoId), [Y, P] = M({
|
|
874
870
|
sceneColorTexture: null,
|
|
875
871
|
sceneDepthTexture: null
|
|
876
|
-
}),
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
}, [
|
|
880
|
-
const
|
|
881
|
-
enabled:
|
|
882
|
-
imageAsset:
|
|
883
|
-
selectedSource:
|
|
884
|
-
videoAsset:
|
|
885
|
-
}), W =
|
|
886
|
-
() =>
|
|
887
|
-
[
|
|
888
|
-
),
|
|
889
|
-
enabled: !!(
|
|
890
|
-
imageRef:
|
|
891
|
-
selectedSource:
|
|
892
|
-
status:
|
|
893
|
-
videoRef:
|
|
894
|
-
}), H =
|
|
872
|
+
}), F = u === "internal";
|
|
873
|
+
A(() => {
|
|
874
|
+
h && (E(l.selectedSource), y(l.selectedImageId), C(l.selectedVideoId));
|
|
875
|
+
}, [l, h]);
|
|
876
|
+
const J = t.find((q) => q.id === v) ?? t[0], Z = s.find((q) => q.id === k) ?? s[0], T = Qe({
|
|
877
|
+
enabled: F,
|
|
878
|
+
imageAsset: J,
|
|
879
|
+
selectedSource: x,
|
|
880
|
+
videoAsset: Z
|
|
881
|
+
}), W = He(e, x), V = G(
|
|
882
|
+
() => Ge(T.mediaSize, o, W),
|
|
883
|
+
[T.mediaSize, W, o]
|
|
884
|
+
), de = Ye({
|
|
885
|
+
enabled: !!(i.mediaColor || i.finalColor),
|
|
886
|
+
imageRef: T.imageRef,
|
|
887
|
+
selectedSource: x,
|
|
888
|
+
status: T.status,
|
|
889
|
+
videoRef: T.videoRef
|
|
890
|
+
}), H = Be(x, m), ue = We({
|
|
895
891
|
displayMirrored: H,
|
|
896
|
-
enabled:
|
|
897
|
-
imageRef:
|
|
898
|
-
layout:
|
|
899
|
-
selectedSource:
|
|
900
|
-
sourceStream:
|
|
901
|
-
videoRef:
|
|
902
|
-
}),
|
|
903
|
-
enabled: !
|
|
904
|
-
selectedSource:
|
|
905
|
-
}),
|
|
906
|
-
externalTracker:
|
|
892
|
+
enabled: F && T.status === "ready" && V !== null,
|
|
893
|
+
imageRef: T.imageRef,
|
|
894
|
+
layout: V,
|
|
895
|
+
selectedSource: x,
|
|
896
|
+
sourceStream: T.stream,
|
|
897
|
+
videoRef: T.videoRef
|
|
898
|
+
}), me = Ke({
|
|
899
|
+
enabled: !F,
|
|
900
|
+
selectedSource: x
|
|
901
|
+
}), fe = Je({
|
|
902
|
+
externalTracker: me,
|
|
907
903
|
imageOptions: t,
|
|
908
|
-
layout:
|
|
909
|
-
managesOwnMedia:
|
|
910
|
-
mediaError:
|
|
904
|
+
layout: V,
|
|
905
|
+
managesOwnMedia: F,
|
|
906
|
+
mediaError: T.error,
|
|
911
907
|
mediaFitMode: W,
|
|
912
|
-
mediaSize:
|
|
913
|
-
mediaStatus:
|
|
908
|
+
mediaSize: T.mediaSize,
|
|
909
|
+
mediaStatus: T.status,
|
|
914
910
|
mirrored: H,
|
|
915
|
-
selectedImage:
|
|
916
|
-
selectedImageId:
|
|
917
|
-
selectedSource:
|
|
918
|
-
selectedVideo:
|
|
919
|
-
selectedVideoId:
|
|
920
|
-
setMirrored:
|
|
921
|
-
setSelectedImageId:
|
|
911
|
+
selectedImage: J,
|
|
912
|
+
selectedImageId: v,
|
|
913
|
+
selectedSource: x,
|
|
914
|
+
selectedVideo: Z,
|
|
915
|
+
selectedVideoId: k,
|
|
916
|
+
setMirrored: w,
|
|
917
|
+
setSelectedImageId: y,
|
|
922
918
|
setSelectedSource: E,
|
|
923
|
-
setSelectedVideoId:
|
|
919
|
+
setSelectedVideoId: C,
|
|
924
920
|
setShowMediaControls: R,
|
|
925
|
-
showMediaControls:
|
|
926
|
-
tracker:
|
|
927
|
-
videoOptions:
|
|
928
|
-
viewportSize:
|
|
929
|
-
}),
|
|
930
|
-
mediaTexture:
|
|
931
|
-
previewMode:
|
|
932
|
-
renderOutputs:
|
|
933
|
-
sceneRenderOutputs:
|
|
921
|
+
showMediaControls: S,
|
|
922
|
+
tracker: ue,
|
|
923
|
+
videoOptions: s,
|
|
924
|
+
viewportSize: o
|
|
925
|
+
}), pe = Ze({
|
|
926
|
+
mediaTexture: de,
|
|
927
|
+
previewMode: d,
|
|
928
|
+
renderOutputs: i,
|
|
929
|
+
sceneRenderOutputs: Y
|
|
934
930
|
});
|
|
935
931
|
return {
|
|
936
|
-
containerRef:
|
|
937
|
-
displayCanvasRef:
|
|
932
|
+
containerRef: p,
|
|
933
|
+
displayCanvasRef: g,
|
|
938
934
|
displayMirrored: H,
|
|
939
|
-
layout:
|
|
940
|
-
managesOwnMedia:
|
|
941
|
-
media:
|
|
942
|
-
renderOutputState:
|
|
943
|
-
renderState:
|
|
944
|
-
selectedImageId:
|
|
945
|
-
selectedSource:
|
|
946
|
-
selectedVideoId:
|
|
947
|
-
setSceneRenderOutputs:
|
|
948
|
-
setSelectedImageId:
|
|
935
|
+
layout: V,
|
|
936
|
+
managesOwnMedia: F,
|
|
937
|
+
media: T,
|
|
938
|
+
renderOutputState: pe,
|
|
939
|
+
renderState: fe,
|
|
940
|
+
selectedImageId: v,
|
|
941
|
+
selectedSource: x,
|
|
942
|
+
selectedVideoId: k,
|
|
943
|
+
setSceneRenderOutputs: P,
|
|
944
|
+
setSelectedImageId: y,
|
|
949
945
|
setSelectedSource: E,
|
|
950
|
-
setSelectedVideoId:
|
|
951
|
-
showMediaControls:
|
|
952
|
-
viewportSize:
|
|
946
|
+
setSelectedVideoId: C,
|
|
947
|
+
showMediaControls: S,
|
|
948
|
+
viewportSize: o
|
|
953
949
|
};
|
|
954
|
-
},
|
|
955
|
-
|
|
956
|
-
const
|
|
957
|
-
|
|
958
|
-
const
|
|
950
|
+
}, K = ({ children: e }) => /* @__PURE__ */ b(N, { children: e });
|
|
951
|
+
K.displayName = "XRViewport.Scene";
|
|
952
|
+
const Q = ({ children: e }) => /* @__PURE__ */ b(N, { children: e });
|
|
953
|
+
Q.displayName = "XRViewport.Overlay";
|
|
954
|
+
const tt = (e, t) => {
|
|
959
955
|
if (e === "dom")
|
|
960
956
|
return {
|
|
961
957
|
sceneContent: null,
|
|
962
958
|
overlayContent: t
|
|
963
959
|
};
|
|
964
|
-
let
|
|
965
|
-
const
|
|
966
|
-
return
|
|
967
|
-
var
|
|
968
|
-
if (!
|
|
969
|
-
|
|
960
|
+
let a = null, r = null;
|
|
961
|
+
const n = [];
|
|
962
|
+
return Ce.forEach(t, (c) => {
|
|
963
|
+
var d;
|
|
964
|
+
if (!Ee(c)) {
|
|
965
|
+
c != null && n.push(c);
|
|
970
966
|
return;
|
|
971
967
|
}
|
|
972
|
-
const
|
|
973
|
-
if (
|
|
974
|
-
|
|
968
|
+
const u = (d = c.type) == null ? void 0 : d.displayName;
|
|
969
|
+
if (u === K.displayName) {
|
|
970
|
+
a = c.props.children;
|
|
975
971
|
return;
|
|
976
972
|
}
|
|
977
|
-
if (
|
|
978
|
-
r =
|
|
973
|
+
if (u === Q.displayName) {
|
|
974
|
+
r = c.props.children;
|
|
979
975
|
return;
|
|
980
976
|
}
|
|
981
|
-
|
|
982
|
-
}), !r &&
|
|
983
|
-
sceneContent:
|
|
977
|
+
n.push(c);
|
|
978
|
+
}), !r && n.length > 0 && (r = n), {
|
|
979
|
+
sceneContent: a,
|
|
984
980
|
overlayContent: r
|
|
985
981
|
};
|
|
986
|
-
},
|
|
987
|
-
function
|
|
988
|
-
return e.Scene =
|
|
982
|
+
}, ne = (e, t) => typeof e == "function" ? e(t) : e;
|
|
983
|
+
function rt(e) {
|
|
984
|
+
return e.Scene = K, e.Overlay = Q, e;
|
|
989
985
|
}
|
|
990
|
-
const
|
|
986
|
+
const vt = rt(({
|
|
991
987
|
children: e,
|
|
992
988
|
fitMode: t = "auto",
|
|
993
|
-
imageOptions:
|
|
989
|
+
imageOptions: a = [],
|
|
994
990
|
initialImageId: r,
|
|
995
|
-
initialMirrored:
|
|
996
|
-
initialSource:
|
|
997
|
-
initialVideoId:
|
|
998
|
-
mediaStrategy:
|
|
999
|
-
mediaDock:
|
|
1000
|
-
mode:
|
|
1001
|
-
previewMode:
|
|
1002
|
-
renderOutputs:
|
|
1003
|
-
showMediaControlsByDefault:
|
|
1004
|
-
source:
|
|
1005
|
-
style:
|
|
1006
|
-
videoOptions:
|
|
991
|
+
initialMirrored: n = !0,
|
|
992
|
+
initialSource: c = "webcam",
|
|
993
|
+
initialVideoId: u,
|
|
994
|
+
mediaStrategy: d = "internal",
|
|
995
|
+
mediaDock: i = "bottom-left",
|
|
996
|
+
mode: f = "dom",
|
|
997
|
+
previewMode: h = "finalColor",
|
|
998
|
+
renderOutputs: s = {},
|
|
999
|
+
showMediaControlsByDefault: p = !0,
|
|
1000
|
+
source: g,
|
|
1001
|
+
style: o,
|
|
1002
|
+
videoOptions: l = []
|
|
1007
1003
|
}) => {
|
|
1008
|
-
const m =
|
|
1004
|
+
const m = et({
|
|
1009
1005
|
fitMode: t,
|
|
1010
|
-
imageOptions:
|
|
1006
|
+
imageOptions: a,
|
|
1011
1007
|
initialImageId: r,
|
|
1012
|
-
initialMirrored:
|
|
1013
|
-
initialSource:
|
|
1014
|
-
initialVideoId:
|
|
1015
|
-
mediaStrategy:
|
|
1016
|
-
previewMode:
|
|
1017
|
-
renderOutputs:
|
|
1018
|
-
showMediaControlsByDefault:
|
|
1019
|
-
source:
|
|
1020
|
-
videoOptions:
|
|
1021
|
-
}),
|
|
1022
|
-
|
|
1008
|
+
initialMirrored: n,
|
|
1009
|
+
initialSource: c,
|
|
1010
|
+
initialVideoId: u,
|
|
1011
|
+
mediaStrategy: d,
|
|
1012
|
+
previewMode: h,
|
|
1013
|
+
renderOutputs: s,
|
|
1014
|
+
showMediaControlsByDefault: p,
|
|
1015
|
+
source: g,
|
|
1016
|
+
videoOptions: l
|
|
1017
|
+
}), w = typeof e == "function" ? e(m.renderState) : e, { sceneContent: S, overlayContent: R } = tt(f, w), x = ne(
|
|
1018
|
+
S,
|
|
1023
1019
|
m.renderState
|
|
1024
|
-
), E =
|
|
1020
|
+
), E = ne(
|
|
1025
1021
|
R,
|
|
1026
1022
|
m.renderState
|
|
1027
1023
|
);
|
|
1028
|
-
return /* @__PURE__ */
|
|
1029
|
-
|
|
1024
|
+
return /* @__PURE__ */ b(Ie.Provider, { value: m.renderState, children: /* @__PURE__ */ b(Fe.Provider, { value: m.renderOutputState, children: /* @__PURE__ */ b(
|
|
1025
|
+
Pe,
|
|
1030
1026
|
{
|
|
1031
1027
|
containerRef: m.containerRef,
|
|
1032
1028
|
displayCanvasRef: m.displayCanvasRef,
|
|
1033
|
-
imageOptions:
|
|
1029
|
+
imageOptions: a,
|
|
1034
1030
|
imageRef: m.media.imageRef,
|
|
1035
1031
|
layout: m.layout,
|
|
1036
1032
|
managesOwnMedia: m.managesOwnMedia,
|
|
1037
|
-
mediaDock:
|
|
1033
|
+
mediaDock: i,
|
|
1038
1034
|
mirrored: m.displayMirrored,
|
|
1039
|
-
mode:
|
|
1035
|
+
mode: f,
|
|
1040
1036
|
overlayContent: E,
|
|
1041
|
-
renderOutputs:
|
|
1042
|
-
sceneContent:
|
|
1037
|
+
renderOutputs: s,
|
|
1038
|
+
sceneContent: x,
|
|
1043
1039
|
selectedImageId: m.selectedImageId,
|
|
1044
1040
|
selectedSource: m.selectedSource,
|
|
1045
1041
|
selectedVideoId: m.selectedVideoId,
|
|
@@ -1048,13 +1044,13 @@ const rt = Ue(({
|
|
|
1048
1044
|
setSelectedSource: m.setSelectedSource,
|
|
1049
1045
|
setSelectedVideoId: m.setSelectedVideoId,
|
|
1050
1046
|
showMediaControls: m.showMediaControls,
|
|
1051
|
-
style:
|
|
1052
|
-
videoOptions:
|
|
1047
|
+
style: o,
|
|
1048
|
+
videoOptions: l,
|
|
1053
1049
|
videoRef: m.media.videoRef,
|
|
1054
1050
|
viewportSize: m.viewportSize
|
|
1055
1051
|
}
|
|
1056
1052
|
) }) });
|
|
1057
|
-
}),
|
|
1053
|
+
}), at = {
|
|
1058
1054
|
position: "absolute",
|
|
1059
1055
|
top: -28,
|
|
1060
1056
|
left: 0,
|
|
@@ -1065,13 +1061,13 @@ const rt = Ue(({
|
|
|
1065
1061
|
fontWeight: 700,
|
|
1066
1062
|
padding: "4px 8px",
|
|
1067
1063
|
whiteSpace: "nowrap"
|
|
1068
|
-
},
|
|
1064
|
+
}, xt = ({
|
|
1069
1065
|
boundingBox: e,
|
|
1070
1066
|
label: t = "face bounding box",
|
|
1071
|
-
color:
|
|
1067
|
+
color: a = "#22c55e",
|
|
1072
1068
|
style: r,
|
|
1073
|
-
labelStyle:
|
|
1074
|
-
}) => /* @__PURE__ */
|
|
1069
|
+
labelStyle: n
|
|
1070
|
+
}) => /* @__PURE__ */ b(
|
|
1075
1071
|
"div",
|
|
1076
1072
|
{
|
|
1077
1073
|
style: {
|
|
@@ -1080,43 +1076,416 @@ const rt = Ue(({
|
|
|
1080
1076
|
top: `${e.top * 100}%`,
|
|
1081
1077
|
width: `${e.width * 100}%`,
|
|
1082
1078
|
height: `${e.height * 100}%`,
|
|
1083
|
-
border: `3px solid ${
|
|
1079
|
+
border: `3px solid ${a}`,
|
|
1084
1080
|
boxSizing: "border-box",
|
|
1085
1081
|
pointerEvents: "none",
|
|
1086
1082
|
zIndex: 20,
|
|
1087
1083
|
...r
|
|
1088
1084
|
},
|
|
1089
|
-
children: t !== null && /* @__PURE__ */
|
|
1085
|
+
children: t !== null && /* @__PURE__ */ b("div", { style: { ...at, ...n }, children: t })
|
|
1086
|
+
}
|
|
1087
|
+
), j = [
|
|
1088
|
+
{
|
|
1089
|
+
id: "capabilities",
|
|
1090
|
+
title: "Capability report",
|
|
1091
|
+
steps: "Run detectXRCapabilities with model probes.",
|
|
1092
|
+
expect: "Rendering supported (WebGL, OffscreenCanvas, WebAssembly); camera not unsupported; model assets reachable.",
|
|
1093
|
+
mode: "automated",
|
|
1094
|
+
layer: "capability"
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
id: "session-start",
|
|
1098
|
+
title: "Session binds and starts",
|
|
1099
|
+
steps: "setMediaSource (webcam or the supplied stream) and start().",
|
|
1100
|
+
expect: "Lifecycle reaches running within the timeout; feed frames advance.",
|
|
1101
|
+
mode: "automated",
|
|
1102
|
+
layer: "lifecycle"
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
id: "model-ready",
|
|
1106
|
+
title: "Tracker models initialize",
|
|
1107
|
+
steps: "Acquire each requested model and wait for ready.",
|
|
1108
|
+
expect: "Every model reaches ready; none errors.",
|
|
1109
|
+
mode: "automated",
|
|
1110
|
+
layer: "model"
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
id: "model-detects",
|
|
1114
|
+
title: "Trackers run inference",
|
|
1115
|
+
steps: "Sample diagnostics while running.",
|
|
1116
|
+
expect: "Each ready model reports inferences > 0 (detection itself needs a subject in frame).",
|
|
1117
|
+
mode: "automated",
|
|
1118
|
+
layer: "model"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
id: "pause-resume",
|
|
1122
|
+
title: "Pause and resume",
|
|
1123
|
+
steps: "session.pause(), then resume().",
|
|
1124
|
+
expect: "Lifecycle paused then running; feed resumes.",
|
|
1125
|
+
mode: "automated",
|
|
1126
|
+
layer: "lifecycle"
|
|
1127
|
+
},
|
|
1128
|
+
{
|
|
1129
|
+
id: "stop-start",
|
|
1130
|
+
title: "Stop and rebind",
|
|
1131
|
+
steps: "session.stop(), then setMediaSource + start() again.",
|
|
1132
|
+
expect: "Lifecycle stopped then running on the same source.",
|
|
1133
|
+
mode: "automated",
|
|
1134
|
+
layer: "lifecycle"
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
id: "performance",
|
|
1138
|
+
title: "Performance sample",
|
|
1139
|
+
steps: "Measure frame rate and tracker inference over the window.",
|
|
1140
|
+
expect: "Frame rate ≥ 20 fps and total inference ≤ 50 ms while running.",
|
|
1141
|
+
mode: "automated",
|
|
1142
|
+
layer: "performance"
|
|
1143
|
+
}
|
|
1144
|
+
], nt = [
|
|
1145
|
+
{
|
|
1146
|
+
id: "permission-prompt",
|
|
1147
|
+
title: "First-visit permission prompt",
|
|
1148
|
+
steps: "Open the app in a fresh profile; tap Allow on the prompt.",
|
|
1149
|
+
expect: "Camera starts; no second prompt on reload.",
|
|
1150
|
+
mode: "manual",
|
|
1151
|
+
layer: "capability"
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
id: "permission-blocked",
|
|
1155
|
+
title: "Blocked camera recovers",
|
|
1156
|
+
steps: "Block the camera in site settings, reload, then allow it from the address bar.",
|
|
1157
|
+
expect: "Gate shows blocked with instructions; allowing flips it without a reload.",
|
|
1158
|
+
mode: "manual",
|
|
1159
|
+
layer: "capability"
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
id: "rear-camera",
|
|
1163
|
+
title: "Rear camera",
|
|
1164
|
+
steps: "Switch front → rear on /camera-switching.",
|
|
1165
|
+
expect: "Rear feed is straight (text readable); tracking stays aligned.",
|
|
1166
|
+
mode: "manual",
|
|
1167
|
+
layer: "lifecycle"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
id: "orientation",
|
|
1171
|
+
title: "Rotate the device",
|
|
1172
|
+
steps: "Rotate portrait ↔ landscape while tracking a face.",
|
|
1173
|
+
expect: "Anchored content stays on the face; no stretched feed.",
|
|
1174
|
+
mode: "manual",
|
|
1175
|
+
layer: "lifecycle"
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
id: "background-foreground",
|
|
1179
|
+
title: "Background and return",
|
|
1180
|
+
steps: "Switch apps / lock the screen for 10 s and come back.",
|
|
1181
|
+
expect: "Feed resumes by itself; no frozen frame; trackers continue.",
|
|
1182
|
+
mode: "manual",
|
|
1183
|
+
layer: "lifecycle"
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
id: "camera-interrupted",
|
|
1187
|
+
title: "Camera taken by another app",
|
|
1188
|
+
steps: "Take a call or open the native camera, then return.",
|
|
1189
|
+
expect: "Session reports camera-lost and recovers on retry.",
|
|
1190
|
+
mode: "manual",
|
|
1191
|
+
layer: "lifecycle"
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
id: "thermal",
|
|
1195
|
+
title: "Sustained use",
|
|
1196
|
+
steps: "Run face + body tracking for 5 minutes.",
|
|
1197
|
+
expect: "Adaptive quality steps down before the frame rate collapses; no crash.",
|
|
1198
|
+
mode: "manual",
|
|
1199
|
+
layer: "performance"
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
id: "low-end",
|
|
1203
|
+
title: "Low-end device",
|
|
1204
|
+
steps: "Run the automated set on the slowest supported device.",
|
|
1205
|
+
expect: "All pass; performance may land on the low tier.",
|
|
1206
|
+
mode: "manual",
|
|
1207
|
+
layer: "performance"
|
|
1208
|
+
}
|
|
1209
|
+
], Rt = (e) => j.find((t) => t.id === e) ?? nt.find((t) => t.id === e), I = (e, t) => {
|
|
1210
|
+
const a = e.match(t);
|
|
1211
|
+
return a ? a[1] : "";
|
|
1212
|
+
}, st = (e) => {
|
|
1213
|
+
const t = /iPhone|iPad|iPod/.test(e) || /Macintosh/.test(e) && /Mobile/.test(e), a = /Android/.test(e);
|
|
1214
|
+
let r = { name: "unknown", version: "" };
|
|
1215
|
+
/Edg\//.test(e) ? r = { name: "Edge", version: I(e, /Edg\/(\d+)/) } : /OPR\//.test(e) ? r = { name: "Opera", version: I(e, /OPR\/(\d+)/) } : /SamsungBrowser\//.test(e) ? r = { name: "Samsung Internet", version: I(e, /SamsungBrowser\/(\d+)/) } : /CriOS\//.test(e) ? r = { name: "Chrome iOS", version: I(e, /CriOS\/(\d+)/) } : /FxiOS\//.test(e) ? r = { name: "Firefox iOS", version: I(e, /FxiOS\/(\d+)/) } : /Firefox\//.test(e) ? r = { name: "Firefox", version: I(e, /Firefox\/(\d+)/) } : /Chrome\//.test(e) ? r = { name: "Chrome", version: I(e, /Chrome\/(\d+)/) } : /Safari\//.test(e) && (r = { name: "Safari", version: I(e, /Version\/(\d+)/) });
|
|
1216
|
+
let n = { name: "unknown", version: "" };
|
|
1217
|
+
return t ? n = { name: "iOS", version: I(e, /OS (\d+[._]\d+)/).replace("_", ".") } : a ? n = { name: "Android", version: I(e, /Android (\d+(?:\.\d+)?)/) } : /Mac OS X/.test(e) ? n = { name: "macOS", version: I(e, /Mac OS X (\d+[._]\d+)/).replace("_", ".") } : /Windows NT/.test(e) ? n = { name: "Windows", version: I(e, /Windows NT (\d+\.\d+)/) } : /Linux/.test(e) && (n = { name: "Linux", version: "" }), { browser: r, os: n, mobile: t || a || /Mobile/.test(e) };
|
|
1218
|
+
}, it = () => {
|
|
1219
|
+
var r, n;
|
|
1220
|
+
const e = typeof navigator < "u" ? navigator : void 0, t = (e == null ? void 0 : e.userAgent) ?? "", a = st(t);
|
|
1221
|
+
return {
|
|
1222
|
+
userAgent: t,
|
|
1223
|
+
platform: (e == null ? void 0 : e.platform) ?? "",
|
|
1224
|
+
...a,
|
|
1225
|
+
screen: typeof window < "u" ? {
|
|
1226
|
+
width: ((r = window.screen) == null ? void 0 : r.width) ?? 0,
|
|
1227
|
+
height: ((n = window.screen) == null ? void 0 : n.height) ?? 0,
|
|
1228
|
+
dpr: window.devicePixelRatio || 1
|
|
1229
|
+
} : { width: 0, height: 0, dpr: 1 },
|
|
1230
|
+
deviceMemoryGb: typeof (e == null ? void 0 : e.deviceMemory) == "number" ? e.deviceMemory : null,
|
|
1231
|
+
hardwareConcurrency: typeof (e == null ? void 0 : e.hardwareConcurrency) == "number" ? e.hardwareConcurrency : null,
|
|
1232
|
+
secureContext: typeof window < "u" ? !!window.isSecureContext : !1,
|
|
1233
|
+
videoCaptureStream: typeof HTMLVideoElement < "u" && ("captureStream" in HTMLVideoElement.prototype || "mozCaptureStream" in HTMLVideoElement.prototype),
|
|
1234
|
+
touch: typeof navigator < "u" && (navigator.maxTouchPoints ?? 0) > 0
|
|
1235
|
+
};
|
|
1236
|
+
}, ot = [D.FACE_TRACKER, D.HAND_TRACKER, D.BODY_TRACKER], se = "__xr_compat__", ce = (e) => new Promise((t) => setTimeout(t, e)), L = async (e, t, a = 50) => {
|
|
1237
|
+
const r = Date.now() + t;
|
|
1238
|
+
for (; Date.now() < r; ) {
|
|
1239
|
+
if (e()) return !0;
|
|
1240
|
+
await ce(a);
|
|
1241
|
+
}
|
|
1242
|
+
return e();
|
|
1243
|
+
}, lt = (e, t) => e ? /^(camera-|no-camera|webgl-|offscreen-canvas-|wasm-)/.test(e) ? "capability" : /^model-/.test(e) ? "model" : /^(lifecycle|timeout:lifecycle|feed-stalled|start-)/.test(e) ? "lifecycle" : /^(fps|inference|frame)/.test(e) ? "performance" : t : t, ct = (e) => {
|
|
1244
|
+
const t = {
|
|
1245
|
+
pass: 0,
|
|
1246
|
+
fail: 0,
|
|
1247
|
+
skip: 0,
|
|
1248
|
+
causes: { capability: 0, model: 0, lifecycle: 0, performance: 0, unknown: 0 }
|
|
1249
|
+
};
|
|
1250
|
+
for (const a of e)
|
|
1251
|
+
t[a.status] += 1, a.status === "fail" && (t.causes[a.cause ?? "unknown"] += 1);
|
|
1252
|
+
return t;
|
|
1253
|
+
}, dt = (e, t, a = {}) => ({
|
|
1254
|
+
version: 1,
|
|
1255
|
+
sdkVersion: a.sdkVersion ?? "dev",
|
|
1256
|
+
checkedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1257
|
+
label: a.label ?? "",
|
|
1258
|
+
environment: it(),
|
|
1259
|
+
capabilities: t,
|
|
1260
|
+
results: e,
|
|
1261
|
+
summary: ct(e)
|
|
1262
|
+
}), Ct = async (e, t = {}) => {
|
|
1263
|
+
var h;
|
|
1264
|
+
const a = t.timeoutMs ?? 2e4, r = t.models ?? ot, n = new Set(
|
|
1265
|
+
t.scenarios ?? j.map((s) => s.id)
|
|
1266
|
+
), c = [];
|
|
1267
|
+
let u = null, d = !1;
|
|
1268
|
+
const i = (s, p, g, o) => {
|
|
1269
|
+
var m;
|
|
1270
|
+
const l = {
|
|
1271
|
+
id: s,
|
|
1272
|
+
status: o.status,
|
|
1273
|
+
cause: o.status === "fail" ? lt(o.code ?? null, p) : null,
|
|
1274
|
+
// Codes describe failures; a pass carries none.
|
|
1275
|
+
code: o.status === "fail" ? o.code ?? null : null,
|
|
1276
|
+
detail: o.detail,
|
|
1277
|
+
durationMs: Math.round(performance.now() - g)
|
|
1278
|
+
};
|
|
1279
|
+
c.push(l), (m = t.onResult) == null || m.call(t, l);
|
|
1280
|
+
}, f = async () => {
|
|
1281
|
+
t.stream ? await e.setMediaSource({
|
|
1282
|
+
source: ee.STREAM,
|
|
1283
|
+
stream: t.stream,
|
|
1284
|
+
sourceKind: "video"
|
|
1285
|
+
}) : await e.setMediaSource({ source: ee.WEBCAM }), await e.start();
|
|
1286
|
+
};
|
|
1287
|
+
try {
|
|
1288
|
+
for (const s of j) {
|
|
1289
|
+
if (!n.has(s.id)) continue;
|
|
1290
|
+
const p = performance.now();
|
|
1291
|
+
try {
|
|
1292
|
+
const g = s.id;
|
|
1293
|
+
switch (g) {
|
|
1294
|
+
case "capabilities": {
|
|
1295
|
+
u = await ye({
|
|
1296
|
+
models: r,
|
|
1297
|
+
timeoutMs: Math.min(a, 8e3)
|
|
1298
|
+
});
|
|
1299
|
+
const o = r.map((m) => we(u, m)).filter((m) => !m.supported && m.reason).map((m) => m.reason.code), l = Array.from(new Set(o));
|
|
1300
|
+
i(s.id, s.layer, p, {
|
|
1301
|
+
status: l.length ? "fail" : "pass",
|
|
1302
|
+
code: l[0] ?? null,
|
|
1303
|
+
detail: l.length ? `blocked: ${l.join(", ")}` : `webgl${u.rendering.webglVersion}, camera ${u.camera.status}`
|
|
1304
|
+
});
|
|
1305
|
+
break;
|
|
1306
|
+
}
|
|
1307
|
+
case "session-start": {
|
|
1308
|
+
await f();
|
|
1309
|
+
const o = await L(
|
|
1310
|
+
() => e.store.getSnapshot().lifecycle === "running",
|
|
1311
|
+
a
|
|
1312
|
+
), l = e.store.getSnapshot().feedFrames, m = o && await L(() => e.store.getSnapshot().feedFrames > l, a);
|
|
1313
|
+
d = o && m;
|
|
1314
|
+
const w = e.store.getSnapshot().error;
|
|
1315
|
+
i(s.id, s.layer, p, {
|
|
1316
|
+
status: d ? "pass" : "fail",
|
|
1317
|
+
code: w ? w.reason : o ? "feed-stalled" : "timeout:lifecycle",
|
|
1318
|
+
detail: d ? `running on ${e.store.getSnapshot().sourceKind}` : w ? w.message : o ? "running but no feed frames advanced" : `lifecycle ${e.store.getSnapshot().lifecycle}`
|
|
1319
|
+
});
|
|
1320
|
+
break;
|
|
1321
|
+
}
|
|
1322
|
+
case "model-ready": {
|
|
1323
|
+
if (!d) {
|
|
1324
|
+
i(s.id, s.layer, p, {
|
|
1325
|
+
status: "skip",
|
|
1326
|
+
detail: "session did not start"
|
|
1327
|
+
});
|
|
1328
|
+
break;
|
|
1329
|
+
}
|
|
1330
|
+
const o = [];
|
|
1331
|
+
await Promise.all(
|
|
1332
|
+
r.map(async (l) => {
|
|
1333
|
+
try {
|
|
1334
|
+
await e.registry.acquire(l, se), await L(
|
|
1335
|
+
() => e.store.getSnapshot().pipeline.has(l),
|
|
1336
|
+
a
|
|
1337
|
+
) || o.push(`${l}: timeout`);
|
|
1338
|
+
} catch (m) {
|
|
1339
|
+
o.push(`${l}: ${ge(m).code}`);
|
|
1340
|
+
}
|
|
1341
|
+
})
|
|
1342
|
+
), i(s.id, s.layer, p, {
|
|
1343
|
+
status: o.length ? "fail" : "pass",
|
|
1344
|
+
code: o.length ? o[0].split(": ")[1] === "timeout" ? "model-init-failed" : o[0].split(": ")[1] : null,
|
|
1345
|
+
detail: o.length ? o.join("; ") : `${r.length} models ready`
|
|
1346
|
+
});
|
|
1347
|
+
break;
|
|
1348
|
+
}
|
|
1349
|
+
case "model-detects": {
|
|
1350
|
+
if (!d) {
|
|
1351
|
+
i(s.id, s.layer, p, {
|
|
1352
|
+
status: "skip",
|
|
1353
|
+
detail: "session did not start"
|
|
1354
|
+
});
|
|
1355
|
+
break;
|
|
1356
|
+
}
|
|
1357
|
+
const o = await L(
|
|
1358
|
+
() => $(e, r, null).models.every((R) => R.state !== "ready" || R.inferences > 0),
|
|
1359
|
+
Math.min(a, 8e3)
|
|
1360
|
+
), l = $(e, r, null), m = l.models.filter((S) => S.state === "ready" && S.inferences === 0).map((S) => S.label), w = l.models.filter((S) => S.state === "error").map((S) => {
|
|
1361
|
+
var R;
|
|
1362
|
+
return `${S.label}: ${((R = S.error) == null ? void 0 : R.message) ?? "error"}`;
|
|
1363
|
+
});
|
|
1364
|
+
i(s.id, s.layer, p, {
|
|
1365
|
+
status: o && !w.length ? "pass" : "fail",
|
|
1366
|
+
code: w.length ? "model-init-failed" : m.length ? "model-idle" : null,
|
|
1367
|
+
detail: w.length ? w.join("; ") : m.length ? `no inference from ${m.join(", ")}` : l.models.map((S) => `${S.label} ${S.inferences} run · ${S.detections ?? "–"} det`).join(", ")
|
|
1368
|
+
});
|
|
1369
|
+
break;
|
|
1370
|
+
}
|
|
1371
|
+
case "pause-resume": {
|
|
1372
|
+
if (!d) {
|
|
1373
|
+
i(s.id, s.layer, p, {
|
|
1374
|
+
status: "skip",
|
|
1375
|
+
detail: "session did not start"
|
|
1376
|
+
});
|
|
1377
|
+
break;
|
|
1378
|
+
}
|
|
1379
|
+
e.pause();
|
|
1380
|
+
const o = e.store.getSnapshot().lifecycle === "paused";
|
|
1381
|
+
await e.resume();
|
|
1382
|
+
const l = await L(
|
|
1383
|
+
() => e.store.getSnapshot().lifecycle === "running",
|
|
1384
|
+
a
|
|
1385
|
+
), m = e.store.getSnapshot().feedFrames, w = l && await L(() => e.store.getSnapshot().feedFrames > m, a);
|
|
1386
|
+
i(s.id, s.layer, p, {
|
|
1387
|
+
status: o && l && w ? "pass" : "fail",
|
|
1388
|
+
code: o ? l ? "feed-stalled" : "lifecycle:resume" : "lifecycle:pause",
|
|
1389
|
+
detail: o && l && w ? "paused → running, feed advanced" : `paused=${o} resumed=${l} advanced=${w}`
|
|
1390
|
+
});
|
|
1391
|
+
break;
|
|
1392
|
+
}
|
|
1393
|
+
case "stop-start": {
|
|
1394
|
+
if (!d) {
|
|
1395
|
+
i(s.id, s.layer, p, {
|
|
1396
|
+
status: "skip",
|
|
1397
|
+
detail: "session did not start"
|
|
1398
|
+
});
|
|
1399
|
+
break;
|
|
1400
|
+
}
|
|
1401
|
+
await e.stop();
|
|
1402
|
+
const o = e.store.getSnapshot().lifecycle === "stopped";
|
|
1403
|
+
await f();
|
|
1404
|
+
const l = await L(
|
|
1405
|
+
() => e.store.getSnapshot().lifecycle === "running",
|
|
1406
|
+
a
|
|
1407
|
+
);
|
|
1408
|
+
i(s.id, s.layer, p, {
|
|
1409
|
+
status: o && l ? "pass" : "fail",
|
|
1410
|
+
code: o ? "lifecycle:restart" : "lifecycle:stop",
|
|
1411
|
+
detail: o && l ? "stopped → running" : `stopped=${o} running=${l}`
|
|
1412
|
+
});
|
|
1413
|
+
break;
|
|
1414
|
+
}
|
|
1415
|
+
case "performance": {
|
|
1416
|
+
if (!d) {
|
|
1417
|
+
i(s.id, s.layer, p, {
|
|
1418
|
+
status: "skip",
|
|
1419
|
+
detail: "session did not start"
|
|
1420
|
+
});
|
|
1421
|
+
break;
|
|
1422
|
+
}
|
|
1423
|
+
const o = t.performanceWindowMs ?? 3e3;
|
|
1424
|
+
let l = 0, m = 0;
|
|
1425
|
+
const w = () => {
|
|
1426
|
+
l += 1, m = requestAnimationFrame(w);
|
|
1427
|
+
};
|
|
1428
|
+
m = requestAnimationFrame(w);
|
|
1429
|
+
const S = $(e, r, null);
|
|
1430
|
+
await ce(o), cancelAnimationFrame(m);
|
|
1431
|
+
const R = $(e, r, {
|
|
1432
|
+
feedFrames: S.session.feedFrames,
|
|
1433
|
+
sampledAt: S.sampledAt
|
|
1434
|
+
}), x = l * 1e3 / o, E = R.inferenceMsTotal, v = x >= 20 && E <= 50;
|
|
1435
|
+
i(s.id, s.layer, p, {
|
|
1436
|
+
status: v ? "pass" : "fail",
|
|
1437
|
+
code: x < 20 ? "fps-low" : E > 50 ? "inference-high" : null,
|
|
1438
|
+
detail: `${x.toFixed(0)} fps · feed ${R.session.feedFps.toFixed(0)} fps · inference ${E.toFixed(1)} ms`
|
|
1439
|
+
});
|
|
1440
|
+
break;
|
|
1441
|
+
}
|
|
1442
|
+
default:
|
|
1443
|
+
i(g, s.layer, p, { status: "skip", detail: "no runner" });
|
|
1444
|
+
}
|
|
1445
|
+
} catch (g) {
|
|
1446
|
+
const o = g instanceof Error ? g.message : String(g), l = (h = e.store.getSnapshot().error) == null ? void 0 : h.reason;
|
|
1447
|
+
i(s.id, s.layer, p, {
|
|
1448
|
+
status: "fail",
|
|
1449
|
+
code: l ? be(l).code : null,
|
|
1450
|
+
detail: l ? `${o} (${l})` : o
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
} finally {
|
|
1455
|
+
for (const s of r) e.registry.release(s, se);
|
|
1456
|
+
t.keepSessionRunning || await e.stop().catch(() => {
|
|
1457
|
+
});
|
|
1090
1458
|
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1459
|
+
return dt(c, u, t);
|
|
1460
|
+
}, Et = (e) => {
|
|
1461
|
+
const [t, a] = M(null);
|
|
1462
|
+
return A(() => {
|
|
1094
1463
|
let r = 0;
|
|
1095
|
-
const
|
|
1096
|
-
var
|
|
1097
|
-
r = requestAnimationFrame(
|
|
1098
|
-
const
|
|
1099
|
-
if (!
|
|
1100
|
-
|
|
1464
|
+
const n = () => {
|
|
1465
|
+
var i, f;
|
|
1466
|
+
r = requestAnimationFrame(n);
|
|
1467
|
+
const c = (f = (i = e == null ? void 0 : e.detectionResults) == null ? void 0 : i.faceLandmarks) == null ? void 0 : f[0];
|
|
1468
|
+
if (!c || c.length === 0) {
|
|
1469
|
+
a(null);
|
|
1101
1470
|
return;
|
|
1102
1471
|
}
|
|
1103
|
-
const
|
|
1104
|
-
left:
|
|
1105
|
-
top:
|
|
1106
|
-
width:
|
|
1107
|
-
height:
|
|
1472
|
+
const u = Me(c), d = {
|
|
1473
|
+
left: u.minX,
|
|
1474
|
+
top: u.minY,
|
|
1475
|
+
width: u.width,
|
|
1476
|
+
height: u.height
|
|
1108
1477
|
};
|
|
1109
|
-
|
|
1478
|
+
a((h) => h && h.left === d.left && h.top === d.top && h.width === d.width && h.height === d.height ? h : d);
|
|
1110
1479
|
};
|
|
1111
|
-
return
|
|
1480
|
+
return n(), () => {
|
|
1112
1481
|
cancelAnimationFrame(r);
|
|
1113
1482
|
};
|
|
1114
1483
|
}, [e]), t;
|
|
1115
|
-
},
|
|
1484
|
+
}, Mt = ({
|
|
1116
1485
|
background: e = "#000",
|
|
1117
1486
|
children: t,
|
|
1118
|
-
style:
|
|
1119
|
-
}) => /* @__PURE__ */
|
|
1487
|
+
style: a
|
|
1488
|
+
}) => /* @__PURE__ */ b(
|
|
1120
1489
|
"div",
|
|
1121
1490
|
{
|
|
1122
1491
|
style: {
|
|
@@ -1124,68 +1493,150 @@ const rt = Ue(({
|
|
|
1124
1493
|
inset: 0,
|
|
1125
1494
|
overflow: "hidden",
|
|
1126
1495
|
background: e,
|
|
1127
|
-
...
|
|
1496
|
+
...a
|
|
1128
1497
|
},
|
|
1129
1498
|
children: t
|
|
1130
1499
|
}
|
|
1131
|
-
),
|
|
1132
|
-
const { makeDefault: t = !0, ...
|
|
1133
|
-
return /* @__PURE__ */
|
|
1134
|
-
|
|
1500
|
+
), kt = (e) => {
|
|
1501
|
+
const { makeDefault: t = !0, ...a } = e;
|
|
1502
|
+
return /* @__PURE__ */ b(
|
|
1503
|
+
ke,
|
|
1135
1504
|
{
|
|
1136
1505
|
position: [0, 0, 40],
|
|
1137
1506
|
fov: 30,
|
|
1138
1507
|
near: 0.1,
|
|
1139
1508
|
far: 1e3,
|
|
1140
1509
|
makeDefault: t,
|
|
1141
|
-
...
|
|
1510
|
+
...a
|
|
1142
1511
|
}
|
|
1143
1512
|
);
|
|
1144
|
-
},
|
|
1513
|
+
}, Tt = ["fill", "contain"];
|
|
1145
1514
|
export {
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1515
|
+
Hr as BasicAnimatedTextureController,
|
|
1516
|
+
xt as BoundingBoxOverlay,
|
|
1517
|
+
j as COMPAT_SCENARIOS,
|
|
1518
|
+
At as EMPTY_QUALITY_SIGNALS,
|
|
1519
|
+
ua as FACE_REGION_POLYGONS,
|
|
1520
|
+
kr as HAND_JOINTS,
|
|
1521
|
+
Jt as HeadTracker,
|
|
1522
|
+
ma as IRIS_FULL_OPENNESS,
|
|
1523
|
+
fa as IrisLead,
|
|
1524
|
+
nt as MANUAL_COMPAT_SCENARIOS,
|
|
1525
|
+
qr as MAX_GIF_BYTES,
|
|
1526
|
+
Gr as MAX_GIF_FRAMES,
|
|
1527
|
+
Ur as MAX_GIF_PIXELS,
|
|
1528
|
+
pa as MAX_OVERLAY_LABELS,
|
|
1529
|
+
Tr as OscillationTracker,
|
|
1530
|
+
Ir as POSE_JOINTS,
|
|
1531
|
+
kt as PerspectiveCamera,
|
|
1532
|
+
ha as SEGMENTATION_OVERLAY_FRAGMENT_SHADER,
|
|
1533
|
+
ga as SEGMENTATION_OVERLAY_VERTEX_SHADER,
|
|
1534
|
+
vr as ScreenRectAspectContext,
|
|
1535
|
+
Tt as TEXTURE_FITS,
|
|
1536
|
+
jr as TextureSourceLoadError,
|
|
1537
|
+
Mt as XRCompositor,
|
|
1157
1538
|
B as XRLayer,
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1539
|
+
Ae as XRMediaSurface,
|
|
1540
|
+
St as XRTrackingOverlay,
|
|
1541
|
+
vt as XRViewport,
|
|
1542
|
+
Lt as XR_MODEL_LABELS,
|
|
1543
|
+
_t as classifyCameraFailure,
|
|
1544
|
+
lt as classifyCompatCause,
|
|
1545
|
+
ya as computeIrisEye,
|
|
1546
|
+
Me as computeLandmarkBounds,
|
|
1547
|
+
wa as computeMaskUvTransform,
|
|
1548
|
+
Kr as computeScreenTransform,
|
|
1549
|
+
dt as createCompatReport,
|
|
1550
|
+
wr as createFaceInfoTarget,
|
|
1551
|
+
ia as createGestureDetectorState,
|
|
1552
|
+
ba as createIrisEye,
|
|
1553
|
+
Sa as createIrisResult,
|
|
1554
|
+
Xt as createQualityState,
|
|
1555
|
+
va as createSegmentationOverlayMaterial,
|
|
1556
|
+
xa as createSemanticMaskTexture,
|
|
1557
|
+
Qr as createTextureSourceResolver,
|
|
1558
|
+
it as describeCompatEnvironment,
|
|
1559
|
+
Yr as disposeResolvedTextureSource,
|
|
1560
|
+
Ot as fillLandmarkPolygon,
|
|
1561
|
+
zt as fillPolygon,
|
|
1562
|
+
Rt as findCompatScenario,
|
|
1563
|
+
Fr as fingerExtensions,
|
|
1564
|
+
oa as gestureStatesEqual,
|
|
1565
|
+
br as getFaceInfo,
|
|
1566
|
+
Jr as getPlaybackFrame,
|
|
1567
|
+
Zr as getSequenceFrame,
|
|
1568
|
+
xr as getThreeBlending,
|
|
1569
|
+
Rr as getThreeDepthFunction,
|
|
1570
|
+
Cr as getThreeSide,
|
|
1571
|
+
ea as gifTextureSourceProvider,
|
|
1572
|
+
Nr as hasFullUnitUVBounds,
|
|
1573
|
+
Dt as judgeSample,
|
|
1574
|
+
Pt as lockQuality,
|
|
1575
|
+
Vt as mapDomExceptionToReason,
|
|
1576
|
+
ge as mapModelErrorToReason,
|
|
1577
|
+
Ar as measureArmRaise,
|
|
1578
|
+
Lr as measureFingerPattern,
|
|
1579
|
+
_r as measureGrab,
|
|
1580
|
+
Xr as measureHandHeight,
|
|
1581
|
+
Or as measureOpenPalm,
|
|
1582
|
+
zr as measurePinch,
|
|
1583
|
+
Dr as measureTPose,
|
|
1584
|
+
Pr as measureThumb,
|
|
1585
|
+
st as parseUserAgent,
|
|
1586
|
+
$t as permissionStateToStatus,
|
|
1587
|
+
Ra as rasterizeFaceRegions,
|
|
1588
|
+
Bt as readDeviceSignals,
|
|
1589
|
+
Nt as resetQuality,
|
|
1590
|
+
Ca as resolveActiveOverlayLabelIndices,
|
|
1591
|
+
Be as resolveCalibrationFaceDisplayMirrored,
|
|
1592
|
+
Wt as resolveInitialTierIndex,
|
|
1593
|
+
Ea as resolveMaskSize,
|
|
1594
|
+
Ma as resolveOverlayLabelIndices,
|
|
1595
|
+
Ht as resolvePerformanceBudget,
|
|
1596
|
+
qt as resolveQualityTier,
|
|
1597
|
+
ta as resolveTextureSource,
|
|
1598
|
+
Ct as runCompatChecks,
|
|
1599
|
+
$ as sampleXRDiagnostics,
|
|
1600
|
+
Gt as semanticMaskLabelIndex,
|
|
1601
|
+
be as sessionReasonToFallback,
|
|
1602
|
+
Ut as setQualityTier,
|
|
1603
|
+
la as snapshotGestureState,
|
|
1604
|
+
ca as stepGestureDetector,
|
|
1605
|
+
jt as stepQualityController,
|
|
1606
|
+
ct as summarizeCompatResults,
|
|
1607
|
+
ra as throwIfAborted,
|
|
1608
|
+
Vr as thumbDirection,
|
|
1609
|
+
$r as thumbExtension,
|
|
1610
|
+
Kt as tierToApply,
|
|
1611
|
+
ka as updateIrisResult,
|
|
1612
|
+
Ta as updateSegmentationOverlayMaterial,
|
|
1613
|
+
Ia as uploadSemanticMask,
|
|
1614
|
+
We as useCalibrationFaceTracker,
|
|
1615
|
+
Et as useFaceBoundingBox,
|
|
1616
|
+
Er as useScreenSpace,
|
|
1617
|
+
Fa as useSegmentationOverlayMaterial,
|
|
1618
|
+
Aa as useSemanticMaskTexture,
|
|
1619
|
+
Zt as useTrackerContext,
|
|
1620
|
+
tr as useXRCameraDeviceId,
|
|
1621
|
+
rr as useXRCameraFacing,
|
|
1622
|
+
ar as useXRCameraTexture,
|
|
1623
|
+
ie as useXRContext,
|
|
1624
|
+
Qt as useXRDiagnostics,
|
|
1625
|
+
nr as useXRError,
|
|
1626
|
+
sr as useXRFeedCrop,
|
|
1627
|
+
ir as useXRLifecycle,
|
|
1628
|
+
or as useXRMirrored,
|
|
1629
|
+
Se as useXRModel,
|
|
1630
|
+
lr as useXRModelErrors,
|
|
1631
|
+
ve as useXRModelNode,
|
|
1632
|
+
cr as useXROrientation,
|
|
1633
|
+
dr as useXRPipelineSnapshot,
|
|
1634
|
+
ur as useXRQualityConfig,
|
|
1635
|
+
mr as useXRQualityState,
|
|
1636
|
+
fr as useXRReady,
|
|
1637
|
+
pr as useXRRenderSize,
|
|
1638
|
+
hr as useXRSessionCameraPermission,
|
|
1639
|
+
gr as useXRTrackerStatus,
|
|
1640
|
+
aa as useXRViewportRenderOutputs,
|
|
1641
|
+
na as useXRViewportState
|
|
1191
1642
|
};
|