@vincentt-xr/sdk 2.0.0-alpha.0 → 2.0.0-alpha.10
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 +8193 -111
- package/README.md +86 -52
- package/dist/CanonicalHeadFrame-D_0OzdB9.cjs +1 -0
- package/dist/CanonicalHeadFrame-DdUqF6Fv.js +1506 -0
- package/dist/DebuggerUI-CVuV-VJ5.cjs +1 -0
- package/dist/DebuggerUI-D-rcPa54.js +275 -0
- package/dist/FaceRetouch-C1AxBNex.js +1071 -0
- package/dist/FaceRetouch-D7kryDE6.cjs +134 -0
- package/dist/FaceSurface-CHAMEeG1.cjs +1 -0
- package/dist/FaceSurface-DmP9AEeC.js +27 -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/cache.d.ts +99 -0
- package/dist/assets/estimate.d.ts +11 -0
- package/dist/assets/gltfLoader.d.ts +16 -0
- package/dist/assets/index.d.ts +7 -0
- package/dist/assets/loaders.d.ts +43 -0
- package/dist/assets/react.d.ts +33 -0
- package/dist/assets/sdkModels.d.ts +22 -0
- package/dist/audio/AudioEngine.d.ts +3 -1
- package/dist/audio/AudioPlayer.d.ts +29 -0
- package/dist/audio/AudioPlayerLogic.d.ts +4 -0
- package/dist/audio/index.d.ts +2 -0
- package/dist/body/__fixtures__/syntheticRig.d.ts +21 -0
- package/dist/body/bodyFlipGuard.d.ts +39 -0
- package/dist/body/bodyIdentity.d.ts +72 -0
- package/dist/body/bodyMask.d.ts +79 -0
- package/dist/body/bodyMaskMaterial.d.ts +15 -0
- package/dist/body/bodyPose.d.ts +58 -0
- package/dist/body/bodyRigFit.d.ts +148 -0
- package/dist/body/bodyRigSolver.d.ts +114 -0
- package/dist/body/bodySubject.d.ts +46 -0
- 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/bodyMaskMaterial-CBWub5t_.cjs +68 -0
- package/dist/bodyMaskMaterial-Cs2awskk.js +207 -0
- package/dist/cache-2x3CUJuY.js +212 -0
- package/dist/cache-DL1Dbz6k.cjs +1 -0
- package/dist/calibration/calibration.d.ts +75 -0
- package/dist/calibration/index.d.ts +6 -0
- package/dist/calibration/storage.d.ts +13 -0
- package/dist/calibration/types.d.ts +53 -0
- package/dist/calibration/useXRCalibration.d.ts +46 -0
- package/dist/camera/CameraPermissionGate.d.ts +26 -0
- package/dist/camera/devices.d.ts +26 -0
- package/dist/camera/index.d.ts +8 -0
- package/dist/camera/permission.d.ts +86 -0
- package/dist/camera/useCameraPermission.d.ts +35 -0
- package/dist/canonicalFace-BHwyCx1c.js +9 -0
- package/dist/canonicalFace-C83I225R.cjs +1 -0
- package/dist/capabilities/detect.d.ts +45 -0
- package/dist/capabilities/index.d.ts +5 -0
- package/dist/capabilities/types.d.ts +120 -0
- package/dist/capabilities/useXRCapabilities.d.ts +18 -0
- package/dist/compat/environment.d.ts +5 -0
- package/dist/compat/index.d.ts +4 -0
- package/dist/compat/run.d.ts +18 -0
- package/dist/compat/scenarios.d.ts +10 -0
- package/dist/compat/types.d.ts +101 -0
- package/dist/components/Axes/index.d.ts +6 -0
- package/dist/components/BodyInstruction/BodyPoseHint.d.ts +63 -0
- package/dist/components/BodyInstruction/index.d.ts +76 -0
- package/dist/components/BodyInstruction/useBodyPose.d.ts +30 -0
- package/dist/components/BodyRig/BodyAttachment.d.ts +28 -0
- package/dist/components/BodyRig/BodyOccluder.d.ts +27 -0
- package/dist/components/BodyRig/bodyDepth.d.ts +57 -0
- package/dist/components/BodyRig/index.d.ts +129 -0
- package/dist/components/BodyRig/useBodyDepthTexture.d.ts +40 -0
- package/dist/components/BodyTracker/index.d.ts +26 -1
- package/dist/components/BodyTrigger/index.d.ts +56 -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/FaceMeshRenderer.d.ts +25 -0
- package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +70 -1
- package/dist/components/FaceMesh/canonical/FaceMeshMaterial.d.ts +25 -0
- package/dist/components/FaceMesh/canonical/assets.d.ts +3 -0
- package/dist/components/FaceMesh/canonical/geometryGroups.d.ts +30 -0
- package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +24 -0
- package/dist/components/FaceMesh/canonical/shaders.d.ts +2 -0
- package/dist/components/FaceMesh/deform.d.ts +3 -0
- package/dist/components/FaceMesh/index.d.ts +6 -1
- package/dist/components/FaceMesh/material/defaults.d.ts +74 -0
- package/dist/components/FaceMesh/material/index.d.ts +1 -0
- package/dist/components/FaceMesh/material/options.d.ts +5 -1
- package/dist/components/FaceMesh/material/support.d.ts +7 -2
- package/dist/components/FaceMesh/material/textures.d.ts +4 -0
- package/dist/components/FaceMesh/material/types.d.ts +4 -2
- package/dist/components/FaceRetouch/Background.d.ts +11 -5
- package/dist/components/FaceRetouch/FaceRetouch.d.ts +52 -0
- package/dist/components/FaceRetouch/index.d.ts +2 -6
- package/dist/components/FaceRetouch/landmarkMask.d.ts +4 -6
- package/dist/components/FaceRetouch/renderState.d.ts +19 -0
- package/dist/components/FaceRetouch/useFaceRetouchMask.d.ts +4 -7
- 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/FaceTracker/index.d.ts +5 -3
- package/dist/components/FaceWarp3D/FaceWarp3D.d.ts +50 -0
- package/dist/components/FaceWarp3D/index.d.ts +2 -0
- package/dist/components/Faceless/Faceless.d.ts +51 -0
- package/dist/components/Faceless/index.d.ts +2 -0
- package/dist/components/GestureListener/index.d.ts +11 -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/HandEffect/index.d.ts +36 -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/HandJoints2D/index.d.ts +6 -0
- package/dist/components/HandRig/ForearmOccluder.d.ts +29 -0
- package/dist/components/HandRig/HandAttachment.d.ts +34 -0
- package/dist/components/HandRig/HandNails.d.ts +61 -0
- package/dist/components/HandRig/HandOccluder.d.ts +45 -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 +127 -0
- package/dist/components/HandRig/useArmMask.d.ts +29 -0
- package/dist/components/HandRig/wristSolve.d.ts +96 -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/HandTracker/index.d.ts +12 -2
- package/dist/components/HandTracking2D/HandVisual.d.ts +12 -0
- package/dist/components/HandTracking2D/index.d.ts +5 -0
- package/dist/components/HandTracking2DController/index.d.ts +5 -0
- package/dist/components/HandTracking3D/index.d.ts +6 -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 +67 -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/HolisticTracker/index.d.ts +69 -0
- package/dist/components/HolisticTracker/settings.d.ts +58 -0
- package/dist/components/HolisticTracker/signals.d.ts +49 -0
- package/dist/components/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/IrisEffect/IrisMaterial.d.ts +73 -0
- package/dist/components/IrisEffect/index.d.ts +51 -0
- package/dist/components/IrisEffect/settings.d.ts +117 -0
- package/dist/components/LightObject/index.d.ts +20 -0
- package/dist/components/LipEffect/LipEffect.d.ts +28 -0
- package/dist/components/LipEffect/LipEffectMaterial.d.ts +98 -0
- package/dist/components/LipEffect/LipEffects.d.ts +12 -0
- package/dist/components/LipEffect/defaults.d.ts +51 -0
- package/dist/components/LipEffect/index.d.ts +12 -0
- package/dist/components/LipEffect/lipShading.d.ts +73 -0
- package/dist/components/LipEffect/settings.d.ts +375 -0
- package/dist/components/LipEffect/shader.d.ts +39 -0
- package/dist/components/LipEffect/types.d.ts +141 -0
- package/dist/components/LipEffect/useLipDesignTextures.d.ts +17 -0
- package/dist/components/LipEffect/uvGuide.d.ts +74 -0
- package/dist/components/LookAt/index.d.ts +23 -0
- 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/MeshRenderer/index.d.ts +59 -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/PersonCutout/index.d.ts +46 -0
- package/dist/components/PersonCutout/personCutout.d.ts +16 -0
- package/dist/components/PersonCutout/personMask.d.ts +19 -0
- package/dist/components/PersonCutout/useBodyMaskTexture.d.ts +35 -0
- package/dist/components/PerspectiveCamera/index.d.ts +2 -8
- package/dist/components/PinToMesh/index.d.ts +47 -0
- package/dist/components/RenderGroupLayer/index.d.ts +6 -0
- package/dist/components/SceneObjectRenderer/index.d.ts +23 -0
- package/dist/components/Screen2D/ScreenTransformFrame.d.ts +11 -0
- package/dist/components/Screen2D/ScreenTransformHelpers.d.ts +19 -0
- package/dist/components/Screen2D/ScreenTransformInteraction.d.ts +18 -0
- package/dist/components/Screen2D/index.d.ts +5 -0
- package/dist/components/ScreenGlass/defaults.d.ts +3 -0
- package/dist/components/ScreenGlass/index.d.ts +5 -0
- package/dist/components/ScreenGlass/shaders.d.ts +2 -0
- package/dist/components/ScreenGlass/types.d.ts +10 -0
- package/dist/components/ScreenGradient/defaults.d.ts +5 -0
- package/dist/components/ScreenGradient/index.d.ts +5 -0
- package/dist/components/ScreenGradient/shaders.d.ts +2 -0
- package/dist/components/ScreenGradient/types.d.ts +19 -0
- package/dist/components/ScreenImage/ScreenImage.d.ts +4 -0
- package/dist/components/ScreenImage/components/DynamicTextureSync.d.ts +9 -0
- package/dist/components/ScreenImage/components/ScreenImageBody.d.ts +9 -0
- package/dist/components/ScreenImage/components/ScreenImageFrame.d.ts +9 -0
- package/dist/components/ScreenImage/components/ScreenImageTransformFrame.d.ts +9 -0
- package/dist/components/ScreenImage/fit.d.ts +52 -0
- package/dist/components/ScreenImage/index.d.ts +10 -0
- package/dist/components/ScreenImage/materials/ScreenImageBlendMaterial.d.ts +9 -0
- package/dist/components/ScreenImage/materials/ScreenImageMaskMaterial.d.ts +11 -0
- package/dist/components/ScreenImage/materials/ScreenImageMatcap.d.ts +3 -0
- package/dist/components/ScreenImage/source.d.ts +25 -0
- package/dist/components/ScreenImage/types.d.ts +64 -0
- package/dist/components/ScreenImage/utils/ScreenImageConstants.d.ts +9 -0
- package/dist/components/ScreenImage/utils/ScreenImageHelpers.d.ts +4 -0
- package/dist/components/ScreenShape/geometry.d.ts +5 -0
- package/dist/components/ScreenShape/index.d.ts +5 -0
- package/dist/components/ScreenShape/types.d.ts +54 -0
- package/dist/components/ScreenSpaceUI/ScreenTransformGuide.d.ts +15 -0
- package/dist/components/ScreenSpaceUI/ScreenTransformOverlayGuide.d.ts +9 -0
- package/dist/components/ScreenSpaceUI/index.d.ts +3 -0
- package/dist/components/ScreenText/components/ScreenTextBody.d.ts +2 -0
- package/dist/components/ScreenText/components/ScreenTextTransformFrame.d.ts +9 -0
- package/dist/components/ScreenText/constants.d.ts +5 -0
- package/dist/components/ScreenText/index.d.ts +6 -0
- package/dist/components/ScreenText/types.d.ts +31 -0
- package/dist/components/ScreenText/utils/ScreenTextHelpers.d.ts +14 -0
- package/dist/components/ScreenText/utils/ScreenTextMappings.d.ts +17 -0
- package/dist/components/SegmentationOverlay/SegmentationOverlay.d.ts +37 -0
- package/dist/components/SegmentationOverlay/SegmentationOverlayMaterial.d.ts +31 -0
- package/dist/components/SegmentationOverlay/index.d.ts +9 -0
- package/dist/components/SegmentationOverlay/maskTexture.d.ts +23 -0
- package/dist/components/SegmentationOverlay/providers.d.ts +72 -0
- package/dist/components/SegmentationOverlay/settings.d.ts +65 -0
- package/dist/components/SequentialRenderPasses/index.d.ts +6 -0
- package/dist/components/ShoulderOccluder/index.d.ts +46 -0
- package/dist/components/ShoulderOccluder/useCanonicalTorsoFit.d.ts +27 -0
- package/dist/components/SpringSwing/SpringSwing.d.ts +22 -0
- package/dist/components/SpringSwing/index.d.ts +1 -0
- package/dist/components/TextLabel/TextLabel.d.ts +5 -0
- package/dist/components/TextLabel/alignment.d.ts +4 -0
- package/dist/components/TextLabel/bend.d.ts +9 -0
- package/dist/components/TextLabel/canvas/buildTextLabelTexture.d.ts +4 -0
- package/dist/components/TextLabel/canvas/canvasTypography.d.ts +13 -0
- package/dist/components/TextLabel/canvas/drawBackground.d.ts +21 -0
- package/dist/components/TextLabel/canvas/drawEffects.d.ts +34 -0
- package/dist/components/TextLabel/canvas/drawText.d.ts +19 -0
- package/dist/components/TextLabel/components/TextLabelMesh.d.ts +13 -0
- package/dist/components/TextLabel/constants.d.ts +2 -0
- package/dist/components/TextLabel/hooks/useTextLabelTexture.d.ts +7 -0
- package/dist/components/TextLabel/index.d.ts +2 -62
- package/dist/components/TextLabel/layout/measurement.d.ts +8 -0
- package/dist/components/TextLabel/layout/resolveTextLayout.d.ts +25 -0
- package/dist/components/TextLabel/layout/wrapText.d.ts +6 -0
- package/dist/components/TextLabel/types.d.ts +337 -0
- package/dist/components/TrackingAnchor/index.d.ts +18 -2
- package/dist/components/Transform3D/index.d.ts +30 -0
- package/dist/components/XRMediaSurface/index.d.ts +8 -7
- package/dist/components/XRProvider/index.d.ts +16 -2
- package/dist/components/XRScene/index.d.ts +14 -3
- package/dist/components/XRScene/renderOutputTarget.d.ts +12 -0
- package/dist/components/XRViewport/XRViewport.d.ts +11 -0
- package/dist/components/XRViewport/components/HiddenMedia.d.ts +7 -0
- package/dist/components/XRViewport/components/MediaAssetPicker.d.ts +8 -0
- package/dist/components/XRViewport/components/MediaControlStack.d.ts +13 -0
- package/dist/components/XRViewport/components/XRViewportLayers.d.ts +30 -0
- package/dist/components/XRViewport/constants.d.ts +24 -0
- package/dist/components/XRViewport/contexts.d.ts +6 -0
- package/dist/components/XRViewport/hooks/useViewportExternalFaces.d.ts +13 -0
- package/dist/components/XRViewport/hooks/useViewportMediaSource.d.ts +16 -0
- package/dist/components/XRViewport/hooks/useViewportMediaTexture.d.ts +10 -0
- package/dist/components/XRViewport/hooks/useViewportPipeline.d.ts +41 -0
- package/dist/components/XRViewport/hooks/useViewportRenderState.d.ts +47 -0
- package/dist/components/XRViewport/index.d.ts +3 -101
- package/dist/components/XRViewport/layout.d.ts +16 -0
- package/dist/components/XRViewport/slots.d.ts +16 -0
- package/dist/components/XRViewport/types.d.ts +89 -0
- package/dist/components/XRViewport/useViewportSize.d.ts +3 -0
- package/dist/components/index.d.ts +31 -0
- package/dist/components/occluder/skinnedOccluder.d.ts +39 -0
- package/dist/config/index.d.ts +1 -1
- package/dist/constants/index.d.ts +4 -1
- package/dist/context-DTxSQvp4.js +13 -0
- package/dist/context-hA0Rb2Xa.cjs +1 -0
- package/dist/contexts-DQc7zyqT.cjs +1 -0
- package/dist/contexts-Y_FhdnIv.js +667 -0
- package/dist/coordinates/feed.d.ts +52 -0
- package/dist/coordinates/index.d.ts +7 -0
- package/dist/coordinates/side.d.ts +40 -0
- package/dist/coordinates/spaces.d.ts +49 -0
- package/dist/coordinates/viewport.d.ts +22 -0
- package/dist/coordinates/world.d.ts +15 -0
- package/dist/debug-ui/component-editor/index.d.ts +19 -0
- package/dist/debug-ui/default-setting/index.d.ts +37 -0
- package/dist/debug-ui/default-setting.cjs +21 -0
- package/dist/debug-ui/default-setting.js +777 -0
- package/dist/debug-ui/face-mesh-renderer-settings/index.d.ts +8 -0
- package/dist/debug-ui/face-retouch/index.d.ts +11 -0
- package/dist/debug-ui/face-swap-settings/index.d.ts +22 -0
- package/dist/debug-ui/gesture-settings/index.d.ts +14 -0
- package/dist/debug-ui/hand-joints-2d/index.d.ts +6 -0
- package/dist/debug-ui/hand-tracking-2d/index.d.ts +6 -0
- package/dist/debug-ui/hand-tracking-2d-controller/index.d.ts +6 -0
- package/dist/debug-ui/hand-tracking-3d/index.d.ts +6 -0
- package/dist/debug-ui/hierarchy-panel/index.d.ts +30 -0
- package/dist/debug-ui/holistic-tracker-settings/index.d.ts +16 -0
- package/dist/debug-ui/index.d.ts +61 -0
- package/dist/debug-ui/iris-effect-settings/index.d.ts +12 -0
- package/dist/debug-ui/layer-panel/index.d.ts +18 -0
- package/dist/debug-ui/lip-effect-settings/index.d.ts +15 -0
- package/dist/debug-ui/media-source/MediaSourceSwitcher.d.ts +10 -0
- package/dist/debug-ui/media-source/index.d.ts +6 -0
- package/dist/debug-ui/media-source/media-preset.d.ts +21 -0
- package/dist/debug-ui/media-source/session.d.ts +40 -0
- package/dist/debug-ui/media-source.cjs +1 -0
- package/dist/debug-ui/media-source.js +11 -0
- package/dist/debug-ui/mesh-renderer-settings/index.d.ts +6 -0
- package/dist/debug-ui/object-inspector-panel/index.d.ts +26 -0
- package/dist/debug-ui/pin-to-mesh-settings/index.d.ts +10 -0
- package/dist/debug-ui/product-hotspots/index.d.ts +25 -0
- package/dist/debug-ui/scene-editor/context.d.ts +38 -0
- package/dist/debug-ui/scene-editor/hierarchy-panel.d.ts +11 -0
- package/dist/debug-ui/scene-editor/index.d.ts +11 -0
- package/dist/debug-ui/scene-editor/inspector-panel.d.ts +9 -0
- package/dist/debug-ui/scene-editor/store-utils.d.ts +2 -0
- package/dist/debug-ui/scene-editor/viewport-toolbar.d.ts +4 -0
- package/dist/debug-ui/scene-editor/viewport.d.ts +21 -0
- package/dist/debug-ui/screen-glass-settings/index.d.ts +6 -0
- package/dist/debug-ui/screen-gradient-settings/GradientStopsEditor.d.ts +5 -0
- package/dist/debug-ui/screen-gradient-settings/index.d.ts +6 -0
- package/dist/debug-ui/screen-gradient-settings/styles.d.ts +3 -0
- package/dist/debug-ui/screen-image-settings/index.d.ts +11 -0
- package/dist/debug-ui/screen-shape-settings/index.d.ts +6 -0
- package/dist/debug-ui/screen-text-settings/NumberField.d.ts +9 -0
- package/dist/debug-ui/screen-text-settings/ScreenTextSettingsPanel.d.ts +3 -0
- package/dist/debug-ui/screen-text-settings/controls/NestedSection.d.ts +7 -0
- package/dist/debug-ui/screen-text-settings/controls/Section.d.ts +8 -0
- package/dist/debug-ui/screen-text-settings/controls/icons.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/index.d.ts +2 -0
- package/dist/debug-ui/screen-text-settings/sections/BackgroundSection.d.ts +8 -0
- package/dist/debug-ui/screen-text-settings/sections/ContentSection.d.ts +5 -0
- package/dist/debug-ui/screen-text-settings/sections/EffectsSection.d.ts +25 -0
- package/dist/debug-ui/screen-text-settings/sections/StyleSection.d.ts +5 -0
- package/dist/debug-ui/screen-text-settings/sections/TransformSection.d.ts +5 -0
- package/dist/debug-ui/screen-text-settings/sections/background/BackgroundFillControls.d.ts +2 -0
- package/dist/debug-ui/screen-text-settings/sections/background/BackgroundSizeControls.d.ts +2 -0
- package/dist/debug-ui/screen-text-settings/sections/background/BackgroundStrokeControls.d.ts +2 -0
- package/dist/debug-ui/screen-text-settings/sections/background/types.d.ts +7 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/BendEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/EffectChrome.d.ts +21 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/GlowEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/InnerShadowEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/OutlineEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/ShadowEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/types.d.ts +14 -0
- package/dist/debug-ui/screen-text-settings/settings.d.ts +90 -0
- package/dist/debug-ui/screen-text-settings/styles.d.ts +26 -0
- package/dist/debug-ui/screen-text-settings/transform.d.ts +6 -0
- package/dist/debug-ui/screen-text-settings/types.d.ts +11 -0
- package/dist/debug-ui/segmentation-overlay-settings/index.d.ts +12 -0
- package/dist/debug-ui/settings-panel/index.d.ts +43 -0
- package/dist/debug-ui/shared/MaterialSection.d.ts +13 -0
- package/dist/debug-ui/shared/ScreenTransformSection.d.ts +32 -0
- package/dist/debug-ui/shared/debugWindow.d.ts +51 -0
- package/dist/debug-ui/transform-3d-settings/index.d.ts +11 -0
- package/dist/debug-ui/xr-diagnostics/index.d.ts +26 -0
- package/dist/debug-ui.cjs +10 -0
- package/dist/debug-ui.js +9051 -0
- package/dist/detector-K8aej4MB.js +59 -0
- package/dist/detector-ijypGtse.cjs +1 -0
- package/dist/drawNormalizedCrop-C4KFaRne.cjs +1 -0
- package/dist/drawNormalizedCrop-DG3gtJxf.js +135 -0
- package/dist/entries/all.d.ts +4 -1
- package/dist/entries/core.d.ts +76 -6
- package/dist/entries/face-effects.d.ts +130 -10
- package/dist/entries/instructions.d.ts +48 -0
- package/dist/entries/internal.d.ts +5 -2
- package/dist/entries/low-level.d.ts +104 -6
- package/dist/entries/particles.d.ts +15 -0
- package/dist/entries/product.d.ts +11 -0
- package/dist/entries/scene-object.d.ts +10 -0
- package/dist/entries/tracking.d.ts +110 -2
- package/dist/face-action/index.d.ts +34 -0
- 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-attribute-expression/index.d.ts +10 -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 +2267 -195
- package/dist/face-effects.js +14191 -3346
- package/dist/face-expression/index.d.ts +182 -0
- package/dist/face-info/blendshapes.d.ts +3 -0
- package/dist/face-info/derive.d.ts +8 -0
- package/dist/face-info/drawFaceCrop.d.ts +10 -0
- package/dist/face-info/getFaceInfo.d.ts +8 -0
- package/dist/face-info/index.d.ts +8 -0
- package/dist/face-info/landmarks.d.ts +35 -0
- package/dist/face-info/types.d.ts +69 -0
- package/dist/gestures/definitions.d.ts +98 -0
- package/dist/gestures/detector.d.ts +87 -0
- package/dist/gestures/index.d.ts +8 -0
- package/dist/gestures/measures.d.ts +114 -0
- package/dist/gestures/settings.d.ts +49 -0
- package/dist/getFaceInfo-BafgGT27.js +62 -0
- package/dist/getFaceInfo-BzlwHMjX.cjs +1 -0
- package/dist/hand/armFit.d.ts +46 -0
- package/dist/hand/armMask.d.ts +190 -0
- package/dist/hand/forearm.d.ts +114 -0
- package/dist/hand/handCutout.d.ts +23 -0
- package/dist/hand/handCutoutRegistry.d.ts +7 -0
- package/dist/hand/handEffect.d.ts +38 -0
- package/dist/hand/handGestures.d.ts +524 -0
- package/dist/hand/handJoints2d.d.ts +49 -0
- package/dist/hand/handNail.d.ts +73 -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/handTracking2d.d.ts +33 -0
- package/dist/hand/handTracking2dController.d.ts +65 -0
- package/dist/hand/handTracking3d.d.ts +52 -0
- package/dist/hand/nailImageMask.d.ts +40 -0
- package/dist/hand/nailMaskFingers.d.ts +23 -0
- package/dist/hand/nailTipRefine.d.ts +37 -0
- package/dist/hand/wrist.d.ts +44 -0
- package/dist/hand/wristFilter.d.ts +44 -0
- package/dist/hooks/faceResults.d.ts +1 -1
- package/dist/hooks/selectors.d.ts +77 -4
- package/dist/hooks/useBodies.d.ts +39 -0
- package/dist/hooks/useCalibrationFaceTracker.d.ts +1 -1
- package/dist/hooks/useFaceAction.d.ts +3 -0
- package/dist/hooks/useFaceAttributeExpression.d.ts +16 -0
- package/dist/hooks/useFaceDetection.d.ts +18 -0
- package/dist/hooks/useFaceInfo.d.ts +19 -0
- package/dist/hooks/useFaceInfos.d.ts +15 -0
- package/dist/hooks/useFaceModelAcquisition.d.ts +38 -0
- package/dist/hooks/useFaceResultReader.d.ts +10 -0
- package/dist/hooks/useFrameCapture.d.ts +18 -0
- package/dist/hooks/useGesture.d.ts +39 -0
- package/dist/hooks/useIrisTracking.d.ts +45 -0
- package/dist/hooks/useMediaRecorder.d.ts +14 -2
- package/dist/hooks/useOwnedTexture.d.ts +6 -0
- package/dist/hooks/useTrackerContext.d.ts +14 -2
- package/dist/hooks/useXRDiagnostics.d.ts +81 -0
- package/dist/hooks/useXRModel.d.ts +12 -0
- package/dist/hooks/useXRSession/facade.d.ts +47 -2
- package/dist/hooks/useXRSession/index.d.ts +2 -2
- package/dist/hooks/useXRSession/reason.d.ts +21 -0
- package/dist/hooks/useXRSession/registry.d.ts +23 -0
- package/dist/hooks/useXRSession/store.d.ts +64 -7
- package/dist/index-BZoBxyLn.js +1103 -0
- package/dist/index-By_LCo2V.cjs +1 -0
- package/dist/index-C-Mryx_u.cjs +21 -0
- package/dist/index-CKRN-xJp.js +3740 -0
- package/dist/index-CUldCMRl.js +188 -0
- package/dist/index-Cyk_VIZE.js +1432 -0
- package/dist/index-D-4w34GO.cjs +1 -0
- package/dist/index-DiIoHK_4.js +442 -0
- package/dist/index-Dv3WnY9n.cjs +46 -0
- package/dist/index-ItufYyHH.cjs +1 -0
- package/dist/index-S3gqudT6.cjs +1 -0
- package/dist/index-Sho4F4it.cjs +1 -0
- package/dist/index-iIQ9jBDb.js +240 -0
- package/dist/index-vr2ichWQ.js +190 -0
- package/dist/instructions.cjs +30 -0
- package/dist/instructions.js +1528 -0
- package/dist/internal-Bb9ZXbpr.cjs +1 -0
- package/dist/{internal-KOKJDxCG.js → internal-Gt1wn6Z3.js} +152 -127
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +16 -9
- package/dist/iris/compute.d.ts +27 -0
- package/dist/iris/index.d.ts +4 -0
- package/dist/iris/lead.d.ts +19 -0
- package/dist/iris/types.d.ts +89 -0
- package/dist/landmarkMask-CvN-L5NT.cjs +1 -0
- package/dist/landmarkMask-DHivVjJm.js +225 -0
- package/dist/landmarks-BEjJXcnE.cjs +1 -0
- package/dist/landmarks-DtCAFV_m.js +76 -0
- package/dist/low-level.cjs +1 -1
- package/dist/low-level.js +1494 -629
- package/dist/main.cjs +1 -1
- package/dist/main.js +1306 -475
- package/dist/material/MaterialFill.d.ts +20 -0
- package/dist/material/MeshMaterial.d.ts +14 -0
- package/dist/material/index.d.ts +2 -0
- package/dist/models/Base/index.d.ts +49 -0
- package/dist/models/Body/index.d.ts +30 -1
- package/dist/models/Face/constants.d.ts +8 -0
- package/dist/models/Face/index.d.ts +5 -12
- package/dist/models/Face/rotation.d.ts +18 -0
- package/dist/models/Hand/GestureTracking.d.ts +1 -1
- package/dist/models/Hand/HandTracking.d.ts +19 -1
- package/dist/models/Holistic/index.d.ts +49 -0
- package/dist/models/Holistic/result.d.ts +68 -0
- package/dist/models/Segmentation/index.d.ts +6 -3
- package/dist/models/SemanticSegmentation/index.d.ts +31 -0
- package/dist/models/SemanticSegmentation/presets.d.ts +28 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/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 +71 -0
- package/dist/particles/system.d.ts +66 -0
- package/dist/particles.cjs +122 -0
- package/dist/particles.js +999 -0
- package/dist/product/ProductDimensions.d.ts +16 -0
- package/dist/product/ProductHotspot.d.ts +16 -0
- package/dist/product/ProductViewer.d.ts +9 -0
- package/dist/product/details.d.ts +53 -0
- package/dist/product/index.d.ts +14 -0
- package/dist/product/loadModelViewer.d.ts +4 -0
- package/dist/product/types.d.ts +71 -0
- package/dist/product/useProductAr.d.ts +37 -0
- package/dist/product/useProductDetails.d.ts +60 -0
- package/dist/product.cjs +1 -0
- package/dist/product.js +414 -0
- package/dist/providers-CEZQgz2s.cjs +62 -0
- package/dist/providers-CRuaD8bi.js +424 -0
- package/dist/quality/XRQualityController.d.ts +25 -0
- package/dist/quality/controller.d.ts +33 -0
- package/dist/quality/index.d.ts +6 -0
- package/dist/quality/types.d.ts +100 -0
- package/dist/quality/useXRQuality.d.ts +28 -0
- package/dist/render/layerStack.d.ts +29 -0
- package/dist/render/renderGroups.d.ts +47 -0
- package/dist/render/renderPasses.d.ts +26 -0
- package/dist/render/sceneBeforeRender.d.ts +12 -0
- package/dist/renderGroups-BADrepA1.cjs +1 -0
- package/dist/renderGroups-CNB99dZ2.js +152 -0
- package/dist/renderPasses-DgxUKn9b.cjs +158 -0
- package/dist/renderPasses-DuapJA6V.js +1290 -0
- package/dist/renderState-CJNmj5jz.js +39 -0
- package/dist/renderState-apSfg4eR.cjs +1 -0
- package/dist/scene-object/index.d.ts +146 -0
- package/dist/scene-object/runtimeRegistry.d.ts +14 -0
- package/dist/scene-object.cjs +1 -0
- package/dist/scene-object.js +40 -0
- package/dist/screen-image/screenImagePresets.d.ts +13 -0
- package/dist/screen-image/screenImageSettings.d.ts +57 -0
- package/dist/screen-text/screenTextPresets.d.ts +6 -0
- package/dist/screen-text/screenTextSettings.d.ts +147 -0
- package/dist/screen2d/coordinates.d.ts +107 -0
- package/dist/screen2d/index.d.ts +7 -0
- package/dist/screen2d/material-runtime.d.ts +32 -0
- package/dist/screen2d/screenTransform.d.ts +60 -0
- package/dist/screen2d/smoothing.d.ts +5 -0
- package/dist/screen2d/texture.d.ts +10 -0
- package/dist/screen2d/transform.d.ts +25 -0
- package/dist/screen2d/types.d.ts +90 -0
- package/dist/segmentation-BOZJdWFC.js +1911 -0
- package/dist/segmentation-J8GoNBvP.cjs +1 -0
- package/dist/segmentation2d/faceMemory.d.ts +28 -0
- package/dist/segmentation2d/faceRegions.d.ts +24 -0
- package/dist/segmentation2d/index.d.ts +9 -0
- package/dist/segmentation2d/maskUv.d.ts +23 -0
- package/dist/segmentation2d/rasterize.d.ts +14 -0
- package/dist/segmentation2d/types.d.ts +52 -0
- package/dist/selectors-BvJepq6H.js +196 -0
- package/dist/selectors-QB2qsaxy.cjs +1 -0
- package/dist/services/MetricsCollector/index.d.ts +7 -1
- package/dist/services/MetricsCollector/utils.d.ts +1 -1
- package/dist/session-BVX859as.cjs +31 -0
- package/dist/session-Cz8aie4K.js +493 -0
- package/dist/settings-BJ7FMBsO.js +111 -0
- 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/subjects/index.d.ts +2 -0
- package/dist/subjects/select.d.ts +70 -0
- package/dist/subjects/types.d.ts +59 -0
- package/dist/texture/animatedTexture.d.ts +63 -0
- package/dist/texture/animationMath.d.ts +8 -0
- package/dist/texture/gifReader.d.ts +17 -0
- package/dist/texture/gifTextureSource.d.ts +16 -0
- package/dist/texture/sourceResolver.d.ts +30 -0
- package/dist/textures-BVwo9Z7z.js +38 -0
- package/dist/textures-DAfc61zz.cjs +1 -0
- package/dist/tracking/coordinates.d.ts +5 -0
- package/dist/tracking-config/apply.d.ts +57 -0
- package/dist/tracking-config/index.d.ts +7 -0
- package/dist/tracking-config/resolve.d.ts +25 -0
- package/dist/tracking-config/storage.d.ts +8 -0
- package/dist/tracking-config/types.d.ts +106 -0
- package/dist/tracking-config/useXRTrackingConfig.d.ts +38 -0
- package/dist/tracking.cjs +10 -1
- package/dist/tracking.js +1531 -294
- package/dist/trigger-D9L4GPmQ.js +3726 -0
- package/dist/trigger-DZ9vU7jo.cjs +147 -0
- package/dist/types/common.d.ts +11 -1
- package/dist/types/compositor.d.ts +21 -0
- package/dist/types/face.d.ts +21 -14
- package/dist/types/gesture-tracking.d.ts +2 -2
- package/dist/types/hand-tracking.d.ts +19 -2
- package/dist/types/holistic.d.ts +121 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/model.d.ts +22 -2
- package/dist/types/nodes.d.ts +83 -6
- package/dist/types/segmentation.d.ts +26 -0
- package/dist/types/session.d.ts +50 -4
- package/dist/types/tracking.d.ts +8 -2
- package/dist/types/util-types.d.ts +1 -1
- package/dist/useBodies-BYzJpQ4L.js +75 -0
- package/dist/useBodies-Cxpmx6Bb.cjs +1 -0
- package/dist/useFaceInfo-BzEUj2OI.js +75 -0
- package/dist/useFaceInfo-DlLRAVNw.cjs +1 -0
- package/dist/useFaceResultReader-Cc4Qrutf.js +61 -0
- package/dist/useFaceResultReader-D3jOQNKz.cjs +1 -0
- package/dist/useInstructionHold-DOu-RpCM.js +53 -0
- package/dist/useInstructionHold-DwJY1Alr.cjs +1 -0
- package/dist/useIrisTracking-Bz4uLDa7.js +6190 -0
- package/dist/useIrisTracking-DRGWgoNy.cjs +35 -0
- package/dist/useLandmarkPoseFit-Bg-h9BPb.cjs +1 -0
- package/dist/useLandmarkPoseFit-Bmb3h6Mw.js +87 -0
- package/dist/useXRCapabilities-B1KLckqw.js +30 -0
- package/dist/useXRCapabilities-CZlPUBjF.cjs +1 -0
- package/dist/utils/canonicalRigidLandmarks.d.ts +8 -0
- package/dist/utils/drawNormalizedCrop.d.ts +22 -0
- package/dist/utils/fns.d.ts +6 -3
- package/dist/utils/headOccluderFit.d.ts +42 -0
- package/dist/utils/integrity.d.ts +25 -26
- package/dist/utils/landmarkBounds.d.ts +1 -1
- package/dist/utils/logger.d.ts +2 -2
- 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/utils/updateThrottle.d.ts +2 -0
- package/dist/utils/useStableUniforms.d.ts +18 -0
- package/dist/utils/visionWasm.d.ts +18 -0
- package/dist/uv-BMFt19bg.cjs +1 -0
- package/dist/{index-BD-JWMjE.js → uv-DJU_XfmN.js} +15 -180
- package/dist/x-Co8jPhP0.js +127 -0
- package/dist/x-KC8E4Gaj.cjs +41 -0
- package/docs/MIGRATION_GUIDE.md +589 -0
- package/docs/SDK_DOCUMENTATION.md +1157 -0
- package/docs/api/adaptive-quality.mdx +104 -0
- package/docs/api/asset-lifecycle.mdx +78 -0
- package/docs/api/audio.mdx +36 -0
- package/docs/api/behavior-components.mdx +164 -0
- package/docs/api/body-instructions.mdx +287 -0
- package/docs/api/body-rig.mdx +384 -0
- package/docs/api/body-triggers.mdx +235 -0
- package/docs/api/camera-permission.mdx +142 -0
- package/docs/api/capture-recording.mdx +111 -0
- package/docs/api/coordinate-spaces.mdx +168 -0
- package/docs/api/cross-camera.mdx +89 -0
- package/docs/api/debug-ui-scene-editor.mdx +270 -0
- package/docs/api/diagnostics-calibration.mdx +97 -0
- package/docs/api/external-face-mesh.mdx +231 -0
- package/docs/api/face-actions.mdx +108 -0
- package/docs/api/face-attribute-expression.mdx +87 -0
- package/docs/api/face-binding-anchors.mdx +55 -0
- package/docs/api/face-character.mdx +157 -0
- package/docs/api/face-effects.mdx +28 -0
- package/docs/api/face-expression-controller.mdx +153 -0
- package/docs/api/face-info.mdx +118 -0
- 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 +130 -0
- package/docs/api/face-morph.mdx +117 -0
- package/docs/api/face-painting.mdx +40 -0
- package/docs/api/face-reprojection.mdx +154 -0
- package/docs/api/face-retouching.mdx +81 -0
- 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 +210 -0
- package/docs/api/hair.mdx +97 -0
- package/docs/api/hand-instructions.mdx +222 -0
- package/docs/api/hand-rig.mdx +661 -0
- package/docs/api/hand-touch.mdx +162 -0
- package/docs/api/head-occluder.mdx +563 -0
- package/docs/api/holistic-tracker.mdx +164 -0
- package/docs/api/instructions.mdx +323 -0
- package/docs/api/iris-tracking.mdx +247 -0
- 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/material-render-state.mdx +132 -0
- package/docs/api/multi-subject.mdx +185 -0
- package/docs/api/particles.mdx +183 -0
- package/docs/api/person-cutout.mdx +171 -0
- package/docs/api/pin-to-face-mesh.mdx +274 -0
- package/docs/api/product-ar.mdx +114 -0
- package/docs/api/product-details.mdx +78 -0
- package/docs/api/runtime-3d.mdx +316 -0
- package/docs/api/scene-object-store.mdx +213 -0
- package/docs/api/screen-image.mdx +67 -0
- package/docs/api/screen-shape.mdx +64 -0
- package/docs/api/screen-space-coordinates.mdx +75 -0
- package/docs/api/screen-text.mdx +39 -0
- package/docs/api/segmentation-overlay.mdx +301 -0
- package/docs/api/session-lifecycle.mdx +136 -0
- package/docs/api/texture-sources.mdx +74 -0
- package/docs/api/trackers.mdx +65 -0
- package/docs/api/tracking-config.mdx +108 -0
- package/docs/docs.json +121 -0
- package/docs/examples/lip-shaders.mdx +273 -0
- package/docs/examples/scene-object-recipes.mdx +194 -0
- 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 +139 -0
- package/docs/guides/lip-effect-textures.mdx +368 -0
- package/docs/guides/lip-uv-template.png +0 -0
- package/docs/guides/lip-uv-template.svg +1 -0
- package/docs/guides/makeup-design-textures.mdx +109 -0
- package/docs/inspector/hierarchy-panel.mdx +51 -0
- package/docs/inspector/object-inspector-panel.mdx +51 -0
- package/docs/introduction.mdx +120 -0
- package/docs/scene-objects/overview.mdx +127 -0
- package/docs/scene-objects/render-groups.mdx +77 -0
- package/docs/scene-objects/runtime-rendering.mdx +75 -0
- package/docs/texture-api-consumer.md +84 -0
- package/package.json +86 -8
- package/settings.json +1998 -0
- package/dist/DebuggerUI-CEfdddkZ.cjs +0 -1
- package/dist/DebuggerUI-Dgop6Q6o.js +0 -269
- package/dist/components/FaceRetouch/retouchRegions.d.ts +0 -23
- package/dist/components/FaceRetouch/useFaceRetouchRegions.d.ts +0 -12
- package/dist/index-B5J4gzn2.cjs +0 -1
- package/dist/index-BVBVg96G.cjs +0 -1
- package/dist/index-CYMj26Ej.js +0 -1331
- package/dist/index-DtwHElmG.js +0 -157
- package/dist/index-PtFmD6B8.cjs +0 -1
- package/dist/internal-DH5d1Xnq.cjs +0 -1
- package/dist/modules/XRClient/index.d.ts +0 -9
- package/dist/modules/index.d.ts +0 -1
- package/dist/selectors-BHO6TnoC.js +0 -59
- package/dist/selectors-Bub0o3qy.cjs +0 -1
- package/dist/services/ApiService.d.ts +0 -12
- package/dist/types/client.d.ts +0 -3
- package/dist/useFaceResults-cpsSmKKc.js +0 -81
- package/dist/useFaceResults-hVUJYSEY.cjs +0 -1
package/dist/low-level.js
CHANGED
|
@@ -1,80 +1,32 @@
|
|
|
1
|
-
import { u as he } from "./index-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { u as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
label: t = "face bounding box",
|
|
27
|
-
color: n = "#22c55e",
|
|
28
|
-
style: a,
|
|
29
|
-
labelStyle: r
|
|
30
|
-
}) => /* @__PURE__ */ f(
|
|
31
|
-
"div",
|
|
32
|
-
{
|
|
33
|
-
style: {
|
|
34
|
-
position: "absolute",
|
|
35
|
-
left: `${e.left * 100}%`,
|
|
36
|
-
top: `${e.top * 100}%`,
|
|
37
|
-
width: `${e.width * 100}%`,
|
|
38
|
-
height: `${e.height * 100}%`,
|
|
39
|
-
border: `3px solid ${n}`,
|
|
40
|
-
boxSizing: "border-box",
|
|
41
|
-
pointerEvents: "none",
|
|
42
|
-
zIndex: 20,
|
|
43
|
-
...a
|
|
44
|
-
},
|
|
45
|
-
children: t !== null && /* @__PURE__ */ f("div", { style: { ...Ee, ...r }, children: t })
|
|
46
|
-
}
|
|
47
|
-
), et = (e) => {
|
|
48
|
-
const { makeDefault: t = !0, ...n } = e, a = {
|
|
49
|
-
position: [0, 0, 40],
|
|
50
|
-
fov: 30,
|
|
51
|
-
near: 0.1,
|
|
52
|
-
far: 1e3,
|
|
53
|
-
makeDefault: t,
|
|
54
|
-
...n
|
|
55
|
-
};
|
|
56
|
-
return /* @__PURE__ */ f(Re, { ...a });
|
|
57
|
-
}, tt = ({
|
|
58
|
-
background: e = "#000",
|
|
59
|
-
children: t,
|
|
60
|
-
style: n
|
|
61
|
-
}) => /* @__PURE__ */ f(
|
|
62
|
-
"div",
|
|
63
|
-
{
|
|
64
|
-
style: {
|
|
65
|
-
position: "fixed",
|
|
66
|
-
inset: 0,
|
|
67
|
-
overflow: "hidden",
|
|
68
|
-
background: e,
|
|
69
|
-
...n
|
|
70
|
-
},
|
|
71
|
-
children: t
|
|
72
|
-
}
|
|
73
|
-
), $ = ({
|
|
1
|
+
import { u as oe, j as N, z as he, aK as P, m as ge, d as be, au as ye, s as Se, w as ee } from "./index-CKRN-xJp.js";
|
|
2
|
+
import { a_ as Ft, b4 as Ot, a$ as Dt, E as kt, aO as Bt, b5 as Lt, b1 as Nt, b2 as Ht, b6 as Gt, aM as Pt, aQ as Xt, F as Wt, aY as zt, b3 as Yt, aR as Vt, l as $t, aL as Ut, aP as qt, aS as Kt, b as jt, aT as Jt, b0 as Qt, aU as Zt, aV as ea, aZ as ta, a as aa, aW as ra, aX as sa, aN as na } from "./index-CKRN-xJp.js";
|
|
3
|
+
import { H as ia, u as la } from "./index-vr2ichWQ.js";
|
|
4
|
+
import { u as Re } from "./landmarks-DtCAFV_m.js";
|
|
5
|
+
import { b as we } from "./selectors-BvJepq6H.js";
|
|
6
|
+
import { m as ca, l as ua, c as ma, e as pa, g as fa, p as ha, h as ga, f as ba, i as ya, n as Sa, q as Ra, a as wa, u as _a, d as Ea, o as va, k as Ia, j as Ta } from "./selectors-BvJepq6H.js";
|
|
7
|
+
import { useEffect as F, useState as T, useRef as D, useCallback as _e, useLayoutEffect as Ee, useMemo as $, Children as ve, isValidElement as Ie } from "react";
|
|
8
|
+
import { c as Te } from "./getFaceInfo-BafgGT27.js";
|
|
9
|
+
import { a as Aa, b as Ma } from "./getFaceInfo-BafgGT27.js";
|
|
10
|
+
import { jsx as S, jsxs as k, Fragment as W } from "react/jsx-runtime";
|
|
11
|
+
import { PerspectiveCamera as xe } from "@react-three/drei";
|
|
12
|
+
import { g as Fa, b as Oa, c as Da } from "./index-CUldCMRl.js";
|
|
13
|
+
import { ag as ie } from "./trigger-D9L4GPmQ.js";
|
|
14
|
+
import { bP as Ba, bL as La, bQ as Na, bc as Ha, bd as Ga, b5 as Pa, am as Xa, as as Wa, aF as za, aG as Ya, aH as Va, at as $a, au as Ua, aI as qa, aJ as Ka, av as ja, aK as Ja, aw as Qa, aL as Za, aM as er, aN as tr, aO as ar, aP as rr, ax as sr, ay as nr, az as or, aQ as ir, aR as lr, b6 as dr, bs as cr, by as ur, bz as mr, bA as pr, bB as fr, ah as hr, bm as gr, bn as br, bW as yr, ar as Sr, bf as Rr, H as wr, bX as _r, bY as Er, e as vr, O as Ir, ai as Tr, S as xr, an as Ar, c0 as Mr, b_ as Cr, bC as Fr, b$ as Or, aS as Dr, aT as kr, aA as Br, bM as Lr, bv as Nr, aB as Hr, bb as Gr, d as Pr, aU as Xr, aV as Wr, aW as zr, aY as Yr, aZ as Vr, a_ as $r, aX as Ur, a$ as qr, b0 as Kr, b1 as jr, b2 as Jr, t as Qr, bD as Zr, c as es, v as ts, n as as, bw as rs, b9 as ss, bk as ns, b7 as os, c1 as is, bK as ls, bR as ds, bZ as cs, aj as us, bS as ms, bE as ps, bF as fs, bG as hs, bT as gs, bg as bs, bH as ys, bo as Ss, bp as Rs, bq as ws, bh as _s, bi as Es, bj as vs, bI as Is, aC as Ts, bN as xs, f as As, h as Ms, k as Cs, i as Fs, j as Os, l as Ds, m as ks, g as Bs, bt as Ls, be as Ns, ba as Hs, b8 as Gs, b3 as Ps, b4 as Xs, br as Ws, r as zs, aD as Ys, ao as Vs, ap as $s, bU as Us, p as qs, bl as Ks, bu as js, aq as Js, s as Qs, aE as Zs, q as en, ak as tn, al as an, c2 as rn, c3 as sn, bO as nn, u as on, bV as ln, bJ as dn, bx as cn } from "./trigger-D9L4GPmQ.js";
|
|
15
|
+
import { h as mn } from "./hasFullUnitUVBounds-BGvcFsQM.js";
|
|
16
|
+
import { X as Ae, a as Me, b as Ce } from "./contexts-Y_FhdnIv.js";
|
|
17
|
+
import { B as fn, M as hn, h as gn, i as bn, T as yn, c as Sn, j as Rn, k as wn, g as _n, e as En, f as vn, r as In, t as Tn, d as xn, u as An } from "./contexts-Y_FhdnIv.js";
|
|
18
|
+
import { H as Cn, p as Fn, q as On, t as Dn, u as kn, v as Bn, w as Ln, b as Nn, l as Hn, x as Gn, y as Pn, s as Xn, z as Wn } from "./index-DiIoHK_4.js";
|
|
19
|
+
import { b as Yn, r as Vn } from "./useBodies-BYzJpQ4L.js";
|
|
20
|
+
import { B as Un, d as qn, e as Kn, f as jn, g as Jn, b as Qn, h as Zn, a as eo, c as to, p as ao, s as ro, i as so } from "./bodyMaskMaterial-Cs2awskk.js";
|
|
21
|
+
import { c as oo, g as io, s as lo, a as co } from "./detector-K8aej4MB.js";
|
|
22
|
+
import { F as mo, g as po, I as fo, M as ho, j as go, k as bo, h as yo, v as So, i as Ro, c as wo, l as _o, p as Eo, w as vo, r as Io, t as To, m as xo, u as Ao, n as Mo, q as Co, o as Fo, s as Oo } from "./providers-CRuaD8bi.js";
|
|
23
|
+
import { S as ko, u as Bo } from "./context-DTxSQvp4.js";
|
|
24
|
+
import * as L from "three";
|
|
25
|
+
const X = ({
|
|
74
26
|
children: e,
|
|
75
27
|
config: t,
|
|
76
|
-
style:
|
|
77
|
-
}) => /* @__PURE__ */
|
|
28
|
+
style: r
|
|
29
|
+
}) => /* @__PURE__ */ S(
|
|
78
30
|
"div",
|
|
79
31
|
{
|
|
80
32
|
"data-render-target": t.name,
|
|
@@ -86,83 +38,88 @@ const Ee = {
|
|
|
86
38
|
pointerEvents: t.pointerEvents ?? "none",
|
|
87
39
|
zIndex: t.zIndex,
|
|
88
40
|
opacity: t.hidden ? 0 : 1,
|
|
89
|
-
...
|
|
41
|
+
...r
|
|
90
42
|
},
|
|
91
43
|
children: e
|
|
92
44
|
}
|
|
93
|
-
),
|
|
45
|
+
), U = ({
|
|
94
46
|
canvas: e,
|
|
95
47
|
layout: t,
|
|
96
|
-
media:
|
|
48
|
+
media: r,
|
|
97
49
|
mirrored: a,
|
|
98
|
-
filter:
|
|
50
|
+
filter: s
|
|
99
51
|
}) => {
|
|
100
|
-
const
|
|
101
|
-
e.width !==
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
},
|
|
52
|
+
const d = Math.round(t.destination.width), u = Math.round(t.destination.height);
|
|
53
|
+
e.width !== d && (e.width = d), e.height !== u && (e.height = u);
|
|
54
|
+
const c = e.getContext("2d");
|
|
55
|
+
c && (c.setTransform(1, 0, 0, 1, 0, 0), c.clearRect(0, 0, d, u), a && (c.translate(d, 0), c.scale(-1, 1)), s && (c.filter = s), c.drawImage(r, t.offsetX, t.offsetY, t.drawWidth, t.drawHeight), s && (c.filter = "none"), c.setTransform(1, 0, 0, 1, 0, 0));
|
|
56
|
+
}, le = ({
|
|
105
57
|
canvasRef: e,
|
|
106
58
|
enabled: t = !0,
|
|
107
|
-
fps:
|
|
59
|
+
fps: r = 30,
|
|
108
60
|
imageRef: a,
|
|
109
|
-
layout:
|
|
110
|
-
mirrored:
|
|
111
|
-
sourceKind:
|
|
112
|
-
videoRef:
|
|
61
|
+
layout: s,
|
|
62
|
+
mirrored: d,
|
|
63
|
+
sourceKind: u,
|
|
64
|
+
videoRef: c
|
|
113
65
|
}) => {
|
|
114
|
-
|
|
66
|
+
F(() => {
|
|
115
67
|
if (!t) {
|
|
116
|
-
const
|
|
117
|
-
|
|
68
|
+
const f = e.current, g = f == null ? void 0 : f.getContext("2d");
|
|
69
|
+
f && g && g.clearRect(0, 0, f.width, f.height);
|
|
118
70
|
return;
|
|
119
71
|
}
|
|
120
|
-
let
|
|
121
|
-
const
|
|
122
|
-
if (
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
if (!
|
|
126
|
-
if (
|
|
127
|
-
const
|
|
128
|
-
if (!
|
|
72
|
+
let o = 0, p = 0;
|
|
73
|
+
const h = r > 0 ? 1e3 / r : 0, n = (f) => {
|
|
74
|
+
if (o = requestAnimationFrame(n), h > 0 && f - p < h) return;
|
|
75
|
+
p = f;
|
|
76
|
+
const g = e.current;
|
|
77
|
+
if (!g || !s) return;
|
|
78
|
+
if (u === "image") {
|
|
79
|
+
const l = a.current;
|
|
80
|
+
if (!l || !l.complete || l.naturalWidth <= 0 || l.naturalHeight <= 0)
|
|
129
81
|
return;
|
|
130
|
-
|
|
131
|
-
canvas:
|
|
132
|
-
layout:
|
|
133
|
-
media:
|
|
134
|
-
mirrored:
|
|
82
|
+
U({
|
|
83
|
+
canvas: g,
|
|
84
|
+
layout: s,
|
|
85
|
+
media: l,
|
|
86
|
+
mirrored: d
|
|
135
87
|
});
|
|
136
88
|
return;
|
|
137
89
|
}
|
|
138
|
-
const
|
|
139
|
-
!
|
|
140
|
-
canvas:
|
|
141
|
-
layout:
|
|
142
|
-
media:
|
|
143
|
-
mirrored:
|
|
90
|
+
const i = c.current;
|
|
91
|
+
!i || i.readyState < 2 || i.videoWidth <= 0 || i.videoHeight <= 0 || U({
|
|
92
|
+
canvas: g,
|
|
93
|
+
layout: s,
|
|
94
|
+
media: i,
|
|
95
|
+
mirrored: d
|
|
144
96
|
});
|
|
145
97
|
};
|
|
146
|
-
return
|
|
147
|
-
cancelAnimationFrame(
|
|
98
|
+
return o = requestAnimationFrame(n), () => {
|
|
99
|
+
cancelAnimationFrame(o);
|
|
148
100
|
};
|
|
149
|
-
}, [e, t,
|
|
150
|
-
},
|
|
101
|
+
}, [e, t, r, a, s, d, u, c]);
|
|
102
|
+
}, Fe = ({
|
|
151
103
|
canvasRef: e,
|
|
152
104
|
imageRef: t,
|
|
153
|
-
layer:
|
|
105
|
+
layer: r,
|
|
154
106
|
layout: a,
|
|
155
|
-
mirrored:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
107
|
+
mirrored: s,
|
|
108
|
+
onCaptureTarget: d,
|
|
109
|
+
sourceKind: u,
|
|
110
|
+
videoRef: c
|
|
111
|
+
}) => (le({
|
|
159
112
|
canvasRef: e,
|
|
160
113
|
imageRef: t,
|
|
161
114
|
layout: a,
|
|
162
|
-
mirrored:
|
|
163
|
-
sourceKind:
|
|
164
|
-
videoRef:
|
|
165
|
-
}),
|
|
115
|
+
mirrored: s,
|
|
116
|
+
sourceKind: u,
|
|
117
|
+
videoRef: c
|
|
118
|
+
}), F(() => {
|
|
119
|
+
const o = e.current;
|
|
120
|
+
if (o)
|
|
121
|
+
return d == null || d(o), () => d == null ? void 0 : d(void 0);
|
|
122
|
+
}, [e, d]), /* @__PURE__ */ S(X, { config: r, children: /* @__PURE__ */ S(
|
|
166
123
|
"canvas",
|
|
167
124
|
{
|
|
168
125
|
ref: e,
|
|
@@ -175,339 +132,84 @@ const Ee = {
|
|
|
175
132
|
background: "#000"
|
|
176
133
|
}
|
|
177
134
|
}
|
|
178
|
-
) })),
|
|
135
|
+
) })), Rt = ({
|
|
179
136
|
canvasRef: e,
|
|
180
137
|
controlInsetTop: t,
|
|
181
|
-
debugVisible:
|
|
138
|
+
debugVisible: r,
|
|
182
139
|
fps: a = 15,
|
|
183
|
-
imageRef:
|
|
184
|
-
layer:
|
|
185
|
-
layout:
|
|
186
|
-
mirrored:
|
|
187
|
-
sourceKind:
|
|
188
|
-
videoRef:
|
|
189
|
-
viewportSize:
|
|
140
|
+
imageRef: s,
|
|
141
|
+
layer: d,
|
|
142
|
+
layout: u,
|
|
143
|
+
mirrored: c,
|
|
144
|
+
sourceKind: o,
|
|
145
|
+
videoRef: p,
|
|
146
|
+
viewportSize: h
|
|
190
147
|
}) => {
|
|
191
|
-
|
|
148
|
+
le({
|
|
192
149
|
canvasRef: e,
|
|
193
|
-
enabled:
|
|
150
|
+
enabled: r,
|
|
194
151
|
fps: a,
|
|
195
|
-
imageRef:
|
|
196
|
-
layout:
|
|
197
|
-
mirrored:
|
|
198
|
-
sourceKind:
|
|
199
|
-
videoRef:
|
|
152
|
+
imageRef: s,
|
|
153
|
+
layout: u,
|
|
154
|
+
mirrored: c,
|
|
155
|
+
sourceKind: o,
|
|
156
|
+
videoRef: p
|
|
200
157
|
});
|
|
201
|
-
const
|
|
202
|
-
return /* @__PURE__ */
|
|
158
|
+
const n = Math.min(220, Math.max(120, h.width * 0.22)), f = h.width > 0 && h.height > 0 ? h.width / h.height : 1, g = Math.min(h.height - 24, Math.max(t ?? 16, 16));
|
|
159
|
+
return /* @__PURE__ */ S(X, { config: d, children: /* @__PURE__ */ S(
|
|
203
160
|
"canvas",
|
|
204
161
|
{
|
|
205
162
|
ref: e,
|
|
206
163
|
style: {
|
|
207
164
|
position: "absolute",
|
|
208
165
|
left: 16,
|
|
209
|
-
top:
|
|
210
|
-
width:
|
|
211
|
-
height:
|
|
212
|
-
aspectRatio: `${
|
|
213
|
-
opacity:
|
|
166
|
+
top: g,
|
|
167
|
+
width: r ? n : 1,
|
|
168
|
+
height: r ? "auto" : 1,
|
|
169
|
+
aspectRatio: `${f}`,
|
|
170
|
+
opacity: r ? 0.85 : 0,
|
|
214
171
|
borderRadius: 10,
|
|
215
|
-
border:
|
|
172
|
+
border: r ? "1px solid rgba(255,255,255,0.16)" : "none",
|
|
216
173
|
pointerEvents: "none",
|
|
217
174
|
objectFit: "contain",
|
|
218
175
|
background: "#000"
|
|
219
176
|
}
|
|
220
177
|
}
|
|
221
178
|
) });
|
|
222
|
-
},
|
|
223
|
-
enabled: e,
|
|
224
|
-
displayMirrored: t,
|
|
225
|
-
imageRef: n,
|
|
226
|
-
layout: a,
|
|
227
|
-
mode: r,
|
|
228
|
-
numFaces: i,
|
|
229
|
-
selectedSource: s,
|
|
230
|
-
sourceStream: o,
|
|
231
|
-
videoRef: h
|
|
232
|
-
}) => {
|
|
233
|
-
const { session: m } = ye(), d = k(null), g = k(!1), p = k(document.createElement("canvas")), {
|
|
234
|
-
ready: c,
|
|
235
|
-
node: b,
|
|
236
|
-
error: w
|
|
237
|
-
} = he(re.FACE_TRACKER, {
|
|
238
|
-
numFaces: i ?? (r === "head-binding" ? Fe : Ie)
|
|
239
|
-
}), [S, v] = y("idle"), [A, I] = y(null), F = e && c && !!b, L = te({
|
|
240
|
-
node: F ? b : null,
|
|
241
|
-
enabled: F,
|
|
242
|
-
selectedSource: s,
|
|
243
|
-
onFrame: fe(() => {
|
|
244
|
-
I(null), v("ready");
|
|
245
|
-
}, [])
|
|
246
|
-
});
|
|
247
|
-
return M(() => {
|
|
248
|
-
if (!e || !a) return;
|
|
249
|
-
const u = () => {
|
|
250
|
-
const x = s === "image" ? n.current : h.current;
|
|
251
|
-
if (x) {
|
|
252
|
-
if (x instanceof HTMLImageElement) {
|
|
253
|
-
if (!x.complete || x.naturalWidth <= 0 || x.naturalHeight <= 0) return;
|
|
254
|
-
} else if (x.readyState < 2 || x.videoWidth <= 0 || x.videoHeight <= 0)
|
|
255
|
-
return;
|
|
256
|
-
j({
|
|
257
|
-
canvas: p.current,
|
|
258
|
-
layout: a,
|
|
259
|
-
media: x,
|
|
260
|
-
mirrored: t,
|
|
261
|
-
filter: s === "webcam" ? ke : void 0
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
if (s === "image") {
|
|
266
|
-
u();
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
let l = 0;
|
|
270
|
-
const C = () => {
|
|
271
|
-
l = requestAnimationFrame(C), u();
|
|
272
|
-
};
|
|
273
|
-
return l = requestAnimationFrame(C), () => cancelAnimationFrame(l);
|
|
274
|
-
}, [t, e, n, a, s, h]), M(() => {
|
|
275
|
-
var T;
|
|
276
|
-
if (!e) {
|
|
277
|
-
v("idle"), I(null), g.current = !1, d.current = null;
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
if (!a) {
|
|
281
|
-
v("initializing");
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
const u = (o == null ? void 0 : o.id) ?? (((T = h.current) == null ? void 0 : T.srcObject) instanceof MediaStream ? h.current.srcObject.id : "none"), C = s === "webcam" ? `webcam:${u}` : s;
|
|
285
|
-
d.current !== C && (g.current = !1, d.current = C);
|
|
286
|
-
let x = !1;
|
|
287
|
-
return (async () => {
|
|
288
|
-
try {
|
|
289
|
-
if (v("initializing"), g.current || (await m.setFrameSource({
|
|
290
|
-
canvas: p.current,
|
|
291
|
-
sourceKind: s
|
|
292
|
-
}), await m.start(), g.current = !0), x) return;
|
|
293
|
-
I(null), v("initializing");
|
|
294
|
-
} catch (E) {
|
|
295
|
-
if (x) return;
|
|
296
|
-
v("error"), I(E instanceof Error ? E.message : "Failed to initialize SDK face tracking");
|
|
297
|
-
}
|
|
298
|
-
})(), () => {
|
|
299
|
-
x = !0;
|
|
300
|
-
};
|
|
301
|
-
}, [e, a, s, m, o, h]), M(() => {
|
|
302
|
-
!F && e && !w && v("initializing");
|
|
303
|
-
}, [F, e, w]), M(() => {
|
|
304
|
-
w && (v("error"), I(w.message));
|
|
305
|
-
}, [w]), M(() => () => {
|
|
306
|
-
g.current = !1, m.stop();
|
|
307
|
-
}, [m]), {
|
|
308
|
-
activeDelegate: "GPU",
|
|
309
|
-
faces: L,
|
|
310
|
-
status: S,
|
|
311
|
-
error: A
|
|
312
|
-
};
|
|
313
|
-
}, ie = pe(null), Te = {
|
|
179
|
+
}, Oe = {
|
|
314
180
|
audio: !1,
|
|
315
181
|
video: {
|
|
316
182
|
facingMode: "user",
|
|
317
183
|
frameRate: { ideal: 30, max: 60 }
|
|
318
184
|
}
|
|
319
|
-
},
|
|
185
|
+
}, De = {
|
|
320
186
|
name: "viewport-live",
|
|
321
187
|
clearColor: "#000000",
|
|
322
188
|
pointerEvents: "none",
|
|
323
189
|
zIndex: 0
|
|
324
|
-
},
|
|
190
|
+
}, ke = {
|
|
325
191
|
name: "viewport-ui",
|
|
326
192
|
clearColor: "transparent",
|
|
327
193
|
pointerEvents: "auto",
|
|
328
194
|
zIndex: 5
|
|
329
|
-
},
|
|
195
|
+
}, Be = {
|
|
330
196
|
name: "viewport-scene",
|
|
331
197
|
clearColor: "transparent",
|
|
332
198
|
pointerEvents: "auto",
|
|
333
199
|
zIndex: 1
|
|
334
|
-
},
|
|
200
|
+
}, B = {
|
|
335
201
|
webcam: { icon: "◉", label: "Webcam" },
|
|
336
202
|
image: { icon: "▣", label: "Images" },
|
|
337
203
|
video: { icon: "▶", label: "Videos" }
|
|
338
|
-
},
|
|
339
|
-
K.displayName = "XRViewport.Scene";
|
|
340
|
-
const O = ({ children: e }) => /* @__PURE__ */ f(q, { children: e });
|
|
341
|
-
O.displayName = "XRViewport.Overlay";
|
|
342
|
-
const We = (e) => {
|
|
343
|
-
if (!e)
|
|
344
|
-
return { width: 0, height: 0 };
|
|
345
|
-
const t = e.getBoundingClientRect();
|
|
346
|
-
return {
|
|
347
|
-
width: t.width || e.clientWidth,
|
|
348
|
-
height: t.height || e.clientHeight
|
|
349
|
-
};
|
|
350
|
-
}, Be = (e) => {
|
|
351
|
-
const [t, n] = y({ width: 0, height: 0 });
|
|
352
|
-
return be(() => {
|
|
353
|
-
const a = e.current;
|
|
354
|
-
if (!a) return;
|
|
355
|
-
let r = 0;
|
|
356
|
-
const i = () => {
|
|
357
|
-
const m = We(a);
|
|
358
|
-
n(
|
|
359
|
-
(d) => d.width === m.width && d.height === m.height ? d : m
|
|
360
|
-
);
|
|
361
|
-
};
|
|
362
|
-
i(), r = requestAnimationFrame(i);
|
|
363
|
-
const s = new ResizeObserver(() => {
|
|
364
|
-
i(), r && cancelAnimationFrame(r), r = requestAnimationFrame(i);
|
|
365
|
-
});
|
|
366
|
-
s.observe(a);
|
|
367
|
-
const o = window.visualViewport, h = () => {
|
|
368
|
-
i(), r && cancelAnimationFrame(r), r = requestAnimationFrame(i);
|
|
369
|
-
};
|
|
370
|
-
return window.addEventListener("resize", h), window.addEventListener("orientationchange", h), o == null || o.addEventListener("resize", h), o == null || o.addEventListener("scroll", h), () => {
|
|
371
|
-
r && cancelAnimationFrame(r), s.disconnect(), window.removeEventListener("resize", h), window.removeEventListener("orientationchange", h), o == null || o.removeEventListener("resize", h), o == null || o.removeEventListener("scroll", h);
|
|
372
|
-
};
|
|
373
|
-
}, [e]), t;
|
|
374
|
-
}, J = (e) => {
|
|
375
|
-
e && (e.pause(), e.removeAttribute("src"), e.srcObject = null, e.load());
|
|
376
|
-
}, Q = (e) => {
|
|
377
|
-
e && e.removeAttribute("src");
|
|
378
|
-
}, He = ({
|
|
379
|
-
enabled: e,
|
|
380
|
-
imageAsset: t,
|
|
381
|
-
selectedSource: n,
|
|
382
|
-
videoAsset: a
|
|
383
|
-
}) => {
|
|
384
|
-
const r = k(null), i = k(null), [s, o] = y(null), [h, m] = y({ width: 0, height: 0 }), [d, g] = y("idle"), [p, c] = y(null);
|
|
385
|
-
return M(() => {
|
|
386
|
-
if (!e) {
|
|
387
|
-
J(r.current), Q(i.current), o(null), m({ width: 0, height: 0 }), g("idle"), c(null);
|
|
388
|
-
return;
|
|
389
|
-
}
|
|
390
|
-
let b = !1, w = null;
|
|
391
|
-
const S = (u, l) => {
|
|
392
|
-
b || (m({ width: u, height: l }), g("ready"), c(null));
|
|
393
|
-
}, v = () => {
|
|
394
|
-
J(r.current), Q(i.current), w == null || w.getTracks().forEach((u) => u.stop()), w = null, o(null);
|
|
395
|
-
}, A = async () => {
|
|
396
|
-
g("requesting");
|
|
397
|
-
const u = await navigator.mediaDevices.getUserMedia(Te);
|
|
398
|
-
if (b) {
|
|
399
|
-
u.getTracks().forEach((C) => C.stop());
|
|
400
|
-
return;
|
|
401
|
-
}
|
|
402
|
-
w = u, o(u);
|
|
403
|
-
const l = r.current;
|
|
404
|
-
l && (l.srcObject = u, l.muted = !0, l.playsInline = !0, l.autoplay = !0, await l.play(), S(l.videoWidth, l.videoHeight));
|
|
405
|
-
}, I = async (u) => {
|
|
406
|
-
g("requesting"), o(null);
|
|
407
|
-
const l = r.current;
|
|
408
|
-
l && (l.src = u, l.muted = !0, l.loop = !0, l.playsInline = !0, l.autoplay = !0, l.crossOrigin = "anonymous", await l.play(), S(l.videoWidth, l.videoHeight));
|
|
409
|
-
}, F = async (u) => {
|
|
410
|
-
g("requesting"), o(null);
|
|
411
|
-
const l = i.current;
|
|
412
|
-
l && (await new Promise((C, x) => {
|
|
413
|
-
l.onload = () => C(), l.onerror = () => x(new Error("Unable to load image")), l.src = u;
|
|
414
|
-
}), S(l.naturalWidth, l.naturalHeight));
|
|
415
|
-
};
|
|
416
|
-
return v(), (async () => {
|
|
417
|
-
try {
|
|
418
|
-
if (n === "webcam") {
|
|
419
|
-
await A();
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
if (n === "video") {
|
|
423
|
-
if (!(a != null && a.src))
|
|
424
|
-
throw new Error("Missing video source");
|
|
425
|
-
await I(a.src);
|
|
426
|
-
return;
|
|
427
|
-
}
|
|
428
|
-
if (!(t != null && t.src))
|
|
429
|
-
throw new Error("Missing image source");
|
|
430
|
-
await F(t.src);
|
|
431
|
-
} catch (u) {
|
|
432
|
-
if (b) return;
|
|
433
|
-
g("error"), c(u instanceof Error ? u.message : `Unable to initialize ${n}`);
|
|
434
|
-
}
|
|
435
|
-
})(), () => {
|
|
436
|
-
b = !0, v();
|
|
437
|
-
};
|
|
438
|
-
}, [e, t, n, a]), {
|
|
439
|
-
videoRef: r,
|
|
440
|
-
imageRef: i,
|
|
441
|
-
stream: s,
|
|
442
|
-
mediaSize: h,
|
|
443
|
-
status: d,
|
|
444
|
-
error: p
|
|
445
|
-
};
|
|
446
|
-
}, Ve = (e, t) => e === "auto" ? t === "webcam" ? "cover" : "contain" : e, De = ({
|
|
447
|
-
imageOptions: e,
|
|
448
|
-
initialImageId: t,
|
|
449
|
-
initialSource: n,
|
|
450
|
-
initialVideoId: a,
|
|
451
|
-
source: r,
|
|
452
|
-
videoOptions: i
|
|
453
|
-
}) => {
|
|
454
|
-
var d, g, p, c;
|
|
455
|
-
const s = (r == null ? void 0 : r.kind) ?? n ?? "webcam", o = s === "image" && e.length === 0 || s === "video" && i.length === 0 ? "webcam" : s, h = (r == null ? void 0 : r.kind) === "image" ? r.assetId ?? ((d = e[0]) == null ? void 0 : d.id) ?? "" : t ?? ((g = e[0]) == null ? void 0 : g.id) ?? "", m = (r == null ? void 0 : r.kind) === "video" ? r.assetId ?? ((p = i[0]) == null ? void 0 : p.id) ?? "" : a ?? ((c = i[0]) == null ? void 0 : c.id) ?? "";
|
|
456
|
-
return {
|
|
457
|
-
selectedSource: o,
|
|
458
|
-
selectedImageId: h,
|
|
459
|
-
selectedVideoId: m
|
|
460
|
-
};
|
|
461
|
-
}, _e = (e, t, n) => {
|
|
462
|
-
if (e.width <= 0 || e.height <= 0 || t.width <= 0 || t.height <= 0)
|
|
463
|
-
return null;
|
|
464
|
-
const a = n === "contain" ? Math.min(t.width / e.width, t.height / e.height) : Math.max(t.width / e.width, t.height / e.height), r = e.width * a, i = e.height * a, s = (t.width - r) * 0.5, o = (t.height - i) * 0.5;
|
|
465
|
-
return {
|
|
466
|
-
source: e,
|
|
467
|
-
destination: t,
|
|
468
|
-
drawWidth: r,
|
|
469
|
-
drawHeight: i,
|
|
470
|
-
offsetX: s,
|
|
471
|
-
offsetY: o,
|
|
472
|
-
scale: a
|
|
473
|
-
};
|
|
474
|
-
}, $e = (e, t) => {
|
|
475
|
-
if (e === "dom")
|
|
476
|
-
return {
|
|
477
|
-
sceneContent: null,
|
|
478
|
-
overlayContent: t
|
|
479
|
-
};
|
|
480
|
-
let n = null, a = null;
|
|
481
|
-
const r = [];
|
|
482
|
-
return we.forEach(t, (i) => {
|
|
483
|
-
var o;
|
|
484
|
-
if (!ve(i)) {
|
|
485
|
-
i != null && r.push(i);
|
|
486
|
-
return;
|
|
487
|
-
}
|
|
488
|
-
const s = (o = i.type) == null ? void 0 : o.displayName;
|
|
489
|
-
if (s === K.displayName) {
|
|
490
|
-
n = i.props.children;
|
|
491
|
-
return;
|
|
492
|
-
}
|
|
493
|
-
if (s === O.displayName) {
|
|
494
|
-
a = i.props.children;
|
|
495
|
-
return;
|
|
496
|
-
}
|
|
497
|
-
r.push(i);
|
|
498
|
-
}), !a && r.length > 0 && (a = r), {
|
|
499
|
-
sceneContent: n,
|
|
500
|
-
overlayContent: a
|
|
501
|
-
};
|
|
502
|
-
}, Z = (e, t) => typeof e == "function" ? e(t) : e, nt = () => ge(ie), qe = ({
|
|
204
|
+
}, Le = ({
|
|
503
205
|
imageRef: e,
|
|
504
206
|
selectedSource: t,
|
|
505
|
-
videoRef:
|
|
506
|
-
}) => /* @__PURE__ */
|
|
507
|
-
/* @__PURE__ */
|
|
207
|
+
videoRef: r
|
|
208
|
+
}) => /* @__PURE__ */ k(W, { children: [
|
|
209
|
+
/* @__PURE__ */ S(
|
|
508
210
|
"video",
|
|
509
211
|
{
|
|
510
|
-
ref:
|
|
212
|
+
ref: r,
|
|
511
213
|
style: {
|
|
512
214
|
position: "absolute",
|
|
513
215
|
width: 1,
|
|
@@ -517,7 +219,7 @@ const We = (e) => {
|
|
|
517
219
|
}
|
|
518
220
|
}
|
|
519
221
|
),
|
|
520
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ S(
|
|
521
223
|
"img",
|
|
522
224
|
{
|
|
523
225
|
ref: e,
|
|
@@ -531,13 +233,13 @@ const We = (e) => {
|
|
|
531
233
|
}
|
|
532
234
|
}
|
|
533
235
|
)
|
|
534
|
-
] }),
|
|
236
|
+
] }), te = ({
|
|
535
237
|
dock: e,
|
|
536
238
|
label: t,
|
|
537
|
-
onChange:
|
|
239
|
+
onChange: r,
|
|
538
240
|
options: a,
|
|
539
|
-
value:
|
|
540
|
-
}) => /* @__PURE__ */
|
|
241
|
+
value: s
|
|
242
|
+
}) => /* @__PURE__ */ S(
|
|
541
243
|
"div",
|
|
542
244
|
{
|
|
543
245
|
style: {
|
|
@@ -554,7 +256,7 @@ const We = (e) => {
|
|
|
554
256
|
boxShadow: "0 12px 30px rgba(0,0,0,0.18)",
|
|
555
257
|
backdropFilter: "blur(10px)"
|
|
556
258
|
},
|
|
557
|
-
children: /* @__PURE__ */
|
|
259
|
+
children: /* @__PURE__ */ k(
|
|
558
260
|
"label",
|
|
559
261
|
{
|
|
560
262
|
style: {
|
|
@@ -565,12 +267,12 @@ const We = (e) => {
|
|
|
565
267
|
fontWeight: 700
|
|
566
268
|
},
|
|
567
269
|
children: [
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ S("span", { children: t }),
|
|
271
|
+
/* @__PURE__ */ S(
|
|
570
272
|
"select",
|
|
571
273
|
{
|
|
572
|
-
value:
|
|
573
|
-
onChange: (
|
|
274
|
+
value: s,
|
|
275
|
+
onChange: (d) => r(d.target.value),
|
|
574
276
|
style: {
|
|
575
277
|
minWidth: 180,
|
|
576
278
|
maxWidth: "calc(100vw - 52px)",
|
|
@@ -581,7 +283,7 @@ const We = (e) => {
|
|
|
581
283
|
color: "#e5eefb",
|
|
582
284
|
padding: "0 10px"
|
|
583
285
|
},
|
|
584
|
-
children: a.map((
|
|
286
|
+
children: a.map((d) => /* @__PURE__ */ S("option", { value: d.id, style: { color: "#111827" }, children: d.label }, d.id))
|
|
585
287
|
}
|
|
586
288
|
)
|
|
587
289
|
]
|
|
@@ -591,21 +293,21 @@ const We = (e) => {
|
|
|
591
293
|
), Ne = ({
|
|
592
294
|
dock: e,
|
|
593
295
|
imageOptions: t,
|
|
594
|
-
selectedImageId:
|
|
296
|
+
selectedImageId: r,
|
|
595
297
|
selectedSource: a,
|
|
596
|
-
selectedVideoId:
|
|
597
|
-
setSelectedImageId:
|
|
598
|
-
setSelectedSource:
|
|
599
|
-
setSelectedVideoId:
|
|
600
|
-
showMediaControls:
|
|
601
|
-
videoOptions:
|
|
298
|
+
selectedVideoId: s,
|
|
299
|
+
setSelectedImageId: d,
|
|
300
|
+
setSelectedSource: u,
|
|
301
|
+
setSelectedVideoId: c,
|
|
302
|
+
showMediaControls: o,
|
|
303
|
+
videoOptions: p
|
|
602
304
|
}) => {
|
|
603
|
-
const [
|
|
604
|
-
return
|
|
305
|
+
const [h, n] = T(!1), f = ["webcam", "image", "video"].filter((g) => g === "image" ? t.length > 0 : g === "video" ? p.length > 0 : !0);
|
|
306
|
+
return o ? h ? /* @__PURE__ */ S(
|
|
605
307
|
"button",
|
|
606
308
|
{
|
|
607
309
|
type: "button",
|
|
608
|
-
onClick: () =>
|
|
310
|
+
onClick: () => n(!1),
|
|
609
311
|
"aria-label": "Open media controls",
|
|
610
312
|
title: "Open media controls",
|
|
611
313
|
style: {
|
|
@@ -626,8 +328,8 @@ const We = (e) => {
|
|
|
626
328
|
},
|
|
627
329
|
children: "≡"
|
|
628
330
|
}
|
|
629
|
-
) : /* @__PURE__ */
|
|
630
|
-
/* @__PURE__ */
|
|
331
|
+
) : /* @__PURE__ */ k(W, { children: [
|
|
332
|
+
/* @__PURE__ */ k(
|
|
631
333
|
"div",
|
|
632
334
|
{
|
|
633
335
|
style: {
|
|
@@ -642,7 +344,7 @@ const We = (e) => {
|
|
|
642
344
|
maxWidth: "calc(100vw - 32px)"
|
|
643
345
|
},
|
|
644
346
|
children: [
|
|
645
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ S(
|
|
646
348
|
"div",
|
|
647
349
|
{
|
|
648
350
|
style: {
|
|
@@ -657,15 +359,15 @@ const We = (e) => {
|
|
|
657
359
|
backdropFilter: "blur(10px)",
|
|
658
360
|
overflowX: "auto"
|
|
659
361
|
},
|
|
660
|
-
children:
|
|
661
|
-
const
|
|
662
|
-
return /* @__PURE__ */
|
|
362
|
+
children: f.map((g) => {
|
|
363
|
+
const i = g === a;
|
|
364
|
+
return /* @__PURE__ */ k(
|
|
663
365
|
"button",
|
|
664
366
|
{
|
|
665
367
|
type: "button",
|
|
666
|
-
onClick: () =>
|
|
667
|
-
"aria-pressed":
|
|
668
|
-
title:
|
|
368
|
+
onClick: () => u(g),
|
|
369
|
+
"aria-pressed": i,
|
|
370
|
+
title: B[g].label,
|
|
669
371
|
style: {
|
|
670
372
|
border: "none",
|
|
671
373
|
borderRadius: 999,
|
|
@@ -676,26 +378,26 @@ const We = (e) => {
|
|
|
676
378
|
alignItems: "center",
|
|
677
379
|
justifyContent: "center",
|
|
678
380
|
gap: 8,
|
|
679
|
-
background:
|
|
680
|
-
color:
|
|
381
|
+
background: i ? "rgba(56, 189, 248, 0.18)" : "rgba(255,255,255,0.04)",
|
|
382
|
+
color: i ? "#e0f2fe" : "rgba(229,238,251,0.82)",
|
|
681
383
|
cursor: "pointer",
|
|
682
384
|
flex: "0 0 auto"
|
|
683
385
|
},
|
|
684
386
|
children: [
|
|
685
|
-
/* @__PURE__ */
|
|
686
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ S("span", { style: { fontSize: 14, lineHeight: 1 }, children: B[g].icon }),
|
|
388
|
+
/* @__PURE__ */ S("span", { style: { fontSize: 12, fontWeight: 700, letterSpacing: "0.01em" }, children: B[g].label })
|
|
687
389
|
]
|
|
688
390
|
},
|
|
689
|
-
|
|
391
|
+
g
|
|
690
392
|
);
|
|
691
393
|
})
|
|
692
394
|
}
|
|
693
395
|
),
|
|
694
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ S(
|
|
695
397
|
"button",
|
|
696
398
|
{
|
|
697
399
|
type: "button",
|
|
698
|
-
onClick: () =>
|
|
400
|
+
onClick: () => n(!0),
|
|
699
401
|
"aria-label": "Close media controls",
|
|
700
402
|
title: "Close media controls",
|
|
701
403
|
style: {
|
|
@@ -716,226 +418,1389 @@ const We = (e) => {
|
|
|
716
418
|
]
|
|
717
419
|
}
|
|
718
420
|
),
|
|
719
|
-
a === "image" && t.length > 0 && /* @__PURE__ */
|
|
720
|
-
|
|
421
|
+
a === "image" && t.length > 0 && /* @__PURE__ */ S(
|
|
422
|
+
te,
|
|
721
423
|
{
|
|
722
424
|
dock: e,
|
|
723
425
|
label: "Image Asset",
|
|
724
426
|
options: t,
|
|
725
|
-
value:
|
|
726
|
-
onChange:
|
|
427
|
+
value: r,
|
|
428
|
+
onChange: d
|
|
727
429
|
}
|
|
728
430
|
),
|
|
729
|
-
a === "video" &&
|
|
730
|
-
|
|
431
|
+
a === "video" && p.length > 0 && /* @__PURE__ */ S(
|
|
432
|
+
te,
|
|
731
433
|
{
|
|
732
434
|
dock: e,
|
|
733
435
|
label: "Video Asset",
|
|
734
|
-
options:
|
|
735
|
-
value:
|
|
736
|
-
onChange:
|
|
436
|
+
options: p,
|
|
437
|
+
value: s,
|
|
438
|
+
onChange: c
|
|
737
439
|
}
|
|
738
440
|
)
|
|
739
441
|
] }) : null;
|
|
740
|
-
},
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
442
|
+
}, He = ({
|
|
443
|
+
containerRef: e,
|
|
444
|
+
displayCanvasRef: t,
|
|
445
|
+
imageOptions: r,
|
|
446
|
+
imageRef: a,
|
|
447
|
+
layout: s,
|
|
448
|
+
managesOwnMedia: d,
|
|
449
|
+
mediaDock: u,
|
|
450
|
+
mode: c,
|
|
451
|
+
overlayContent: o,
|
|
452
|
+
renderOutputs: p,
|
|
453
|
+
sceneContent: h,
|
|
454
|
+
selectedImageId: n,
|
|
455
|
+
selectedSource: f,
|
|
456
|
+
selectedVideoId: g,
|
|
457
|
+
setSceneRenderOutputs: i,
|
|
458
|
+
setSelectedImageId: l,
|
|
459
|
+
setSelectedSource: m,
|
|
460
|
+
setSelectedVideoId: y,
|
|
461
|
+
showMediaControls: R,
|
|
462
|
+
style: E,
|
|
463
|
+
videoOptions: _,
|
|
464
|
+
videoRef: I,
|
|
465
|
+
viewportSize: w,
|
|
466
|
+
mirrored: b
|
|
764
467
|
}) => {
|
|
765
|
-
const
|
|
766
|
-
|
|
767
|
-
imageOptions: n,
|
|
768
|
-
initialImageId: a,
|
|
769
|
-
initialSource: i,
|
|
770
|
-
initialVideoId: s,
|
|
771
|
-
source: g,
|
|
772
|
-
videoOptions: c
|
|
773
|
-
}),
|
|
774
|
-
[n, a, i, s, g, c]
|
|
775
|
-
), [A, I] = y(r), [F, L] = y(d), [u, l] = y(
|
|
776
|
-
v.selectedSource
|
|
777
|
-
), [C, x] = y(v.selectedImageId), [W, T] = y(v.selectedVideoId), E = o === "internal";
|
|
778
|
-
M(() => {
|
|
779
|
-
g && (l(v.selectedSource), x(v.selectedImageId), T(v.selectedVideoId));
|
|
780
|
-
}, [v, g]);
|
|
781
|
-
const B = n.find((U) => U.id === C) ?? n[0], H = c.find((U) => U.id === W) ?? c[0], R = He({
|
|
782
|
-
enabled: E,
|
|
783
|
-
imageAsset: B,
|
|
784
|
-
selectedSource: u,
|
|
785
|
-
videoAsset: H
|
|
786
|
-
}), N = Ve(t, u), V = G(
|
|
787
|
-
() => _e(R.mediaSize, S, N),
|
|
788
|
-
[R.mediaSize, N, S]
|
|
789
|
-
), P = Me(u, A), D = ze({
|
|
790
|
-
displayMirrored: P,
|
|
791
|
-
enabled: E && R.status === "ready" && V !== null,
|
|
792
|
-
imageRef: R.imageRef,
|
|
793
|
-
layout: V,
|
|
794
|
-
selectedSource: u,
|
|
795
|
-
sourceStream: R.stream,
|
|
796
|
-
videoRef: R.videoRef
|
|
797
|
-
}), Y = Pe({
|
|
798
|
-
enabled: !E,
|
|
799
|
-
selectedSource: u
|
|
800
|
-
}), ae = u === "image" ? `${X.image.label}: ${(B == null ? void 0 : B.label) ?? ""}` : u === "video" ? `${X.video.label}: ${(H == null ? void 0 : H.label) ?? ""}` : X.webcam.label, _ = {
|
|
801
|
-
activeDelegate: E ? D.activeDelegate : null,
|
|
802
|
-
faces: E ? D.faces : Y.faces,
|
|
803
|
-
imageOptions: n,
|
|
804
|
-
layout: V,
|
|
805
|
-
mediaError: R.error,
|
|
806
|
-
mediaFitMode: N,
|
|
807
|
-
mediaLabel: ae,
|
|
808
|
-
mediaStatus: R.status,
|
|
809
|
-
mirrored: P,
|
|
810
|
-
selectedImageId: C,
|
|
811
|
-
selectedSource: u,
|
|
812
|
-
selectedVideoId: W,
|
|
813
|
-
setMirrored: I,
|
|
814
|
-
setSelectedImageId: x,
|
|
815
|
-
setSelectedSource: l,
|
|
816
|
-
setSelectedVideoId: T,
|
|
817
|
-
setShowMediaControls: L,
|
|
818
|
-
showMediaControls: F,
|
|
819
|
-
trackerError: E ? D.error : null,
|
|
820
|
-
trackerStatus: E ? D.status : Y.trackerStatus,
|
|
821
|
-
videoOptions: c,
|
|
822
|
-
viewportSize: S,
|
|
823
|
-
mediaSize: R.mediaSize
|
|
824
|
-
}, se = typeof e == "function" ? e(_) : e, { sceneContent: le, overlayContent: ce } = $e(m, se), de = Z(
|
|
825
|
-
le,
|
|
826
|
-
_
|
|
827
|
-
), ue = Z(
|
|
828
|
-
ce,
|
|
829
|
-
_
|
|
830
|
-
);
|
|
831
|
-
return /* @__PURE__ */ f(ie.Provider, { value: _, children: /* @__PURE__ */ z(
|
|
468
|
+
const { session: x } = oe();
|
|
469
|
+
return /* @__PURE__ */ k(
|
|
832
470
|
"div",
|
|
833
471
|
{
|
|
834
|
-
ref:
|
|
472
|
+
ref: e,
|
|
835
473
|
style: {
|
|
836
474
|
position: "fixed",
|
|
837
475
|
inset: 0,
|
|
838
476
|
overflow: "hidden",
|
|
839
477
|
background: "#000",
|
|
840
|
-
...
|
|
478
|
+
...E
|
|
841
479
|
},
|
|
842
480
|
children: [
|
|
843
|
-
/* @__PURE__ */ f
|
|
844
|
-
|
|
481
|
+
/* @__PURE__ */ S(Le, { imageRef: a, selectedSource: f, videoRef: I }),
|
|
482
|
+
c === "dom" && d && /* @__PURE__ */ S(
|
|
483
|
+
Fe,
|
|
845
484
|
{
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
videoRef:
|
|
485
|
+
canvasRef: t,
|
|
486
|
+
imageRef: a,
|
|
487
|
+
videoRef: I,
|
|
488
|
+
layer: De,
|
|
489
|
+
layout: s,
|
|
490
|
+
mirrored: b,
|
|
491
|
+
onCaptureTarget: x._setCaptureTarget,
|
|
492
|
+
sourceKind: f === "image" ? "image" : "video"
|
|
849
493
|
}
|
|
850
494
|
),
|
|
851
|
-
|
|
852
|
-
|
|
495
|
+
(c === "r3f" || c === "hybrid") && /* @__PURE__ */ S(X, { config: Be, children: /* @__PURE__ */ S(
|
|
496
|
+
Ae,
|
|
853
497
|
{
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
498
|
+
onRenderOutputs: i,
|
|
499
|
+
renderOutputs: {
|
|
500
|
+
sceneColor: p.sceneColor || p.finalColor,
|
|
501
|
+
sceneDepth: p.sceneDepth
|
|
502
|
+
},
|
|
503
|
+
renderTargetSize: w,
|
|
504
|
+
style: { width: "100%", height: "100%" },
|
|
505
|
+
children: h
|
|
861
506
|
}
|
|
862
|
-
),
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
E && /* @__PURE__ */ f(
|
|
507
|
+
) }),
|
|
508
|
+
/* @__PURE__ */ k(X, { config: ke, children: [
|
|
509
|
+
d && /* @__PURE__ */ S(
|
|
866
510
|
Ne,
|
|
867
511
|
{
|
|
868
|
-
dock:
|
|
869
|
-
imageOptions:
|
|
870
|
-
selectedImageId:
|
|
871
|
-
selectedSource:
|
|
872
|
-
selectedVideoId:
|
|
873
|
-
setSelectedImageId:
|
|
874
|
-
setSelectedSource:
|
|
875
|
-
setSelectedVideoId:
|
|
876
|
-
showMediaControls:
|
|
877
|
-
videoOptions:
|
|
512
|
+
dock: u,
|
|
513
|
+
imageOptions: r,
|
|
514
|
+
selectedImageId: n,
|
|
515
|
+
selectedSource: f,
|
|
516
|
+
selectedVideoId: g,
|
|
517
|
+
setSelectedImageId: l,
|
|
518
|
+
setSelectedSource: m,
|
|
519
|
+
setSelectedVideoId: y,
|
|
520
|
+
showMediaControls: R,
|
|
521
|
+
videoOptions: _
|
|
878
522
|
}
|
|
879
523
|
),
|
|
880
|
-
|
|
524
|
+
o
|
|
881
525
|
] })
|
|
882
526
|
]
|
|
883
527
|
}
|
|
884
|
-
)
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
528
|
+
);
|
|
529
|
+
}, Ge = 5, Pe = 1, Xe = (e, t) => t, We = "brightness(2.2) contrast(1.5) saturate(1.25)", ze = ({
|
|
530
|
+
enabled: e,
|
|
531
|
+
displayMirrored: t,
|
|
532
|
+
imageRef: r,
|
|
533
|
+
layout: a,
|
|
534
|
+
mode: s,
|
|
535
|
+
numFaces: d,
|
|
536
|
+
selectedSource: u,
|
|
537
|
+
sourceStream: c,
|
|
538
|
+
videoRef: o
|
|
539
|
+
}) => {
|
|
540
|
+
const { session: p } = oe(), h = D(null), n = D(!1), f = D(document.createElement("canvas")), {
|
|
541
|
+
ready: g,
|
|
542
|
+
node: i,
|
|
543
|
+
error: l
|
|
544
|
+
} = Re(N.FACE_TRACKER, {
|
|
545
|
+
numFaces: d ?? (s === "head-binding" ? Pe : Ge)
|
|
546
|
+
}), [m, y] = T("idle"), [R, E] = T(null), _ = e && g && !!i, I = ie({
|
|
547
|
+
node: _ ? i : null,
|
|
548
|
+
enabled: _,
|
|
549
|
+
selectedSource: u,
|
|
550
|
+
onFrame: _e(() => {
|
|
551
|
+
E(null), y("ready");
|
|
552
|
+
}, [])
|
|
553
|
+
});
|
|
554
|
+
return F(() => {
|
|
555
|
+
if (!e || !a) return;
|
|
556
|
+
const w = () => {
|
|
557
|
+
const v = u === "image" ? r.current : o.current;
|
|
558
|
+
if (v) {
|
|
559
|
+
if (v instanceof HTMLImageElement) {
|
|
560
|
+
if (!v.complete || v.naturalWidth <= 0 || v.naturalHeight <= 0) return;
|
|
561
|
+
} else if (v.readyState < 2 || v.videoWidth <= 0 || v.videoHeight <= 0)
|
|
562
|
+
return;
|
|
563
|
+
U({
|
|
564
|
+
canvas: f.current,
|
|
565
|
+
layout: a,
|
|
566
|
+
media: v,
|
|
567
|
+
mirrored: t,
|
|
568
|
+
filter: u === "webcam" ? We : void 0
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
if (u === "image") {
|
|
573
|
+
w();
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
let b = 0;
|
|
577
|
+
const x = () => {
|
|
578
|
+
b = requestAnimationFrame(x), w();
|
|
579
|
+
};
|
|
580
|
+
return b = requestAnimationFrame(x), () => cancelAnimationFrame(b);
|
|
581
|
+
}, [t, e, r, a, u, o]), F(() => {
|
|
582
|
+
var H;
|
|
583
|
+
if (!e) {
|
|
584
|
+
y("idle"), E(null), n.current = !1, h.current = null;
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
if (!a) {
|
|
588
|
+
y("initializing");
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
const w = (c == null ? void 0 : c.id) ?? (((H = o.current) == null ? void 0 : H.srcObject) instanceof MediaStream ? o.current.srcObject.id : "none"), x = u === "webcam" ? `webcam:${w}` : u;
|
|
592
|
+
h.current !== x && (n.current = !1, h.current = x);
|
|
593
|
+
let v = !1;
|
|
594
|
+
return (async () => {
|
|
595
|
+
try {
|
|
596
|
+
y("initializing");
|
|
597
|
+
const C = !n.current;
|
|
598
|
+
if (C && await p.setFrameSource({
|
|
599
|
+
canvas: f.current,
|
|
600
|
+
sourceKind: u
|
|
601
|
+
}), await p._setRenderSize(
|
|
602
|
+
Math.round(a.destination.width),
|
|
603
|
+
Math.round(a.destination.height)
|
|
604
|
+
), C && (await p.start(), n.current = !0), v) return;
|
|
605
|
+
E(null), y("initializing");
|
|
606
|
+
} catch (C) {
|
|
607
|
+
if (v) return;
|
|
608
|
+
y("error"), E(C instanceof Error ? C.message : "Failed to initialize SDK face tracking");
|
|
609
|
+
}
|
|
610
|
+
})(), () => {
|
|
611
|
+
v = !0;
|
|
612
|
+
};
|
|
613
|
+
}, [e, a, u, p, c, o]), F(() => {
|
|
614
|
+
!_ && e && !l && y("initializing");
|
|
615
|
+
}, [_, e, l]), F(() => {
|
|
616
|
+
l && (y("error"), E(l.message));
|
|
617
|
+
}, [l]), F(() => () => {
|
|
618
|
+
n.current = !1, p.stop();
|
|
619
|
+
}, [p]), {
|
|
620
|
+
activeDelegate: "GPU",
|
|
621
|
+
faces: I,
|
|
622
|
+
status: m,
|
|
623
|
+
error: R
|
|
624
|
+
};
|
|
625
|
+
}, Ye = (e, t) => e === "auto" ? t === "webcam" ? "cover" : "contain" : e, Ve = ({
|
|
626
|
+
imageOptions: e,
|
|
627
|
+
initialImageId: t,
|
|
628
|
+
initialSource: r,
|
|
629
|
+
initialVideoId: a,
|
|
630
|
+
source: s,
|
|
631
|
+
videoOptions: d
|
|
632
|
+
}) => {
|
|
633
|
+
var o, p, h, n;
|
|
634
|
+
const u = (s == null ? void 0 : s.kind) ?? r ?? "webcam";
|
|
635
|
+
return {
|
|
636
|
+
selectedSource: u === "image" && e.length === 0 || u === "video" && d.length === 0 ? "webcam" : u,
|
|
637
|
+
selectedImageId: (s == null ? void 0 : s.kind) === "image" ? s.assetId ?? ((o = e[0]) == null ? void 0 : o.id) ?? "" : t ?? ((p = e[0]) == null ? void 0 : p.id) ?? "",
|
|
638
|
+
selectedVideoId: (s == null ? void 0 : s.kind) === "video" ? s.assetId ?? ((h = d[0]) == null ? void 0 : h.id) ?? "" : a ?? ((n = d[0]) == null ? void 0 : n.id) ?? ""
|
|
639
|
+
};
|
|
640
|
+
}, $e = (e, t, r) => {
|
|
641
|
+
if (e.width <= 0 || e.height <= 0 || t.width <= 0 || t.height <= 0)
|
|
642
|
+
return null;
|
|
643
|
+
const a = he(e, t, r);
|
|
644
|
+
return a ? { source: e, destination: t, ...a } : null;
|
|
645
|
+
}, Ue = (e) => {
|
|
646
|
+
if (!e) return { width: 0, height: 0 };
|
|
647
|
+
const t = e.getBoundingClientRect();
|
|
648
|
+
return {
|
|
649
|
+
width: t.width || e.clientWidth,
|
|
650
|
+
height: t.height || e.clientHeight
|
|
651
|
+
};
|
|
652
|
+
}, qe = (e) => {
|
|
653
|
+
const [t, r] = T({ width: 0, height: 0 });
|
|
654
|
+
return Ee(() => {
|
|
655
|
+
const a = e.current;
|
|
656
|
+
if (!a) return;
|
|
657
|
+
let s = 0;
|
|
658
|
+
const d = () => {
|
|
659
|
+
const p = Ue(a);
|
|
660
|
+
r(
|
|
661
|
+
(h) => h.width === p.width && h.height === p.height ? h : p
|
|
662
|
+
);
|
|
663
|
+
}, u = () => {
|
|
664
|
+
d(), s && cancelAnimationFrame(s), s = requestAnimationFrame(d);
|
|
665
|
+
};
|
|
666
|
+
u();
|
|
667
|
+
const c = new ResizeObserver(u);
|
|
668
|
+
c.observe(a);
|
|
669
|
+
const o = window.visualViewport;
|
|
670
|
+
return window.addEventListener("resize", u), window.addEventListener("orientationchange", u), o == null || o.addEventListener("resize", u), o == null || o.addEventListener("scroll", u), () => {
|
|
671
|
+
s && cancelAnimationFrame(s), c.disconnect(), window.removeEventListener("resize", u), window.removeEventListener("orientationchange", u), o == null || o.removeEventListener("resize", u), o == null || o.removeEventListener("scroll", u);
|
|
672
|
+
};
|
|
673
|
+
}, [e]), t;
|
|
674
|
+
}, Ke = ({
|
|
675
|
+
enabled: e,
|
|
676
|
+
selectedSource: t
|
|
677
|
+
}) => {
|
|
678
|
+
const r = we(N.FACE_TRACKER);
|
|
679
|
+
return {
|
|
680
|
+
faces: ie({ node: r, enabled: e, selectedSource: t }),
|
|
681
|
+
trackerStatus: r ? "ready" : "idle"
|
|
682
|
+
};
|
|
683
|
+
}, ae = (e) => {
|
|
684
|
+
e && (e.pause(), e.removeAttribute("src"), e.srcObject = null, e.load());
|
|
685
|
+
}, re = (e) => {
|
|
686
|
+
e && e.removeAttribute("src");
|
|
687
|
+
}, je = ({
|
|
688
|
+
enabled: e,
|
|
689
|
+
imageAsset: t,
|
|
690
|
+
selectedSource: r,
|
|
691
|
+
videoAsset: a
|
|
692
|
+
}) => {
|
|
693
|
+
const s = D(null), d = D(null), [u, c] = T(null), [o, p] = T({ width: 0, height: 0 }), [h, n] = T("idle"), [f, g] = T(null);
|
|
694
|
+
return F(() => {
|
|
695
|
+
if (!e) {
|
|
696
|
+
ae(s.current), re(d.current), c(null), p({ width: 0, height: 0 }), n("idle"), g(null);
|
|
697
|
+
return;
|
|
698
|
+
}
|
|
699
|
+
let i = !1, l = null;
|
|
700
|
+
const m = (w, b) => {
|
|
701
|
+
i || (p({ width: w, height: b }), n("ready"), g(null));
|
|
702
|
+
}, y = () => {
|
|
703
|
+
ae(s.current), re(d.current), l == null || l.getTracks().forEach((w) => w.stop()), l = null, c(null);
|
|
704
|
+
}, R = async () => {
|
|
705
|
+
n("requesting");
|
|
706
|
+
const w = await navigator.mediaDevices.getUserMedia(Oe);
|
|
707
|
+
if (i) {
|
|
708
|
+
w.getTracks().forEach((x) => x.stop());
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
l = w, c(w);
|
|
712
|
+
const b = s.current;
|
|
713
|
+
b && (b.srcObject = w, b.muted = !0, b.playsInline = !0, b.autoplay = !0, await b.play(), m(b.videoWidth, b.videoHeight));
|
|
714
|
+
}, E = async (w) => {
|
|
715
|
+
n("requesting"), c(null);
|
|
716
|
+
const b = s.current;
|
|
717
|
+
b && (b.src = w, b.muted = !0, b.loop = !0, b.playsInline = !0, b.autoplay = !0, b.crossOrigin = "anonymous", await b.play(), m(b.videoWidth, b.videoHeight));
|
|
718
|
+
}, _ = async (w) => {
|
|
719
|
+
n("requesting"), c(null);
|
|
720
|
+
const b = d.current;
|
|
721
|
+
b && (await new Promise((x, v) => {
|
|
722
|
+
b.onload = () => x(), b.onerror = () => v(new Error("Unable to load image")), b.src = w;
|
|
723
|
+
}), m(b.naturalWidth, b.naturalHeight));
|
|
724
|
+
};
|
|
725
|
+
return y(), (async () => {
|
|
726
|
+
try {
|
|
727
|
+
if (r === "webcam") {
|
|
728
|
+
await R();
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
if (r === "video") {
|
|
732
|
+
if (!(a != null && a.src)) throw new Error("Missing video source");
|
|
733
|
+
await E(a.src);
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
if (!(t != null && t.src)) throw new Error("Missing image source");
|
|
737
|
+
await _(t.src);
|
|
738
|
+
} catch (w) {
|
|
739
|
+
if (i) return;
|
|
740
|
+
n("error"), g(w instanceof Error ? w.message : `Unable to initialize ${r}`);
|
|
741
|
+
}
|
|
742
|
+
})(), () => {
|
|
743
|
+
i = !0, y();
|
|
744
|
+
};
|
|
745
|
+
}, [e, t, r, a]), {
|
|
746
|
+
videoRef: s,
|
|
747
|
+
imageRef: d,
|
|
748
|
+
stream: u,
|
|
749
|
+
mediaSize: o,
|
|
750
|
+
status: h,
|
|
751
|
+
error: f
|
|
752
|
+
};
|
|
753
|
+
}, Je = ({
|
|
754
|
+
enabled: e,
|
|
755
|
+
imageRef: t,
|
|
756
|
+
selectedSource: r,
|
|
757
|
+
status: a,
|
|
758
|
+
videoRef: s
|
|
759
|
+
}) => {
|
|
760
|
+
const [d, u] = T(null);
|
|
761
|
+
return F(() => {
|
|
762
|
+
if (!e || a !== "ready") {
|
|
763
|
+
u((p) => (p == null || p.dispose(), null));
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
766
|
+
const c = r === "image" ? t.current : s.current;
|
|
767
|
+
if (!c) return;
|
|
768
|
+
const o = r === "image" ? new L.Texture(c) : new L.VideoTexture(c);
|
|
769
|
+
return o.colorSpace = L.SRGBColorSpace, o.minFilter = L.LinearFilter, o.magFilter = L.LinearFilter, o.generateMipmaps = !1, o.needsUpdate = !0, u((p) => (p == null || p.dispose(), o)), () => {
|
|
770
|
+
o.dispose();
|
|
771
|
+
};
|
|
772
|
+
}, [e, t, r, a, s]), d;
|
|
773
|
+
}, Qe = ({
|
|
774
|
+
externalTracker: e,
|
|
775
|
+
imageOptions: t,
|
|
776
|
+
layout: r,
|
|
777
|
+
managesOwnMedia: a,
|
|
778
|
+
mediaError: s,
|
|
779
|
+
mediaFitMode: d,
|
|
780
|
+
mediaSize: u,
|
|
781
|
+
mediaStatus: c,
|
|
782
|
+
mirrored: o,
|
|
783
|
+
selectedImage: p,
|
|
784
|
+
selectedImageId: h,
|
|
785
|
+
selectedSource: n,
|
|
786
|
+
selectedVideo: f,
|
|
787
|
+
selectedVideoId: g,
|
|
788
|
+
setMirrored: i,
|
|
789
|
+
setSelectedImageId: l,
|
|
790
|
+
setSelectedSource: m,
|
|
791
|
+
setSelectedVideoId: y,
|
|
792
|
+
setShowMediaControls: R,
|
|
793
|
+
showMediaControls: E,
|
|
794
|
+
tracker: _,
|
|
795
|
+
videoOptions: I,
|
|
796
|
+
viewportSize: w
|
|
797
|
+
}) => {
|
|
798
|
+
const b = n === "image" ? `${B.image.label}: ${(p == null ? void 0 : p.label) ?? ""}` : n === "video" ? `${B.video.label}: ${(f == null ? void 0 : f.label) ?? ""}` : B.webcam.label;
|
|
799
|
+
return {
|
|
800
|
+
activeDelegate: a ? _.activeDelegate : null,
|
|
801
|
+
faces: a ? _.faces : e.faces,
|
|
802
|
+
imageOptions: t,
|
|
803
|
+
layout: r,
|
|
804
|
+
mediaError: s,
|
|
805
|
+
mediaFitMode: d,
|
|
806
|
+
mediaLabel: b,
|
|
807
|
+
mediaStatus: c,
|
|
808
|
+
mirrored: o,
|
|
809
|
+
selectedImageId: h,
|
|
810
|
+
selectedSource: n,
|
|
811
|
+
selectedVideoId: g,
|
|
812
|
+
setMirrored: i,
|
|
813
|
+
setSelectedImageId: l,
|
|
814
|
+
setSelectedSource: m,
|
|
815
|
+
setSelectedVideoId: y,
|
|
816
|
+
setShowMediaControls: R,
|
|
817
|
+
showMediaControls: E,
|
|
818
|
+
trackerError: a ? _.error : null,
|
|
819
|
+
trackerStatus: a ? _.status : e.trackerStatus,
|
|
820
|
+
videoOptions: I,
|
|
821
|
+
viewportSize: w,
|
|
822
|
+
mediaSize: u
|
|
823
|
+
};
|
|
824
|
+
}, Ze = ({
|
|
825
|
+
mediaTexture: e,
|
|
826
|
+
previewMode: t,
|
|
827
|
+
renderOutputs: r,
|
|
828
|
+
sceneRenderOutputs: a
|
|
829
|
+
}) => $(
|
|
830
|
+
() => ({
|
|
831
|
+
requested: r,
|
|
832
|
+
previewMode: t,
|
|
833
|
+
mediaColorTexture: e,
|
|
834
|
+
sceneColorTexture: a.sceneColorTexture,
|
|
835
|
+
finalColorTexture: r.finalColor ? a.sceneColorTexture : null,
|
|
836
|
+
sceneDepthTexture: a.sceneDepthTexture,
|
|
837
|
+
estimatedDepthTexture: null,
|
|
838
|
+
available: {
|
|
839
|
+
mediaColor: e !== null,
|
|
840
|
+
sceneColor: a.sceneColorTexture !== null,
|
|
841
|
+
finalColor: !!(r.finalColor && a.sceneColorTexture),
|
|
842
|
+
sceneDepth: a.sceneDepthTexture !== null,
|
|
843
|
+
estimatedDepth: !1
|
|
844
|
+
}
|
|
845
|
+
}),
|
|
846
|
+
[e, t, r, a]
|
|
847
|
+
), et = ({
|
|
848
|
+
fitMode: e,
|
|
849
|
+
imageOptions: t,
|
|
850
|
+
initialImageId: r,
|
|
851
|
+
initialMirrored: a,
|
|
852
|
+
initialSource: s,
|
|
853
|
+
initialVideoId: d,
|
|
854
|
+
mediaStrategy: u,
|
|
855
|
+
previewMode: c,
|
|
856
|
+
renderOutputs: o,
|
|
857
|
+
showMediaControlsByDefault: p,
|
|
858
|
+
source: h,
|
|
859
|
+
videoOptions: n
|
|
860
|
+
}) => {
|
|
861
|
+
const f = D(null), g = D(null), i = qe(f), l = $(
|
|
862
|
+
() => Ve({
|
|
863
|
+
imageOptions: t,
|
|
864
|
+
initialImageId: r,
|
|
865
|
+
initialSource: s,
|
|
866
|
+
initialVideoId: d,
|
|
867
|
+
source: h,
|
|
868
|
+
videoOptions: n
|
|
869
|
+
}),
|
|
870
|
+
[t, r, s, d, h, n]
|
|
871
|
+
), [m, y] = T(a), [R, E] = T(p), [_, I] = T(
|
|
872
|
+
l.selectedSource
|
|
873
|
+
), [w, b] = T(l.selectedImageId), [x, v] = T(l.selectedVideoId), [J, H] = T({
|
|
874
|
+
sceneColorTexture: null,
|
|
875
|
+
sceneDepthTexture: null
|
|
876
|
+
}), C = u === "internal";
|
|
877
|
+
F(() => {
|
|
878
|
+
h && (I(l.selectedSource), b(l.selectedImageId), v(l.selectedVideoId));
|
|
879
|
+
}, [l, h]);
|
|
880
|
+
const Q = t.find((V) => V.id === w) ?? t[0], Z = n.find((V) => V.id === x) ?? n[0], A = je({
|
|
881
|
+
enabled: C,
|
|
882
|
+
imageAsset: Q,
|
|
883
|
+
selectedSource: _,
|
|
884
|
+
videoAsset: Z
|
|
885
|
+
}), z = Ye(e, _), G = $(
|
|
886
|
+
() => $e(A.mediaSize, i, z),
|
|
887
|
+
[A.mediaSize, z, i]
|
|
888
|
+
), ce = Je({
|
|
889
|
+
enabled: !!(o.mediaColor || o.finalColor),
|
|
890
|
+
imageRef: A.imageRef,
|
|
891
|
+
selectedSource: _,
|
|
892
|
+
status: A.status,
|
|
893
|
+
videoRef: A.videoRef
|
|
894
|
+
}), Y = Xe(_, m), ue = ze({
|
|
895
|
+
displayMirrored: Y,
|
|
896
|
+
enabled: C && A.status === "ready" && G !== null,
|
|
897
|
+
imageRef: A.imageRef,
|
|
898
|
+
layout: G,
|
|
899
|
+
selectedSource: _,
|
|
900
|
+
sourceStream: A.stream,
|
|
901
|
+
videoRef: A.videoRef
|
|
902
|
+
}), me = Ke({
|
|
903
|
+
enabled: !C,
|
|
904
|
+
selectedSource: _
|
|
905
|
+
}), pe = Qe({
|
|
906
|
+
externalTracker: me,
|
|
907
|
+
imageOptions: t,
|
|
908
|
+
layout: G,
|
|
909
|
+
managesOwnMedia: C,
|
|
910
|
+
mediaError: A.error,
|
|
911
|
+
mediaFitMode: z,
|
|
912
|
+
mediaSize: A.mediaSize,
|
|
913
|
+
mediaStatus: A.status,
|
|
914
|
+
mirrored: Y,
|
|
915
|
+
selectedImage: Q,
|
|
916
|
+
selectedImageId: w,
|
|
917
|
+
selectedSource: _,
|
|
918
|
+
selectedVideo: Z,
|
|
919
|
+
selectedVideoId: x,
|
|
920
|
+
setMirrored: y,
|
|
921
|
+
setSelectedImageId: b,
|
|
922
|
+
setSelectedSource: I,
|
|
923
|
+
setSelectedVideoId: v,
|
|
924
|
+
setShowMediaControls: E,
|
|
925
|
+
showMediaControls: R,
|
|
926
|
+
tracker: ue,
|
|
927
|
+
videoOptions: n,
|
|
928
|
+
viewportSize: i
|
|
929
|
+
}), fe = Ze({
|
|
930
|
+
mediaTexture: ce,
|
|
931
|
+
previewMode: c,
|
|
932
|
+
renderOutputs: o,
|
|
933
|
+
sceneRenderOutputs: J
|
|
934
|
+
});
|
|
935
|
+
return {
|
|
936
|
+
containerRef: f,
|
|
937
|
+
displayCanvasRef: g,
|
|
938
|
+
displayMirrored: Y,
|
|
939
|
+
layout: G,
|
|
940
|
+
managesOwnMedia: C,
|
|
941
|
+
media: A,
|
|
942
|
+
renderOutputState: fe,
|
|
943
|
+
renderState: pe,
|
|
944
|
+
selectedImageId: w,
|
|
945
|
+
selectedSource: _,
|
|
946
|
+
selectedVideoId: x,
|
|
947
|
+
setSceneRenderOutputs: H,
|
|
948
|
+
setSelectedImageId: b,
|
|
949
|
+
setSelectedSource: I,
|
|
950
|
+
setSelectedVideoId: v,
|
|
951
|
+
showMediaControls: R,
|
|
952
|
+
viewportSize: i
|
|
953
|
+
};
|
|
954
|
+
}, K = ({ children: e }) => /* @__PURE__ */ S(W, { children: e });
|
|
955
|
+
K.displayName = "XRViewport.Scene";
|
|
956
|
+
const j = ({ children: e }) => /* @__PURE__ */ S(W, { children: e });
|
|
957
|
+
j.displayName = "XRViewport.Overlay";
|
|
958
|
+
const tt = (e, t) => {
|
|
959
|
+
if (e === "dom")
|
|
960
|
+
return {
|
|
961
|
+
sceneContent: null,
|
|
962
|
+
overlayContent: t
|
|
963
|
+
};
|
|
964
|
+
let r = null, a = null;
|
|
965
|
+
const s = [];
|
|
966
|
+
return ve.forEach(t, (d) => {
|
|
967
|
+
var c;
|
|
968
|
+
if (!Ie(d)) {
|
|
969
|
+
d != null && s.push(d);
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
972
|
+
const u = (c = d.type) == null ? void 0 : c.displayName;
|
|
973
|
+
if (u === K.displayName) {
|
|
974
|
+
r = d.props.children;
|
|
975
|
+
return;
|
|
976
|
+
}
|
|
977
|
+
if (u === j.displayName) {
|
|
978
|
+
a = d.props.children;
|
|
979
|
+
return;
|
|
980
|
+
}
|
|
981
|
+
s.push(d);
|
|
982
|
+
}), !a && s.length > 0 && (a = s), {
|
|
983
|
+
sceneContent: r,
|
|
984
|
+
overlayContent: a
|
|
985
|
+
};
|
|
986
|
+
}, se = (e, t) => typeof e == "function" ? e(t) : e;
|
|
987
|
+
function at(e) {
|
|
988
|
+
return e.Scene = K, e.Overlay = j, e;
|
|
989
|
+
}
|
|
990
|
+
const wt = at(({
|
|
991
|
+
children: e,
|
|
992
|
+
fitMode: t = "auto",
|
|
993
|
+
imageOptions: r = [],
|
|
994
|
+
initialImageId: a,
|
|
995
|
+
initialMirrored: s = !0,
|
|
996
|
+
initialSource: d = "webcam",
|
|
997
|
+
initialVideoId: u,
|
|
998
|
+
mediaStrategy: c = "internal",
|
|
999
|
+
mediaDock: o = "bottom-left",
|
|
1000
|
+
mode: p = "dom",
|
|
1001
|
+
previewMode: h = "finalColor",
|
|
1002
|
+
renderOutputs: n = {},
|
|
1003
|
+
showMediaControlsByDefault: f = !0,
|
|
1004
|
+
source: g,
|
|
1005
|
+
style: i,
|
|
1006
|
+
videoOptions: l = []
|
|
1007
|
+
}) => {
|
|
1008
|
+
const m = et({
|
|
1009
|
+
fitMode: t,
|
|
1010
|
+
imageOptions: r,
|
|
1011
|
+
initialImageId: a,
|
|
1012
|
+
initialMirrored: s,
|
|
1013
|
+
initialSource: d,
|
|
1014
|
+
initialVideoId: u,
|
|
1015
|
+
mediaStrategy: c,
|
|
1016
|
+
previewMode: h,
|
|
1017
|
+
renderOutputs: n,
|
|
1018
|
+
showMediaControlsByDefault: f,
|
|
1019
|
+
source: g,
|
|
1020
|
+
videoOptions: l
|
|
1021
|
+
}), y = typeof e == "function" ? e(m.renderState) : e, { sceneContent: R, overlayContent: E } = tt(p, y), _ = se(
|
|
1022
|
+
R,
|
|
1023
|
+
m.renderState
|
|
1024
|
+
), I = se(
|
|
1025
|
+
E,
|
|
1026
|
+
m.renderState
|
|
1027
|
+
);
|
|
1028
|
+
return /* @__PURE__ */ S(Me.Provider, { value: m.renderState, children: /* @__PURE__ */ S(Ce.Provider, { value: m.renderOutputState, children: /* @__PURE__ */ S(
|
|
1029
|
+
He,
|
|
1030
|
+
{
|
|
1031
|
+
containerRef: m.containerRef,
|
|
1032
|
+
displayCanvasRef: m.displayCanvasRef,
|
|
1033
|
+
imageOptions: r,
|
|
1034
|
+
imageRef: m.media.imageRef,
|
|
1035
|
+
layout: m.layout,
|
|
1036
|
+
managesOwnMedia: m.managesOwnMedia,
|
|
1037
|
+
mediaDock: o,
|
|
1038
|
+
mirrored: m.displayMirrored,
|
|
1039
|
+
mode: p,
|
|
1040
|
+
overlayContent: I,
|
|
1041
|
+
renderOutputs: n,
|
|
1042
|
+
sceneContent: _,
|
|
1043
|
+
selectedImageId: m.selectedImageId,
|
|
1044
|
+
selectedSource: m.selectedSource,
|
|
1045
|
+
selectedVideoId: m.selectedVideoId,
|
|
1046
|
+
setSceneRenderOutputs: m.setSceneRenderOutputs,
|
|
1047
|
+
setSelectedImageId: m.setSelectedImageId,
|
|
1048
|
+
setSelectedSource: m.setSelectedSource,
|
|
1049
|
+
setSelectedVideoId: m.setSelectedVideoId,
|
|
1050
|
+
showMediaControls: m.showMediaControls,
|
|
1051
|
+
style: i,
|
|
1052
|
+
videoOptions: l,
|
|
1053
|
+
videoRef: m.media.videoRef,
|
|
1054
|
+
viewportSize: m.viewportSize
|
|
1055
|
+
}
|
|
1056
|
+
) }) });
|
|
1057
|
+
}), rt = {
|
|
1058
|
+
position: "absolute",
|
|
1059
|
+
top: -28,
|
|
1060
|
+
left: 0,
|
|
1061
|
+
background: "rgba(34, 197, 94, 0.9)",
|
|
1062
|
+
color: "#04130a",
|
|
1063
|
+
fontFamily: "Menlo, Monaco, Consolas, monospace",
|
|
1064
|
+
fontSize: 12,
|
|
1065
|
+
fontWeight: 700,
|
|
1066
|
+
padding: "4px 8px",
|
|
1067
|
+
whiteSpace: "nowrap"
|
|
1068
|
+
}, _t = ({
|
|
1069
|
+
boundingBox: e,
|
|
1070
|
+
label: t = "face bounding box",
|
|
1071
|
+
color: r = "#22c55e",
|
|
1072
|
+
style: a,
|
|
1073
|
+
labelStyle: s
|
|
1074
|
+
}) => /* @__PURE__ */ S(
|
|
1075
|
+
"div",
|
|
1076
|
+
{
|
|
1077
|
+
style: {
|
|
1078
|
+
position: "absolute",
|
|
1079
|
+
left: `${e.left * 100}%`,
|
|
1080
|
+
top: `${e.top * 100}%`,
|
|
1081
|
+
width: `${e.width * 100}%`,
|
|
1082
|
+
height: `${e.height * 100}%`,
|
|
1083
|
+
border: `3px solid ${r}`,
|
|
1084
|
+
boxSizing: "border-box",
|
|
1085
|
+
pointerEvents: "none",
|
|
1086
|
+
zIndex: 20,
|
|
1087
|
+
...a
|
|
1088
|
+
},
|
|
1089
|
+
children: t !== null && /* @__PURE__ */ S("div", { style: { ...rt, ...s }, children: t })
|
|
1090
|
+
}
|
|
1091
|
+
), q = [
|
|
1092
|
+
{
|
|
1093
|
+
id: "capabilities",
|
|
1094
|
+
title: "Capability report",
|
|
1095
|
+
steps: "Run detectXRCapabilities with model probes.",
|
|
1096
|
+
expect: "Rendering supported (WebGL, OffscreenCanvas, WebAssembly); camera not unsupported; model assets reachable.",
|
|
1097
|
+
mode: "automated",
|
|
1098
|
+
layer: "capability"
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
id: "session-start",
|
|
1102
|
+
title: "Session binds and starts",
|
|
1103
|
+
steps: "setMediaSource (webcam or the supplied stream) and start().",
|
|
1104
|
+
expect: "Lifecycle reaches running within the timeout; feed frames advance.",
|
|
1105
|
+
mode: "automated",
|
|
1106
|
+
layer: "lifecycle"
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
id: "model-ready",
|
|
1110
|
+
title: "Tracker models initialize",
|
|
1111
|
+
steps: "Acquire each requested model and wait for ready.",
|
|
1112
|
+
expect: "Every model reaches ready; none errors.",
|
|
1113
|
+
mode: "automated",
|
|
1114
|
+
layer: "model"
|
|
1115
|
+
},
|
|
1116
|
+
{
|
|
1117
|
+
id: "model-detects",
|
|
1118
|
+
title: "Trackers run inference",
|
|
1119
|
+
steps: "Sample diagnostics while running.",
|
|
1120
|
+
expect: "Each ready model reports inferences > 0 (detection itself needs a subject in frame).",
|
|
1121
|
+
mode: "automated",
|
|
1122
|
+
layer: "model"
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
id: "pause-resume",
|
|
1126
|
+
title: "Pause and resume",
|
|
1127
|
+
steps: "session.pause(), then resume().",
|
|
1128
|
+
expect: "Lifecycle paused then running; feed resumes.",
|
|
1129
|
+
mode: "automated",
|
|
1130
|
+
layer: "lifecycle"
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
id: "stop-start",
|
|
1134
|
+
title: "Stop and rebind",
|
|
1135
|
+
steps: "session.stop(), then setMediaSource + start() again.",
|
|
1136
|
+
expect: "Lifecycle stopped then running on the same source.",
|
|
1137
|
+
mode: "automated",
|
|
1138
|
+
layer: "lifecycle"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
id: "performance",
|
|
1142
|
+
title: "Performance sample",
|
|
1143
|
+
steps: "Measure frame rate and tracker inference over the window.",
|
|
1144
|
+
expect: "Frame rate ≥ 20 fps and total inference ≤ 50 ms while running.",
|
|
1145
|
+
mode: "automated",
|
|
1146
|
+
layer: "performance"
|
|
1147
|
+
}
|
|
1148
|
+
], st = [
|
|
1149
|
+
{
|
|
1150
|
+
id: "permission-prompt",
|
|
1151
|
+
title: "First-visit permission prompt",
|
|
1152
|
+
steps: "Open the app in a fresh profile; tap Allow on the prompt.",
|
|
1153
|
+
expect: "Camera starts; no second prompt on reload.",
|
|
1154
|
+
mode: "manual",
|
|
1155
|
+
layer: "capability"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
id: "permission-blocked",
|
|
1159
|
+
title: "Blocked camera recovers",
|
|
1160
|
+
steps: "Block the camera in site settings, reload, then allow it from the address bar.",
|
|
1161
|
+
expect: "Gate shows blocked with instructions; allowing flips it without a reload.",
|
|
1162
|
+
mode: "manual",
|
|
1163
|
+
layer: "capability"
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
id: "rear-camera",
|
|
1167
|
+
title: "Rear camera",
|
|
1168
|
+
steps: "Switch front → rear on /camera.",
|
|
1169
|
+
expect: "Rear feed is straight (text readable); tracking stays aligned.",
|
|
1170
|
+
mode: "manual",
|
|
1171
|
+
layer: "lifecycle"
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
id: "orientation",
|
|
1175
|
+
title: "Rotate the device",
|
|
1176
|
+
steps: "Rotate portrait ↔ landscape while tracking a face.",
|
|
1177
|
+
expect: "Anchored content stays on the face; no stretched feed.",
|
|
1178
|
+
mode: "manual",
|
|
1179
|
+
layer: "lifecycle"
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
id: "background-foreground",
|
|
1183
|
+
title: "Background and return",
|
|
1184
|
+
steps: "Switch apps / lock the screen for 10 s and come back.",
|
|
1185
|
+
expect: "Feed resumes by itself; no frozen frame; trackers continue.",
|
|
1186
|
+
mode: "manual",
|
|
1187
|
+
layer: "lifecycle"
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
id: "camera-interrupted",
|
|
1191
|
+
title: "Camera taken by another app",
|
|
1192
|
+
steps: "Take a call or open the native camera, then return.",
|
|
1193
|
+
expect: "Session reports camera-lost and recovers on retry.",
|
|
1194
|
+
mode: "manual",
|
|
1195
|
+
layer: "lifecycle"
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
id: "thermal",
|
|
1199
|
+
title: "Sustained use",
|
|
1200
|
+
steps: "Run face + body tracking for 5 minutes.",
|
|
1201
|
+
expect: "Adaptive quality steps down before the frame rate collapses; no crash.",
|
|
1202
|
+
mode: "manual",
|
|
1203
|
+
layer: "performance"
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
id: "low-end",
|
|
1207
|
+
title: "Low-end device",
|
|
1208
|
+
steps: "Run the automated set on the slowest supported device.",
|
|
1209
|
+
expect: "All pass; performance may land on the low tier.",
|
|
1210
|
+
mode: "manual",
|
|
1211
|
+
layer: "performance"
|
|
1212
|
+
}
|
|
1213
|
+
], Et = (e) => q.find((t) => t.id === e) ?? st.find((t) => t.id === e), M = (e, t) => {
|
|
1214
|
+
const r = e.match(t);
|
|
1215
|
+
return r ? r[1] : "";
|
|
1216
|
+
}, nt = (e) => {
|
|
1217
|
+
const t = /iPhone|iPad|iPod/.test(e) || /Macintosh/.test(e) && /Mobile/.test(e), r = /Android/.test(e);
|
|
1218
|
+
let a = { name: "unknown", version: "" };
|
|
1219
|
+
/Edg\//.test(e) ? a = { name: "Edge", version: M(e, /Edg\/(\d+)/) } : /OPR\//.test(e) ? a = { name: "Opera", version: M(e, /OPR\/(\d+)/) } : /SamsungBrowser\//.test(e) ? a = { name: "Samsung Internet", version: M(e, /SamsungBrowser\/(\d+)/) } : /CriOS\//.test(e) ? a = { name: "Chrome iOS", version: M(e, /CriOS\/(\d+)/) } : /FxiOS\//.test(e) ? a = { name: "Firefox iOS", version: M(e, /FxiOS\/(\d+)/) } : /Firefox\//.test(e) ? a = { name: "Firefox", version: M(e, /Firefox\/(\d+)/) } : /Chrome\//.test(e) ? a = { name: "Chrome", version: M(e, /Chrome\/(\d+)/) } : /Safari\//.test(e) && (a = { name: "Safari", version: M(e, /Version\/(\d+)/) });
|
|
1220
|
+
let s = { name: "unknown", version: "" };
|
|
1221
|
+
return t ? s = { name: "iOS", version: M(e, /OS (\d+[._]\d+)/).replace("_", ".") } : r ? s = { name: "Android", version: M(e, /Android (\d+(?:\.\d+)?)/) } : /Mac OS X/.test(e) ? s = { name: "macOS", version: M(e, /Mac OS X (\d+[._]\d+)/).replace("_", ".") } : /Windows NT/.test(e) ? s = { name: "Windows", version: M(e, /Windows NT (\d+\.\d+)/) } : /Linux/.test(e) && (s = { name: "Linux", version: "" }), { browser: a, os: s, mobile: t || r || /Mobile/.test(e) };
|
|
1222
|
+
}, ot = () => {
|
|
1223
|
+
var a, s;
|
|
1224
|
+
const e = typeof navigator < "u" ? navigator : void 0, t = (e == null ? void 0 : e.userAgent) ?? "", r = nt(t);
|
|
1225
|
+
return {
|
|
1226
|
+
userAgent: t,
|
|
1227
|
+
platform: (e == null ? void 0 : e.platform) ?? "",
|
|
1228
|
+
...r,
|
|
1229
|
+
screen: typeof window < "u" ? {
|
|
1230
|
+
width: ((a = window.screen) == null ? void 0 : a.width) ?? 0,
|
|
1231
|
+
height: ((s = window.screen) == null ? void 0 : s.height) ?? 0,
|
|
1232
|
+
dpr: window.devicePixelRatio || 1
|
|
1233
|
+
} : { width: 0, height: 0, dpr: 1 },
|
|
1234
|
+
deviceMemoryGb: typeof (e == null ? void 0 : e.deviceMemory) == "number" ? e.deviceMemory : null,
|
|
1235
|
+
hardwareConcurrency: typeof (e == null ? void 0 : e.hardwareConcurrency) == "number" ? e.hardwareConcurrency : null,
|
|
1236
|
+
secureContext: typeof window < "u" ? !!window.isSecureContext : !1,
|
|
1237
|
+
videoCaptureStream: typeof HTMLVideoElement < "u" && ("captureStream" in HTMLVideoElement.prototype || "mozCaptureStream" in HTMLVideoElement.prototype),
|
|
1238
|
+
touch: typeof navigator < "u" && (navigator.maxTouchPoints ?? 0) > 0
|
|
1239
|
+
};
|
|
1240
|
+
}, it = [N.FACE_TRACKER, N.HAND_TRACKER, N.BODY_TRACKER], ne = "__xr_compat__", de = (e) => new Promise((t) => setTimeout(t, e)), O = async (e, t, r = 50) => {
|
|
1241
|
+
const a = Date.now() + t;
|
|
1242
|
+
for (; Date.now() < a; ) {
|
|
1243
|
+
if (e()) return !0;
|
|
1244
|
+
await de(r);
|
|
1245
|
+
}
|
|
1246
|
+
return e();
|
|
1247
|
+
}, lt = (e, t) => e ? /^(camera-|no-camera|webgl-|offscreen-canvas-|wasm-)/.test(e) ? "capability" : /^model-/.test(e) ? "model" : /^(lifecycle|timeout:lifecycle|feed-stalled|start-)/.test(e) ? "lifecycle" : /^(fps|inference|frame)/.test(e) ? "performance" : t : t, dt = (e) => {
|
|
1248
|
+
const t = {
|
|
1249
|
+
pass: 0,
|
|
1250
|
+
fail: 0,
|
|
1251
|
+
skip: 0,
|
|
1252
|
+
causes: { capability: 0, model: 0, lifecycle: 0, performance: 0, unknown: 0 }
|
|
1253
|
+
};
|
|
1254
|
+
for (const r of e)
|
|
1255
|
+
t[r.status] += 1, r.status === "fail" && (t.causes[r.cause ?? "unknown"] += 1);
|
|
1256
|
+
return t;
|
|
1257
|
+
}, ct = (e, t, r = {}) => ({
|
|
1258
|
+
version: 1,
|
|
1259
|
+
sdkVersion: r.sdkVersion ?? "dev",
|
|
1260
|
+
checkedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1261
|
+
label: r.label ?? "",
|
|
1262
|
+
environment: ot(),
|
|
1263
|
+
capabilities: t,
|
|
1264
|
+
results: e,
|
|
1265
|
+
summary: dt(e)
|
|
1266
|
+
}), vt = async (e, t = {}) => {
|
|
1267
|
+
var h;
|
|
1268
|
+
const r = t.timeoutMs ?? 2e4, a = t.models ?? it, s = new Set(
|
|
1269
|
+
t.scenarios ?? q.map((n) => n.id)
|
|
1270
|
+
), d = [];
|
|
1271
|
+
let u = null, c = !1;
|
|
1272
|
+
const o = (n, f, g, i) => {
|
|
1273
|
+
var m;
|
|
1274
|
+
const l = {
|
|
1275
|
+
id: n,
|
|
1276
|
+
status: i.status,
|
|
1277
|
+
cause: i.status === "fail" ? lt(i.code ?? null, f) : null,
|
|
1278
|
+
// Codes describe failures; a pass carries none.
|
|
1279
|
+
code: i.status === "fail" ? i.code ?? null : null,
|
|
1280
|
+
detail: i.detail,
|
|
1281
|
+
durationMs: Math.round(performance.now() - g)
|
|
1282
|
+
};
|
|
1283
|
+
d.push(l), (m = t.onResult) == null || m.call(t, l);
|
|
1284
|
+
}, p = async () => {
|
|
1285
|
+
t.stream ? await e.setMediaSource({
|
|
1286
|
+
source: ee.STREAM,
|
|
1287
|
+
stream: t.stream,
|
|
1288
|
+
sourceKind: "video"
|
|
1289
|
+
}) : await e.setMediaSource({ source: ee.WEBCAM }), await e.start();
|
|
1290
|
+
};
|
|
1291
|
+
try {
|
|
1292
|
+
for (const n of q) {
|
|
1293
|
+
if (!s.has(n.id)) continue;
|
|
1294
|
+
const f = performance.now();
|
|
1295
|
+
try {
|
|
1296
|
+
const g = n.id;
|
|
1297
|
+
switch (g) {
|
|
1298
|
+
case "capabilities": {
|
|
1299
|
+
u = await be({
|
|
1300
|
+
models: a,
|
|
1301
|
+
timeoutMs: Math.min(r, 8e3)
|
|
1302
|
+
});
|
|
1303
|
+
const i = a.map((m) => ye(u, m)).filter((m) => !m.supported && m.reason).map((m) => m.reason.code), l = Array.from(new Set(i));
|
|
1304
|
+
o(n.id, n.layer, f, {
|
|
1305
|
+
status: l.length ? "fail" : "pass",
|
|
1306
|
+
code: l[0] ?? null,
|
|
1307
|
+
detail: l.length ? `blocked: ${l.join(", ")}` : `webgl${u.rendering.webglVersion}, camera ${u.camera.status}`
|
|
1308
|
+
});
|
|
1309
|
+
break;
|
|
1310
|
+
}
|
|
1311
|
+
case "session-start": {
|
|
1312
|
+
await p();
|
|
1313
|
+
const i = await O(
|
|
1314
|
+
() => e.store.getSnapshot().lifecycle === "running",
|
|
1315
|
+
r
|
|
1316
|
+
), l = e.store.getSnapshot().feedFrames, m = i && await O(() => e.store.getSnapshot().feedFrames > l, r);
|
|
1317
|
+
c = i && m;
|
|
1318
|
+
const y = e.store.getSnapshot().error;
|
|
1319
|
+
o(n.id, n.layer, f, {
|
|
1320
|
+
status: c ? "pass" : "fail",
|
|
1321
|
+
code: y ? y.reason : i ? "feed-stalled" : "timeout:lifecycle",
|
|
1322
|
+
detail: c ? `running on ${e.store.getSnapshot().sourceKind}` : y ? y.message : i ? "running but no feed frames advanced" : `lifecycle ${e.store.getSnapshot().lifecycle}`
|
|
1323
|
+
});
|
|
1324
|
+
break;
|
|
1325
|
+
}
|
|
1326
|
+
case "model-ready": {
|
|
1327
|
+
if (!c) {
|
|
1328
|
+
o(n.id, n.layer, f, {
|
|
1329
|
+
status: "skip",
|
|
1330
|
+
detail: "session did not start"
|
|
1331
|
+
});
|
|
1332
|
+
break;
|
|
1333
|
+
}
|
|
1334
|
+
const i = [];
|
|
1335
|
+
await Promise.all(
|
|
1336
|
+
a.map(async (l) => {
|
|
1337
|
+
try {
|
|
1338
|
+
await e.registry.acquire(l, ne), await O(
|
|
1339
|
+
() => e.store.getSnapshot().pipeline.has(l),
|
|
1340
|
+
r
|
|
1341
|
+
) || i.push(`${l}: timeout`);
|
|
1342
|
+
} catch (m) {
|
|
1343
|
+
i.push(`${l}: ${ge(m).code}`);
|
|
1344
|
+
}
|
|
1345
|
+
})
|
|
1346
|
+
), o(n.id, n.layer, f, {
|
|
1347
|
+
status: i.length ? "fail" : "pass",
|
|
1348
|
+
code: i.length ? i[0].split(": ")[1] === "timeout" ? "model-init-failed" : i[0].split(": ")[1] : null,
|
|
1349
|
+
detail: i.length ? i.join("; ") : `${a.length} models ready`
|
|
1350
|
+
});
|
|
1351
|
+
break;
|
|
1352
|
+
}
|
|
1353
|
+
case "model-detects": {
|
|
1354
|
+
if (!c) {
|
|
1355
|
+
o(n.id, n.layer, f, {
|
|
1356
|
+
status: "skip",
|
|
1357
|
+
detail: "session did not start"
|
|
1358
|
+
});
|
|
1359
|
+
break;
|
|
1360
|
+
}
|
|
1361
|
+
const i = await O(
|
|
1362
|
+
() => P(e, a, null).models.every((E) => E.state !== "ready" || E.inferences > 0),
|
|
1363
|
+
Math.min(r, 8e3)
|
|
1364
|
+
), l = P(e, a, null), m = l.models.filter((R) => R.state === "ready" && R.inferences === 0).map((R) => R.label), y = l.models.filter((R) => R.state === "error").map((R) => {
|
|
1365
|
+
var E;
|
|
1366
|
+
return `${R.label}: ${((E = R.error) == null ? void 0 : E.message) ?? "error"}`;
|
|
1367
|
+
});
|
|
1368
|
+
o(n.id, n.layer, f, {
|
|
1369
|
+
status: i && !y.length ? "pass" : "fail",
|
|
1370
|
+
code: y.length ? "model-init-failed" : m.length ? "model-idle" : null,
|
|
1371
|
+
detail: y.length ? y.join("; ") : m.length ? `no inference from ${m.join(", ")}` : l.models.map((R) => `${R.label} ${R.inferences} run · ${R.detections ?? "–"} det`).join(", ")
|
|
1372
|
+
});
|
|
1373
|
+
break;
|
|
1374
|
+
}
|
|
1375
|
+
case "pause-resume": {
|
|
1376
|
+
if (!c) {
|
|
1377
|
+
o(n.id, n.layer, f, {
|
|
1378
|
+
status: "skip",
|
|
1379
|
+
detail: "session did not start"
|
|
1380
|
+
});
|
|
1381
|
+
break;
|
|
1382
|
+
}
|
|
1383
|
+
e.pause();
|
|
1384
|
+
const i = e.store.getSnapshot().lifecycle === "paused";
|
|
1385
|
+
await e.resume();
|
|
1386
|
+
const l = await O(
|
|
1387
|
+
() => e.store.getSnapshot().lifecycle === "running",
|
|
1388
|
+
r
|
|
1389
|
+
), m = e.store.getSnapshot().feedFrames, y = l && await O(() => e.store.getSnapshot().feedFrames > m, r);
|
|
1390
|
+
o(n.id, n.layer, f, {
|
|
1391
|
+
status: i && l && y ? "pass" : "fail",
|
|
1392
|
+
code: i ? l ? "feed-stalled" : "lifecycle:resume" : "lifecycle:pause",
|
|
1393
|
+
detail: i && l && y ? "paused → running, feed advanced" : `paused=${i} resumed=${l} advanced=${y}`
|
|
1394
|
+
});
|
|
1395
|
+
break;
|
|
1396
|
+
}
|
|
1397
|
+
case "stop-start": {
|
|
1398
|
+
if (!c) {
|
|
1399
|
+
o(n.id, n.layer, f, {
|
|
1400
|
+
status: "skip",
|
|
1401
|
+
detail: "session did not start"
|
|
1402
|
+
});
|
|
1403
|
+
break;
|
|
1404
|
+
}
|
|
1405
|
+
await e.stop();
|
|
1406
|
+
const i = e.store.getSnapshot().lifecycle === "stopped";
|
|
1407
|
+
await p();
|
|
1408
|
+
const l = await O(
|
|
1409
|
+
() => e.store.getSnapshot().lifecycle === "running",
|
|
1410
|
+
r
|
|
1411
|
+
);
|
|
1412
|
+
o(n.id, n.layer, f, {
|
|
1413
|
+
status: i && l ? "pass" : "fail",
|
|
1414
|
+
code: i ? "lifecycle:restart" : "lifecycle:stop",
|
|
1415
|
+
detail: i && l ? "stopped → running" : `stopped=${i} running=${l}`
|
|
1416
|
+
});
|
|
1417
|
+
break;
|
|
1418
|
+
}
|
|
1419
|
+
case "performance": {
|
|
1420
|
+
if (!c) {
|
|
1421
|
+
o(n.id, n.layer, f, {
|
|
1422
|
+
status: "skip",
|
|
1423
|
+
detail: "session did not start"
|
|
1424
|
+
});
|
|
1425
|
+
break;
|
|
1426
|
+
}
|
|
1427
|
+
const i = t.performanceWindowMs ?? 3e3;
|
|
1428
|
+
let l = 0, m = 0;
|
|
1429
|
+
const y = () => {
|
|
1430
|
+
l += 1, m = requestAnimationFrame(y);
|
|
1431
|
+
};
|
|
1432
|
+
m = requestAnimationFrame(y);
|
|
1433
|
+
const R = P(e, a, null);
|
|
1434
|
+
await de(i), cancelAnimationFrame(m);
|
|
1435
|
+
const E = P(e, a, {
|
|
1436
|
+
feedFrames: R.session.feedFrames,
|
|
1437
|
+
sampledAt: R.sampledAt
|
|
1438
|
+
}), _ = l * 1e3 / i, I = E.inferenceMsTotal, w = _ >= 20 && I <= 50;
|
|
1439
|
+
o(n.id, n.layer, f, {
|
|
1440
|
+
status: w ? "pass" : "fail",
|
|
1441
|
+
code: _ < 20 ? "fps-low" : I > 50 ? "inference-high" : null,
|
|
1442
|
+
detail: `${_.toFixed(0)} fps · feed ${E.session.feedFps.toFixed(0)} fps · inference ${I.toFixed(1)} ms`
|
|
1443
|
+
});
|
|
1444
|
+
break;
|
|
1445
|
+
}
|
|
1446
|
+
default:
|
|
1447
|
+
o(g, n.layer, f, { status: "skip", detail: "no runner" });
|
|
1448
|
+
}
|
|
1449
|
+
} catch (g) {
|
|
1450
|
+
const i = g instanceof Error ? g.message : String(g), l = (h = e.store.getSnapshot().error) == null ? void 0 : h.reason;
|
|
1451
|
+
o(n.id, n.layer, f, {
|
|
1452
|
+
status: "fail",
|
|
1453
|
+
code: l ? Se(l).code : null,
|
|
1454
|
+
detail: l ? `${i} (${l})` : i
|
|
1455
|
+
});
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
} finally {
|
|
1459
|
+
for (const n of a) e.registry.release(n, ne);
|
|
1460
|
+
t.keepSessionRunning || await e.stop().catch(() => {
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1463
|
+
return ct(d, u, t);
|
|
1464
|
+
}, It = (e) => {
|
|
1465
|
+
const [t, r] = T(null);
|
|
1466
|
+
return F(() => {
|
|
891
1467
|
let a = 0;
|
|
892
|
-
const
|
|
893
|
-
var
|
|
894
|
-
a = requestAnimationFrame(
|
|
895
|
-
const
|
|
896
|
-
if (!
|
|
897
|
-
|
|
1468
|
+
const s = () => {
|
|
1469
|
+
var o, p;
|
|
1470
|
+
a = requestAnimationFrame(s);
|
|
1471
|
+
const d = (p = (o = e == null ? void 0 : e.detectionResults) == null ? void 0 : o.faceLandmarks) == null ? void 0 : p[0];
|
|
1472
|
+
if (!d || d.length === 0) {
|
|
1473
|
+
r(null);
|
|
898
1474
|
return;
|
|
899
1475
|
}
|
|
900
|
-
const
|
|
901
|
-
left:
|
|
902
|
-
top:
|
|
903
|
-
width:
|
|
904
|
-
height:
|
|
1476
|
+
const u = Te(d), c = {
|
|
1477
|
+
left: u.minX,
|
|
1478
|
+
top: u.minY,
|
|
1479
|
+
width: u.width,
|
|
1480
|
+
height: u.height
|
|
905
1481
|
};
|
|
906
|
-
|
|
1482
|
+
r((h) => h && h.left === c.left && h.top === c.top && h.width === c.width && h.height === c.height ? h : c);
|
|
907
1483
|
};
|
|
908
|
-
return
|
|
1484
|
+
return s(), () => {
|
|
909
1485
|
cancelAnimationFrame(a);
|
|
910
1486
|
};
|
|
911
1487
|
}, [e]), t;
|
|
912
|
-
},
|
|
1488
|
+
}, Tt = ({
|
|
1489
|
+
background: e = "#000",
|
|
1490
|
+
children: t,
|
|
1491
|
+
style: r
|
|
1492
|
+
}) => /* @__PURE__ */ S(
|
|
1493
|
+
"div",
|
|
1494
|
+
{
|
|
1495
|
+
style: {
|
|
1496
|
+
position: "fixed",
|
|
1497
|
+
inset: 0,
|
|
1498
|
+
overflow: "hidden",
|
|
1499
|
+
background: e,
|
|
1500
|
+
...r
|
|
1501
|
+
},
|
|
1502
|
+
children: t
|
|
1503
|
+
}
|
|
1504
|
+
), xt = (e) => {
|
|
1505
|
+
const { makeDefault: t = !0, ...r } = e;
|
|
1506
|
+
return /* @__PURE__ */ S(
|
|
1507
|
+
xe,
|
|
1508
|
+
{
|
|
1509
|
+
position: [0, 0, 40],
|
|
1510
|
+
fov: 30,
|
|
1511
|
+
near: 0.1,
|
|
1512
|
+
far: 1e3,
|
|
1513
|
+
makeDefault: t,
|
|
1514
|
+
...r
|
|
1515
|
+
}
|
|
1516
|
+
);
|
|
1517
|
+
}, At = ["fill", "contain"];
|
|
913
1518
|
export {
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
1519
|
+
Ba as ARM_FIT_DEFAULTS,
|
|
1520
|
+
La as ARM_MASK_DEFAULTS,
|
|
1521
|
+
Na as ArmTracker,
|
|
1522
|
+
Ha as BODY_DEPTH_LAYER,
|
|
1523
|
+
Ga as BODY_DEPTH_RANGE_PAD,
|
|
1524
|
+
Pa as BODY_FLIP_GUARD_DEFAULTS,
|
|
1525
|
+
Ft as BODY_IDENTITY_DEFAULTS,
|
|
1526
|
+
Ot as BODY_JOINT_OTHER_SIDE,
|
|
1527
|
+
Un as BODY_MASK_BONES,
|
|
1528
|
+
qn as BODY_MASK_MAX_PEOPLE,
|
|
1529
|
+
Kn as BODY_MASK_MIN_VISIBILITY,
|
|
1530
|
+
jn as BODY_MASK_SPLIT_DEFAULTS,
|
|
1531
|
+
Xa as BODY_POSE_TRIGGER_DEFAULTS,
|
|
1532
|
+
Wa as BODY_RIG_BONE_REGION,
|
|
1533
|
+
za as BODY_RIG_CHEST_RANGE,
|
|
1534
|
+
Ya as BODY_RIG_CLAVICLE_RANGE,
|
|
1535
|
+
Va as BODY_RIG_EAR_TO_HEAD,
|
|
1536
|
+
$a as BODY_RIG_FOREARM_TWIST_SHARE,
|
|
1537
|
+
Ua as BODY_RIG_HAND_SEEN,
|
|
1538
|
+
qa as BODY_RIG_HEAD_ABOVE_EARS,
|
|
1539
|
+
Ka as BODY_RIG_HEAD_CENTER,
|
|
1540
|
+
ja as BODY_RIG_HEAD_LIMITS,
|
|
1541
|
+
Ja as BODY_RIG_HEAD_RANGE,
|
|
1542
|
+
Qa as BODY_RIG_HINGE_BEND,
|
|
1543
|
+
Za as BODY_RIG_LENGTH_RANGE,
|
|
1544
|
+
er as BODY_RIG_LIMBS,
|
|
1545
|
+
tr as BODY_RIG_LIMB_BONES,
|
|
1546
|
+
ar as BODY_RIG_LIMB_JOINTS,
|
|
1547
|
+
rr as BODY_RIG_NECK_RANGE,
|
|
1548
|
+
sr as BODY_RIG_NECK_SHARE,
|
|
1549
|
+
nr as BODY_RIG_REGIONS,
|
|
1550
|
+
or as BODY_RIG_REGION_JOINTS,
|
|
1551
|
+
ir as BODY_RIG_SEGMENTS,
|
|
1552
|
+
lr as BODY_RIG_SHOULDER_TO_TORSO,
|
|
1553
|
+
fn as BasicAnimatedTextureController,
|
|
1554
|
+
dr as BodyFlipGuard,
|
|
1555
|
+
Dt as BodyIdentity,
|
|
1556
|
+
_t as BoundingBoxOverlay,
|
|
1557
|
+
q as COMPAT_SCENARIOS,
|
|
1558
|
+
cr as DEFAULT_NAIL_FALLBACK,
|
|
1559
|
+
kt as EMPTY_QUALITY_SIGNALS,
|
|
1560
|
+
mo as FACE_REGION_POLYGONS,
|
|
1561
|
+
ur as FOREARM_BULGE_AT,
|
|
1562
|
+
mr as FOREARM_ELBOW_DEPTH_OF_WRIST,
|
|
1563
|
+
pr as FOREARM_ELBOW_WIDTH_OF_WRIST,
|
|
1564
|
+
fr as FOREARM_LENGTH_OF_HAND,
|
|
1565
|
+
hr as HAND_JOINTS,
|
|
1566
|
+
gr as HAND_NAIL_FACING_FADE,
|
|
1567
|
+
br as HAND_NAIL_FINISH_LIGHTING,
|
|
1568
|
+
Cn as HAND_RIG_BONES,
|
|
1569
|
+
yr as HAND_RIG_FOREARM,
|
|
1570
|
+
Fn as HAND_RIG_KNUCKLE_SHIFT,
|
|
1571
|
+
On as HAND_RIG_LENGTH_RANGE,
|
|
1572
|
+
Sr as HAND_RIG_MODEL_MESH,
|
|
1573
|
+
Dn as HAND_RIG_PALM_JOINTS,
|
|
1574
|
+
kn as HAND_RIG_SNAP_PALMS,
|
|
1575
|
+
Rr as HAND_TATTOO_FACING_FADE,
|
|
1576
|
+
wr as HandRigContext,
|
|
1577
|
+
_r as HandRigWrist,
|
|
1578
|
+
Er as HandRigWristContext,
|
|
1579
|
+
vr as HandTouchContext,
|
|
1580
|
+
ia as HeadTracker,
|
|
1581
|
+
po as IRIS_FULL_OPENNESS,
|
|
1582
|
+
fo as IrisLead,
|
|
1583
|
+
st as MANUAL_COMPAT_SCENARIOS,
|
|
1584
|
+
hn as MAX_GIF_BYTES,
|
|
1585
|
+
gn as MAX_GIF_FRAMES,
|
|
1586
|
+
bn as MAX_GIF_PIXELS,
|
|
1587
|
+
ho as MAX_OVERLAY_LABELS,
|
|
1588
|
+
Ir as OscillationTracker,
|
|
1589
|
+
Tr as POSE_JOINTS,
|
|
1590
|
+
xt as PerspectiveCamera,
|
|
1591
|
+
go as SEGMENTATION_OVERLAY_FRAGMENT_SHADER,
|
|
1592
|
+
bo as SEGMENTATION_OVERLAY_VERTEX_SHADER,
|
|
1593
|
+
xr as SKINNED_OCCLUDER_RENDER_ORDER,
|
|
1594
|
+
ko as ScreenRectAspectContext,
|
|
1595
|
+
At as TEXTURE_FITS,
|
|
1596
|
+
yn as TextureSourceLoadError,
|
|
1597
|
+
Ar as TimedSeries,
|
|
1598
|
+
Mr as TouchWorld,
|
|
1599
|
+
Cr as WRIST_FILTER_DEFAULTS,
|
|
1600
|
+
Fr as WRIST_JOINT_LIMITS,
|
|
1601
|
+
Or as WristRotationFilter,
|
|
1602
|
+
Tt as XRCompositor,
|
|
1603
|
+
X as XRLayer,
|
|
1604
|
+
Fe as XRMediaSurface,
|
|
1605
|
+
Rt as XRTrackingOverlay,
|
|
1606
|
+
wt as XRViewport,
|
|
1607
|
+
Bt as XR_MODEL_LABELS,
|
|
1608
|
+
Lt as anatomicalBodyPose,
|
|
1609
|
+
Nt as anatomicalHandedness,
|
|
1610
|
+
Dr as applyBodyRigHeadScale,
|
|
1611
|
+
kr as applyBodyRigLengths,
|
|
1612
|
+
Br as applyBodyRigSolution,
|
|
1613
|
+
Bn as applyHandRigLengths,
|
|
1614
|
+
Ln as applyHandRigSolution,
|
|
1615
|
+
Lr as armQueryOf,
|
|
1616
|
+
Ht as assignHandPoses,
|
|
1617
|
+
Nr as assignNailBlobs,
|
|
1618
|
+
Hr as bindBodyRig,
|
|
1619
|
+
Nn as bindHandRig,
|
|
1620
|
+
Gr as bodyAttachmentFrame,
|
|
1621
|
+
Pr as bodyDepthRange,
|
|
1622
|
+
Jn as bodyMaskDistance,
|
|
1623
|
+
Qn as bodyMaskPerson,
|
|
1624
|
+
Zn as bodyMaskWeights,
|
|
1625
|
+
Xr as bodyPoseToScene,
|
|
1626
|
+
Wr as bodyRigChestScale,
|
|
1627
|
+
zr as bodyRigClipPose,
|
|
1628
|
+
Yr as bodyRigHeadCenter,
|
|
1629
|
+
Vr as bodyRigHeadScale,
|
|
1630
|
+
$r as bodyRigHeadTarget,
|
|
1631
|
+
Ur as bodyRigJointPosition,
|
|
1632
|
+
qr as bodyRigLengthRatios,
|
|
1633
|
+
Kr as bodyRigModelHead,
|
|
1634
|
+
jr as bodyRigSceneScale,
|
|
1635
|
+
Jr as bodyRigShoulderScale,
|
|
1636
|
+
Yn as bodySubjectCount,
|
|
1637
|
+
Qr as bodyTriggerStatesEqual,
|
|
1638
|
+
Gt as bodyWorldLandmarkToJoint,
|
|
1639
|
+
Zr as clampWristBend,
|
|
1640
|
+
Pt as classifyCameraFailure,
|
|
1641
|
+
lt as classifyCompatCause,
|
|
1642
|
+
eo as closestBodies,
|
|
1643
|
+
yo as computeIrisEye,
|
|
1644
|
+
Te as computeLandmarkBounds,
|
|
1645
|
+
So as computeMaskUvTransform,
|
|
1646
|
+
Sn as computeScreenTransform,
|
|
1647
|
+
es as createBodyDepthMaterial,
|
|
1648
|
+
to as createBodyMaskSplitMaterial,
|
|
1649
|
+
ts as createBodyMoveFrame,
|
|
1650
|
+
as as createBodyTrigger,
|
|
1651
|
+
ct as createCompatReport,
|
|
1652
|
+
Aa as createFaceInfoTarget,
|
|
1653
|
+
oo as createGestureDetectorState,
|
|
1654
|
+
rs as createHandNailsMaterial,
|
|
1655
|
+
ss as createHandOccluderMaterial,
|
|
1656
|
+
ns as createHandTattooMaterial,
|
|
1657
|
+
Ro as createIrisEye,
|
|
1658
|
+
wo as createIrisResult,
|
|
1659
|
+
Xt as createQualityState,
|
|
1660
|
+
_o as createSegmentationOverlayMaterial,
|
|
1661
|
+
Eo as createSemanticMaskTexture,
|
|
1662
|
+
os as createSkinnedOccluderMaterial,
|
|
1663
|
+
Rn as createTextureSourceResolver,
|
|
1664
|
+
is as createTouchHand,
|
|
1665
|
+
ot as describeCompatEnvironment,
|
|
1666
|
+
wn as disposeResolvedTextureSource,
|
|
1667
|
+
ls as elbowUpOnScreen,
|
|
1668
|
+
ds as ellipseWidthOnScreen,
|
|
1669
|
+
cs as ensureForearmBone,
|
|
1670
|
+
Wt as fillLandmarkPolygon,
|
|
1671
|
+
zt as fillPolygon,
|
|
1672
|
+
Et as findCompatScenario,
|
|
1673
|
+
us as fingerExtensions,
|
|
1674
|
+
ms as fitWristFrame,
|
|
1675
|
+
ps as forearmDirectionOf,
|
|
1676
|
+
fs as forearmSectionAt,
|
|
1677
|
+
hs as forearmSegmentOf,
|
|
1678
|
+
gs as frameUpOnScreen,
|
|
1679
|
+
io as gestureStatesEqual,
|
|
1680
|
+
Ma as getFaceInfo,
|
|
1681
|
+
_n as getPlaybackFrame,
|
|
1682
|
+
En as getSequenceFrame,
|
|
1683
|
+
Fa as getThreeBlending,
|
|
1684
|
+
Oa as getThreeDepthFunction,
|
|
1685
|
+
Da as getThreeSide,
|
|
1686
|
+
vn as gifTextureSourceProvider,
|
|
1687
|
+
Hn as handAttachmentLocal,
|
|
1688
|
+
bs as handGeometryToRoot,
|
|
1689
|
+
ys as handLengthOf,
|
|
1690
|
+
Ss as handNailCoverage,
|
|
1691
|
+
Rs as handNailDistance,
|
|
1692
|
+
ws as handNailFrame,
|
|
1693
|
+
Gn as handRigRootMatrix,
|
|
1694
|
+
Pn as handRigSnapDistance,
|
|
1695
|
+
_s as handTattooFrame,
|
|
1696
|
+
Es as handTattooMatrix,
|
|
1697
|
+
vs as handTattooUv,
|
|
1698
|
+
Yt as handWorldLandmarkToJoint,
|
|
1699
|
+
mn as hasFullUnitUVBounds,
|
|
1700
|
+
Vt as judgeSample,
|
|
1701
|
+
Is as limitForearmDirection,
|
|
1702
|
+
Ts as limitHeadTurn,
|
|
1703
|
+
$t as lockQuality,
|
|
1704
|
+
Ut as mapDomExceptionToReason,
|
|
1705
|
+
ge as mapModelErrorToReason,
|
|
1706
|
+
xs as measureArm,
|
|
1707
|
+
As as measureArmRaise,
|
|
1708
|
+
Ms as measureFingerPattern,
|
|
1709
|
+
Cs as measureGrab,
|
|
1710
|
+
Fs as measureHandHeight,
|
|
1711
|
+
Os as measureOpenPalm,
|
|
1712
|
+
Ds as measurePinch,
|
|
1713
|
+
ks as measureTPose,
|
|
1714
|
+
Bs as measureThumb,
|
|
1715
|
+
ao as packBodyMaskUniforms,
|
|
1716
|
+
Ls as paintFallbackNail,
|
|
1717
|
+
nt as parseUserAgent,
|
|
1718
|
+
Ns as patchBodyDepthShaders,
|
|
1719
|
+
Hs as patchHandOccluderInflate,
|
|
1720
|
+
Gs as patchOccluderInflate,
|
|
1721
|
+
qt as permissionStateToStatus,
|
|
1722
|
+
vo as rasterizeFaceRegions,
|
|
1723
|
+
Ps as reachBodyRigHead,
|
|
1724
|
+
Xs as reachBodyRigLimb,
|
|
1725
|
+
Kt as readDeviceSignals,
|
|
1726
|
+
Ws as refineNailTip,
|
|
1727
|
+
zs as renderBodyDepth,
|
|
1728
|
+
Ys as resetBodyRig,
|
|
1729
|
+
jt as resetQuality,
|
|
1730
|
+
Io as resolveActiveOverlayLabelIndices,
|
|
1731
|
+
Vn as resolveBody,
|
|
1732
|
+
Vs as resolveBodyMoveLimits,
|
|
1733
|
+
$s as resolveBodyTriggerOptions,
|
|
1734
|
+
Xe as resolveCalibrationFaceDisplayMirrored,
|
|
1735
|
+
Jt as resolveInitialTierIndex,
|
|
1736
|
+
To as resolveMaskSize,
|
|
1737
|
+
Qt as resolveNumBodies,
|
|
1738
|
+
xo as resolveOverlayLabelIndices,
|
|
1739
|
+
Zt as resolvePerformanceBudget,
|
|
1740
|
+
ea as resolveQualityTier,
|
|
1741
|
+
In as resolveTextureSource,
|
|
1742
|
+
vt as runCompatChecks,
|
|
1743
|
+
P as sampleXRDiagnostics,
|
|
1744
|
+
Us as screenAngle,
|
|
1745
|
+
Xn as screenChirality,
|
|
1746
|
+
ta as semanticMaskLabelIndex,
|
|
1747
|
+
Se as sessionReasonToFallback,
|
|
1748
|
+
ro as setBodyMaskSplitUniforms,
|
|
1749
|
+
qs as setBodyTriggerOptions,
|
|
1750
|
+
Ks as setHandTattooBlend,
|
|
1751
|
+
aa as setQualityTier,
|
|
1752
|
+
js as settleNailMask,
|
|
1753
|
+
Js as sideJoint,
|
|
1754
|
+
Qs as snapshotBodyTriggerState,
|
|
1755
|
+
lo as snapshotGestureState,
|
|
1756
|
+
Zs as solveBodyRig,
|
|
1757
|
+
Wn as solveHandRig,
|
|
1758
|
+
so as splitBodyMask,
|
|
1759
|
+
en as stepBodyTrigger,
|
|
1760
|
+
co as stepGestureDetector,
|
|
1761
|
+
ra as stepQualityController,
|
|
1762
|
+
dt as summarizeCompatResults,
|
|
1763
|
+
Tn as throwIfAborted,
|
|
1764
|
+
tn as thumbDirection,
|
|
1765
|
+
an as thumbExtension,
|
|
1766
|
+
sa as tierToApply,
|
|
1767
|
+
Ao as updateIrisResult,
|
|
1768
|
+
rn as updatePointerHand,
|
|
1769
|
+
Mo as updateSegmentationOverlayMaterial,
|
|
1770
|
+
sn as updateTouchHand,
|
|
1771
|
+
Co as uploadSemanticMask,
|
|
1772
|
+
nn as useArmMask,
|
|
928
1773
|
ze as useCalibrationFaceTracker,
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
1774
|
+
It as useFaceBoundingBox,
|
|
1775
|
+
Bo as useScreenSpace,
|
|
1776
|
+
Fo as useSegmentationOverlayMaterial,
|
|
1777
|
+
Oo as useSemanticMaskTexture,
|
|
1778
|
+
on as useSkinnedOccluder,
|
|
1779
|
+
la as useTrackerContext,
|
|
1780
|
+
ca as useXRCameraDeviceId,
|
|
1781
|
+
ua as useXRCameraFacing,
|
|
1782
|
+
ma as useXRCameraTexture,
|
|
1783
|
+
oe as useXRContext,
|
|
1784
|
+
na as useXRDiagnostics,
|
|
1785
|
+
pa as useXRError,
|
|
1786
|
+
fa as useXRFeedAspect,
|
|
1787
|
+
ha as useXRFeedCrop,
|
|
1788
|
+
ga as useXRLifecycle,
|
|
1789
|
+
ba as useXRMirrored,
|
|
1790
|
+
Re as useXRModel,
|
|
1791
|
+
ya as useXRModelErrors,
|
|
1792
|
+
we as useXRModelNode,
|
|
1793
|
+
Sa as useXROrientation,
|
|
1794
|
+
Ra as useXRPipelineSnapshot,
|
|
1795
|
+
wa as useXRQualityConfig,
|
|
1796
|
+
_a as useXRQualityState,
|
|
1797
|
+
Ea as useXRReady,
|
|
1798
|
+
va as useXRRenderSize,
|
|
1799
|
+
Ia as useXRSessionCameraPermission,
|
|
1800
|
+
Ta as useXRTrackerStatus,
|
|
1801
|
+
xn as useXRViewportRenderOutputs,
|
|
1802
|
+
An as useXRViewportState,
|
|
1803
|
+
ln as worldToFeedUnits,
|
|
1804
|
+
dn as wristBendOf,
|
|
1805
|
+
cn as wristFrameLocal
|
|
941
1806
|
};
|