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