@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
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { D as t } from "./detector-K8aej4MB.js";
|
|
2
|
+
const i = {
|
|
3
|
+
enabled: !0,
|
|
4
|
+
bothHands: !0,
|
|
5
|
+
countEnabled: !0,
|
|
6
|
+
minCountConfidence: 0.35,
|
|
7
|
+
showBones: !0,
|
|
8
|
+
showJoints: !0,
|
|
9
|
+
showBoundingBox: !0,
|
|
10
|
+
showLabels: !1,
|
|
11
|
+
visualScale: 1,
|
|
12
|
+
opacity: 0.9,
|
|
13
|
+
jointRadius: 3,
|
|
14
|
+
lineWidth: 1.5,
|
|
15
|
+
labelScale: 1,
|
|
16
|
+
smoothing: 0.35
|
|
17
|
+
}, r = [
|
|
18
|
+
[0, 1],
|
|
19
|
+
[1, 2],
|
|
20
|
+
[2, 3],
|
|
21
|
+
[3, 4],
|
|
22
|
+
[0, 5],
|
|
23
|
+
[5, 6],
|
|
24
|
+
[6, 7],
|
|
25
|
+
[7, 8],
|
|
26
|
+
[0, 9],
|
|
27
|
+
[9, 10],
|
|
28
|
+
[10, 11],
|
|
29
|
+
[11, 12],
|
|
30
|
+
[0, 13],
|
|
31
|
+
[13, 14],
|
|
32
|
+
[14, 15],
|
|
33
|
+
[15, 16],
|
|
34
|
+
[0, 17],
|
|
35
|
+
[17, 18],
|
|
36
|
+
[18, 19],
|
|
37
|
+
[19, 20]
|
|
38
|
+
], a = [
|
|
39
|
+
"both",
|
|
40
|
+
"left",
|
|
41
|
+
"right",
|
|
42
|
+
"none"
|
|
43
|
+
], n = {
|
|
44
|
+
hands: "both",
|
|
45
|
+
targetFps: 24,
|
|
46
|
+
analysisMaxDimension: 768,
|
|
47
|
+
holdMs: 250,
|
|
48
|
+
predictMs: 0,
|
|
49
|
+
outputFaceBlendshapes: !0
|
|
50
|
+
}, p = [
|
|
51
|
+
{
|
|
52
|
+
key: "hands",
|
|
53
|
+
label: "Hands",
|
|
54
|
+
type: "select",
|
|
55
|
+
options: a.map((e) => ({ label: e, value: e }))
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: "targetFps",
|
|
59
|
+
label: "Target FPS (0 = uncapped)",
|
|
60
|
+
type: "number",
|
|
61
|
+
min: 0,
|
|
62
|
+
max: 60,
|
|
63
|
+
step: 1
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: "analysisMaxDimension",
|
|
67
|
+
label: "Analysis max px",
|
|
68
|
+
type: "number",
|
|
69
|
+
min: 256,
|
|
70
|
+
max: 1280,
|
|
71
|
+
step: 64
|
|
72
|
+
},
|
|
73
|
+
{ key: "holdMs", label: "Hold (ms)", type: "number", min: 0, max: 1e3, step: 10 },
|
|
74
|
+
{ key: "predictMs", label: "Predict (ms)", type: "number", min: 0, max: 300, step: 10 },
|
|
75
|
+
{ key: "outputFaceBlendshapes", label: "Face blendshapes (re-inits)", type: "boolean" }
|
|
76
|
+
], m = (e) => ({ ...n, ...e }), c = (e, s) => ({ ...e, ...s }), d = (e) => ({
|
|
77
|
+
hands: e.hands,
|
|
78
|
+
targetFps: e.targetFps > 0 ? e.targetFps : void 0,
|
|
79
|
+
analysisMaxDimension: e.analysisMaxDimension,
|
|
80
|
+
holdMs: e.holdMs,
|
|
81
|
+
predictMs: e.predictMs,
|
|
82
|
+
outputFaceBlendshapes: e.outputFaceBlendshapes
|
|
83
|
+
}), o = { ...t }, b = [
|
|
84
|
+
{ key: "enterThreshold", label: "Enter threshold", type: "number", min: 0, max: 1, step: 0.01 },
|
|
85
|
+
{ key: "exitThreshold", label: "Exit threshold", type: "number", min: 0, max: 1, step: 0.01 },
|
|
86
|
+
{ key: "holdMs", label: "Hold before begin (ms)", type: "number", min: 0, max: 1e3, step: 10 },
|
|
87
|
+
{
|
|
88
|
+
key: "cooldownMs",
|
|
89
|
+
label: "Cooldown after end (ms)",
|
|
90
|
+
type: "number",
|
|
91
|
+
min: 0,
|
|
92
|
+
max: 3e3,
|
|
93
|
+
step: 50
|
|
94
|
+
},
|
|
95
|
+
{ key: "minConfidence", label: "Min confidence", type: "number", min: 0, max: 1, step: 0.05 },
|
|
96
|
+
{ key: "lostGraceMs", label: "Loss grace (ms)", type: "number", min: 0, max: 1e3, step: 10 }
|
|
97
|
+
], h = (e, s = o) => ({ ...s, ...e }), T = (e, s) => ({ ...e, ...s });
|
|
98
|
+
export {
|
|
99
|
+
n as D,
|
|
100
|
+
b as G,
|
|
101
|
+
r as H,
|
|
102
|
+
a,
|
|
103
|
+
p as b,
|
|
104
|
+
o as c,
|
|
105
|
+
T as d,
|
|
106
|
+
h as e,
|
|
107
|
+
i as f,
|
|
108
|
+
c as p,
|
|
109
|
+
m as r,
|
|
110
|
+
d as t
|
|
111
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("./detector-ijypGtse.cjs"),l={enabled:!0,bothHands:!0,countEnabled:!0,minCountConfidence:.35,showBones:!0,showJoints:!0,showBoundingBox:!0,showLabels:!1,visualScale:1,opacity:.9,jointRadius:3,lineWidth:1.5,labelScale:1,smoothing:.35},i=[[0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[0,9],[9,10],[10,11],[11,12],[0,13],[13,14],[14,15],[15,16],[0,17],[17,18],[18,19],[19,20]],s=["both","left","right","none"],n={hands:"both",targetFps:24,analysisMaxDimension:768,holdMs:250,predictMs:0,outputFaceBlendshapes:!0},r=[{key:"hands",label:"Hands",type:"select",options:s.map(e=>({label:e,value:e}))},{key:"targetFps",label:"Target FPS (0 = uncapped)",type:"number",min:0,max:60,step:1},{key:"analysisMaxDimension",label:"Analysis max px",type:"number",min:256,max:1280,step:64},{key:"holdMs",label:"Hold (ms)",type:"number",min:0,max:1e3,step:10},{key:"predictMs",label:"Predict (ms)",type:"number",min:0,max:300,step:10},{key:"outputFaceBlendshapes",label:"Face blendshapes (re-inits)",type:"boolean"}],T=e=>({...n,...e}),S=(e,t)=>({...e,...t}),c=e=>({hands:e.hands,targetFps:e.targetFps>0?e.targetFps:void 0,analysisMaxDimension:e.analysisMaxDimension,holdMs:e.holdMs,predictMs:e.predictMs,outputFaceBlendshapes:e.outputFaceBlendshapes}),a={...o.DEFAULT_GESTURE_DETECTOR_OPTIONS},p=[{key:"enterThreshold",label:"Enter threshold",type:"number",min:0,max:1,step:.01},{key:"exitThreshold",label:"Exit threshold",type:"number",min:0,max:1,step:.01},{key:"holdMs",label:"Hold before begin (ms)",type:"number",min:0,max:1e3,step:10},{key:"cooldownMs",label:"Cooldown after end (ms)",type:"number",min:0,max:3e3,step:50},{key:"minConfidence",label:"Min confidence",type:"number",min:0,max:1,step:.05},{key:"lostGraceMs",label:"Loss grace (ms)",type:"number",min:0,max:1e3,step:10}],m=(e,t=a)=>({...t,...e}),E=(e,t)=>({...e,...t});exports.DEFAULT_GESTURE_SETTINGS=a;exports.DEFAULT_HAND_JOINTS_2D_SETTINGS=l;exports.DEFAULT_HOLISTIC_TRACKER_SETTINGS=n;exports.GESTURE_SETTINGS_FIELDS=p;exports.HAND_JOINTS_2D_BONES=i;exports.HOLISTIC_HANDS_OPTIONS=s;exports.HOLISTIC_TRACKER_SETTINGS_FIELDS=r;exports.patchGestureSettings=E;exports.patchHolisticTrackerSettings=S;exports.resolveGestureSettings=m;exports.resolveHolisticTrackerSettings=T;exports.toHolisticTrackerProps=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const A=require("three");function B(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const S=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(e,s,S.get?S:{enumerable:!0,get:()=>o[s]})}}return e.default=o,Object.freeze(e)}const H=B(A),w=new H.Vector3,k=new H.Vector3,U=new H.Matrix3,C=new H.Matrix4,_=new H.Vector3,G=(o,e)=>{const s=o.slice();e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1;for(let S=0;S<12&&!(s[1]*s[1]+s[2]*s[2]+s[5]*s[5]<1e-24);S+=1)for(const[l,f]of[[0,1],[0,2],[1,2]]){const D=s[l*3+f];if(Math.abs(D)<1e-18)continue;const V=s[l*3+l],y=(s[f*3+f]-V)/(2*D),j=Math.sign(y||1)/(Math.abs(y)+Math.sqrt(y*y+1)),h=1/Math.sqrt(j*j+1),x=j*h;for(let t=0;t<3;t+=1){const n=s[t*3+l],a=s[t*3+f];s[t*3+l]=h*n-x*a,s[t*3+f]=x*n+h*a}for(let t=0;t<3;t+=1){const n=s[l*3+t],a=s[f*3+t];s[l*3+t]=h*n-x*a,s[f*3+t]=x*n+h*a}for(let t=0;t<3;t+=1){const n=e[t*3+l],a=e[t*3+f];e[t*3+l]=h*n-x*a,e[t*3+f]=x*n+h*a}}return[s[0],s[4],s[8]]},N=o=>o[0]*(o[4]*o[8]-o[5]*o[7])-o[1]*(o[3]*o[8]-o[5]*o[6])+o[2]*(o[3]*o[7]-o[4]*o[6]),r=[0,0,0,0,0,0,0,0,0],v=[0,0,0,0,0,0,0,0,0],F=[0,0,0,0,0,0,0,0,0],m=[0,0,0,0,0,0,0,0,0],E=[0,0,0,0,0,0,0,0,0],u=[0,0,0,0,0,0,0,0,0],I=(o,e,s={scale:1,quaternion:new H.Quaternion,translation:new H.Vector3,rms:0},S=!0)=>{const z=Math.floor(Math.min(o.length,e.length)/3);if(z<3)throw new Error("solveSimilarity: at least 3 points are required");w.set(0,0,0),k.set(0,0,0);for(let t=0;t<z;t+=1)w.x+=o[t*3],w.y+=o[t*3+1],w.z+=o[t*3+2],k.x+=e[t*3],k.y+=e[t*3+1],k.z+=e[t*3+2];w.divideScalar(z),k.divideScalar(z),r.fill(0);let l=0;for(let t=0;t<z;t+=1){const n=o[t*3]-w.x,a=o[t*3+1]-w.y,p=o[t*3+2]-w.z,b=e[t*3]-k.x,d=e[t*3+1]-k.y,q=e[t*3+2]-k.z;l+=n*n+a*a+p*p,r[0]+=n*b,r[1]+=n*d,r[2]+=n*q,r[3]+=a*b,r[4]+=a*d,r[5]+=a*q,r[6]+=p*b,r[7]+=p*d,r[8]+=p*q}for(let t=0;t<3;t+=1)for(let n=0;n<3;n+=1)v[t*3+n]=r[t]*r[n]+r[3+t]*r[3+n]+r[6+t]*r[6+n];const f=G(v,F),D=[0,1,2].sort((t,n)=>f[n]-f[t]),V=[0,0,0],c=[];for(let t=0;t<3;t+=1){const n=D[t],a=F[n],p=F[3+n],b=F[6+n];m[t]=a,m[3+t]=p,m[6+t]=b;let d=r[0]*a+r[1]*p+r[2]*b,q=r[3]*a+r[4]*p+r[5]*b,O=r[6]*a+r[7]*p+r[8]*b;if(V[t]=Math.sqrt(Math.max(f[n],0)),t===2){const i=c[0][1]*c[1][2]-c[0][2]*c[1][1],M=c[0][2]*c[1][0]-c[0][0]*c[1][2],R=c[0][0]*c[1][1]-c[0][1]*c[1][0],T=d*i+q*M+O*R,g=Math.hypot(d,q,O)>1e-9*Math.max(V[0],1e-300)?T<0?-1:1:N(m)<0?-1:1;c.push([g*i,g*M,g*R]);continue}for(const i of c){const M=d*i[0]+q*i[1]+O*i[2];d-=M*i[0],q-=M*i[1],O-=M*i[2]}const Q=Math.hypot(d,q,O);if(Q>1e-12)c.push([d/Q,q/Q,O/Q]);else if(t===0)c.push([1,0,0]);else{const i=Math.abs(c[0][0])<.9?[1,0,0]:[0,1,0],M=i[0]*c[0][0]+i[1]*c[0][1]+i[2]*c[0][2],R=i[0]-M*c[0][0],T=i[1]-M*c[0][1],P=i[2]-M*c[0][2],g=Math.hypot(R,T,P);c.push([R/g,T/g,P/g])}}for(let t=0;t<3;t+=1)E[t]=c[t][0],E[3+t]=c[t][1],E[6+t]=c[t][2];const y=[1,1,N(m)*N(E)<0?-1:1];for(let t=0;t<3;t+=1)for(let n=0;n<3;n+=1)u[t*3+n]=m[t*3]*y[0]*E[n*3]+m[t*3+1]*y[1]*E[n*3+1]+m[t*3+2]*y[2]*E[n*3+2];U.set(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8]),s.quaternion.setFromRotationMatrix(C.setFromMatrix3(U));const j=V[0]*y[0]+V[1]*y[1]+V[2]*y[2],h=S&&l>0?j/l:1;s.scale=h,s.translation.copy(w).applyQuaternion(s.quaternion).multiplyScalar(-h).add(k);let x=0;for(let t=0;t<z;t+=1){_.set(o[t*3],o[t*3+1],o[t*3+2]).applyQuaternion(s.quaternion).multiplyScalar(h).add(s.translation);const n=_.x-e[t*3],a=_.y-e[t*3+1],p=_.z-e[t*3+2];x+=n*n+a*a+p*p}return s.rms=Math.sqrt(x/z),s};exports.solveSimilarity=I;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as H from "three";
|
|
2
|
+
const k = new H.Vector3(), z = new H.Vector3(), G = new H.Matrix3(), J = new H.Matrix4(), j = new H.Vector3(), K = (s, a) => {
|
|
3
|
+
const o = s.slice();
|
|
4
|
+
a[0] = 1, a[1] = 0, a[2] = 0, a[3] = 0, a[4] = 1, a[5] = 0, a[6] = 0, a[7] = 0, a[8] = 1;
|
|
5
|
+
for (let g = 0; g < 12 && !(o[1] * o[1] + o[2] * o[2] + o[5] * o[5] < 1e-24); g += 1)
|
|
6
|
+
for (const [l, f] of [
|
|
7
|
+
[0, 1],
|
|
8
|
+
[0, 2],
|
|
9
|
+
[1, 2]
|
|
10
|
+
]) {
|
|
11
|
+
const D = o[l * 3 + f];
|
|
12
|
+
if (Math.abs(D) < 1e-18) continue;
|
|
13
|
+
const V = o[l * 3 + l], h = (o[f * 3 + f] - V) / (2 * D), R = Math.sign(h || 1) / (Math.abs(h) + Math.sqrt(h * h + 1)), y = 1 / Math.sqrt(R * R + 1), w = R * y;
|
|
14
|
+
for (let t = 0; t < 3; t += 1) {
|
|
15
|
+
const n = o[t * 3 + l], r = o[t * 3 + f];
|
|
16
|
+
o[t * 3 + l] = y * n - w * r, o[t * 3 + f] = w * n + y * r;
|
|
17
|
+
}
|
|
18
|
+
for (let t = 0; t < 3; t += 1) {
|
|
19
|
+
const n = o[l * 3 + t], r = o[f * 3 + t];
|
|
20
|
+
o[l * 3 + t] = y * n - w * r, o[f * 3 + t] = w * n + y * r;
|
|
21
|
+
}
|
|
22
|
+
for (let t = 0; t < 3; t += 1) {
|
|
23
|
+
const n = a[t * 3 + l], r = a[t * 3 + f];
|
|
24
|
+
a[t * 3 + l] = y * n - w * r, a[t * 3 + f] = w * n + y * r;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return [o[0], o[4], o[8]];
|
|
28
|
+
}, C = (s) => s[0] * (s[4] * s[8] - s[5] * s[7]) - s[1] * (s[3] * s[8] - s[5] * s[6]) + s[2] * (s[3] * s[7] - s[4] * s[6]), e = [0, 0, 0, 0, 0, 0, 0, 0, 0], I = [0, 0, 0, 0, 0, 0, 0, 0, 0], A = [0, 0, 0, 0, 0, 0, 0, 0, 0], S = [0, 0, 0, 0, 0, 0, 0, 0, 0], E = [0, 0, 0, 0, 0, 0, 0, 0, 0], x = [0, 0, 0, 0, 0, 0, 0, 0, 0], L = (s, a, o = {
|
|
29
|
+
scale: 1,
|
|
30
|
+
quaternion: new H.Quaternion(),
|
|
31
|
+
translation: new H.Vector3(),
|
|
32
|
+
rms: 0
|
|
33
|
+
}, g = !0) => {
|
|
34
|
+
const m = Math.floor(Math.min(s.length, a.length) / 3);
|
|
35
|
+
if (m < 3) throw new Error("solveSimilarity: at least 3 points are required");
|
|
36
|
+
k.set(0, 0, 0), z.set(0, 0, 0);
|
|
37
|
+
for (let t = 0; t < m; t += 1)
|
|
38
|
+
k.x += s[t * 3], k.y += s[t * 3 + 1], k.z += s[t * 3 + 2], z.x += a[t * 3], z.y += a[t * 3 + 1], z.z += a[t * 3 + 2];
|
|
39
|
+
k.divideScalar(m), z.divideScalar(m), e.fill(0);
|
|
40
|
+
let l = 0;
|
|
41
|
+
for (let t = 0; t < m; t += 1) {
|
|
42
|
+
const n = s[t * 3] - k.x, r = s[t * 3 + 1] - k.y, p = s[t * 3 + 2] - k.z, u = a[t * 3] - z.x, q = a[t * 3 + 1] - z.y, M = a[t * 3 + 2] - z.z;
|
|
43
|
+
l += n * n + r * r + p * p, e[0] += n * u, e[1] += n * q, e[2] += n * M, e[3] += r * u, e[4] += r * q, e[5] += r * M, e[6] += p * u, e[7] += p * q, e[8] += p * M;
|
|
44
|
+
}
|
|
45
|
+
for (let t = 0; t < 3; t += 1)
|
|
46
|
+
for (let n = 0; n < 3; n += 1)
|
|
47
|
+
I[t * 3 + n] = e[t] * e[n] + e[3 + t] * e[3 + n] + e[6 + t] * e[6 + n];
|
|
48
|
+
const f = K(I, A), D = [0, 1, 2].sort((t, n) => f[n] - f[t]), V = [0, 0, 0], c = [];
|
|
49
|
+
for (let t = 0; t < 3; t += 1) {
|
|
50
|
+
const n = D[t], r = A[n], p = A[3 + n], u = A[6 + n];
|
|
51
|
+
S[t] = r, S[3 + t] = p, S[6 + t] = u;
|
|
52
|
+
let q = e[0] * r + e[1] * p + e[2] * u, M = e[3] * r + e[4] * p + e[5] * u, Q = e[6] * r + e[7] * p + e[8] * u;
|
|
53
|
+
if (V[t] = Math.sqrt(Math.max(f[n], 0)), t === 2) {
|
|
54
|
+
const i = c[0][1] * c[1][2] - c[0][2] * c[1][1], d = c[0][2] * c[1][0] - c[0][0] * c[1][2], F = c[0][0] * c[1][1] - c[0][1] * c[1][0], U = q * i + M * d + Q * F, b = Math.hypot(q, M, Q) > 1e-9 * Math.max(V[0], 1e-300) ? U < 0 ? -1 : 1 : C(S) < 0 ? -1 : 1;
|
|
55
|
+
c.push([b * i, b * d, b * F]);
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
for (const i of c) {
|
|
59
|
+
const d = q * i[0] + M * i[1] + Q * i[2];
|
|
60
|
+
q -= d * i[0], M -= d * i[1], Q -= d * i[2];
|
|
61
|
+
}
|
|
62
|
+
const T = Math.hypot(q, M, Q);
|
|
63
|
+
if (T > 1e-12)
|
|
64
|
+
c.push([q / T, M / T, Q / T]);
|
|
65
|
+
else if (t === 0)
|
|
66
|
+
c.push([1, 0, 0]);
|
|
67
|
+
else {
|
|
68
|
+
const i = Math.abs(c[0][0]) < 0.9 ? [1, 0, 0] : [0, 1, 0], d = i[0] * c[0][0] + i[1] * c[0][1] + i[2] * c[0][2], F = i[0] - d * c[0][0], U = i[1] - d * c[0][1], B = i[2] - d * c[0][2], b = Math.hypot(F, U, B);
|
|
69
|
+
c.push([F / b, U / b, B / b]);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
for (let t = 0; t < 3; t += 1)
|
|
73
|
+
E[t] = c[t][0], E[3 + t] = c[t][1], E[6 + t] = c[t][2];
|
|
74
|
+
const h = [1, 1, C(S) * C(E) < 0 ? -1 : 1];
|
|
75
|
+
for (let t = 0; t < 3; t += 1)
|
|
76
|
+
for (let n = 0; n < 3; n += 1)
|
|
77
|
+
x[t * 3 + n] = S[t * 3] * h[0] * E[n * 3] + S[t * 3 + 1] * h[1] * E[n * 3 + 1] + S[t * 3 + 2] * h[2] * E[n * 3 + 2];
|
|
78
|
+
G.set(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8]), o.quaternion.setFromRotationMatrix(J.setFromMatrix3(G));
|
|
79
|
+
const R = V[0] * h[0] + V[1] * h[1] + V[2] * h[2], y = g && l > 0 ? R / l : 1;
|
|
80
|
+
o.scale = y, o.translation.copy(k).applyQuaternion(o.quaternion).multiplyScalar(-y).add(z);
|
|
81
|
+
let w = 0;
|
|
82
|
+
for (let t = 0; t < m; t += 1) {
|
|
83
|
+
j.set(s[t * 3], s[t * 3 + 1], s[t * 3 + 2]).applyQuaternion(o.quaternion).multiplyScalar(y).add(o.translation);
|
|
84
|
+
const n = j.x - a[t * 3], r = j.y - a[t * 3 + 1], p = j.z - a[t * 3 + 2];
|
|
85
|
+
w += n * n + r * r + p * p;
|
|
86
|
+
}
|
|
87
|
+
return o.rms = Math.sqrt(w / m), o;
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
L as s
|
|
91
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { SPRING_DEFAULTS, SPRING_MAX_FRAME, SPRING_MAX_JUMP, SPRING_MAX_SUBSTEP, SPRING_SETTINGS_RANGES, SpringChain, SpringJoint, resolveSpringSettings, type SpringSettings, } from './spring';
|
|
2
|
+
export { SPRING_SWING_LENGTH, SpringSwingDriver, insertSwingPivots, type SpringSwingOptions, type SwingPivot, } from './swing';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as THREE from "three";
|
|
2
|
+
/**
|
|
3
|
+
* Spring bones (pure): a mass that hangs from a pivot along a rest direction
|
|
4
|
+
* and swings when the pivot moves or turns, then settles. A `SpringChain`
|
|
5
|
+
* hangs masses one below another (a lock of hair, a tassel); jewellery uses
|
|
6
|
+
* one joint. Everything is in world space; the rest direction comes from the
|
|
7
|
+
* thing it hangs from (the head's or torso's own down), so it swings only
|
|
8
|
+
* from motion.
|
|
9
|
+
*
|
|
10
|
+
* Each mass is pulled toward its rest point (`pivot + rest × length`) by a
|
|
11
|
+
* spring of `frequency` and `damping` relative to how that point moves, then
|
|
12
|
+
* kept at `length` from its pivot and within `maxAngle` of rest. Frames are
|
|
13
|
+
* split into steps of at most `SPRING_MAX_SUBSTEP`, so the swing is the same
|
|
14
|
+
* at any frame rate.
|
|
15
|
+
*/
|
|
16
|
+
export type SpringSettings = {
|
|
17
|
+
/** Swings per second when let go (Hz): lower is slower and floppier. */
|
|
18
|
+
frequency: number;
|
|
19
|
+
/** 0..1: how fast a swing dies down (0: never; 1: no overshoot). */
|
|
20
|
+
damping: number;
|
|
21
|
+
/** The largest swing from rest, degrees. */
|
|
22
|
+
maxAngle: number;
|
|
23
|
+
};
|
|
24
|
+
/** Gentle, like real jewellery: swings with turns and nods, settles within about a second. */
|
|
25
|
+
export declare const SPRING_DEFAULTS: Readonly<SpringSettings>;
|
|
26
|
+
export declare const SPRING_SETTINGS_RANGES: {
|
|
27
|
+
readonly frequency: readonly [0.2, 10];
|
|
28
|
+
readonly damping: readonly [0, 1];
|
|
29
|
+
readonly maxAngle: readonly [1, 175];
|
|
30
|
+
};
|
|
31
|
+
/** Any partial settings → complete and clamped (non-finite values fall back to the defaults). */
|
|
32
|
+
export declare const resolveSpringSettings: (input?: Partial<SpringSettings>) => SpringSettings;
|
|
33
|
+
/** The longest physics step (s): longer frames are split. */
|
|
34
|
+
export declare const SPRING_MAX_SUBSTEP: number;
|
|
35
|
+
/** A frame longer than this (s), or a jump of the rest point by more than `SPRING_MAX_JUMP` lengths, snaps to rest. */
|
|
36
|
+
export declare const SPRING_MAX_FRAME = 0.25;
|
|
37
|
+
export declare const SPRING_MAX_JUMP = 20;
|
|
38
|
+
/** One mass on a pivot. Call `step` once a frame; `reset` (or the first step) starts it at rest. */
|
|
39
|
+
export declare class SpringJoint {
|
|
40
|
+
/** The mass, world space. */
|
|
41
|
+
readonly position: THREE.Vector3;
|
|
42
|
+
readonly velocity: THREE.Vector3;
|
|
43
|
+
private ready;
|
|
44
|
+
private readonly lastPivot;
|
|
45
|
+
private readonly lastRest;
|
|
46
|
+
private lastLength;
|
|
47
|
+
private readonly lastTarget;
|
|
48
|
+
/** Starts at rest below `pivot` (`rest` a unit direction, `length` in world units). */
|
|
49
|
+
reset(pivot: THREE.Vector3, rest: THREE.Vector3, length: number): void;
|
|
50
|
+
/**
|
|
51
|
+
* Moves the mass on by `dt` seconds, the pivot having gone from its last
|
|
52
|
+
* pose to `pivot` / `rest` / `length` (world). Writes the unit direction
|
|
53
|
+
* from the pivot to the mass into `out` and returns it.
|
|
54
|
+
*/
|
|
55
|
+
step(pivot: THREE.Vector3, rest: THREE.Vector3, length: number, dt: number, settings: SpringSettings, out?: THREE.Vector3): THREE.Vector3;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Masses hung one below another: joint 0 from the root pivot, each next
|
|
59
|
+
* joint from the mass before it. `rests` and `lengths` per joint (world).
|
|
60
|
+
*/
|
|
61
|
+
export declare class SpringChain {
|
|
62
|
+
readonly joints: SpringJoint[];
|
|
63
|
+
private readonly pivot;
|
|
64
|
+
constructor(count: number);
|
|
65
|
+
/** Steps every joint; writes each joint's unit direction into `out` (one per joint). */
|
|
66
|
+
step(root: THREE.Vector3, rests: readonly THREE.Vector3[], lengths: readonly number[], dt: number, settings: SpringSettings, out: THREE.Vector3[]): THREE.Vector3[];
|
|
67
|
+
/** Every joint at rest, hanging from `root`. */
|
|
68
|
+
reset(root: THREE.Vector3, rests: readonly THREE.Vector3[], lengths: readonly number[]): void;
|
|
69
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { SpringSettings } from './spring';
|
|
2
|
+
import * as THREE from "three";
|
|
3
|
+
/**
|
|
4
|
+
* A swing on a scene object (no React): `inner` (a child of `outer`) turns
|
|
5
|
+
* about `outer`'s origin so whatever is in it hangs along `outer`'s own −Y
|
|
6
|
+
* and swings as `outer` moves and turns. Call `update` after the world
|
|
7
|
+
* matrices are up to date (the scene's before-render hook), so the swing
|
|
8
|
+
* follows the pose the object is drawn at.
|
|
9
|
+
*/
|
|
10
|
+
export type SpringSwingOptions = Partial<SpringSettings> & {
|
|
11
|
+
/** How far below the pivot the weight sits, in the pivot's own units (cm in a head or torso frame). */
|
|
12
|
+
length?: number;
|
|
13
|
+
};
|
|
14
|
+
/** The default weight distance (cm): a short drop earring or a pendant. */
|
|
15
|
+
export declare const SPRING_SWING_LENGTH = 1.5;
|
|
16
|
+
export declare class SpringSwingDriver {
|
|
17
|
+
readonly outer: THREE.Object3D;
|
|
18
|
+
readonly inner: THREE.Object3D;
|
|
19
|
+
private settings;
|
|
20
|
+
private length;
|
|
21
|
+
private readonly joint;
|
|
22
|
+
private lastTime;
|
|
23
|
+
private readonly pivot;
|
|
24
|
+
private readonly rest;
|
|
25
|
+
private readonly direction;
|
|
26
|
+
private readonly linear;
|
|
27
|
+
constructor(outer: THREE.Object3D, inner: THREE.Object3D, options?: SpringSwingOptions);
|
|
28
|
+
setOptions({ length, ...settings }: SpringSwingOptions): void;
|
|
29
|
+
/**
|
|
30
|
+
* One frame at `time` (s): steps the swing from `outer`'s current world
|
|
31
|
+
* pose and turns `inner`. While `outer` (or a parent) is hidden it rests
|
|
32
|
+
* and starts again at rest when shown. A second call at the same time
|
|
33
|
+
* changes nothing.
|
|
34
|
+
*/
|
|
35
|
+
update(time: number): void;
|
|
36
|
+
/** Back to rest; the next update starts again from there. */
|
|
37
|
+
reset(): void;
|
|
38
|
+
private toRest;
|
|
39
|
+
}
|
|
40
|
+
/** A swing pivot inserted above a node: rotate `inner`, its contents swing about `outer`'s origin. */
|
|
41
|
+
export type SwingPivot = {
|
|
42
|
+
node: THREE.Object3D;
|
|
43
|
+
outer: THREE.Group;
|
|
44
|
+
inner: THREE.Group;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Finds the nodes under `root` whose name contains one of `names`
|
|
48
|
+
* (case-insensitive; a matching node's own descendants are left alone) and
|
|
49
|
+
* puts a pivot above each, at the node's origin: an `outer` group in the
|
|
50
|
+
* node's place and an `inner` group holding the node. Turning `inner` swings
|
|
51
|
+
* the node about its origin (a pendant's bail). Changes `root` in place:
|
|
52
|
+
* call it on your own clone.
|
|
53
|
+
*/
|
|
54
|
+
export declare const insertSwingPivots: (root: THREE.Object3D, names: readonly string[]) => SwingPivot[];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { XRSubjectAssociation, XRSubjectCandidate, XRSubjectMemory, XRSubjectPolicy, XRSubjectSelection, XRSubjectSelectionResult, } from './types';
|
|
2
|
+
export { DEFAULT_SUBJECT_POLICY, EMPTY_SUBJECT_MEMORY, XR_MAX_SUBJECTS, associateSubjects, faceCandidates, jointCandidates, selectSubject, } from './select';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { TrackerPoint } from '../types/common';
|
|
2
|
+
import { XRSubjectAssociation, XRSubjectCandidate, XRSubjectMemory, XRSubjectPolicy, XRSubjectSelectionResult } from './types';
|
|
3
|
+
export declare const DEFAULT_SUBJECT_POLICY: XRSubjectPolicy;
|
|
4
|
+
/**
|
|
5
|
+
* Maximum subjects each tracker can report, and whether the count is a
|
|
6
|
+
* request option. Face: `numFaces` (1 default, raise per consumer; the first
|
|
7
|
+
* acquirer wins). Hand: 2 (fixed). Gesture: 1. Body: 1. Holistic: 1 (single
|
|
8
|
+
* person by design). Segmentation has no subjects.
|
|
9
|
+
*/
|
|
10
|
+
export declare const XR_MAX_SUBJECTS: Readonly<{
|
|
11
|
+
face: {
|
|
12
|
+
max: number;
|
|
13
|
+
default: number;
|
|
14
|
+
option: "numFaces";
|
|
15
|
+
};
|
|
16
|
+
hand: {
|
|
17
|
+
max: number;
|
|
18
|
+
default: number;
|
|
19
|
+
option: null;
|
|
20
|
+
};
|
|
21
|
+
gesture: {
|
|
22
|
+
max: number;
|
|
23
|
+
default: number;
|
|
24
|
+
option: null;
|
|
25
|
+
};
|
|
26
|
+
body: {
|
|
27
|
+
max: number;
|
|
28
|
+
default: number;
|
|
29
|
+
option: null;
|
|
30
|
+
};
|
|
31
|
+
holistic: {
|
|
32
|
+
max: number;
|
|
33
|
+
default: number;
|
|
34
|
+
option: null;
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
export declare const EMPTY_SUBJECT_MEMORY: XRSubjectMemory;
|
|
38
|
+
/**
|
|
39
|
+
* Pick one subject. Pure: feed `result.memory` back on the next frame for
|
|
40
|
+
* `sticky`. `null` index means nothing to select (the consumer should treat
|
|
41
|
+
* it as a dropout and apply its own hold).
|
|
42
|
+
*/
|
|
43
|
+
export declare const selectSubject: (candidates: XRSubjectCandidate[], policy?: XRSubjectPolicy, memory?: XRSubjectMemory) => XRSubjectSelectionResult;
|
|
44
|
+
type Landmark = {
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
};
|
|
48
|
+
/** Candidates from face-mesh landmark arrays (feed space): centre and width of the bounds. */
|
|
49
|
+
export declare const faceCandidates: (faces: ReadonlyArray<ReadonlyArray<Landmark>>) => XRSubjectCandidate[];
|
|
50
|
+
/** Candidates from tracker-space joint lists (hands, bodies): centre and span, converted to feed space. */
|
|
51
|
+
export declare const jointCandidates: (subjects: ReadonlyArray<{
|
|
52
|
+
coordinates?: ReadonlyArray<TrackerPoint>;
|
|
53
|
+
label?: string;
|
|
54
|
+
}>) => XRSubjectCandidate[];
|
|
55
|
+
/**
|
|
56
|
+
* Greedy nearest-centre matching between two trackers' subjects (face ↔
|
|
57
|
+
* body, hand ↔ body). Each subject is used once; pairs farther than
|
|
58
|
+
* `maxDistance` (feed units) are not associated. This is the SDK's whole
|
|
59
|
+
* association contract: spatial proximity in the same frame, no identity.
|
|
60
|
+
*/
|
|
61
|
+
export declare const associateSubjects: (primary: XRSubjectCandidate[], secondary: XRSubjectCandidate[], maxDistance?: number) => XRSubjectAssociation[];
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { FeedPoint } from '../coordinates/spaces';
|
|
2
|
+
/**
|
|
3
|
+
* How one subject is picked from a tracker's result array.
|
|
4
|
+
*
|
|
5
|
+
* - `index`: the result-array position (`policy.index`, default 0). The
|
|
6
|
+
* SDK's historical behaviour; the position is NOT a persistent identity.
|
|
7
|
+
* - `largest`: the biggest subject (closest to the camera).
|
|
8
|
+
* - `nearest-center`: the subject closest to the feed centre.
|
|
9
|
+
* - `leftmost` / `rightmost`: by feed x (viewer's left / right as shown in the preview).
|
|
10
|
+
* - `sticky`: the subject nearest to the previously selected one (within
|
|
11
|
+
* `stickyRadius`), falling back to `fallback` when none is close enough.
|
|
12
|
+
* This is the SDK's only re-identification: spatial continuity, nothing
|
|
13
|
+
* learned about the person.
|
|
14
|
+
*/
|
|
15
|
+
export type XRSubjectSelection = "index" | "largest" | "nearest-center" | "leftmost" | "rightmost" | "sticky";
|
|
16
|
+
export type XRSubjectPolicy = {
|
|
17
|
+
selection: XRSubjectSelection;
|
|
18
|
+
/** Result-array position for `index`. Default 0. */
|
|
19
|
+
index?: number;
|
|
20
|
+
/** Max feed distance (0..1 units) a `sticky` subject may move between frames. Default 0.2. */
|
|
21
|
+
stickyRadius?: number;
|
|
22
|
+
/** What `sticky` picks when nothing is within the radius (default `largest`). */
|
|
23
|
+
fallback?: Exclude<XRSubjectSelection, "sticky">;
|
|
24
|
+
};
|
|
25
|
+
/** A subject reduced to what selection needs: its feed-space centre and size. */
|
|
26
|
+
export type XRSubjectCandidate = {
|
|
27
|
+
/** Result-array position. */
|
|
28
|
+
index: number;
|
|
29
|
+
/** Feed space (0..1, top-left origin). */
|
|
30
|
+
center: FeedPoint;
|
|
31
|
+
/** Width in feed units (bounds width for faces, span for hands / bodies). */
|
|
32
|
+
size: number;
|
|
33
|
+
/** Extra identity hint the selection may use (e.g. handedness). */
|
|
34
|
+
label?: string;
|
|
35
|
+
};
|
|
36
|
+
export type XRSubjectSelectionResult = {
|
|
37
|
+
/** Selected result-array position, or `null` when there is no candidate. */
|
|
38
|
+
index: number | null;
|
|
39
|
+
/** Which rule decided. */
|
|
40
|
+
reason: XRSubjectSelection | "none" | "sticky-fallback";
|
|
41
|
+
/** Carry to the next call for `sticky`. */
|
|
42
|
+
memory: XRSubjectMemory;
|
|
43
|
+
};
|
|
44
|
+
/** Where the selected subject was last seen (for `sticky`). */
|
|
45
|
+
export type XRSubjectMemory = {
|
|
46
|
+
center: FeedPoint | null;
|
|
47
|
+
label?: string;
|
|
48
|
+
};
|
|
49
|
+
/** A pair of subjects matched across two trackers (face ↔ body, hand ↔ body…). */
|
|
50
|
+
export type XRSubjectAssociation = {
|
|
51
|
+
primaryIndex: number;
|
|
52
|
+
secondaryIndex: number;
|
|
53
|
+
/** Feed-space distance between the matched centres. */
|
|
54
|
+
distance: number;
|
|
55
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { XRProviderProps } from '../components/XRProvider';
|
|
2
|
+
import { XRModel } from '../constants';
|
|
3
|
+
import { XRCameraRequest } from '../types/compositor';
|
|
4
|
+
import { XRTrackerKind, XRTrackingConfig } from './types';
|
|
5
|
+
/** `perf`, `lifecycle` and `quality` for `<XRProvider>`. */
|
|
6
|
+
export declare const toProviderProps: (config: XRTrackingConfig) => Pick<XRProviderProps, "perf" | "lifecycle" | "quality">;
|
|
7
|
+
/** The webcam request for `setMediaSource` / `switchCamera`. */
|
|
8
|
+
export declare const toCameraRequest: (config: XRTrackingConfig) => XRCameraRequest;
|
|
9
|
+
type TrackerProps = {
|
|
10
|
+
face: {
|
|
11
|
+
numFaces: number;
|
|
12
|
+
targetFps?: number;
|
|
13
|
+
holdMs: number;
|
|
14
|
+
predictMs: number;
|
|
15
|
+
active: boolean;
|
|
16
|
+
};
|
|
17
|
+
hand: {
|
|
18
|
+
targetFps?: number;
|
|
19
|
+
active: boolean;
|
|
20
|
+
};
|
|
21
|
+
gesture: {
|
|
22
|
+
targetFps?: number;
|
|
23
|
+
active: boolean;
|
|
24
|
+
};
|
|
25
|
+
/** `<BodyTracker>` has no fps prop; its cap comes from `toModelOptions` / `perf.targetFps`. */
|
|
26
|
+
body: {
|
|
27
|
+
active: boolean;
|
|
28
|
+
};
|
|
29
|
+
holistic: {
|
|
30
|
+
targetFps?: number;
|
|
31
|
+
hands: XRTrackingConfig["trackers"]["holistic"]["hands"];
|
|
32
|
+
holdMs: number;
|
|
33
|
+
predictMs: number;
|
|
34
|
+
analysisMaxDimension: number;
|
|
35
|
+
outputFaceBlendshapes: boolean;
|
|
36
|
+
delegate: XRTrackingConfig["trackers"]["holistic"]["delegate"];
|
|
37
|
+
modelUrl?: string;
|
|
38
|
+
active: boolean;
|
|
39
|
+
};
|
|
40
|
+
segmentation: {
|
|
41
|
+
quality: XRTrackingConfig["trackers"]["segmentation"]["quality"];
|
|
42
|
+
active: boolean;
|
|
43
|
+
};
|
|
44
|
+
semanticSegmentation: {
|
|
45
|
+
preset: XRTrackingConfig["trackers"]["semanticSegmentation"]["preset"];
|
|
46
|
+
quality: XRTrackingConfig["trackers"]["semanticSegmentation"]["quality"];
|
|
47
|
+
modelUrl?: string;
|
|
48
|
+
active: boolean;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
/** Props for one tracker component / hook from the config (`active` mirrors `enabled`). */
|
|
52
|
+
export declare const toTrackerProps: <K extends XRTrackerKind>(config: XRTrackingConfig, kind: K) => TrackerProps[K];
|
|
53
|
+
/** Acquire options for `useXRModel` / `registry.acquire` per model. */
|
|
54
|
+
export declare const toModelOptions: (config: XRTrackingConfig, model: XRModel) => Record<string, unknown>;
|
|
55
|
+
/** The models the config enables, for capability probes and preloading. */
|
|
56
|
+
export declare const enabledModels: (config: XRTrackingConfig) => XRModel[];
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { XRTrackerKind, XRTrackingConfig, XRTrackingConfigInput, XRTrackingConfigParseResult, } from './types';
|
|
2
|
+
export { DEFAULT_TRACKING_CONFIG, TRACKER_KINDS, TRACKING_CONFIG_VERSION, mergeTrackingConfig, parseTrackingConfig, resolveTrackingConfig, serializeTrackingConfig, } from './resolve';
|
|
3
|
+
export { enabledModels, toCameraRequest, toModelOptions, toProviderProps, toTrackerProps, } from './apply';
|
|
4
|
+
export { TRACKING_CONFIG_STORAGE_KEY, clearTrackingConfig, loadTrackingConfig, saveTrackingConfig, } from './storage';
|
|
5
|
+
export type { TrackingConfigStorage } from './storage';
|
|
6
|
+
export { useXRTrackingConfig } from './useXRTrackingConfig';
|
|
7
|
+
export type { UseXRTrackingConfigOptions, UseXRTrackingConfigResult } from './useXRTrackingConfig';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { XRTrackerKind, XRTrackingConfig, XRTrackingConfigInput, XRTrackingConfigParseResult } from './types';
|
|
2
|
+
export declare const TRACKING_CONFIG_VERSION: 1;
|
|
3
|
+
export declare const DEFAULT_TRACKING_CONFIG: XRTrackingConfig;
|
|
4
|
+
/**
|
|
5
|
+
* Validate a partial config over `base` (the defaults unless given). Every
|
|
6
|
+
* leaf is type-checked and clamped; invalid values keep the base value and
|
|
7
|
+
* add a warning. Returns a new object; never throws.
|
|
8
|
+
*/
|
|
9
|
+
export declare const resolveTrackingConfig: (input?: XRTrackingConfigInput, base?: XRTrackingConfig, warnings?: string[]) => XRTrackingConfig;
|
|
10
|
+
/** Apply a patch over a resolved config (stamps `updatedAt`). */
|
|
11
|
+
export declare const mergeTrackingConfig: (current: XRTrackingConfig, patch: XRTrackingConfigInput, now?: number) => XRTrackingConfig;
|
|
12
|
+
/**
|
|
13
|
+
* Serialize for storage or transport. The config holds no runtime values by
|
|
14
|
+
* construction; this strips anything a caller may have attached and emits
|
|
15
|
+
* stable key order.
|
|
16
|
+
*/
|
|
17
|
+
export declare const serializeTrackingConfig: (config: XRTrackingConfig) => string;
|
|
18
|
+
/**
|
|
19
|
+
* Parse a stored document of any version. Unknown or older versions are
|
|
20
|
+
* migrated field-by-field onto the current defaults (fields that still
|
|
21
|
+
* exist keep their values; the rest default) with `migrated: true`;
|
|
22
|
+
* corrupt input yields the defaults with a warning. Never throws.
|
|
23
|
+
*/
|
|
24
|
+
export declare const parseTrackingConfig: (raw: string | unknown) => XRTrackingConfigParseResult;
|
|
25
|
+
export declare const TRACKER_KINDS: XRTrackerKind[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { XRTrackingConfig, XRTrackingConfigParseResult } from './types';
|
|
2
|
+
export declare const TRACKING_CONFIG_STORAGE_KEY = "vincentt.xr.tracking-config";
|
|
3
|
+
export type TrackingConfigStorage = Pick<Storage, "getItem" | "setItem" | "removeItem">;
|
|
4
|
+
/** Read and migrate a stored config; `null` when nothing is stored or storage is unavailable. */
|
|
5
|
+
export declare const loadTrackingConfig: (key?: string, storage?: TrackingConfigStorage | null) => XRTrackingConfigParseResult | null;
|
|
6
|
+
/** Persist (serialized, runtime-free). Returns `false` when storage is unavailable or full. */
|
|
7
|
+
export declare const saveTrackingConfig: (config: XRTrackingConfig, key?: string, storage?: TrackingConfigStorage | null) => boolean;
|
|
8
|
+
export declare const clearTrackingConfig: (key?: string, storage?: TrackingConfigStorage | null) => void;
|