@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
@@ -0,0 +1,16 @@
1
+ import { GLTFLoader, GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
2
+ /**
3
+ * The one GLTFLoader setup for every SDK-owned model path. The meshopt decoder
4
+ * ships inside three (wasm inlined) and fetches nothing. Draco and KTX2 are
5
+ * deliberately left unconfigured: their decoders would be fetched from a
6
+ * third-party CDN at view time, so such a model rejects instead.
7
+ */
8
+ export declare const createGltfLoader: () => GLTFLoader;
9
+ /** Parses GLB / glTF bytes with {@link createGltfLoader}; an unsupported compression rejects with an actionable error. */
10
+ export declare const parseGltf: (buffer: ArrayBuffer, path?: string, label?: string) => Promise<GLTF>;
11
+ /**
12
+ * A cached `url -> GLTF` loader over {@link fetchAndVerify}: SDK CDN models are
13
+ * hash-checked, a custom URL passes through. A failed load is evicted so the
14
+ * next call refetches.
15
+ */
16
+ export declare const createVerifiedGltfLoader: () => (url: string) => Promise<GLTF>;
@@ -1,6 +1,17 @@
1
1
  import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
2
2
  import { XRAssetDefinition } from './cache';
3
3
  import * as THREE from "three";
4
+ /**
5
+ * An asset's bytes could not be fetched: a network or CORS failure, an HTTP
6
+ * error status, or a failed integrity check. Decoding failures are not
7
+ * this (they keep their own error). Internal: lets loaders' callers tell a
8
+ * download failure from a decode failure.
9
+ */
10
+ export declare class AssetFetchError extends Error {
11
+ /** The underlying error, when there was one. */
12
+ readonly cause: unknown;
13
+ constructor(message: string, cause?: unknown);
14
+ }
4
15
  export type TextureAssetOptions = {
5
16
  colorSpace?: THREE.ColorSpace;
6
17
  generateMipmaps?: boolean;
@@ -13,7 +24,11 @@ export type TextureAssetOptions = {
13
24
  * hash-checked), decoded off the main thread, disposed on eviction.
14
25
  */
15
26
  export declare const defineTextureAsset: (url: string, options?: TextureAssetOptions) => XRAssetDefinition<THREE.Texture>;
16
- /** A glTF / GLB scene via three's GLTFLoader over the verifying fetch. Disposes geometries, materials and textures. */
27
+ /**
28
+ * A glTF / GLB scene via three's GLTFLoader over the verifying fetch. Loads
29
+ * meshopt geometry and WebP textures; a Draco or KTX2 model rejects. Disposes
30
+ * geometries, materials and textures.
31
+ */
17
32
  export declare const defineGltfAsset: (url: string) => XRAssetDefinition<GLTF>;
18
33
  export type VideoAssetOptions = {
19
34
  loop?: boolean;
@@ -0,0 +1,521 @@
1
+ import { TrackerPoint } from '../types/common';
2
+ /** The person's side (anatomical: their own left / right, on any camera). */
3
+ export type BodySide = "left" | "right";
4
+ /**
5
+ * What one arm is doing:
6
+ * - `raised` — wrist clearly above the head (any angle or twist; a real full raise leans and turns)
7
+ * - `out` — stretched out to the side at shoulder height (a T-pose arm)
8
+ * - `onHead` — hand on or just above the head, elbow bent
9
+ * - `onHip` — hand on the hip (at the waist, above the hip line), elbow well out
10
+ * - `thumbUp` — a fist held up in front (elbow bent), the thumb pointing up
11
+ * - `crossed` — wrist across the body's midline at chest / belly height
12
+ * - `down` — hanging well below the shoulder
13
+ * - `other` — anything else (a half raise, a reach forward …)
14
+ */
15
+ export type ArmState = "raised" | "out" | "onHead" | "onHip" | "thumbUp" | "crossed" | "down" | "other";
16
+ /** MediaPipe pose landmark indices the body poses read. */
17
+ export declare const BODY_POSE_JOINTS: {
18
+ readonly nose: 0;
19
+ readonly leftShoulder: 11;
20
+ readonly rightShoulder: 12;
21
+ readonly leftElbow: 13;
22
+ readonly rightElbow: 14;
23
+ readonly leftWrist: 15;
24
+ readonly rightWrist: 16;
25
+ /** MediaPipe's hand points on the pose: pinky and index knuckles, the thumb's second knuckle. */
26
+ readonly leftPinky: 17;
27
+ readonly rightPinky: 18;
28
+ readonly leftIndex: 19;
29
+ readonly rightIndex: 20;
30
+ readonly leftThumb: 21;
31
+ readonly rightThumb: 22;
32
+ readonly leftHip: 23;
33
+ readonly rightHip: 24;
34
+ readonly leftKnee: 25;
35
+ readonly rightKnee: 26;
36
+ readonly leftAnkle: 27;
37
+ readonly rightAnkle: 28;
38
+ };
39
+ /** MediaPipe pose landmarks per body (`analyzeBodyShape` needs all of them). */
40
+ export declare const BODY_LANDMARK_COUNT = 33;
41
+ /** Landmarks that must be visible for the upper body to count as in view. */
42
+ export declare const BODY_UPPER_JOINTS: readonly [0, 11, 12, 13, 14, 15, 16];
43
+ /** Landmarks that must be visible for the lower body to count as in view (hips, knees, ankles). */
44
+ export declare const BODY_LOWER_JOINTS: readonly [23, 24, 25, 26, 27, 28];
45
+ /**
46
+ * What one leg is doing:
47
+ * - `raised` — knee lifted toward hip height with the foot off the ground (standing on the other leg)
48
+ * - `down` — standing: the knee well below the hip
49
+ * - `other` — anything else (a squat's bent knee, a step …)
50
+ */
51
+ export type LegState = "raised" | "down" | "other";
52
+ /**
53
+ * The classifier's default thresholds (in shoulder widths, angles in degrees).
54
+ * Read-only: tune per call with `analyzeBodyShape(landmarks, { limits })` or a
55
+ * hook's `limits` option.
56
+ */
57
+ export declare const BODY_SHAPE_LIMITS: Readonly<{
58
+ /** A landmark counts as visible above this. */
59
+ visible: 0.5;
60
+ /** `raised`: wrist this far above its shoulder … */
61
+ raisedAboveShoulder: 0.75;
62
+ /** `out`: wrist within this of shoulder height … */
63
+ outLevel: 0.5;
64
+ /** … reaching at least this far outward … */
65
+ outReach: 0.9;
66
+ /** … with the elbow this straight (max bend). */
67
+ outStraight: 45;
68
+ /** `onHead`: wrist above the shoulder by at least this … */
69
+ onHeadAboveShoulder: 0.35;
70
+ /** … within this of the nose sideways … */
71
+ onHeadNearNose: 0.8;
72
+ /** … not higher than this above the nose (a hand ON the head, not reaching up) … */
73
+ onHeadMaxAboveNose: 1.1;
74
+ /** … with the elbow bent at least this much. */
75
+ onHeadBend: 55;
76
+ /**
77
+ * `onHip`: wrist ABOVE the hip landmark by this much (at the waist; hands in
78
+ * pockets sit on the hip line) …
79
+ */
80
+ onHipAboveMin: 0.12;
81
+ /** … but not higher than this … */
82
+ onHipAboveMax: 0.9;
83
+ /** … and sideways (hip outward positive), between these … */
84
+ onHipInward: -0.45;
85
+ onHipOutward: 0.7;
86
+ /** … with the elbow well out past the shoulder by this … */
87
+ onHipElbowOut: 0.3;
88
+ /** … and bent at least this much. */
89
+ onHipBend: 45;
90
+ /**
91
+ * `thumbUp`: the thumb point at least this far above the index and pinky
92
+ * knuckles (a fist, thumb up — not an open hand or a thumb to the side) …
93
+ */
94
+ thumbUpLift: 0.08;
95
+ /** … and above the wrist by at least this … */
96
+ thumbUpAboveWrist: 0.12;
97
+ /** … with the wrist between these heights relative to the shoulder (down negative) … */
98
+ thumbUpTop: 0.6;
99
+ thumbUpBottom: -1.3;
100
+ /** … not reaching more than this past the midline (a hand in front of its own side). */
101
+ thumbUpPastMidline: 0.3;
102
+ /** `crossed`: wrist past the midline by this … */
103
+ crossedPast: 0.05;
104
+ /** … between these heights relative to the shoulder (down negative). */
105
+ crossedTop: 0.35;
106
+ crossedBottom: -1.9;
107
+ /** `down`: wrist at least this far below its shoulder. */
108
+ downBelow: 0.9;
109
+ /** Leg `raised`: knee no lower than this relative to its hip (negative = below) … */
110
+ legRaisedKnee: -0.6;
111
+ /** … and its ankle at least this far above the other ankle (the foot is off the ground). */
112
+ legRaisedAnkle: 0.4;
113
+ /** Leg `down`: knee at least this far below its hip. */
114
+ legDownBelow: 0.8;
115
+ /**
116
+ * `squat`: the hips at most this high above the ankles (standing ≈ 2.2, a
117
+ * deep squat ≈ 1.1), with both feet on the ground.
118
+ */
119
+ squatHipHeight: 1.65;
120
+ /** `lean`: the torso (hips → shoulders) tilted at least this far from upright, degrees. */
121
+ leanDegrees: 8;
122
+ /** `wideStance`: the ankles at least this far apart. */
123
+ wideStance: 1.4;
124
+ }>;
125
+ /** The classifier thresholds (see `BODY_SHAPE_LIMITS` for each one's meaning). */
126
+ export type BodyShapeLimits = Record<keyof typeof BODY_SHAPE_LIMITS, number>;
127
+ export type ArmShape = {
128
+ state: ArmState;
129
+ /** Wrist height above the shoulder, in shoulder widths. */
130
+ up: number;
131
+ /** Wrist reach away from the body's midline past the shoulder, in shoulder widths. */
132
+ out: number;
133
+ /** Elbow bend in degrees (0 = straight). */
134
+ bend: number;
135
+ /** Elbow reach away from the body past the shoulder, in shoulder widths. */
136
+ elbowOut: number;
137
+ /** Wrist height above the same-side hip landmark, in shoulder widths. */
138
+ aboveHip: number;
139
+ /**
140
+ * How far the thumb point rises above the higher of the index and pinky
141
+ * knuckles, in shoulder widths (positive for a thumbs up).
142
+ */
143
+ thumbLift: number;
144
+ };
145
+ export type LegShape = {
146
+ state: LegState;
147
+ /** Knee height relative to its hip, in shoulder widths (standing ≈ −1.1, knee at hip height ≈ 0). */
148
+ kneeLift: number;
149
+ /** Ankle height above the other ankle, in shoulder widths. */
150
+ ankleLift: number;
151
+ /** Knee bend in degrees (0 = straight). */
152
+ bend: number;
153
+ };
154
+ export type BodyShape = {
155
+ arms: Record<BodySide, ArmShape>;
156
+ /** Shoulder width in tracker units (the scale everything is measured in). */
157
+ shoulderWidth: number;
158
+ /** Whether the upper body (nose, shoulders, elbows, wrists) is visible. */
159
+ upperBodyVisible: boolean;
160
+ /** Whether the hips are visible (needed for `onHip` and `lean`). */
161
+ hipsVisible: boolean;
162
+ /** Whether hips, knees and ankles are visible (needed for the leg poses). */
163
+ lowerBodyVisible: boolean;
164
+ /** Each leg (`null` while the lower body is not in view). */
165
+ legs: Record<BodySide, LegShape> | null;
166
+ /**
167
+ * Torso tilt from upright in degrees, + toward the person's own left
168
+ * (`null` while the hips are not in view).
169
+ */
170
+ lean: number | null;
171
+ /** The side the torso leans toward past `leanDegrees`, else `null`. */
172
+ leanSide: BodySide | null;
173
+ /** Hip height above the ankles, in shoulder widths (`null` without the lower body). */
174
+ hipHeight: number | null;
175
+ /** Ankle spread, in shoulder widths (`null` without the lower body). */
176
+ stance: number | null;
177
+ /** Hips low over both feet. */
178
+ squat: boolean;
179
+ /** Feet spread wide. */
180
+ wideStance: boolean;
181
+ };
182
+ export type AnalyzeBodyShapeOptions = {
183
+ /**
184
+ * The tracker input is mirrored (the selfie webcam): MediaPipe's left / right
185
+ * labels then name the person's opposite side, so they are swapped. Default `false`.
186
+ */
187
+ mirrored?: boolean;
188
+ /** Per-landmark visibility (0..1); without it every landmark counts as visible. */
189
+ visibility?: readonly number[];
190
+ /** Thresholds to override (the rest keep `BODY_SHAPE_LIMITS`). */
191
+ limits?: Partial<BodyShapeLimits>;
192
+ /**
193
+ * The tracked frame's aspect ratio, width ÷ height (`useXRFeedAspect()`).
194
+ * Tracker x and y each span −1..1 across the frame, so on a portrait or
195
+ * landscape frame a unit of x is not a unit of y; the landmarks are scaled
196
+ * to square units first (`squareLandmarks`) so every pose reads the same on
197
+ * any frame. Default 1 (the landmarks are already in square units).
198
+ */
199
+ aspect?: number;
200
+ };
201
+ /**
202
+ * Landmarks in square units: x (and MediaPipe's depth z, which shares x's
203
+ * scale) multiplied by the frame's aspect ratio (width ÷ height), so a unit
204
+ * of x equals a unit of y (half the frame height). Tracker space spans the
205
+ * frame on each axis, so without this a horizontal distance on a portrait
206
+ * frame reads 1.78× too long next to a vertical one. Returns the input
207
+ * unchanged for a square frame (`aspect` 1).
208
+ */
209
+ export declare const squareLandmarks: (landmarks: readonly TrackerPoint[], aspect?: number) => readonly TrackerPoint[];
210
+ /**
211
+ * Reads each arm's state from MediaPipe pose landmarks in tracker coordinates
212
+ * (`BodyTracker`'s `getLandmarks2D`: x right, y up, 33 points). Scale-free
213
+ * (shoulder widths), side-correct (measured from the body's midline, labels
214
+ * swapped on a mirrored feed) and, given the frame's `aspect`, the same on
215
+ * portrait, landscape and square frames. Pure.
216
+ */
217
+ export declare const analyzeBodyShape: (tracked: readonly TrackerPoint[], { mirrored, visibility, limits, aspect }?: AnalyzeBodyShapeOptions) => BodyShape;
218
+ /**
219
+ * What a pose requires of each arm; an array means any of those states,
220
+ * omitted = any. `anyOf` passes when one of its rules does (a thumbs up with
221
+ * either hand).
222
+ */
223
+ export type BodyPoseRule = {
224
+ arms?: Partial<Record<BodySide, ArmState | readonly ArmState[]>>;
225
+ /** Per leg, like `arms` (needs the lower body in view). */
226
+ legs?: Partial<Record<BodySide, LegState | readonly LegState[]>>;
227
+ /** The torso leans toward this side, or `"none"` = upright (needs the hips in view). */
228
+ lean?: BodySide | "none";
229
+ /** Hips low over both feet (`true`) or not (`false`). */
230
+ squat?: boolean;
231
+ /** Feet spread wide (`true`) or not (`false`). */
232
+ wideStance?: boolean;
233
+ anyOf?: readonly BodyPoseRule[];
234
+ };
235
+ /** Your own test of a body shape (any logic over the arm measurements). */
236
+ export type BodyPoseMatch = (shape: BodyShape) => boolean;
237
+ /** How the hint figure shows a pose. */
238
+ export type BodyPoseHintPose = {
239
+ /** The hint model's animation clip that shows it (`ybot.glb` ships one per pose). */
240
+ clip: string;
241
+ /** The person's arms that make the pose (drawn brighter on the hint). Default none. */
242
+ arms?: readonly BodySide[];
243
+ /** The person's legs that make the pose (drawn brighter on the hint). Default none. */
244
+ legs?: readonly BodySide[];
245
+ };
246
+ /**
247
+ * A pose: its default copy, how it is detected (`rule`, or `match` for logic
248
+ * a rule cannot express; with both, both must pass) and how the hint figure
249
+ * shows it. Make your own with `defineBodyPose`.
250
+ */
251
+ export type BodyPoseDefinition = {
252
+ /** Default instruction copy. */
253
+ label: string;
254
+ rule?: BodyPoseRule;
255
+ match?: BodyPoseMatch;
256
+ /**
257
+ * What the detector's `isInView` asks for (the "waiting" status and the
258
+ * nudge; completion only needs the rule): the upper body (default) or the
259
+ * whole body (the leg and lean poses).
260
+ */
261
+ view?: "upper" | "full";
262
+ hint: BodyPoseHintPose;
263
+ };
264
+ /**
265
+ * Anything that names a pose to detect: a built-in name, a rule, a match
266
+ * function or a full definition.
267
+ */
268
+ export type BodyPoseSpec = BodyPoseName | BodyPoseRule | BodyPoseMatch | BodyPoseDefinition;
269
+ /**
270
+ * Checks and returns your own pose definition (it needs a `rule` or a
271
+ * `match`). Pass it anywhere a pose name goes.
272
+ *
273
+ * ```ts
274
+ * const flex = defineBodyPose({
275
+ * label: "Show your muscles",
276
+ * rule: { arms: { left: "onHead", right: "onHead" } },
277
+ * hint: { clip: "flex", arms: ["left", "right"] }, // a clip in your own figure
278
+ * });
279
+ * ```
280
+ */
281
+ export declare const defineBodyPose: <T extends BodyPoseDefinition>(definition: T) => T;
282
+ /**
283
+ * The body instruction vocabulary (arm poses; the upper body is enough). Left /
284
+ * right are the person's own sides.
285
+ */
286
+ export declare const BODY_POSES: {
287
+ readonly hooray: {
288
+ readonly label: "Raise both arms";
289
+ readonly rule: {
290
+ readonly arms: {
291
+ readonly left: "raised";
292
+ readonly right: "raised";
293
+ };
294
+ };
295
+ readonly hint: {
296
+ readonly clip: "hooray";
297
+ readonly arms: readonly ["left", "right"];
298
+ };
299
+ };
300
+ /** Alias of `hooray` (the same rule and hint): both arms raised. */
301
+ readonly handsUp: {
302
+ readonly label: "Hands up";
303
+ readonly rule: {
304
+ readonly arms: {
305
+ readonly left: "raised";
306
+ readonly right: "raised";
307
+ };
308
+ };
309
+ readonly hint: {
310
+ readonly clip: "hooray";
311
+ readonly arms: readonly ["left", "right"];
312
+ };
313
+ };
314
+ readonly tPose: {
315
+ readonly label: "Make a T-pose";
316
+ readonly rule: {
317
+ readonly arms: {
318
+ readonly left: "out";
319
+ readonly right: "out";
320
+ };
321
+ };
322
+ readonly hint: {
323
+ readonly clip: "tpose";
324
+ readonly arms: readonly ["left", "right"];
325
+ };
326
+ };
327
+ readonly raiseLeft: {
328
+ readonly label: "Raise your left arm";
329
+ readonly rule: {
330
+ readonly arms: {
331
+ readonly left: "raised";
332
+ readonly right: readonly ["down", "other", "onHip"];
333
+ };
334
+ readonly lean: "none";
335
+ };
336
+ readonly hint: {
337
+ readonly clip: "raiseLeft";
338
+ readonly arms: readonly ["left"];
339
+ };
340
+ };
341
+ readonly raiseRight: {
342
+ readonly label: "Raise your right arm";
343
+ readonly rule: {
344
+ readonly arms: {
345
+ readonly right: "raised";
346
+ readonly left: readonly ["down", "other", "onHip"];
347
+ };
348
+ readonly lean: "none";
349
+ };
350
+ readonly hint: {
351
+ readonly clip: "raiseRight";
352
+ readonly arms: readonly ["right"];
353
+ };
354
+ };
355
+ readonly handsOnHips: {
356
+ readonly label: "Hands on your hips";
357
+ readonly rule: {
358
+ readonly arms: {
359
+ readonly left: "onHip";
360
+ readonly right: "onHip";
361
+ };
362
+ };
363
+ readonly hint: {
364
+ readonly clip: "handsOnHips";
365
+ readonly arms: readonly ["left", "right"];
366
+ };
367
+ };
368
+ readonly armsCrossed: {
369
+ readonly label: "Cross your arms";
370
+ readonly rule: {
371
+ readonly arms: {
372
+ readonly left: "crossed";
373
+ readonly right: "crossed";
374
+ };
375
+ };
376
+ readonly hint: {
377
+ readonly clip: "armsCrossed";
378
+ readonly arms: readonly ["left", "right"];
379
+ };
380
+ };
381
+ readonly handsOnHead: {
382
+ readonly label: "Hands on your head";
383
+ readonly rule: {
384
+ readonly arms: {
385
+ readonly left: "onHead";
386
+ readonly right: "onHead";
387
+ };
388
+ };
389
+ readonly hint: {
390
+ readonly clip: "handsOnHead";
391
+ readonly arms: readonly ["left", "right"];
392
+ };
393
+ };
394
+ readonly thumbUp: {
395
+ readonly label: "Give a thumbs up";
396
+ readonly rule: {
397
+ readonly anyOf: readonly [{
398
+ readonly arms: {
399
+ readonly right: "thumbUp";
400
+ };
401
+ }, {
402
+ readonly arms: {
403
+ readonly left: "thumbUp";
404
+ };
405
+ }];
406
+ };
407
+ readonly hint: {
408
+ readonly clip: "thumbUp";
409
+ readonly arms: readonly ["right"];
410
+ };
411
+ };
412
+ readonly bothThumbsUp: {
413
+ readonly label: "Two thumbs up";
414
+ readonly rule: {
415
+ readonly arms: {
416
+ readonly left: "thumbUp";
417
+ readonly right: "thumbUp";
418
+ };
419
+ };
420
+ readonly hint: {
421
+ readonly clip: "bothThumbsUp";
422
+ readonly arms: readonly ["left", "right"];
423
+ };
424
+ };
425
+ readonly salute: {
426
+ readonly label: "Salute";
427
+ readonly rule: {
428
+ readonly arms: {
429
+ readonly right: "onHead";
430
+ readonly left: readonly ["down", "other", "onHip"];
431
+ };
432
+ };
433
+ readonly hint: {
434
+ readonly clip: "salute";
435
+ readonly arms: readonly ["right"];
436
+ };
437
+ };
438
+ readonly squat: {
439
+ readonly label: "Squat down";
440
+ readonly rule: {
441
+ readonly squat: true;
442
+ };
443
+ readonly view: "full";
444
+ readonly hint: {
445
+ readonly clip: "squat";
446
+ readonly arms: readonly [];
447
+ readonly legs: readonly ["left", "right"];
448
+ };
449
+ };
450
+ readonly leanLeft: {
451
+ readonly label: "Lean to your left";
452
+ readonly rule: {
453
+ readonly lean: "left";
454
+ };
455
+ readonly view: "full";
456
+ readonly hint: {
457
+ readonly clip: "leanLeft";
458
+ readonly arms: readonly ["right"];
459
+ };
460
+ };
461
+ readonly leanRight: {
462
+ readonly label: "Lean to your right";
463
+ readonly rule: {
464
+ readonly lean: "right";
465
+ };
466
+ readonly view: "full";
467
+ readonly hint: {
468
+ readonly clip: "leanRight";
469
+ readonly arms: readonly ["left"];
470
+ };
471
+ };
472
+ readonly oneLeg: {
473
+ readonly label: "Stand on one leg";
474
+ readonly rule: {
475
+ readonly anyOf: readonly [{
476
+ readonly legs: {
477
+ readonly right: "raised";
478
+ readonly left: "down";
479
+ };
480
+ }, {
481
+ readonly legs: {
482
+ readonly left: "raised";
483
+ readonly right: "down";
484
+ };
485
+ }];
486
+ };
487
+ readonly view: "full";
488
+ readonly hint: {
489
+ readonly clip: "oneLeg";
490
+ readonly arms: readonly [];
491
+ readonly legs: readonly ["right"];
492
+ };
493
+ };
494
+ readonly star: {
495
+ readonly label: "Make a star";
496
+ readonly rule: {
497
+ readonly wideStance: true;
498
+ readonly arms: {
499
+ readonly left: readonly ["raised", "out"];
500
+ readonly right: readonly ["raised", "out"];
501
+ };
502
+ };
503
+ readonly view: "full";
504
+ readonly hint: {
505
+ readonly clip: "star";
506
+ readonly arms: readonly ["left", "right"];
507
+ readonly legs: readonly ["left", "right"];
508
+ };
509
+ };
510
+ };
511
+ export type BodyPoseName = keyof typeof BODY_POSES;
512
+ export declare const BODY_POSE_NAMES: BodyPoseName[];
513
+ /** The full definition a spec names (`undefined` for a bare rule or match function). */
514
+ export declare const resolveBodyPose: (pose: BodyPoseSpec) => BodyPoseDefinition | undefined;
515
+ /**
516
+ * Whether a shape satisfies a pose: a name from `BODY_POSES`, a rule, a match
517
+ * function or a definition.
518
+ */
519
+ export declare const matchBodyPose: (shape: BodyShape, pose: BodyPoseSpec) => boolean;
520
+ /** Every named pose a shape satisfies. */
521
+ export declare const matchingBodyPoses: (shape: BodyShape) => BodyPoseName[];
@@ -0,0 +1,83 @@
1
+ import { TrackerPoint } from '../../types/common';
2
+ export type ArmParams = {
3
+ /** Upper arm, from hanging down (0) out to the side (90) and up (180); negative swings across the body. */
4
+ upper: number;
5
+ /** Upper arm tilt toward the camera (90 = pointing at it). */
6
+ upperFwd: number;
7
+ /** Forearm, same convention, absolute (not relative to the upper arm). */
8
+ fore: number;
9
+ foreFwd: number;
10
+ };
11
+ export type LegParams = {
12
+ /** Thigh raised toward the camera from hanging (0) to level (90). */
13
+ thighFwd: number;
14
+ /** Thigh swung out to the side. */
15
+ thighOut: number;
16
+ /** Shin, absolute: forward tilt toward the camera (negative = foot behind, a heel kick). */
17
+ shinFwd: number;
18
+ shinOut: number;
19
+ };
20
+ export type BodyParams = {
21
+ /** Hip midpoint position in tracker units, and tracker units per metre. */
22
+ x: number;
23
+ y: number;
24
+ scale: number;
25
+ /**
26
+ * The frame's aspect, width ÷ height (9/16 portrait, 16/9 landscape). Tracker
27
+ * x spans the frame width, so it reads square-unit x ÷ aspect.
28
+ */
29
+ aspect: number;
30
+ /** Whole-body lift above the ground (m): a jump. */
31
+ lift: number;
32
+ /** Torso tilt toward the camera (deg). */
33
+ torsoFwd: number;
34
+ left: ArmParams;
35
+ right: ArmParams;
36
+ leftLeg: LegParams;
37
+ rightLeg: LegParams;
38
+ };
39
+ export declare const STANDING: BodyParams;
40
+ export type SyntheticFrame = {
41
+ landmarks: TrackerPoint[];
42
+ visibility: number[];
43
+ mirrored: boolean;
44
+ /** The frame's aspect (width ÷ height), to pass on as `aspect`. */
45
+ aspect: number;
46
+ };
47
+ /**
48
+ * Visibility as MediaPipe reports a whole body standing in frame with the feet
49
+ * near the bottom edge: high on the upper body and hips, lower on the knees,
50
+ * and well under 0.5 on the ankles and feet.
51
+ */
52
+ export declare const IN_FRAME_VISIBILITY: Record<number, number>;
53
+ /**
54
+ * Visibility as MediaPipe reports a body cut off below the hips (a front camera
55
+ * held close): the hips borderline, the knees and ankles near 0.
56
+ */
57
+ export declare const CLOSE_UP_VISIBILITY: Record<number, number>;
58
+ export type RenderOptions = {
59
+ /** The selfie feed: the image flips and MediaPipe's labels follow the image. */
60
+ mirrored?: boolean;
61
+ /** Hips, knees, ankles and feet hidden (visibility 0.1): the body cut off at the waist. */
62
+ legsHidden?: boolean;
63
+ /** Visibility per landmark index to force. */
64
+ visibility?: Record<number, number>;
65
+ };
66
+ /** MediaPipe's 33 landmarks (unmirrored: the person's left on screen-right). */
67
+ export declare const renderBody: (p: BodyParams, options?: RenderOptions) => SyntheticFrame;
68
+ /** Deep-ish override of the standing figure (arm / leg params merge field by field). */
69
+ export type BodyPatch = Partial<Omit<BodyParams, "left" | "right" | "leftLeg" | "rightLeg">> & {
70
+ left?: Partial<ArmParams>;
71
+ right?: Partial<ArmParams>;
72
+ leftLeg?: Partial<LegParams>;
73
+ rightLeg?: Partial<LegParams>;
74
+ };
75
+ export declare const pose: (patch?: BodyPatch, base?: BodyParams) => BodyParams;
76
+ export declare const lerpBody: (a: BodyParams, b: BodyParams, t: number) => BodyParams;
77
+ /** Keyframes `[timeMs, params]` sampled every `stepMs` (30 fps by default), smooth in between. */
78
+ export declare const timeline: (keys: ReadonlyArray<readonly [number, BodyParams]>, stepMs?: number) => Array<{
79
+ t: number;
80
+ body: BodyParams;
81
+ }>;
82
+ /** Move every keyframe: `x` / `y` add to the figure's own offsets, `scale` / `aspect` replace. */
83
+ export declare const placed: (keys: ReadonlyArray<readonly [number, BodyParams]>, { x, y, ...rest }: Partial<Pick<BodyParams, "x" | "y" | "scale" | "aspect">>) => Array<[number, BodyParams]>;