@vincentt-xr/sdk 2.0.0-alpha.8 → 2.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GROUNDING.md +4643 -170
- package/README.md +1 -0
- package/dist/CanonicalHeadFrame-BHcWyaiK.js +1506 -0
- package/dist/CanonicalHeadFrame-D-_T1OMU.cjs +1 -0
- package/dist/DebuggerUI-7ngnJsBe.js +275 -0
- package/dist/DebuggerUI-CoglgKdO.cjs +1 -0
- package/dist/FaceRetouch-CLoTfrcs.js +1071 -0
- package/dist/FaceRetouch-J1lC1WbS.cjs +134 -0
- package/dist/FaceSurface-CHAMEeG1.cjs +1 -0
- package/dist/FaceSurface-DmP9AEeC.js +27 -0
- package/dist/SegmentationOverlay-D_FWkcyP.cjs +35 -0
- package/dist/SegmentationOverlay-vn5x_knv.js +6237 -0
- package/dist/SkeletonUtils-C2r90MtN.js +21 -0
- package/dist/SkeletonUtils-CddIup1F.cjs +1 -0
- package/dist/TextLabel-XE0rQSDn.cjs +2 -0
- package/dist/TextLabel-c9BCucOI.js +961 -0
- package/dist/assets/gltfLoader.d.ts +16 -0
- package/dist/assets/loaders.d.ts +16 -1
- package/dist/body-pose/index.d.ts +521 -0
- package/dist/body-trigger/__fixtures__/syntheticBody.d.ts +83 -0
- package/dist/body-trigger/frame.d.ts +88 -0
- package/dist/body-trigger/index.d.ts +6 -0
- package/dist/body-trigger/moves.d.ts +235 -0
- package/dist/body-trigger/trigger.d.ts +75 -0
- package/dist/calibration/calibration.d.ts +11 -6
- package/dist/canonicalFace-BHwyCx1c.js +9 -0
- package/dist/canonicalFace-C83I225R.cjs +1 -0
- package/dist/components/BodyInstruction/BodyPoseHint.d.ts +63 -0
- package/dist/components/BodyInstruction/index.d.ts +69 -0
- package/dist/components/BodyInstruction/useBodyPose.d.ts +23 -0
- package/dist/components/BodyTracker/index.d.ts +10 -2
- package/dist/components/BodyTrigger/index.d.ts +49 -0
- package/dist/components/Debugger/DebuggerProvider.d.ts +14 -1
- package/dist/components/Debugger/DebuggerUI.d.ts +3 -1
- package/dist/components/FaceAtlas/FaceAtlasLayer.d.ts +114 -0
- package/dist/components/FaceAtlas/MadeUpCamera.d.ts +80 -0
- package/dist/components/FaceAtlas/constants.d.ts +8 -0
- package/dist/components/FaceAtlas/index.d.ts +7 -0
- package/dist/components/FaceAtlas/useFaceAtlasSurface.d.ts +84 -0
- package/dist/components/FaceAtlas/useFaceSkin.d.ts +84 -0
- package/dist/components/FaceCharacter/ExternalFaceMesh.d.ts +109 -0
- package/dist/components/FaceCharacter/FaceExpressionController.d.ts +53 -0
- package/dist/components/FaceCharacter/FaceMorph.d.ts +71 -0
- package/dist/components/FaceCharacter/FacePiercing.d.ts +65 -0
- package/dist/components/FaceCharacter/FaceReprojection.d.ts +85 -0
- package/dist/components/FaceCharacter/FaceRig.d.ts +38 -0
- package/dist/components/FaceCharacter/FaceSurface.d.ts +49 -0
- package/dist/components/FaceCharacter/FaceSurfaceOccluder.d.ts +39 -0
- package/dist/components/FaceCharacter/PinToFaceMesh.d.ts +68 -0
- package/dist/components/FaceCharacter/index.d.ts +18 -0
- package/dist/components/FaceCharacter/useFaceReprojector.d.ts +10 -0
- package/dist/components/FaceInset/FaceInset.d.ts +68 -0
- package/dist/components/FaceInset/frame.d.ts +94 -0
- package/dist/components/FaceInset/index.d.ts +6 -0
- package/dist/components/FaceInset/material.d.ts +40 -0
- package/dist/components/FaceInset/useFaceInsetTexture.d.ts +37 -0
- package/dist/components/FaceInstruction/FaceExpressionHint.d.ts +43 -0
- package/dist/components/FaceInstruction/index.d.ts +56 -0
- package/dist/components/FaceInstruction/useFaceExpression.d.ts +20 -0
- package/dist/components/FaceLiquify/FaceLiquify.d.ts +49 -0
- package/dist/components/FaceLiquify/debug.d.ts +37 -0
- package/dist/components/FaceLiquify/frame.d.ts +55 -0
- package/dist/components/FaceLiquify/index.d.ts +10 -0
- package/dist/components/FaceLiquify/material.d.ts +39 -0
- package/dist/components/FaceLiquify/pass.d.ts +49 -0
- package/dist/components/FaceLiquify/presence.d.ts +25 -0
- package/dist/components/FaceLiquify/presets.d.ts +82 -0
- package/dist/components/FaceLiquify/selfTest.d.ts +66 -0
- package/dist/components/FaceLiquify/target.d.ts +85 -0
- package/dist/components/FaceLiquify/warp.d.ts +72 -0
- package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +5 -3
- package/dist/components/FaceMesh/canonical/geometryGroups.d.ts +21 -0
- package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +9 -0
- package/dist/components/FaceMesh/index.d.ts +1 -1
- package/dist/components/FaceRetouch/Background.d.ts +3 -1
- package/dist/components/FaceRetouch/FaceRetouch.d.ts +5 -0
- package/dist/components/FaceRetouch/renderState.d.ts +19 -0
- package/dist/components/FaceSwap/FaceMirror.d.ts +46 -0
- package/dist/components/FaceSwap/FaceSwap.d.ts +58 -0
- package/dist/components/FaceSwap/FaceTextureLayer.d.ts +72 -0
- package/dist/components/FaceSwap/faceSwapPlan.d.ts +91 -0
- package/dist/components/FaceSwap/index.d.ts +13 -0
- package/dist/components/FaceSwap/settings.d.ts +300 -0
- package/dist/components/FaceSwap/useFaceTexture.d.ts +35 -0
- package/dist/components/FaceSwap/useLiveFace.d.ts +38 -0
- package/dist/components/FaceSwap/useLiveFaceTexture.d.ts +31 -0
- package/dist/components/FaceWarp3D/FaceWarp3D.d.ts +50 -0
- package/dist/components/FaceWarp3D/index.d.ts +2 -3
- package/dist/components/Faceless/Faceless.d.ts +51 -0
- package/dist/components/Faceless/index.d.ts +2 -0
- package/dist/components/HairLock/HairLock.d.ts +39 -0
- package/dist/components/HairLock/index.d.ts +2 -0
- package/dist/components/HairLock/lockGeometry.d.ts +15 -0
- package/dist/components/HandCutout/index.d.ts +35 -0
- package/dist/components/HandInstruction/HandGestureHint.d.ts +70 -0
- package/dist/components/HandInstruction/index.d.ts +74 -0
- package/dist/components/HandInstruction/useHandGesture.d.ts +22 -0
- package/dist/components/HandRig/ForearmOccluder.d.ts +29 -0
- package/dist/components/HandRig/HandAttachment.d.ts +34 -0
- package/dist/components/HandRig/HandOccluder.d.ts +55 -0
- package/dist/components/HandRig/HandTattoo.d.ts +61 -0
- package/dist/components/HandRig/WristAttachment.d.ts +34 -0
- package/dist/components/HandRig/index.d.ts +101 -0
- package/dist/components/HandRig/useArmMask.d.ts +29 -0
- package/dist/components/HandRig/wristSolve.d.ts +69 -0
- package/dist/components/HandTouch/HandTouch.d.ts +62 -0
- package/dist/components/HandTouch/Touchable.d.ts +36 -0
- package/dist/components/HandTouch/index.d.ts +2 -0
- package/dist/components/HeadBinding/index.d.ts +14 -0
- package/dist/components/HeadOccluder/CanonicalHeadFrame.d.ts +22 -0
- package/dist/components/HeadOccluder/Earrings.d.ts +55 -0
- package/dist/components/HeadOccluder/HeadAttachment.d.ts +38 -0
- package/dist/components/HeadOccluder/NeckOccluder.d.ts +64 -0
- package/dist/components/HeadOccluder/earringPlacement.d.ts +31 -0
- package/dist/components/HeadOccluder/headAttachmentPoints.d.ts +69 -0
- package/dist/components/HeadOccluder/index.d.ts +57 -3
- package/dist/components/HeadOccluder/useCanonicalHeadFit.d.ts +36 -0
- package/dist/components/HeadOccluder/useLandmarkPoseFit.d.ts +80 -0
- package/dist/components/Instruction/HintStage.d.ts +29 -0
- package/dist/components/Instruction/InstructionCue.d.ts +126 -0
- package/dist/components/Instruction/gestureHold.d.ts +20 -0
- package/dist/components/Instruction/ghost.d.ts +129 -0
- package/dist/components/Instruction/hintBlend.d.ts +19 -0
- package/dist/components/Instruction/hintLook.d.ts +81 -0
- package/dist/components/Instruction/hintLoop.d.ts +36 -0
- package/dist/components/Instruction/index.d.ts +41 -0
- package/dist/components/Instruction/useGhostModel.d.ts +33 -0
- package/dist/components/Instruction/useInstructionHold.d.ts +72 -0
- package/dist/components/LipEffect/LipEffect.d.ts +22 -2
- package/dist/components/LipEffect/LipEffectMaterial.d.ts +62 -10
- package/dist/components/LipEffect/LipEffects.d.ts +5 -2
- package/dist/components/LipEffect/defaults.d.ts +21 -2
- package/dist/components/LipEffect/index.d.ts +1 -1
- package/dist/components/LipEffect/lipShading.d.ts +73 -0
- package/dist/components/LipEffect/settings.d.ts +117 -13
- package/dist/components/LipEffect/shader.d.ts +39 -0
- package/dist/components/LipEffect/types.d.ts +82 -10
- package/dist/components/LipEffect/useLipDesignTextures.d.ts +6 -0
- package/dist/components/LipEffect/uvGuide.d.ts +31 -16
- package/dist/components/Makeup/Blush.d.ts +18 -0
- package/dist/components/Makeup/Brows.d.ts +20 -0
- package/dist/components/Makeup/Contour.d.ts +17 -0
- package/dist/components/Makeup/Eyeliner.d.ts +20 -0
- package/dist/components/Makeup/Eyeshadow.d.ts +20 -0
- package/dist/components/Makeup/Highlighter.d.ts +18 -0
- package/dist/components/Makeup/MakeupDesign.d.ts +37 -0
- package/dist/components/Makeup/MakeupRegion.d.ts +132 -0
- package/dist/components/Makeup/constants.d.ts +44 -0
- package/dist/components/Makeup/design.d.ts +106 -0
- package/dist/components/Makeup/designSamples.d.ts +42 -0
- package/dist/components/Makeup/eyes.d.ts +114 -0
- package/dist/components/Makeup/fields.d.ts +10 -0
- package/dist/components/Makeup/geometry.d.ts +106 -0
- package/dist/components/Makeup/index.d.ts +26 -0
- package/dist/components/Makeup/looks.d.ts +28 -0
- package/dist/components/Makeup/material.d.ts +239 -0
- package/dist/components/Makeup/settings.d.ts +54 -0
- package/dist/components/Makeup/shades.d.ts +143 -0
- package/dist/components/Makeup/shapes.d.ts +27 -0
- package/dist/components/Makeup/skinTone.d.ts +135 -0
- package/dist/components/Makeup/types.d.ts +110 -0
- package/dist/components/Makeup/useMakeupSkinTone.d.ts +40 -0
- package/dist/components/Necklace/Necklace.d.ts +44 -0
- package/dist/components/Necklace/index.d.ts +1 -0
- package/dist/components/ParticleEmitter/ParticleEmitter.d.ts +69 -0
- package/dist/components/ParticleEmitter/index.d.ts +1 -0
- package/dist/components/ShoulderOccluder/index.d.ts +43 -0
- package/dist/components/ShoulderOccluder/useCanonicalTorsoFit.d.ts +24 -0
- package/dist/components/SpringSwing/SpringSwing.d.ts +22 -0
- package/dist/components/SpringSwing/index.d.ts +1 -0
- package/dist/components/XRScene/renderOutputTarget.d.ts +12 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/config/index.d.ts +0 -1
- package/dist/context-DTxSQvp4.js +13 -0
- package/dist/context-hA0Rb2Xa.cjs +1 -0
- package/dist/contexts-BH7PdKFS.cjs +1 -0
- package/dist/contexts-jak8-tND.js +667 -0
- package/dist/coordinates/index.d.ts +2 -0
- package/dist/coordinates/side.d.ts +40 -0
- package/dist/debug-ui/default-setting.cjs +2 -2
- package/dist/debug-ui/face-swap-settings/index.d.ts +22 -0
- package/dist/debug-ui/hierarchy-panel/index.d.ts +3 -2
- package/dist/debug-ui/index.d.ts +4 -3
- package/dist/debug-ui/media-source/index.d.ts +1 -1
- package/dist/debug-ui/media-source/session.d.ts +30 -2
- package/dist/debug-ui/media-source.cjs +1 -1
- package/dist/debug-ui/media-source.js +1 -1
- package/dist/debug-ui/object-inspector-panel/index.d.ts +3 -2
- package/dist/debug-ui/product-hotspots/index.d.ts +3 -2
- package/dist/debug-ui/scene-editor/hierarchy-panel.d.ts +3 -1
- package/dist/debug-ui/scene-editor/inspector-panel.d.ts +3 -1
- package/dist/debug-ui/screen-image-settings/index.d.ts +3 -1
- package/dist/debug-ui/screen-text-settings/ScreenTextSettingsPanel.d.ts +1 -1
- package/dist/debug-ui/screen-text-settings/types.d.ts +2 -0
- package/dist/debug-ui/settings-panel/index.d.ts +6 -1
- package/dist/debug-ui/shared/debugWindow.d.ts +51 -0
- package/dist/debug-ui/xr-diagnostics/index.d.ts +3 -2
- package/dist/debug-ui.cjs +3 -3
- package/dist/debug-ui.js +2250 -2472
- package/dist/entries/all.d.ts +3 -1
- package/dist/entries/core.d.ts +3 -2
- package/dist/entries/face-effects.d.ts +114 -8
- package/dist/entries/instructions.d.ts +48 -0
- package/dist/entries/internal.d.ts +2 -1
- package/dist/entries/low-level.d.ts +28 -1
- package/dist/entries/particles.d.ts +11 -0
- package/dist/entries/tracking.d.ts +37 -2
- package/dist/face-atlas/attributes.d.ts +30 -0
- package/dist/face-atlas/eyes.d.ts +272 -0
- package/dist/face-atlas/faceAtlas.generated.d.ts +46 -0
- package/dist/face-atlas/glsl/atlasVertex.d.ts +46 -0
- package/dist/face-atlas/glsl/common.d.ts +55 -0
- package/dist/face-atlas/glsl/design.d.ts +49 -0
- package/dist/face-atlas/glsl/eyes.d.ts +73 -0
- package/dist/face-atlas/glsl/finish.d.ts +24 -0
- package/dist/face-atlas/glsl/format.d.ts +4 -0
- package/dist/face-atlas/glsl/index.d.ts +59 -0
- package/dist/face-atlas/glsl/shading.d.ts +15 -0
- package/dist/face-atlas/glsl/shapes.d.ts +66 -0
- package/dist/face-atlas/glsl/sparkle.d.ts +19 -0
- package/dist/face-atlas/glsl/uniforms.d.ts +106 -0
- package/dist/face-atlas/guide.d.ts +51 -0
- package/dist/face-atlas/index.d.ts +25 -0
- package/dist/face-atlas/lead.d.ts +117 -0
- package/dist/face-atlas/madeUpCamera.d.ts +125 -0
- package/dist/face-atlas/masks.d.ts +53 -0
- package/dist/face-atlas/obj.d.ts +69 -0
- package/dist/face-atlas/polylines.d.ts +63 -0
- package/dist/face-atlas/probe/FaceSkinProbe.d.ts +208 -0
- package/dist/face-atlas/probe/__fixtures__/emulate.d.ts +9 -0
- package/dist/face-atlas/probe/__fixtures__/face.d.ts +24 -0
- package/dist/face-atlas/probe/constants.d.ts +137 -0
- package/dist/face-atlas/probe/glsl.d.ts +43 -0
- package/dist/face-atlas/probe/lightFit.d.ts +108 -0
- package/dist/face-atlas/probe/schedule.d.ts +44 -0
- package/dist/face-atlas/probe/selfTest.d.ts +87 -0
- package/dist/face-atlas/probe/stats.d.ts +143 -0
- package/dist/face-atlas/probe/targets.d.ts +70 -0
- package/dist/face-atlas/probe/unwrap.d.ts +76 -0
- package/dist/face-atlas/quality.d.ts +28 -0
- package/dist/face-atlas/regions.d.ts +31 -0
- package/dist/face-atlas/registry.d.ts +252 -0
- package/dist/face-atlas/renderState.d.ts +86 -0
- package/dist/face-atlas/selfOcclusion.d.ts +62 -0
- package/dist/face-atlas/shading.d.ts +406 -0
- package/dist/face-atlas/shapes.d.ts +86 -0
- package/dist/face-atlas/sides.d.ts +41 -0
- package/dist/face-atlas/skinMask.d.ts +35 -0
- package/dist/face-atlas/surface.d.ts +155 -0
- package/dist/face-atlas/topology.d.ts +44 -0
- package/dist/face-character/__fixtures__/faceImageDetections.d.ts +25 -0
- package/dist/face-character/__fixtures__/faceNode.d.ts +22 -0
- package/dist/face-character/bindFaceModel.d.ts +106 -0
- package/dist/face-character/canonicalFace.d.ts +17 -0
- package/dist/face-character/canonicalFaceGeometry.d.ts +11 -0
- package/dist/face-character/canonicalFacePositions.d.ts +7 -0
- package/dist/face-character/driveFaceModel.d.ts +57 -0
- package/dist/face-character/expressionOutputs.d.ts +45 -0
- package/dist/face-character/faceExpressions.d.ts +104 -0
- package/dist/face-character/faceImageLandmarker.d.ts +93 -0
- package/dist/face-character/faceMeshBinding.d.ts +62 -0
- package/dist/face-character/faceMorph.d.ts +77 -0
- package/dist/face-character/faceMorphs.d.ts +46 -0
- package/dist/face-character/facePhoto.d.ts +138 -0
- package/dist/face-character/facePiercings.d.ts +116 -0
- package/dist/face-character/facePin.d.ts +131 -0
- package/dist/face-character/faceReprojection.d.ts +273 -0
- package/dist/face-character/faceReprojector.d.ts +171 -0
- package/dist/face-character/faceRig.d.ts +176 -0
- package/dist/face-character/faceSwapPresence.d.ts +85 -0
- package/dist/face-character/faceTexture.d.ts +169 -0
- package/dist/face-character/faceTextureBaker.d.ts +86 -0
- package/dist/face-character/faceTextureGuide.d.ts +106 -0
- package/dist/face-character/faceTextureStats.d.ts +298 -0
- package/dist/face-character/faceTransfer.d.ts +396 -0
- package/dist/face-character/faceTransferGeometry.d.ts +109 -0
- package/dist/face-character/faceTransferSelfTest.d.ts +94 -0
- package/dist/face-character/faceWarp3D.d.ts +101 -0
- package/dist/face-character/faceless.d.ts +79 -0
- package/dist/face-character/featureWarp.d.ts +28 -0
- package/dist/face-character/liveFaceRegistry.d.ts +370 -0
- package/dist/face-character/liveValue.d.ts +12 -0
- package/dist/face-character/memo.d.ts +15 -0
- package/dist/face-effects.cjs +2252 -83
- package/dist/face-effects.js +14234 -1231
- package/dist/face-expression/index.d.ts +182 -0
- package/dist/face-info/landmarks.d.ts +17 -3
- package/dist/face-info/types.d.ts +20 -3
- package/dist/gestures/definitions.d.ts +15 -2
- package/dist/gestures/index.d.ts +1 -1
- package/dist/gestures/measures.d.ts +21 -8
- package/dist/getFaceInfo-B1otSDMX.cjs +1 -0
- package/dist/getFaceInfo-Cu4xDWiL.js +62 -0
- package/dist/hand/armFit.d.ts +46 -0
- package/dist/hand/armMask.d.ts +178 -0
- package/dist/hand/handCutout.d.ts +23 -0
- package/dist/hand/handCutoutRegistry.d.ts +7 -0
- package/dist/hand/handGestures.d.ts +524 -0
- package/dist/hand/handPose.d.ts +98 -0
- package/dist/hand/handRigSolver.d.ts +159 -0
- package/dist/hand/handTattoo.d.ts +81 -0
- package/dist/hand/handTouch.d.ts +240 -0
- package/dist/hand/wrist.d.ts +44 -0
- package/dist/hand/wristFilter.d.ts +44 -0
- package/dist/hooks/selectors.d.ts +8 -0
- package/dist/hooks/useFaceModelAcquisition.d.ts +38 -0
- package/dist/hooks/useTrackerContext.d.ts +6 -0
- package/dist/index-B1_TzJaI.js +1104 -0
- package/dist/index-BavF06C6.js +190 -0
- package/dist/index-BfFmpddl.cjs +21 -0
- package/dist/index-BuBzneeW.cjs +46 -0
- package/dist/index-CGsQWodV.cjs +1 -0
- package/dist/index-CIe7eCMH.js +3200 -0
- package/dist/index-CfSF8LXa.cjs +1 -0
- package/dist/index-D5GTzOzD.cjs +1 -0
- package/dist/index-DBhQzvVa.js +314 -0
- package/dist/index-DE17y0ZI.cjs +1 -0
- package/dist/index-JII7huPk.js +442 -0
- package/dist/index-tpCr9CLj.cjs +1 -0
- package/dist/{renderPasses-NnKZVfBy.js → index-w1S7fI2B.js} +219 -247
- package/dist/index-zGaqrz_K.js +188 -0
- package/dist/instructions.cjs +30 -0
- package/dist/instructions.js +1507 -0
- package/dist/{internal-vsfNQycj.js → internal-B90P-clC.js} +138 -118
- package/dist/internal-Cjinca64.cjs +1 -0
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +15 -10
- package/dist/iris/compute.d.ts +7 -5
- package/dist/iris/types.d.ts +6 -4
- package/dist/{landmarkMask-CbTFzBYG.js → landmarkMask-BFDyBnKM.js} +6 -6
- package/dist/landmarks-BlUqf5MZ.cjs +1 -0
- package/dist/landmarks-bftdwq6Z.js +76 -0
- package/dist/loaders-BGAUACsd.js +363 -0
- package/dist/loaders-BJ1_QCHt.cjs +1 -0
- package/dist/low-level.cjs +1 -1
- package/dist/low-level.js +666 -602
- package/dist/main.cjs +1 -1
- package/dist/main.js +866 -1182
- package/dist/models/Body/index.d.ts +2 -0
- package/dist/models/Face/constants.d.ts +8 -0
- package/dist/models/Face/index.d.ts +3 -11
- package/dist/models/Face/rotation.d.ts +18 -3
- package/dist/models/Hand/HandTracking.d.ts +17 -1
- package/dist/models/Segmentation/index.d.ts +2 -0
- package/dist/models/nodeSource.d.ts +9 -0
- package/dist/particles/emission.d.ts +24 -0
- package/dist/particles/eyes.d.ts +24 -0
- package/dist/particles/glsl.d.ts +14 -0
- package/dist/particles/index.d.ts +10 -0
- package/dist/particles/motion.d.ts +42 -0
- package/dist/particles/presets.d.ts +12 -0
- package/dist/particles/ring.d.ts +58 -0
- package/dist/particles/selfTest.d.ts +53 -0
- package/dist/particles/settings.d.ts +127 -0
- package/dist/particles/shapes.d.ts +29 -0
- package/dist/particles/spawner.d.ts +60 -0
- package/dist/particles/system.d.ts +64 -0
- package/dist/particles.cjs +122 -0
- package/dist/particles.js +774 -0
- package/dist/product.cjs +1 -1
- package/dist/product.js +29 -29
- package/dist/{providers-C0Dlhh9Z.js → providers-C8rE26Uf.js} +127 -126
- package/dist/providers-DHsrhDI2.cjs +62 -0
- package/dist/render/renderPasses.d.ts +8 -0
- package/dist/render/sceneBeforeRender.d.ts +12 -0
- package/dist/{renderGroups-CN1cGFUo.js → renderGroups-B38pUaX2.js} +1 -1
- package/dist/{renderGroups-O4KmaMl9.cjs → renderGroups-Cb_4Ar1Q.cjs} +1 -1
- package/dist/renderPasses-B6l8IpJv.js +1290 -0
- package/dist/renderPasses-dqmkft4P.cjs +158 -0
- package/dist/renderState-CJNmj5jz.js +39 -0
- package/dist/renderState-apSfg4eR.cjs +1 -0
- package/dist/scene-object.cjs +1 -1
- package/dist/scene-object.js +2 -2
- package/dist/segmentation-Cb3ouK6Z.js +1758 -0
- package/dist/segmentation-D9pYO6aR.cjs +1 -0
- package/dist/segmentation2d/types.d.ts +6 -0
- package/dist/select-Ck5LGz-J.cjs +1 -0
- package/dist/select-pYRo_win.js +233 -0
- package/dist/selectors-C4X71aoD.cjs +1 -0
- package/dist/selectors-DmNaKIwE.js +196 -0
- package/dist/session-BrH8G7iJ.cjs +31 -0
- package/dist/session-DgA_z6O1.js +418 -0
- package/dist/{settings-aQk845NJ.js → settings-BJ7FMBsO.js} +53 -15
- package/dist/settings-C63FMBlF.cjs +1 -0
- package/dist/similarityFit-BFqHND2e.cjs +1 -0
- package/dist/similarityFit-Bbz-R8AY.js +91 -0
- package/dist/spring/index.d.ts +2 -0
- package/dist/spring/spring.d.ts +69 -0
- package/dist/spring/swing.d.ts +54 -0
- package/dist/tracking.cjs +10 -1
- package/dist/tracking.js +1002 -855
- package/dist/trigger-D0Pm9noT.cjs +49 -0
- package/dist/trigger-IQeys0oS.js +2128 -0
- package/dist/types/face.d.ts +20 -1
- package/dist/types/hand-tracking.d.ts +9 -0
- package/dist/types/nodes.d.ts +20 -1
- package/dist/types/segmentation.d.ts +5 -0
- package/dist/updateThrottle-BseecYag.js +4 -0
- package/dist/updateThrottle-Of5Y4SVa.cjs +1 -0
- package/dist/useFaceInfo-BHDNCvsJ.cjs +1 -0
- package/dist/useFaceInfo-J4x7LsqL.js +76 -0
- package/dist/useFaceResultReader-BvEo5REG.js +61 -0
- package/dist/useFaceResultReader-DuaL1KJG.cjs +1 -0
- package/dist/useInstructionHold-DOu-RpCM.js +53 -0
- package/dist/useInstructionHold-DwJY1Alr.cjs +1 -0
- package/dist/useLandmarkPoseFit-Bg-h9BPb.cjs +1 -0
- package/dist/useLandmarkPoseFit-Bmb3h6Mw.js +87 -0
- package/dist/{useXRCapabilities-B1R2ghy-.cjs → useXRCapabilities-Cr3RzuAW.cjs} +1 -1
- package/dist/{useXRCapabilities-C68v__wB.js → useXRCapabilities-Cxmlmpbd.js} +1 -1
- package/dist/utils/canonicalRigidLandmarks.d.ts +8 -0
- package/dist/utils/headOccluderFit.d.ts +42 -0
- package/dist/utils/integrity.d.ts +17 -0
- package/dist/utils/resolveNumFaces.d.ts +13 -0
- package/dist/utils/shoulderOccluderFit.d.ts +38 -0
- package/dist/utils/similarityFit.d.ts +23 -0
- package/dist/uv-BMFt19bg.cjs +1 -0
- package/dist/{index-CsUdQ-pn.js → uv-DJU_XfmN.js} +15 -249
- package/docs/SDK_DOCUMENTATION.md +1 -2
- package/docs/api/adaptive-quality.mdx +1 -1
- package/docs/api/body-instructions.mdx +285 -0
- package/docs/api/body-triggers.mdx +234 -0
- package/docs/api/camera-permission.mdx +1 -1
- package/docs/api/coordinate-spaces.mdx +7 -4
- package/docs/api/cross-camera.mdx +3 -2
- package/docs/api/debug-ui-scene-editor.mdx +23 -2
- package/docs/api/external-face-mesh.mdx +231 -0
- package/docs/api/face-actions.mdx +20 -16
- package/docs/api/face-attribute-expression.mdx +1 -1
- package/docs/api/face-binding-anchors.mdx +4 -2
- package/docs/api/face-character.mdx +157 -0
- package/docs/api/face-effects.mdx +3 -0
- package/docs/api/face-expression-controller.mdx +153 -0
- package/docs/api/face-info.mdx +17 -11
- package/docs/api/face-inset.mdx +204 -0
- package/docs/api/face-instructions.mdx +183 -0
- package/docs/api/face-liquify.mdx +196 -0
- package/docs/api/face-mesh.mdx +4 -7
- package/docs/api/face-morph.mdx +117 -0
- package/docs/api/face-painting.mdx +7 -0
- package/docs/api/face-reprojection.mdx +154 -0
- package/docs/api/face-retouching.mdx +18 -10
- package/docs/api/face-swap.mdx +350 -0
- package/docs/api/face-warp-3d.mdx +166 -0
- package/docs/api/faceless.mdx +143 -0
- package/docs/api/gestures.mdx +68 -32
- package/docs/api/hair.mdx +97 -0
- package/docs/api/hand-instructions.mdx +222 -0
- package/docs/api/hand-rig.mdx +535 -0
- package/docs/api/hand-touch.mdx +162 -0
- package/docs/api/head-occluder.mdx +563 -0
- package/docs/api/holistic-tracker.mdx +6 -1
- package/docs/api/instructions.mdx +323 -0
- package/docs/api/iris-tracking.mdx +24 -19
- package/docs/api/made-up-camera.mdx +131 -0
- package/docs/api/makeup-skin-tone.mdx +135 -0
- package/docs/api/makeup.mdx +353 -0
- package/docs/api/multi-subject.mdx +4 -1
- package/docs/api/particles.mdx +155 -0
- package/docs/api/person-cutout.mdx +1 -1
- package/docs/api/pin-to-face-mesh.mdx +274 -0
- package/docs/api/product-ar.mdx +5 -2
- package/docs/api/segmentation-overlay.mdx +1 -1
- package/docs/docs.json +29 -1
- package/docs/examples/lip-shaders.mdx +82 -33
- package/docs/guides/face-atlas-template.svg +1 -0
- package/docs/guides/face-atlas-textures.mdx +186 -0
- package/docs/guides/face-texture-template.svg +1 -0
- package/docs/guides/harness-debug-ui.mdx +4 -4
- package/docs/guides/lip-effect-textures.mdx +178 -102
- package/docs/guides/lip-uv-template.png +0 -0
- package/docs/guides/lip-uv-template.svg +1 -1
- package/docs/guides/makeup-design-textures.mdx +109 -0
- package/docs/introduction.mdx +1 -2
- package/package.json +11 -1
- package/dist/DebuggerUI-C-ldiozL.js +0 -269
- package/dist/DebuggerUI-CWX5EtQv.cjs +0 -1
- package/dist/FaceMeshRenderer-BEEXZwS6.cjs +0 -158
- package/dist/FaceMeshRenderer-UuH5sTXG.js +0 -1322
- package/dist/FaceRetouch-C7h7x9kd.js +0 -683
- package/dist/FaceRetouch-DqftT26Y.cjs +0 -134
- package/dist/GLTFLoader-C5q63sKO.js +0 -1633
- package/dist/GLTFLoader-Cb_CRwmG.cjs +0 -1
- package/dist/SegmentationOverlay-DQuW3dsc.js +0 -133
- package/dist/SegmentationOverlay-aWVod8Kl.cjs +0 -1
- package/dist/components/FaceWarp3D/FaceWarp3DHead.d.ts +0 -15
- package/dist/components/FaceWarp3D/defaults.d.ts +0 -37
- package/dist/components/FaceWarp3D/warp.d.ts +0 -13
- package/dist/contexts-CO0sd4JQ.cjs +0 -1
- package/dist/contexts-FzlnnMYD.js +0 -669
- package/dist/debug-ui/face-warp-3d/index.d.ts +0 -6
- package/dist/getFaceInfo-BkZfaQs-.js +0 -118
- package/dist/getFaceInfo-ahPxQFGu.cjs +0 -1
- package/dist/index--RgGzZ6X.cjs +0 -47
- package/dist/index-CHVbH0hz.js +0 -214
- package/dist/index-CeVkgsag.cjs +0 -1
- package/dist/index-CnGox6Xr.js +0 -3054
- package/dist/index-DKBAh6hV.cjs +0 -1
- package/dist/index-DsZwTfG0.cjs +0 -1
- package/dist/index-Dw6tj2Mi.js +0 -144
- package/dist/index-OCPjOaeP.cjs +0 -1
- package/dist/index-s9pF4zkG.js +0 -2053
- package/dist/internal-BYza1h8_.cjs +0 -1
- package/dist/measures-9dQPdw96.js +0 -154
- package/dist/measures-KfJzpvod.cjs +0 -1
- package/dist/providers-YNwkmNeK.cjs +0 -62
- package/dist/renderPasses-Cg-zqmEz.cjs +0 -21
- package/dist/screenTransform-BenfCtZt.js +0 -44
- package/dist/screenTransform-BiXdpVf0.cjs +0 -1
- package/dist/segmentation-9PhSvc-R.cjs +0 -1
- package/dist/segmentation-CeOTKemr.js +0 -5
- package/dist/selectors-C5G1PMYL.js +0 -195
- package/dist/selectors-Du_PsVnW.cjs +0 -1
- package/dist/session-BBr0yN8h.cjs +0 -31
- package/dist/session-Cy0m7l7-.js +0 -363
- package/dist/settings-DRR7-snV.cjs +0 -1
- package/dist/useFaceInfo-Blf7FCu3.js +0 -303
- package/dist/useFaceInfo-C5mO8NQY.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const E={BACKGROUND:-1e3,WORLD:0,TRACKED:100,SCREEN_UI:1e3},_=[[127,34,139],[11,0,37],[232,231,120],[72,37,39],[128,121,47],[232,121,128],[104,69,67],[175,171,148],[118,50,101],[73,39,40],[9,151,108],[48,115,131],[194,204,211],[74,40,185],[80,42,183],[40,92,186],[230,229,118],[202,212,214],[83,18,17],[76,61,146],[160,29,30],[56,157,173],[106,204,194],[135,214,192],[203,165,98],[21,71,68],[51,45,4],[144,24,23],[77,146,91],[205,50,187],[201,200,18],[91,106,182],[90,91,181],[85,84,17],[206,203,36],[148,171,140],[92,40,39],[193,189,244],[159,158,28],[247,246,161],[236,3,196],[54,68,104],[193,168,8],[117,228,31],[189,193,55],[98,97,99],[126,47,100],[166,79,218],[155,154,26],[209,49,131],[135,136,150],[47,126,217],[223,52,53],[45,51,134],[211,170,140],[67,69,108],[43,106,91],[230,119,120],[226,130,247],[63,53,52],[238,20,242],[46,70,156],[78,62,96],[46,53,63],[143,34,227],[123,117,111],[44,125,19],[236,134,51],[216,206,205],[154,153,22],[39,37,167],[200,201,208],[36,142,100],[57,212,202],[20,60,99],[28,158,157],[35,226,113],[160,159,27],[204,202,210],[113,225,46],[43,202,204],[62,76,77],[137,123,116],[41,38,72],[203,129,142],[64,98,240],[49,102,64],[41,73,74],[212,216,207],[42,74,184],[169,170,211],[170,149,176],[105,66,69],[122,6,168],[123,147,187],[96,77,90],[65,55,107],[89,90,180],[101,100,120],[63,105,104],[93,137,227],[15,86,85],[129,102,49],[14,87,86],[55,8,9],[100,47,121],[145,23,22],[88,89,179],[6,122,196],[88,95,96],[138,172,136],[215,58,172],[115,48,219],[42,80,81],[195,3,51],[43,146,61],[171,175,199],[81,82,38],[53,46,225],[144,163,110],[52,65,66],[229,228,117],[34,127,234],[107,108,69],[109,108,151],[48,64,235],[62,78,191],[129,209,126],[111,35,143],[117,123,50],[222,65,52],[19,125,141],[221,55,65],[3,195,197],[25,7,33],[220,237,44],[70,71,139],[122,193,245],[247,130,33],[71,21,162],[170,169,150],[188,174,196],[216,186,92],[2,97,167],[141,125,241],[164,167,37],[72,38,12],[38,82,13],[63,68,71],[226,35,111],[101,50,205],[206,92,165],[209,198,217],[165,167,97],[220,115,218],[133,112,243],[239,238,241],[214,135,169],[190,173,133],[171,208,32],[125,44,237],[86,87,178],[85,86,179],[84,85,180],[83,84,181],[201,83,182],[137,93,132],[76,62,183],[61,76,184],[57,61,185],[212,57,186],[214,207,187],[34,143,156],[79,239,237],[123,137,177],[44,1,4],[201,194,32],[64,102,129],[213,215,138],[59,166,219],[242,99,97],[2,94,141],[75,59,235],[24,110,228],[25,130,226],[23,24,229],[22,23,230],[26,22,231],[112,26,232],[189,190,243],[221,56,190],[28,56,221],[27,28,222],[29,27,223],[30,29,224],[247,30,225],[238,79,20],[166,59,75],[60,75,240],[147,177,215],[20,79,166],[187,147,213],[112,233,244],[233,128,245],[128,114,188],[114,217,174],[131,115,220],[217,198,236],[198,131,134],[177,132,58],[143,35,124],[110,163,7],[228,110,25],[356,389,368],[11,302,267],[452,350,349],[302,303,269],[357,343,277],[452,453,357],[333,332,297],[175,152,377],[347,348,330],[303,304,270],[9,336,337],[278,279,360],[418,262,431],[304,408,409],[310,415,407],[270,409,410],[450,348,347],[422,430,434],[313,314,17],[306,307,375],[387,388,260],[286,414,398],[335,406,418],[364,367,416],[423,358,327],[251,284,298],[281,5,4],[373,374,253],[307,320,321],[425,427,411],[421,313,18],[321,405,406],[320,404,405],[315,16,17],[426,425,266],[377,400,369],[322,391,269],[417,465,464],[386,257,258],[466,260,388],[456,399,419],[284,332,333],[417,285,8],[346,340,261],[413,441,285],[327,460,328],[355,371,329],[392,439,438],[382,341,256],[429,420,360],[364,394,379],[277,343,437],[443,444,283],[275,440,363],[431,262,369],[297,338,337],[273,375,321],[450,451,349],[446,342,467],[293,334,282],[458,461,462],[276,353,383],[308,324,325],[276,300,293],[372,345,447],[352,345,340],[274,1,19],[456,248,281],[436,427,425],[381,256,252],[269,391,393],[200,199,428],[266,330,329],[287,273,422],[250,462,328],[258,286,384],[265,353,342],[387,259,257],[424,431,430],[342,353,276],[273,335,424],[292,325,307],[366,447,345],[271,303,302],[423,266,371],[294,455,460],[279,278,294],[271,272,304],[432,434,427],[272,407,408],[394,430,431],[395,369,400],[334,333,299],[351,417,168],[352,280,411],[325,319,320],[295,296,336],[319,403,404],[330,348,349],[293,298,333],[323,454,447],[15,16,315],[358,429,279],[14,15,316],[285,336,9],[329,349,350],[374,380,252],[318,402,403],[6,197,419],[318,319,325],[367,364,365],[435,367,397],[344,438,439],[272,271,311],[195,5,281],[273,287,291],[396,428,199],[311,271,268],[283,444,445],[373,254,339],[282,334,296],[449,347,346],[264,447,454],[336,296,299],[338,10,151],[278,439,455],[292,407,415],[358,371,355],[340,345,372],[346,347,280],[442,443,282],[19,94,370],[441,442,295],[248,419,197],[263,255,359],[440,275,274],[300,383,368],[351,412,465],[263,467,466],[301,368,389],[395,378,379],[412,351,419],[436,426,322],[2,164,393],[370,462,461],[164,0,267],[302,11,12],[268,12,13],[293,300,301],[446,261,340],[330,266,425],[426,423,391],[429,355,437],[391,327,326],[440,457,438],[341,382,362],[459,457,461],[434,430,394],[414,463,362],[396,369,262],[354,461,457],[316,403,402],[315,404,403],[314,405,404],[313,406,405],[421,418,406],[366,401,361],[306,408,407],[291,409,408],[287,410,409],[432,436,410],[434,416,411],[264,368,383],[309,438,457],[352,376,401],[274,275,4],[421,428,262],[294,327,358],[433,416,367],[289,455,439],[462,370,326],[2,326,370],[305,460,455],[254,449,448],[255,261,446],[253,450,449],[252,451,450],[256,452,451],[341,453,452],[413,464,463],[441,413,414],[258,442,441],[257,443,442],[259,444,443],[260,445,444],[467,342,445],[459,458,250],[289,392,290],[290,328,460],[376,433,435],[250,290,392],[411,416,433],[341,463,464],[453,464,465],[357,465,412],[343,412,399],[360,363,440],[437,399,456],[420,456,363],[401,435,288],[372,383,353],[339,255,249],[448,261,255],[133,243,190],[133,155,112],[33,246,247],[33,130,25],[398,384,286],[362,398,414],[362,463,341],[263,359,467],[263,249,255],[466,467,260],[75,60,166],[238,239,79],[162,127,139],[72,11,37],[121,232,120],[73,72,39],[114,128,47],[233,232,128],[103,104,67],[152,175,148],[119,118,101],[74,73,40],[107,9,108],[49,48,131],[32,194,211],[184,74,185],[191,80,183],[185,40,186],[119,230,118],[210,202,214],[84,83,17],[77,76,146],[161,160,30],[190,56,173],[182,106,194],[138,135,192],[129,203,98],[54,21,68],[5,51,4],[145,144,23],[90,77,91],[207,205,187],[83,201,18],[181,91,182],[180,90,181],[16,85,17],[205,206,36],[176,148,140],[165,92,39],[245,193,244],[27,159,28],[30,247,161],[174,236,196],[103,54,104],[55,193,8],[111,117,31],[221,189,55],[240,98,99],[142,126,100],[219,166,218],[112,155,26],[198,209,131],[169,135,150],[114,47,217],[224,223,53],[220,45,134],[32,211,140],[109,67,108],[146,43,91],[231,230,120],[113,226,247],[105,63,52],[241,238,242],[124,46,156],[95,78,96],[70,46,63],[116,143,227],[116,123,111],[1,44,19],[3,236,51],[207,216,205],[26,154,22],[165,39,167],[199,200,208],[101,36,100],[43,57,202],[242,20,99],[56,28,157],[124,35,113],[29,160,27],[211,204,210],[124,113,46],[106,43,204],[96,62,77],[227,137,116],[73,41,72],[36,203,142],[235,64,240],[48,49,64],[42,41,74],[214,212,207],[183,42,184],[210,169,211],[140,170,176],[104,105,69],[193,122,168],[50,123,187],[89,96,90],[66,65,107],[179,89,180],[119,101,120],[68,63,104],[234,93,227],[16,15,85],[209,129,49],[15,14,86],[107,55,9],[120,100,121],[153,145,22],[178,88,179],[197,6,196],[89,88,96],[135,138,136],[138,215,172],[218,115,219],[41,42,81],[5,195,51],[57,43,61],[208,171,199],[41,81,38],[224,53,225],[24,144,110],[105,52,66],[118,229,117],[227,34,234],[66,107,69],[10,109,151],[219,48,235],[183,62,191],[142,129,126],[116,111,143],[118,117,50],[223,222,52],[94,19,141],[222,221,65],[196,3,197],[45,220,44],[156,70,139],[188,122,245],[139,71,162],[149,170,150],[122,188,196],[206,216,92],[164,2,167],[242,141,241],[0,164,37],[11,72,12],[12,38,13],[70,63,71],[31,226,111],[36,101,205],[203,206,165],[126,209,217],[98,165,97],[237,220,218],[237,239,241],[210,214,169],[140,171,32],[241,125,237],[179,86,178],[180,85,179],[181,84,180],[182,83,181],[194,201,182],[177,137,132],[184,76,183],[185,61,184],[186,57,185],[216,212,186],[192,214,187],[139,34,156],[218,79,237],[147,123,177],[45,44,4],[208,201,32],[98,64,129],[192,213,138],[235,59,219],[141,242,97],[97,2,141],[240,75,235],[229,24,228],[31,25,226],[230,23,229],[231,22,230],[232,26,231],[233,112,232],[244,189,243],[189,221,190],[222,28,221],[223,27,222],[224,29,223],[225,30,224],[113,247,225],[99,60,240],[213,147,215],[60,20,166],[192,187,213],[243,112,244],[244,233,245],[245,128,188],[188,114,174],[134,131,220],[174,217,236],[236,198,134],[215,177,58],[156,143,124],[25,110,7],[31,228,25],[264,356,368],[0,11,267],[451,452,349],[267,302,269],[350,357,277],[350,452,357],[299,333,297],[396,175,377],[280,347,330],[269,303,270],[151,9,337],[344,278,360],[424,418,431],[270,304,409],[272,310,407],[322,270,410],[449,450,347],[432,422,434],[18,313,17],[291,306,375],[259,387,260],[424,335,418],[434,364,416],[391,423,327],[301,251,298],[275,281,4],[254,373,253],[375,307,321],[280,425,411],[200,421,18],[335,321,406],[321,320,405],[314,315,17],[423,426,266],[396,377,369],[270,322,269],[413,417,464],[385,386,258],[248,456,419],[298,284,333],[168,417,8],[448,346,261],[417,413,285],[326,327,328],[277,355,329],[309,392,438],[381,382,256],[279,429,360],[365,364,379],[355,277,437],[282,443,283],[281,275,363],[395,431,369],[299,297,337],[335,273,321],[348,450,349],[359,446,467],[283,293,282],[250,458,462],[300,276,383],[292,308,325],[283,276,293],[264,372,447],[346,352,340],[354,274,19],[363,456,281],[426,436,425],[380,381,252],[267,269,393],[421,200,428],[371,266,329],[432,287,422],[290,250,328],[385,258,384],[446,265,342],[386,387,257],[422,424,430],[445,342,276],[422,273,424],[306,292,307],[352,366,345],[268,271,302],[358,423,371],[327,294,460],[331,279,294],[303,271,304],[436,432,427],[304,272,408],[395,394,431],[378,395,400],[296,334,299],[6,351,168],[376,352,411],[307,325,320],[285,295,336],[320,319,404],[329,330,349],[334,293,333],[366,323,447],[316,15,315],[331,358,279],[317,14,316],[8,285,9],[277,329,350],[253,374,252],[319,318,403],[351,6,419],[324,318,325],[397,367,365],[288,435,397],[278,344,439],[310,272,311],[248,195,281],[375,273,291],[175,396,199],[312,311,268],[276,283,445],[390,373,339],[295,282,296],[448,449,346],[356,264,454],[337,336,299],[337,338,151],[294,278,455],[308,292,415],[429,358,355],[265,340,372],[352,346,280],[295,442,282],[354,19,370],[285,441,295],[195,248,197],[457,440,274],[301,300,368],[417,351,465],[251,301,389],[394,395,379],[399,412,419],[410,436,322],[326,2,393],[354,370,461],[393,164,267],[268,302,12],[312,268,13],[298,293,301],[265,446,340],[280,330,425],[322,426,391],[420,429,437],[393,391,326],[344,440,438],[458,459,461],[364,434,394],[428,396,262],[274,354,457],[317,316,402],[316,315,403],[315,314,404],[314,313,405],[313,421,406],[323,366,361],[292,306,407],[306,291,408],[291,287,409],[287,432,410],[427,434,411],[372,264,383],[459,309,457],[366,352,401],[1,274,4],[418,421,262],[331,294,358],[435,433,367],[392,289,439],[328,462,326],[94,2,370],[289,305,455],[339,254,448],[359,255,446],[254,253,449],[253,252,450],[252,256,451],[256,341,452],[414,413,463],[286,441,414],[286,258,441],[258,257,442],[257,259,443],[259,260,444],[260,467,445],[309,459,250],[305,289,290],[305,290,460],[401,376,435],[309,250,392],[376,411,433],[453,341,464],[357,453,465],[343,357,412],[437,343,399],[344,360,440],[420,437,456],[360,420,363],[361,401,288],[265,372,353],[390,339,249],[339,448,255],[255,339,448]].flat(),R=[.5104879319667817,.33515610277652746,.5174233198165894,.43859300494194037,.5123749554157258,.406469448208809,.5423470318317414,.5244461464881898,.5190713584423066,.46557595014572145,.5194876372814179,.5006013351678849,.5178673148155213,.5855525898933411,.7009655416011811,.5918984371423721,.5193980515003205,.6528422343730926,.520683366060257,.689273599088192,.5248700261116028,.8232529717683792,.5099657952785492,.32301718473434454,.5088536620140076,.31080526888370513,.5081197202205658,.3013389307260514,.5072353065013886,.29900476515293123,.5073091566562653,.28442813932895666,.5065075337886811,.26649361431598667,.5061309516429902,.24778731942176818,.5031875848770142,.22179436564445493,.515326726436615,.4231037962436676,.5375777959823609,.4205444622039795,.8049442350864411,.6867966356873512,.6222659975290299,.570705144405365,.6496635556221009,.567776631116867,.6773027807474137,.5670208501815797,.7126377105712891,.5800703662633897,.5999099642038346,.5764724123477936,.674340370297432,.6495546865463258,.639536875486374,.6477413746714593,.703840109705925,.642201315164566,.7209078550338746,.6294069054722786,.7342745542526246,.5601695317029953,.6015644401311875,.18118685364723203,.7114282578229905,.598883952498436,.809715884923935,.5682615923881531,.7667155593633652,.5767241555452347,.6445030301809311,.45154162526130676,.541424173116684,.34213731765747074,.5359058856964112,.3113374251127243,.5710002213716507,.33134433805942537,.5891562283039093,.31890978991985325,.5585465461015702,.3096196609735489,.5759132236242295,.30601608335971836,.6229794204235077,.2713706839084626,.5398103773593903,.43802148282527925,.545369166135788,.46441581428051,.7616913348436356,.6473416510224344,.5914883643388749,.5243312466144563,.5945767045021058,.44076132655143746,.5964909076690674,.4544808346033096,.7225886166095734,.4498931097984314,.5443432211875916,.49703910827636727,.7029067009687424,.6777765545248986,.7391736537218094,.6677046212553979,.7836920201778412,.7359224516153335,.577455359697342,.6573990839719772,.6085408657789231,.6353888112306596,.6427326381206513,.298196165561676,.7550604224205018,.30743678390979773,.5732827365398407,.4262381809949875,.5523188143968583,.417594336271286,.6096987754106522,.29745593249797825,.6036115020513535,.2985246556997299,.7549919366836548,.6845966669917107,.592850747704506,.4273046988248826,.6501948565244675,.6762702855467797,.6582381755113602,.699515787065029,.682483646273613,.802994977235794,.768890205025673,.710366437137127,.6672395795583725,.752104974091053,.7775519520044327,.6584857258200645,.7920276552438736,.6709628927707671,.5397542297840119,.3256357330083847,.5643998861312867,.3199443298578262,.5826229482889176,.313130943775177,.5657853364944458,.42035281538963326,.606510478258133,.2980171996355057,.5952901721000672,.2918463486433029,.5999826073646546,.29865378022193906,.565356719493866,.4374908703565598,.570739108324051,.30172707617282873,.5532697021961213,.303354971408844,.532040822505951,.3026815611124039,.5385064661502839,.22311560392379765,.5377482950687409,.25083183526992797,.5373399734497071,.26933391273021695,.5351483404636384,.28629542768001554,.5317461371421814,.3004490631818772,.5704152762889863,.30009212374687194,.5761924862861634,.2931597578525544,.5817892730236054,.28451425909996036,.5862761169672013,.27445026516914367,.6169582635164261,.3500816184282303,.7930811375379563,.4456584650278092,.5136566936969758,.41420710563659674,.5836256474256516,.29897587478160864,.5893380820751191,.29504160165786747,.5458188831806183,.4063113230466843,.581692311167717,.41034119904041294,.5490593492984772,.4114610868692398,.6189475685358048,.5063568043708802,.6631498366594315,.48547921061515814,.5990702986717225,.44076220870018007,.7452016949653626,.7754116746783257,.729542288184166,.7380649703741073,.7152380675077439,.6996659177541733,.6012845069169999,.2532631474733353,.5908916622400284,.6924743655323982,.6002487272024155,.7558749470114707,.611236396431923,.817432113289833,.6991332352161408,.5705236423015594,.7608276635408402,.5389788854122162,.5859951555728913,.5837152945995332,.7452233761548996,.6138822454214097,.5740126550197602,.542653586268425,.5829357832670212,.45267452478408815,.7883433729410172,.5171645599603654,.7431249052286149,.5203535276651383,.7091684520244599,.5116798001527787,.6566549122333527,.5192352938652038,.6176983743906022,.532645167708397,.590181502699852,.5458893078565599,.5431278228759766,.5780327129364013,.7785866141319275,.4588600414991379,.7662802815437317,.614813904762268,.528258103132248,.42353384375572206,.5884005159139634,.49679056286811835,.8132390558719635,.5690749335289003,.5698921114206315,.5609081107378007,.5997681200504303,.4383326607942582,.7258545190095902,.5959577548503876,.5829301953315735,.4692867088317872,.7767194837331772,.37870833754539496,.5859857678413392,.5927838939428329,.5655010223388672,.4863545227050781,.7103684276342392,.24216726005077366,.7039464592933655,.21081999421119696,.7955554753541947,.45157338261604313,.7394011497497559,.27975760281085965,.8023439675569535,.6235768947005271,.6065513819456101,.1520459520816803,.5237656712532044,.4144193726778031,.6113508373498917,.4744607317447663,.7872020035982132,.5706054615974427,.6744208365678788,.5840893256664277,.6509357273578644,.5835042405128479,.599469143152237,.28584001839160916,.76683469414711,.4027401643991471,.5548133134841919,.11242247700691227,.6348527550697327,.15134210765361789,.6676738739013672,.17523885548114776,.5231557369232178,.758142014145851,.49590798020362853,.10746171355247497,.6282390981912613,.5856175380945206,.6072420954704285,.5888098138570785,.592762503027916,.5906054276227952,.7843813925981522,.61877524882555,.610203567147255,.6159668180346489,.6345708996057511,.625477318763733,.6599059730768204,.6266139122843744,.6838259130716324,.6209151762723923,.6978932946920395,.6127474161982536,.8138886868953705,.6332776087522507,.690067994594574,.587394626736641,.5115295231342316,.3814830261468887,.593753132224083,.3682318288087845,.5745513767004014,.43174642801284796,.5468618154525757,.38006519258022314,.5175330221652985,.6183956491947173,.6776301890611649,.20638245522975923,.6439310491085053,.1795444029569626,.5587406486272812,.13319884419441225,.7303948730230332,.25156523168087,.5936179041862488,.6020026791095734,.5595558166503907,.5354639637470247,.49903409481048583,.12705478847026824,.5986292988061905,.12926876127719883,.7810411036014557,.3901792484521866,.5526776045560837,.3004089254140854,.5582781463861466,.2904709684848786,.5625745087862015,.2769930589199066,.5656344175338746,.26021293580532073,.5736826092004776,.23544175803661344,.5897697389125824,.3026730704307556,.5960018962621689,.3050022739171982,.6013990819454194,.30801084220409397,.6334722220897675,.32613734483718876,.7345953911542893,.3890004771947861,.5586504369974137,.5622388321161271,.5686756849288941,.6147718372941018,.5835970371961594,.6114995065331459,.58382708132267,.30018893957138065,.7323651343584061,.3204736191034317,.5478970587253571,.6144195291399956,.5885591685771943,.20925473153591162,.5188342511653901,.5294416445493699,.5430448532104493,.5502454686164857,.5189176678657532,.5563708889484407,.5749752998352051,.4918947476148606,.5015926539897919,.1563655036687851,.5023517191410065,.19124654710292815,.5467969954013825,.1949619370698929,.6493796885013581,.2596786844730377,.6223085105419159,.4147812741994858,.6219283074140549,.2305004018545151,.6836527764797211,.41583852946758276,.6457133769989014,.38482945740222935,.7015091359615326,.3687519657611847,.5560723870992661,.1615346747636795,.5877480685710907,.4753766226768494,.672212439775467,.23758670270442966,.6372418433427811,.20715841531753537,.6714329898357392,.2934120523929596,.7559577107429505,.3546825754642487,.7028004407882691,.28965476036071774,.7641248583793641,.3323610144853592,.6633666038513184,.34586538851261145,.5732450067996979,.5168171036243439,.5740206122398377,.4420601803064346,.5862565368413926,.4328912365436554,.5658091634511948,.46056721985340127,.5935333251953125,.6414948242902756,.643502163887024,.6581727835536004,.6862205892801285,.6599488797783852,.71900634765625,.6517863023281099,.7387710094451905,.6366994085907935,.7436862468719483,.5870225805044174,.8067718029022217,.5102852332592012,.719052392244339,.549573050737381,.6912373930215836,.5426725524663925,.6540380597114563,.5452089506387712,.6191460520029068,.5529706466197968,.5933077514171601,.5624450343847276,.5760908752679825,.5711276936531067,.8037864595651627,.5079354095458986,.5832139283418656,.42433229863643646,.5602819353342057,.5111040878295898,.5571386992931366,.44193623840808877,.5406022548675538,.42711933732032775,.5550468444824219,.43675835609436037,.5743813246488572,.4152073520421982,.5367868125438691,.42474128484725954,.5321040332317353,.41727378547191624,.5769275009632111,.5919214832782747,.5631695121526719,.5864408034086228,.555830317735672,.5819090950489045,.7057080000638962,.6055842030048371,.7297580271959305,.614007951617241,.49450652599334716,.5258826154470444,.30584611296653746,.6040364730358123,.4885244846343994,.4224347966909409,.188004332780838,.7111089858412742,.3873521864414215,.5786778944730759,.3588928759098053,.5761974024772645,.32972376346588134,.5772378969192504,.29263614416122435,.5937507289648056,.4124107241630554,.5837435233592987,.3437161326408386,.6627882960438729,.3795058310031891,.6574259343743325,.3114838480949402,.657741964161396,.2904722273349762,.6461278694868089,.2668101370334625,.5759735572338105,.3916287899017334,.18396661460399627,.2956514835357666,.6133467811346054,.17441000342369078,.5913206297159195,.23045413494110106,.5952582108974458,.3695909559726715,.4586390632390976,.4777859032154083,.34189285218715665,.4799880862236023,.31095413148403167,.4436598002910614,.32987600147724155,.42009713053703307,.3173161882162094,.4536511182785034,.3079365211725235,.431768137216568,.30468503117561346,.37606616616249083,.27423435926437384,.49449856877326964,.4396295297145844,.4917183697223663,.4654612708091736,.2524005055427551,.6652582022547722,.4289156973361969,.5291139262914657,.4268526315689087,.44427823305130004,.42474048137664794,.45817836105823523,.2809027314186096,.46354105353355407,.49383275508880614,.49885324716567997,.3271153151988983,.6924127805233002,.28349151015281676,.6843035730719567,.22369228601455687,.7584647151827812,.4591939032077789,.6617383736371993,.40913431644439696,.6426751393079757,.35715471506118773,.30240225076675414,.1987894058227539,.3237072455883026,.4482724845409393,.42876928627491,.4697932779788971,.4196605491638184,.39104996919631957,.2959751355648041,.3971476137638092,.29665681600570676,.26748310327529906,.7016683402657509,.4251814365386963,.4304117369651795,.3845069885253906,.6860294970870018,.3804918110370636,.7099798905849457,.35481985211372374,.8164000543951988,.2475942552089691,.730037857890129,.37163846492767333,.7639490339159964,.23443256616592406,.677293357551098,.2116762578487396,.6924480664730073,.4783883273601532,.32515374898910526,.44883744716644286,.3184075164794922,.42566208839416503,.31092865943908693,.45405327081680297,.4228447753190994,.3932682454586029,.2964416819810867,.4071350872516632,.290535255074501,.40034677386283873,.29673135757446295,.4610676050186157,.44076672971248626,.4361940503120422,.3005809444189072,.45694692730903624,.30211268544197084,.4812539994716644,.30183855772018436,.46574126482009887,.22492808878421783,.47153966426849364,.25130698263645174,.4740802526473999,.2694691020250321,.4768980026245117,.28705804526805884,.48090897798538207,.2996276724338532,.43501039147377013,.2992805469036102,.4293511092662811,.2932880002260208,.4233271360397339,.28415390133857726,.41761367321014403,.27479386210441586,.39445154666900634,.3538810330629349,.16652100086212157,.4672100204229355,.4183532476425171,.29779809594154355,.41378535628318786,.29400077641010286,.47695048451423644,.40816306352615356,.43489335775375365,.41207451105117804,.473628032207489,.41300628066062933,.3975309908390045,.5133917200565339,.34924407601356505,.4949547010660172,.4189921498298645,.44448454558849343,.27738903760910033,.7946441161632538,.29866914749145507,.7549788492918015,.3170970857143402,.7143296006321906,.39919986128807067,.2556870716810226,.4517517566680908,.6986333075165749,.44375439286231994,.7623249980807305,.4346091330051422,.8250303360819817,.3058603286743164,.5830274391174317,.235262531042099,.5560186910629272,.4279192566871643,.5892863947153091,.2622906148433685,.6309370476007461,.45053591132164,.5464099961519242,.44443781971931456,.45605955004692084,.20207332372665404,.5370177584886551,.25663607120513915,.5358516681194305,.29581143260002135,.5243526387214661,.3525206625461578,.5284005987644196,.39442025423049926,.5392975616455078,.42579718232154845,.5511161494255066,.49076547026634215,.5801296907663345,.20957841277122496,.47626241028308874,.23929433822631835,.6331100556254388,.5024659812450409,.4247821944952011,.432133811712265,.5009672063589097,.15906893014907836,.5940177994966507,.4492078602313995,.5648097443580629,.41579030752182006,.4419312763214112,.2798506796360016,.6113770532608032,.44294874668121337,.47275686144828805,.1783646523952484,.3979667472839356,.42730753421783446,.5981915760040284,.46777849197387694,.4889896112680436,.26486464142799376,.2499848622083664,.26026474237442015,.21801546096801755,.17761032581329345,.47220298230648045,.23215438723564147,.29172880232334136,.1906857371330261,.6463678139448166,.3811529755592346,.1541750180721283,.5033367156982422,.41569132089614874,.40528597235679625,.4797393995523453,.2049500823020935,.59123428940773,.3344294309616089,.5942869651317597,.35825960636138915,.5929379391670226,.4015964150428772,.28595646202564245,.21618961095809935,.4194869863986969,.43316020369529723,.11274379968643189,.34098224639892577,.1526068884134293,.3026312172412872,.17882644414901733,.3831480026245117,.5945327538251877,.40483357310295104,.5966399866342544,.419615763425827,.5973996269702913,.2160478115081787,.6388220790028571,.40051244497299193,.6220169800519944,.37555851340293883,.6336345481872558,.3499592423439026,.6373451414704323,.32648445963859557,.6342222797870636,.3108482539653778,.6266552078723908,.16784127354621886,.6591027337312698,.3177972316741943,.5982361245155334,.4220952868461609,.3706905978918075,.4483287215232849,.43451813936233524,.4753179132938385,.38104525983333587,.30160035490989684,.21209139108657843,.33879016637802123,.18215490162372588,.4353105306625366,.1335425513982773,.22725783586502074,.2627154815196991,.4187734603881836,.6076370733976364,.471796441078186,.5377814787626267,.3835057199001312,.13003402531147007,.18837626576423644,.4081169712543488,.4558822691440582,.3006539422273636,.45070006251335143,.29020555198192594,.44506027102470397,.276558490395546,.441160249710083,.26132532536983494,.42807196378707885,.237567846775055,.413764613866806,.300301303267479,.40849854350090026,.3033808845281601,.40325652360916137,.3060078132152558,.3719393193721771,.3296157675981522,.2585947096347809,.4027331072092057,.4712364852428436,.5652889716625213,.4525624096393585,.6187475714087487,.43274884223937987,.6166740807890891,.4197424530982971,.2985221195220948,.25107048749923705,.3324888157844544,.48253663182258605,.6165598976612092,.40862621665000914,.21186126053333282,.4922338902950287,.5517929780483246,.4509614884853363,.49562425196170806,.45456190705299376,.19553345918655402,.3438455045223236,.2646773803234101,.39053775668144225,.41997271955013277,.3724295377731323,.2345973211526871,.32362549304962157,.42551548063755035,.3627460479736328,.39166522800922393,.2982912242412567,.37974442124366764,.44216259121894835,.16258520364761353,.4327280104160309,.47912641644477844,.31535937190055846,.24389803588390352,.35182328820228576,.2114975947141648,.3249718725681305,.3009969878196716,.22358919978141784,.36996547162532806,.2854694604873657,.29810287833213805,.2033691883087158,.34796677708625795,.3403308272361755,.35305335700511936,.4522935628890991,.520306442975998,.45397244691848754,.4453733104467393,.4360526978969574,.4358169931173325,.4670851409435272,.463337938785553,.430365788936615,.6462299782037735,.3818374752998352,.6678127396106721,.3376319885253906,.6731280717253685,.3007634162902832,.6677066612243652,.2756028652191162,.6542664083838463,.25909878611564635,.6035455572605133,.17238967418670653,.5322284626960754,.28373541235923766,.5632325726747514,.3148886442184448,.5544471430778504,.35481600761413573,.554238184094429,.39195387363433837,.5604119020700455,.4199950277805328,.5684955823421478,.4408359706401825,.5755523312091828,.1607656955718994,.5315613377094268,.43638269901275634,.4271241891384125,.4722903251647949,.513996543288231,.4744726598262787,.4443250972032547,.48785080313682555,.4292660462856293,.4740713119506836,.43900651216506964,.443528014421463,.4168834346532822,.49345849752426146,.4267724323272705,.49457465410232543,.4177086848020554,.438745903968811,.5969951617717744,.4560649275779724,.5900395292043685,.4670982837677002,.5844003933668136,.3021982192993164,.6197374525666237,.27794389724731444,.6304952013492584,.6290517628192902,.6082503873109817,.601810845732689,.608769752383232,.6309714198112488,.6319623801112175,.657788547873497,.6077486652135848,.6277183473110199,.5834045577049256,.333698707818985,.6181534442305565,.3082489252090454,.6187389704585076,.3358501076698303,.6419334176182747,.3613401234149933,.618020570576191,.33353258967399596,.5936576622724534];exports.FACE_MESH_INDICES=_;exports.FACE_MESH_UV=R;exports.RENDER_LAYERS=E;
|
|
@@ -1,62 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const { session: n } = $(), s = W(), [c, f] = Z(null), u = s0(t), o = E(t);
|
|
12
|
-
o.current = t, F(() => {
|
|
13
|
-
let l = !1;
|
|
14
|
-
return f(null), n.registry.acquire(e, s, o.current).catch((d) => {
|
|
15
|
-
l || f(d instanceof Error ? d : new Error(String(d)));
|
|
16
|
-
}), () => {
|
|
17
|
-
l = !0, n.registry.release(e, s);
|
|
18
|
-
};
|
|
19
|
-
}, [n, e, s, u]), F(() => {
|
|
20
|
-
n.registry.setActive(e, s, r);
|
|
21
|
-
}, [n, e, s, r]);
|
|
22
|
-
const h = n.store, p = q(
|
|
23
|
-
(l) => h.subscribe(l),
|
|
24
|
-
() => h.getSnapshot().pipeline.get(e) ?? null,
|
|
25
|
-
() => null
|
|
26
|
-
), A = S(() => p ? p.getModelNode() : null, [p]), i = S(() => c ? e0(c) : null, [c]);
|
|
27
|
-
return {
|
|
28
|
-
ready: p !== null && c === null,
|
|
29
|
-
node: A,
|
|
30
|
-
error: c,
|
|
31
|
-
fallback: i
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
const o0 = ({ materialProps: e, settings: t }) => t.type === "basic" ? /* @__PURE__ */ _("meshBasicMaterial", { ...e }) : /* @__PURE__ */ _(
|
|
35
|
-
"meshStandardMaterial",
|
|
36
|
-
{
|
|
37
|
-
...e,
|
|
38
|
-
roughness: t.roughness,
|
|
39
|
-
metalness: t.metalness
|
|
40
|
-
}
|
|
41
|
-
), g = 1e-6, c0 = (e) => {
|
|
42
|
-
const { x: t, y: r, z: n } = e.scale;
|
|
43
|
-
return Math.abs(t - r) <= g && Math.abs(t - n) <= g ? t : 1;
|
|
44
|
-
}, b0 = (e, t, r, n) => {
|
|
45
|
-
if (!r.enabled) return e;
|
|
46
|
-
const s = c0(r);
|
|
47
|
-
return n.x = t.x + (e.x - t.x) * s + r.position.x, n.y = t.y + (e.y - t.y) * s - r.position.y, n.z = t.z + (e.z - t.z) * s + r.position.z, n;
|
|
48
|
-
}, i0 = (e, t, r) => t0(e, t, r), T0 = (e, t, r) => {
|
|
49
|
-
const n = (e.x - 0.5) * 2, s = (0.5 - e.y) * 2, c = T.MathUtils.clamp(e.z * 2, -1, 1);
|
|
50
|
-
return r.set(n, s, c).unproject(t);
|
|
51
|
-
}, a0 = (e, t, r, n, s, c) => {
|
|
52
|
-
const f = Math.min(t, e.length);
|
|
53
|
-
for (let u = 0; u < f; u++) {
|
|
54
|
-
s(e[u], n, c);
|
|
55
|
-
const o = u * 3;
|
|
56
|
-
r[o] = c.x, r[o + 1] = c.y, r[o + 2] = c.z;
|
|
57
|
-
}
|
|
58
|
-
return f;
|
|
59
|
-
}, u0 = [
|
|
1
|
+
const E = {
|
|
2
|
+
/** Camera background and segmentation mask. `depthTest` disabled. */
|
|
3
|
+
BACKGROUND: -1e3,
|
|
4
|
+
/** Free world-space content. `depthTest` enabled. */
|
|
5
|
+
WORLD: 0,
|
|
6
|
+
/** Descendants of `FaceTracker` / `HandTracker` / `BodyTracker`. `depthTest` enabled. */
|
|
7
|
+
TRACKED: 100,
|
|
8
|
+
/** Descendants of `ScreenSpaceUI`. `depthTest` disabled. */
|
|
9
|
+
SCREEN_UI: 1e3
|
|
10
|
+
}, R = [
|
|
60
11
|
[127, 34, 139],
|
|
61
12
|
[11, 0, 37],
|
|
62
13
|
[232, 231, 120],
|
|
@@ -910,7 +861,7 @@ const o0 = ({ materialProps: e, settings: t }) => t.type === "basic" ? /* @__PUR
|
|
|
910
861
|
[390, 339, 249],
|
|
911
862
|
[339, 448, 255],
|
|
912
863
|
[255, 339, 448]
|
|
913
|
-
].flat(),
|
|
864
|
+
].flat(), s = [
|
|
914
865
|
0.5104879319667817,
|
|
915
866
|
0.33515610277652746,
|
|
916
867
|
0.5174233198165894,
|
|
@@ -1867,194 +1818,9 @@ const o0 = ({ materialProps: e, settings: t }) => t.type === "basic" ? /* @__PUR
|
|
|
1867
1818
|
0.618020570576191,
|
|
1868
1819
|
0.33353258967399596,
|
|
1869
1820
|
0.5936576622724534
|
|
1870
|
-
]
|
|
1871
|
-
type: "standard",
|
|
1872
|
-
color: "#ffffff",
|
|
1873
|
-
opacity: 1,
|
|
1874
|
-
wireframe: !1,
|
|
1875
|
-
roughness: 1,
|
|
1876
|
-
metalness: 0
|
|
1877
|
-
}, j = ({
|
|
1878
|
-
material: e,
|
|
1879
|
-
faceIndex: t = 0,
|
|
1880
|
-
numFaces: r,
|
|
1881
|
-
visible: n = !0,
|
|
1882
|
-
children: s
|
|
1883
|
-
}) => {
|
|
1884
|
-
const { ready: c, node: f } = H(
|
|
1885
|
-
P.FACE_TRACKER,
|
|
1886
|
-
r === void 0 ? void 0 : { numFaces: r }
|
|
1887
|
-
), { camera: u } = w(), o = E(null), h = E(null), p = E(null), A = E(null), i = E(null), l = E(new T.Vector3()), d = S(() => {
|
|
1888
|
-
const m = new Uint16Array(u0), M = new T.BufferAttribute(m, 1), y = new T.Float32BufferAttribute(l0, 2), R = new Float32Array(f0), a = new T.Float32BufferAttribute(R, 3);
|
|
1889
|
-
return a.setUsage(T.DynamicDrawUsage), { indexAttr: M, uvAttr: y, positionAttr: a, positions: R };
|
|
1890
|
-
}, []);
|
|
1891
|
-
F(() => {
|
|
1892
|
-
A.current = d.indexAttr, i.current = d.uvAttr, p.current = d.positionAttr, h.current = d.positions;
|
|
1893
|
-
const m = o.current;
|
|
1894
|
-
if (m) {
|
|
1895
|
-
const M = m.geometry;
|
|
1896
|
-
M.setAttribute("position", d.positionAttr), M.setAttribute("uv", d.uvAttr), M.setIndex(d.indexAttr);
|
|
1897
|
-
}
|
|
1898
|
-
return () => {
|
|
1899
|
-
A.current = null, i.current = null, p.current = null, h.current = null;
|
|
1900
|
-
};
|
|
1901
|
-
}, [d]), U(() => {
|
|
1902
|
-
var x;
|
|
1903
|
-
if (!c || !f || !o.current) return;
|
|
1904
|
-
const { detectionResults: m } = f, M = (x = m == null ? void 0 : m.faceLandmarks) == null ? void 0 : x[t], y = o.current.geometry, R = h.current, a = p.current;
|
|
1905
|
-
if (!M || M.length === 0 || !R || !a) {
|
|
1906
|
-
y.drawRange.count !== 0 && y.setDrawRange(0, 0);
|
|
1907
|
-
return;
|
|
1908
|
-
}
|
|
1909
|
-
y.getAttribute("position") !== a && (y.setAttribute("position", a), y.setAttribute("uv", i.current), y.setIndex(A.current)), y.drawRange.count === 0 && y.setDrawRange(0, 1 / 0), a0(
|
|
1910
|
-
M,
|
|
1911
|
-
K,
|
|
1912
|
-
R,
|
|
1913
|
-
u,
|
|
1914
|
-
i0,
|
|
1915
|
-
l.current
|
|
1916
|
-
), a.needsUpdate = !0, y.computeVertexNormals();
|
|
1917
|
-
});
|
|
1918
|
-
const v = s != null && s !== !1;
|
|
1919
|
-
return /* @__PURE__ */ D("mesh", { material: e, ref: o, visible: n, children: [
|
|
1920
|
-
/* @__PURE__ */ _("bufferGeometry", {}),
|
|
1921
|
-
!e && !v && /* @__PURE__ */ _(
|
|
1922
|
-
o0,
|
|
1923
|
-
{
|
|
1924
|
-
settings: d0,
|
|
1925
|
-
materialProps: {
|
|
1926
|
-
attach: "material",
|
|
1927
|
-
transparent: !0,
|
|
1928
|
-
depthWrite: !1,
|
|
1929
|
-
side: T.DoubleSide,
|
|
1930
|
-
needsUpdate: !0
|
|
1931
|
-
}
|
|
1932
|
-
}
|
|
1933
|
-
),
|
|
1934
|
-
!e && v ? s : null
|
|
1935
|
-
] });
|
|
1936
|
-
};
|
|
1937
|
-
j.displayName = "FaceMesh";
|
|
1938
|
-
const _0 = (e, t, r) => !!(r && r > 0 && e - t < 1 / r), L = {
|
|
1939
|
-
"face.forehead": 10,
|
|
1940
|
-
"face.noseTip": 1,
|
|
1941
|
-
"face.chin": 152,
|
|
1942
|
-
"face.leftEyeOuter": 263,
|
|
1943
|
-
"face.rightEyeOuter": 33,
|
|
1944
|
-
"face.leftCheek": 425,
|
|
1945
|
-
"face.rightCheek": 205,
|
|
1946
|
-
"face.mouthCenter": 13,
|
|
1947
|
-
"face.leftEarlobe": 454,
|
|
1948
|
-
"face.rightEarlobe": 234
|
|
1949
|
-
}, y0 = {
|
|
1950
|
-
"face.center": [10, 152, 234, 454],
|
|
1951
|
-
"face.leftEye": [263, 362, 387, 373],
|
|
1952
|
-
"face.rightEye": [33, 133, 158, 145]
|
|
1953
|
-
}, V = (e, t = 0) => Number.isFinite(e) ? e : t, k = (e) => Math.max(-1, Math.min(1, V(e))), h0 = { x: 0, y: 0, z: 0 }, p0 = (e, t, r = h0, n = { x: 0, y: 0, z: 0, visibility: 0 }) => {
|
|
1954
|
-
const s = L[e];
|
|
1955
|
-
if (s !== void 0) {
|
|
1956
|
-
const i = t[s];
|
|
1957
|
-
return i ? Object.assign(n, i) : null;
|
|
1958
|
-
}
|
|
1959
|
-
const c = y0[e];
|
|
1960
|
-
if (c) {
|
|
1961
|
-
n.x = 0, n.y = 0, n.z = 0;
|
|
1962
|
-
for (const i of c) {
|
|
1963
|
-
const l = t[i];
|
|
1964
|
-
if (!l) return null;
|
|
1965
|
-
n.x += l.x, n.y += l.y, n.z += l.z;
|
|
1966
|
-
}
|
|
1967
|
-
return n.x /= c.length, n.y /= c.length, n.z /= c.length, n.visibility = 1, n;
|
|
1968
|
-
}
|
|
1969
|
-
if (e !== "face.custom" || t.length === 0) return null;
|
|
1970
|
-
let f = 1 / 0, u = 1 / 0, o = -1 / 0, h = -1 / 0, p = 0;
|
|
1971
|
-
for (const i of t)
|
|
1972
|
-
f = Math.min(f, i.x), u = Math.min(u, i.y), o = Math.max(o, i.x), h = Math.max(h, i.y), p += i.z;
|
|
1973
|
-
const A = o - f;
|
|
1974
|
-
return n.x = (f + o) * 0.5 - k(r.x) * A * 0.5, n.y = (u + h) * 0.5 - k(r.y) * (h - u) * 0.5, n.z = p / t.length - V(r.z) * A, n.visibility = 1, n;
|
|
1975
|
-
}, S0 = {
|
|
1976
|
-
left: L["face.leftEyeOuter"],
|
|
1977
|
-
right: L["face.rightEyeOuter"]
|
|
1978
|
-
}, X = J(null), v0 = () => G(X), A0 = ({
|
|
1979
|
-
faceIndex: e = 0,
|
|
1980
|
-
numFaces: t,
|
|
1981
|
-
scaleWithFace: r = !1,
|
|
1982
|
-
followFaceRoll: n = !0,
|
|
1983
|
-
targetFps: s,
|
|
1984
|
-
active: c = !0,
|
|
1985
|
-
children: f
|
|
1986
|
-
}) => {
|
|
1987
|
-
const u = E(!1), o = E(null), h = S(() => {
|
|
1988
|
-
if (!(t === void 0 && s === void 0))
|
|
1989
|
-
return {
|
|
1990
|
-
...t === void 0 ? {} : { numFaces: t },
|
|
1991
|
-
...s === void 0 ? {} : { targetFps: s }
|
|
1992
|
-
};
|
|
1993
|
-
}, [t, s]), { ready: p, node: A } = H(
|
|
1994
|
-
P.FACE_TRACKER,
|
|
1995
|
-
h,
|
|
1996
|
-
c
|
|
1997
|
-
), { camera: i } = w(), l = E(i);
|
|
1998
|
-
l.current !== i && (l.current = i, u.current = !1);
|
|
1999
|
-
const d = E(null), v = E({ x: 0, y: 0, z: 0, visibility: 0 });
|
|
2000
|
-
U(() => {
|
|
2001
|
-
if (!p || !A || !o.current) return;
|
|
2002
|
-
d.current = A, !u.current && l.current && (A.setCamera(l.current, e), u.current = !0);
|
|
2003
|
-
const a = A.getFace(e);
|
|
2004
|
-
if (!a) {
|
|
2005
|
-
o.current.visible = !1;
|
|
2006
|
-
return;
|
|
2007
|
-
}
|
|
2008
|
-
o.current.visible = !0;
|
|
2009
|
-
const { position: x, rotation: C, scale: b } = a.transform;
|
|
2010
|
-
o.current.position.set(x.x, x.y, x.z), o.current.rotation.set(C.x, C.y, n ? C.z : 0), r ? o.current.scale.set(b.x, b.y, b.z) : o.current.scale.set(1, 1, 1);
|
|
2011
|
-
});
|
|
2012
|
-
const m = Q(
|
|
2013
|
-
(a, x) => {
|
|
2014
|
-
var O, I;
|
|
2015
|
-
const C = d.current, b = (I = (O = C == null ? void 0 : C.detectionResults) == null ? void 0 : O.faceLandmarks) == null ? void 0 : I[e];
|
|
2016
|
-
if (!b || b.length === 0) return null;
|
|
2017
|
-
const N = p0(
|
|
2018
|
-
a,
|
|
2019
|
-
b,
|
|
2020
|
-
x,
|
|
2021
|
-
v.current
|
|
2022
|
-
);
|
|
2023
|
-
return N ? { position: n0(N, l.current) } : null;
|
|
2024
|
-
},
|
|
2025
|
-
[e]
|
|
2026
|
-
), M = S(
|
|
2027
|
-
() => ({ type: "face", resolveLandmark: m }),
|
|
2028
|
-
[m]
|
|
2029
|
-
);
|
|
2030
|
-
let y;
|
|
2031
|
-
const R = [];
|
|
2032
|
-
return z.Children.forEach(f, (a) => {
|
|
2033
|
-
var x, C;
|
|
2034
|
-
z.isValidElement(a) && // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2035
|
-
(((x = a.type) == null ? void 0 : x.displayName) === "FaceTracker.Mesh" || // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2036
|
-
((C = a.type) == null ? void 0 : C.displayName) === "FaceMesh") ? y = z.cloneElement(a, { faceIndex: e, numFaces: t }) : R.push(a);
|
|
2037
|
-
}), /* @__PURE__ */ D(X.Provider, { value: M, children: [
|
|
2038
|
-
/* @__PURE__ */ _("group", { ref: o, renderOrder: r0.TRACKED, children: R }),
|
|
2039
|
-
y
|
|
2040
|
-
] });
|
|
2041
|
-
}, B = (e) => /* @__PURE__ */ _(j, { ...e });
|
|
2042
|
-
B.displayName = "FaceTracker.Mesh";
|
|
2043
|
-
const Y = A0;
|
|
2044
|
-
Y.Mesh = B;
|
|
2045
|
-
const z0 = Y;
|
|
1821
|
+
];
|
|
2046
1822
|
export {
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
X as T,
|
|
2051
|
-
v0 as a,
|
|
2052
|
-
Y as b,
|
|
2053
|
-
j as c,
|
|
2054
|
-
L as d,
|
|
2055
|
-
T0 as p,
|
|
2056
|
-
p0 as r,
|
|
2057
|
-
_0 as s,
|
|
2058
|
-
b0 as t,
|
|
2059
|
-
H as u
|
|
1823
|
+
R as F,
|
|
1824
|
+
E as R,
|
|
1825
|
+
s as a
|
|
2060
1826
|
};
|
|
@@ -31,10 +31,9 @@ The XR SDK (`@vincentt-xr/sdk`) is a WebAR SDK that provides AI-powered tracking
|
|
|
31
31
|
Source of truth: `example/src/navigation/routes.tsx`. This list is a readable summary only.
|
|
32
32
|
|
|
33
33
|
- `/unified-architecture`: debug-ui scene editor composition for face tracking
|
|
34
|
-
- `/
|
|
34
|
+
- `/face-mesh?faces=two`: multi-face face-mesh sanity example
|
|
35
35
|
- `/body`: visible body-tracking anchors
|
|
36
36
|
- `/debugger`: debugger overlay and metrics example
|
|
37
|
-
- `/viewport-editor`: reusable 3D scene editor fixture
|
|
38
37
|
- `/face-retouch-legacy`: legacy face-retouch shader settings example
|
|
39
38
|
|
|
40
39
|
## Installation
|
|
@@ -92,7 +92,7 @@ controllers.
|
|
|
92
92
|
|
|
93
93
|
## Manual validation
|
|
94
94
|
|
|
95
|
-
Run `/
|
|
95
|
+
Run `/session-health`, quality section (budget tightened: 2 bad samples, 3 s cooldown):
|
|
96
96
|
|
|
97
97
|
| Case | Steps | Expect |
|
|
98
98
|
| ----------- | --------------------------- | ----------------------------------------------------------------- |
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Body Instructions"
|
|
3
|
+
description: "Ask for a body pose (arms, thumbs, squat, lean, one leg, star) with a 3D hint figure and your own copy, detect it from the pose landmarks, and complete when it is held."
|
|
4
|
+
sidebarTitle: "Body Instructions"
|
|
5
|
+
icon: "person"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
`BodyInstruction` asks the person for a body pose and waits for it. A translucent 3D figure loops from
|
|
9
|
+
standing into the pose, your copy sits under it, and holding the pose for `holdMs` completes it. It is
|
|
10
|
+
the body member of the instruction family, with the same layout and feedback as
|
|
11
|
+
[Hand Instructions](/api/hand-instructions) and [Face Instructions](/api/face-instructions). The
|
|
12
|
+
pieces underneath are exported too: `useBodyPose` (the detection alone) and `BodyPoseHint` (the figure
|
|
13
|
+
alone).
|
|
14
|
+
|
|
15
|
+
Import from `@vincentt-xr/sdk/instructions`. Everything is customisable: your own poses and
|
|
16
|
+
figure, detection logic, thresholds, hint look and motion, text style, or a fully custom prompt. See
|
|
17
|
+
[Instructions](/api/instructions).
|
|
18
|
+
|
|
19
|
+
## Quick start
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { useLoader } from "@react-three/fiber";
|
|
23
|
+
import { MeshoptDecoder } from "three/examples/jsm/libs/meshopt_decoder.module.js";
|
|
24
|
+
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js";
|
|
25
|
+
import { BodyInstruction } from "@vincentt-xr/sdk/instructions";
|
|
26
|
+
|
|
27
|
+
const ArmsUpToStart = ({ onStart }: { onStart: () => void }) => {
|
|
28
|
+
// A Mixamo-rig figure with one clip per pose plus "idle", meshopt-compressed.
|
|
29
|
+
const figure = useLoader(GLTFLoader, figureUrl, (loader) =>
|
|
30
|
+
loader.setMeshoptDecoder(MeshoptDecoder),
|
|
31
|
+
);
|
|
32
|
+
return (
|
|
33
|
+
<BodyInstruction
|
|
34
|
+
pose="hooray"
|
|
35
|
+
text="Arms up to start"
|
|
36
|
+
model={figure.scene}
|
|
37
|
+
poses={figure.animations}
|
|
38
|
+
onComplete={onStart}
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Mount it inside `XRScene`. It acquires the body model itself, so you don't need a `BodyTracker`, and
|
|
45
|
+
draws over the AR content in its own screen-space layer (`BODY_INSTRUCTION_RENDER_ORDER` =
|
|
46
|
+
`INSTRUCTION_RENDER_ORDER` = 2000 and up).
|
|
47
|
+
|
|
48
|
+
**Left and right** are the person's own sides on every camera. MediaPipe's pose labels follow the image
|
|
49
|
+
as given, so on the mirrored webcam they name the opposite side; the detector swaps them. On that feed
|
|
50
|
+
the figure is also drawn mirrored, so "raise your left arm" shows the raised arm on the same screen side
|
|
51
|
+
as the person's real left arm.
|
|
52
|
+
|
|
53
|
+
## `BodyInstruction`
|
|
54
|
+
|
|
55
|
+
| Prop | Default | What it does |
|
|
56
|
+
| ---------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
57
|
+
| `pose` | — | What to ask for: a `BODY_POSES` name or your own `defineBodyPose(…)`. A new value is a new prompt. |
|
|
58
|
+
| `model` | — | The hint figure: a skinned Mixamo-rig character facing +Z. |
|
|
59
|
+
| `poses` | — | The figure's clips: one per pose (named like `BODY_POSES[name].hint.clip`) plus `idle`. |
|
|
60
|
+
| `idleClip` | `"idle"` | The rest clip the hint loops from. |
|
|
61
|
+
| `text` | the pose's `label` | Your copy, in any language. Long text shrinks to fit. |
|
|
62
|
+
| `doneText` | keep `text` | Copy shown once completed, while it fades out. |
|
|
63
|
+
| `nudgeText` | `"Step back so your upper body is in view"` | Second line after `nudgeAfterMs` out of view. Leg poses default to "…whole body…". `null` turns it off. |
|
|
64
|
+
| `nudgeAfterMs` | `3000` | How long before the nudge. |
|
|
65
|
+
| `bodyIndex` | `0` | Which detected body to read. |
|
|
66
|
+
| `holdMs` | `400` | How long the pose must be held. |
|
|
67
|
+
| `graceMs` | `150` | Dropouts shorter than this don't restart the hold. |
|
|
68
|
+
| `limits` | — | Classifier thresholds to override for this prompt (see `BODY_SHAPE_LIMITS`). |
|
|
69
|
+
| `size` | `"md"` | `"sm"`, `"md"`, `"lg"`, or a fraction of the screen height. |
|
|
70
|
+
| `symbolAspect` | `2.1` | The figure's slot height × the hand / face slot (it stands tall). |
|
|
71
|
+
| `placement` | `"center"` | `"top"`, `"center"` or `"bottom"`. |
|
|
72
|
+
| `offset` | `[0, 0]` | Shift from the placement, in half-screens. |
|
|
73
|
+
| `orbit` | `25` | The figure's auto orbit, degrees to each side. `0` holds it still. |
|
|
74
|
+
| `look` | `BODY_HINT_LOOK` | The figure's look, merged over the default: ghost, part tints, halo, glow, highlight, material. |
|
|
75
|
+
| `loop` | `BODY_HINT_LOOP` | The figure's loop: `seconds`, `hold`, `from`, `easing`. |
|
|
76
|
+
| `boneSide` | Mixamo names | Which arm a bone belongs to, for the highlight (another rig's naming). |
|
|
77
|
+
| `legBoneSide` | Mixamo names | Which leg a bone belongs to, for the highlight. |
|
|
78
|
+
| `color` | `"#ffffff"` | Text colour, with a soft dark shadow so it reads on any camera feed. |
|
|
79
|
+
| `textStyle` … | — | `textStyle`, `nudgeTextStyle`, `renderText`, `motion`, `layout`: see [Instructions](/api/instructions). |
|
|
80
|
+
| `onComplete` | — | Called once when the pose is held long enough. |
|
|
81
|
+
| `onStatusChange` | — | Called once with the first status, then on every change (`"waiting"` = not in view). |
|
|
82
|
+
| `hideOnComplete` | `true` | Fade out after completing. A small pop and a white ring play either way. |
|
|
83
|
+
| `active` | `true` | `false` hides it and pauses detection. |
|
|
84
|
+
|
|
85
|
+
## Poses
|
|
86
|
+
|
|
87
|
+
| Name | Default copy | Recognised when |
|
|
88
|
+
| -------------- | -------------------- | ------------------------------------------------------- |
|
|
89
|
+
| `hooray` | Raise both arms | both arms `raised` |
|
|
90
|
+
| `handsUp` | Hands up | alias of `hooray` (the same rule and hint) |
|
|
91
|
+
| `tPose` | Make a T-pose | both arms `out` |
|
|
92
|
+
| `raiseLeft` | Raise your left arm | left arm `raised`; right arm `down`, `other` or `onHip` |
|
|
93
|
+
| `raiseRight` | Raise your right arm | right arm `raised`; left arm `down`, `other` or `onHip` |
|
|
94
|
+
| `handsOnHips` | Hands on your hips | both arms `onHip` |
|
|
95
|
+
| `armsCrossed` | Cross your arms | both arms `crossed` |
|
|
96
|
+
| `handsOnHead` | Hands on your head | both arms `onHead` |
|
|
97
|
+
| `thumbUp` | Give a thumbs up | either arm `thumbUp` (the hint shows the right hand) |
|
|
98
|
+
| `bothThumbsUp` | Two thumbs up | both arms `thumbUp` |
|
|
99
|
+
| `salute` | Salute | right arm `onHead`; left arm `down`, `other` or `onHip` |
|
|
100
|
+
|
|
101
|
+
| `squat` | Squat down | hips low over both feet (`squat`) |
|
|
102
|
+
| `leanLeft` | Lean to your left | the torso tilts toward your left (`lean: "left"`) |
|
|
103
|
+
| `leanRight` | Lean to your right | the torso tilts toward your right (`lean: "right"`) |
|
|
104
|
+
| `oneLeg` | Stand on one leg | one leg `raised`, the other `down` (either leg) |
|
|
105
|
+
| `star` | Make a star | feet spread wide and both arms `raised` or `out` |
|
|
106
|
+
|
|
107
|
+
Two thumbs up also answers a `thumbUp` prompt, a star answers `hooray`, and `handsUp` and `hooray`
|
|
108
|
+
answer each other. A salute and one hand on the
|
|
109
|
+
head look the same to the pose model. `raiseLeft` / `raiseRight` need you upright, so a side bend
|
|
110
|
+
with the far arm over the head is a lean, not a raise.
|
|
111
|
+
|
|
112
|
+
**The leg poses need the whole body in view**: hips, knees and ankles (`BODY_POSES[name].view` is
|
|
113
|
+
`"full"`). For them `BodyInstruction` waits for the whole body and nudges with
|
|
114
|
+
`BODY_INSTRUCTION_FULL_NUDGE_TEXT`, "Step back so your whole body is in view".
|
|
115
|
+
|
|
116
|
+
Each arm gets one state, measured in shoulder widths so distance from the camera doesn't matter:
|
|
117
|
+
|
|
118
|
+
- **`raised`**: the wrist is at least 0.75 shoulder widths above its shoulder, at any angle. A real full
|
|
119
|
+
raise leans forward, keeps a soft elbow and turns the arm outward; none of that is required to be
|
|
120
|
+
straight.
|
|
121
|
+
- **`out`**: level with the shoulder (within 0.5), reaching at least 0.9 out, elbow nearly straight.
|
|
122
|
+
- **`onHead`**: the wrist is up near the nose (not reaching far above it), elbow bent.
|
|
123
|
+
- **`onHip`**: the wrist is at the waist, above the hip line, with the elbow well out. Hands in front
|
|
124
|
+
pockets sit on the hip line with the elbows in, so they don't count.
|
|
125
|
+
- **`thumbUp`**: a fist held up in front of its own side (elbow bent, the wrist between belly and
|
|
126
|
+
shoulder height), the thumb point clearly above the index and pinky knuckles and the wrist. It reads
|
|
127
|
+
MediaPipe's hand points on the pose (thumb, index, pinky), which must be visible.
|
|
128
|
+
- **`crossed`**: the wrist is past the body's midline at chest or belly height.
|
|
129
|
+
- **`down`**: the wrist is well below the shoulder.
|
|
130
|
+
- **`other`**: anything else, such as a half raise or a reach forward.
|
|
131
|
+
|
|
132
|
+
With the lower body in view, each leg gets a state too, and the body some whole-body readings:
|
|
133
|
+
|
|
134
|
+
- **Leg `raised`**: the knee lifted to near hip height (no more than 0.6 below it) and the foot at least
|
|
135
|
+
0.4 above the other one, off the ground.
|
|
136
|
+
- **Leg `down`**: standing, the knee at least 0.8 below the hip. Anything else is `other` (a squat's
|
|
137
|
+
bent knees, a step).
|
|
138
|
+
- **`squat`**: the hips at most 1.65 shoulder widths above the ankles, with both feet down. Standing
|
|
139
|
+
reads about 2.2, a deep squat about 1.1, so a half squat counts.
|
|
140
|
+
- **`lean`**: the hips → shoulders line tilted at least 8° from upright, toward the person's own left
|
|
141
|
+
or right on either camera. It needs only the hips and shoulders.
|
|
142
|
+
- **`wideStance`**: the ankles at least 1.4 shoulder widths apart, both feet down. Standing reads
|
|
143
|
+
about 0.5.
|
|
144
|
+
|
|
145
|
+
The default thresholds are `BODY_SHAPE_LIMITS` (read-only); override them per call with
|
|
146
|
+
`analyzeBodyShape(landmarks, { limits })` or the `limits` prop / option.
|
|
147
|
+
|
|
148
|
+
## Detection only: `useBodyPose`
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
import { useBodyPose } from "@vincentt-xr/sdk/instructions";
|
|
152
|
+
|
|
153
|
+
const { status, holdRef, matchedRef, shapeRef, isInView, reset } = useBodyPose("raiseRight", {
|
|
154
|
+
holdMs: 400,
|
|
155
|
+
onComplete: () => next(),
|
|
156
|
+
});
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
`status` (`"waiting"` → `"holding"` → `"done"`) re-renders only when it changes. Read
|
|
160
|
+
`holdRef.current.progress` and `shapeRef.current` (the latest `BodyShape`, or `null`) in `useFrame`. A
|
|
161
|
+
pose only counts while the upper body (nose, shoulders, elbows, wrists) is visible.
|
|
162
|
+
|
|
163
|
+
The result is an `InstructionDetector`, so it can drive a custom `<Instruction>`. A rule names a
|
|
164
|
+
state per arm or leg (an array accepts any of them), plus `lean` (`"left"`, `"right"` or `"none"`),
|
|
165
|
+
`squat` and `wideStance`; `anyOf` passes when one of its rules does. A rule that names the legs,
|
|
166
|
+
`squat` or `wideStance` needs the lower body in view. A definition with `view: "full"` makes
|
|
167
|
+
`isInView` wait for the whole body; that sets the `"waiting"` status and the nudge, while completion
|
|
168
|
+
needs only the rule. The leans read just the hips and shoulders, so a waist-up lean still completes,
|
|
169
|
+
but their prompts ask for the whole body. A match function reads the measurements; a definition works too:
|
|
170
|
+
|
|
171
|
+
```tsx
|
|
172
|
+
useBodyPose({ arms: { left: "raised", right: ["down", "onHip"] } });
|
|
173
|
+
useBodyPose({ squat: true, arms: { left: "out", right: "out" } }); // squat with arms out
|
|
174
|
+
useBodyPose({ legs: { left: "raised" }, lean: "none" }); // left knee up, standing tall
|
|
175
|
+
useBodyPose({ anyOf: [{ arms: { left: "out" } }, { arms: { right: "out" } }] }); // either arm out
|
|
176
|
+
useBodyPose((shape) => shape.arms.left.up > 1.2); // reach really high
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
The classifier is pure: `analyzeBodyShape(landmarks, { mirrored, visibility, aspect })` reads the
|
|
180
|
+
body tracker's `getLandmarks2D()` points and returns a `BodyShape`. Pass `aspect`, the tracked frame's
|
|
181
|
+
width ÷ height (`useXRFeedAspect()` from `@vincentt-xr/sdk/low-level`): tracker x and y each span the
|
|
182
|
+
frame, so the landmarks are first scaled to square units (`squareLandmarks`) and every pose reads
|
|
183
|
+
the same on portrait, landscape and square frames. Without it (default 1) a 9:16 portrait frame reads
|
|
184
|
+
a person standing upright as a squat. `useBodyPose` and `BodyInstruction` pass it themselves. The
|
|
185
|
+
shape:
|
|
186
|
+
|
|
187
|
+
- `arms.left` and `arms.right`, each with `state`, `up`, `out`, `bend`, `elbowOut`, `aboveHip` and
|
|
188
|
+
`thumbLift`;
|
|
189
|
+
- `legs.left` and `legs.right` (or `null` without the lower body), each with `state`, `kneeLift`,
|
|
190
|
+
`ankleLift` and `bend`;
|
|
191
|
+
- `lean` (degrees, + toward the person's left) and `leanSide`, `hipHeight`, `stance`, `squat` and
|
|
192
|
+
`wideStance`;
|
|
193
|
+
- `shoulderWidth`;
|
|
194
|
+
- `upperBodyVisible`, `hipsVisible` and `lowerBodyVisible`.
|
|
195
|
+
|
|
196
|
+
`matchBodyPose(shape, nameOrRule)` tests one pose; `matchingBodyPoses(shape)` lists every pose that
|
|
197
|
+
matches. The body tracker's node now also exposes `getVisibility(bodyIndex)`, MediaPipe's per-landmark
|
|
198
|
+
visibility from 0 to 1.
|
|
199
|
+
|
|
200
|
+
## The hint figure: `BodyPoseHint`
|
|
201
|
+
|
|
202
|
+
```tsx
|
|
203
|
+
<BodyPoseHint pose="tPose" model={figure.scene} poses={figure.animations} height={0.8} />
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
The figure alone, fitted to `height` over its loop and orbit. It blends every bone from the `idle` clip
|
|
207
|
+
into the pose's clip and back. The default look:
|
|
208
|
+
|
|
209
|
+
- **Ghost:** translucent white, with the material named `joints` tinted blue-grey.
|
|
210
|
+
- **Highlight:** the arms and legs that make the pose are drawn brighter (`highlight`).
|
|
211
|
+
- **Whole-body moves:** a clip can move the hips as well as turn the bones (`Hips.position`), so the
|
|
212
|
+
squat sinks and the star widens its stance.
|
|
213
|
+
- **Halo and glow:** a soft dark halo (`look.halo`) and a soft light from behind (`look.glow`).
|
|
214
|
+
- **Orbit:** a slow ±25° side-to-side turn (`orbit`, `orbitSeconds`).
|
|
215
|
+
- **Mirroring:** `mirrored` draws it like a mirror image; `BodyInstruction` passes the session's
|
|
216
|
+
mirroring.
|
|
217
|
+
|
|
218
|
+
`look` is merged over `BODY_HINT_LOOK` and `loop` over `BODY_HINT_LOOP`. Any skinned character facing
|
|
219
|
+
+Z works: name its rest clip with `idleClip`, its pose clips in your definitions' `hint.clip`, and,
|
|
220
|
+
if it isn't a Mixamo rig, map its arm bones with `boneSide` for the highlight. A missing clip leaves
|
|
221
|
+
the figure in its rest pose and logs a warning once, naming the clip and the clips the model has.
|
|
222
|
+
Models without vertex colours, like Y Bot, are handled automatically.
|
|
223
|
+
|
|
224
|
+
## The example figure
|
|
225
|
+
|
|
226
|
+
`ybot.glb`:
|
|
227
|
+
|
|
228
|
+
- **Character:** "Y Bot" by Mixamo (Adobe), from the Sketchfab model "Y Bot" by Moises D Sanabria
|
|
229
|
+
(CC BY 4.0), using Kiev's (KinderKiev) upload "Y Bot from mixamo".
|
|
230
|
+
- **Edits:** cleaned up to centimetres, with plain Mixamo bone names and the non-hand parts reduced.
|
|
231
|
+
- **Poses:** authored in Blender (`assets-src/bodies/`).
|
|
232
|
+
- **Size:** ~410 KB with meshopt (~155 KB gzipped; most of the growth is per-clip animation metadata,
|
|
233
|
+
which gzips well).
|
|
234
|
+
|
|
235
|
+
It keeps all 68 bones, including every finger joint and fingertip. The finger chain maps one-to-one onto
|
|
236
|
+
MediaPipe's 21 hand landmarks, so a future driver can pose its fingers from hand tracking; the mapping
|
|
237
|
+
is in `assets-src/bodies/README.md`.
|
|
238
|
+
|
|
239
|
+
<Note>
|
|
240
|
+
The GLB lives only in the example app. Adobe's Mixamo terms allow Mixamo characters inside your
|
|
241
|
+
projects but not redistributing the raw asset, and the npm package ships only `dist/` and
|
|
242
|
+
`GROUNDING.md`. Load your own figure.
|
|
243
|
+
</Note>
|
|
244
|
+
|
|
245
|
+
## Example
|
|
246
|
+
|
|
247
|
+
`/body-instructions` covers:
|
|
248
|
+
|
|
249
|
+
- every pose as a chip, and a sequence mode that moves to the next pose when one completes;
|
|
250
|
+
- text, nudge, size, placement and hold-time controls;
|
|
251
|
+
- a live readout of each arm's state and measurements, whether the upper body and hips are in view, and
|
|
252
|
+
the matching poses.
|
|
253
|
+
|
|
254
|
+
Local clips in the git-ignored `example/src/assets/media/local/` are listed first.
|
|
255
|
+
|
|
256
|
+
## Manual visual test plan
|
|
257
|
+
|
|
258
|
+
Open `/body-instructions`.
|
|
259
|
+
|
|
260
|
+
1. **Every hint reads**: step through the fifteen chips. The figure moves from standing into each pose
|
|
261
|
+
and back, the posing arms brighter. Raised arms turn outward (palms toward the head). Hands sit on
|
|
262
|
+
the waist, on the head, or tuck around the other arm, and the fingers rest naturally. The thumbs-up
|
|
263
|
+
fists stand clear of the body with the thumb straight up; the salute's flat hand is at the brow.
|
|
264
|
+
The squat sinks with flat feet, the leans bend toward the named side (on the mirrored webcam, the
|
|
265
|
+
same screen side as yours), one leg lifts the right knee, and the star spreads arms and legs; the
|
|
266
|
+
legs that make the pose are brighter.
|
|
267
|
+
2. **Size and look**: the figure fills a tall slot above the copy and stays inside it through the
|
|
268
|
+
orbit. The ghost is white (not grey), with tinted joints, a halo and a back-glow.
|
|
269
|
+
3. **Detection on the webcam**: stand back until the readout says upper body in view, then make each
|
|
270
|
+
pose. The readout's matches list it and the status goes `holding` → `done`. Hands in pockets don't
|
|
271
|
+
count as hands on hips, and a half raise isn't a raise. A thumbs up works with either hand (watch
|
|
272
|
+
`thumb` in the readout climb above ~0.1); a thumb to the side or an open hand doesn't count.
|
|
273
|
+
For the leg poses, step back until the readout says legs in view: a half squat reads `squat`
|
|
274
|
+
(hip height under 1.65), a lean of about 10° reads the side, a knee lift on either leg is one leg,
|
|
275
|
+
and a wide stance with arms up is a star.
|
|
276
|
+
4. **Left and right**: on the mirrored webcam, raise your own left arm for "raise your left arm". The
|
|
277
|
+
figure's raised arm is on the same screen side as yours, and it completes. Raising the right arm
|
|
278
|
+
doesn't.
|
|
279
|
+
5. **Unmirrored source** (a video, image or rear camera): the person's left arm still counts as left.
|
|
280
|
+
6. **Nudge**: step out of frame, or so your wrists are cut off, for 3 s. "Step back so your upper body
|
|
281
|
+
is in view" fades in and the figure pulses.
|
|
282
|
+
7. **Completion and sequence**: on done, a pop and a white ring play. With sequence on, the next pose
|
|
283
|
+
comes in.
|
|
284
|
+
8. **Hands and faces unchanged**: `/hand-instructions` and `/face-instructions` look and behave as
|
|
285
|
+
before.
|