@vincentt-xr/sdk 2.0.0-alpha.7 → 2.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GROUNDING.md +5651 -82
- package/README.md +1 -0
- package/dist/CanonicalHeadFrame-BHcWyaiK.js +1506 -0
- package/dist/CanonicalHeadFrame-D-_T1OMU.cjs +1 -0
- package/dist/DebuggerUI-7ngnJsBe.js +275 -0
- package/dist/DebuggerUI-CoglgKdO.cjs +1 -0
- package/dist/FaceRetouch-CLoTfrcs.js +1071 -0
- package/dist/FaceRetouch-J1lC1WbS.cjs +134 -0
- package/dist/FaceSurface-CHAMEeG1.cjs +1 -0
- package/dist/FaceSurface-DmP9AEeC.js +27 -0
- package/dist/SegmentationOverlay-D_FWkcyP.cjs +35 -0
- package/dist/SegmentationOverlay-vn5x_knv.js +6237 -0
- package/dist/SkeletonUtils-C2r90MtN.js +21 -0
- package/dist/SkeletonUtils-CddIup1F.cjs +1 -0
- package/dist/TextLabel-XE0rQSDn.cjs +2 -0
- package/dist/TextLabel-c9BCucOI.js +961 -0
- package/dist/assets/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/body-pose/index.d.ts +521 -0
- package/dist/body-trigger/__fixtures__/syntheticBody.d.ts +83 -0
- package/dist/body-trigger/frame.d.ts +88 -0
- package/dist/body-trigger/index.d.ts +6 -0
- package/dist/body-trigger/moves.d.ts +235 -0
- package/dist/body-trigger/trigger.d.ts +75 -0
- package/dist/calibration/calibration.d.ts +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/BodyInstruction/BodyPoseHint.d.ts +63 -0
- package/dist/components/BodyInstruction/index.d.ts +69 -0
- package/dist/components/BodyInstruction/useBodyPose.d.ts +23 -0
- package/dist/components/BodyTracker/index.d.ts +17 -0
- package/dist/components/BodyTrigger/index.d.ts +49 -0
- package/dist/components/Debugger/DebuggerProvider.d.ts +14 -1
- package/dist/components/Debugger/DebuggerUI.d.ts +3 -1
- package/dist/components/FaceAtlas/FaceAtlasLayer.d.ts +114 -0
- package/dist/components/FaceAtlas/MadeUpCamera.d.ts +80 -0
- package/dist/components/FaceAtlas/constants.d.ts +8 -0
- package/dist/components/FaceAtlas/index.d.ts +7 -0
- package/dist/components/FaceAtlas/useFaceAtlasSurface.d.ts +84 -0
- package/dist/components/FaceAtlas/useFaceSkin.d.ts +84 -0
- package/dist/components/FaceCharacter/ExternalFaceMesh.d.ts +109 -0
- package/dist/components/FaceCharacter/FaceExpressionController.d.ts +53 -0
- package/dist/components/FaceCharacter/FaceMorph.d.ts +71 -0
- package/dist/components/FaceCharacter/FacePiercing.d.ts +65 -0
- package/dist/components/FaceCharacter/FaceReprojection.d.ts +85 -0
- package/dist/components/FaceCharacter/FaceRig.d.ts +38 -0
- package/dist/components/FaceCharacter/FaceSurface.d.ts +49 -0
- package/dist/components/FaceCharacter/FaceSurfaceOccluder.d.ts +39 -0
- package/dist/components/FaceCharacter/PinToFaceMesh.d.ts +68 -0
- package/dist/components/FaceCharacter/index.d.ts +18 -0
- package/dist/components/FaceCharacter/useFaceReprojector.d.ts +10 -0
- package/dist/components/FaceInset/FaceInset.d.ts +68 -0
- package/dist/components/FaceInset/frame.d.ts +94 -0
- package/dist/components/FaceInset/index.d.ts +6 -0
- package/dist/components/FaceInset/material.d.ts +40 -0
- package/dist/components/FaceInset/useFaceInsetTexture.d.ts +37 -0
- package/dist/components/FaceInstruction/FaceExpressionHint.d.ts +43 -0
- package/dist/components/FaceInstruction/index.d.ts +56 -0
- package/dist/components/FaceInstruction/useFaceExpression.d.ts +20 -0
- package/dist/components/FaceLiquify/FaceLiquify.d.ts +49 -0
- package/dist/components/FaceLiquify/debug.d.ts +37 -0
- package/dist/components/FaceLiquify/frame.d.ts +55 -0
- package/dist/components/FaceLiquify/index.d.ts +10 -0
- package/dist/components/FaceLiquify/material.d.ts +39 -0
- package/dist/components/FaceLiquify/pass.d.ts +49 -0
- package/dist/components/FaceLiquify/presence.d.ts +25 -0
- package/dist/components/FaceLiquify/presets.d.ts +82 -0
- package/dist/components/FaceLiquify/selfTest.d.ts +66 -0
- package/dist/components/FaceLiquify/target.d.ts +85 -0
- package/dist/components/FaceLiquify/warp.d.ts +72 -0
- package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +37 -5
- package/dist/components/FaceMesh/canonical/geometryGroups.d.ts +21 -0
- package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +21 -0
- package/dist/components/FaceMesh/canonical/shaders.d.ts +1 -1
- package/dist/components/FaceMesh/index.d.ts +2 -2
- package/dist/components/FaceRetouch/Background.d.ts +3 -1
- package/dist/components/FaceRetouch/FaceRetouch.d.ts +5 -0
- package/dist/components/FaceRetouch/renderState.d.ts +19 -0
- package/dist/components/FaceSwap/FaceMirror.d.ts +46 -0
- package/dist/components/FaceSwap/FaceSwap.d.ts +58 -0
- package/dist/components/FaceSwap/FaceTextureLayer.d.ts +72 -0
- package/dist/components/FaceSwap/faceSwapPlan.d.ts +91 -0
- package/dist/components/FaceSwap/index.d.ts +13 -0
- package/dist/components/FaceSwap/settings.d.ts +300 -0
- package/dist/components/FaceSwap/useFaceTexture.d.ts +35 -0
- package/dist/components/FaceSwap/useLiveFace.d.ts +38 -0
- package/dist/components/FaceSwap/useLiveFaceTexture.d.ts +31 -0
- package/dist/components/FaceWarp3D/FaceWarp3D.d.ts +50 -0
- package/dist/components/FaceWarp3D/index.d.ts +2 -3
- package/dist/components/Faceless/Faceless.d.ts +51 -0
- package/dist/components/Faceless/index.d.ts +2 -0
- package/dist/components/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/HandInstruction/HandGestureHint.d.ts +70 -0
- package/dist/components/HandInstruction/index.d.ts +74 -0
- package/dist/components/HandInstruction/useHandGesture.d.ts +22 -0
- package/dist/components/HandRig/ForearmOccluder.d.ts +29 -0
- package/dist/components/HandRig/HandAttachment.d.ts +34 -0
- package/dist/components/HandRig/HandOccluder.d.ts +55 -0
- package/dist/components/HandRig/HandTattoo.d.ts +61 -0
- package/dist/components/HandRig/WristAttachment.d.ts +34 -0
- package/dist/components/HandRig/index.d.ts +101 -0
- package/dist/components/HandRig/useArmMask.d.ts +29 -0
- package/dist/components/HandRig/wristSolve.d.ts +69 -0
- package/dist/components/HandTouch/HandTouch.d.ts +62 -0
- package/dist/components/HandTouch/Touchable.d.ts +36 -0
- package/dist/components/HandTouch/index.d.ts +2 -0
- package/dist/components/HandTracker/index.d.ts +10 -0
- package/dist/components/HeadBinding/index.d.ts +14 -0
- package/dist/components/HeadOccluder/CanonicalHeadFrame.d.ts +22 -0
- package/dist/components/HeadOccluder/Earrings.d.ts +55 -0
- package/dist/components/HeadOccluder/HeadAttachment.d.ts +38 -0
- package/dist/components/HeadOccluder/NeckOccluder.d.ts +64 -0
- package/dist/components/HeadOccluder/earringPlacement.d.ts +31 -0
- package/dist/components/HeadOccluder/headAttachmentPoints.d.ts +69 -0
- package/dist/components/HeadOccluder/index.d.ts +57 -3
- package/dist/components/HeadOccluder/useCanonicalHeadFit.d.ts +36 -0
- package/dist/components/HeadOccluder/useLandmarkPoseFit.d.ts +80 -0
- package/dist/components/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/LipEffect/LipEffect.d.ts +27 -1
- package/dist/components/LipEffect/LipEffectMaterial.d.ts +95 -7
- package/dist/components/LipEffect/LipEffects.d.ts +12 -0
- package/dist/components/LipEffect/defaults.d.ts +46 -4
- package/dist/components/LipEffect/index.d.ts +11 -3
- 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 +128 -9
- package/dist/components/LipEffect/useLipDesignTextures.d.ts +17 -0
- package/dist/components/LipEffect/uvGuide.d.ts +74 -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/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 +50 -0
- package/dist/components/PersonCutout/personCutout.d.ts +16 -0
- package/dist/components/ScreenImage/components/ScreenImageBody.d.ts +1 -1
- package/dist/components/ScreenImage/index.d.ts +3 -1
- package/dist/components/ScreenImage/materials/ScreenImageBlendMaterial.d.ts +1 -1
- package/dist/components/ScreenImage/materials/ScreenImageMaskMaterial.d.ts +11 -0
- package/dist/components/ScreenImage/source.d.ts +6 -0
- package/dist/components/ScreenImage/types.d.ts +18 -0
- package/dist/components/SegmentationOverlay/SegmentationOverlay.d.ts +37 -0
- package/dist/components/SegmentationOverlay/SegmentationOverlayMaterial.d.ts +31 -0
- package/dist/components/SegmentationOverlay/index.d.ts +9 -0
- package/dist/components/SegmentationOverlay/maskTexture.d.ts +23 -0
- package/dist/components/SegmentationOverlay/providers.d.ts +72 -0
- package/dist/components/SegmentationOverlay/settings.d.ts +65 -0
- package/dist/components/ShoulderOccluder/index.d.ts +43 -0
- package/dist/components/ShoulderOccluder/useCanonicalTorsoFit.d.ts +24 -0
- package/dist/components/SpringSwing/SpringSwing.d.ts +22 -0
- package/dist/components/SpringSwing/index.d.ts +1 -0
- package/dist/components/XRProvider/index.d.ts +16 -2
- package/dist/components/XRScene/renderOutputTarget.d.ts +12 -0
- package/dist/components/XRViewport/hooks/useViewportExternalFaces.d.ts +1 -1
- package/dist/components/XRViewport/hooks/useViewportMediaSource.d.ts +1 -1
- package/dist/components/XRViewport/hooks/useViewportPipeline.d.ts +1 -1
- package/dist/components/index.d.ts +11 -0
- package/dist/config/index.d.ts +0 -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-BH7PdKFS.cjs +1 -0
- package/dist/contexts-jak8-tND.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/default-setting.cjs +2 -2
- 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/hierarchy-panel/index.d.ts +3 -2
- package/dist/debug-ui/holistic-tracker-settings/index.d.ts +16 -0
- package/dist/debug-ui/index.d.ts +18 -3
- package/dist/debug-ui/iris-effect-settings/index.d.ts +12 -0
- package/dist/debug-ui/lip-effect-settings/index.d.ts +15 -0
- package/dist/debug-ui/media-source/index.d.ts +1 -1
- package/dist/debug-ui/media-source/session.d.ts +30 -2
- package/dist/debug-ui/media-source.cjs +1 -1
- package/dist/debug-ui/media-source.js +1 -1
- package/dist/debug-ui/object-inspector-panel/index.d.ts +3 -2
- package/dist/debug-ui/product-hotspots/index.d.ts +25 -0
- package/dist/debug-ui/scene-editor/hierarchy-panel.d.ts +3 -1
- package/dist/debug-ui/scene-editor/inspector-panel.d.ts +3 -1
- package/dist/debug-ui/screen-image-settings/index.d.ts +3 -1
- package/dist/debug-ui/screen-text-settings/ScreenTextSettingsPanel.d.ts +1 -1
- package/dist/debug-ui/screen-text-settings/types.d.ts +2 -0
- package/dist/debug-ui/segmentation-overlay-settings/index.d.ts +12 -0
- package/dist/debug-ui/settings-panel/index.d.ts +6 -1
- package/dist/debug-ui/shared/debugWindow.d.ts +51 -0
- package/dist/debug-ui/xr-diagnostics/index.d.ts +26 -0
- package/dist/debug-ui.cjs +3 -3
- package/dist/debug-ui.js +2695 -2547
- package/dist/detector-K8aej4MB.js +59 -0
- package/dist/detector-ijypGtse.cjs +1 -0
- package/dist/entries/all.d.ts +3 -1
- package/dist/entries/core.d.ts +20 -2
- package/dist/entries/face-effects.d.ts +123 -9
- package/dist/entries/instructions.d.ts +48 -0
- package/dist/entries/internal.d.ts +2 -1
- package/dist/entries/low-level.d.ts +49 -3
- package/dist/entries/particles.d.ts +11 -0
- package/dist/entries/product.d.ts +11 -0
- package/dist/entries/tracking.d.ts +60 -2
- package/dist/face-atlas/attributes.d.ts +30 -0
- package/dist/face-atlas/eyes.d.ts +272 -0
- package/dist/face-atlas/faceAtlas.generated.d.ts +46 -0
- package/dist/face-atlas/glsl/atlasVertex.d.ts +46 -0
- package/dist/face-atlas/glsl/common.d.ts +55 -0
- package/dist/face-atlas/glsl/design.d.ts +49 -0
- package/dist/face-atlas/glsl/eyes.d.ts +73 -0
- package/dist/face-atlas/glsl/finish.d.ts +24 -0
- package/dist/face-atlas/glsl/format.d.ts +4 -0
- package/dist/face-atlas/glsl/index.d.ts +59 -0
- package/dist/face-atlas/glsl/shading.d.ts +15 -0
- package/dist/face-atlas/glsl/shapes.d.ts +66 -0
- package/dist/face-atlas/glsl/sparkle.d.ts +19 -0
- package/dist/face-atlas/glsl/uniforms.d.ts +106 -0
- package/dist/face-atlas/guide.d.ts +51 -0
- package/dist/face-atlas/index.d.ts +25 -0
- package/dist/face-atlas/lead.d.ts +117 -0
- package/dist/face-atlas/madeUpCamera.d.ts +125 -0
- package/dist/face-atlas/masks.d.ts +53 -0
- package/dist/face-atlas/obj.d.ts +69 -0
- package/dist/face-atlas/polylines.d.ts +63 -0
- package/dist/face-atlas/probe/FaceSkinProbe.d.ts +208 -0
- package/dist/face-atlas/probe/__fixtures__/emulate.d.ts +9 -0
- package/dist/face-atlas/probe/__fixtures__/face.d.ts +24 -0
- package/dist/face-atlas/probe/constants.d.ts +137 -0
- package/dist/face-atlas/probe/glsl.d.ts +43 -0
- package/dist/face-atlas/probe/lightFit.d.ts +108 -0
- package/dist/face-atlas/probe/schedule.d.ts +44 -0
- package/dist/face-atlas/probe/selfTest.d.ts +87 -0
- package/dist/face-atlas/probe/stats.d.ts +143 -0
- package/dist/face-atlas/probe/targets.d.ts +70 -0
- package/dist/face-atlas/probe/unwrap.d.ts +76 -0
- package/dist/face-atlas/quality.d.ts +28 -0
- package/dist/face-atlas/regions.d.ts +31 -0
- package/dist/face-atlas/registry.d.ts +252 -0
- package/dist/face-atlas/renderState.d.ts +86 -0
- package/dist/face-atlas/selfOcclusion.d.ts +62 -0
- package/dist/face-atlas/shading.d.ts +406 -0
- package/dist/face-atlas/shapes.d.ts +86 -0
- package/dist/face-atlas/sides.d.ts +41 -0
- package/dist/face-atlas/skinMask.d.ts +35 -0
- package/dist/face-atlas/surface.d.ts +155 -0
- package/dist/face-atlas/topology.d.ts +44 -0
- package/dist/face-character/__fixtures__/faceImageDetections.d.ts +25 -0
- package/dist/face-character/__fixtures__/faceNode.d.ts +22 -0
- package/dist/face-character/bindFaceModel.d.ts +106 -0
- package/dist/face-character/canonicalFace.d.ts +17 -0
- package/dist/face-character/canonicalFaceGeometry.d.ts +11 -0
- package/dist/face-character/canonicalFacePositions.d.ts +7 -0
- package/dist/face-character/driveFaceModel.d.ts +57 -0
- package/dist/face-character/expressionOutputs.d.ts +45 -0
- package/dist/face-character/faceExpressions.d.ts +104 -0
- package/dist/face-character/faceImageLandmarker.d.ts +93 -0
- package/dist/face-character/faceMeshBinding.d.ts +62 -0
- package/dist/face-character/faceMorph.d.ts +77 -0
- package/dist/face-character/faceMorphs.d.ts +46 -0
- package/dist/face-character/facePhoto.d.ts +138 -0
- package/dist/face-character/facePiercings.d.ts +116 -0
- package/dist/face-character/facePin.d.ts +131 -0
- package/dist/face-character/faceReprojection.d.ts +273 -0
- package/dist/face-character/faceReprojector.d.ts +171 -0
- package/dist/face-character/faceRig.d.ts +176 -0
- package/dist/face-character/faceSwapPresence.d.ts +85 -0
- package/dist/face-character/faceTexture.d.ts +169 -0
- package/dist/face-character/faceTextureBaker.d.ts +86 -0
- package/dist/face-character/faceTextureGuide.d.ts +106 -0
- package/dist/face-character/faceTextureStats.d.ts +298 -0
- package/dist/face-character/faceTransfer.d.ts +396 -0
- package/dist/face-character/faceTransferGeometry.d.ts +109 -0
- package/dist/face-character/faceTransferSelfTest.d.ts +94 -0
- package/dist/face-character/faceWarp3D.d.ts +101 -0
- package/dist/face-character/faceless.d.ts +79 -0
- package/dist/face-character/featureWarp.d.ts +28 -0
- package/dist/face-character/liveFaceRegistry.d.ts +370 -0
- package/dist/face-character/liveValue.d.ts +12 -0
- package/dist/face-character/memo.d.ts +15 -0
- package/dist/face-effects.cjs +2324 -1
- package/dist/face-effects.js +14208 -2268
- package/dist/face-expression/index.d.ts +182 -0
- package/dist/face-info/landmarks.d.ts +17 -3
- package/dist/face-info/types.d.ts +20 -3
- package/dist/gestures/definitions.d.ts +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-B1otSDMX.cjs +1 -0
- package/dist/getFaceInfo-Cu4xDWiL.js +62 -0
- package/dist/hand/armFit.d.ts +46 -0
- package/dist/hand/armMask.d.ts +178 -0
- package/dist/hand/handCutout.d.ts +23 -0
- package/dist/hand/handCutoutRegistry.d.ts +7 -0
- package/dist/hand/handGestures.d.ts +524 -0
- package/dist/hand/handPose.d.ts +98 -0
- package/dist/hand/handRigSolver.d.ts +159 -0
- package/dist/hand/handTattoo.d.ts +81 -0
- package/dist/hand/handTouch.d.ts +240 -0
- package/dist/hand/wrist.d.ts +44 -0
- package/dist/hand/wristFilter.d.ts +44 -0
- package/dist/hooks/selectors.d.ts +76 -1
- package/dist/hooks/useCalibrationFaceTracker.d.ts +1 -1
- package/dist/hooks/useFaceInfo.d.ts +13 -1
- package/dist/hooks/useFaceInfos.d.ts +1 -1
- package/dist/hooks/useFaceModelAcquisition.d.ts +38 -0
- package/dist/hooks/useGesture.d.ts +32 -0
- package/dist/hooks/useIrisTracking.d.ts +45 -0
- package/dist/hooks/useTrackerContext.d.ts +6 -0
- package/dist/hooks/useXRDiagnostics.d.ts +81 -0
- package/dist/hooks/useXRModel.d.ts +7 -0
- package/dist/hooks/useXRSession/facade.d.ts +42 -2
- package/dist/hooks/useXRSession/index.d.ts +2 -2
- package/dist/hooks/useXRSession/reason.d.ts +3 -1
- package/dist/hooks/useXRSession/registry.d.ts +14 -0
- package/dist/hooks/useXRSession/store.d.ts +52 -3
- package/dist/index-B1_TzJaI.js +1104 -0
- package/dist/index-BavF06C6.js +190 -0
- package/dist/index-BfFmpddl.cjs +21 -0
- package/dist/index-BuBzneeW.cjs +46 -0
- package/dist/index-CGsQWodV.cjs +1 -0
- package/dist/index-CIe7eCMH.js +3200 -0
- package/dist/index-CfSF8LXa.cjs +1 -0
- package/dist/index-D5GTzOzD.cjs +1 -0
- package/dist/index-DBhQzvVa.js +314 -0
- package/dist/index-DE17y0ZI.cjs +1 -0
- package/dist/index-JII7huPk.js +442 -0
- package/dist/index-tpCr9CLj.cjs +1 -0
- package/dist/index-w1S7fI2B.js +1432 -0
- package/dist/index-zGaqrz_K.js +188 -0
- package/dist/instructions.cjs +30 -0
- package/dist/instructions.js +1507 -0
- package/dist/{internal-Dmk1cTXq.js → internal-B90P-clC.js} +138 -119
- package/dist/internal-Cjinca64.cjs +1 -0
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +15 -10
- package/dist/iris/compute.d.ts +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-BFDyBnKM.js +224 -0
- package/dist/landmarkMask-u7es2k4X.cjs +1 -0
- package/dist/landmarks-BlUqf5MZ.cjs +1 -0
- package/dist/landmarks-bftdwq6Z.js +76 -0
- package/dist/loaders-BGAUACsd.js +363 -0
- package/dist/loaders-BJ1_QCHt.cjs +1 -0
- package/dist/low-level.cjs +1 -1
- package/dist/low-level.js +1190 -675
- package/dist/main.cjs +1 -1
- package/dist/main.js +1190 -452
- package/dist/models/Base/index.d.ts +49 -0
- package/dist/models/Body/index.d.ts +3 -1
- package/dist/models/Face/constants.d.ts +8 -0
- package/dist/models/Face/index.d.ts +4 -12
- package/dist/models/Face/rotation.d.ts +18 -3
- package/dist/models/Hand/GestureTracking.d.ts +1 -1
- package/dist/models/Hand/HandTracking.d.ts +17 -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 +2 -0
- package/dist/models/SemanticSegmentation/index.d.ts +31 -0
- package/dist/models/SemanticSegmentation/presets.d.ts +28 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/nodeSource.d.ts +9 -0
- package/dist/particles/emission.d.ts +24 -0
- package/dist/particles/eyes.d.ts +24 -0
- package/dist/particles/glsl.d.ts +14 -0
- package/dist/particles/index.d.ts +10 -0
- package/dist/particles/motion.d.ts +42 -0
- package/dist/particles/presets.d.ts +12 -0
- package/dist/particles/ring.d.ts +58 -0
- package/dist/particles/selfTest.d.ts +53 -0
- package/dist/particles/settings.d.ts +127 -0
- package/dist/particles/shapes.d.ts +29 -0
- package/dist/particles/spawner.d.ts +60 -0
- package/dist/particles/system.d.ts +64 -0
- package/dist/particles.cjs +122 -0
- package/dist/particles.js +774 -0
- package/dist/product/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-C8rE26Uf.js +366 -0
- package/dist/providers-DHsrhDI2.cjs +62 -0
- package/dist/quality/XRQualityController.d.ts +25 -0
- package/dist/quality/controller.d.ts +33 -0
- package/dist/quality/index.d.ts +6 -0
- package/dist/quality/types.d.ts +100 -0
- package/dist/quality/useXRQuality.d.ts +28 -0
- package/dist/render/renderPasses.d.ts +8 -0
- package/dist/render/sceneBeforeRender.d.ts +12 -0
- package/dist/{renderGroups-KZk6eRiY.js → renderGroups-B38pUaX2.js} +1 -1
- package/dist/{renderGroups-80H3DpTl.cjs → renderGroups-Cb_4Ar1Q.cjs} +1 -1
- package/dist/renderPasses-B6l8IpJv.js +1290 -0
- package/dist/renderPasses-dqmkft4P.cjs +158 -0
- package/dist/renderState-CJNmj5jz.js +39 -0
- package/dist/renderState-apSfg4eR.cjs +1 -0
- package/dist/scene-object.cjs +1 -1
- package/dist/scene-object.js +2 -2
- package/dist/segmentation-Cb3ouK6Z.js +1758 -0
- package/dist/segmentation-D9pYO6aR.cjs +1 -0
- package/dist/segmentation2d/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/select-Ck5LGz-J.cjs +1 -0
- package/dist/select-pYRo_win.js +233 -0
- package/dist/selectors-C4X71aoD.cjs +1 -0
- package/dist/selectors-DmNaKIwE.js +196 -0
- package/dist/session-BrH8G7iJ.cjs +31 -0
- package/dist/session-DgA_z6O1.js +418 -0
- package/dist/settings-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 +62 -0
- package/dist/subjects/types.d.ts +55 -0
- package/dist/tracking-config/apply.d.ts +57 -0
- package/dist/tracking-config/index.d.ts +7 -0
- package/dist/tracking-config/resolve.d.ts +25 -0
- package/dist/tracking-config/storage.d.ts +8 -0
- package/dist/tracking-config/types.d.ts +106 -0
- package/dist/tracking-config/useXRTrackingConfig.d.ts +38 -0
- package/dist/tracking.cjs +10 -1
- package/dist/tracking.js +1326 -506
- package/dist/trigger-D0Pm9noT.cjs +49 -0
- package/dist/trigger-IQeys0oS.js +2128 -0
- package/dist/types/compositor.d.ts +21 -0
- package/dist/types/face.d.ts +20 -1
- package/dist/types/hand-tracking.d.ts +9 -0
- package/dist/types/holistic.d.ts +121 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/model.d.ts +22 -2
- package/dist/types/nodes.d.ts +47 -3
- package/dist/types/segmentation.d.ts +24 -0
- package/dist/types/session.d.ts +41 -3
- package/dist/updateThrottle-BseecYag.js +4 -0
- package/dist/updateThrottle-Of5Y4SVa.cjs +1 -0
- package/dist/useFaceInfo-BHDNCvsJ.cjs +1 -0
- package/dist/useFaceInfo-J4x7LsqL.js +76 -0
- package/dist/useFaceResultReader-BvEo5REG.js +61 -0
- package/dist/useFaceResultReader-DuaL1KJG.cjs +1 -0
- package/dist/useInstructionHold-DOu-RpCM.js +53 -0
- package/dist/useInstructionHold-DwJY1Alr.cjs +1 -0
- package/dist/useLandmarkPoseFit-Bg-h9BPb.cjs +1 -0
- package/dist/useLandmarkPoseFit-Bmb3h6Mw.js +87 -0
- package/dist/useXRCapabilities-Cr3RzuAW.cjs +1 -0
- package/dist/useXRCapabilities-Cxmlmpbd.js +30 -0
- package/dist/utils/canonicalRigidLandmarks.d.ts +8 -0
- package/dist/utils/fns.d.ts +6 -3
- package/dist/utils/headOccluderFit.d.ts +42 -0
- package/dist/utils/integrity.d.ts +21 -1
- 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/uv-BMFt19bg.cjs +1 -0
- package/dist/{index-ByoNj0QP.js → uv-DJU_XfmN.js} +15 -247
- package/docs/SDK_DOCUMENTATION.md +1 -2
- package/docs/api/adaptive-quality.mdx +104 -0
- package/docs/api/asset-lifecycle.mdx +78 -0
- package/docs/api/body-instructions.mdx +285 -0
- package/docs/api/body-triggers.mdx +234 -0
- package/docs/api/camera-permission.mdx +142 -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 +23 -2
- package/docs/api/diagnostics-calibration.mdx +97 -0
- package/docs/api/external-face-mesh.mdx +231 -0
- package/docs/api/face-actions.mdx +20 -16
- package/docs/api/face-attribute-expression.mdx +1 -1
- package/docs/api/face-binding-anchors.mdx +4 -2
- package/docs/api/face-character.mdx +157 -0
- package/docs/api/face-effects.mdx +9 -0
- package/docs/api/face-expression-controller.mdx +153 -0
- package/docs/api/face-info.mdx +17 -11
- package/docs/api/face-inset.mdx +204 -0
- package/docs/api/face-instructions.mdx +183 -0
- package/docs/api/face-liquify.mdx +196 -0
- package/docs/api/face-mesh.mdx +8 -9
- package/docs/api/face-morph.mdx +117 -0
- package/docs/api/face-painting.mdx +7 -0
- package/docs/api/face-reprojection.mdx +154 -0
- package/docs/api/face-retouching.mdx +18 -10
- package/docs/api/face-swap.mdx +350 -0
- package/docs/api/face-warp-3d.mdx +166 -0
- package/docs/api/faceless.mdx +143 -0
- package/docs/api/gestures.mdx +209 -0
- package/docs/api/hair.mdx +97 -0
- package/docs/api/hand-instructions.mdx +222 -0
- package/docs/api/hand-rig.mdx +535 -0
- package/docs/api/hand-touch.mdx +162 -0
- package/docs/api/head-occluder.mdx +563 -0
- package/docs/api/holistic-tracker.mdx +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/multi-subject.mdx +98 -0
- package/docs/api/particles.mdx +155 -0
- package/docs/api/person-cutout.mdx +136 -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/screen-space-coordinates.mdx +4 -1
- package/docs/api/segmentation-overlay.mdx +301 -0
- package/docs/api/session-lifecycle.mdx +136 -0
- package/docs/api/trackers.mdx +5 -0
- package/docs/api/tracking-config.mdx +108 -0
- package/docs/docs.json +51 -1
- package/docs/examples/lip-shaders.mdx +273 -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 +4 -4
- 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/introduction.mdx +1 -2
- package/package.json +23 -1
- package/dist/DebuggerUI-B6bP6P9r.cjs +0 -1
- package/dist/DebuggerUI-BjOMr8q_.js +0 -269
- package/dist/FaceMeshRenderer-C5l6VLdO.cjs +0 -155
- package/dist/FaceMeshRenderer-wjAHrJzP.js +0 -1270
- package/dist/FaceRetouch-BkJzoA79.cjs +0 -134
- package/dist/FaceRetouch-DwbKQJAN.js +0 -551
- package/dist/components/FaceWarp3D/FaceWarp3DHead.d.ts +0 -15
- package/dist/components/FaceWarp3D/defaults.d.ts +0 -37
- package/dist/components/FaceWarp3D/warp.d.ts +0 -13
- package/dist/contexts-ByhzppYl.js +0 -663
- package/dist/contexts-Dr62It_K.cjs +0 -1
- package/dist/debug-ui/face-warp-3d/index.d.ts +0 -6
- package/dist/getFaceInfo-C4QpCQIY.js +0 -118
- package/dist/getFaceInfo-fA1bFBub.cjs +0 -1
- package/dist/index-9dlAQAhy.js +0 -1462
- package/dist/index-BjmTe9eM.cjs +0 -1
- package/dist/index-BpEf2BBb.cjs +0 -1
- package/dist/index-CyUUurQT.cjs +0 -1
- package/dist/index-DCiMbxC3.cjs +0 -1
- package/dist/index-DXT3WccE.js +0 -2089
- package/dist/index-DpI-qo5X.cjs +0 -17
- package/dist/index-DyVF4vEW.js +0 -111
- package/dist/index-VJ0SJwmG.js +0 -214
- package/dist/internal-Cq-TEQ5Y.cjs +0 -1
- package/dist/renderLayers-lDtL0_43.cjs +0 -1
- package/dist/renderLayers-zrK2pv5O.js +0 -13
- package/dist/renderPasses-BOoBSr8z.cjs +0 -21
- package/dist/renderPasses-BcquyVtu.js +0 -1500
- package/dist/selectors-B8H97CKA.js +0 -59
- package/dist/selectors-CZLKT2Iv.cjs +0 -1
- package/dist/session-CpkiK5YA.cjs +0 -31
- package/dist/session-DLFN_VII.js +0 -363
- package/dist/useFaceInfo-BJ8-_MOs.cjs +0 -1
- package/dist/useFaceInfo-Dk426LTu.js +0 -62
- package/dist/useFaceResults-CtetsO9M.js +0 -19
- package/dist/useFaceResults-wBJF3zyp.cjs +0 -1
package/dist/tracking.js
CHANGED
|
@@ -1,20 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { useThree as
|
|
5
|
-
import { useRef as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { u as
|
|
13
|
-
import { a as
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
|
|
1
|
+
import { T as ie } from "./index-BavF06C6.js";
|
|
2
|
+
import { a as Dn, F as bn } from "./index-BavF06C6.js";
|
|
3
|
+
import { jsx as N, jsxs as ut, Fragment as lt } from "react/jsx-runtime";
|
|
4
|
+
import { useThree as oe, useFrame as U, createPortal as dt } from "@react-three/fiber";
|
|
5
|
+
import { useRef as E, useMemo as x, useCallback as j, useContext as De, useEffect as v, useState as V, createContext as ft, useSyncExternalStore as ht } from "react";
|
|
6
|
+
import { X as W, t as q, C as Je, a5 as mt, k as Me, i as pt, u as Qe, j as Tt } from "./index-CIe7eCMH.js";
|
|
7
|
+
import { aa as In, a8 as Nn, a7 as xn, a9 as Cn, a as Hn, H as Ln, a6 as Mn, w as wn, y as Fn, n as kn, b as Pn } from "./index-CIe7eCMH.js";
|
|
8
|
+
import { R as ce } from "./uv-DJU_XfmN.js";
|
|
9
|
+
import { u as $, r as gt } from "./landmarks-bftdwq6Z.js";
|
|
10
|
+
import { a as Un } from "./landmarks-bftdwq6Z.js";
|
|
11
|
+
import { r as Et, M as we, B as St, g as de, c as Fe, s as At, a as Rt } from "./SegmentationOverlay-vn5x_knv.js";
|
|
12
|
+
import { b as jn, j as Kn, C as Wn, k as Vn, l as Yn, m as Xn, e as qn, D as zn, p as Jn, F as Qn, S as $n, f as Zn, v as es, h as ts, d as rs, q as ns, t as ss, i as os, n as as, u as is, o as cs } from "./SegmentationOverlay-vn5x_knv.js";
|
|
13
|
+
import { H as _t, a as yt, O as Ot, m as Dt, b as te, c as ke, d as re, e as bt, f as vt, g as It, h as Nt, i as xt, r as Ct, s as ge, j as Ht, k as Lt, l as Mt, n as Pe } from "./trigger-IQeys0oS.js";
|
|
14
|
+
import { L as ls, M as ds, N as fs, P as hs, q as ms, t as ps, u as Ts, F as gs, y as Es, B as Ss, C as As, J as Rs, D as _s, E as ys, K as Os, z as Ds, o as bs, A as vs, G as Is, T as Ns, v as xs, w as Cs, W as Hs, p as Ls, Q as Ms, R as ws, I as Fs, x as ks } from "./trigger-IQeys0oS.js";
|
|
15
|
+
import * as K from "three";
|
|
16
|
+
import { t as wt, B as Ft, g as kt } from "./index-JII7huPk.js";
|
|
17
|
+
import { u as Bs, q as Us } from "./index-JII7huPk.js";
|
|
18
|
+
import { H as $e } from "./settings-BJ7FMBsO.js";
|
|
19
|
+
import { c as js, D as Ks, G as Ws, a as Vs, b as Ys, d as Xs, p as qs, e as zs, r as Js, t as Qs } from "./settings-BJ7FMBsO.js";
|
|
20
|
+
import { b as Pt, e as be, g as Bt } from "./selectors-DmNaKIwE.js";
|
|
21
|
+
import { a as Be } from "./segmentation-Cb3ouK6Z.js";
|
|
22
|
+
import { S as Zs } from "./segmentation-Cb3ouK6Z.js";
|
|
23
|
+
import { B as to, c as ro, F as no, H as so, l as oo, n as ao } from "./index-DBhQzvVa.js";
|
|
24
|
+
import { r as Ue, c as Oe, s as Ze, a as Ut, g as Gt } from "./detector-K8aej4MB.js";
|
|
25
|
+
import { D as co } from "./detector-K8aej4MB.js";
|
|
26
|
+
import { d as Ge, a as jt, b as Kt } from "./getFaceInfo-Cu4xDWiL.js";
|
|
27
|
+
import { D as lo, e as fo, h as ho } from "./getFaceInfo-Cu4xDWiL.js";
|
|
28
|
+
import { s as Wt } from "./useInstructionHold-DOu-RpCM.js";
|
|
29
|
+
import { u as Vt } from "./useFaceInfo-J4x7LsqL.js";
|
|
30
|
+
import { D as po, a as To } from "./useFaceInfo-J4x7LsqL.js";
|
|
31
|
+
import { d as Yt } from "./drawNormalizedCrop-CRdIDyl1.js";
|
|
32
|
+
import { D as Eo, E as So, X as Ao, q as Ro, r as _o, u as yo, s as Oo } from "./select-pYRo_win.js";
|
|
33
|
+
import { d as bo, e as vo, P as Io, f as No, g as xo, h as Co } from "./providers-C8rE26Uf.js";
|
|
34
|
+
import { D as Lo, e as Mo, r as wo } from "./landmarkMask-BFDyBnKM.js";
|
|
35
|
+
const et = {
|
|
18
36
|
"hand.wrist": 0,
|
|
19
37
|
"hand.thumbTip": 4,
|
|
20
38
|
"hand.indexTip": 8,
|
|
@@ -26,9 +44,9 @@ const re = {
|
|
|
26
44
|
"hand.ringBase": 13,
|
|
27
45
|
"hand.pinkyBase": 17
|
|
28
46
|
};
|
|
29
|
-
function
|
|
30
|
-
var
|
|
31
|
-
const n = (
|
|
47
|
+
function tt(e, r, t = 0) {
|
|
48
|
+
var s;
|
|
49
|
+
const n = (s = e == null ? void 0 : e.hands) != null && s.length ? e.hands : e != null && e.coordinates ? [
|
|
32
50
|
{
|
|
33
51
|
coordinates: e.coordinates,
|
|
34
52
|
gesture: e.gesture,
|
|
@@ -36,60 +54,55 @@ function oe(e, t, r = 0) {
|
|
|
36
54
|
}
|
|
37
55
|
] : [];
|
|
38
56
|
if (n.length) {
|
|
39
|
-
if (
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
57
|
+
if (r) {
|
|
58
|
+
const c = n.find((u) => u.handedness === r);
|
|
59
|
+
if (c) return c;
|
|
42
60
|
}
|
|
43
|
-
return n[
|
|
61
|
+
return n[t] ?? n[0];
|
|
44
62
|
}
|
|
45
63
|
}
|
|
46
|
-
const
|
|
64
|
+
const sn = ({
|
|
47
65
|
children: e,
|
|
48
|
-
hand:
|
|
49
|
-
handIndex:
|
|
66
|
+
hand: r,
|
|
67
|
+
handIndex: t = 0,
|
|
50
68
|
targetFps: n,
|
|
51
|
-
active:
|
|
69
|
+
active: s = !0
|
|
52
70
|
}) => {
|
|
53
|
-
const
|
|
71
|
+
const c = E(null), u = x(
|
|
54
72
|
() => n === void 0 ? void 0 : { targetFps: n },
|
|
55
73
|
[n]
|
|
56
|
-
), { ready:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
), { camera:
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
var
|
|
65
|
-
if (!
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
if (!
|
|
70
|
-
|
|
74
|
+
), { ready: o, node: a } = $(
|
|
75
|
+
W.HAND_TRACKER,
|
|
76
|
+
u,
|
|
77
|
+
s
|
|
78
|
+
), { camera: i } = oe(), f = E(i);
|
|
79
|
+
f.current !== i && (f.current = i);
|
|
80
|
+
const d = E(null);
|
|
81
|
+
U(() => {
|
|
82
|
+
var l;
|
|
83
|
+
if (!o || !a || !c.current) return;
|
|
84
|
+
const A = tt(a, r, t);
|
|
85
|
+
d.current = A ?? null;
|
|
86
|
+
const p = (l = A == null ? void 0 : A.coordinates) == null ? void 0 : l[0];
|
|
87
|
+
if (!p) {
|
|
88
|
+
c.current.visible = !1;
|
|
71
89
|
return;
|
|
72
90
|
}
|
|
73
|
-
const
|
|
74
|
-
|
|
91
|
+
const S = q(p, f.current);
|
|
92
|
+
c.current.visible = !0, c.current.position.copy(S);
|
|
75
93
|
});
|
|
76
|
-
const
|
|
77
|
-
var
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
return
|
|
82
|
-
}, []),
|
|
83
|
-
() => ({ type: "hand", resolveLandmark:
|
|
84
|
-
[
|
|
94
|
+
const h = j((A) => {
|
|
95
|
+
var l, T;
|
|
96
|
+
const p = et[A];
|
|
97
|
+
if (p === void 0) return null;
|
|
98
|
+
const S = (T = (l = d.current) == null ? void 0 : l.coordinates) == null ? void 0 : T[p];
|
|
99
|
+
return S ? { position: q(S, f.current) } : null;
|
|
100
|
+
}, []), m = x(
|
|
101
|
+
() => ({ type: "hand", resolveLandmark: h }),
|
|
102
|
+
[h]
|
|
85
103
|
);
|
|
86
|
-
return /* @__PURE__ */
|
|
87
|
-
},
|
|
88
|
-
const r = new U.Vector3(e.x, e.y, e.z);
|
|
89
|
-
r.unproject(t);
|
|
90
|
-
const n = r.sub(t.position).normalize(), o = -t.position.z / n.z;
|
|
91
|
-
return t.position.clone().add(n.multiplyScalar(o));
|
|
92
|
-
}, se = {
|
|
104
|
+
return /* @__PURE__ */ N(ie.Provider, { value: m, children: /* @__PURE__ */ N("group", { ref: c, renderOrder: ce.TRACKED, children: e }) });
|
|
105
|
+
}, Xt = {
|
|
93
106
|
"hand.wrist": 0,
|
|
94
107
|
"hand.thumbTip": 4,
|
|
95
108
|
"hand.indexTip": 8,
|
|
@@ -100,170 +113,1025 @@ const Ne = ({
|
|
|
100
113
|
"hand.middleBase": 9,
|
|
101
114
|
"hand.ringBase": 13,
|
|
102
115
|
"hand.pinkyBase": 17
|
|
103
|
-
},
|
|
104
|
-
const n =
|
|
105
|
-
() =>
|
|
106
|
-
[
|
|
107
|
-
), { ready:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
), { camera:
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
var
|
|
116
|
-
if (!
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
if (!
|
|
116
|
+
}, on = ({ children: e, targetFps: r, active: t = !0 }) => {
|
|
117
|
+
const n = E(null), s = x(
|
|
118
|
+
() => r === void 0 ? void 0 : { targetFps: r },
|
|
119
|
+
[r]
|
|
120
|
+
), { ready: c, node: u } = $(
|
|
121
|
+
W.GESTURE_TRACKER,
|
|
122
|
+
s,
|
|
123
|
+
t
|
|
124
|
+
), { camera: o } = oe(), a = E(o);
|
|
125
|
+
a.current !== o && (a.current = o);
|
|
126
|
+
const i = E(null);
|
|
127
|
+
U(() => {
|
|
128
|
+
var A;
|
|
129
|
+
if (!c || !u || !n.current) return;
|
|
130
|
+
i.current = u;
|
|
131
|
+
const h = (A = u == null ? void 0 : u.coordinates) == null ? void 0 : A[0];
|
|
132
|
+
if (!h) {
|
|
120
133
|
n.current.visible = !1;
|
|
121
134
|
return;
|
|
122
135
|
}
|
|
123
|
-
const
|
|
124
|
-
n.current.visible = !0, n.current.position.copy(
|
|
136
|
+
const m = q(h, a.current);
|
|
137
|
+
n.current.visible = !0, n.current.position.copy(m);
|
|
125
138
|
});
|
|
126
|
-
const
|
|
127
|
-
var
|
|
128
|
-
const
|
|
129
|
-
if (
|
|
130
|
-
const
|
|
131
|
-
return
|
|
132
|
-
}, []),
|
|
133
|
-
() => ({ type: "hand", resolveLandmark:
|
|
134
|
-
[
|
|
139
|
+
const f = j((h) => {
|
|
140
|
+
var p, S;
|
|
141
|
+
const m = Xt[h];
|
|
142
|
+
if (m === void 0) return null;
|
|
143
|
+
const A = (S = (p = i.current) == null ? void 0 : p.coordinates) == null ? void 0 : S[m];
|
|
144
|
+
return A ? { position: q(A, a.current) } : null;
|
|
145
|
+
}, []), d = x(
|
|
146
|
+
() => ({ type: "hand", resolveLandmark: f }),
|
|
147
|
+
[f]
|
|
135
148
|
);
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
-
},
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
149
|
+
return /* @__PURE__ */ N(ie.Provider, { value: d, children: /* @__PURE__ */ N("group", { ref: n, renderOrder: ce.TRACKED, children: e }) });
|
|
150
|
+
}, an = ({ joint: e, along: r = 0.5, offset: t, children: n }) => {
|
|
151
|
+
const s = De(_t), c = E(null), u = x(
|
|
152
|
+
() => ({
|
|
153
|
+
transform: {
|
|
154
|
+
position: new K.Vector3(),
|
|
155
|
+
quaternion: new K.Quaternion()
|
|
156
|
+
},
|
|
157
|
+
offsetE: new K.Euler(),
|
|
158
|
+
offsetQ: new K.Quaternion(),
|
|
159
|
+
offsetP: new K.Vector3()
|
|
160
|
+
}),
|
|
161
|
+
[]
|
|
162
|
+
);
|
|
163
|
+
U(() => {
|
|
164
|
+
var h, m, A, p, S, l;
|
|
165
|
+
const i = c.current;
|
|
166
|
+
if (!i || !s) return;
|
|
167
|
+
const { position: f, quaternion: d } = wt(s, e, r, u.transform);
|
|
168
|
+
u.offsetQ.setFromEuler(
|
|
169
|
+
u.offsetE.set(
|
|
170
|
+
((h = t == null ? void 0 : t.rotation) == null ? void 0 : h[0]) ?? 0,
|
|
171
|
+
((m = t == null ? void 0 : t.rotation) == null ? void 0 : m[1]) ?? 0,
|
|
172
|
+
((A = t == null ? void 0 : t.rotation) == null ? void 0 : A[2]) ?? 0
|
|
173
|
+
)
|
|
174
|
+
), u.offsetP.set(
|
|
175
|
+
((p = t == null ? void 0 : t.position) == null ? void 0 : p[0]) ?? 0,
|
|
176
|
+
((S = t == null ? void 0 : t.position) == null ? void 0 : S[1]) ?? 0,
|
|
177
|
+
((l = t == null ? void 0 : t.position) == null ? void 0 : l[2]) ?? 0
|
|
178
|
+
), i.position.copy(f).add(u.offsetP.applyQuaternion(d)), i.quaternion.copy(d).multiply(u.offsetQ), i.scale.setScalar((t == null ? void 0 : t.scale) ?? 1);
|
|
179
|
+
});
|
|
180
|
+
const o = !s;
|
|
181
|
+
if (v(() => {
|
|
182
|
+
o && console.warn(
|
|
183
|
+
`${Je.loggerPrefix} HandAttachment must be inside a HandRig or HandOccluder`
|
|
184
|
+
);
|
|
185
|
+
}, [o]), !s) return null;
|
|
186
|
+
const a = s.bones[e];
|
|
187
|
+
return a ? dt(/* @__PURE__ */ N("group", { ref: c, children: n }), a) : null;
|
|
188
|
+
}, se = 10, J = [0, 1, 5, 9, 13, 17], qt = -0.5, je = J.length + $e.length * 2 + 21 * se + 2 + se, zt = (e, r, { inflate: t = 1, forearm: n = 1.4 }, s, c = 0) => {
|
|
189
|
+
let u = c;
|
|
190
|
+
const o = (g, _) => {
|
|
191
|
+
s[u * 2] = g, s[u * 2 + 1] = _, u += 1;
|
|
192
|
+
}, a = (g) => e[g].x * r, i = (g) => e[g].y, f = Math.hypot(a(0) - a(9), i(0) - i(9)), d = 0.12 * f * t;
|
|
193
|
+
let h = 0, m = 0;
|
|
194
|
+
for (const g of J)
|
|
195
|
+
h += a(g), m += i(g);
|
|
196
|
+
h /= J.length, m /= J.length;
|
|
197
|
+
for (let g = 0; g < J.length; g += 1) {
|
|
198
|
+
const _ = J[g], D = J[(g + 1) % J.length];
|
|
199
|
+
o(h / r, m), o(a(_) / r, i(_)), o(a(D) / r, i(D));
|
|
200
|
+
}
|
|
201
|
+
const A = (g, _, D, R, H) => {
|
|
202
|
+
const P = D - g, b = R - _, y = Math.hypot(P, b) || 1, M = -b / y * H, k = P / y * H;
|
|
203
|
+
o((g + M) / r, _ + k), o((D + M) / r, R + k), o((D - M) / r, R - k), o((g + M) / r, _ + k), o((D - M) / r, R - k), o((g - M) / r, _ - k);
|
|
204
|
+
}, p = (g, _, D) => {
|
|
205
|
+
for (let R = 0; R < se; R += 1) {
|
|
206
|
+
const H = R / se * Math.PI * 2, P = (R + 1) / se * Math.PI * 2;
|
|
207
|
+
o(g / r, _), o((g + Math.cos(H) * D) / r, _ + Math.sin(H) * D), o((g + Math.cos(P) * D) / r, _ + Math.sin(P) * D);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
for (const [g, _] of $e) {
|
|
211
|
+
const D = g === 0 ? d * 1.4 : d;
|
|
212
|
+
A(a(g), i(g), a(_), i(_), D);
|
|
213
|
+
}
|
|
214
|
+
for (let g = 0; g < 21; g += 1) p(a(g), i(g), g === 0 ? d * 1.6 : d);
|
|
215
|
+
const S = a(0) - a(9), l = i(0) - i(9), T = Math.hypot(S, l) || 1, I = n * f, O = a(0) + S / T * I, C = i(0) + l / T * I;
|
|
216
|
+
if (n > 0) {
|
|
217
|
+
const g = d * 2, _ = -l / T * g, D = S / T * g;
|
|
218
|
+
o((a(0) + _) / r, i(0) + D), o((O + _) / r, C + D), o((O - _) / r, C - D), o((a(0) + _) / r, i(0) + D), o((O - _) / r, C - D), o((a(0) - _) / r, i(0) - D), p(O, C, g);
|
|
219
|
+
} else
|
|
220
|
+
for (let g = 0; g < (2 + se) * 3; g += 1) o(a(0) / r, i(0));
|
|
221
|
+
return u - c;
|
|
222
|
+
}, Ee = 2, Jt = (
|
|
223
|
+
/* glsl */
|
|
224
|
+
`
|
|
225
|
+
void main() {
|
|
226
|
+
// On the near plane: in front of everything drawn after it.
|
|
227
|
+
gl_Position = vec4(position.xy, -1.0, 1.0);
|
|
228
|
+
}
|
|
229
|
+
`
|
|
230
|
+
), Qt = (
|
|
231
|
+
/* glsl */
|
|
232
|
+
`
|
|
233
|
+
void main() {
|
|
234
|
+
gl_FragColor = vec4(1.0, 0.2, 0.8, 0.35);
|
|
235
|
+
}
|
|
236
|
+
`
|
|
237
|
+
), $t = () => new K.ShaderMaterial({
|
|
238
|
+
name: "HandCutout",
|
|
239
|
+
vertexShader: Jt,
|
|
240
|
+
fragmentShader: Qt,
|
|
241
|
+
depthTest: !0,
|
|
242
|
+
depthFunc: K.AlwaysDepth,
|
|
243
|
+
depthWrite: !0,
|
|
244
|
+
colorWrite: !1,
|
|
245
|
+
side: K.DoubleSide
|
|
246
|
+
}), cn = ({
|
|
247
|
+
inflate: e = 1,
|
|
248
|
+
forearm: r = 1.4,
|
|
249
|
+
debug: t = !1,
|
|
250
|
+
renderOrder: n = -900
|
|
251
|
+
}) => {
|
|
252
|
+
const s = Pt(W.HAND_TRACKER), c = oe((h) => h.size), u = oe((h) => h.scene), o = x(() => {
|
|
253
|
+
const h = new K.BufferGeometry(), m = new K.BufferAttribute(
|
|
254
|
+
new Float32Array(Ee * je * 3 * 3),
|
|
255
|
+
3
|
|
256
|
+
);
|
|
257
|
+
return m.setUsage(K.DynamicDrawUsage), h.setAttribute("position", m), h.setDrawRange(0, 0), h;
|
|
258
|
+
}, []);
|
|
259
|
+
v(() => () => o.dispose(), [o]), v(() => Et(u, o), [u, o]);
|
|
260
|
+
const a = x($t, []);
|
|
261
|
+
v(() => () => a.dispose(), [a]), v(() => {
|
|
262
|
+
a.colorWrite = t, a.transparent = t, a.needsUpdate = !0;
|
|
263
|
+
}, [a, t]);
|
|
264
|
+
const i = x(() => new Float32Array(Ee * je * 3 * 2), []), f = E(null);
|
|
265
|
+
v(() => {
|
|
266
|
+
const h = f.current;
|
|
267
|
+
if (!(!h || t))
|
|
268
|
+
return h.layers.enable(we), () => h.layers.disable(we);
|
|
269
|
+
}, [t]);
|
|
270
|
+
const d = E({ inflate: e, forearm: r });
|
|
271
|
+
return d.current = { inflate: e, forearm: r }, U(() => {
|
|
272
|
+
const h = (s == null ? void 0 : s.hands) ?? [], m = c.width / Math.max(1, c.height);
|
|
273
|
+
let A = 0;
|
|
274
|
+
for (const l of h.slice(0, Ee)) {
|
|
275
|
+
const T = l.coordinates;
|
|
276
|
+
!T || T.length < 21 || (A += zt(T, m, d.current, i, A));
|
|
277
|
+
}
|
|
278
|
+
const p = o.getAttribute("position"), S = p.array;
|
|
279
|
+
for (let l = 0; l < A; l += 1)
|
|
280
|
+
S[l * 3] = i[l * 2], S[l * 3 + 1] = i[l * 2 + 1], S[l * 3 + 2] = 0;
|
|
281
|
+
p.needsUpdate = !0, o.setDrawRange(0, A);
|
|
282
|
+
}, qt), /* @__PURE__ */ N("group", { children: /* @__PURE__ */ N(
|
|
283
|
+
"mesh",
|
|
284
|
+
{
|
|
285
|
+
ref: f,
|
|
286
|
+
geometry: o,
|
|
287
|
+
material: a,
|
|
288
|
+
renderOrder: n,
|
|
289
|
+
frustumCulled: !1
|
|
172
290
|
}
|
|
173
|
-
|
|
174
|
-
|
|
291
|
+
) });
|
|
292
|
+
}, Se = { hovered: !1, grabbed: !1, hand: null }, Zt = 1.08, un = ({
|
|
293
|
+
shape: e = "sphere",
|
|
294
|
+
size: r = 0.4,
|
|
295
|
+
position: t,
|
|
296
|
+
velocity: n,
|
|
297
|
+
mass: s,
|
|
298
|
+
bounce: c,
|
|
299
|
+
grabbable: u = !0,
|
|
300
|
+
pushable: o = !0,
|
|
301
|
+
gravity: a = !0,
|
|
302
|
+
color: i = "#f97316",
|
|
303
|
+
onGrab: f,
|
|
304
|
+
onRelease: d,
|
|
305
|
+
onTap: h,
|
|
306
|
+
onTouch: m,
|
|
307
|
+
onHoverChange: A,
|
|
308
|
+
children: p
|
|
309
|
+
}) => {
|
|
310
|
+
const S = De(yt), l = E(null), [T, I] = V(Se), [O, C] = V(null), g = { onGrab: f, onRelease: d, onTap: h, onTouch: m, onHoverChange: A }, _ = E(g);
|
|
311
|
+
_.current = g;
|
|
312
|
+
const D = E((b) => {
|
|
313
|
+
var M, k, L, w, Q, Y;
|
|
314
|
+
const y = _.current;
|
|
315
|
+
switch (b.type) {
|
|
316
|
+
case "grab":
|
|
317
|
+
I({ hovered: !1, grabbed: !0, hand: b.hand }), (M = y.onGrab) == null || M.call(y, b);
|
|
318
|
+
break;
|
|
319
|
+
case "release":
|
|
320
|
+
I(Se), (k = y.onRelease) == null || k.call(y, b);
|
|
321
|
+
break;
|
|
322
|
+
case "hoverstart":
|
|
323
|
+
I((F) => F.grabbed ? F : { hovered: !0, grabbed: !1, hand: b.hand }), (L = y.onHoverChange) == null || L.call(y, !0, b.hand);
|
|
324
|
+
break;
|
|
325
|
+
case "hoverend":
|
|
326
|
+
I((F) => F.grabbed ? F : Se), (w = y.onHoverChange) == null || w.call(y, !1, b.hand);
|
|
327
|
+
break;
|
|
328
|
+
case "tap":
|
|
329
|
+
(Q = y.onTap) == null || Q.call(y, b);
|
|
330
|
+
break;
|
|
331
|
+
case "touch":
|
|
332
|
+
(Y = y.onTouch) == null || Y.call(y, b);
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
}), R = E({
|
|
336
|
+
shape: e,
|
|
337
|
+
size: r,
|
|
338
|
+
position: t,
|
|
339
|
+
velocity: n,
|
|
340
|
+
mass: s,
|
|
341
|
+
bounce: c,
|
|
342
|
+
grabbable: u,
|
|
343
|
+
pushable: o,
|
|
344
|
+
gravity: a
|
|
175
345
|
});
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
346
|
+
v(() => {
|
|
347
|
+
const b = l.current;
|
|
348
|
+
if (!S || !b) return;
|
|
349
|
+
const y = S.world.add(R.current);
|
|
350
|
+
b.position.copy(y.position);
|
|
351
|
+
const M = S.register(y, { object: b, onEvent: D });
|
|
352
|
+
return C(y), () => {
|
|
353
|
+
M(), S.world.remove(y), C(null);
|
|
354
|
+
};
|
|
355
|
+
}, [S]), v(() => {
|
|
356
|
+
O && (O.shape = e, O.size = Math.max(1e-4, r), O.radius = O.size / 2, O.mass = Math.max(1e-6, s ?? O.size ** 3), O.bounce = c, O.grabbable = u, O.pushable = o, O.gravity = a);
|
|
357
|
+
}, [O, e, r, s, c, u, o, a]);
|
|
358
|
+
const H = !S;
|
|
359
|
+
v(() => {
|
|
360
|
+
H && console.warn(`${Je.loggerPrefix} Touchable must be inside a HandTouch`);
|
|
361
|
+
}, [H]);
|
|
362
|
+
const P = p === void 0 ? /* @__PURE__ */ N(er, { shape: e, size: r, color: i, state: T }) : typeof p == "function" ? p(T) : p;
|
|
363
|
+
return /* @__PURE__ */ N("group", { ref: l, children: /* @__PURE__ */ N("group", { scale: T.grabbed ? Zt : 1, children: P }) });
|
|
364
|
+
}, er = ({
|
|
365
|
+
shape: e,
|
|
366
|
+
size: r,
|
|
367
|
+
color: t,
|
|
368
|
+
state: n
|
|
369
|
+
}) => /* @__PURE__ */ ut("mesh", { children: [
|
|
370
|
+
e === "box" ? /* @__PURE__ */ N("boxGeometry", { args: [r, r, r] }) : /* @__PURE__ */ N("sphereGeometry", { args: [r / 2, 32, 20] }),
|
|
371
|
+
/* @__PURE__ */ N(
|
|
372
|
+
"meshStandardMaterial",
|
|
373
|
+
{
|
|
374
|
+
color: t,
|
|
375
|
+
emissive: t,
|
|
376
|
+
emissiveIntensity: n.grabbed ? 0.45 : n.hovered ? 0.25 : 0,
|
|
377
|
+
roughness: 0.45,
|
|
378
|
+
metalness: 0.05
|
|
379
|
+
}
|
|
380
|
+
)
|
|
381
|
+
] }), ue = { leftShoulder: 11, rightShoulder: 12, leftWrist: 15, rightWrist: 16 }, tr = 0, rr = [
|
|
382
|
+
[5, 8],
|
|
383
|
+
[9, 12],
|
|
384
|
+
[13, 16],
|
|
385
|
+
[17, 20]
|
|
386
|
+
], ve = {
|
|
387
|
+
smile: 0.3,
|
|
388
|
+
mouthOpen: 0.25,
|
|
389
|
+
minVisibility: 0.5,
|
|
390
|
+
fingerExtension: 1.25
|
|
391
|
+
}, nr = () => ({
|
|
392
|
+
facePresent: !1,
|
|
393
|
+
leftHandPresent: !1,
|
|
394
|
+
rightHandPresent: !1,
|
|
395
|
+
posePresent: !1,
|
|
396
|
+
smile: 0,
|
|
397
|
+
mouthOpen: 0,
|
|
398
|
+
smiling: !1,
|
|
399
|
+
mouthIsOpen: !1,
|
|
400
|
+
leftHandRaised: !1,
|
|
401
|
+
rightHandRaised: !1,
|
|
402
|
+
leftPalmOpen: !1,
|
|
403
|
+
rightPalmOpen: !1,
|
|
404
|
+
greeting: null
|
|
405
|
+
}), Ke = (e, r) => Math.hypot(e.x - r.x, e.y - r.y), We = (e, r = ve.fingerExtension) => {
|
|
406
|
+
if (!e || e.landmarks.length < 21) return !1;
|
|
407
|
+
const t = e.landmarks[tr];
|
|
408
|
+
let n = 0;
|
|
409
|
+
for (const [s, c] of rr) {
|
|
410
|
+
const u = Ke(e.landmarks[s], t), o = Ke(e.landmarks[c], t);
|
|
411
|
+
u > 0 && o >= u * r && (n += 1);
|
|
412
|
+
}
|
|
413
|
+
return n >= 3;
|
|
414
|
+
}, Ve = (e, r, t = ve.minVisibility) => {
|
|
415
|
+
const { pose: n } = e;
|
|
416
|
+
if (!n || n.landmarks.length < 33) return !1;
|
|
417
|
+
const s = r === "left" ? ue.leftWrist : ue.rightWrist, c = r === "left" ? ue.leftShoulder : ue.rightShoulder;
|
|
418
|
+
return n.visibility[s] < t || n.visibility[c] < t ? !1 : n.landmarks[s].y > n.landmarks[c].y;
|
|
419
|
+
}, ln = (e, r = {}, t = nr()) => {
|
|
420
|
+
const n = { ...ve, ...r }, { face: s, leftHand: c, rightHand: u, pose: o } = e;
|
|
421
|
+
t.facePresent = s !== null, t.leftHandPresent = c !== null, t.rightHandPresent = u !== null, t.posePresent = o !== null;
|
|
422
|
+
const a = s == null ? void 0 : s.blendshapes;
|
|
423
|
+
return t.smile = a ? ((a.mouthSmileLeft ?? 0) + (a.mouthSmileRight ?? 0)) / 2 : 0, t.mouthOpen = (a == null ? void 0 : a.jawOpen) ?? 0, t.smiling = s !== null && t.smile >= n.smile, t.mouthIsOpen = s !== null && t.mouthOpen >= n.mouthOpen, t.leftHandRaised = Ve(e, "left", n.minVisibility), t.rightHandRaised = Ve(e, "right", n.minVisibility), t.leftPalmOpen = We(c, n.fingerExtension), t.rightPalmOpen = We(u, n.fingerExtension), t.smiling && t.rightHandRaised && t.rightPalmOpen ? t.greeting = "right" : t.smiling && t.leftHandRaised && t.leftPalmOpen ? t.greeting = "left" : t.greeting = null, t;
|
|
424
|
+
}, sr = {
|
|
425
|
+
node: null,
|
|
426
|
+
ready: !1,
|
|
427
|
+
status: "loading",
|
|
428
|
+
error: null
|
|
429
|
+
}, rt = ft(null), or = () => De(rt) ?? sr, Ye = (e, r) => r ? "error" : e ? e.getStatus() : "loading", ar = ({
|
|
430
|
+
children: e,
|
|
431
|
+
active: r = !0,
|
|
432
|
+
onStatusChange: t,
|
|
433
|
+
modelUrl: n,
|
|
434
|
+
delegate: s,
|
|
435
|
+
minFaceDetectionConfidence: c,
|
|
436
|
+
minFacePresenceConfidence: u,
|
|
437
|
+
minPoseDetectionConfidence: o,
|
|
438
|
+
minPosePresenceConfidence: a,
|
|
439
|
+
minHandLandmarksConfidence: i,
|
|
440
|
+
outputFaceBlendshapes: f,
|
|
441
|
+
targetFps: d,
|
|
442
|
+
hands: h,
|
|
443
|
+
analysisMaxDimension: m,
|
|
444
|
+
holdMs: A,
|
|
445
|
+
predictMs: p
|
|
446
|
+
}) => {
|
|
447
|
+
const S = x(() => {
|
|
448
|
+
const R = {};
|
|
449
|
+
return n !== void 0 && (R.modelUrl = n), s !== void 0 && (R.delegate = s), c !== void 0 && (R.minFaceDetectionConfidence = c), u !== void 0 && (R.minFacePresenceConfidence = u), o !== void 0 && (R.minPoseDetectionConfidence = o), a !== void 0 && (R.minPosePresenceConfidence = a), i !== void 0 && (R.minHandLandmarksConfidence = i), f !== void 0 && (R.outputFaceBlendshapes = f), d !== void 0 && (R.targetFps = d), Object.keys(R).length > 0 ? R : void 0;
|
|
450
|
+
}, [
|
|
451
|
+
s,
|
|
452
|
+
c,
|
|
453
|
+
u,
|
|
454
|
+
i,
|
|
455
|
+
o,
|
|
456
|
+
a,
|
|
457
|
+
n,
|
|
458
|
+
f,
|
|
459
|
+
d
|
|
460
|
+
]), { ready: l, node: T, error: I } = $(
|
|
461
|
+
W.HOLISTIC_TRACKER,
|
|
462
|
+
S,
|
|
463
|
+
r
|
|
464
|
+
);
|
|
465
|
+
v(() => {
|
|
466
|
+
T && T.setOptions(
|
|
467
|
+
mt({ hands: h, analysisMaxDimension: m, holdMs: A, predictMs: p })
|
|
468
|
+
);
|
|
469
|
+
}, [T, h, m, A, p]);
|
|
470
|
+
const [O, C] = V(() => Ye(T, I)), g = E(O), _ = E(t);
|
|
471
|
+
_.current = t, U(() => {
|
|
472
|
+
var H;
|
|
473
|
+
const R = Ye(T, I);
|
|
474
|
+
R !== g.current && (g.current = R, C(R), (H = _.current) == null || H.call(_, R, I ?? (T == null ? void 0 : T.getError()) ?? null));
|
|
475
|
+
});
|
|
476
|
+
const D = x(
|
|
477
|
+
() => ({
|
|
478
|
+
node: T,
|
|
479
|
+
ready: l && O === "ready",
|
|
480
|
+
status: O,
|
|
481
|
+
error: I ?? (T == null ? void 0 : T.getError()) ?? null
|
|
482
|
+
}),
|
|
483
|
+
[T, l, O, I]
|
|
484
|
+
);
|
|
485
|
+
return /* @__PURE__ */ N(rt.Provider, { value: D, children: e });
|
|
486
|
+
}, ir = () => {
|
|
487
|
+
const { camera: e } = oe(), r = E(e);
|
|
488
|
+
return r.current !== e && (r.current = e), r;
|
|
489
|
+
}, Ie = (e, r) => {
|
|
490
|
+
const t = E(null), { node: n, ready: s } = or(), c = ir();
|
|
491
|
+
return U(() => {
|
|
492
|
+
const u = t.current;
|
|
493
|
+
if (!u) return;
|
|
494
|
+
const o = s && n ? e(n.getResult()) : null;
|
|
495
|
+
if (!o) {
|
|
496
|
+
u.visible = !1;
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
u.visible = !0, u.position.copy(r(o, c.current));
|
|
500
|
+
}), { groupRef: t, cameraRef: c, node: n };
|
|
501
|
+
}, nt = ({ children: e }) => {
|
|
502
|
+
const r = E({ x: 0, y: 0, z: 0, visibility: 0 }), t = be(), { groupRef: n, cameraRef: s, node: c } = Ie(
|
|
503
|
+
(a) => {
|
|
504
|
+
var i;
|
|
505
|
+
return ((i = a.face) == null ? void 0 : i.landmarks[4]) ?? null;
|
|
506
|
+
},
|
|
507
|
+
(a, i) => Me(a, i)
|
|
508
|
+
), u = j(
|
|
509
|
+
(a, i) => {
|
|
510
|
+
var h;
|
|
511
|
+
const f = (h = c == null ? void 0 : c.getResult().face) == null ? void 0 : h.landmarks;
|
|
512
|
+
if (!f || f.length === 0) return null;
|
|
513
|
+
const d = gt(
|
|
514
|
+
a,
|
|
515
|
+
f,
|
|
516
|
+
i,
|
|
517
|
+
r.current,
|
|
518
|
+
t
|
|
519
|
+
);
|
|
520
|
+
return d ? { position: Me(d, s.current) } : null;
|
|
196
521
|
},
|
|
522
|
+
[s, c, t]
|
|
523
|
+
), o = x(
|
|
524
|
+
() => ({ type: "face", resolveLandmark: u }),
|
|
525
|
+
[u]
|
|
526
|
+
);
|
|
527
|
+
return /* @__PURE__ */ N(ie.Provider, { value: o, children: /* @__PURE__ */ N("group", { ref: n, renderOrder: ce.TRACKED, visible: !1, children: e }) });
|
|
528
|
+
};
|
|
529
|
+
nt.displayName = "HolisticTracker.Face";
|
|
530
|
+
const st = ({ hand: e, children: r }) => {
|
|
531
|
+
const t = j(
|
|
532
|
+
(a) => e === "left" ? a.leftHand : a.rightHand,
|
|
197
533
|
[e]
|
|
198
|
-
), c =
|
|
534
|
+
), { groupRef: n, cameraRef: s, node: c } = Ie(
|
|
535
|
+
(a) => {
|
|
536
|
+
var i;
|
|
537
|
+
return ((i = t(a)) == null ? void 0 : i.landmarks[0]) ?? null;
|
|
538
|
+
},
|
|
539
|
+
q
|
|
540
|
+
), u = j(
|
|
541
|
+
(a) => {
|
|
542
|
+
var d;
|
|
543
|
+
const i = et[a];
|
|
544
|
+
if (i === void 0 || !c) return null;
|
|
545
|
+
const f = (d = t(c.getResult())) == null ? void 0 : d.landmarks[i];
|
|
546
|
+
return f ? { position: q(f, s.current) } : null;
|
|
547
|
+
},
|
|
548
|
+
[s, c, t]
|
|
549
|
+
), o = x(
|
|
550
|
+
() => ({ type: "hand", resolveLandmark: u }),
|
|
551
|
+
[u]
|
|
552
|
+
);
|
|
553
|
+
return /* @__PURE__ */ N(ie.Provider, { value: o, children: /* @__PURE__ */ N("group", { ref: n, renderOrder: ce.TRACKED, visible: !1, children: r }) });
|
|
554
|
+
};
|
|
555
|
+
st.displayName = "HolisticTracker.Hand";
|
|
556
|
+
const ot = ({ children: e }) => {
|
|
557
|
+
const { groupRef: r, cameraRef: t, node: n } = Ie(
|
|
558
|
+
(u) => {
|
|
559
|
+
var o;
|
|
560
|
+
return ((o = u.pose) == null ? void 0 : o.landmarks[0]) ?? null;
|
|
561
|
+
},
|
|
562
|
+
q
|
|
563
|
+
), s = j(
|
|
564
|
+
(u) => {
|
|
565
|
+
var f;
|
|
566
|
+
const o = (f = n == null ? void 0 : n.getResult().pose) == null ? void 0 : f.landmarks;
|
|
567
|
+
if (!o) return null;
|
|
568
|
+
if (u === "body.neck") {
|
|
569
|
+
const d = o[11], h = o[12];
|
|
570
|
+
if (!d || !h) return null;
|
|
571
|
+
const m = { x: (d.x + h.x) / 2, y: (d.y + h.y) / 2, z: (d.z + h.z) / 2 };
|
|
572
|
+
return { position: q(m, t.current) };
|
|
573
|
+
}
|
|
574
|
+
const a = St[u];
|
|
575
|
+
if (a === void 0) return null;
|
|
576
|
+
const i = o[a];
|
|
577
|
+
return i ? { position: q(i, t.current) } : null;
|
|
578
|
+
},
|
|
579
|
+
[t, n]
|
|
580
|
+
), c = x(
|
|
199
581
|
() => ({ type: "body", resolveLandmark: s }),
|
|
200
582
|
[s]
|
|
201
583
|
);
|
|
202
|
-
return /* @__PURE__ */
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
584
|
+
return /* @__PURE__ */ N(ie.Provider, { value: c, children: /* @__PURE__ */ N("group", { ref: r, renderOrder: ce.TRACKED, visible: !1, children: e }) });
|
|
585
|
+
};
|
|
586
|
+
ot.displayName = "HolisticTracker.Body";
|
|
587
|
+
const Ne = ar;
|
|
588
|
+
Ne.Face = nt;
|
|
589
|
+
Ne.Hand = st;
|
|
590
|
+
Ne.Body = ot;
|
|
591
|
+
const dn = ({ type: e, active: r = !0, children: t }) => ($(W.BACKGROUND_SEGMENTATION, { type: e }, r), v(() => {
|
|
592
|
+
Be.includes(e) || console.warn(
|
|
593
|
+
`[Segmentation] unsupported type "${e}"; valid values: ${Be.join(", ")}`
|
|
211
594
|
);
|
|
212
|
-
}, [e]), /* @__PURE__ */
|
|
595
|
+
}, [e]), /* @__PURE__ */ N(lt, { children: t })), cr = 800, ur = 200, lr = () => ({
|
|
213
596
|
armed: !1,
|
|
214
597
|
armStart: null,
|
|
215
598
|
holdStart: null,
|
|
216
599
|
fired: !1
|
|
217
|
-
}),
|
|
218
|
-
isTrigger:
|
|
219
|
-
gesture:
|
|
600
|
+
}), dr = (e, {
|
|
601
|
+
isTrigger: r,
|
|
602
|
+
gesture: t,
|
|
220
603
|
now: n,
|
|
221
|
-
mode:
|
|
222
|
-
debounceMs:
|
|
223
|
-
holdMs:
|
|
604
|
+
mode: s,
|
|
605
|
+
debounceMs: c,
|
|
606
|
+
holdMs: u
|
|
224
607
|
}) => {
|
|
225
608
|
if (e.fired) return null;
|
|
226
|
-
if (
|
|
227
|
-
if (
|
|
228
|
-
if (e.holdStart === null && (e.holdStart = n), n - e.holdStart >=
|
|
229
|
-
return e.fired = !0,
|
|
609
|
+
if (s === "hold") {
|
|
610
|
+
if (r && t) {
|
|
611
|
+
if (e.holdStart === null && (e.holdStart = n), n - e.holdStart >= u)
|
|
612
|
+
return e.fired = !0, t;
|
|
230
613
|
} else
|
|
231
614
|
e.holdStart = null;
|
|
232
615
|
return null;
|
|
233
616
|
}
|
|
234
|
-
return e.armed ?
|
|
617
|
+
return e.armed ? r && t ? (e.fired = !0, t) : null : (r ? e.armStart = null : (e.armStart === null && (e.armStart = n), n - e.armStart >= c && (e.armed = !0)), null);
|
|
235
618
|
};
|
|
236
|
-
function
|
|
619
|
+
function fr({
|
|
237
620
|
gestures: e,
|
|
238
|
-
mode:
|
|
239
|
-
debounceMs:
|
|
240
|
-
holdMs: n =
|
|
241
|
-
onTrigger:
|
|
242
|
-
enabled:
|
|
621
|
+
mode: r = "arm",
|
|
622
|
+
debounceMs: t = cr,
|
|
623
|
+
holdMs: n = ur,
|
|
624
|
+
onTrigger: s,
|
|
625
|
+
enabled: c = !0
|
|
243
626
|
}) {
|
|
244
|
-
const { ready:
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}, [
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
|
|
627
|
+
const { ready: u, node: o } = $(W.GESTURE_TRACKER), a = E(s);
|
|
628
|
+
v(() => {
|
|
629
|
+
a.current = s;
|
|
630
|
+
}, [s]);
|
|
631
|
+
const i = E(/* @__PURE__ */ new Set());
|
|
632
|
+
v(() => {
|
|
633
|
+
i.current = new Set(Array.isArray(e) ? e : [e]);
|
|
251
634
|
}, [e]);
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
if (!
|
|
255
|
-
const
|
|
256
|
-
isTrigger:
|
|
257
|
-
gesture:
|
|
635
|
+
const f = E(lr());
|
|
636
|
+
U(() => {
|
|
637
|
+
if (!c || !u || !o) return;
|
|
638
|
+
const d = o.gesture, h = !!(d && i.current.has(d)), m = dr(f.current, {
|
|
639
|
+
isTrigger: h,
|
|
640
|
+
gesture: d,
|
|
258
641
|
now: performance.now(),
|
|
259
|
-
mode:
|
|
260
|
-
debounceMs:
|
|
642
|
+
mode: r,
|
|
643
|
+
debounceMs: t,
|
|
261
644
|
holdMs: n
|
|
262
645
|
});
|
|
263
|
-
|
|
646
|
+
m && a.current(m);
|
|
264
647
|
});
|
|
265
648
|
}
|
|
266
|
-
const
|
|
649
|
+
const fn = (e) => (fr(e), null), hr = ({
|
|
650
|
+
source: e,
|
|
651
|
+
face: r,
|
|
652
|
+
canvas: t,
|
|
653
|
+
outputSize: n,
|
|
654
|
+
padding: s = 0.2
|
|
655
|
+
}) => Yt({ source: e, bounds: r.bounds, canvas: t, outputSize: n, padding: s }), he = (e) => ({ value: e, confidence: 1 }), le = (e, r, t, n) => ({
|
|
656
|
+
name: e,
|
|
657
|
+
kind: "face",
|
|
658
|
+
description: r,
|
|
659
|
+
defaults: n,
|
|
660
|
+
measure: (s) => s ? he(t(s)) : null
|
|
661
|
+
}), B = (e, r, t, n) => ({
|
|
662
|
+
name: e,
|
|
663
|
+
kind: "hand",
|
|
664
|
+
description: r,
|
|
665
|
+
defaults: n,
|
|
666
|
+
measure: (s) => s && s.length >= 21 ? he(t(s)) : null
|
|
667
|
+
}), ae = (e, r, t, n) => ({
|
|
668
|
+
name: e,
|
|
669
|
+
kind: "body",
|
|
670
|
+
description: r,
|
|
671
|
+
defaults: n,
|
|
672
|
+
measure: (s, c, u, o) => s && s.length >= 33 ? he(t(s, (o == null ? void 0 : o.mirrored) ?? !1)) : null
|
|
673
|
+
}), Ae = (e) => () => ({
|
|
674
|
+
tracker: new Ot(e),
|
|
675
|
+
wasPresent: !1
|
|
676
|
+
}), Re = (e, r, t) => r === null ? (e.wasPresent = !1, null) : (e.wasPresent || e.tracker.reset(), e.wasPresent = !0, he(e.tracker.push(r, t))), _e = {
|
|
677
|
+
enterThreshold: 0.99,
|
|
678
|
+
exitThreshold: 0.3,
|
|
679
|
+
cooldownMs: 600
|
|
680
|
+
}, at = {
|
|
681
|
+
// ── Face ───────────────────────────────────────────────────────────────
|
|
682
|
+
mouthOpen: le(
|
|
683
|
+
"mouthOpen",
|
|
684
|
+
"Jaw open (blendshape jawOpen).",
|
|
685
|
+
(e) => de(e, "mouthOpen")
|
|
686
|
+
),
|
|
687
|
+
smile: le(
|
|
688
|
+
"smile",
|
|
689
|
+
"Mean of the two mouthSmile blendshapes.",
|
|
690
|
+
(e) => (Ge(e, "mouthSmileLeft") + Ge(e, "mouthSmileRight")) / 2,
|
|
691
|
+
{ enterThreshold: 0.4 }
|
|
692
|
+
),
|
|
693
|
+
blink: le(
|
|
694
|
+
"blink",
|
|
695
|
+
"Both eyes closed (min of the eyeBlink blendshapes).",
|
|
696
|
+
(e) => de(e, "eyeBlink"),
|
|
697
|
+
{ enterThreshold: 0.55, holdMs: 50 }
|
|
698
|
+
),
|
|
699
|
+
browRaise: le(
|
|
700
|
+
"browRaise",
|
|
701
|
+
"Eyebrows raised (max of the brow-up blendshapes).",
|
|
702
|
+
(e) => de(e, "browRaise"),
|
|
703
|
+
{ enterThreshold: 0.45 }
|
|
704
|
+
),
|
|
705
|
+
headNod: {
|
|
706
|
+
name: "headNod",
|
|
707
|
+
kind: "face",
|
|
708
|
+
description: "Pitch oscillation: three turning points of at least 0.12 rad within 1.5 s.",
|
|
709
|
+
defaults: _e,
|
|
710
|
+
createMemory: Ae({ minAmplitude: 0.12, requiredReversals: 3, windowMs: 1500 }),
|
|
711
|
+
measure: (e, r, t) => Re(r, e ? e.pose.rotation.x : null, t)
|
|
712
|
+
},
|
|
713
|
+
headShake: {
|
|
714
|
+
name: "headShake",
|
|
715
|
+
kind: "face",
|
|
716
|
+
description: "Yaw oscillation: three turning points of at least 0.15 rad within 1.5 s.",
|
|
717
|
+
defaults: _e,
|
|
718
|
+
createMemory: Ae({ minAmplitude: 0.15, requiredReversals: 3, windowMs: 1500 }),
|
|
719
|
+
measure: (e, r, t) => Re(r, e ? e.pose.rotation.y : null, t)
|
|
720
|
+
},
|
|
721
|
+
// ── Hand ───────────────────────────────────────────────────────────────
|
|
722
|
+
pinch: B(
|
|
723
|
+
"pinch",
|
|
724
|
+
"Thumb and index tips touching, relative to palm size.",
|
|
725
|
+
Nt,
|
|
726
|
+
{
|
|
727
|
+
enterThreshold: 0.75,
|
|
728
|
+
exitThreshold: 0.5
|
|
729
|
+
}
|
|
730
|
+
),
|
|
731
|
+
grab: B("grab", "Fist: index to pinky curled toward the wrist.", It, {
|
|
732
|
+
enterThreshold: 0.7,
|
|
733
|
+
exitThreshold: 0.45
|
|
734
|
+
}),
|
|
735
|
+
openPalm: B("openPalm", "Index to pinky extended.", vt, {
|
|
736
|
+
enterThreshold: 0.7,
|
|
737
|
+
exitThreshold: 0.45
|
|
738
|
+
}),
|
|
739
|
+
handRaised: B(
|
|
740
|
+
"handRaised",
|
|
741
|
+
"Wrist in the upper part of the frame (0 bottom edge, 1 top edge).",
|
|
742
|
+
bt,
|
|
743
|
+
{ enterThreshold: 0.7, exitThreshold: 0.6 }
|
|
744
|
+
),
|
|
745
|
+
// Finger-count signs: each required finger must agree; 1 only when all do.
|
|
746
|
+
oneFinger: B(
|
|
747
|
+
"oneFinger",
|
|
748
|
+
"Index extended, other fingers curled (pointing).",
|
|
749
|
+
(e) => re(e, { fingers: [!0, !1, !1, !1] }),
|
|
750
|
+
{ enterThreshold: 0.65, exitThreshold: 0.45 }
|
|
751
|
+
),
|
|
752
|
+
peaceSign: B(
|
|
753
|
+
"peaceSign",
|
|
754
|
+
"Index and middle extended, ring and pinky curled.",
|
|
755
|
+
(e) => re(e, { fingers: [!0, !0, !1, !1] }),
|
|
756
|
+
{ enterThreshold: 0.65, exitThreshold: 0.45 }
|
|
757
|
+
),
|
|
758
|
+
threeFingers: B(
|
|
759
|
+
"threeFingers",
|
|
760
|
+
"Index, middle and ring extended, pinky curled.",
|
|
761
|
+
(e) => re(e, { fingers: [!0, !0, !0, !1] }),
|
|
762
|
+
{ enterThreshold: 0.65, exitThreshold: 0.45 }
|
|
763
|
+
),
|
|
764
|
+
fourFingers: B(
|
|
765
|
+
"fourFingers",
|
|
766
|
+
"Index to pinky extended, thumb tucked.",
|
|
767
|
+
(e) => re(e, { fingers: [!0, !0, !0, !0], thumb: !1 }),
|
|
768
|
+
{ enterThreshold: 0.65, exitThreshold: 0.45 }
|
|
769
|
+
),
|
|
770
|
+
fist: B(
|
|
771
|
+
"fist",
|
|
772
|
+
"All four fingers curled and the thumb tucked.",
|
|
773
|
+
(e) => re(e, { fingers: [!1, !1, !1, !1], thumb: !1 }),
|
|
774
|
+
{ enterThreshold: 0.65, exitThreshold: 0.45 }
|
|
775
|
+
),
|
|
776
|
+
palm: B(
|
|
777
|
+
"palm",
|
|
778
|
+
"All four fingers extended and the thumb out.",
|
|
779
|
+
(e) => re(e, { fingers: [!0, !0, !0, !0], thumb: !0 }),
|
|
780
|
+
{ enterThreshold: 0.65, exitThreshold: 0.45 }
|
|
781
|
+
),
|
|
782
|
+
thumbUp: B(
|
|
783
|
+
"thumbUp",
|
|
784
|
+
"Thumb out and pointing up, fingers curled.",
|
|
785
|
+
(e) => ke(e, "up"),
|
|
786
|
+
{ enterThreshold: 0.6, exitThreshold: 0.4 }
|
|
787
|
+
),
|
|
788
|
+
thumbDown: B(
|
|
789
|
+
"thumbDown",
|
|
790
|
+
"Thumb out and pointing down, fingers curled.",
|
|
791
|
+
(e) => ke(e, "down"),
|
|
792
|
+
{ enterThreshold: 0.6, exitThreshold: 0.4 }
|
|
793
|
+
),
|
|
794
|
+
wave: {
|
|
795
|
+
name: "wave",
|
|
796
|
+
kind: "hand",
|
|
797
|
+
description: "Wrist swinging side to side: three turning points of at least 0.08 within 1.2 s.",
|
|
798
|
+
defaults: _e,
|
|
799
|
+
createMemory: Ae({ minAmplitude: 0.08, requiredReversals: 3, windowMs: 1200 }),
|
|
800
|
+
measure: (e, r, t) => Re(r, e && e.length >= 21 ? e[0].x : null, t)
|
|
801
|
+
},
|
|
802
|
+
// ── Body ───────────────────────────────────────────────────────────────
|
|
803
|
+
armRaisedLeft: ae(
|
|
804
|
+
"armRaisedLeft",
|
|
805
|
+
"Person's own left wrist above their left shoulder, in shoulder widths, on every feed.",
|
|
806
|
+
(e, r) => te(e, "left", r),
|
|
807
|
+
{ enterThreshold: 0.3, exitThreshold: 0.15 }
|
|
808
|
+
),
|
|
809
|
+
armRaisedRight: ae(
|
|
810
|
+
"armRaisedRight",
|
|
811
|
+
"Person's own right wrist above their right shoulder, in shoulder widths, on every feed.",
|
|
812
|
+
(e, r) => te(e, "right", r),
|
|
813
|
+
{ enterThreshold: 0.3, exitThreshold: 0.15 }
|
|
814
|
+
),
|
|
815
|
+
armRaised: ae(
|
|
816
|
+
"armRaised",
|
|
817
|
+
"Either wrist above its shoulder.",
|
|
818
|
+
(e) => Math.max(te(e, "left"), te(e, "right")),
|
|
819
|
+
{ enterThreshold: 0.3, exitThreshold: 0.15 }
|
|
820
|
+
),
|
|
821
|
+
bothArmsRaised: ae(
|
|
822
|
+
"bothArmsRaised",
|
|
823
|
+
"Both wrists above their shoulders.",
|
|
824
|
+
(e) => Math.min(te(e, "left"), te(e, "right")),
|
|
825
|
+
{ enterThreshold: 0.3, exitThreshold: 0.15 }
|
|
826
|
+
),
|
|
827
|
+
tPose: ae("tPose", "Both arms level and outstretched.", Dt, {
|
|
828
|
+
enterThreshold: 0.6,
|
|
829
|
+
exitThreshold: 0.4,
|
|
830
|
+
holdMs: 150
|
|
831
|
+
})
|
|
832
|
+
}, hn = Object.keys(at), mr = (e) => typeof e == "string" ? at[e] : e, mn = (e) => e, pr = {
|
|
833
|
+
face: W.FACE_TRACKER,
|
|
834
|
+
hand: W.HAND_TRACKER,
|
|
835
|
+
body: W.BODY_TRACKER
|
|
836
|
+
}, Xe = (e) => Ze(Oe(e)), Tr = (e, r = {}) => {
|
|
837
|
+
var k;
|
|
838
|
+
const t = x(() => mr(e), [e]), {
|
|
839
|
+
active: n = !0,
|
|
840
|
+
faceIndex: s = 0,
|
|
841
|
+
numFaces: c,
|
|
842
|
+
hand: u,
|
|
843
|
+
handIndex: o = 0,
|
|
844
|
+
bodyIndex: a = 0,
|
|
845
|
+
targetFps: i,
|
|
846
|
+
onBegin: f,
|
|
847
|
+
onEnd: d,
|
|
848
|
+
onChange: h,
|
|
849
|
+
...m
|
|
850
|
+
} = r, A = pr[t.kind], p = Math.max(c ?? s + 1, s + 1), S = x(() => {
|
|
851
|
+
const L = {};
|
|
852
|
+
return t.kind === "face" && (L.numFaces = p), i !== void 0 && i > 0 && (L.targetFps = i), Object.keys(L).length > 0 ? L : void 0;
|
|
853
|
+
}, [t.kind, p, i]), { node: l, ready: T } = $(A, S, n), { camera: I } = oe();
|
|
854
|
+
v(() => {
|
|
855
|
+
!l || t.kind !== "face" || l.setCamera(I, s);
|
|
856
|
+
}, [I, t.kind, s, l]);
|
|
857
|
+
const O = x(
|
|
858
|
+
() => Ue(
|
|
859
|
+
m,
|
|
860
|
+
Ue(t.defaults)
|
|
861
|
+
),
|
|
862
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
863
|
+
[
|
|
864
|
+
t,
|
|
865
|
+
m.enterThreshold,
|
|
866
|
+
m.exitThreshold,
|
|
867
|
+
m.holdMs,
|
|
868
|
+
m.cooldownMs,
|
|
869
|
+
m.minConfidence,
|
|
870
|
+
m.lostGraceMs
|
|
871
|
+
]
|
|
872
|
+
), C = E(Oe(t.name)), g = E((k = t.createMemory) == null ? void 0 : k.call(t)), _ = E(jt()), [D, R] = V(() => Xe(t.name)), H = E(D);
|
|
873
|
+
v(() => {
|
|
874
|
+
var w;
|
|
875
|
+
C.current = Oe(t.name), g.current = (w = t.createMemory) == null ? void 0 : w.call(t);
|
|
876
|
+
const L = Xe(t.name);
|
|
877
|
+
H.current = L, R(L);
|
|
878
|
+
}, [t]);
|
|
879
|
+
const P = E({ onBegin: f, onEnd: d, onChange: h });
|
|
880
|
+
P.current = { onBegin: f, onEnd: d, onChange: h };
|
|
881
|
+
const b = be(), y = E({ mirrored: b });
|
|
882
|
+
y.current.mirrored = b;
|
|
883
|
+
const M = E({ faceIndex: s, hand: u, handIndex: o, bodyIndex: a, active: n });
|
|
884
|
+
return M.current = { faceIndex: s, hand: u, handIndex: o, bodyIndex: a, active: n }, U(() => {
|
|
885
|
+
var ee;
|
|
886
|
+
const L = performance.now(), w = M.current;
|
|
887
|
+
let Q = null;
|
|
888
|
+
if (w.active && T && l) {
|
|
889
|
+
let z;
|
|
890
|
+
t.kind === "face" ? z = Kt(l, w.faceIndex, _.current) : t.kind === "hand" ? z = (ee = tt(
|
|
891
|
+
l,
|
|
892
|
+
w.hand,
|
|
893
|
+
w.handIndex
|
|
894
|
+
)) == null ? void 0 : ee.coordinates : z = l.getLandmarks2D(w.bodyIndex), Q = t.measure(z, g.current, L, y.current);
|
|
895
|
+
}
|
|
896
|
+
const Y = Ut(C.current, Q, L, O);
|
|
897
|
+
if (Gt(H.current, Y)) return;
|
|
898
|
+
const F = Ze(Y);
|
|
899
|
+
H.current = F, R(F);
|
|
900
|
+
const { onBegin: X, onEnd: Z, onChange: G } = P.current;
|
|
901
|
+
F.justBegan && (X == null || X(F)), F.justEnded && (Z == null || Z(F)), G == null || G(F);
|
|
902
|
+
}), D;
|
|
903
|
+
}, pn = ({ gesture: e, ...r }) => (Tr(e, r), null), qe = /* @__PURE__ */ new WeakMap(), gr = (e, r) => {
|
|
904
|
+
const { visibility: t, mirrored: n, aspect: s, shapeLimits: c, view: u } = r;
|
|
905
|
+
if (c || u)
|
|
906
|
+
return Pe(e, {
|
|
907
|
+
mirrored: n,
|
|
908
|
+
visibility: t,
|
|
909
|
+
aspect: s,
|
|
910
|
+
limits: c,
|
|
911
|
+
view: u
|
|
912
|
+
});
|
|
913
|
+
const o = qe.get(e);
|
|
914
|
+
if (o && o.mirrored === n && o.aspect === s) return o;
|
|
915
|
+
const a = Pe(e, { mirrored: n, visibility: t, aspect: s });
|
|
916
|
+
return qe.set(e, a), a;
|
|
917
|
+
}, Er = (e) => {
|
|
918
|
+
if (!e) return;
|
|
919
|
+
const r = {};
|
|
920
|
+
let t = !1;
|
|
921
|
+
for (const n of Object.keys(e))
|
|
922
|
+
n in kt && e[n] !== void 0 && (r[n] = e[n], t = !0);
|
|
923
|
+
return t ? r : void 0;
|
|
924
|
+
}, Sr = (e) => {
|
|
925
|
+
const {
|
|
926
|
+
pose: r,
|
|
927
|
+
move: t,
|
|
928
|
+
bodyIndex: n = 0,
|
|
929
|
+
active: s = !0,
|
|
930
|
+
targetFps: c,
|
|
931
|
+
limits: u,
|
|
932
|
+
view: o,
|
|
933
|
+
onBegin: a,
|
|
934
|
+
onEnd: i,
|
|
935
|
+
onChange: f,
|
|
936
|
+
...d
|
|
937
|
+
} = e, h = t !== void 0 ? { move: t } : { pose: r }, m = t !== void 0 ? `move:${typeof t == "string" ? t : t.name}` : `pose:${Wt(r)}`, A = x(
|
|
938
|
+
() => c !== void 0 && c > 0 ? { targetFps: c } : void 0,
|
|
939
|
+
[c]
|
|
940
|
+
), { node: p, ready: S } = $(
|
|
941
|
+
W.BODY_TRACKER,
|
|
942
|
+
A,
|
|
943
|
+
s
|
|
944
|
+
), l = be(), T = Bt(), I = JSON.stringify(u ?? null), O = x(() => Er(u), [I]), C = JSON.stringify(o ?? null), g = x(() => o, [C]), _ = JSON.stringify(d) + I, D = { ...d, limits: u }, R = E(null), H = E("");
|
|
945
|
+
(R.current === null || H.current !== m) && (R.current = xt(h, D), H.current = m), t !== void 0 ? R.current.move = Ct(t) : R.current.pose = r;
|
|
946
|
+
const [P, b] = V(
|
|
947
|
+
() => ge(R.current)
|
|
948
|
+
), y = E(P);
|
|
949
|
+
v(() => {
|
|
950
|
+
const w = ge(R.current);
|
|
951
|
+
y.current = w, b(w);
|
|
952
|
+
}, [m]), v(() => {
|
|
953
|
+
R.current && Ht(R.current, h, D);
|
|
954
|
+
}, [_]);
|
|
955
|
+
const M = E({ onBegin: a, onEnd: i, onChange: f });
|
|
956
|
+
M.current = { onBegin: a, onEnd: i, onChange: f };
|
|
957
|
+
const k = E(null), L = E(null);
|
|
958
|
+
return U(() => {
|
|
959
|
+
var Le;
|
|
960
|
+
const w = R.current;
|
|
961
|
+
if (!w) return;
|
|
962
|
+
const Q = performance.now();
|
|
963
|
+
let Y = null, F = !0;
|
|
964
|
+
const X = s && S && p ? p.getLandmarks2D(n) : void 0;
|
|
965
|
+
X && X.length >= Ft ? (F = X !== k.current || !L.current, Y = F ? gr(X, {
|
|
966
|
+
visibility: (Le = p == null ? void 0 : p.getVisibility) == null ? void 0 : Le.call(p, n),
|
|
967
|
+
mirrored: l,
|
|
968
|
+
aspect: T,
|
|
969
|
+
shapeLimits: O,
|
|
970
|
+
view: g
|
|
971
|
+
}) : L.current, k.current = X, L.current = Y) : (k.current = null, L.current = null);
|
|
972
|
+
const Z = Lt(w, Y, Q, F);
|
|
973
|
+
if (Mt(y.current, Z)) return;
|
|
974
|
+
const G = ge(Z);
|
|
975
|
+
y.current = G, b(G);
|
|
976
|
+
const { onBegin: ee, onEnd: z, onChange: Te } = M.current;
|
|
977
|
+
G.justBegan && (ee == null || ee(G)), G.justEnded && (z == null || z(G)), Te == null || Te(G);
|
|
978
|
+
}), P;
|
|
979
|
+
}, Tn = (e) => (Sr(e), null), xe = 1, Ce = Object.freeze({
|
|
980
|
+
version: xe,
|
|
981
|
+
orientation: 0,
|
|
982
|
+
mirrored: "auto",
|
|
983
|
+
scale: 1,
|
|
984
|
+
offset: Object.freeze({ x: 0, y: 0 }),
|
|
985
|
+
face: null,
|
|
986
|
+
body: null,
|
|
987
|
+
updatedAt: 0
|
|
988
|
+
}), Ar = (e = {}) => me(Ce, e, 0), Rr = [0, 90, 180, 270], _r = (e) => Math.min(4, Math.max(0.25, e)), me = (e, r, t = Date.now()) => ({
|
|
989
|
+
version: xe,
|
|
990
|
+
orientation: r.orientation !== void 0 && Rr.includes(r.orientation) ? r.orientation : e.orientation,
|
|
991
|
+
mirrored: r.mirrored === !0 || r.mirrored === !1 || r.mirrored === "auto" ? r.mirrored : e.mirrored,
|
|
992
|
+
scale: r.scale !== void 0 && Number.isFinite(r.scale) && r.scale > 0 ? _r(r.scale) : e.scale,
|
|
993
|
+
offset: r.offset && Number.isFinite(r.offset.x) && Number.isFinite(r.offset.y) ? { x: r.offset.x, y: r.offset.y } : { ...e.offset },
|
|
994
|
+
face: r.face !== void 0 ? r.face : e.face,
|
|
995
|
+
body: r.body !== void 0 ? r.body : e.body,
|
|
996
|
+
updatedAt: t
|
|
997
|
+
}), yr = (e = Date.now()) => me(Ce, {}, e), gn = (e) => e.orientation === 0 && e.mirrored === "auto" && e.scale === 1 && e.offset.x === 0 && e.offset.y === 0, Or = (e, r) => e.mirrored === "auto" ? !1 : e.mirrored !== pt(r), Dr = (e, r, t, n = { x: 0, y: 0 }) => {
|
|
998
|
+
let { x: s, y: c } = e;
|
|
999
|
+
switch (r.orientation) {
|
|
1000
|
+
case 90:
|
|
1001
|
+
[s, c] = [1 - c, s];
|
|
1002
|
+
break;
|
|
1003
|
+
case 180:
|
|
1004
|
+
[s, c] = [1 - s, 1 - c];
|
|
1005
|
+
break;
|
|
1006
|
+
case 270:
|
|
1007
|
+
[s, c] = [c, 1 - s];
|
|
1008
|
+
break;
|
|
1009
|
+
}
|
|
1010
|
+
return Or(r, t) && (s = 1 - s), s = 0.5 + (s - 0.5) * r.scale + r.offset.x, c = 0.5 + (c - 0.5) * r.scale + r.offset.y, n.x = s, n.y = c, e.z !== void 0 && (n.z = e.z), n;
|
|
1011
|
+
}, fe = (e, r) => e && r ? Math.hypot(e.x - r.x, e.y - r.y) : null, br = Object.freeze({
|
|
1012
|
+
leftTemple: 454,
|
|
1013
|
+
rightTemple: 234,
|
|
1014
|
+
leftEyeOuter: 263,
|
|
1015
|
+
rightEyeOuter: 33
|
|
1016
|
+
}), it = (e, r = Date.now()) => {
|
|
1017
|
+
if (!e || e.length < 468) return null;
|
|
1018
|
+
const { leftTemple: t, rightTemple: n, leftEyeOuter: s, rightEyeOuter: c } = br, u = fe(e[t], e[n]), o = fe(e[s], e[c]);
|
|
1019
|
+
return !u || !o ? null : { faceWidth: u, eyeDistance: o, capturedAt: r };
|
|
1020
|
+
}, vr = Object.freeze({
|
|
1021
|
+
leftShoulder: 11,
|
|
1022
|
+
rightShoulder: 12,
|
|
1023
|
+
leftHip: 23,
|
|
1024
|
+
rightHip: 24
|
|
1025
|
+
}), ct = (e, r = Date.now()) => {
|
|
1026
|
+
if (!e || e.length < 33) return null;
|
|
1027
|
+
const { leftShoulder: t, rightShoulder: n, leftHip: s, rightHip: c } = vr, u = fe(e[t], e[n]), o = fe(e[s], e[c]), a = e[t], i = e[n], f = e[s], d = e[c];
|
|
1028
|
+
if (!u || !o || !a || !i || !f || !d) return null;
|
|
1029
|
+
const h = Math.hypot(
|
|
1030
|
+
(a.x + i.x) / 2 - (f.x + d.x) / 2,
|
|
1031
|
+
(a.y + i.y) / 2 - (f.y + d.y) / 2
|
|
1032
|
+
);
|
|
1033
|
+
return { shoulderWidth: u, hipWidth: o, torsoLength: h, capturedAt: r };
|
|
1034
|
+
}, Ir = (e, r) => {
|
|
1035
|
+
const t = r.face, n = it(e, 0);
|
|
1036
|
+
return !t || !n ? null : t.faceWidth > 0 && n.faceWidth > 0 ? n.faceWidth / t.faceWidth : t.eyeDistance > 0 && n.eyeDistance > 0 ? n.eyeDistance / t.eyeDistance : null;
|
|
1037
|
+
}, Nr = (e, r) => {
|
|
1038
|
+
const t = r.body, n = ct(e, 0);
|
|
1039
|
+
return !t || !n || t.shoulderWidth <= 0 ? null : n.shoulderWidth / t.shoulderWidth;
|
|
1040
|
+
}, pe = "vincentt.xr.calibration", He = () => {
|
|
1041
|
+
try {
|
|
1042
|
+
return typeof localStorage < "u" ? localStorage : null;
|
|
1043
|
+
} catch {
|
|
1044
|
+
return null;
|
|
1045
|
+
}
|
|
1046
|
+
}, xr = (e = pe, r = He()) => {
|
|
1047
|
+
if (!r) return null;
|
|
1048
|
+
try {
|
|
1049
|
+
const t = r.getItem(e);
|
|
1050
|
+
if (!t) return null;
|
|
1051
|
+
const n = JSON.parse(t);
|
|
1052
|
+
return !n || typeof n != "object" || n.version !== xe ? null : me(
|
|
1053
|
+
Ce,
|
|
1054
|
+
{
|
|
1055
|
+
orientation: n.orientation,
|
|
1056
|
+
mirrored: n.mirrored,
|
|
1057
|
+
scale: n.scale,
|
|
1058
|
+
offset: n.offset,
|
|
1059
|
+
face: n.face ?? null,
|
|
1060
|
+
body: n.body ?? null
|
|
1061
|
+
},
|
|
1062
|
+
typeof n.updatedAt == "number" ? n.updatedAt : 0
|
|
1063
|
+
);
|
|
1064
|
+
} catch {
|
|
1065
|
+
return null;
|
|
1066
|
+
}
|
|
1067
|
+
}, Cr = (e, r = pe, t = He()) => {
|
|
1068
|
+
if (!t) return !1;
|
|
1069
|
+
try {
|
|
1070
|
+
return t.setItem(r, JSON.stringify(e)), !0;
|
|
1071
|
+
} catch {
|
|
1072
|
+
return !1;
|
|
1073
|
+
}
|
|
1074
|
+
}, Hr = (e = pe, r = He()) => {
|
|
1075
|
+
if (r)
|
|
1076
|
+
try {
|
|
1077
|
+
r.removeItem(e);
|
|
1078
|
+
} catch {
|
|
1079
|
+
}
|
|
1080
|
+
}, En = (e = {}) => {
|
|
1081
|
+
const { storageKey: r = pe, persist: t = !0 } = e, n = e.storage === void 0 ? void 0 : e.storage, s = E(e.initial), { session: c } = Qe(), u = ht(
|
|
1082
|
+
(l) => c.store.subscribe(l),
|
|
1083
|
+
() => c.store.getSnapshot().sourceKind,
|
|
1084
|
+
() => {
|
|
1085
|
+
}
|
|
1086
|
+
), [o, a] = V(
|
|
1087
|
+
() => Ar(s.current)
|
|
1088
|
+
), [i, f] = V(!t), d = E(o);
|
|
1089
|
+
d.current = o, v(() => {
|
|
1090
|
+
if (!t) {
|
|
1091
|
+
f(!0);
|
|
1092
|
+
return;
|
|
1093
|
+
}
|
|
1094
|
+
const l = xr(r, n);
|
|
1095
|
+
l && (d.current = l, a(l)), f(!0);
|
|
1096
|
+
}, [t, r, n]);
|
|
1097
|
+
const h = j(
|
|
1098
|
+
(l) => (d.current = l, a(l), t && Cr(l, r, n), l),
|
|
1099
|
+
[t, r, n]
|
|
1100
|
+
), m = j(
|
|
1101
|
+
(l) => h(me(d.current, l)),
|
|
1102
|
+
[h]
|
|
1103
|
+
), A = j(() => {
|
|
1104
|
+
const l = yr();
|
|
1105
|
+
return d.current = l, a(l), t && Hr(r, n), l;
|
|
1106
|
+
}, [t, r, n]), p = j(
|
|
1107
|
+
(l) => {
|
|
1108
|
+
const T = it(l);
|
|
1109
|
+
return T ? (m({ face: T }), !0) : !1;
|
|
1110
|
+
},
|
|
1111
|
+
[m]
|
|
1112
|
+
), S = j(
|
|
1113
|
+
(l) => {
|
|
1114
|
+
const T = ct(l);
|
|
1115
|
+
return T ? (m({ body: T }), !0) : !1;
|
|
1116
|
+
},
|
|
1117
|
+
[m]
|
|
1118
|
+
);
|
|
1119
|
+
return x(
|
|
1120
|
+
() => ({
|
|
1121
|
+
calibration: o,
|
|
1122
|
+
hydrated: i,
|
|
1123
|
+
update: m,
|
|
1124
|
+
reset: A,
|
|
1125
|
+
calibrateFace: p,
|
|
1126
|
+
calibrateBody: S,
|
|
1127
|
+
applyToFeedPoint: (l, T) => Dr(l, o, u, T),
|
|
1128
|
+
faceDistance: (l) => Ir(l, o),
|
|
1129
|
+
bodyScale: (l) => Nr(l, o),
|
|
1130
|
+
sourceKind: u
|
|
1131
|
+
}),
|
|
1132
|
+
[o, i, m, A, p, S, u]
|
|
1133
|
+
);
|
|
1134
|
+
}, Lr = (e, r) => r && !e ? "begin" : !r && e ? "end" : r ? "stay" : "none", Mr = {
|
|
267
1135
|
face: null,
|
|
268
1136
|
faces: [],
|
|
269
1137
|
faceCount: 0,
|
|
@@ -271,239 +1139,67 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
|
|
|
271
1139
|
justDetected: !1,
|
|
272
1140
|
justLost: !1,
|
|
273
1141
|
phase: "none"
|
|
274
|
-
},
|
|
1142
|
+
}, Sn = ({
|
|
275
1143
|
faceIndex: e = 0,
|
|
276
|
-
numFaces:
|
|
277
|
-
...
|
|
1144
|
+
numFaces: r,
|
|
1145
|
+
...t
|
|
278
1146
|
} = {}) => {
|
|
279
|
-
const n = Number.isFinite(e) ? Math.max(0, Math.round(e)) : 0,
|
|
280
|
-
...
|
|
281
|
-
numFaces: Math.max(
|
|
282
|
-
}),
|
|
283
|
-
return
|
|
284
|
-
|
|
285
|
-
}, [
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
const
|
|
289
|
-
face:
|
|
290
|
-
faces:
|
|
291
|
-
faceCount:
|
|
292
|
-
detected:
|
|
293
|
-
justDetected:
|
|
294
|
-
justLost:
|
|
295
|
-
phase:
|
|
296
|
-
},
|
|
297
|
-
|
|
298
|
-
}),
|
|
299
|
-
},
|
|
300
|
-
"_neutral",
|
|
301
|
-
"browDownLeft",
|
|
302
|
-
"browDownRight",
|
|
303
|
-
"browInnerUp",
|
|
304
|
-
"browOuterUpLeft",
|
|
305
|
-
"browOuterUpRight",
|
|
306
|
-
"cheekPuff",
|
|
307
|
-
"cheekSquintLeft",
|
|
308
|
-
"cheekSquintRight",
|
|
309
|
-
"eyeBlinkLeft",
|
|
310
|
-
"eyeBlinkRight",
|
|
311
|
-
"eyeLookDownLeft",
|
|
312
|
-
"eyeLookDownRight",
|
|
313
|
-
"eyeLookInLeft",
|
|
314
|
-
"eyeLookInRight",
|
|
315
|
-
"eyeLookOutLeft",
|
|
316
|
-
"eyeLookOutRight",
|
|
317
|
-
"eyeLookUpLeft",
|
|
318
|
-
"eyeLookUpRight",
|
|
319
|
-
"eyeSquintLeft",
|
|
320
|
-
"eyeSquintRight",
|
|
321
|
-
"eyeWideLeft",
|
|
322
|
-
"eyeWideRight",
|
|
323
|
-
"jawForward",
|
|
324
|
-
"jawLeft",
|
|
325
|
-
"jawOpen",
|
|
326
|
-
"jawRight",
|
|
327
|
-
"mouthClose",
|
|
328
|
-
"mouthDimpleLeft",
|
|
329
|
-
"mouthDimpleRight",
|
|
330
|
-
"mouthFrownLeft",
|
|
331
|
-
"mouthFrownRight",
|
|
332
|
-
"mouthFunnel",
|
|
333
|
-
"mouthLeft",
|
|
334
|
-
"mouthLowerDownLeft",
|
|
335
|
-
"mouthLowerDownRight",
|
|
336
|
-
"mouthPressLeft",
|
|
337
|
-
"mouthPressRight",
|
|
338
|
-
"mouthPucker",
|
|
339
|
-
"mouthRight",
|
|
340
|
-
"mouthRollLower",
|
|
341
|
-
"mouthRollUpper",
|
|
342
|
-
"mouthShrugLower",
|
|
343
|
-
"mouthShrugUpper",
|
|
344
|
-
"mouthSmileLeft",
|
|
345
|
-
"mouthSmileRight",
|
|
346
|
-
"mouthStretchLeft",
|
|
347
|
-
"mouthStretchRight",
|
|
348
|
-
"mouthUpperUpLeft",
|
|
349
|
-
"mouthUpperUpRight",
|
|
350
|
-
"noseSneerLeft",
|
|
351
|
-
"noseSneerRight"
|
|
352
|
-
], pe = ({
|
|
353
|
-
source: e,
|
|
354
|
-
face: t,
|
|
355
|
-
canvas: r,
|
|
356
|
-
outputSize: n,
|
|
357
|
-
padding: o = 0.2
|
|
358
|
-
}) => ne({ source: e, bounds: t.bounds, canvas: r, outputSize: n, padding: o }), Pe = [
|
|
359
|
-
"browRaise",
|
|
360
|
-
"eyeBlink",
|
|
361
|
-
"eyeBlinkLeft",
|
|
362
|
-
"eyeBlinkRight",
|
|
363
|
-
"eyeBlinkEither",
|
|
364
|
-
"headUp",
|
|
365
|
-
"headDown",
|
|
366
|
-
"headTurnLeft",
|
|
367
|
-
"headTurnRight",
|
|
368
|
-
"mouthOpen",
|
|
369
|
-
"mouthPout",
|
|
370
|
-
"headTiltLeft",
|
|
371
|
-
"headTiltRight"
|
|
372
|
-
], S = (e = 0.5) => ({
|
|
373
|
-
threshold: e,
|
|
374
|
-
releaseThreshold: Math.max(0, e - 0.15),
|
|
375
|
-
holdMs: 50
|
|
376
|
-
}), w = {
|
|
377
|
-
threshold: Math.PI / 18,
|
|
378
|
-
releaseThreshold: Math.PI / 30,
|
|
379
|
-
holdMs: 80
|
|
380
|
-
}, me = {
|
|
381
|
-
browRaise: S(0.45),
|
|
382
|
-
eyeBlink: S(0.55),
|
|
383
|
-
eyeBlinkLeft: S(0.55),
|
|
384
|
-
eyeBlinkRight: S(0.55),
|
|
385
|
-
eyeBlinkEither: S(0.55),
|
|
386
|
-
headUp: w,
|
|
387
|
-
headDown: w,
|
|
388
|
-
headTurnLeft: w,
|
|
389
|
-
headTurnRight: w,
|
|
390
|
-
mouthOpen: S(0.45),
|
|
391
|
-
mouthPout: S(0.5),
|
|
392
|
-
headTiltLeft: w,
|
|
393
|
-
headTiltRight: w
|
|
394
|
-
}, x = (e) => Math.max(0, e), v = (e, t) => e !== void 0 && Number.isFinite(e) ? e : t, q = (e, t = {}) => {
|
|
395
|
-
const r = me[e], n = Math.max(0, v(t.threshold, r.threshold));
|
|
396
|
-
return {
|
|
397
|
-
threshold: n,
|
|
398
|
-
releaseThreshold: Math.min(
|
|
399
|
-
n,
|
|
400
|
-
Math.max(0, v(t.releaseThreshold, r.releaseThreshold))
|
|
401
|
-
),
|
|
402
|
-
holdMs: Math.max(0, v(t.holdMs, r.holdMs))
|
|
403
|
-
};
|
|
404
|
-
}, H = (e, t, { neutralRotation: r = { x: 0, y: 0, z: 0 } } = {}) => {
|
|
405
|
-
const n = v(r.x, 0), o = v(r.y, 0), u = v(r.z, 0);
|
|
406
|
-
switch (t) {
|
|
407
|
-
case "browRaise":
|
|
408
|
-
return Math.max(
|
|
409
|
-
T(e, "browInnerUp"),
|
|
410
|
-
T(e, "browOuterUpLeft"),
|
|
411
|
-
T(e, "browOuterUpRight")
|
|
412
|
-
);
|
|
413
|
-
case "eyeBlink":
|
|
414
|
-
return Math.min(
|
|
415
|
-
T(e, "eyeBlinkLeft"),
|
|
416
|
-
T(e, "eyeBlinkRight")
|
|
417
|
-
);
|
|
418
|
-
case "eyeBlinkLeft":
|
|
419
|
-
return T(e, "eyeBlinkRight");
|
|
420
|
-
case "eyeBlinkRight":
|
|
421
|
-
return T(e, "eyeBlinkLeft");
|
|
422
|
-
case "eyeBlinkEither":
|
|
423
|
-
return Math.max(
|
|
424
|
-
T(e, "eyeBlinkLeft"),
|
|
425
|
-
T(e, "eyeBlinkRight")
|
|
426
|
-
);
|
|
427
|
-
case "mouthOpen":
|
|
428
|
-
return T(e, "jawOpen");
|
|
429
|
-
case "mouthPout":
|
|
430
|
-
return T(e, "mouthPucker");
|
|
431
|
-
case "headUp":
|
|
432
|
-
return x(e.pose.rotation.x - n);
|
|
433
|
-
case "headDown":
|
|
434
|
-
return x(n - e.pose.rotation.x);
|
|
435
|
-
case "headTurnLeft":
|
|
436
|
-
return x(e.pose.rotation.y - o);
|
|
437
|
-
case "headTurnRight":
|
|
438
|
-
return x(o - e.pose.rotation.y);
|
|
439
|
-
case "headTiltLeft":
|
|
440
|
-
return x(e.pose.rotation.z - u);
|
|
441
|
-
case "headTiltRight":
|
|
442
|
-
return x(u - e.pose.rotation.z);
|
|
443
|
-
}
|
|
444
|
-
}, Ie = (e, t, r = {}) => H(e, t, r) >= q(t, r).threshold, Ue = (e, t, r = {}) => {
|
|
445
|
-
let n = null, o = 0;
|
|
446
|
-
for (const u of e) {
|
|
447
|
-
const i = H(u, t, r);
|
|
448
|
-
(!n || i > o) && (n = u, o = i);
|
|
449
|
-
}
|
|
450
|
-
return { face: n, value: o };
|
|
451
|
-
}, V = (e) => ({
|
|
452
|
-
action: e,
|
|
453
|
-
active: !1,
|
|
454
|
-
value: 0,
|
|
455
|
-
justStarted: !1,
|
|
456
|
-
justEnded: !1,
|
|
457
|
-
phase: "none",
|
|
458
|
-
holdStartedAt: null
|
|
459
|
-
}), Re = (e, t, r, n, o) => {
|
|
460
|
-
const u = e.phase === "begin";
|
|
461
|
-
if (e.value = t, e.justStarted = !1, e.justEnded = !1, e.phase = e.active ? "stay" : "none", !n)
|
|
462
|
-
return e.holdStartedAt = null, e.active && (e.active = !1, e.justEnded = !0, e.phase = "end"), e;
|
|
463
|
-
if (e.active) {
|
|
464
|
-
if (t <= o.releaseThreshold) {
|
|
465
|
-
if (u) return e;
|
|
466
|
-
e.active = !1, e.justEnded = !0, e.phase = "end";
|
|
467
|
-
}
|
|
468
|
-
return e;
|
|
469
|
-
}
|
|
470
|
-
return t < o.threshold ? (e.holdStartedAt = null, e) : (e.holdStartedAt === null && (e.holdStartedAt = r), r - e.holdStartedAt >= o.holdMs && (e.active = !0, e.justStarted = !0, e.phase = "begin", e.holdStartedAt = null), e);
|
|
471
|
-
}, W = (e) => ({
|
|
1147
|
+
const n = Number.isFinite(e) ? Math.max(0, Math.round(e)) : 0, s = Vt({
|
|
1148
|
+
...t,
|
|
1149
|
+
numFaces: Math.max(r ?? n + 1, n + 1)
|
|
1150
|
+
}), c = E([]), u = E(n), o = E({ detected: !1, faceIndex: n }), [a, i] = V(Mr), f = E(a);
|
|
1151
|
+
return v(() => {
|
|
1152
|
+
c.current = s, u.current = n;
|
|
1153
|
+
}, [s, n]), U(() => {
|
|
1154
|
+
const d = c.current, h = u.current, m = d[h] ?? null, A = !!m, p = o.current.faceIndex === h && o.current.detected, S = Lr(p, A);
|
|
1155
|
+
o.current = { detected: A, faceIndex: h };
|
|
1156
|
+
const l = {
|
|
1157
|
+
face: m,
|
|
1158
|
+
faces: d,
|
|
1159
|
+
faceCount: d.length,
|
|
1160
|
+
detected: A,
|
|
1161
|
+
justDetected: S === "begin",
|
|
1162
|
+
justLost: S === "end",
|
|
1163
|
+
phase: S
|
|
1164
|
+
}, T = f.current;
|
|
1165
|
+
T.face === l.face && T.faces === l.faces && T.faceCount === l.faceCount && T.detected === l.detected && T.justDetected === l.justDetected && T.justLost === l.justLost && T.phase === l.phase || (f.current = l, i(l));
|
|
1166
|
+
}), a;
|
|
1167
|
+
}, ze = (e) => ({
|
|
472
1168
|
action: e,
|
|
473
1169
|
active: !1,
|
|
474
1170
|
value: 0,
|
|
475
1171
|
justStarted: !1,
|
|
476
1172
|
justEnded: !1,
|
|
477
1173
|
phase: "none"
|
|
478
|
-
}),
|
|
479
|
-
const n =
|
|
480
|
-
return
|
|
481
|
-
|
|
482
|
-
}, [e,
|
|
483
|
-
|
|
484
|
-
const
|
|
485
|
-
|
|
486
|
-
}, [
|
|
487
|
-
const
|
|
1174
|
+
}), An = (e, r, t = {}) => {
|
|
1175
|
+
const n = E(Fe(r)), s = E(null), c = E(r), u = E({}), [o, a] = V(() => ze(r)), i = E(o);
|
|
1176
|
+
return v(() => {
|
|
1177
|
+
s.current = e, u.current = t;
|
|
1178
|
+
}, [e, t]), v(() => {
|
|
1179
|
+
c.current = r, n.current = Fe(r);
|
|
1180
|
+
const f = ze(r);
|
|
1181
|
+
i.current = f, a(f);
|
|
1182
|
+
}, [r]), U(({ clock: f }) => {
|
|
1183
|
+
const d = s.current, h = c.current, m = u.current, A = d ? de(d, h, m) : 0, p = At(
|
|
488
1184
|
n.current,
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
!!
|
|
492
|
-
|
|
493
|
-
),
|
|
494
|
-
if (
|
|
1185
|
+
A,
|
|
1186
|
+
f.elapsedTime * 1e3,
|
|
1187
|
+
!!d,
|
|
1188
|
+
Rt(h, m)
|
|
1189
|
+
), S = i.current;
|
|
1190
|
+
if (S.action === p.action && S.active === p.active && S.value === p.value && S.justStarted === p.justStarted && S.justEnded === p.justEnded && S.phase === p.phase)
|
|
495
1191
|
return;
|
|
496
|
-
const
|
|
497
|
-
action:
|
|
498
|
-
active:
|
|
499
|
-
value:
|
|
500
|
-
justStarted:
|
|
501
|
-
justEnded:
|
|
502
|
-
phase:
|
|
1192
|
+
const l = {
|
|
1193
|
+
action: p.action,
|
|
1194
|
+
active: p.active,
|
|
1195
|
+
value: p.value,
|
|
1196
|
+
justStarted: p.justStarted,
|
|
1197
|
+
justEnded: p.justEnded,
|
|
1198
|
+
phase: p.phase
|
|
503
1199
|
};
|
|
504
|
-
|
|
505
|
-
}),
|
|
506
|
-
},
|
|
1200
|
+
i.current = l, a(l);
|
|
1201
|
+
}), o;
|
|
1202
|
+
}, Rn = [
|
|
507
1203
|
"angry",
|
|
508
1204
|
"disgust",
|
|
509
1205
|
"fear",
|
|
@@ -512,7 +1208,7 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
|
|
|
512
1208
|
"sad",
|
|
513
1209
|
"surprise",
|
|
514
1210
|
"unknown"
|
|
515
|
-
],
|
|
1211
|
+
], ne = [
|
|
516
1212
|
"angry",
|
|
517
1213
|
"disgust",
|
|
518
1214
|
"fear",
|
|
@@ -520,112 +1216,236 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
|
|
|
520
1216
|
"neutral",
|
|
521
1217
|
"sad",
|
|
522
1218
|
"surprise"
|
|
523
|
-
],
|
|
524
|
-
let
|
|
525
|
-
for (let
|
|
526
|
-
|
|
527
|
-
const n = new Array(
|
|
528
|
-
let
|
|
529
|
-
for (let
|
|
530
|
-
const
|
|
531
|
-
n[
|
|
1219
|
+
], wr = (e, r = 0.55) => {
|
|
1220
|
+
let t = -1 / 0;
|
|
1221
|
+
for (let i = 0; i < ne.length; i += 1)
|
|
1222
|
+
t = Math.max(t, Number(e[i]) || 0);
|
|
1223
|
+
const n = new Array(ne.length);
|
|
1224
|
+
let s = 0;
|
|
1225
|
+
for (let i = 0; i < ne.length; i += 1) {
|
|
1226
|
+
const f = Math.exp((Number(e[i]) || 0) - t);
|
|
1227
|
+
n[i] = f, s += f;
|
|
532
1228
|
}
|
|
533
|
-
const
|
|
534
|
-
let
|
|
535
|
-
for (let
|
|
536
|
-
const
|
|
537
|
-
|
|
1229
|
+
const c = Object.fromEntries(ne.map((i) => [i, 0]));
|
|
1230
|
+
let u = "unknown", o = 0;
|
|
1231
|
+
for (let i = 0; i < ne.length; i += 1) {
|
|
1232
|
+
const f = s ? n[i] / s : 0, d = ne[i];
|
|
1233
|
+
c[d] = f, f > o && (u = d, o = f);
|
|
538
1234
|
}
|
|
539
|
-
const
|
|
540
|
-
return { expression:
|
|
541
|
-
},
|
|
542
|
-
const
|
|
543
|
-
for (let n = 0,
|
|
544
|
-
|
|
545
|
-
return
|
|
546
|
-
},
|
|
547
|
-
let
|
|
548
|
-
return
|
|
549
|
-
throw
|
|
550
|
-
}),
|
|
551
|
-
},
|
|
552
|
-
active:
|
|
553
|
-
targetFps:
|
|
1235
|
+
const a = Number.isFinite(r) ? Math.min(1, Math.max(0, r)) : 0.55;
|
|
1236
|
+
return { expression: o >= a ? u : "unknown", confidence: o, scores: c };
|
|
1237
|
+
}, Fr = (e) => {
|
|
1238
|
+
const r = e.width * e.height, t = new Float32Array(r * 3);
|
|
1239
|
+
for (let n = 0, s = 0; n < r; n += 1, s += 4)
|
|
1240
|
+
t[n] = e.data[s] / 127.5 - 1, t[r + n] = e.data[s + 1] / 127.5 - 1, t[r * 2 + n] = e.data[s + 2] / 127.5 - 1;
|
|
1241
|
+
return t;
|
|
1242
|
+
}, kr = "https://huggingface.co/opencv/facial_expression_recognition/resolve/main/facial_expression_recognition_mobilefacenet_2022july_int8.onnx", Pr = (e) => `https://cdn.jsdelivr.net/npm/onnxruntime-web@${e.env.versions.web}/dist/`, ye = /* @__PURE__ */ new Map(), Br = (e) => {
|
|
1243
|
+
let r = ye.get(e);
|
|
1244
|
+
return r || (r = Promise.all([import("onnxruntime-web/wasm"), Tt(e)]).then(([t, n]) => (t.env.wasm.wasmPaths = Pr(t), t.InferenceSession.create(n, { executionProviders: ["wasm"] }))).catch((t) => {
|
|
1245
|
+
throw ye.delete(e), t;
|
|
1246
|
+
}), ye.set(e, r)), r;
|
|
1247
|
+
}, _n = (e, {
|
|
1248
|
+
active: r = !0,
|
|
1249
|
+
targetFps: t = 5,
|
|
554
1250
|
minConfidence: n = 0.55,
|
|
555
|
-
modelUrl:
|
|
1251
|
+
modelUrl: s = kr
|
|
556
1252
|
} = {}) => {
|
|
557
|
-
const { session:
|
|
1253
|
+
const { session: c } = Qe(), u = E(null), o = E(null), a = E(!1), i = E(-1 / 0), f = E(!0), [d, h] = V({
|
|
558
1254
|
status: "idle",
|
|
559
1255
|
result: null,
|
|
560
1256
|
error: null
|
|
561
1257
|
});
|
|
562
|
-
return
|
|
563
|
-
const
|
|
564
|
-
return
|
|
565
|
-
|
|
1258
|
+
return v(() => {
|
|
1259
|
+
const m = document.createElement("canvas");
|
|
1260
|
+
return u.current = m, o.current = m.getContext("2d", { willReadFrequently: !0 }), f.current = !0, () => {
|
|
1261
|
+
f.current = !1, u.current = null, o.current = null;
|
|
566
1262
|
};
|
|
567
|
-
}, []),
|
|
568
|
-
if (!
|
|
569
|
-
const
|
|
570
|
-
if (
|
|
571
|
-
const
|
|
572
|
-
if (!
|
|
573
|
-
|
|
574
|
-
const
|
|
575
|
-
Promise.all([import("onnxruntime-web/wasm"),
|
|
576
|
-
const
|
|
577
|
-
[
|
|
578
|
-
}),
|
|
579
|
-
|
|
1263
|
+
}, []), U(({ clock: m }) => {
|
|
1264
|
+
if (!r || !e || a.current || d.status === "error") return;
|
|
1265
|
+
const A = Number.isFinite(t) && t > 0 ? t : 5, p = m.elapsedTime * 1e3;
|
|
1266
|
+
if (p - i.current < 1e3 / A) return;
|
|
1267
|
+
const S = c.getInputFrame(), l = u.current, T = o.current;
|
|
1268
|
+
if (!S || !l || !T || !hr({ source: S, face: e, canvas: l, outputSize: { width: 112, height: 112 } })) return;
|
|
1269
|
+
i.current = p, a.current = !0, d.status === "idle" && h({ status: "loading", result: null, error: null });
|
|
1270
|
+
const I = Fr(T.getImageData(0, 0, 112, 112));
|
|
1271
|
+
Promise.all([import("onnxruntime-web/wasm"), Br(s)]).then(async ([O, C]) => {
|
|
1272
|
+
const g = await C.run({
|
|
1273
|
+
[C.inputNames[0]]: new O.Tensor("float32", I, [1, 3, 112, 112])
|
|
1274
|
+
}), _ = wr(
|
|
1275
|
+
g[C.outputNames[0]].data,
|
|
580
1276
|
n
|
|
581
1277
|
);
|
|
582
|
-
|
|
583
|
-
}).catch((
|
|
584
|
-
|
|
1278
|
+
f.current && h({ status: "ready", result: _, error: null });
|
|
1279
|
+
}).catch((O) => {
|
|
1280
|
+
f.current && h({
|
|
585
1281
|
status: "error",
|
|
586
1282
|
result: null,
|
|
587
|
-
error:
|
|
1283
|
+
error: O instanceof Error ? O : new Error(String(O))
|
|
588
1284
|
});
|
|
589
1285
|
}).finally(() => {
|
|
590
|
-
|
|
1286
|
+
a.current = !1;
|
|
591
1287
|
});
|
|
592
|
-
}),
|
|
1288
|
+
}), d;
|
|
593
1289
|
};
|
|
594
1290
|
export {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
1291
|
+
vr as BODY_CALIBRATION_LANDMARKS,
|
|
1292
|
+
St as BODY_LANDMARK_INDEX,
|
|
1293
|
+
ls as BODY_MOVES,
|
|
1294
|
+
ds as BODY_MOVE_LIMITS,
|
|
1295
|
+
fs as BODY_MOVE_NAMES,
|
|
1296
|
+
hs as BODY_MOVE_VIEW_LIMITS,
|
|
1297
|
+
to as BODY_TARGETS,
|
|
1298
|
+
jn as BodyTracker,
|
|
1299
|
+
Tn as BodyTrigger,
|
|
1300
|
+
pe as CALIBRATION_STORAGE_KEY,
|
|
1301
|
+
xe as CALIBRATION_VERSION,
|
|
1302
|
+
Kn as CANONICAL_SHOULDER_DISTANCE,
|
|
1303
|
+
Wn as CANONICAL_TORSO_FIT_DEFAULT_SMOOTHING,
|
|
1304
|
+
Vn as CANONICAL_TORSO_INDICES,
|
|
1305
|
+
Yn as CANONICAL_TORSO_LANDMARKS,
|
|
1306
|
+
Xn as CANONICAL_TORSO_POINTS,
|
|
1307
|
+
qn as CanonicalTorsoFrame,
|
|
1308
|
+
Ce as DEFAULT_CALIBRATION,
|
|
1309
|
+
zn as DEFAULT_FACE_ACTION_OPTIONS,
|
|
1310
|
+
kr as DEFAULT_FACE_ATTRIBUTE_EXPRESSION_MODEL_URL,
|
|
1311
|
+
lo as DEFAULT_FACE_EXPRESSION_THRESHOLD,
|
|
1312
|
+
co as DEFAULT_GESTURE_DETECTOR_OPTIONS,
|
|
1313
|
+
js as DEFAULT_GESTURE_SETTINGS,
|
|
1314
|
+
In as DEFAULT_HOLISTIC_ANALYSIS_MAX_DIMENSION,
|
|
1315
|
+
Nn as DEFAULT_HOLISTIC_HOLD_MS,
|
|
1316
|
+
xn as DEFAULT_HOLISTIC_MODEL_URL,
|
|
1317
|
+
Cn as DEFAULT_HOLISTIC_PREDICT_MS,
|
|
1318
|
+
ve as DEFAULT_HOLISTIC_SIGNAL_THRESHOLDS,
|
|
1319
|
+
Ks as DEFAULT_HOLISTIC_TRACKER_SETTINGS,
|
|
1320
|
+
po as DEFAULT_POLICY_NUM_FACES,
|
|
1321
|
+
Lo as DEFAULT_SEGMENTATION_OVERLAY_SETTINGS,
|
|
1322
|
+
Eo as DEFAULT_SUBJECT_POLICY,
|
|
1323
|
+
ro as DEFAULT_TRACKING_ANCHOR,
|
|
1324
|
+
So as EMPTY_SUBJECT_MEMORY,
|
|
1325
|
+
Jn as FACE_ACTION_NAMES,
|
|
1326
|
+
Rn as FACE_ATTRIBUTE_EXPRESSION_NAMES,
|
|
1327
|
+
Qn as FACE_BLENDSHAPE_NAMES,
|
|
1328
|
+
br as FACE_CALIBRATION_LANDMARKS,
|
|
1329
|
+
Un as FACE_LANDMARK_INDICES,
|
|
1330
|
+
no as FACE_TARGETS,
|
|
1331
|
+
ms as FOREARM_OCCLUDER_FLARE,
|
|
1332
|
+
ps as FOREARM_OCCLUDER_LENGTH,
|
|
1333
|
+
Ts as FOREARM_OCCLUDER_OVERLAP,
|
|
1334
|
+
Dn as FaceMesh,
|
|
1335
|
+
bn as FaceTracker,
|
|
1336
|
+
gs as ForearmOccluder,
|
|
1337
|
+
at as GESTURES,
|
|
1338
|
+
hn as GESTURE_NAMES,
|
|
1339
|
+
Ws as GESTURE_SETTINGS_FIELDS,
|
|
1340
|
+
pn as GestureListener,
|
|
1341
|
+
on as GestureTracker,
|
|
1342
|
+
fn as GestureTrigger,
|
|
1343
|
+
je as HAND_CUTOUT_TRIANGLES,
|
|
1344
|
+
Hn as HAND_JOINT_INDEX,
|
|
1345
|
+
Ln as HAND_JOINT_NAMES,
|
|
1346
|
+
Es as HAND_OCCLUDER_RENDER_ORDER,
|
|
1347
|
+
Mn as HAND_POSE_DEFAULT_HOLD_MS,
|
|
1348
|
+
Bs as HAND_RIG_REQUIRED_JOINTS,
|
|
1349
|
+
so as HAND_TARGETS,
|
|
1350
|
+
Ss as HAND_TATTOO_DEFAULT_SIZE,
|
|
1351
|
+
As as HAND_TATTOO_RENDER_ORDER,
|
|
1352
|
+
Rs as HAND_TOUCH_DEFAULTS,
|
|
1353
|
+
_s as HAND_TOUCH_DEPTH,
|
|
1354
|
+
ys as HAND_TOUCH_POINTER_RADIUS,
|
|
1355
|
+
Os as HAND_TOUCH_TIPS,
|
|
1356
|
+
Vs as HOLISTIC_HANDS_OPTIONS,
|
|
1357
|
+
Ys as HOLISTIC_TRACKER_SETTINGS_FIELDS,
|
|
1358
|
+
an as HandAttachment,
|
|
1359
|
+
cn as HandCutout,
|
|
1360
|
+
Ds as HandOccluder,
|
|
1361
|
+
bs as HandRig,
|
|
1362
|
+
vs as HandTattoo,
|
|
1363
|
+
Is as HandTouch,
|
|
1364
|
+
sn as HandTracker,
|
|
1365
|
+
Ne as HolisticTracker,
|
|
1366
|
+
bo as IRIS_LANDMARKS,
|
|
1367
|
+
vo as IRIS_LANDMARK_COUNT,
|
|
1368
|
+
Io as PERSON_MASK_LABELS,
|
|
1369
|
+
Be as SEGMENTATION_TYPES,
|
|
1370
|
+
Zs as SEMANTIC_SEGMENTATION_PRESETS,
|
|
1371
|
+
$n as SHOULDER_OCCLUDER_DEFAULT_OPACITY,
|
|
1372
|
+
Zn as SHOULDER_OCCLUDER_V1_PATH,
|
|
1373
|
+
dn as Segmentation,
|
|
1374
|
+
es as SegmentationOverlay,
|
|
1375
|
+
ts as ShoulderOccluder,
|
|
1376
|
+
Ns as TOUCH_WORLD_DEFAULTS,
|
|
1377
|
+
un as Touchable,
|
|
1378
|
+
oo as TrackingAnchor,
|
|
1379
|
+
xs as WRIST_DEPTH_OF_WIDTH,
|
|
1380
|
+
Cs as WRIST_WIDTH_OF_PALM,
|
|
1381
|
+
Hs as WristAttachment,
|
|
1382
|
+
Ao as XR_MAX_SUBJECTS,
|
|
1383
|
+
Dr as applyCalibrationToFeedPoint,
|
|
1384
|
+
Ro as associateSubjects,
|
|
1385
|
+
rs as bodyLandmarkIndex,
|
|
1386
|
+
Hr as clearCalibration,
|
|
1387
|
+
wn as clearSemanticMask,
|
|
1388
|
+
Ar as createCalibration,
|
|
1389
|
+
Ls as createForearmGeometry,
|
|
1390
|
+
nr as createHolisticSignals,
|
|
1391
|
+
Fn as createSemanticMask,
|
|
1392
|
+
Ms as defineBodyMove,
|
|
1393
|
+
mn as defineGesture,
|
|
1394
|
+
hr as drawFaceCrop,
|
|
1395
|
+
Nr as estimateBodyScale,
|
|
1396
|
+
Ir as estimateFaceDistance,
|
|
1397
|
+
_o as faceCandidates,
|
|
1398
|
+
de as getFaceActionValue,
|
|
1399
|
+
Ge as getFaceBlendshape,
|
|
1400
|
+
fo as getFaceEyeDistance,
|
|
1401
|
+
ln as getHolisticSignals,
|
|
1402
|
+
ns as getStrongestFaceAction,
|
|
1403
|
+
ao as getTargetNamespace,
|
|
1404
|
+
Us as handPoseToScene,
|
|
1405
|
+
ss as hasFaceAction,
|
|
1406
|
+
ho as hasFaceExpression,
|
|
1407
|
+
Ve as isHandRaised,
|
|
1408
|
+
gn as isIdentityCalibration,
|
|
1409
|
+
We as isPalmOpen,
|
|
1410
|
+
yo as jointCandidates,
|
|
1411
|
+
xr as loadCalibration,
|
|
1412
|
+
ct as measureBodyCalibration,
|
|
1413
|
+
it as measureFaceCalibration,
|
|
1414
|
+
kn as normalizedTrackerPointToTrackerPoint,
|
|
1415
|
+
Xs as patchGestureSettings,
|
|
1416
|
+
qs as patchHolisticTrackerSettings,
|
|
1417
|
+
Mo as patchSegmentationOverlaySettings,
|
|
1418
|
+
yr as resetCalibration,
|
|
1419
|
+
Ct as resolveBodyMove,
|
|
1420
|
+
Or as resolveCalibrationMirror,
|
|
1421
|
+
mr as resolveGestureDefinition,
|
|
1422
|
+
Ue as resolveGestureDetectorOptions,
|
|
1423
|
+
zs as resolveGestureSettings,
|
|
1424
|
+
Js as resolveHolisticTrackerSettings,
|
|
1425
|
+
wo as resolveSegmentationOverlaySettings,
|
|
1426
|
+
Cr as saveCalibration,
|
|
1427
|
+
Oo as selectSubject,
|
|
1428
|
+
os as shoulderOccluderUrl,
|
|
1429
|
+
as as solveShoulderPose,
|
|
1430
|
+
Qs as toHolisticTrackerProps,
|
|
1431
|
+
Pn as trackerPointToNormalizedTrackerPoint,
|
|
1432
|
+
me as updateCalibration,
|
|
1433
|
+
Sr as useBodyTrigger,
|
|
1434
|
+
is as useCanonicalTorsoFit,
|
|
1435
|
+
An as useFaceAction,
|
|
1436
|
+
_n as useFaceAttributeExpression,
|
|
1437
|
+
Sn as useFaceDetection,
|
|
1438
|
+
To as useFaceInfo,
|
|
1439
|
+
Vt as useFaceInfos,
|
|
1440
|
+
ws as useFaceResults,
|
|
1441
|
+
Tr as useGesture,
|
|
1442
|
+
No as useHairMask,
|
|
1443
|
+
Fs as useHandTouch,
|
|
1444
|
+
or as useHolisticTracking,
|
|
1445
|
+
cs as useIrisTracking,
|
|
1446
|
+
xo as usePersonMask,
|
|
1447
|
+
Co as useSemanticSegmentationMask,
|
|
1448
|
+
En as useXRCalibration,
|
|
1449
|
+
ks as wristSizeOf,
|
|
1450
|
+
zt as writeHandCutout
|
|
631
1451
|
};
|