@vincentt-xr/sdk 2.0.0-alpha.8 → 2.0.0-alpha.9
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 +4643 -170
- package/README.md +1 -0
- package/dist/CanonicalHeadFrame-BHcWyaiK.js +1506 -0
- package/dist/CanonicalHeadFrame-D-_T1OMU.cjs +1 -0
- package/dist/DebuggerUI-7ngnJsBe.js +275 -0
- package/dist/DebuggerUI-CoglgKdO.cjs +1 -0
- package/dist/FaceRetouch-CLoTfrcs.js +1071 -0
- package/dist/FaceRetouch-J1lC1WbS.cjs +134 -0
- package/dist/FaceSurface-CHAMEeG1.cjs +1 -0
- package/dist/FaceSurface-DmP9AEeC.js +27 -0
- package/dist/SegmentationOverlay-D_FWkcyP.cjs +35 -0
- package/dist/SegmentationOverlay-vn5x_knv.js +6237 -0
- package/dist/SkeletonUtils-C2r90MtN.js +21 -0
- package/dist/SkeletonUtils-CddIup1F.cjs +1 -0
- package/dist/TextLabel-XE0rQSDn.cjs +2 -0
- package/dist/TextLabel-c9BCucOI.js +961 -0
- package/dist/assets/gltfLoader.d.ts +16 -0
- package/dist/assets/loaders.d.ts +16 -1
- package/dist/body-pose/index.d.ts +521 -0
- package/dist/body-trigger/__fixtures__/syntheticBody.d.ts +83 -0
- package/dist/body-trigger/frame.d.ts +88 -0
- package/dist/body-trigger/index.d.ts +6 -0
- package/dist/body-trigger/moves.d.ts +235 -0
- package/dist/body-trigger/trigger.d.ts +75 -0
- package/dist/calibration/calibration.d.ts +11 -6
- package/dist/canonicalFace-BHwyCx1c.js +9 -0
- package/dist/canonicalFace-C83I225R.cjs +1 -0
- package/dist/components/BodyInstruction/BodyPoseHint.d.ts +63 -0
- package/dist/components/BodyInstruction/index.d.ts +69 -0
- package/dist/components/BodyInstruction/useBodyPose.d.ts +23 -0
- package/dist/components/BodyTracker/index.d.ts +10 -2
- package/dist/components/BodyTrigger/index.d.ts +49 -0
- package/dist/components/Debugger/DebuggerProvider.d.ts +14 -1
- package/dist/components/Debugger/DebuggerUI.d.ts +3 -1
- package/dist/components/FaceAtlas/FaceAtlasLayer.d.ts +114 -0
- package/dist/components/FaceAtlas/MadeUpCamera.d.ts +80 -0
- package/dist/components/FaceAtlas/constants.d.ts +8 -0
- package/dist/components/FaceAtlas/index.d.ts +7 -0
- package/dist/components/FaceAtlas/useFaceAtlasSurface.d.ts +84 -0
- package/dist/components/FaceAtlas/useFaceSkin.d.ts +84 -0
- package/dist/components/FaceCharacter/ExternalFaceMesh.d.ts +109 -0
- package/dist/components/FaceCharacter/FaceExpressionController.d.ts +53 -0
- package/dist/components/FaceCharacter/FaceMorph.d.ts +71 -0
- package/dist/components/FaceCharacter/FacePiercing.d.ts +65 -0
- package/dist/components/FaceCharacter/FaceReprojection.d.ts +85 -0
- package/dist/components/FaceCharacter/FaceRig.d.ts +38 -0
- package/dist/components/FaceCharacter/FaceSurface.d.ts +49 -0
- package/dist/components/FaceCharacter/FaceSurfaceOccluder.d.ts +39 -0
- package/dist/components/FaceCharacter/PinToFaceMesh.d.ts +68 -0
- package/dist/components/FaceCharacter/index.d.ts +18 -0
- package/dist/components/FaceCharacter/useFaceReprojector.d.ts +10 -0
- package/dist/components/FaceInset/FaceInset.d.ts +68 -0
- package/dist/components/FaceInset/frame.d.ts +94 -0
- package/dist/components/FaceInset/index.d.ts +6 -0
- package/dist/components/FaceInset/material.d.ts +40 -0
- package/dist/components/FaceInset/useFaceInsetTexture.d.ts +37 -0
- package/dist/components/FaceInstruction/FaceExpressionHint.d.ts +43 -0
- package/dist/components/FaceInstruction/index.d.ts +56 -0
- package/dist/components/FaceInstruction/useFaceExpression.d.ts +20 -0
- package/dist/components/FaceLiquify/FaceLiquify.d.ts +49 -0
- package/dist/components/FaceLiquify/debug.d.ts +37 -0
- package/dist/components/FaceLiquify/frame.d.ts +55 -0
- package/dist/components/FaceLiquify/index.d.ts +10 -0
- package/dist/components/FaceLiquify/material.d.ts +39 -0
- package/dist/components/FaceLiquify/pass.d.ts +49 -0
- package/dist/components/FaceLiquify/presence.d.ts +25 -0
- package/dist/components/FaceLiquify/presets.d.ts +82 -0
- package/dist/components/FaceLiquify/selfTest.d.ts +66 -0
- package/dist/components/FaceLiquify/target.d.ts +85 -0
- package/dist/components/FaceLiquify/warp.d.ts +72 -0
- package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +5 -3
- package/dist/components/FaceMesh/canonical/geometryGroups.d.ts +21 -0
- package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +9 -0
- package/dist/components/FaceMesh/index.d.ts +1 -1
- package/dist/components/FaceRetouch/Background.d.ts +3 -1
- package/dist/components/FaceRetouch/FaceRetouch.d.ts +5 -0
- package/dist/components/FaceRetouch/renderState.d.ts +19 -0
- package/dist/components/FaceSwap/FaceMirror.d.ts +46 -0
- package/dist/components/FaceSwap/FaceSwap.d.ts +58 -0
- package/dist/components/FaceSwap/FaceTextureLayer.d.ts +72 -0
- package/dist/components/FaceSwap/faceSwapPlan.d.ts +91 -0
- package/dist/components/FaceSwap/index.d.ts +13 -0
- package/dist/components/FaceSwap/settings.d.ts +300 -0
- package/dist/components/FaceSwap/useFaceTexture.d.ts +35 -0
- package/dist/components/FaceSwap/useLiveFace.d.ts +38 -0
- package/dist/components/FaceSwap/useLiveFaceTexture.d.ts +31 -0
- package/dist/components/FaceWarp3D/FaceWarp3D.d.ts +50 -0
- package/dist/components/FaceWarp3D/index.d.ts +2 -3
- package/dist/components/Faceless/Faceless.d.ts +51 -0
- package/dist/components/Faceless/index.d.ts +2 -0
- package/dist/components/HairLock/HairLock.d.ts +39 -0
- package/dist/components/HairLock/index.d.ts +2 -0
- package/dist/components/HairLock/lockGeometry.d.ts +15 -0
- package/dist/components/HandCutout/index.d.ts +35 -0
- package/dist/components/HandInstruction/HandGestureHint.d.ts +70 -0
- package/dist/components/HandInstruction/index.d.ts +74 -0
- package/dist/components/HandInstruction/useHandGesture.d.ts +22 -0
- package/dist/components/HandRig/ForearmOccluder.d.ts +29 -0
- package/dist/components/HandRig/HandAttachment.d.ts +34 -0
- package/dist/components/HandRig/HandOccluder.d.ts +55 -0
- package/dist/components/HandRig/HandTattoo.d.ts +61 -0
- package/dist/components/HandRig/WristAttachment.d.ts +34 -0
- package/dist/components/HandRig/index.d.ts +101 -0
- package/dist/components/HandRig/useArmMask.d.ts +29 -0
- package/dist/components/HandRig/wristSolve.d.ts +69 -0
- package/dist/components/HandTouch/HandTouch.d.ts +62 -0
- package/dist/components/HandTouch/Touchable.d.ts +36 -0
- package/dist/components/HandTouch/index.d.ts +2 -0
- package/dist/components/HeadBinding/index.d.ts +14 -0
- package/dist/components/HeadOccluder/CanonicalHeadFrame.d.ts +22 -0
- package/dist/components/HeadOccluder/Earrings.d.ts +55 -0
- package/dist/components/HeadOccluder/HeadAttachment.d.ts +38 -0
- package/dist/components/HeadOccluder/NeckOccluder.d.ts +64 -0
- package/dist/components/HeadOccluder/earringPlacement.d.ts +31 -0
- package/dist/components/HeadOccluder/headAttachmentPoints.d.ts +69 -0
- package/dist/components/HeadOccluder/index.d.ts +57 -3
- package/dist/components/HeadOccluder/useCanonicalHeadFit.d.ts +36 -0
- package/dist/components/HeadOccluder/useLandmarkPoseFit.d.ts +80 -0
- package/dist/components/Instruction/HintStage.d.ts +29 -0
- package/dist/components/Instruction/InstructionCue.d.ts +126 -0
- package/dist/components/Instruction/gestureHold.d.ts +20 -0
- package/dist/components/Instruction/ghost.d.ts +129 -0
- package/dist/components/Instruction/hintBlend.d.ts +19 -0
- package/dist/components/Instruction/hintLook.d.ts +81 -0
- package/dist/components/Instruction/hintLoop.d.ts +36 -0
- package/dist/components/Instruction/index.d.ts +41 -0
- package/dist/components/Instruction/useGhostModel.d.ts +33 -0
- package/dist/components/Instruction/useInstructionHold.d.ts +72 -0
- package/dist/components/LipEffect/LipEffect.d.ts +22 -2
- package/dist/components/LipEffect/LipEffectMaterial.d.ts +62 -10
- package/dist/components/LipEffect/LipEffects.d.ts +5 -2
- package/dist/components/LipEffect/defaults.d.ts +21 -2
- package/dist/components/LipEffect/index.d.ts +1 -1
- package/dist/components/LipEffect/lipShading.d.ts +73 -0
- package/dist/components/LipEffect/settings.d.ts +117 -13
- package/dist/components/LipEffect/shader.d.ts +39 -0
- package/dist/components/LipEffect/types.d.ts +82 -10
- package/dist/components/LipEffect/useLipDesignTextures.d.ts +6 -0
- package/dist/components/LipEffect/uvGuide.d.ts +31 -16
- package/dist/components/Makeup/Blush.d.ts +18 -0
- package/dist/components/Makeup/Brows.d.ts +20 -0
- package/dist/components/Makeup/Contour.d.ts +17 -0
- package/dist/components/Makeup/Eyeliner.d.ts +20 -0
- package/dist/components/Makeup/Eyeshadow.d.ts +20 -0
- package/dist/components/Makeup/Highlighter.d.ts +18 -0
- package/dist/components/Makeup/MakeupDesign.d.ts +37 -0
- package/dist/components/Makeup/MakeupRegion.d.ts +132 -0
- package/dist/components/Makeup/constants.d.ts +44 -0
- package/dist/components/Makeup/design.d.ts +106 -0
- package/dist/components/Makeup/designSamples.d.ts +42 -0
- package/dist/components/Makeup/eyes.d.ts +114 -0
- package/dist/components/Makeup/fields.d.ts +10 -0
- package/dist/components/Makeup/geometry.d.ts +106 -0
- package/dist/components/Makeup/index.d.ts +26 -0
- package/dist/components/Makeup/looks.d.ts +28 -0
- package/dist/components/Makeup/material.d.ts +239 -0
- package/dist/components/Makeup/settings.d.ts +54 -0
- package/dist/components/Makeup/shades.d.ts +143 -0
- package/dist/components/Makeup/shapes.d.ts +27 -0
- package/dist/components/Makeup/skinTone.d.ts +135 -0
- package/dist/components/Makeup/types.d.ts +110 -0
- package/dist/components/Makeup/useMakeupSkinTone.d.ts +40 -0
- package/dist/components/Necklace/Necklace.d.ts +44 -0
- package/dist/components/Necklace/index.d.ts +1 -0
- package/dist/components/ParticleEmitter/ParticleEmitter.d.ts +69 -0
- package/dist/components/ParticleEmitter/index.d.ts +1 -0
- package/dist/components/ShoulderOccluder/index.d.ts +43 -0
- package/dist/components/ShoulderOccluder/useCanonicalTorsoFit.d.ts +24 -0
- package/dist/components/SpringSwing/SpringSwing.d.ts +22 -0
- package/dist/components/SpringSwing/index.d.ts +1 -0
- package/dist/components/XRScene/renderOutputTarget.d.ts +12 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/config/index.d.ts +0 -1
- package/dist/context-DTxSQvp4.js +13 -0
- package/dist/context-hA0Rb2Xa.cjs +1 -0
- package/dist/contexts-BH7PdKFS.cjs +1 -0
- package/dist/contexts-jak8-tND.js +667 -0
- package/dist/coordinates/index.d.ts +2 -0
- package/dist/coordinates/side.d.ts +40 -0
- package/dist/debug-ui/default-setting.cjs +2 -2
- package/dist/debug-ui/face-swap-settings/index.d.ts +22 -0
- package/dist/debug-ui/hierarchy-panel/index.d.ts +3 -2
- package/dist/debug-ui/index.d.ts +4 -3
- package/dist/debug-ui/media-source/index.d.ts +1 -1
- package/dist/debug-ui/media-source/session.d.ts +30 -2
- package/dist/debug-ui/media-source.cjs +1 -1
- package/dist/debug-ui/media-source.js +1 -1
- package/dist/debug-ui/object-inspector-panel/index.d.ts +3 -2
- package/dist/debug-ui/product-hotspots/index.d.ts +3 -2
- package/dist/debug-ui/scene-editor/hierarchy-panel.d.ts +3 -1
- package/dist/debug-ui/scene-editor/inspector-panel.d.ts +3 -1
- package/dist/debug-ui/screen-image-settings/index.d.ts +3 -1
- package/dist/debug-ui/screen-text-settings/ScreenTextSettingsPanel.d.ts +1 -1
- package/dist/debug-ui/screen-text-settings/types.d.ts +2 -0
- package/dist/debug-ui/settings-panel/index.d.ts +6 -1
- package/dist/debug-ui/shared/debugWindow.d.ts +51 -0
- package/dist/debug-ui/xr-diagnostics/index.d.ts +3 -2
- package/dist/debug-ui.cjs +3 -3
- package/dist/debug-ui.js +2250 -2472
- package/dist/entries/all.d.ts +3 -1
- package/dist/entries/core.d.ts +3 -2
- package/dist/entries/face-effects.d.ts +114 -8
- package/dist/entries/instructions.d.ts +48 -0
- package/dist/entries/internal.d.ts +2 -1
- package/dist/entries/low-level.d.ts +28 -1
- package/dist/entries/particles.d.ts +11 -0
- package/dist/entries/tracking.d.ts +37 -2
- package/dist/face-atlas/attributes.d.ts +30 -0
- package/dist/face-atlas/eyes.d.ts +272 -0
- package/dist/face-atlas/faceAtlas.generated.d.ts +46 -0
- package/dist/face-atlas/glsl/atlasVertex.d.ts +46 -0
- package/dist/face-atlas/glsl/common.d.ts +55 -0
- package/dist/face-atlas/glsl/design.d.ts +49 -0
- package/dist/face-atlas/glsl/eyes.d.ts +73 -0
- package/dist/face-atlas/glsl/finish.d.ts +24 -0
- package/dist/face-atlas/glsl/format.d.ts +4 -0
- package/dist/face-atlas/glsl/index.d.ts +59 -0
- package/dist/face-atlas/glsl/shading.d.ts +15 -0
- package/dist/face-atlas/glsl/shapes.d.ts +66 -0
- package/dist/face-atlas/glsl/sparkle.d.ts +19 -0
- package/dist/face-atlas/glsl/uniforms.d.ts +106 -0
- package/dist/face-atlas/guide.d.ts +51 -0
- package/dist/face-atlas/index.d.ts +25 -0
- package/dist/face-atlas/lead.d.ts +117 -0
- package/dist/face-atlas/madeUpCamera.d.ts +125 -0
- package/dist/face-atlas/masks.d.ts +53 -0
- package/dist/face-atlas/obj.d.ts +69 -0
- package/dist/face-atlas/polylines.d.ts +63 -0
- package/dist/face-atlas/probe/FaceSkinProbe.d.ts +208 -0
- package/dist/face-atlas/probe/__fixtures__/emulate.d.ts +9 -0
- package/dist/face-atlas/probe/__fixtures__/face.d.ts +24 -0
- package/dist/face-atlas/probe/constants.d.ts +137 -0
- package/dist/face-atlas/probe/glsl.d.ts +43 -0
- package/dist/face-atlas/probe/lightFit.d.ts +108 -0
- package/dist/face-atlas/probe/schedule.d.ts +44 -0
- package/dist/face-atlas/probe/selfTest.d.ts +87 -0
- package/dist/face-atlas/probe/stats.d.ts +143 -0
- package/dist/face-atlas/probe/targets.d.ts +70 -0
- package/dist/face-atlas/probe/unwrap.d.ts +76 -0
- package/dist/face-atlas/quality.d.ts +28 -0
- package/dist/face-atlas/regions.d.ts +31 -0
- package/dist/face-atlas/registry.d.ts +252 -0
- package/dist/face-atlas/renderState.d.ts +86 -0
- package/dist/face-atlas/selfOcclusion.d.ts +62 -0
- package/dist/face-atlas/shading.d.ts +406 -0
- package/dist/face-atlas/shapes.d.ts +86 -0
- package/dist/face-atlas/sides.d.ts +41 -0
- package/dist/face-atlas/skinMask.d.ts +35 -0
- package/dist/face-atlas/surface.d.ts +155 -0
- package/dist/face-atlas/topology.d.ts +44 -0
- package/dist/face-character/__fixtures__/faceImageDetections.d.ts +25 -0
- package/dist/face-character/__fixtures__/faceNode.d.ts +22 -0
- package/dist/face-character/bindFaceModel.d.ts +106 -0
- package/dist/face-character/canonicalFace.d.ts +17 -0
- package/dist/face-character/canonicalFaceGeometry.d.ts +11 -0
- package/dist/face-character/canonicalFacePositions.d.ts +7 -0
- package/dist/face-character/driveFaceModel.d.ts +57 -0
- package/dist/face-character/expressionOutputs.d.ts +45 -0
- package/dist/face-character/faceExpressions.d.ts +104 -0
- package/dist/face-character/faceImageLandmarker.d.ts +93 -0
- package/dist/face-character/faceMeshBinding.d.ts +62 -0
- package/dist/face-character/faceMorph.d.ts +77 -0
- package/dist/face-character/faceMorphs.d.ts +46 -0
- package/dist/face-character/facePhoto.d.ts +138 -0
- package/dist/face-character/facePiercings.d.ts +116 -0
- package/dist/face-character/facePin.d.ts +131 -0
- package/dist/face-character/faceReprojection.d.ts +273 -0
- package/dist/face-character/faceReprojector.d.ts +171 -0
- package/dist/face-character/faceRig.d.ts +176 -0
- package/dist/face-character/faceSwapPresence.d.ts +85 -0
- package/dist/face-character/faceTexture.d.ts +169 -0
- package/dist/face-character/faceTextureBaker.d.ts +86 -0
- package/dist/face-character/faceTextureGuide.d.ts +106 -0
- package/dist/face-character/faceTextureStats.d.ts +298 -0
- package/dist/face-character/faceTransfer.d.ts +396 -0
- package/dist/face-character/faceTransferGeometry.d.ts +109 -0
- package/dist/face-character/faceTransferSelfTest.d.ts +94 -0
- package/dist/face-character/faceWarp3D.d.ts +101 -0
- package/dist/face-character/faceless.d.ts +79 -0
- package/dist/face-character/featureWarp.d.ts +28 -0
- package/dist/face-character/liveFaceRegistry.d.ts +370 -0
- package/dist/face-character/liveValue.d.ts +12 -0
- package/dist/face-character/memo.d.ts +15 -0
- package/dist/face-effects.cjs +2252 -83
- package/dist/face-effects.js +14234 -1231
- package/dist/face-expression/index.d.ts +182 -0
- package/dist/face-info/landmarks.d.ts +17 -3
- package/dist/face-info/types.d.ts +20 -3
- package/dist/gestures/definitions.d.ts +15 -2
- package/dist/gestures/index.d.ts +1 -1
- package/dist/gestures/measures.d.ts +21 -8
- package/dist/getFaceInfo-B1otSDMX.cjs +1 -0
- package/dist/getFaceInfo-Cu4xDWiL.js +62 -0
- package/dist/hand/armFit.d.ts +46 -0
- package/dist/hand/armMask.d.ts +178 -0
- package/dist/hand/handCutout.d.ts +23 -0
- package/dist/hand/handCutoutRegistry.d.ts +7 -0
- package/dist/hand/handGestures.d.ts +524 -0
- package/dist/hand/handPose.d.ts +98 -0
- package/dist/hand/handRigSolver.d.ts +159 -0
- package/dist/hand/handTattoo.d.ts +81 -0
- package/dist/hand/handTouch.d.ts +240 -0
- package/dist/hand/wrist.d.ts +44 -0
- package/dist/hand/wristFilter.d.ts +44 -0
- package/dist/hooks/selectors.d.ts +8 -0
- package/dist/hooks/useFaceModelAcquisition.d.ts +38 -0
- package/dist/hooks/useTrackerContext.d.ts +6 -0
- package/dist/index-B1_TzJaI.js +1104 -0
- package/dist/index-BavF06C6.js +190 -0
- package/dist/index-BfFmpddl.cjs +21 -0
- package/dist/index-BuBzneeW.cjs +46 -0
- package/dist/index-CGsQWodV.cjs +1 -0
- package/dist/index-CIe7eCMH.js +3200 -0
- package/dist/index-CfSF8LXa.cjs +1 -0
- package/dist/index-D5GTzOzD.cjs +1 -0
- package/dist/index-DBhQzvVa.js +314 -0
- package/dist/index-DE17y0ZI.cjs +1 -0
- package/dist/index-JII7huPk.js +442 -0
- package/dist/index-tpCr9CLj.cjs +1 -0
- package/dist/{renderPasses-NnKZVfBy.js → index-w1S7fI2B.js} +219 -247
- package/dist/index-zGaqrz_K.js +188 -0
- package/dist/instructions.cjs +30 -0
- package/dist/instructions.js +1507 -0
- package/dist/{internal-vsfNQycj.js → internal-B90P-clC.js} +138 -118
- package/dist/internal-Cjinca64.cjs +1 -0
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +15 -10
- package/dist/iris/compute.d.ts +7 -5
- package/dist/iris/types.d.ts +6 -4
- package/dist/{landmarkMask-CbTFzBYG.js → landmarkMask-BFDyBnKM.js} +6 -6
- package/dist/landmarks-BlUqf5MZ.cjs +1 -0
- package/dist/landmarks-bftdwq6Z.js +76 -0
- package/dist/loaders-BGAUACsd.js +363 -0
- package/dist/loaders-BJ1_QCHt.cjs +1 -0
- package/dist/low-level.cjs +1 -1
- package/dist/low-level.js +666 -602
- package/dist/main.cjs +1 -1
- package/dist/main.js +866 -1182
- package/dist/models/Body/index.d.ts +2 -0
- package/dist/models/Face/constants.d.ts +8 -0
- package/dist/models/Face/index.d.ts +3 -11
- package/dist/models/Face/rotation.d.ts +18 -3
- package/dist/models/Hand/HandTracking.d.ts +17 -1
- package/dist/models/Segmentation/index.d.ts +2 -0
- package/dist/models/nodeSource.d.ts +9 -0
- package/dist/particles/emission.d.ts +24 -0
- package/dist/particles/eyes.d.ts +24 -0
- package/dist/particles/glsl.d.ts +14 -0
- package/dist/particles/index.d.ts +10 -0
- package/dist/particles/motion.d.ts +42 -0
- package/dist/particles/presets.d.ts +12 -0
- package/dist/particles/ring.d.ts +58 -0
- package/dist/particles/selfTest.d.ts +53 -0
- package/dist/particles/settings.d.ts +127 -0
- package/dist/particles/shapes.d.ts +29 -0
- package/dist/particles/spawner.d.ts +60 -0
- package/dist/particles/system.d.ts +64 -0
- package/dist/particles.cjs +122 -0
- package/dist/particles.js +774 -0
- package/dist/product.cjs +1 -1
- package/dist/product.js +29 -29
- package/dist/{providers-C0Dlhh9Z.js → providers-C8rE26Uf.js} +127 -126
- package/dist/providers-DHsrhDI2.cjs +62 -0
- package/dist/render/renderPasses.d.ts +8 -0
- package/dist/render/sceneBeforeRender.d.ts +12 -0
- package/dist/{renderGroups-CN1cGFUo.js → renderGroups-B38pUaX2.js} +1 -1
- package/dist/{renderGroups-O4KmaMl9.cjs → renderGroups-Cb_4Ar1Q.cjs} +1 -1
- package/dist/renderPasses-B6l8IpJv.js +1290 -0
- package/dist/renderPasses-dqmkft4P.cjs +158 -0
- package/dist/renderState-CJNmj5jz.js +39 -0
- package/dist/renderState-apSfg4eR.cjs +1 -0
- package/dist/scene-object.cjs +1 -1
- package/dist/scene-object.js +2 -2
- package/dist/segmentation-Cb3ouK6Z.js +1758 -0
- package/dist/segmentation-D9pYO6aR.cjs +1 -0
- package/dist/segmentation2d/types.d.ts +6 -0
- package/dist/select-Ck5LGz-J.cjs +1 -0
- package/dist/select-pYRo_win.js +233 -0
- package/dist/selectors-C4X71aoD.cjs +1 -0
- package/dist/selectors-DmNaKIwE.js +196 -0
- package/dist/session-BrH8G7iJ.cjs +31 -0
- package/dist/session-DgA_z6O1.js +418 -0
- package/dist/{settings-aQk845NJ.js → settings-BJ7FMBsO.js} +53 -15
- package/dist/settings-C63FMBlF.cjs +1 -0
- package/dist/similarityFit-BFqHND2e.cjs +1 -0
- package/dist/similarityFit-Bbz-R8AY.js +91 -0
- package/dist/spring/index.d.ts +2 -0
- package/dist/spring/spring.d.ts +69 -0
- package/dist/spring/swing.d.ts +54 -0
- package/dist/tracking.cjs +10 -1
- package/dist/tracking.js +1002 -855
- package/dist/trigger-D0Pm9noT.cjs +49 -0
- package/dist/trigger-IQeys0oS.js +2128 -0
- package/dist/types/face.d.ts +20 -1
- package/dist/types/hand-tracking.d.ts +9 -0
- package/dist/types/nodes.d.ts +20 -1
- package/dist/types/segmentation.d.ts +5 -0
- package/dist/updateThrottle-BseecYag.js +4 -0
- package/dist/updateThrottle-Of5Y4SVa.cjs +1 -0
- package/dist/useFaceInfo-BHDNCvsJ.cjs +1 -0
- package/dist/useFaceInfo-J4x7LsqL.js +76 -0
- package/dist/useFaceResultReader-BvEo5REG.js +61 -0
- package/dist/useFaceResultReader-DuaL1KJG.cjs +1 -0
- package/dist/useInstructionHold-DOu-RpCM.js +53 -0
- package/dist/useInstructionHold-DwJY1Alr.cjs +1 -0
- package/dist/useLandmarkPoseFit-Bg-h9BPb.cjs +1 -0
- package/dist/useLandmarkPoseFit-Bmb3h6Mw.js +87 -0
- package/dist/{useXRCapabilities-B1R2ghy-.cjs → useXRCapabilities-Cr3RzuAW.cjs} +1 -1
- package/dist/{useXRCapabilities-C68v__wB.js → useXRCapabilities-Cxmlmpbd.js} +1 -1
- package/dist/utils/canonicalRigidLandmarks.d.ts +8 -0
- package/dist/utils/headOccluderFit.d.ts +42 -0
- package/dist/utils/integrity.d.ts +17 -0
- package/dist/utils/resolveNumFaces.d.ts +13 -0
- package/dist/utils/shoulderOccluderFit.d.ts +38 -0
- package/dist/utils/similarityFit.d.ts +23 -0
- package/dist/uv-BMFt19bg.cjs +1 -0
- package/dist/{index-CsUdQ-pn.js → uv-DJU_XfmN.js} +15 -249
- package/docs/SDK_DOCUMENTATION.md +1 -2
- package/docs/api/adaptive-quality.mdx +1 -1
- package/docs/api/body-instructions.mdx +285 -0
- package/docs/api/body-triggers.mdx +234 -0
- package/docs/api/camera-permission.mdx +1 -1
- package/docs/api/coordinate-spaces.mdx +7 -4
- package/docs/api/cross-camera.mdx +3 -2
- package/docs/api/debug-ui-scene-editor.mdx +23 -2
- package/docs/api/external-face-mesh.mdx +231 -0
- package/docs/api/face-actions.mdx +20 -16
- package/docs/api/face-attribute-expression.mdx +1 -1
- package/docs/api/face-binding-anchors.mdx +4 -2
- package/docs/api/face-character.mdx +157 -0
- package/docs/api/face-effects.mdx +3 -0
- package/docs/api/face-expression-controller.mdx +153 -0
- package/docs/api/face-info.mdx +17 -11
- package/docs/api/face-inset.mdx +204 -0
- package/docs/api/face-instructions.mdx +183 -0
- package/docs/api/face-liquify.mdx +196 -0
- package/docs/api/face-mesh.mdx +4 -7
- package/docs/api/face-morph.mdx +117 -0
- package/docs/api/face-painting.mdx +7 -0
- package/docs/api/face-reprojection.mdx +154 -0
- package/docs/api/face-retouching.mdx +18 -10
- package/docs/api/face-swap.mdx +350 -0
- package/docs/api/face-warp-3d.mdx +166 -0
- package/docs/api/faceless.mdx +143 -0
- package/docs/api/gestures.mdx +68 -32
- package/docs/api/hair.mdx +97 -0
- package/docs/api/hand-instructions.mdx +222 -0
- package/docs/api/hand-rig.mdx +535 -0
- package/docs/api/hand-touch.mdx +162 -0
- package/docs/api/head-occluder.mdx +563 -0
- package/docs/api/holistic-tracker.mdx +6 -1
- package/docs/api/instructions.mdx +323 -0
- package/docs/api/iris-tracking.mdx +24 -19
- package/docs/api/made-up-camera.mdx +131 -0
- package/docs/api/makeup-skin-tone.mdx +135 -0
- package/docs/api/makeup.mdx +353 -0
- package/docs/api/multi-subject.mdx +4 -1
- package/docs/api/particles.mdx +155 -0
- package/docs/api/person-cutout.mdx +1 -1
- package/docs/api/pin-to-face-mesh.mdx +274 -0
- package/docs/api/product-ar.mdx +5 -2
- package/docs/api/segmentation-overlay.mdx +1 -1
- package/docs/docs.json +29 -1
- package/docs/examples/lip-shaders.mdx +82 -33
- package/docs/guides/face-atlas-template.svg +1 -0
- package/docs/guides/face-atlas-textures.mdx +186 -0
- package/docs/guides/face-texture-template.svg +1 -0
- package/docs/guides/harness-debug-ui.mdx +4 -4
- package/docs/guides/lip-effect-textures.mdx +178 -102
- package/docs/guides/lip-uv-template.png +0 -0
- package/docs/guides/lip-uv-template.svg +1 -1
- package/docs/guides/makeup-design-textures.mdx +109 -0
- package/docs/introduction.mdx +1 -2
- package/package.json +11 -1
- package/dist/DebuggerUI-C-ldiozL.js +0 -269
- package/dist/DebuggerUI-CWX5EtQv.cjs +0 -1
- package/dist/FaceMeshRenderer-BEEXZwS6.cjs +0 -158
- package/dist/FaceMeshRenderer-UuH5sTXG.js +0 -1322
- package/dist/FaceRetouch-C7h7x9kd.js +0 -683
- package/dist/FaceRetouch-DqftT26Y.cjs +0 -134
- package/dist/GLTFLoader-C5q63sKO.js +0 -1633
- package/dist/GLTFLoader-Cb_CRwmG.cjs +0 -1
- package/dist/SegmentationOverlay-DQuW3dsc.js +0 -133
- package/dist/SegmentationOverlay-aWVod8Kl.cjs +0 -1
- package/dist/components/FaceWarp3D/FaceWarp3DHead.d.ts +0 -15
- package/dist/components/FaceWarp3D/defaults.d.ts +0 -37
- package/dist/components/FaceWarp3D/warp.d.ts +0 -13
- package/dist/contexts-CO0sd4JQ.cjs +0 -1
- package/dist/contexts-FzlnnMYD.js +0 -669
- package/dist/debug-ui/face-warp-3d/index.d.ts +0 -6
- package/dist/getFaceInfo-BkZfaQs-.js +0 -118
- package/dist/getFaceInfo-ahPxQFGu.cjs +0 -1
- package/dist/index--RgGzZ6X.cjs +0 -47
- package/dist/index-CHVbH0hz.js +0 -214
- package/dist/index-CeVkgsag.cjs +0 -1
- package/dist/index-CnGox6Xr.js +0 -3054
- package/dist/index-DKBAh6hV.cjs +0 -1
- package/dist/index-DsZwTfG0.cjs +0 -1
- package/dist/index-Dw6tj2Mi.js +0 -144
- package/dist/index-OCPjOaeP.cjs +0 -1
- package/dist/index-s9pF4zkG.js +0 -2053
- package/dist/internal-BYza1h8_.cjs +0 -1
- package/dist/measures-9dQPdw96.js +0 -154
- package/dist/measures-KfJzpvod.cjs +0 -1
- package/dist/providers-YNwkmNeK.cjs +0 -62
- package/dist/renderPasses-Cg-zqmEz.cjs +0 -21
- package/dist/screenTransform-BenfCtZt.js +0 -44
- package/dist/screenTransform-BiXdpVf0.cjs +0 -1
- package/dist/segmentation-9PhSvc-R.cjs +0 -1
- package/dist/segmentation-CeOTKemr.js +0 -5
- package/dist/selectors-C5G1PMYL.js +0 -195
- package/dist/selectors-Du_PsVnW.cjs +0 -1
- package/dist/session-BBr0yN8h.cjs +0 -31
- package/dist/session-Cy0m7l7-.js +0 -363
- package/dist/settings-DRR7-snV.cjs +0 -1
- package/dist/useFaceInfo-Blf7FCu3.js +0 -303
- package/dist/useFaceInfo-C5mO8NQY.cjs +0 -1
package/dist/main.js
CHANGED
|
@@ -1,168 +1,171 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { X as
|
|
5
|
-
import {
|
|
6
|
-
import { S as
|
|
7
|
-
import { X as
|
|
8
|
-
import { S as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { u as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
var Pe = Object.defineProperty;
|
|
2
|
+
var Ie = (e, t, s) => t in e ? Pe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
+
var N = (e, t, s) => Ie(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
+
import { X as v, u as Le, G as Oe, I as Ge, J as qe, K as Be, L as Ke, M as We } from "./index-CIe7eCMH.js";
|
|
5
|
+
import { a2 as Gs, a3 as qs, z as Bs, N as Ks, a4 as Ws, _ as Xs, $ as Hs, c as zs, v as $s, B as js, d as Vs, f as Zs, O as Ys, k as Js, P as Qs, i as er, Q as tr, R as sr, T as rr, Y as ar, p as nr, q as ir, a0 as or, r as cr, a1 as lr, U as ur, Z as dr, t as mr, V as pr, W as fr } from "./index-CIe7eCMH.js";
|
|
6
|
+
import { S as Xe } from "./contexts-jak8-tND.js";
|
|
7
|
+
import { X as gr } from "./contexts-jak8-tND.js";
|
|
8
|
+
import { S as yr, T as Mr } from "./TextLabel-c9BCucOI.js";
|
|
9
|
+
import { jsxs as L, jsx as M, Fragment as re } from "react/jsx-runtime";
|
|
10
|
+
import { useRef as F, useMemo as Z, useEffect as x, useState as k, Suspense as He, useCallback as R, forwardRef as ze, useImperativeHandle as $e, useContext as je, createContext as Ve, useId as Ze, useSyncExternalStore as Ye } from "react";
|
|
11
|
+
import * as Je from "three";
|
|
12
|
+
import { MathUtils as Qe, Vector2 as et, Vector3 as tt, DoubleSide as te, RepeatWrapping as Se, LinearFilter as ye } from "three";
|
|
13
|
+
import { D as Er, H as Rr, G as br, E as Ar, J as Fr, K as Cr, P as vr, S as kr, C as _r, I as xr, L as wr, M as Nr, F as Ur, B as Dr } from "./index-w1S7fI2B.js";
|
|
14
|
+
import { useThree as st, useFrame as Fe } from "@react-three/fiber";
|
|
15
|
+
import { R as rt } from "./uv-DJU_XfmN.js";
|
|
16
|
+
import { c as Ce, b as ve } from "./selectors-DmNaKIwE.js";
|
|
17
|
+
import { u as at } from "./landmarks-bftdwq6Z.js";
|
|
18
|
+
import { S as nt, c as it } from "./index-B1_TzJaI.js";
|
|
19
|
+
import { L as Ir, d as Lr, R as Or, a as Gr, e as qr, b as Br, f as Kr } from "./index-B1_TzJaI.js";
|
|
20
|
+
import { useTexture as ot } from "@react-three/drei";
|
|
21
|
+
import { a as ct } from "./context-DTxSQvp4.js";
|
|
22
|
+
import { k as Xr, D as Hr, j as zr, E as $r, M as jr, h as Vr, S as Zr, T as Yr, l as Jr, g as Qr, n as ea, r as ta } from "./renderPasses-B6l8IpJv.js";
|
|
23
|
+
import { D as ra, a as aa, M as na, n as ia } from "./index-zGaqrz_K.js";
|
|
24
|
+
import { d as ca, r as la } from "./drawNormalizedCrop-CRdIDyl1.js";
|
|
25
|
+
import { M as da } from "./index-BavF06C6.js";
|
|
26
|
+
import { k as pa, a as fa, b as ha, D as ga, m as Sa, r as ya } from "./index-DBhQzvVa.js";
|
|
27
|
+
import { c as Ta, j as Ea, k as Ra, l as ba, m as Aa, n as Fa, b as Ca, o as va, d as ka, e as _a, f as xa, a as wa, g as Na, h as Ua, i as Da, t as Pa, p as Ia, v as La, w as Oa } from "./select-pYRo_win.js";
|
|
28
|
+
import { u as qa } from "./useXRCapabilities-Cxmlmpbd.js";
|
|
29
|
+
import { g as ke } from "./loaders-BGAUACsd.js";
|
|
30
|
+
import { D as Ka, X as Wa, c as Xa, d as Ha, a as za, b as $a, e as ja, f as Va, h as Za, i as Ya, u as Ja } from "./loaders-BGAUACsd.js";
|
|
31
|
+
import { S as lt } from "./segmentation-Cb3ouK6Z.js";
|
|
32
|
+
const V = (e, t, s, r) => Qe.damp(e, t, Math.max(0, s), Math.max(0, r)), os = (e, t, s, r, a = new et()) => a.set(
|
|
33
|
+
V(e.x, t.x, s, r),
|
|
34
|
+
V(e.y, t.y, s, r)
|
|
35
|
+
), cs = (e, t, s, r, a = new tt()) => a.set(
|
|
36
|
+
V(e.x, t.x, s, r),
|
|
37
|
+
V(e.y, t.y, s, r),
|
|
38
|
+
V(e.z, t.z, s, r)
|
|
39
|
+
), ut = "rgba(20,40,110,0.88)", dt = 24, mt = 512;
|
|
40
|
+
function ls({
|
|
41
|
+
color: e = ut,
|
|
42
|
+
borderColor: t,
|
|
43
|
+
borderWidth: s = 0,
|
|
44
|
+
borderRadius: r = dt,
|
|
45
|
+
resolution: a = mt,
|
|
46
|
+
aspect: n = 1,
|
|
44
47
|
opacity: i = 1,
|
|
45
|
-
name:
|
|
46
|
-
overlay:
|
|
48
|
+
name: c,
|
|
49
|
+
overlay: o = !0,
|
|
47
50
|
position: l,
|
|
48
|
-
rotation:
|
|
49
|
-
scale:
|
|
51
|
+
rotation: h,
|
|
52
|
+
scale: d,
|
|
50
53
|
visible: m
|
|
51
54
|
}) {
|
|
52
|
-
const
|
|
53
|
-
width: Math.round(
|
|
54
|
-
height: Math.round(
|
|
55
|
-
color:
|
|
56
|
-
borderColor:
|
|
57
|
-
borderWidth:
|
|
55
|
+
const u = F(null), p = F(null), S = Z(() => pt({
|
|
56
|
+
width: Math.round(a * Math.max(n, 0.05)),
|
|
57
|
+
height: Math.round(a),
|
|
58
|
+
color: e,
|
|
59
|
+
borderColor: t,
|
|
60
|
+
borderWidth: s,
|
|
58
61
|
borderRadius: r
|
|
59
|
-
}), [
|
|
62
|
+
}), [e, t, s, r, a, n]);
|
|
60
63
|
x(() => () => {
|
|
61
|
-
|
|
62
|
-
}, [
|
|
63
|
-
const
|
|
64
|
-
return
|
|
65
|
-
const g =
|
|
64
|
+
S.dispose();
|
|
65
|
+
}, [S]);
|
|
66
|
+
const E = F(null), f = F(i);
|
|
67
|
+
return f.current !== i && (f.current = i, E.current = null, p.current && (p.current.opacity = i)), x(() => {
|
|
68
|
+
const g = u.current;
|
|
66
69
|
if (g)
|
|
67
|
-
return g.userData.setOpacity = (
|
|
68
|
-
|
|
70
|
+
return g.userData.setOpacity = (b) => {
|
|
71
|
+
E.current = b, p.current && (p.current.opacity = b);
|
|
69
72
|
}, () => {
|
|
70
73
|
delete g.userData.setOpacity;
|
|
71
74
|
};
|
|
72
75
|
}, []), /* @__PURE__ */ L(
|
|
73
76
|
"mesh",
|
|
74
77
|
{
|
|
75
|
-
ref:
|
|
76
|
-
name:
|
|
78
|
+
ref: u,
|
|
79
|
+
name: c,
|
|
77
80
|
position: l,
|
|
78
|
-
rotation:
|
|
79
|
-
scale:
|
|
81
|
+
rotation: h,
|
|
82
|
+
scale: d,
|
|
80
83
|
visible: m,
|
|
81
84
|
children: [
|
|
82
85
|
/* @__PURE__ */ M("planeGeometry", { args: [1, 1] }),
|
|
83
86
|
/* @__PURE__ */ M(
|
|
84
87
|
"meshBasicMaterial",
|
|
85
88
|
{
|
|
86
|
-
ref:
|
|
87
|
-
map:
|
|
89
|
+
ref: p,
|
|
90
|
+
map: S,
|
|
88
91
|
transparent: !0,
|
|
89
92
|
opacity: i,
|
|
90
|
-
depthTest: !
|
|
91
|
-
depthWrite: !
|
|
93
|
+
depthTest: !o,
|
|
94
|
+
depthWrite: !o
|
|
92
95
|
}
|
|
93
96
|
)
|
|
94
97
|
]
|
|
95
98
|
}
|
|
96
99
|
);
|
|
97
100
|
}
|
|
98
|
-
function
|
|
99
|
-
const { width:
|
|
100
|
-
const
|
|
101
|
-
return
|
|
102
|
-
})(),
|
|
103
|
-
|
|
104
|
-
const l = Math.min(i, Math.min(
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
return
|
|
101
|
+
function pt(e) {
|
|
102
|
+
const { width: t, height: s, color: r, borderColor: a, borderWidth: n, borderRadius: i } = e, c = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(t, s) : (() => {
|
|
103
|
+
const d = document.createElement("canvas");
|
|
104
|
+
return d.width = t, d.height = s, d;
|
|
105
|
+
})(), o = c.getContext("2d");
|
|
106
|
+
o.clearRect(0, 0, t, s);
|
|
107
|
+
const l = Math.min(i, Math.min(t, s) / 2);
|
|
108
|
+
o.beginPath(), o.moveTo(l, 0), o.lineTo(t - l, 0), o.quadraticCurveTo(t, 0, t, l), o.lineTo(t, s - l), o.quadraticCurveTo(t, s, t - l, s), o.lineTo(l, s), o.quadraticCurveTo(0, s, 0, s - l), o.lineTo(0, l), o.quadraticCurveTo(0, 0, l, 0), o.closePath(), o.fillStyle = r, o.fill(), a && n > 0 && (o.lineWidth = n, o.strokeStyle = a, o.stroke());
|
|
109
|
+
const h = new Je.CanvasTexture(c);
|
|
110
|
+
return h.needsUpdate = !0, h;
|
|
108
111
|
}
|
|
109
|
-
const
|
|
110
|
-
segmentationMask:
|
|
111
|
-
segmentation:
|
|
112
|
-
invert:
|
|
112
|
+
const us = ({
|
|
113
|
+
segmentationMask: e,
|
|
114
|
+
segmentation: t,
|
|
115
|
+
invert: s = !1,
|
|
113
116
|
customBackground: r,
|
|
114
|
-
renderOrder:
|
|
117
|
+
renderOrder: a = rt.BACKGROUND
|
|
115
118
|
}) => {
|
|
116
|
-
const { camera:
|
|
119
|
+
const { camera: n, size: i } = st(), c = Ce(), o = ve(v.BACKGROUND_SEGMENTATION), l = t ? o == null ? void 0 : o.backgroundSegmentationMask : void 0, h = F(!1);
|
|
117
120
|
x(() => {
|
|
118
|
-
if (!
|
|
119
|
-
|
|
121
|
+
if (!t) {
|
|
122
|
+
h.current = !1;
|
|
120
123
|
return;
|
|
121
124
|
}
|
|
122
|
-
|
|
123
|
-
`[VideoBackground] segmentation="${
|
|
124
|
-
),
|
|
125
|
-
}, [
|
|
126
|
-
const
|
|
127
|
-
if (!
|
|
125
|
+
o === null && !h.current && (console.warn(
|
|
126
|
+
`[VideoBackground] segmentation="${t}" set but no matching <Segmentation> component is mounted; rendering unmasked.`
|
|
127
|
+
), h.current = !0);
|
|
128
|
+
}, [t, o]);
|
|
129
|
+
const d = t ? l : e, m = Z(() => {
|
|
130
|
+
if (!n.isPerspectiveCamera)
|
|
128
131
|
return [10, 10];
|
|
129
|
-
const
|
|
132
|
+
const u = n, E = (u.position.z || 5) - -1, f = u.fov * Math.PI / 180, g = 2 * Math.tan(f / 2) * E;
|
|
130
133
|
return [g * (i.width / i.height), g];
|
|
131
|
-
}, [
|
|
132
|
-
return
|
|
133
|
-
/* @__PURE__ */ L("mesh", { position: [0, 0, -0.01], renderOrder:
|
|
134
|
+
}, [n, i]);
|
|
135
|
+
return c ? /* @__PURE__ */ M("group", { position: [0, 0, -1], children: s ? /* @__PURE__ */ L(re, { children: [
|
|
136
|
+
/* @__PURE__ */ L("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
|
|
134
137
|
/* @__PURE__ */ M("planeGeometry", { args: m }),
|
|
135
138
|
/* @__PURE__ */ M(
|
|
136
139
|
"meshBasicMaterial",
|
|
137
140
|
{
|
|
138
|
-
map:
|
|
141
|
+
map: c,
|
|
139
142
|
depthTest: !1,
|
|
140
143
|
depthWrite: !1,
|
|
141
144
|
toneMapped: !1,
|
|
142
|
-
side:
|
|
145
|
+
side: te
|
|
143
146
|
}
|
|
144
147
|
)
|
|
145
148
|
] }),
|
|
146
|
-
r &&
|
|
149
|
+
r && d && /* @__PURE__ */ L("mesh", { position: [0, 0, 0], renderOrder: a, children: [
|
|
147
150
|
/* @__PURE__ */ M("planeGeometry", { args: m }),
|
|
148
151
|
/* @__PURE__ */ M(
|
|
149
152
|
"meshBasicMaterial",
|
|
150
153
|
{
|
|
151
154
|
map: typeof r == "string" ? void 0 : r,
|
|
152
155
|
color: typeof r == "string" ? r : void 0,
|
|
153
|
-
alphaMap:
|
|
156
|
+
alphaMap: d,
|
|
154
157
|
transparent: !1,
|
|
155
158
|
alphaTest: 0.5,
|
|
156
159
|
depthTest: !1,
|
|
157
160
|
depthWrite: !1,
|
|
158
161
|
toneMapped: !1,
|
|
159
|
-
side:
|
|
162
|
+
side: te
|
|
160
163
|
},
|
|
161
164
|
"inverted-mask"
|
|
162
165
|
)
|
|
163
166
|
] })
|
|
164
|
-
] }) : /* @__PURE__ */ L(
|
|
165
|
-
r &&
|
|
167
|
+
] }) : /* @__PURE__ */ L(re, { children: [
|
|
168
|
+
r && d && /* @__PURE__ */ L("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
|
|
166
169
|
/* @__PURE__ */ M("planeGeometry", { args: m }),
|
|
167
170
|
/* @__PURE__ */ M(
|
|
168
171
|
"meshBasicMaterial",
|
|
@@ -172,87 +175,87 @@ const Us = ({
|
|
|
172
175
|
depthTest: !1,
|
|
173
176
|
depthWrite: !1,
|
|
174
177
|
toneMapped: !1,
|
|
175
|
-
side:
|
|
178
|
+
side: te
|
|
176
179
|
}
|
|
177
180
|
)
|
|
178
181
|
] }),
|
|
179
|
-
/* @__PURE__ */ L("mesh", { position: [0, 0, 0], renderOrder:
|
|
182
|
+
/* @__PURE__ */ L("mesh", { position: [0, 0, 0], renderOrder: a, children: [
|
|
180
183
|
/* @__PURE__ */ M("planeGeometry", { args: m }),
|
|
181
184
|
/* @__PURE__ */ M(
|
|
182
185
|
"meshBasicMaterial",
|
|
183
186
|
{
|
|
184
|
-
map:
|
|
185
|
-
alphaMap:
|
|
187
|
+
map: c,
|
|
188
|
+
alphaMap: d,
|
|
186
189
|
transparent: !1,
|
|
187
|
-
alphaTest:
|
|
190
|
+
alphaTest: d ? 0.5 : void 0,
|
|
188
191
|
depthTest: !1,
|
|
189
192
|
depthWrite: !1,
|
|
190
193
|
toneMapped: !1,
|
|
191
|
-
side:
|
|
194
|
+
side: te
|
|
192
195
|
},
|
|
193
|
-
|
|
196
|
+
d ? "with-mask" : "no-mask"
|
|
194
197
|
)
|
|
195
198
|
] })
|
|
196
199
|
] }) }) : null;
|
|
197
|
-
},
|
|
198
|
-
ready:
|
|
199
|
-
error:
|
|
200
|
-
hasMask:
|
|
201
|
-
}) =>
|
|
202
|
-
const { ready:
|
|
203
|
-
|
|
200
|
+
}, ft = { left: -1, right: 1, top: 1, bottom: -1 }, ht = ({
|
|
201
|
+
ready: e,
|
|
202
|
+
error: t,
|
|
203
|
+
hasMask: s
|
|
204
|
+
}) => t ? "error" : e && s ? "ready" : "loading", gt = (e, t) => e === "ready" || t === "camera", St = (e = !0) => {
|
|
205
|
+
const { ready: t, error: s } = at(
|
|
206
|
+
v.BACKGROUND_SEGMENTATION,
|
|
204
207
|
{ type: "portrait" },
|
|
205
|
-
|
|
206
|
-
), r =
|
|
207
|
-
return
|
|
208
|
+
e
|
|
209
|
+
), r = ve(v.BACKGROUND_SEGMENTATION), [a, n] = k(null);
|
|
210
|
+
return Fe(() => {
|
|
208
211
|
const i = (r == null ? void 0 : r.backgroundSegmentationMask) ?? null;
|
|
209
|
-
i !==
|
|
212
|
+
i !== a && n(i);
|
|
210
213
|
}), {
|
|
211
|
-
texture:
|
|
212
|
-
status:
|
|
213
|
-
error:
|
|
214
|
+
texture: a,
|
|
215
|
+
status: ht({ ready: t, error: s, hasMask: !!a }),
|
|
216
|
+
error: s
|
|
214
217
|
};
|
|
215
|
-
},
|
|
216
|
-
invert:
|
|
217
|
-
fallback:
|
|
218
|
-
active:
|
|
218
|
+
}, ds = ({
|
|
219
|
+
invert: e = !1,
|
|
220
|
+
fallback: t = "camera",
|
|
221
|
+
active: s = !0,
|
|
219
222
|
onStatusChange: r,
|
|
220
|
-
fit:
|
|
221
|
-
anchors:
|
|
223
|
+
fit: a = "cover",
|
|
224
|
+
anchors: n = ft,
|
|
222
225
|
renderOrder: i = 100,
|
|
223
|
-
visible:
|
|
224
|
-
maskFeather:
|
|
226
|
+
visible: c = !0,
|
|
227
|
+
maskFeather: o = 4,
|
|
225
228
|
maskErode: l = 0.7,
|
|
226
|
-
...
|
|
229
|
+
...h
|
|
227
230
|
}) => {
|
|
228
|
-
const
|
|
231
|
+
const d = Ce(), { texture: m, status: u, error: p } = St(s);
|
|
229
232
|
if (x(() => {
|
|
230
|
-
r == null || r(
|
|
231
|
-
}, [
|
|
232
|
-
const
|
|
233
|
-
return !
|
|
234
|
-
|
|
233
|
+
r == null || r(u, p);
|
|
234
|
+
}, [u, p, r]), !d) return null;
|
|
235
|
+
const S = u === "ready" && m;
|
|
236
|
+
return !S && !gt(u, t) ? null : /* @__PURE__ */ M(
|
|
237
|
+
nt,
|
|
235
238
|
{
|
|
236
|
-
...
|
|
237
|
-
source: { kind: "texture", texture:
|
|
238
|
-
fit:
|
|
239
|
-
anchors:
|
|
239
|
+
...h,
|
|
240
|
+
source: { kind: "texture", texture: d },
|
|
241
|
+
fit: a,
|
|
242
|
+
anchors: n,
|
|
240
243
|
renderOrder: i,
|
|
241
|
-
visible:
|
|
242
|
-
maskTexture:
|
|
244
|
+
visible: c,
|
|
245
|
+
maskTexture: S ? m : null,
|
|
243
246
|
maskChannel: "green",
|
|
244
|
-
maskInvert:
|
|
245
|
-
maskFeather:
|
|
247
|
+
maskInvert: e,
|
|
248
|
+
maskFeather: o,
|
|
246
249
|
maskErode: l
|
|
247
250
|
}
|
|
248
251
|
);
|
|
249
|
-
},
|
|
250
|
-
const [
|
|
252
|
+
}, ie = 9, oe = 16, ms = ({ children: e }) => {
|
|
253
|
+
const [t, s] = k({ width: 0, height: 0 });
|
|
251
254
|
return x(() => {
|
|
252
255
|
const r = () => {
|
|
253
|
-
const
|
|
254
|
-
let
|
|
255
|
-
i >
|
|
256
|
+
const a = document.documentElement.clientWidth, n = document.documentElement.clientHeight, i = a / n, c = ie / oe;
|
|
257
|
+
let o, l;
|
|
258
|
+
i > c ? (l = n, o = l * ie / oe) : (o = a, l = o * oe / ie), s({ width: o, height: l });
|
|
256
259
|
};
|
|
257
260
|
return r(), window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
258
261
|
}, []), /* @__PURE__ */ M(
|
|
@@ -266,38 +269,38 @@ const Us = ({
|
|
|
266
269
|
justifyContent: "center",
|
|
267
270
|
backgroundColor: "#0d0d0d"
|
|
268
271
|
},
|
|
269
|
-
children: /* @__PURE__ */ M("div", { style: { width:
|
|
272
|
+
children: /* @__PURE__ */ M("div", { style: { width: t.width, height: t.height, position: "relative" }, children: e })
|
|
270
273
|
}
|
|
271
274
|
);
|
|
272
|
-
},
|
|
273
|
-
const r =
|
|
274
|
-
return { x: r /
|
|
275
|
-
},
|
|
276
|
-
sheet:
|
|
277
|
-
contentAspect:
|
|
278
|
-
renderOrder:
|
|
275
|
+
}, ps = ({ size: e = 0.25, ...t }) => /* @__PURE__ */ M("axesHelper", { args: [e], ...t }), yt = { left: -1, right: 1, top: 1, bottom: -1 }, Mt = (e, t, s) => {
|
|
276
|
+
const r = e % t, a = Math.floor(e / t);
|
|
277
|
+
return { x: r / t, y: (s - 1 - a) / s };
|
|
278
|
+
}, Tt = ({
|
|
279
|
+
sheet: e,
|
|
280
|
+
contentAspect: t,
|
|
281
|
+
renderOrder: s,
|
|
279
282
|
name: r
|
|
280
283
|
}) => {
|
|
281
|
-
const
|
|
282
|
-
return
|
|
283
|
-
|
|
284
|
-
const m = Math.floor(
|
|
284
|
+
const a = ot(e.url), n = F(0), i = F(-1), c = ct(), [o, l] = t != null ? it(c, t) : [1, 1];
|
|
285
|
+
return Fe((h, d) => {
|
|
286
|
+
a.wrapS = Se, a.wrapT = Se, a.magFilter = ye, a.minFilter = ye, a.generateMipmaps = !1, a.repeat.set(1 / e.cols, 1 / e.rows), n.current += d;
|
|
287
|
+
const m = Math.floor(n.current * e.fps) % e.frames;
|
|
285
288
|
if (m === i.current) return;
|
|
286
289
|
i.current = m;
|
|
287
|
-
const { x:
|
|
288
|
-
|
|
289
|
-
}), /* @__PURE__ */ L("mesh", { name: r, renderOrder:
|
|
290
|
+
const { x: u, y: p } = Mt(m, e.cols, e.rows);
|
|
291
|
+
a.offset.set(u, p);
|
|
292
|
+
}), /* @__PURE__ */ L("mesh", { name: r, renderOrder: s, scale: [o, l, 1], children: [
|
|
290
293
|
/* @__PURE__ */ M("planeGeometry", { args: [1, 1] }),
|
|
291
|
-
/* @__PURE__ */ M("meshBasicMaterial", { map:
|
|
294
|
+
/* @__PURE__ */ M("meshBasicMaterial", { map: a, transparent: !0, toneMapped: !1, depthWrite: !1 })
|
|
292
295
|
] });
|
|
293
|
-
},
|
|
294
|
-
sheet:
|
|
295
|
-
anchors:
|
|
296
|
-
contentAspect:
|
|
296
|
+
}, fs = ({
|
|
297
|
+
sheet: e,
|
|
298
|
+
anchors: t = yt,
|
|
299
|
+
contentAspect: s,
|
|
297
300
|
renderOrder: r = 10,
|
|
298
|
-
name:
|
|
299
|
-
}) => /* @__PURE__ */ M(
|
|
300
|
-
switch (
|
|
301
|
+
name: a = "spriteAnimation"
|
|
302
|
+
}) => /* @__PURE__ */ M(He, { fallback: null, children: /* @__PURE__ */ M(Xe, { anchors: t, children: /* @__PURE__ */ M(Tt, { sheet: e, contentAspect: s, renderOrder: r, name: a }) }) }), q = (e) => {
|
|
303
|
+
switch (e) {
|
|
301
304
|
case "start":
|
|
302
305
|
return "starting";
|
|
303
306
|
case "started":
|
|
@@ -314,232 +317,232 @@ const Us = ({
|
|
|
314
317
|
case "clear":
|
|
315
318
|
return "idle";
|
|
316
319
|
}
|
|
317
|
-
},
|
|
320
|
+
}, Et = [
|
|
318
321
|
"video/mp4",
|
|
319
322
|
"video/webm;codecs=vp9",
|
|
320
323
|
"video/webm;codecs=vp8",
|
|
321
324
|
"video/webm"
|
|
322
325
|
];
|
|
323
|
-
function
|
|
326
|
+
function hs(e = {}) {
|
|
324
327
|
const {
|
|
325
|
-
audio:
|
|
326
|
-
mimeType:
|
|
328
|
+
audio: t = !1,
|
|
329
|
+
mimeType: s,
|
|
327
330
|
bitsPerSecond: r,
|
|
328
|
-
onData:
|
|
329
|
-
onStop:
|
|
331
|
+
onData: a,
|
|
332
|
+
onStop: n,
|
|
330
333
|
onRecordingStart: i,
|
|
331
|
-
onRecordingPause:
|
|
332
|
-
onRecordingResume:
|
|
334
|
+
onRecordingPause: c,
|
|
335
|
+
onRecordingResume: o,
|
|
333
336
|
onRecordingStop: l,
|
|
334
|
-
onRecordingComplete:
|
|
335
|
-
onError:
|
|
337
|
+
onRecordingComplete: h,
|
|
338
|
+
onError: d,
|
|
336
339
|
passThroughStream: m
|
|
337
|
-
} =
|
|
338
|
-
var
|
|
339
|
-
const
|
|
340
|
-
for (const
|
|
341
|
-
if ((
|
|
342
|
-
}, [
|
|
343
|
-
async (
|
|
344
|
-
const
|
|
345
|
-
if (
|
|
346
|
-
let
|
|
347
|
-
if (
|
|
348
|
-
|
|
340
|
+
} = e, u = F(null), p = F(null), S = F([]), [E, f] = k("idle"), [g, b] = k(null), [X, A] = k(null), w = R(() => {
|
|
341
|
+
var C;
|
|
342
|
+
const y = [s, ...Et].filter(Boolean);
|
|
343
|
+
for (const T of y)
|
|
344
|
+
if ((C = MediaRecorder.isTypeSupported) != null && C.call(MediaRecorder, T)) return T;
|
|
345
|
+
}, [s]), G = R(
|
|
346
|
+
async (y) => {
|
|
347
|
+
const C = new MediaStream();
|
|
348
|
+
if (y.getTracks().forEach((T) => C.addTrack(T)), t) {
|
|
349
|
+
let T;
|
|
350
|
+
if (t instanceof MediaStream)
|
|
351
|
+
T = t;
|
|
349
352
|
else {
|
|
350
|
-
const _ = typeof
|
|
351
|
-
|
|
353
|
+
const _ = typeof t == "object" ? { audio: t } : { audio: !0, video: !1 };
|
|
354
|
+
T = await navigator.mediaDevices.getUserMedia(_);
|
|
352
355
|
}
|
|
353
|
-
|
|
356
|
+
T.getAudioTracks().forEach((_) => C.addTrack(_));
|
|
354
357
|
}
|
|
355
|
-
if (!
|
|
358
|
+
if (!C.getTracks().length)
|
|
356
359
|
throw new Error("No tracks available in combined stream.");
|
|
357
|
-
return
|
|
360
|
+
return p.current = C, C;
|
|
358
361
|
},
|
|
359
|
-
[
|
|
360
|
-
),
|
|
361
|
-
async (
|
|
362
|
-
|
|
362
|
+
[t]
|
|
363
|
+
), Y = R(
|
|
364
|
+
async (y, C) => {
|
|
365
|
+
f(q("start")), A(null), b(null);
|
|
363
366
|
try {
|
|
364
|
-
let
|
|
367
|
+
let T;
|
|
365
368
|
if (m)
|
|
366
|
-
|
|
369
|
+
T = m, p.current = T;
|
|
367
370
|
else {
|
|
368
|
-
if (!
|
|
369
|
-
|
|
371
|
+
if (!y) throw new Error("start(stream) requires a MediaStream.");
|
|
372
|
+
T = await G(y);
|
|
370
373
|
}
|
|
371
|
-
const _ =
|
|
374
|
+
const _ = w(), H = {};
|
|
372
375
|
_ && (H.mimeType = _), r && (H.bitsPerSecond = r);
|
|
373
|
-
const
|
|
374
|
-
|
|
375
|
-
var
|
|
376
|
-
((
|
|
377
|
-
},
|
|
378
|
-
const
|
|
376
|
+
const W = new MediaRecorder(T, H);
|
|
377
|
+
W.ondataavailable = (P) => {
|
|
378
|
+
var $;
|
|
379
|
+
(($ = P.data) == null ? void 0 : $.size) > 0 && (S.current.push(P.data), a == null || a(P.data));
|
|
380
|
+
}, W.onstop = () => {
|
|
381
|
+
const P = new Blob(S.current, {
|
|
379
382
|
type: _ ?? "video/webm"
|
|
380
383
|
});
|
|
381
|
-
|
|
382
|
-
},
|
|
383
|
-
} catch (
|
|
384
|
-
const _ =
|
|
385
|
-
console.error("start(stream) failed", _),
|
|
384
|
+
b(P), n == null || n(P), h == null || h(P), S.current = [], f(q("complete"));
|
|
385
|
+
}, u.current = W, W.start(C), f(q("started")), i == null || i();
|
|
386
|
+
} catch (T) {
|
|
387
|
+
const _ = T instanceof Error ? T : new Error(String(T));
|
|
388
|
+
console.error("start(stream) failed", _), A(_), f(q("fail")), d == null || d(_);
|
|
386
389
|
}
|
|
387
390
|
},
|
|
388
391
|
[
|
|
389
392
|
G,
|
|
390
|
-
|
|
393
|
+
w,
|
|
391
394
|
r,
|
|
392
|
-
n,
|
|
393
395
|
a,
|
|
394
|
-
|
|
396
|
+
n,
|
|
397
|
+
h,
|
|
395
398
|
i,
|
|
396
|
-
|
|
399
|
+
d,
|
|
397
400
|
m
|
|
398
401
|
]
|
|
399
|
-
), J =
|
|
400
|
-
const
|
|
401
|
-
!
|
|
402
|
-
}, [l]),
|
|
403
|
-
const
|
|
404
|
-
(
|
|
405
|
-
}, [
|
|
406
|
-
const
|
|
407
|
-
(
|
|
408
|
-
}, [
|
|
409
|
-
var
|
|
402
|
+
), J = R(() => {
|
|
403
|
+
const y = u.current;
|
|
404
|
+
!y || y.state === "inactive" || (f(q("stop")), y.stop(), l == null || l());
|
|
405
|
+
}, [l]), Q = R(() => {
|
|
406
|
+
const y = u.current;
|
|
407
|
+
(y == null ? void 0 : y.state) === "recording" && (y.pause(), f(q("pause")), c == null || c());
|
|
408
|
+
}, [c]), ee = R(() => {
|
|
409
|
+
const y = u.current;
|
|
410
|
+
(y == null ? void 0 : y.state) === "paused" && (y.resume(), f(q("resume")), o == null || o());
|
|
411
|
+
}, [o]), z = R(() => {
|
|
412
|
+
var y;
|
|
410
413
|
try {
|
|
411
|
-
|
|
412
|
-
} catch (
|
|
413
|
-
console.error("clear failed",
|
|
414
|
+
u.current && (u.current.onstop = null, u.current.state !== "inactive" && u.current.stop()), u.current = null, (y = p.current) == null || y.getTracks().forEach((C) => C.stop()), p.current = null, b(null), f(q("clear")), S.current = [], A(null);
|
|
415
|
+
} catch (C) {
|
|
416
|
+
console.error("clear failed", C);
|
|
414
417
|
}
|
|
415
418
|
}, []);
|
|
416
|
-
return x(() => () =>
|
|
417
|
-
status:
|
|
418
|
-
start:
|
|
419
|
+
return x(() => () => z(), []), {
|
|
420
|
+
status: E,
|
|
421
|
+
start: Y,
|
|
419
422
|
stop: J,
|
|
420
|
-
pause:
|
|
421
|
-
resume:
|
|
422
|
-
clear:
|
|
423
|
-
isRecording:
|
|
424
|
-
isPaused:
|
|
423
|
+
pause: Q,
|
|
424
|
+
resume: ee,
|
|
425
|
+
clear: z,
|
|
426
|
+
isRecording: E === "recording" || E === "paused",
|
|
427
|
+
isPaused: E === "paused",
|
|
425
428
|
recordedBlob: g,
|
|
426
|
-
error:
|
|
427
|
-
getActiveStream: () =>
|
|
429
|
+
error: X,
|
|
430
|
+
getActiveStream: () => p.current
|
|
428
431
|
};
|
|
429
432
|
}
|
|
430
|
-
const
|
|
431
|
-
var
|
|
432
|
-
(
|
|
433
|
+
const Rt = async (e, t = {}) => {
|
|
434
|
+
var s, r, a;
|
|
435
|
+
(s = t.onCaptureStart) == null || s.call(t), await Promise.resolve();
|
|
433
436
|
try {
|
|
434
|
-
const
|
|
435
|
-
return (r =
|
|
436
|
-
} catch (
|
|
437
|
-
const i =
|
|
438
|
-
throw (
|
|
437
|
+
const n = e();
|
|
438
|
+
return (r = t.onCaptureComplete) == null || r.call(t, n), n;
|
|
439
|
+
} catch (n) {
|
|
440
|
+
const i = n instanceof Error ? n : new Error(String(n));
|
|
441
|
+
throw (a = t.onError) == null || a.call(t, i), i;
|
|
439
442
|
}
|
|
440
|
-
},
|
|
441
|
-
const { session:
|
|
442
|
-
captureFrame:
|
|
443
|
+
}, gs = (e = {}) => {
|
|
444
|
+
const { session: t } = Le(), {
|
|
445
|
+
captureFrame: s = t.captureFrame,
|
|
443
446
|
onCaptureStart: r,
|
|
444
|
-
onCaptureComplete:
|
|
445
|
-
onError:
|
|
446
|
-
} =
|
|
447
|
-
|
|
447
|
+
onCaptureComplete: a,
|
|
448
|
+
onError: n
|
|
449
|
+
} = e, [i, c] = k("idle"), [o, l] = k(null), [h, d] = k(null), m = R(async () => {
|
|
450
|
+
c("capturing"), l(null), d(null);
|
|
448
451
|
try {
|
|
449
|
-
const
|
|
452
|
+
const p = await Rt(s, {
|
|
450
453
|
onCaptureStart: r,
|
|
451
|
-
onCaptureComplete:
|
|
452
|
-
onError:
|
|
454
|
+
onCaptureComplete: a,
|
|
455
|
+
onError: n
|
|
453
456
|
});
|
|
454
|
-
return l(
|
|
455
|
-
} catch (
|
|
456
|
-
const
|
|
457
|
-
return
|
|
457
|
+
return l(p), c("completed"), p;
|
|
458
|
+
} catch (p) {
|
|
459
|
+
const S = p instanceof Error ? p : new Error(String(p));
|
|
460
|
+
return d(S), c("error"), null;
|
|
458
461
|
}
|
|
459
|
-
}, [
|
|
460
|
-
|
|
462
|
+
}, [s, r, a, n]), u = R(() => {
|
|
463
|
+
c("idle"), l(null), d(null);
|
|
461
464
|
}, []);
|
|
462
|
-
return { status: i, capturePhoto: m, clear:
|
|
463
|
-
},
|
|
464
|
-
const
|
|
465
|
-
let i =
|
|
466
|
-
const
|
|
465
|
+
return { status: i, capturePhoto: m, clear: u, dataUrl: o, error: h };
|
|
466
|
+
}, Ss = (e, t) => {
|
|
467
|
+
const s = e.split(","), r = s[0].match(/:(.*?);/), a = r ? r[1] : "application/octet-stream", n = atob(s[s.length - 1]);
|
|
468
|
+
let i = n.length;
|
|
469
|
+
const c = new Uint8Array(i);
|
|
467
470
|
for (; i--; )
|
|
468
|
-
|
|
469
|
-
return new File([
|
|
470
|
-
},
|
|
471
|
-
if (
|
|
472
|
-
|
|
471
|
+
c[i] = n.charCodeAt(i);
|
|
472
|
+
return new File([c], t, { type: a });
|
|
473
|
+
}, bt = 4, At = 50, Ft = 5e3, se = (e) => Math.min(1, Math.max(0, e)), Me = (e) => new Promise((t) => {
|
|
474
|
+
if (e.readyState >= 4) {
|
|
475
|
+
t();
|
|
473
476
|
return;
|
|
474
477
|
}
|
|
475
|
-
let
|
|
478
|
+
let s = !1;
|
|
476
479
|
const r = () => {
|
|
477
|
-
|
|
480
|
+
s || (s = !0, t());
|
|
478
481
|
};
|
|
479
|
-
|
|
480
|
-
}),
|
|
481
|
-
const
|
|
482
|
-
return
|
|
483
|
-
},
|
|
484
|
-
|
|
485
|
-
|
|
482
|
+
e.addEventListener("canplaythrough", r, { once: !0 }), e.addEventListener("error", r, { once: !0 }), setTimeout(r, Ft);
|
|
483
|
+
}), Te = (e, t) => {
|
|
484
|
+
const s = document.createElement("audio");
|
|
485
|
+
return s.src = e, s.loop = t, s.preload = "auto", s.setAttribute("playsinline", ""), s.setAttribute("webkit-playsinline", ""), s.load(), s;
|
|
486
|
+
}, Ct = (e) => {
|
|
487
|
+
e.muted = !0, e.play().then(() => {
|
|
488
|
+
e.pause(), e.currentTime = 0, e.muted = !1;
|
|
486
489
|
}).catch(() => {
|
|
487
|
-
|
|
490
|
+
e.muted = !1;
|
|
488
491
|
});
|
|
489
492
|
};
|
|
490
|
-
class
|
|
491
|
-
constructor(
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
493
|
+
class vt {
|
|
494
|
+
constructor(t = {}) {
|
|
495
|
+
N(this, "sfxPoolSize");
|
|
496
|
+
N(this, "coalesceMs");
|
|
497
|
+
N(this, "muted", !0);
|
|
498
|
+
N(this, "listeners", /* @__PURE__ */ new Set());
|
|
499
|
+
N(this, "music", null);
|
|
500
|
+
N(this, "musicUrl", null);
|
|
501
|
+
N(this, "musicReady", null);
|
|
502
|
+
N(this, "musicWanted", null);
|
|
503
|
+
N(this, "pools", /* @__PURE__ */ new Map());
|
|
501
504
|
/** Last play time per SFX URL, for the coalesce window. */
|
|
502
|
-
|
|
505
|
+
N(this, "lastPlayed", /* @__PURE__ */ new Map());
|
|
503
506
|
/** Readiness promises so a loading gate can await decode/buffer. */
|
|
504
|
-
|
|
505
|
-
this.sfxPoolSize =
|
|
507
|
+
N(this, "ready", /* @__PURE__ */ new Map());
|
|
508
|
+
this.sfxPoolSize = t.sfxPoolSize ?? bt, this.coalesceMs = t.coalesceMs ?? At;
|
|
506
509
|
}
|
|
507
510
|
/**
|
|
508
511
|
* Create + buffer the looping music element. Await in the loading gate so the
|
|
509
512
|
* unmute tap is instant. Idempotent per URL (re-requesting the same track is
|
|
510
513
|
* a no-op that returns the in-flight promise).
|
|
511
514
|
*/
|
|
512
|
-
prefetchMusic(
|
|
513
|
-
const r =
|
|
514
|
-
if (this.musicWanted = { url:
|
|
515
|
+
prefetchMusic(t, s = 0.4) {
|
|
516
|
+
const r = se(s);
|
|
517
|
+
if (this.musicWanted = { url: t, volume: r }, this.musicUrl === t && this.musicReady)
|
|
515
518
|
return this.music && (this.music.volume = r), this.musicReady;
|
|
516
|
-
this.music && (this.music.pause(), this.music.currentTime = 0, this.music.removeAttribute("src"), this.music.load()), this.music =
|
|
517
|
-
const
|
|
518
|
-
return this.musicReady =
|
|
519
|
+
this.music && (this.music.pause(), this.music.currentTime = 0, this.music.removeAttribute("src"), this.music.load()), this.music = Te(t, !0), this.musicUrl = t, this.music.volume = r;
|
|
520
|
+
const a = Me(this.music);
|
|
521
|
+
return this.musicReady = a, a;
|
|
519
522
|
}
|
|
520
523
|
/**
|
|
521
524
|
* Create + buffer an SFX voice pool (round-robin so overlapping plays don't
|
|
522
525
|
* cut each other off). Returns a promise that resolves when the first element
|
|
523
526
|
* buffers. Idempotent per URL.
|
|
524
527
|
*/
|
|
525
|
-
registerSound(
|
|
526
|
-
const r = this.ready.get(
|
|
528
|
+
registerSound(t, s = 1) {
|
|
529
|
+
const r = this.ready.get(t);
|
|
527
530
|
if (r) return r;
|
|
528
|
-
const
|
|
529
|
-
for (let
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
}),
|
|
531
|
+
const a = se(s), n = [];
|
|
532
|
+
for (let c = 0; c < this.sfxPoolSize; c += 1) {
|
|
533
|
+
const o = Te(t, !1);
|
|
534
|
+
o.volume = a, o.addEventListener("ended", () => {
|
|
535
|
+
o.currentTime = 0;
|
|
536
|
+
}), n.push(o);
|
|
534
537
|
}
|
|
535
|
-
this.pools.set(
|
|
536
|
-
const i =
|
|
537
|
-
return this.ready.set(
|
|
538
|
+
this.pools.set(t, { els: n, next: 0, volume: a });
|
|
539
|
+
const i = Me(n[0]);
|
|
540
|
+
return this.ready.set(t, i), i;
|
|
538
541
|
}
|
|
539
542
|
/** Subscribe to mute-state changes (for a toggle UI). Fires immediately with
|
|
540
543
|
* the current state. Returns an unsubscribe. */
|
|
541
|
-
onMuteChange(
|
|
542
|
-
return this.listeners.add(
|
|
544
|
+
onMuteChange(t) {
|
|
545
|
+
return this.listeners.add(t), t(this.muted), () => this.listeners.delete(t);
|
|
543
546
|
}
|
|
544
547
|
isMuted() {
|
|
545
548
|
return this.muted;
|
|
@@ -550,8 +553,8 @@ class Xt {
|
|
|
550
553
|
* element with a muted play/pause so later `playOneShot` calls are allowed,
|
|
551
554
|
* then start the music. All elements are already buffered, so this is instant.
|
|
552
555
|
*/
|
|
553
|
-
setMuted(
|
|
554
|
-
|
|
556
|
+
setMuted(t) {
|
|
557
|
+
t !== this.muted && (this.muted = t, this.muted || this.pools.forEach((s) => s.els.forEach(Ct)), this.applyMusic(), this.listeners.forEach((s) => s(this.muted)));
|
|
555
558
|
}
|
|
556
559
|
toggleMuted() {
|
|
557
560
|
this.setMuted(!this.muted);
|
|
@@ -562,30 +565,30 @@ class Xt {
|
|
|
562
565
|
* same sound into one play, and does NO synchronous `currentTime` seek on a
|
|
563
566
|
* ready element (the pool rewinds on `ended`, off the hot path).
|
|
564
567
|
*/
|
|
565
|
-
playOneShot(
|
|
568
|
+
playOneShot(t, s) {
|
|
566
569
|
if (this.muted) return;
|
|
567
|
-
const r = this.pools.get(
|
|
570
|
+
const r = this.pools.get(t);
|
|
568
571
|
if (!r) return;
|
|
569
|
-
const
|
|
570
|
-
if (
|
|
571
|
-
this.lastPlayed.set(
|
|
572
|
-
const
|
|
572
|
+
const a = performance.now();
|
|
573
|
+
if (a - (this.lastPlayed.get(t) ?? -1 / 0) < this.coalesceMs) return;
|
|
574
|
+
this.lastPlayed.set(t, a);
|
|
575
|
+
const n = r.els.length;
|
|
573
576
|
let i;
|
|
574
|
-
for (let
|
|
575
|
-
const
|
|
576
|
-
if (
|
|
577
|
-
i =
|
|
577
|
+
for (let c = 0; c < n; c += 1) {
|
|
578
|
+
const o = r.els[(r.next + c) % n];
|
|
579
|
+
if (o.paused) {
|
|
580
|
+
i = o, r.next = (r.next + c + 1) % n;
|
|
578
581
|
break;
|
|
579
582
|
}
|
|
580
583
|
}
|
|
581
|
-
i || (i = r.els[r.next], r.next = (r.next + 1) %
|
|
584
|
+
i || (i = r.els[r.next], r.next = (r.next + 1) % n), i.muted = !1, i.volume = se(s ?? r.volume), i.currentTime !== 0 && (i.currentTime = 0), i.play().catch(() => {
|
|
582
585
|
});
|
|
583
586
|
}
|
|
584
587
|
/** Request the looping background track (buffer it with prefetchMusic, which
|
|
585
588
|
* a loading gate awaits). Remembered while muted; starts on unmute. */
|
|
586
|
-
startMusic(
|
|
587
|
-
const r =
|
|
588
|
-
this.musicUrl !==
|
|
589
|
+
startMusic(t, s = 0.4) {
|
|
590
|
+
const r = se(s);
|
|
591
|
+
this.musicUrl !== t && this.prefetchMusic(t, r), this.musicWanted = { url: t, volume: r }, this.applyMusic();
|
|
589
592
|
}
|
|
590
593
|
stopMusic() {
|
|
591
594
|
this.musicWanted = null, this.music && (this.music.pause(), this.music.currentTime = 0);
|
|
@@ -595,129 +598,129 @@ class Xt {
|
|
|
595
598
|
}), this.muted && !this.music.paused && this.music.pause());
|
|
596
599
|
}
|
|
597
600
|
}
|
|
598
|
-
const
|
|
599
|
-
src:
|
|
600
|
-
playMode:
|
|
601
|
+
const kt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math.floor(s)) ? "replay" : "ended", _t = (e, t, s) => e && t !== s, xt = (e) => Math.min(100, Math.max(0, e)) / 100, ys = ze(function({
|
|
602
|
+
src: t,
|
|
603
|
+
playMode: s = "once",
|
|
601
604
|
loopCount: r = 1,
|
|
602
|
-
autoplay:
|
|
603
|
-
muted:
|
|
605
|
+
autoplay: a = !1,
|
|
606
|
+
muted: n = !1,
|
|
604
607
|
volume: i = 100,
|
|
605
|
-
preload:
|
|
606
|
-
onReady:
|
|
608
|
+
preload: c = "auto",
|
|
609
|
+
onReady: o,
|
|
607
610
|
onPlay: l,
|
|
608
|
-
onPause:
|
|
609
|
-
onEnded:
|
|
611
|
+
onPause: h,
|
|
612
|
+
onEnded: d,
|
|
610
613
|
onError: m
|
|
611
|
-
},
|
|
612
|
-
const
|
|
613
|
-
const
|
|
614
|
-
if (
|
|
614
|
+
}, u) {
|
|
615
|
+
const p = F(null), S = F(0), E = F(null), f = R(async () => {
|
|
616
|
+
const A = p.current;
|
|
617
|
+
if (A)
|
|
615
618
|
try {
|
|
616
|
-
await
|
|
617
|
-
} catch (
|
|
618
|
-
const G =
|
|
619
|
+
await A.play();
|
|
620
|
+
} catch (w) {
|
|
621
|
+
const G = w instanceof Error ? w : new Error(String(w));
|
|
619
622
|
throw m == null || m(G), G;
|
|
620
623
|
}
|
|
621
|
-
}, [m]), g =
|
|
622
|
-
var
|
|
623
|
-
return (
|
|
624
|
-
}, []),
|
|
625
|
-
const
|
|
626
|
-
|
|
624
|
+
}, [m]), g = R(() => {
|
|
625
|
+
var A;
|
|
626
|
+
return (A = p.current) == null ? void 0 : A.pause();
|
|
627
|
+
}, []), b = R(() => {
|
|
628
|
+
const A = p.current;
|
|
629
|
+
A && (A.pause(), A.currentTime = 0, S.current = 0);
|
|
627
630
|
}, []);
|
|
628
|
-
|
|
629
|
-
|
|
631
|
+
$e(
|
|
632
|
+
u,
|
|
630
633
|
() => ({
|
|
631
|
-
play:
|
|
634
|
+
play: f,
|
|
632
635
|
pause: g,
|
|
633
|
-
stop:
|
|
636
|
+
stop: b,
|
|
634
637
|
get current() {
|
|
635
|
-
return
|
|
638
|
+
return p.current;
|
|
636
639
|
}
|
|
637
640
|
}),
|
|
638
|
-
[g,
|
|
641
|
+
[g, f, b]
|
|
639
642
|
), x(() => {
|
|
640
|
-
|
|
641
|
-
}, [
|
|
642
|
-
|
|
643
|
+
S.current = 0, E.current = null;
|
|
644
|
+
}, [t]), x(() => {
|
|
645
|
+
p.current && (p.current.volume = xt(i));
|
|
643
646
|
}, [i]), x(() => {
|
|
644
|
-
|
|
647
|
+
_t(a, E.current, t) && (E.current = t, f().catch(() => {
|
|
645
648
|
}));
|
|
646
|
-
}, [
|
|
647
|
-
const
|
|
648
|
-
|
|
649
|
-
const
|
|
650
|
-
if (
|
|
651
|
-
const
|
|
652
|
-
|
|
649
|
+
}, [a, t]);
|
|
650
|
+
const X = R(() => {
|
|
651
|
+
S.current += 1;
|
|
652
|
+
const A = Math.max(1, Math.floor(r));
|
|
653
|
+
if (kt(s, S.current, A) === "replay") {
|
|
654
|
+
const w = p.current;
|
|
655
|
+
w && (w.currentTime = 0, f().catch(() => {
|
|
653
656
|
}));
|
|
654
657
|
return;
|
|
655
658
|
}
|
|
656
|
-
|
|
657
|
-
}, [r,
|
|
659
|
+
S.current = 0, d == null || d();
|
|
660
|
+
}, [r, d, f, s]);
|
|
658
661
|
return /* @__PURE__ */ M(
|
|
659
662
|
"audio",
|
|
660
663
|
{
|
|
661
|
-
ref:
|
|
662
|
-
src:
|
|
663
|
-
preload:
|
|
664
|
+
ref: p,
|
|
665
|
+
src: t,
|
|
666
|
+
preload: c,
|
|
664
667
|
autoPlay: !1,
|
|
665
|
-
muted:
|
|
668
|
+
muted: n,
|
|
666
669
|
loop: !1,
|
|
667
670
|
playsInline: !0,
|
|
668
671
|
style: { display: "none" },
|
|
669
|
-
onCanPlayThrough:
|
|
672
|
+
onCanPlayThrough: o,
|
|
670
673
|
onPlay: l,
|
|
671
|
-
onPause:
|
|
672
|
-
onEnded:
|
|
673
|
-
onError: () => m == null ? void 0 : m(new Error(`Unable to load audio: ${
|
|
674
|
+
onPause: h,
|
|
675
|
+
onEnded: X,
|
|
676
|
+
onError: () => m == null ? void 0 : m(new Error(`Unable to load audio: ${t}`))
|
|
674
677
|
}
|
|
675
678
|
);
|
|
676
|
-
}),
|
|
677
|
-
const [
|
|
678
|
-
return x(() =>
|
|
679
|
-
},
|
|
680
|
-
const { auto:
|
|
681
|
-
r.current =
|
|
682
|
-
const [
|
|
683
|
-
const
|
|
684
|
-
if (
|
|
685
|
-
const
|
|
686
|
-
return
|
|
687
|
-
}, []),
|
|
688
|
-
async (
|
|
689
|
-
const m = ++
|
|
690
|
-
|
|
691
|
-
const
|
|
692
|
-
{ constraints: (
|
|
693
|
-
|
|
679
|
+
}), D = new vt(), Ms = (e, t) => D.prefetchMusic(e, t), Ts = (e, t) => D.registerSound(e, t), Es = (e, t) => D.startMusic(e, t), Rs = () => D.stopMusic(), bs = (e, t) => D.playOneShot(e, t), As = (e) => D.setMuted(e), Fs = () => D.toggleMuted(), Cs = () => D.isMuted(), vs = (e) => D.onMuteChange(e), ks = () => {
|
|
680
|
+
const [e, t] = k(D.isMuted());
|
|
681
|
+
return x(() => D.onMuteChange(t), []), e;
|
|
682
|
+
}, wt = (e = {}) => {
|
|
683
|
+
const { auto: t = !1 } = e, s = F(e.env ?? Oe()), r = F(e.constraints);
|
|
684
|
+
r.current = e.constraints;
|
|
685
|
+
const [a, n] = k("unknown"), [i, c] = k(null), o = F(0), l = R(async () => {
|
|
686
|
+
const d = ++o.current, m = await Ge(s.current);
|
|
687
|
+
if (d !== o.current) return a;
|
|
688
|
+
const u = m.state === "unknown" ? "unknown" : m.state;
|
|
689
|
+
return n((p) => p === "requesting" ? p : u), u !== "blocked" && c(null), u;
|
|
690
|
+
}, []), h = R(
|
|
691
|
+
async (d) => {
|
|
692
|
+
const m = ++o.current;
|
|
693
|
+
n("requesting"), c(null);
|
|
694
|
+
const u = await qe(
|
|
695
|
+
{ constraints: (d == null ? void 0 : d.constraints) ?? r.current, keepStream: !1 },
|
|
696
|
+
s.current
|
|
694
697
|
);
|
|
695
|
-
return m !==
|
|
698
|
+
return m !== o.current || (n(u.state), c(u.reason)), u.state;
|
|
696
699
|
},
|
|
697
700
|
[]
|
|
698
701
|
);
|
|
699
702
|
return x(() => {
|
|
700
|
-
let
|
|
703
|
+
let d = () => {
|
|
701
704
|
}, m = !0;
|
|
702
|
-
return
|
|
703
|
-
m && (
|
|
704
|
-
},
|
|
705
|
-
m ?
|
|
705
|
+
return t ? h() : l(), Be((u) => {
|
|
706
|
+
m && (n((p) => p === "requesting" ? p : u.state === "unknown" ? "unknown" : u.state), u.state !== "blocked" && c(null));
|
|
707
|
+
}, s.current).then((u) => {
|
|
708
|
+
m ? d = u : u();
|
|
706
709
|
}), () => {
|
|
707
|
-
m = !1,
|
|
710
|
+
m = !1, o.current += 1, d();
|
|
708
711
|
};
|
|
709
|
-
}, [
|
|
712
|
+
}, [t, l, h]), Z(
|
|
710
713
|
() => ({
|
|
711
|
-
state:
|
|
714
|
+
state: a,
|
|
712
715
|
reason: i,
|
|
713
|
-
canPrompt:
|
|
714
|
-
usable:
|
|
715
|
-
request:
|
|
716
|
+
canPrompt: Ke(a),
|
|
717
|
+
usable: a === "granted",
|
|
718
|
+
request: h,
|
|
716
719
|
refresh: l
|
|
717
720
|
}),
|
|
718
|
-
[
|
|
721
|
+
[a, i, h, l]
|
|
719
722
|
);
|
|
720
|
-
},
|
|
723
|
+
}, Nt = {
|
|
721
724
|
display: "flex",
|
|
722
725
|
flexDirection: "column",
|
|
723
726
|
alignItems: "center",
|
|
@@ -730,7 +733,7 @@ const Kt = (s, e, t) => s === "infinite" || s === "loop" && e < Math.max(1, Math
|
|
|
730
733
|
background: "#111827",
|
|
731
734
|
color: "#f9fafb",
|
|
732
735
|
fontFamily: "system-ui, sans-serif"
|
|
733
|
-
},
|
|
736
|
+
}, Ut = {
|
|
734
737
|
font: "inherit",
|
|
735
738
|
padding: "10px 18px",
|
|
736
739
|
borderRadius: 8,
|
|
@@ -738,410 +741,86 @@ const Kt = (s, e, t) => s === "infinite" || s === "loop" && e < Math.max(1, Math
|
|
|
738
741
|
background: "#2563eb",
|
|
739
742
|
color: "#fff",
|
|
740
743
|
cursor: "pointer"
|
|
741
|
-
},
|
|
742
|
-
children:
|
|
743
|
-
fallback:
|
|
744
|
-
auto:
|
|
744
|
+
}, _s = ({
|
|
745
|
+
children: e,
|
|
746
|
+
fallback: t,
|
|
747
|
+
auto: s = !1,
|
|
745
748
|
constraints: r,
|
|
746
|
-
requestLabel:
|
|
749
|
+
requestLabel: a = "Allow camera"
|
|
747
750
|
}) => {
|
|
748
|
-
const
|
|
749
|
-
if (
|
|
750
|
-
if (
|
|
751
|
-
const { state: i, reason:
|
|
752
|
-
return /* @__PURE__ */ L("div", { style:
|
|
753
|
-
/* @__PURE__ */ M("p", { "aria-live": "polite", style: { margin: 0 }, children: (
|
|
751
|
+
const n = wt({ auto: s, constraints: r });
|
|
752
|
+
if (n.usable) return /* @__PURE__ */ M(re, { children: e });
|
|
753
|
+
if (t) return /* @__PURE__ */ M(re, { children: t(n) });
|
|
754
|
+
const { state: i, reason: c, canPrompt: o, request: l } = n;
|
|
755
|
+
return /* @__PURE__ */ L("div", { style: Nt, role: "region", "aria-label": "Camera access", children: [
|
|
756
|
+
/* @__PURE__ */ M("p", { "aria-live": "polite", style: { margin: 0 }, children: (c == null ? void 0 : c.message) ?? We[i] }),
|
|
754
757
|
/* @__PURE__ */ M(
|
|
755
758
|
"button",
|
|
756
759
|
{
|
|
757
760
|
type: "button",
|
|
758
761
|
onClick: () => void l(),
|
|
759
|
-
disabled: !
|
|
760
|
-
"aria-disabled": !
|
|
761
|
-
style: { ...
|
|
762
|
-
children: i === "requesting" ? "Waiting…" : i === "denied" ? "Try again" :
|
|
762
|
+
disabled: !o || i === "requesting",
|
|
763
|
+
"aria-disabled": !o || i === "requesting",
|
|
764
|
+
style: { ...Ut, opacity: o && i !== "requesting" ? 1 : 0.5 },
|
|
765
|
+
children: i === "requesting" ? "Waiting…" : i === "denied" ? "Try again" : a
|
|
763
766
|
}
|
|
764
767
|
)
|
|
765
768
|
] });
|
|
766
|
-
},
|
|
767
|
-
var
|
|
769
|
+
}, Dt = () => {
|
|
770
|
+
var e;
|
|
768
771
|
return {
|
|
769
|
-
enumerateDevices: typeof navigator < "u" && ((
|
|
772
|
+
enumerateDevices: typeof navigator < "u" && ((e = navigator.mediaDevices) != null && e.enumerateDevices) ? () => navigator.mediaDevices.enumerateDevices() : void 0
|
|
770
773
|
};
|
|
771
|
-
},
|
|
772
|
-
if (!
|
|
774
|
+
}, Pt = /\b(back|rear|environment|world)\b/i, It = /\b(front|user|facetime|selfie)\b/i, Lt = (e) => Pt.test(e) ? "environment" : It.test(e) ? "user" : null, xs = async (e = Dt()) => {
|
|
775
|
+
if (!e.enumerateDevices) return [];
|
|
773
776
|
try {
|
|
774
|
-
return (await
|
|
775
|
-
deviceId:
|
|
776
|
-
label:
|
|
777
|
-
facing:
|
|
777
|
+
return (await e.enumerateDevices()).filter((s) => s.kind === "videoinput").map((s) => ({
|
|
778
|
+
deviceId: s.deviceId,
|
|
779
|
+
label: s.label,
|
|
780
|
+
facing: Lt(s.label)
|
|
778
781
|
}));
|
|
779
782
|
} catch {
|
|
780
783
|
return [];
|
|
781
784
|
}
|
|
782
|
-
},
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
// eslint-disable-line react-hooks/exhaustive-deps
|
|
787
|
-
), i = a.tiers, o = E(
|
|
788
|
-
(p) => {
|
|
789
|
-
const u = e.store.getSnapshot().quality;
|
|
790
|
-
u && e._setQuality(Je(u, a, p, performance.now()));
|
|
791
|
-
},
|
|
792
|
-
[e, a]
|
|
793
|
-
), c = E(
|
|
794
|
-
(p) => {
|
|
795
|
-
const u = e.store.getSnapshot().quality;
|
|
796
|
-
u && e._setQuality(et(u, a, p, performance.now()));
|
|
797
|
-
},
|
|
798
|
-
[e, a]
|
|
799
|
-
), l = E(() => {
|
|
800
|
-
const p = e.store.getSnapshot().quality;
|
|
801
|
-
e._setQuality(
|
|
802
|
-
tt(a, (p == null ? void 0 : p.signals) ?? st, performance.now())
|
|
803
|
-
);
|
|
804
|
-
}, [e, a]);
|
|
805
|
-
return K(
|
|
806
|
-
() => ({
|
|
807
|
-
tier: (t == null ? void 0 : t.decision.tier) ?? null,
|
|
808
|
-
index: (t == null ? void 0 : t.index) ?? -1,
|
|
809
|
-
tiers: i,
|
|
810
|
-
decision: (t == null ? void 0 : t.decision) ?? null,
|
|
811
|
-
history: (t == null ? void 0 : t.history) ?? [],
|
|
812
|
-
signals: (t == null ? void 0 : t.signals) ?? null,
|
|
813
|
-
locked: (t == null ? void 0 : t.locked) ?? !1,
|
|
814
|
-
setTier: o,
|
|
815
|
-
lock: () => c(!0),
|
|
816
|
-
unlock: () => c(!1),
|
|
817
|
-
reset: l,
|
|
818
|
-
state: t
|
|
819
|
-
}),
|
|
820
|
-
[t, i, o, c, l]
|
|
821
|
-
);
|
|
822
|
-
}, ts = 256 * 1024 * 1024;
|
|
823
|
-
class ss {
|
|
824
|
-
constructor(e = {}) {
|
|
825
|
-
T(this, "entries", /* @__PURE__ */ new Map());
|
|
826
|
-
T(this, "listeners", /* @__PURE__ */ new Set());
|
|
827
|
-
T(this, "budget");
|
|
828
|
-
T(this, "now");
|
|
829
|
-
T(this, "evictions", 0);
|
|
830
|
-
T(this, "hits", 0);
|
|
831
|
-
T(this, "misses", 0);
|
|
832
|
-
/** Memoised `getStats()` result; cleared on every change so `useSyncExternalStore` sees a stable snapshot. */
|
|
833
|
-
T(this, "statsSnapshot", null);
|
|
834
|
-
this.budget = e.budgetBytes ?? ts, this.now = e.now ?? (() => typeof performance < "u" ? performance.now() : Date.now());
|
|
835
|
-
}
|
|
836
|
-
/** Acquire `asset` on behalf of `ownerId`; shares an in-flight or loaded value. */
|
|
837
|
-
acquire(e, t) {
|
|
838
|
-
let r = this.entries.get(e.key);
|
|
839
|
-
if (r && r.status === "error" && (this.entries.delete(e.key), r = void 0), !r) {
|
|
840
|
-
this.misses += 1;
|
|
841
|
-
const n = typeof AbortController < "u" ? new AbortController() : null, a = {
|
|
842
|
-
definition: e,
|
|
843
|
-
status: "loading",
|
|
844
|
-
value: void 0,
|
|
845
|
-
bytes: 0,
|
|
846
|
-
owners: /* @__PURE__ */ new Set([t]),
|
|
847
|
-
promise: null,
|
|
848
|
-
controller: n,
|
|
849
|
-
error: null,
|
|
850
|
-
lastUsed: this.now(),
|
|
851
|
-
disposed: !1
|
|
852
|
-
};
|
|
853
|
-
return a.promise = e.load((n == null ? void 0 : n.signal) ?? new AbortController().signal).then((i) => {
|
|
854
|
-
var o, c;
|
|
855
|
-
if (a.disposed || this.entries.get(e.key) !== a)
|
|
856
|
-
throw (o = e.dispose) == null || o.call(e, i), new Error(`Asset "${e.key}" was released before it loaded`);
|
|
857
|
-
return a.value = i, a.bytes = Math.max(0, Math.round(((c = e.bytes) == null ? void 0 : c.call(e, i)) ?? 0)), a.status = "ready", a.promise = null, this.notify(), this.enforceBudget(), i;
|
|
858
|
-
}).catch((i) => {
|
|
859
|
-
const o = i instanceof Error ? i : new Error(String(i));
|
|
860
|
-
throw this.entries.get(e.key) === a && !a.disposed && (a.status = "error", a.error = o, a.promise = null, this.notify()), o;
|
|
861
|
-
}), this.entries.set(e.key, a), this.notify(), a.promise;
|
|
862
|
-
}
|
|
863
|
-
return this.hits += 1, r.owners.add(t), r.lastUsed = this.now(), this.notify(), r.status === "ready" ? Promise.resolve(r.value) : r.promise;
|
|
864
|
-
}
|
|
865
|
-
/** Start loading without holding a reference (warm the cache). */
|
|
866
|
-
preload(e) {
|
|
867
|
-
const t = "__preload__";
|
|
868
|
-
return this.acquire(e, t).finally(() => this.release(e.key, t));
|
|
869
|
-
}
|
|
870
|
-
/** Drop `ownerId`'s reference. The value stays cached until evicted or disposed. */
|
|
871
|
-
release(e, t) {
|
|
872
|
-
var n;
|
|
873
|
-
const r = this.entries.get(e);
|
|
874
|
-
!r || !r.owners.delete(t) || (r.lastUsed = this.now(), r.owners.size === 0 && r.status === "loading" && ((n = r.controller) == null || n.abort(), r.disposed = !0, this.entries.delete(e)), this.notify(), this.enforceBudget());
|
|
875
|
-
}
|
|
876
|
-
/** Synchronous read of a loaded value (or `undefined`). Does not take a reference. */
|
|
877
|
-
get(e) {
|
|
878
|
-
const t = this.entries.get(e);
|
|
879
|
-
return (t == null ? void 0 : t.status) === "ready" ? t.value : void 0;
|
|
880
|
-
}
|
|
881
|
-
has(e) {
|
|
882
|
-
return this.entries.has(e);
|
|
883
|
-
}
|
|
884
|
-
entry(e) {
|
|
885
|
-
const t = this.entries.get(e);
|
|
886
|
-
return t ? ve(e, t) : void 0;
|
|
887
|
-
}
|
|
888
|
-
list() {
|
|
889
|
-
return Array.from(this.entries, ([e, t]) => ve(e, t));
|
|
890
|
-
}
|
|
891
|
-
setBudget(e) {
|
|
892
|
-
this.budget = e, this.enforceBudget(), this.notify();
|
|
893
|
-
}
|
|
894
|
-
/**
|
|
895
|
-
* Dispose unreferenced values, least recently used first, until usage is
|
|
896
|
-
* within the budget (or `bytesToFree` is reclaimed). Referenced values are
|
|
897
|
-
* never touched. Returns the bytes reclaimed.
|
|
898
|
-
*/
|
|
899
|
-
evict(e) {
|
|
900
|
-
const t = e ?? Math.max(0, this.usage() - (Number.isFinite(this.budget) ? this.budget : 1 / 0));
|
|
901
|
-
if (t <= 0) return 0;
|
|
902
|
-
const r = Array.from(this.entries).filter(([, a]) => a.owners.size === 0 && a.status === "ready").sort((a, i) => a[1].lastUsed - i[1].lastUsed);
|
|
903
|
-
let n = 0;
|
|
904
|
-
for (const [a, i] of r) {
|
|
905
|
-
if (n >= t) break;
|
|
906
|
-
n += i.bytes, this.disposeEntry(a, i), this.evictions += 1;
|
|
907
|
-
}
|
|
908
|
-
return n > 0 && this.notify(), n;
|
|
909
|
-
}
|
|
910
|
-
/** Dispose every unreferenced value (route change, scene teardown). Returns the bytes freed. */
|
|
911
|
-
disposeUnreferenced() {
|
|
912
|
-
let e = 0;
|
|
913
|
-
for (const [t, r] of Array.from(this.entries))
|
|
914
|
-
r.owners.size === 0 && (e += r.bytes, this.disposeEntry(t, r));
|
|
915
|
-
return e > 0 && this.notify(), e;
|
|
916
|
-
}
|
|
917
|
-
/** Dispose everything, referenced or not (app / session shutdown). Owners are forgotten. */
|
|
918
|
-
disposeAll() {
|
|
919
|
-
for (const [e, t] of Array.from(this.entries)) this.disposeEntry(e, t);
|
|
920
|
-
this.notify();
|
|
921
|
-
}
|
|
922
|
-
/** Current statistics. The object is reused until the cache changes, so it is safe as a store snapshot. */
|
|
923
|
-
getStats() {
|
|
924
|
-
if (this.statsSnapshot) return this.statsSnapshot;
|
|
925
|
-
let e = 0, t = 0, r = 0, n = 0, a = 0;
|
|
926
|
-
for (const i of this.entries.values())
|
|
927
|
-
i.owners.size > 0 && (e += 1), i.status === "loading" && (t += 1), i.status === "error" && (r += 1), i.status === "ready" && (n += i.bytes, i.owners.size === 0 && (a += i.bytes));
|
|
928
|
-
return this.statsSnapshot = {
|
|
929
|
-
assets: this.entries.size,
|
|
930
|
-
referencedAssets: e,
|
|
931
|
-
loadingAssets: t,
|
|
932
|
-
erroredAssets: r,
|
|
933
|
-
usageBytes: n,
|
|
934
|
-
reclaimableBytes: a,
|
|
935
|
-
budgetBytes: this.budget,
|
|
936
|
-
overBudget: n > this.budget,
|
|
937
|
-
evictions: this.evictions,
|
|
938
|
-
hits: this.hits,
|
|
939
|
-
misses: this.misses
|
|
940
|
-
}, this.statsSnapshot;
|
|
941
|
-
}
|
|
942
|
-
subscribe(e) {
|
|
943
|
-
return this.listeners.add(e), () => {
|
|
944
|
-
this.listeners.delete(e);
|
|
945
|
-
};
|
|
946
|
-
}
|
|
947
|
-
usage() {
|
|
948
|
-
let e = 0;
|
|
949
|
-
for (const t of this.entries.values()) t.status === "ready" && (e += t.bytes);
|
|
950
|
-
return e;
|
|
951
|
-
}
|
|
952
|
-
enforceBudget() {
|
|
953
|
-
Number.isFinite(this.budget) && this.usage() > this.budget && this.evict();
|
|
954
|
-
}
|
|
955
|
-
disposeEntry(e, t) {
|
|
956
|
-
var r, n, a;
|
|
957
|
-
if (!t.disposed) {
|
|
958
|
-
if (t.disposed = !0, (r = t.controller) == null || r.abort(), t.status === "ready" && t.value !== void 0)
|
|
959
|
-
try {
|
|
960
|
-
(a = (n = t.definition).dispose) == null || a.call(n, t.value);
|
|
961
|
-
} catch (i) {
|
|
962
|
-
console.warn(`[xr-sdk assets] dispose threw for ${e}`, i);
|
|
963
|
-
}
|
|
964
|
-
this.entries.delete(e);
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
notify() {
|
|
968
|
-
this.statsSnapshot = null, this.listeners.forEach((e) => e());
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
const ve = (s, e) => ({
|
|
972
|
-
key: s,
|
|
973
|
-
status: e.status,
|
|
974
|
-
bytes: e.bytes,
|
|
975
|
-
owners: e.owners.size,
|
|
976
|
-
lastUsed: e.lastUsed,
|
|
977
|
-
error: e.error
|
|
978
|
-
}), rs = (s) => new ss(s);
|
|
979
|
-
let le;
|
|
980
|
-
const De = () => (le || (le = rs()), le), ue = (s) => {
|
|
981
|
-
if (!s) return 0;
|
|
982
|
-
const e = s.image;
|
|
983
|
-
if (!e) return 0;
|
|
984
|
-
const t = e.videoWidth || e.width || 0, r = e.videoHeight || e.height || 0;
|
|
985
|
-
if (!t || !r) return 0;
|
|
986
|
-
const n = s.isCompressedTexture, a = n ? 0.5 : s.type === $.FloatType ? 16 : 4, i = t * r * a;
|
|
987
|
-
return Math.round(s.generateMipmaps && !n ? i * 1.3334 : i);
|
|
988
|
-
}, as = (s) => {
|
|
989
|
-
if (!s) return 0;
|
|
990
|
-
let e = 0;
|
|
991
|
-
for (const t of Object.values(s.attributes)) {
|
|
992
|
-
const r = t.array;
|
|
993
|
-
r && (e += r.byteLength);
|
|
994
|
-
}
|
|
995
|
-
return s.index && (e += s.index.array.byteLength), e;
|
|
996
|
-
}, ns = [
|
|
997
|
-
"map",
|
|
998
|
-
"alphaMap",
|
|
999
|
-
"aoMap",
|
|
1000
|
-
"bumpMap",
|
|
1001
|
-
"displacementMap",
|
|
1002
|
-
"emissiveMap",
|
|
1003
|
-
"envMap",
|
|
1004
|
-
"lightMap",
|
|
1005
|
-
"metalnessMap",
|
|
1006
|
-
"normalMap",
|
|
1007
|
-
"roughnessMap",
|
|
1008
|
-
"specularMap"
|
|
1009
|
-
], Ie = (s) => {
|
|
1010
|
-
const e = [], t = s;
|
|
1011
|
-
for (const n of ns) {
|
|
1012
|
-
const a = t[n];
|
|
1013
|
-
a && a.isTexture && e.push(a);
|
|
1014
|
-
}
|
|
1015
|
-
const r = s.uniforms;
|
|
1016
|
-
if (r)
|
|
1017
|
-
for (const n of Object.values(r)) {
|
|
1018
|
-
const a = n == null ? void 0 : n.value;
|
|
1019
|
-
a && a.isTexture && e.push(a);
|
|
1020
|
-
}
|
|
1021
|
-
return e;
|
|
1022
|
-
}, is = (s) => {
|
|
1023
|
-
if (!s) return 0;
|
|
1024
|
-
const e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
|
|
1025
|
-
s.traverse((n) => {
|
|
1026
|
-
const a = n;
|
|
1027
|
-
a.geometry && e.add(a.geometry);
|
|
1028
|
-
const i = Array.isArray(a.material) ? a.material : a.material ? [a.material] : [];
|
|
1029
|
-
for (const o of i) Ie(o).forEach((c) => t.add(c));
|
|
1030
|
-
});
|
|
1031
|
-
let r = 0;
|
|
1032
|
-
return e.forEach((n) => {
|
|
1033
|
-
r += as(n);
|
|
1034
|
-
}), t.forEach((n) => {
|
|
1035
|
-
r += ue(n);
|
|
1036
|
-
}), r;
|
|
1037
|
-
}, we = (s) => {
|
|
1038
|
-
if (!s) return;
|
|
1039
|
-
const e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1040
|
-
s.traverse((n) => {
|
|
1041
|
-
const a = n;
|
|
1042
|
-
a.geometry && e.add(a.geometry);
|
|
1043
|
-
const i = Array.isArray(a.material) ? a.material : a.material ? [a.material] : [];
|
|
1044
|
-
for (const o of i)
|
|
1045
|
-
t.add(o), Ie(o).forEach((c) => r.add(c));
|
|
1046
|
-
}), r.forEach((n) => n.dispose()), t.forEach((n) => n.dispose()), e.forEach((n) => n.dispose()), s.removeFromParent();
|
|
1047
|
-
}, Le = async (s, e) => {
|
|
1048
|
-
if (rt(s)) return at(s, { signal: e });
|
|
1049
|
-
const t = await fetch(s, { signal: e });
|
|
1050
|
-
if (!t.ok) throw new Error(`Asset fetch failed (${t.status}): ${s}`);
|
|
1051
|
-
return t.arrayBuffer();
|
|
1052
|
-
}, Oe = (s) => new Promise((e, t) => {
|
|
1053
|
-
const r = () => t(new DOMException("Asset load aborted", "AbortError"));
|
|
1054
|
-
s.aborted ? r() : s.addEventListener("abort", r, { once: !0 });
|
|
1055
|
-
}), tr = (s, e = {}) => ({
|
|
1056
|
-
key: `texture:${s}${e.variant ? `#${e.variant}` : ""}`,
|
|
1057
|
-
load: async (t) => {
|
|
1058
|
-
const r = await Le(s, t), n = new Blob([r]), a = createImageBitmap(n, {
|
|
1059
|
-
imageOrientation: e.flipY === !1 ? "none" : "flipY"
|
|
1060
|
-
}), i = await Promise.race([a, Oe(t)]).catch((c) => {
|
|
1061
|
-
throw a.then((l) => l.close()).catch(() => {
|
|
1062
|
-
}), c;
|
|
1063
|
-
}), o = new $.Texture(i);
|
|
1064
|
-
return o.flipY = !1, o.colorSpace = e.colorSpace ?? $.SRGBColorSpace, o.generateMipmaps = e.generateMipmaps ?? !0, o.minFilter = o.generateMipmaps ? $.LinearMipmapLinearFilter : $.LinearFilter, o.needsUpdate = !0, o;
|
|
1065
|
-
},
|
|
1066
|
-
dispose: (t) => {
|
|
1067
|
-
var n;
|
|
1068
|
-
const r = t.image;
|
|
1069
|
-
t.dispose(), (n = r == null ? void 0 : r.close) == null || n.call(r);
|
|
1070
|
-
},
|
|
1071
|
-
bytes: ue
|
|
1072
|
-
}), sr = (s) => ({
|
|
1073
|
-
key: `gltf:${s}`,
|
|
1074
|
-
load: async (e) => {
|
|
1075
|
-
const t = await Le(s, e), r = new vt(), n = s.slice(0, s.lastIndexOf("/") + 1), a = r.parseAsync(t, n);
|
|
1076
|
-
return Promise.race([a, Oe(e)]).catch((i) => {
|
|
1077
|
-
throw a.then((o) => we(o.scene)).catch(() => {
|
|
1078
|
-
}), i;
|
|
1079
|
-
});
|
|
1080
|
-
},
|
|
1081
|
-
dispose: (e) => we(e.scene),
|
|
1082
|
-
bytes: (e) => is(e.scene)
|
|
1083
|
-
}), rr = (s, e = {}) => ({
|
|
1084
|
-
key: `video:${s}`,
|
|
1085
|
-
load: (t) => new Promise((r, n) => {
|
|
1086
|
-
const a = document.createElement("video");
|
|
1087
|
-
a.src = s, a.loop = e.loop ?? !0, a.muted = e.muted ?? !0, a.playsInline = !0, a.crossOrigin = e.crossOrigin ?? "anonymous", a.preload = "auto";
|
|
1088
|
-
const i = (o) => {
|
|
1089
|
-
a.removeAttribute("src"), a.load(), n(o instanceof Error ? o : new Error(`Video failed to load: ${s}`));
|
|
1090
|
-
};
|
|
1091
|
-
t.addEventListener(
|
|
1092
|
-
"abort",
|
|
1093
|
-
() => i(new DOMException("Asset load aborted", "AbortError")),
|
|
1094
|
-
{
|
|
1095
|
-
once: !0
|
|
1096
|
-
}
|
|
1097
|
-
), a.onerror = () => i(a.error), a.onloadeddata = () => {
|
|
1098
|
-
const o = new $.VideoTexture(a);
|
|
1099
|
-
o.colorSpace = $.SRGBColorSpace, r({ video: a, texture: o });
|
|
1100
|
-
}, a.load();
|
|
1101
|
-
}),
|
|
1102
|
-
dispose: ({ video: t, texture: r }) => {
|
|
1103
|
-
r.dispose(), t.pause(), t.removeAttribute("src"), t.load();
|
|
1104
|
-
},
|
|
1105
|
-
bytes: ({ texture: t }) => ue(t)
|
|
1106
|
-
}), Ge = mt(null), ar = ({
|
|
1107
|
-
cache: s,
|
|
1108
|
-
disposeUnreferencedOnUnmount: e = !0,
|
|
1109
|
-
children: t
|
|
785
|
+
}, ws = (e, t) => e.find((s) => s.facing === t) ?? null, _e = Ve(null), Ns = ({
|
|
786
|
+
cache: e,
|
|
787
|
+
disposeUnreferencedOnUnmount: t = !0,
|
|
788
|
+
children: s
|
|
1110
789
|
}) => {
|
|
1111
|
-
const r =
|
|
790
|
+
const r = e ?? ke();
|
|
1112
791
|
return x(() => () => {
|
|
1113
|
-
|
|
1114
|
-
}, [r,
|
|
1115
|
-
},
|
|
1116
|
-
const { enabled:
|
|
792
|
+
t && r.disposeUnreferenced();
|
|
793
|
+
}, [r, t]), /* @__PURE__ */ M(_e.Provider, { value: r, children: s });
|
|
794
|
+
}, xe = () => je(_e) ?? ke(), Us = (e, t = {}) => {
|
|
795
|
+
const { enabled: s = !0 } = t, r = xe(), a = Ze(), n = (e == null ? void 0 : e.key) ?? null, [i, c] = k({
|
|
1117
796
|
value: null,
|
|
1118
797
|
status: "idle",
|
|
1119
798
|
error: null
|
|
1120
799
|
});
|
|
1121
800
|
return x(() => {
|
|
1122
|
-
if (!
|
|
1123
|
-
|
|
801
|
+
if (!e || !s) {
|
|
802
|
+
c({ value: null, status: "idle", error: null });
|
|
1124
803
|
return;
|
|
1125
804
|
}
|
|
1126
|
-
let
|
|
1127
|
-
const l = r.get(
|
|
1128
|
-
return
|
|
1129
|
-
|
|
1130
|
-
}).catch((
|
|
1131
|
-
|
|
805
|
+
let o = !0;
|
|
806
|
+
const l = r.get(e.key);
|
|
807
|
+
return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }), r.acquire(e, a).then((h) => {
|
|
808
|
+
o && c({ value: h, status: "ready", error: null });
|
|
809
|
+
}).catch((h) => {
|
|
810
|
+
o && c({ value: null, status: "error", error: h });
|
|
1132
811
|
}), () => {
|
|
1133
|
-
|
|
812
|
+
o = !1, r.release(e.key, a);
|
|
1134
813
|
};
|
|
1135
|
-
}, [r,
|
|
1136
|
-
},
|
|
1137
|
-
const
|
|
1138
|
-
return
|
|
1139
|
-
(r) =>
|
|
1140
|
-
() =>
|
|
1141
|
-
() =>
|
|
814
|
+
}, [r, n, s, a]), i;
|
|
815
|
+
}, Ds = (e) => {
|
|
816
|
+
const t = xe(), s = e ?? t;
|
|
817
|
+
return Ye(
|
|
818
|
+
(r) => s.subscribe(r),
|
|
819
|
+
() => s.getStats(),
|
|
820
|
+
() => s.getStats()
|
|
1142
821
|
);
|
|
1143
|
-
},
|
|
1144
|
-
version:
|
|
822
|
+
}, ae = 1, we = Object.freeze({
|
|
823
|
+
version: ae,
|
|
1145
824
|
trackers: {
|
|
1146
825
|
face: { enabled: !0, numFaces: 1, targetFps: null, holdMs: 250, predictMs: 0, smoothing: 0 },
|
|
1147
826
|
hand: { enabled: !1, targetFps: null },
|
|
@@ -1168,13 +847,13 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
|
|
|
1168
847
|
fallbacks: { onUnsupported: "degrade", delegate: "auto" },
|
|
1169
848
|
assets: { holisticModelUrl: null, semanticSegmentationModelUrl: null },
|
|
1170
849
|
updatedAt: 0
|
|
1171
|
-
}),
|
|
1172
|
-
if (
|
|
1173
|
-
if (typeof
|
|
1174
|
-
return
|
|
1175
|
-
const i = Math.min(r, Math.max(
|
|
1176
|
-
return i !==
|
|
1177
|
-
},
|
|
850
|
+
}), U = (e, t, s, r, a, n) => {
|
|
851
|
+
if (e === void 0) return t;
|
|
852
|
+
if (typeof e != "number" || !Number.isFinite(e))
|
|
853
|
+
return n(`${a}: not a number, kept ${t}`), t;
|
|
854
|
+
const i = Math.min(r, Math.max(s, e));
|
|
855
|
+
return i !== e && n(`${a}: ${e} clamped to ${i}`), i;
|
|
856
|
+
}, j = (e, t, s, r) => e === void 0 ? t : e === null ? null : typeof e != "number" || !Number.isFinite(e) || e <= 0 ? (r(`${s}: invalid fps, kept ${t}`), t) : (e > 120 && r(`${s}: ${e} clamped to 120`), Math.min(120, e)), Ot = [
|
|
1178
857
|
"tiers",
|
|
1179
858
|
"budget",
|
|
1180
859
|
"initialTier",
|
|
@@ -1182,34 +861,34 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
|
|
|
1182
861
|
"maxTier",
|
|
1183
862
|
"adaptive",
|
|
1184
863
|
"historySize"
|
|
1185
|
-
],
|
|
1186
|
-
const
|
|
1187
|
-
for (const
|
|
1188
|
-
return
|
|
1189
|
-
}, I = (
|
|
1190
|
-
var
|
|
1191
|
-
const r = (
|
|
864
|
+
], Ee = (e) => {
|
|
865
|
+
const t = {};
|
|
866
|
+
for (const s of Ot) e[s] !== void 0 && (t[s] = e[s]);
|
|
867
|
+
return t;
|
|
868
|
+
}, I = (e, t, s, r) => e === void 0 ? t : typeof e != "boolean" ? (r(`${s}: not a boolean, kept ${t}`), t) : e, B = (e, t, s, r, a) => e === void 0 ? s : t.includes(e) ? e : (a(`${r}: "${String(e)}" is not one of ${t.join(" | ")}, kept ${s}`), s), Re = (e, t, s, r) => e === void 0 ? t : e === null ? null : typeof e != "string" || !/^https?:\/\//.test(e) ? (r(`${s}: not an http(s) URL, kept ${t === null ? "the SDK default" : t}`), t) : e, K = (e = {}, t = we, s = []) => {
|
|
869
|
+
var c, o, l, h, d, m, u, p, S, E, f, g, b, X, A, w, G, Y, J, Q, ee, z, y, C, T, _, H, W, P, $, le, ue, de, me, pe, fe, he, ge;
|
|
870
|
+
const r = (De) => s.push(De), a = e.trackers ?? {}, n = t.trackers, i = e.quality === void 0 ? t.quality === !1 ? !1 : Ee(t.quality) : e.quality === !1 ? !1 : typeof e.quality == "object" && e.quality !== null ? Ee(e.quality) : (r("quality: must be an object or false, kept base"), t.quality);
|
|
1192
871
|
return {
|
|
1193
|
-
version:
|
|
872
|
+
version: ae,
|
|
1194
873
|
trackers: {
|
|
1195
874
|
face: {
|
|
1196
|
-
enabled: I((
|
|
875
|
+
enabled: I((c = a.face) == null ? void 0 : c.enabled, n.face.enabled, "trackers.face.enabled", r),
|
|
1197
876
|
numFaces: Math.round(
|
|
1198
|
-
|
|
877
|
+
U((o = a.face) == null ? void 0 : o.numFaces, n.face.numFaces, 1, 10, "trackers.face.numFaces", r)
|
|
1199
878
|
),
|
|
1200
|
-
targetFps:
|
|
1201
|
-
holdMs:
|
|
1202
|
-
predictMs:
|
|
1203
|
-
(
|
|
1204
|
-
|
|
879
|
+
targetFps: j((l = a.face) == null ? void 0 : l.targetFps, n.face.targetFps, "trackers.face.targetFps", r),
|
|
880
|
+
holdMs: U((h = a.face) == null ? void 0 : h.holdMs, n.face.holdMs, 0, 5e3, "trackers.face.holdMs", r),
|
|
881
|
+
predictMs: U(
|
|
882
|
+
(d = a.face) == null ? void 0 : d.predictMs,
|
|
883
|
+
n.face.predictMs,
|
|
1205
884
|
0,
|
|
1206
885
|
1e3,
|
|
1207
886
|
"trackers.face.predictMs",
|
|
1208
887
|
r
|
|
1209
888
|
),
|
|
1210
|
-
smoothing:
|
|
1211
|
-
(m =
|
|
1212
|
-
|
|
889
|
+
smoothing: U(
|
|
890
|
+
(m = a.face) == null ? void 0 : m.smoothing,
|
|
891
|
+
n.face.smoothing,
|
|
1213
892
|
0,
|
|
1214
893
|
100,
|
|
1215
894
|
"trackers.face.smoothing",
|
|
@@ -1217,57 +896,57 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
|
|
|
1217
896
|
)
|
|
1218
897
|
},
|
|
1219
898
|
hand: {
|
|
1220
|
-
enabled: I((
|
|
1221
|
-
targetFps:
|
|
899
|
+
enabled: I((u = a.hand) == null ? void 0 : u.enabled, n.hand.enabled, "trackers.hand.enabled", r),
|
|
900
|
+
targetFps: j((p = a.hand) == null ? void 0 : p.targetFps, n.hand.targetFps, "trackers.hand.targetFps", r)
|
|
1222
901
|
},
|
|
1223
902
|
gesture: {
|
|
1224
|
-
enabled: I((
|
|
1225
|
-
targetFps:
|
|
1226
|
-
(
|
|
1227
|
-
|
|
903
|
+
enabled: I((S = a.gesture) == null ? void 0 : S.enabled, n.gesture.enabled, "trackers.gesture.enabled", r),
|
|
904
|
+
targetFps: j(
|
|
905
|
+
(E = a.gesture) == null ? void 0 : E.targetFps,
|
|
906
|
+
n.gesture.targetFps,
|
|
1228
907
|
"trackers.gesture.targetFps",
|
|
1229
908
|
r
|
|
1230
909
|
)
|
|
1231
910
|
},
|
|
1232
911
|
body: {
|
|
1233
|
-
enabled: I((
|
|
1234
|
-
targetFps:
|
|
912
|
+
enabled: I((f = a.body) == null ? void 0 : f.enabled, n.body.enabled, "trackers.body.enabled", r),
|
|
913
|
+
targetFps: j((g = a.body) == null ? void 0 : g.targetFps, n.body.targetFps, "trackers.body.targetFps", r)
|
|
1235
914
|
},
|
|
1236
915
|
holistic: {
|
|
1237
|
-
enabled: I((
|
|
1238
|
-
targetFps:
|
|
1239
|
-
(
|
|
1240
|
-
|
|
916
|
+
enabled: I((b = a.holistic) == null ? void 0 : b.enabled, n.holistic.enabled, "trackers.holistic.enabled", r),
|
|
917
|
+
targetFps: j(
|
|
918
|
+
(X = a.holistic) == null ? void 0 : X.targetFps,
|
|
919
|
+
n.holistic.targetFps,
|
|
1241
920
|
"trackers.holistic.targetFps",
|
|
1242
921
|
r
|
|
1243
922
|
),
|
|
1244
923
|
hands: B(
|
|
1245
|
-
(
|
|
924
|
+
(A = a.holistic) == null ? void 0 : A.hands,
|
|
1246
925
|
["both", "left", "right", "none"],
|
|
1247
|
-
|
|
926
|
+
n.holistic.hands,
|
|
1248
927
|
"trackers.holistic.hands",
|
|
1249
928
|
r
|
|
1250
929
|
),
|
|
1251
|
-
holdMs:
|
|
1252
|
-
(
|
|
1253
|
-
|
|
930
|
+
holdMs: U(
|
|
931
|
+
(w = a.holistic) == null ? void 0 : w.holdMs,
|
|
932
|
+
n.holistic.holdMs,
|
|
1254
933
|
0,
|
|
1255
934
|
5e3,
|
|
1256
935
|
"trackers.holistic.holdMs",
|
|
1257
936
|
r
|
|
1258
937
|
),
|
|
1259
|
-
predictMs:
|
|
1260
|
-
(G =
|
|
1261
|
-
|
|
938
|
+
predictMs: U(
|
|
939
|
+
(G = a.holistic) == null ? void 0 : G.predictMs,
|
|
940
|
+
n.holistic.predictMs,
|
|
1262
941
|
0,
|
|
1263
942
|
1e3,
|
|
1264
943
|
"trackers.holistic.predictMs",
|
|
1265
944
|
r
|
|
1266
945
|
),
|
|
1267
946
|
analysisMaxDimension: Math.round(
|
|
1268
|
-
|
|
1269
|
-
(
|
|
1270
|
-
|
|
947
|
+
U(
|
|
948
|
+
(Y = a.holistic) == null ? void 0 : Y.analysisMaxDimension,
|
|
949
|
+
n.holistic.analysisMaxDimension,
|
|
1271
950
|
128,
|
|
1272
951
|
2048,
|
|
1273
952
|
"trackers.holistic.analysisMaxDimension",
|
|
@@ -1275,72 +954,72 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
|
|
|
1275
954
|
)
|
|
1276
955
|
),
|
|
1277
956
|
outputFaceBlendshapes: I(
|
|
1278
|
-
(J =
|
|
1279
|
-
|
|
957
|
+
(J = a.holistic) == null ? void 0 : J.outputFaceBlendshapes,
|
|
958
|
+
n.holistic.outputFaceBlendshapes,
|
|
1280
959
|
"trackers.holistic.outputFaceBlendshapes",
|
|
1281
960
|
r
|
|
1282
961
|
),
|
|
1283
|
-
confidence:
|
|
1284
|
-
(
|
|
1285
|
-
|
|
962
|
+
confidence: U(
|
|
963
|
+
(Q = a.holistic) == null ? void 0 : Q.confidence,
|
|
964
|
+
n.holistic.confidence,
|
|
1286
965
|
0,
|
|
1287
966
|
1,
|
|
1288
967
|
"trackers.holistic.confidence",
|
|
1289
968
|
r
|
|
1290
969
|
),
|
|
1291
970
|
delegate: B(
|
|
1292
|
-
(
|
|
971
|
+
(ee = a.holistic) == null ? void 0 : ee.delegate,
|
|
1293
972
|
["auto", "GPU", "CPU"],
|
|
1294
|
-
|
|
973
|
+
n.holistic.delegate,
|
|
1295
974
|
"trackers.holistic.delegate",
|
|
1296
975
|
r
|
|
1297
976
|
)
|
|
1298
977
|
},
|
|
1299
978
|
segmentation: {
|
|
1300
979
|
enabled: I(
|
|
1301
|
-
(
|
|
1302
|
-
|
|
980
|
+
(z = a.segmentation) == null ? void 0 : z.enabled,
|
|
981
|
+
n.segmentation.enabled,
|
|
1303
982
|
"trackers.segmentation.enabled",
|
|
1304
983
|
r
|
|
1305
984
|
),
|
|
1306
985
|
quality: B(
|
|
1307
|
-
(
|
|
986
|
+
(y = a.segmentation) == null ? void 0 : y.quality,
|
|
1308
987
|
["low", "medium", "high"],
|
|
1309
|
-
|
|
988
|
+
n.segmentation.quality,
|
|
1310
989
|
"trackers.segmentation.quality",
|
|
1311
990
|
r
|
|
1312
991
|
)
|
|
1313
992
|
},
|
|
1314
993
|
semanticSegmentation: {
|
|
1315
994
|
enabled: I(
|
|
1316
|
-
(
|
|
1317
|
-
|
|
995
|
+
(C = a.semanticSegmentation) == null ? void 0 : C.enabled,
|
|
996
|
+
n.semanticSegmentation.enabled,
|
|
1318
997
|
"trackers.semanticSegmentation.enabled",
|
|
1319
998
|
r
|
|
1320
999
|
),
|
|
1321
1000
|
preset: B(
|
|
1322
|
-
(
|
|
1323
|
-
|
|
1324
|
-
|
|
1001
|
+
(T = a.semanticSegmentation) == null ? void 0 : T.preset,
|
|
1002
|
+
lt,
|
|
1003
|
+
n.semanticSegmentation.preset,
|
|
1325
1004
|
"trackers.semanticSegmentation.preset",
|
|
1326
1005
|
r
|
|
1327
1006
|
),
|
|
1328
1007
|
quality: B(
|
|
1329
|
-
(_ =
|
|
1008
|
+
(_ = a.semanticSegmentation) == null ? void 0 : _.quality,
|
|
1330
1009
|
["low", "medium", "high"],
|
|
1331
|
-
|
|
1010
|
+
n.semanticSegmentation.quality,
|
|
1332
1011
|
"trackers.semanticSegmentation.quality",
|
|
1333
1012
|
r
|
|
1334
1013
|
)
|
|
1335
1014
|
}
|
|
1336
1015
|
},
|
|
1337
1016
|
perf: {
|
|
1338
|
-
targetFps:
|
|
1339
|
-
camRes: Math.round(
|
|
1340
|
-
cameraZoom:
|
|
1341
|
-
analysisScale:
|
|
1342
|
-
(
|
|
1343
|
-
|
|
1017
|
+
targetFps: U((H = e.perf) == null ? void 0 : H.targetFps, t.perf.targetFps, 0, 120, "perf.targetFps", r),
|
|
1018
|
+
camRes: Math.round(U((W = e.perf) == null ? void 0 : W.camRes, t.perf.camRes, 160, 3840, "perf.camRes", r)),
|
|
1019
|
+
cameraZoom: U((P = e.perf) == null ? void 0 : P.cameraZoom, t.perf.cameraZoom, 1, 3, "perf.cameraZoom", r),
|
|
1020
|
+
analysisScale: U(
|
|
1021
|
+
($ = e.perf) == null ? void 0 : $.analysisScale,
|
|
1022
|
+
t.perf.analysisScale,
|
|
1344
1023
|
0.25,
|
|
1345
1024
|
1,
|
|
1346
1025
|
"perf.analysisScale",
|
|
@@ -1349,8 +1028,8 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
|
|
|
1349
1028
|
},
|
|
1350
1029
|
lifecycle: {
|
|
1351
1030
|
pauseWhenHidden: I(
|
|
1352
|
-
(
|
|
1353
|
-
|
|
1031
|
+
(le = e.lifecycle) == null ? void 0 : le.pauseWhenHidden,
|
|
1032
|
+
t.lifecycle.pauseWhenHidden,
|
|
1354
1033
|
"lifecycle.pauseWhenHidden",
|
|
1355
1034
|
r
|
|
1356
1035
|
)
|
|
@@ -1358,71 +1037,71 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
|
|
|
1358
1037
|
quality: i,
|
|
1359
1038
|
camera: {
|
|
1360
1039
|
facingMode: B(
|
|
1361
|
-
(
|
|
1040
|
+
(ue = e.camera) == null ? void 0 : ue.facingMode,
|
|
1362
1041
|
["user", "environment"],
|
|
1363
|
-
|
|
1042
|
+
t.camera.facingMode,
|
|
1364
1043
|
"camera.facingMode",
|
|
1365
1044
|
r
|
|
1366
1045
|
),
|
|
1367
|
-
deviceId: ((
|
|
1368
|
-
mirrored: ((
|
|
1046
|
+
deviceId: ((de = e.camera) == null ? void 0 : de.deviceId) === void 0 ? t.camera.deviceId : typeof e.camera.deviceId == "string" || e.camera.deviceId === null ? e.camera.deviceId : (r("camera.deviceId: not a string, kept base"), t.camera.deviceId),
|
|
1047
|
+
mirrored: ((me = e.camera) == null ? void 0 : me.mirrored) === void 0 ? t.camera.mirrored : e.camera.mirrored === "auto" || typeof e.camera.mirrored == "boolean" ? e.camera.mirrored : (r('camera.mirrored: must be boolean or "auto", kept base'), t.camera.mirrored)
|
|
1369
1048
|
},
|
|
1370
1049
|
fallbacks: {
|
|
1371
1050
|
onUnsupported: B(
|
|
1372
|
-
(
|
|
1051
|
+
(pe = e.fallbacks) == null ? void 0 : pe.onUnsupported,
|
|
1373
1052
|
["block", "degrade"],
|
|
1374
|
-
|
|
1053
|
+
t.fallbacks.onUnsupported,
|
|
1375
1054
|
"fallbacks.onUnsupported",
|
|
1376
1055
|
r
|
|
1377
1056
|
),
|
|
1378
1057
|
delegate: B(
|
|
1379
|
-
(
|
|
1058
|
+
(fe = e.fallbacks) == null ? void 0 : fe.delegate,
|
|
1380
1059
|
["auto", "GPU", "CPU"],
|
|
1381
|
-
|
|
1060
|
+
t.fallbacks.delegate,
|
|
1382
1061
|
"fallbacks.delegate",
|
|
1383
1062
|
r
|
|
1384
1063
|
)
|
|
1385
1064
|
},
|
|
1386
1065
|
assets: {
|
|
1387
|
-
holisticModelUrl:
|
|
1388
|
-
(
|
|
1389
|
-
|
|
1066
|
+
holisticModelUrl: Re(
|
|
1067
|
+
(he = e.assets) == null ? void 0 : he.holisticModelUrl,
|
|
1068
|
+
t.assets.holisticModelUrl,
|
|
1390
1069
|
"assets.holisticModelUrl",
|
|
1391
1070
|
r
|
|
1392
1071
|
),
|
|
1393
|
-
semanticSegmentationModelUrl:
|
|
1394
|
-
(
|
|
1395
|
-
|
|
1072
|
+
semanticSegmentationModelUrl: Re(
|
|
1073
|
+
(ge = e.assets) == null ? void 0 : ge.semanticSegmentationModelUrl,
|
|
1074
|
+
t.assets.semanticSegmentationModelUrl,
|
|
1396
1075
|
"assets.semanticSegmentationModelUrl",
|
|
1397
1076
|
r
|
|
1398
1077
|
)
|
|
1399
1078
|
},
|
|
1400
|
-
updatedAt: typeof
|
|
1079
|
+
updatedAt: typeof e.updatedAt == "number" && Number.isFinite(e.updatedAt) ? e.updatedAt : t.updatedAt
|
|
1401
1080
|
};
|
|
1402
|
-
},
|
|
1403
|
-
const
|
|
1404
|
-
let
|
|
1405
|
-
if (typeof
|
|
1081
|
+
}, be = (e, t, s = Date.now()) => K({ ...t, updatedAt: s }, e), Ne = (e) => JSON.stringify(K({}, e)), Ue = (e) => {
|
|
1082
|
+
const t = [];
|
|
1083
|
+
let s = e;
|
|
1084
|
+
if (typeof e == "string")
|
|
1406
1085
|
try {
|
|
1407
|
-
|
|
1086
|
+
s = JSON.parse(e);
|
|
1408
1087
|
} catch {
|
|
1409
1088
|
return {
|
|
1410
|
-
config:
|
|
1089
|
+
config: K(),
|
|
1411
1090
|
migrated: !0,
|
|
1412
1091
|
warnings: ["not valid JSON; defaults used"]
|
|
1413
1092
|
};
|
|
1414
1093
|
}
|
|
1415
|
-
if (!
|
|
1094
|
+
if (!s || typeof s != "object")
|
|
1416
1095
|
return {
|
|
1417
|
-
config:
|
|
1096
|
+
config: K(),
|
|
1418
1097
|
migrated: !0,
|
|
1419
1098
|
warnings: ["not an object; defaults used"]
|
|
1420
1099
|
};
|
|
1421
|
-
const r =
|
|
1422
|
-
return
|
|
1423
|
-
`migrated from version ${String(r.version ?? "none")} to ${
|
|
1424
|
-
), { config:
|
|
1425
|
-
},
|
|
1100
|
+
const r = s, a = r.version !== ae;
|
|
1101
|
+
return a && t.push(
|
|
1102
|
+
`migrated from version ${String(r.version ?? "none")} to ${ae}`
|
|
1103
|
+
), { config: K(r, we, t), migrated: a, warnings: t };
|
|
1104
|
+
}, Ps = [
|
|
1426
1105
|
"face",
|
|
1427
1106
|
"hand",
|
|
1428
1107
|
"gesture",
|
|
@@ -1430,64 +1109,64 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
|
|
|
1430
1109
|
"holistic",
|
|
1431
1110
|
"segmentation",
|
|
1432
1111
|
"semanticSegmentation"
|
|
1433
|
-
],
|
|
1112
|
+
], Gt = (e) => ({
|
|
1434
1113
|
perf: {
|
|
1435
|
-
targetFps:
|
|
1436
|
-
camRes:
|
|
1437
|
-
cameraZoom:
|
|
1438
|
-
analysisScale:
|
|
1114
|
+
targetFps: e.perf.targetFps > 0 ? e.perf.targetFps : void 0,
|
|
1115
|
+
camRes: e.perf.camRes,
|
|
1116
|
+
cameraZoom: e.perf.cameraZoom,
|
|
1117
|
+
analysisScale: e.perf.analysisScale
|
|
1439
1118
|
},
|
|
1440
|
-
lifecycle: { pauseWhenHidden:
|
|
1441
|
-
quality:
|
|
1442
|
-
}),
|
|
1443
|
-
facingMode:
|
|
1444
|
-
...
|
|
1445
|
-
...
|
|
1446
|
-
}), O = (
|
|
1447
|
-
const
|
|
1119
|
+
lifecycle: { pauseWhenHidden: e.lifecycle.pauseWhenHidden },
|
|
1120
|
+
quality: e.quality
|
|
1121
|
+
}), qt = (e) => ({
|
|
1122
|
+
facingMode: e.camera.facingMode,
|
|
1123
|
+
...e.camera.deviceId ? { deviceId: e.camera.deviceId } : {},
|
|
1124
|
+
...e.camera.mirrored === "auto" ? {} : { mirrored: e.camera.mirrored }
|
|
1125
|
+
}), O = (e) => e === null ? {} : { targetFps: e }, Bt = (e, t) => {
|
|
1126
|
+
const s = e.trackers;
|
|
1448
1127
|
return {
|
|
1449
1128
|
face: {
|
|
1450
|
-
numFaces:
|
|
1451
|
-
...O(
|
|
1452
|
-
holdMs:
|
|
1453
|
-
predictMs:
|
|
1454
|
-
active:
|
|
1129
|
+
numFaces: s.face.numFaces,
|
|
1130
|
+
...O(s.face.targetFps),
|
|
1131
|
+
holdMs: s.face.holdMs,
|
|
1132
|
+
predictMs: s.face.predictMs,
|
|
1133
|
+
active: s.face.enabled
|
|
1455
1134
|
},
|
|
1456
|
-
hand: { ...O(
|
|
1457
|
-
gesture: { ...O(
|
|
1458
|
-
body: { active:
|
|
1135
|
+
hand: { ...O(s.hand.targetFps), active: s.hand.enabled },
|
|
1136
|
+
gesture: { ...O(s.gesture.targetFps), active: s.gesture.enabled },
|
|
1137
|
+
body: { active: s.body.enabled },
|
|
1459
1138
|
holistic: {
|
|
1460
|
-
...O(
|
|
1461
|
-
hands:
|
|
1462
|
-
holdMs:
|
|
1463
|
-
predictMs:
|
|
1464
|
-
analysisMaxDimension:
|
|
1465
|
-
outputFaceBlendshapes:
|
|
1466
|
-
delegate:
|
|
1467
|
-
...
|
|
1468
|
-
active:
|
|
1139
|
+
...O(s.holistic.targetFps),
|
|
1140
|
+
hands: s.holistic.hands,
|
|
1141
|
+
holdMs: s.holistic.holdMs,
|
|
1142
|
+
predictMs: s.holistic.predictMs,
|
|
1143
|
+
analysisMaxDimension: s.holistic.analysisMaxDimension,
|
|
1144
|
+
outputFaceBlendshapes: s.holistic.outputFaceBlendshapes,
|
|
1145
|
+
delegate: s.holistic.delegate === "auto" ? e.fallbacks.delegate : s.holistic.delegate,
|
|
1146
|
+
...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {},
|
|
1147
|
+
active: s.holistic.enabled
|
|
1469
1148
|
},
|
|
1470
|
-
segmentation: { quality:
|
|
1149
|
+
segmentation: { quality: s.segmentation.quality, active: s.segmentation.enabled },
|
|
1471
1150
|
semanticSegmentation: {
|
|
1472
|
-
preset:
|
|
1473
|
-
quality:
|
|
1474
|
-
...
|
|
1475
|
-
active:
|
|
1151
|
+
preset: s.semanticSegmentation.preset,
|
|
1152
|
+
quality: s.semanticSegmentation.quality,
|
|
1153
|
+
...e.assets.semanticSegmentationModelUrl ? { modelUrl: e.assets.semanticSegmentationModelUrl } : {},
|
|
1154
|
+
active: s.semanticSegmentation.enabled
|
|
1476
1155
|
}
|
|
1477
|
-
}[
|
|
1478
|
-
},
|
|
1479
|
-
const
|
|
1480
|
-
switch (
|
|
1481
|
-
case
|
|
1482
|
-
return { numFaces:
|
|
1483
|
-
case
|
|
1484
|
-
return { ...O(
|
|
1485
|
-
case
|
|
1486
|
-
return { ...O(
|
|
1487
|
-
case
|
|
1488
|
-
return { ...O(
|
|
1489
|
-
case
|
|
1490
|
-
const r =
|
|
1156
|
+
}[t];
|
|
1157
|
+
}, Kt = (e, t) => {
|
|
1158
|
+
const s = e.trackers;
|
|
1159
|
+
switch (t) {
|
|
1160
|
+
case v.FACE_TRACKER:
|
|
1161
|
+
return { numFaces: s.face.numFaces, ...O(s.face.targetFps) };
|
|
1162
|
+
case v.HAND_TRACKER:
|
|
1163
|
+
return { ...O(s.hand.targetFps) };
|
|
1164
|
+
case v.GESTURE_TRACKER:
|
|
1165
|
+
return { ...O(s.gesture.targetFps) };
|
|
1166
|
+
case v.BODY_TRACKER:
|
|
1167
|
+
return { ...O(s.body.targetFps) };
|
|
1168
|
+
case v.HOLISTIC_TRACKER: {
|
|
1169
|
+
const r = s.holistic;
|
|
1491
1170
|
return {
|
|
1492
1171
|
...O(r.targetFps),
|
|
1493
1172
|
hands: r.hands,
|
|
@@ -1500,271 +1179,276 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
|
|
|
1500
1179
|
minPoseDetectionConfidence: r.confidence,
|
|
1501
1180
|
minPosePresenceConfidence: r.confidence,
|
|
1502
1181
|
minHandLandmarksConfidence: r.confidence,
|
|
1503
|
-
delegate: r.delegate === "auto" ?
|
|
1504
|
-
...
|
|
1182
|
+
delegate: r.delegate === "auto" ? e.fallbacks.delegate : r.delegate,
|
|
1183
|
+
...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {}
|
|
1505
1184
|
};
|
|
1506
1185
|
}
|
|
1507
|
-
case
|
|
1508
|
-
return { quality:
|
|
1509
|
-
case
|
|
1186
|
+
case v.BACKGROUND_SEGMENTATION:
|
|
1187
|
+
return { quality: s.segmentation.quality };
|
|
1188
|
+
case v.SEMANTIC_SEGMENTATION:
|
|
1510
1189
|
return {
|
|
1511
|
-
preset:
|
|
1512
|
-
quality:
|
|
1513
|
-
...
|
|
1190
|
+
preset: s.semanticSegmentation.preset,
|
|
1191
|
+
quality: s.semanticSegmentation.quality,
|
|
1192
|
+
...e.assets.semanticSegmentationModelUrl ? { modelUrl: e.assets.semanticSegmentationModelUrl } : {}
|
|
1514
1193
|
};
|
|
1515
1194
|
default:
|
|
1516
1195
|
return {};
|
|
1517
1196
|
}
|
|
1518
|
-
},
|
|
1519
|
-
const
|
|
1520
|
-
return
|
|
1521
|
-
},
|
|
1197
|
+
}, Wt = (e) => {
|
|
1198
|
+
const t = e.trackers, s = [];
|
|
1199
|
+
return t.face.enabled && s.push(v.FACE_TRACKER), t.hand.enabled && s.push(v.HAND_TRACKER), t.gesture.enabled && s.push(v.GESTURE_TRACKER), t.body.enabled && s.push(v.BODY_TRACKER), t.holistic.enabled && s.push(v.HOLISTIC_TRACKER), t.segmentation.enabled && s.push(v.BACKGROUND_SEGMENTATION), t.semanticSegmentation.enabled && s.push(v.SEMANTIC_SEGMENTATION), s;
|
|
1200
|
+
}, ne = "vincentt.xr.tracking-config", ce = () => {
|
|
1522
1201
|
try {
|
|
1523
1202
|
return typeof localStorage < "u" ? localStorage : null;
|
|
1524
1203
|
} catch {
|
|
1525
1204
|
return null;
|
|
1526
1205
|
}
|
|
1527
|
-
},
|
|
1528
|
-
if (!
|
|
1206
|
+
}, Xt = (e = ne, t = ce()) => {
|
|
1207
|
+
if (!t) return null;
|
|
1529
1208
|
try {
|
|
1530
|
-
const
|
|
1531
|
-
return
|
|
1209
|
+
const s = t.getItem(e);
|
|
1210
|
+
return s ? Ue(s) : null;
|
|
1532
1211
|
} catch {
|
|
1533
1212
|
return null;
|
|
1534
1213
|
}
|
|
1535
|
-
},
|
|
1536
|
-
if (!
|
|
1214
|
+
}, Ae = (e, t = ne, s = ce()) => {
|
|
1215
|
+
if (!s) return !1;
|
|
1537
1216
|
try {
|
|
1538
|
-
return
|
|
1217
|
+
return s.setItem(t, Ne(e)), !0;
|
|
1539
1218
|
} catch {
|
|
1540
1219
|
return !1;
|
|
1541
1220
|
}
|
|
1542
|
-
},
|
|
1543
|
-
if (
|
|
1221
|
+
}, Ht = (e = ne, t = ce()) => {
|
|
1222
|
+
if (t)
|
|
1544
1223
|
try {
|
|
1545
|
-
|
|
1224
|
+
t.removeItem(e);
|
|
1546
1225
|
} catch {
|
|
1547
1226
|
}
|
|
1548
|
-
},
|
|
1549
|
-
const { storageKey:
|
|
1227
|
+
}, Is = (e = {}) => {
|
|
1228
|
+
const { storageKey: t = ne, persist: s = !0 } = e, r = e.storage, a = F(e.initial), n = Z(() => K(a.current ?? {}), []), [i, c] = k(n), [o, l] = k([]), [h, d] = k(!s), m = F(i);
|
|
1550
1229
|
m.current = i, x(() => {
|
|
1551
|
-
if (!
|
|
1552
|
-
|
|
1230
|
+
if (!s) {
|
|
1231
|
+
d(!0);
|
|
1553
1232
|
return;
|
|
1554
1233
|
}
|
|
1555
|
-
const
|
|
1556
|
-
if (
|
|
1557
|
-
const g =
|
|
1558
|
-
m.current = g,
|
|
1234
|
+
const f = Xt(t, r);
|
|
1235
|
+
if (f) {
|
|
1236
|
+
const g = K(f.config, n);
|
|
1237
|
+
m.current = g, c(g), l(f.warnings), f.migrated && Ae(g, t, r);
|
|
1559
1238
|
}
|
|
1560
|
-
|
|
1561
|
-
}, [
|
|
1562
|
-
const
|
|
1563
|
-
(
|
|
1564
|
-
[
|
|
1565
|
-
),
|
|
1566
|
-
(
|
|
1567
|
-
const g = [],
|
|
1568
|
-
return
|
|
1239
|
+
d(!0);
|
|
1240
|
+
}, [s, t, r, n]);
|
|
1241
|
+
const u = R(
|
|
1242
|
+
(f, g) => (m.current = f, c(f), l(g), s && Ae(f, t, r), f),
|
|
1243
|
+
[s, t, r]
|
|
1244
|
+
), p = R(
|
|
1245
|
+
(f) => {
|
|
1246
|
+
const g = [], b = K({ ...f, updatedAt: Date.now() }, m.current, g);
|
|
1247
|
+
return u(b, g);
|
|
1569
1248
|
},
|
|
1570
|
-
[
|
|
1571
|
-
),
|
|
1572
|
-
const
|
|
1573
|
-
return m.current =
|
|
1574
|
-
}, [
|
|
1575
|
-
(
|
|
1576
|
-
const g =
|
|
1577
|
-
return g.warnings.some((
|
|
1249
|
+
[u]
|
|
1250
|
+
), S = R(() => {
|
|
1251
|
+
const f = be(n, {}, 0);
|
|
1252
|
+
return m.current = f, c(f), l([]), s && Ht(t, r), f;
|
|
1253
|
+
}, [n, s, t, r]), E = R(
|
|
1254
|
+
(f) => {
|
|
1255
|
+
const g = Ue(f);
|
|
1256
|
+
return g.warnings.some((b) => b.startsWith("not valid JSON") || b.startsWith("not an object")) ? (l([`import: ${g.warnings[0]}; config unchanged`]), m.current) : u(be(g.config, {}, Date.now()), g.warnings);
|
|
1578
1257
|
},
|
|
1579
|
-
[
|
|
1258
|
+
[u]
|
|
1580
1259
|
);
|
|
1581
|
-
return
|
|
1260
|
+
return Z(
|
|
1582
1261
|
() => ({
|
|
1583
1262
|
config: i,
|
|
1584
|
-
hydrated:
|
|
1585
|
-
warnings:
|
|
1586
|
-
update:
|
|
1587
|
-
reset:
|
|
1588
|
-
importJson:
|
|
1589
|
-
json:
|
|
1590
|
-
providerProps:
|
|
1591
|
-
cameraRequest:
|
|
1592
|
-
trackerProps: (
|
|
1593
|
-
modelOptions: (
|
|
1594
|
-
enabledModels:
|
|
1263
|
+
hydrated: h,
|
|
1264
|
+
warnings: o,
|
|
1265
|
+
update: p,
|
|
1266
|
+
reset: S,
|
|
1267
|
+
importJson: E,
|
|
1268
|
+
json: Ne(i),
|
|
1269
|
+
providerProps: Gt(i),
|
|
1270
|
+
cameraRequest: qt(i),
|
|
1271
|
+
trackerProps: (f) => Bt(i, f),
|
|
1272
|
+
modelOptions: (f) => Kt(i, f),
|
|
1273
|
+
enabledModels: Wt(i)
|
|
1595
1274
|
}),
|
|
1596
|
-
[i,
|
|
1275
|
+
[i, h, o, p, S, E]
|
|
1597
1276
|
);
|
|
1598
1277
|
};
|
|
1599
1278
|
export {
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1279
|
+
ms as AspectRatioContainer,
|
|
1280
|
+
vt as AudioEngine,
|
|
1281
|
+
ys as AudioPlayer,
|
|
1282
|
+
ps as Axes,
|
|
1283
|
+
We as CAMERA_PERMISSION_MESSAGES,
|
|
1284
|
+
_s as CameraPermissionGate,
|
|
1285
|
+
Ka as DEFAULT_ASSET_BUDGET_BYTES,
|
|
1286
|
+
Xr as DEFAULT_MATERIAL_FILL,
|
|
1287
|
+
ra as DEFAULT_MESH_RENDERER,
|
|
1288
|
+
aa as DEFAULT_MESH_RENDERER_RENDER_STATE,
|
|
1289
|
+
Gs as DEFAULT_PERFORMANCE_BUDGET,
|
|
1290
|
+
pa as DEFAULT_PIXEL_SNAP_INCREMENT,
|
|
1291
|
+
qs as DEFAULT_QUALITY_TIERS,
|
|
1292
|
+
fa as DEFAULT_REFERENCE_PIXELS_PER_UNIT,
|
|
1293
|
+
Er as DEFAULT_SCREEN_GLASS,
|
|
1294
|
+
Hr as DEFAULT_SCREEN_GRADIENT,
|
|
1295
|
+
Rr as DEFAULT_SCREEN_IMAGE_SCENE_SETTINGS,
|
|
1296
|
+
br as DEFAULT_SCREEN_IMAGE_SETTINGS,
|
|
1297
|
+
Ar as DEFAULT_SCREEN_SHAPE_SETTINGS,
|
|
1298
|
+
Fr as DEFAULT_SCREEN_TEXT_SCENE_SETTINGS,
|
|
1299
|
+
Cr as DEFAULT_SCREEN_TEXT_SHADOW_LAYER,
|
|
1300
|
+
ha as DEFAULT_SCREEN_TRANSFORM_2D,
|
|
1301
|
+
ga as DEFAULT_SCREEN_TRANSFORM_ROOT,
|
|
1302
|
+
we as DEFAULT_TRACKING_CONFIG,
|
|
1303
|
+
zr as DEFAULT_TRANSFORM_3D,
|
|
1304
|
+
$r as EXTERNAL_BACKGROUND_RENDER_LAYER,
|
|
1305
|
+
ft as FULL_SCREEN_ANCHORS,
|
|
1306
|
+
Ir as LightObject,
|
|
1307
|
+
Lr as LookAt,
|
|
1308
|
+
jr as MAX_RENDER_GROUP_PASSES,
|
|
1309
|
+
Vr as MaterialFill,
|
|
1310
|
+
da as MeshMaterial,
|
|
1311
|
+
na as MeshRenderer,
|
|
1312
|
+
ls as Panel,
|
|
1313
|
+
ds as PersonCutout,
|
|
1314
|
+
vr as PinToMesh,
|
|
1315
|
+
Or as RenderGroupLayer,
|
|
1316
|
+
Gr as SCREEN_IMAGE_MASK_CHANNELS,
|
|
1317
|
+
qr as SceneObjectRenderer,
|
|
1318
|
+
kr as ScreenGlassMaterial,
|
|
1319
|
+
Zr as ScreenGradientMaterial,
|
|
1320
|
+
nt as ScreenImage,
|
|
1321
|
+
_r as ScreenShape,
|
|
1322
|
+
yr as ScreenSpaceUI,
|
|
1323
|
+
Br as ScreenText,
|
|
1324
|
+
Xe as ScreenTransform,
|
|
1646
1325
|
Kr as SequentialRenderPasses,
|
|
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
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
Js as
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1326
|
+
fs as SpriteAnimation,
|
|
1327
|
+
Ps as TRACKER_KINDS,
|
|
1328
|
+
ne as TRACKING_CONFIG_STORAGE_KEY,
|
|
1329
|
+
ae as TRACKING_CONFIG_VERSION,
|
|
1330
|
+
Mr as TextLabel,
|
|
1331
|
+
Yr as Transform3D,
|
|
1332
|
+
us as VideoBackground,
|
|
1333
|
+
Wa as XRAssetCache,
|
|
1334
|
+
Ns as XRAssetCacheProvider,
|
|
1335
|
+
Bs as XRMediaSource,
|
|
1336
|
+
v as XRModel,
|
|
1337
|
+
Ks as XRProvider,
|
|
1338
|
+
Ws as XRQualityController,
|
|
1339
|
+
gr as XRScene,
|
|
1340
|
+
Xs as XR_FALLBACK_MESSAGES,
|
|
1341
|
+
Hs as XR_MODEL_ASSET_URLS,
|
|
1342
|
+
D as audio,
|
|
1343
|
+
Ke as canPromptForCamera,
|
|
1344
|
+
Ht as clearTrackingConfig,
|
|
1345
|
+
Ta as clientToScreenPixels,
|
|
1346
|
+
it as computeContainScale,
|
|
1347
|
+
zs as computeFeedCrop,
|
|
1348
|
+
$s as computeFitLayout,
|
|
1349
|
+
Xa as createAssetCache,
|
|
1350
|
+
js as createFallbackReason,
|
|
1351
|
+
Jr as createTwoStopGradient,
|
|
1352
|
+
Ss as dataURLtoFile,
|
|
1353
|
+
Ha as defineGltfAsset,
|
|
1354
|
+
za as defineTextureAsset,
|
|
1355
|
+
$a as defineVideoAsset,
|
|
1356
|
+
Vs as detectXRCapabilities,
|
|
1357
|
+
ja as disposeObject3D,
|
|
1358
|
+
ca as drawNormalizedCrop,
|
|
1359
|
+
Wt as enabledModels,
|
|
1360
|
+
Va as estimateGeometryBytes,
|
|
1361
|
+
Za as estimateObjectBytes,
|
|
1362
|
+
Ya as estimateTextureBytes,
|
|
1363
|
+
Zs as feedSidedName,
|
|
1364
|
+
Ea as feedToScreenPixels,
|
|
1365
|
+
Ys as feedToSource,
|
|
1366
|
+
Ra as feedToTracker,
|
|
1367
|
+
ba as feedToViewport,
|
|
1368
|
+
Js as feedToWorld,
|
|
1369
|
+
ws as findCameraByFacing,
|
|
1370
|
+
ke as getDefaultAssetCache,
|
|
1371
|
+
Qr as getRenderGroupLayer,
|
|
1372
|
+
Qs as isFeedPointInSource,
|
|
1373
|
+
er as isMirroredSourceKind,
|
|
1374
|
+
Cs as isMuted,
|
|
1375
|
+
xs as listCameras,
|
|
1376
|
+
Xt as loadTrackingConfig,
|
|
1377
|
+
xr as mapScreenImageSettingsToProps,
|
|
1378
|
+
wr as mapScreenTextInnerShadowToProps,
|
|
1379
|
+
Nr as mapScreenTextSettingsToProps,
|
|
1380
|
+
Aa as mediaToScreenPixels,
|
|
1381
|
+
Ur as mergeScreenShapeSettings,
|
|
1382
|
+
Sa as mergeScreenTransform2D,
|
|
1383
|
+
be as mergeTrackingConfig,
|
|
1384
|
+
tr as mirrorFeedX,
|
|
1385
|
+
ia as normalizeMeshRendererRenderState,
|
|
1386
|
+
Dr as normalizeScreenGlass,
|
|
1387
|
+
ea as normalizeScreenGradient,
|
|
1388
|
+
Fa as normalizedToScreenPixels,
|
|
1389
|
+
vs as onMuteChange,
|
|
1390
|
+
sr as orientSourcePoint,
|
|
1391
|
+
rr as orientedSize,
|
|
1392
|
+
ar as otherSide,
|
|
1393
|
+
Ue as parseTrackingConfig,
|
|
1394
|
+
nr as personLeftSign,
|
|
1395
|
+
ir as personSide,
|
|
1396
|
+
bs as playOneShot,
|
|
1397
|
+
Ms as prefetchMusic,
|
|
1398
|
+
Ge as queryCameraPermission,
|
|
1399
|
+
Ts as registerSound,
|
|
1400
|
+
ta as renderSequentialPasses,
|
|
1401
|
+
qe as requestCameraAccess,
|
|
1402
|
+
or as resolveModelAssetUrl,
|
|
1403
|
+
la as resolveNormalizedCrop,
|
|
1404
|
+
ht as resolvePersonCutoutStatus,
|
|
1405
|
+
cr as resolveQualityConfig,
|
|
1406
|
+
ya as resolveScreenTransform2D,
|
|
1407
|
+
lr as resolveTrackerSupport,
|
|
1408
|
+
K as resolveTrackingConfig,
|
|
1409
|
+
Ae as saveTrackingConfig,
|
|
1410
|
+
Ca as screenPixelsToClient,
|
|
1411
|
+
va as screenPixelsToFeed,
|
|
1412
|
+
ka as screenPixelsToMedia,
|
|
1413
|
+
_a as screenPixelsToNormalized,
|
|
1414
|
+
xa as screenPixelsToScreenSpace,
|
|
1415
|
+
wa as screenPixelsToUnits,
|
|
1416
|
+
Na as screenPointToRay,
|
|
1417
|
+
Ua as screenSpaceToScreenPixels,
|
|
1418
|
+
Da as screenUnitsToPixels,
|
|
1419
|
+
Ne as serializeTrackingConfig,
|
|
1420
|
+
As as setMuted,
|
|
1421
|
+
gt as shouldDrawFallback,
|
|
1422
|
+
V as smoothNumber,
|
|
1423
|
+
os as smoothVector2,
|
|
1424
|
+
cs as smoothVector3,
|
|
1425
|
+
ur as sourceToFeed,
|
|
1426
|
+
Es as startMusic,
|
|
1427
|
+
Rs as stopMusic,
|
|
1428
|
+
Be as subscribeCameraPermission,
|
|
1429
|
+
dr as swapSidedName,
|
|
1430
|
+
qt as toCameraRequest,
|
|
1431
|
+
Kt as toModelOptions,
|
|
1432
|
+
Gt as toProviderProps,
|
|
1433
|
+
Bt as toTrackerProps,
|
|
1434
|
+
Fs as toggleMuted,
|
|
1435
|
+
Pa as trackerPointToScreenPixels,
|
|
1436
|
+
Ia as trackerToFeed,
|
|
1437
|
+
mr as trackerToWorld,
|
|
1438
|
+
wt as useCameraPermission,
|
|
1439
|
+
gs as useFrameCapture,
|
|
1440
|
+
hs as useMediaRecorder,
|
|
1441
|
+
ks as useMuted,
|
|
1442
|
+
St as usePersonMaskTexture,
|
|
1443
|
+
ct as useScreenRectAspect,
|
|
1444
|
+
Us as useXRAsset,
|
|
1445
|
+
xe as useXRAssetCache,
|
|
1446
|
+
Ds as useXRAssetStats,
|
|
1447
|
+
qa as useXRCapabilities,
|
|
1448
|
+
Ja as useXRQuality,
|
|
1449
|
+
Is as useXRTrackingConfig,
|
|
1450
|
+
La as viewportToFeed,
|
|
1451
|
+
pr as worldToFeed,
|
|
1452
|
+
Oa as worldToScreenPixels,
|
|
1453
|
+
fr as worldToTracker
|
|
1770
1454
|
};
|