@lemoncat7/dsh-theme-xiaohei 0.3.0-alpha.23 → 0.3.2

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 (222) hide show
  1. package/README.md +39 -17
  2. package/THIRD_PARTY_NOTICES.md +41 -0
  3. package/lib/appearance.js +26 -10
  4. package/lib/blink.js +3 -3
  5. package/lib/bloub-heixiu/ambient.d.ts +3 -0
  6. package/lib/bloub-heixiu/ambient.js +12 -0
  7. package/lib/bloub-heixiu/character.d.ts +33 -0
  8. package/lib/bloub-heixiu/character.js +124 -0
  9. package/lib/bloub-heixiu/effects.d.ts +4 -0
  10. package/lib/bloub-heixiu/effects.js +91 -0
  11. package/lib/bloub-heixiu/flight.d.ts +15 -0
  12. package/lib/bloub-heixiu/flight.js +66 -0
  13. package/lib/bloub-heixiu/follow.d.ts +13 -0
  14. package/lib/bloub-heixiu/follow.js +23 -0
  15. package/lib/bloub-heixiu/layout.d.ts +18 -0
  16. package/lib/bloub-heixiu/layout.js +12 -0
  17. package/lib/bloub-heixiu/renderer.d.ts +16 -0
  18. package/lib/bloub-heixiu/renderer.js +94 -0
  19. package/lib/bloub-heixiu/runtime.d.ts +6 -0
  20. package/lib/bloub-heixiu/runtime.js +395 -0
  21. package/lib/bloub-heixiu/signals.d.ts +17 -0
  22. package/lib/bloub-heixiu/signals.js +53 -0
  23. package/lib/bloub-heixiu/styles.d.ts +2 -0
  24. package/lib/bloub-heixiu/styles.js +98 -0
  25. package/lib/chrome/accessibility.d.ts +1 -1
  26. package/lib/chrome/accessibility.js +5 -13
  27. package/lib/chrome/composer-avatar.d.ts +10 -0
  28. package/lib/chrome/composer-avatar.js +599 -0
  29. package/lib/chrome/composer-send-heixiu.d.ts +3 -0
  30. package/lib/chrome/composer-send-heixiu.js +143 -0
  31. package/lib/chrome/composer.d.ts +2 -2
  32. package/lib/chrome/composer.js +84 -95
  33. package/lib/chrome/controls.d.ts +8 -0
  34. package/lib/chrome/controls.js +348 -0
  35. package/lib/chrome/conversation-messages.d.ts +1 -1
  36. package/lib/chrome/conversation-messages.js +207 -9
  37. package/lib/chrome/conversation.d.ts +1 -1
  38. package/lib/chrome/conversation.js +6 -0
  39. package/lib/chrome/identity.js +4 -18
  40. package/lib/chrome/portal.d.ts +1 -1
  41. package/lib/chrome/portal.js +1 -1
  42. package/lib/chrome/sidebar.d.ts +1 -1
  43. package/lib/chrome/sidebar.js +134 -153
  44. package/lib/chrome/tokens.d.ts +1 -1
  45. package/lib/chrome/tokens.js +121 -68
  46. package/lib/chrome/workspace.d.ts +2 -2
  47. package/lib/chrome/workspace.js +35 -254
  48. package/lib/chrome.js +4 -0
  49. package/lib/client.d.ts +5 -12
  50. package/lib/client.js +6262 -4455
  51. package/lib/composer-avatar.d.ts +18 -0
  52. package/lib/composer-avatar.js +441 -0
  53. package/lib/composer-send-heixiu.d.ts +8 -0
  54. package/lib/composer-send-heixiu.js +133 -0
  55. package/lib/gaze.js +3 -3
  56. package/lib/generated-backgrounds.d.ts +14 -0
  57. package/lib/generated-backgrounds.js +14 -0
  58. package/lib/generated-character-motion.d.ts +4 -0
  59. package/lib/generated-character-motion.js +2 -0
  60. package/lib/generated-identity.d.ts +1 -0
  61. package/lib/generated-identity.js +1 -0
  62. package/lib/generated-keyart.d.ts +18 -3
  63. package/lib/generated-keyart.js +18 -3
  64. package/lib/host-contract.d.ts +9 -0
  65. package/lib/host-contract.js +13 -0
  66. package/lib/host-dom.d.ts +11 -0
  67. package/lib/host-dom.js +60 -0
  68. package/lib/loading-heixiu.js +3 -3
  69. package/lib/metallic-brand-mark.d.ts +10 -0
  70. package/lib/metallic-brand-mark.js +323 -0
  71. package/lib/plugin.d.ts +1 -1
  72. package/lib/plugin.js +31 -16
  73. package/lib/portal.js +11 -10
  74. package/lib/reactions.js +3 -3
  75. package/lib/scene/avatar-model.d.ts +6 -0
  76. package/lib/scene/avatar-model.js +646 -0
  77. package/lib/scene/avatar-motion.d.ts +3 -0
  78. package/lib/scene/avatar-motion.js +799 -0
  79. package/lib/scene/character-idle.d.ts +17 -0
  80. package/lib/scene/character-idle.js +65 -0
  81. package/lib/scene/character-layout.d.ts +24 -0
  82. package/lib/scene/character-layout.js +51 -0
  83. package/lib/scene/character-motion-clock.d.ts +18 -0
  84. package/lib/scene/character-motion-clock.js +57 -0
  85. package/lib/scene/character-motion-types.d.ts +12 -0
  86. package/lib/scene/character-motion-types.js +2 -0
  87. package/lib/scene/character-motion.d.ts +6 -0
  88. package/lib/scene/character-motion.js +126 -0
  89. package/lib/scene/character-poses.d.ts +26 -0
  90. package/lib/scene/character-poses.js +11 -0
  91. package/lib/scene/character-rig-renderer.d.ts +4 -0
  92. package/lib/scene/character-rig-renderer.js +85 -0
  93. package/lib/scene/character-rig.d.ts +20 -0
  94. package/lib/scene/character-rig.js +53 -0
  95. package/lib/scene/heixiu-feedback.d.ts +1 -1
  96. package/lib/scene/heixiu-feedback.js +0 -17
  97. package/lib/scene/pointer-bridge.d.ts +21 -0
  98. package/lib/scene/pointer-bridge.js +155 -0
  99. package/lib/scene/runtime.d.ts +12 -0
  100. package/lib/scene/runtime.js +87 -0
  101. package/lib/scene/styles.d.ts +7 -0
  102. package/lib/scene/styles.js +75 -0
  103. package/lib/scene/sylva-performance.d.ts +11 -0
  104. package/lib/scene/sylva-performance.js +58 -0
  105. package/lib/scene/wallpaper-character-styles.d.ts +3 -0
  106. package/lib/scene/wallpaper-character-styles.js +53 -0
  107. package/lib/scene/wallpaper-character.d.ts +4 -0
  108. package/lib/scene/wallpaper-character.js +213 -0
  109. package/lib/scene.d.ts +7 -13
  110. package/lib/scene.js +7 -1023
  111. package/lib/sidebar-glass.js +99 -36
  112. package/lib/sidebar-heixiu-roaming.js +5 -5
  113. package/lib/sidebar-reveal.d.ts +8 -0
  114. package/lib/sidebar-reveal.js +51 -0
  115. package/lib/state.d.ts +14 -2
  116. package/lib/state.js +12 -4
  117. package/lib/theme.js +2 -2
  118. package/lib/vendor/bloub/decor.d.ts +114 -0
  119. package/lib/vendor/bloub/decor.js +198 -0
  120. package/lib/vendor/bloub/engine.d.ts +213 -0
  121. package/lib/vendor/bloub/engine.js +452 -0
  122. package/lib/vendor/bloub/expressions.d.ts +35 -0
  123. package/lib/vendor/bloub/expressions.js +143 -0
  124. package/lib/vendor/bloub/eyefit.d.ts +75 -0
  125. package/lib/vendor/bloub/eyefit.js +393 -0
  126. package/lib/vendor/bloub/face.d.ts +63 -0
  127. package/lib/vendor/bloub/face.js +106 -0
  128. package/lib/vendor/bloub/math.d.ts +22 -0
  129. package/lib/vendor/bloub/math.js +36 -0
  130. package/lib/vendor/bloub/profiles.d.ts +8 -0
  131. package/lib/vendor/bloub/profiles.js +20 -0
  132. package/lib/vendor/bloub/repere.d.ts +30 -0
  133. package/lib/vendor/bloub/repere.js +32 -0
  134. package/lib/vendor/bloub/shape.d.ts +80 -0
  135. package/lib/vendor/bloub/shape.js +268 -0
  136. package/lib/vendor/bloub/skins.d.ts +36 -0
  137. package/lib/vendor/bloub/skins.js +74 -0
  138. package/lib/vendor/bloub/states.d.ts +87 -0
  139. package/lib/vendor/bloub/states.js +468 -0
  140. package/package.json +23 -6
  141. package/lib/appearance.d.ts.map +0 -1
  142. package/lib/appearance.js.map +0 -1
  143. package/lib/blink.d.ts.map +0 -1
  144. package/lib/blink.js.map +0 -1
  145. package/lib/boot-appearance.d.ts.map +0 -1
  146. package/lib/boot-appearance.js.map +0 -1
  147. package/lib/boot-loader.d.ts.map +0 -1
  148. package/lib/boot-loader.js.map +0 -1
  149. package/lib/chrome/accessibility.d.ts.map +0 -1
  150. package/lib/chrome/accessibility.js.map +0 -1
  151. package/lib/chrome/blink.d.ts.map +0 -1
  152. package/lib/chrome/blink.js.map +0 -1
  153. package/lib/chrome/composer.d.ts.map +0 -1
  154. package/lib/chrome/composer.js.map +0 -1
  155. package/lib/chrome/conversation-messages.d.ts.map +0 -1
  156. package/lib/chrome/conversation-messages.js.map +0 -1
  157. package/lib/chrome/conversation.d.ts.map +0 -1
  158. package/lib/chrome/conversation.js.map +0 -1
  159. package/lib/chrome/frames.d.ts.map +0 -1
  160. package/lib/chrome/frames.js.map +0 -1
  161. package/lib/chrome/gaze.d.ts.map +0 -1
  162. package/lib/chrome/gaze.js.map +0 -1
  163. package/lib/chrome/identity.d.ts.map +0 -1
  164. package/lib/chrome/identity.js.map +0 -1
  165. package/lib/chrome/overlays.d.ts.map +0 -1
  166. package/lib/chrome/overlays.js.map +0 -1
  167. package/lib/chrome/portal.d.ts.map +0 -1
  168. package/lib/chrome/portal.js.map +0 -1
  169. package/lib/chrome/reactions.d.ts.map +0 -1
  170. package/lib/chrome/reactions.js.map +0 -1
  171. package/lib/chrome/sidebar.d.ts.map +0 -1
  172. package/lib/chrome/sidebar.js.map +0 -1
  173. package/lib/chrome/tokens.d.ts.map +0 -1
  174. package/lib/chrome/tokens.js.map +0 -1
  175. package/lib/chrome/workspace.d.ts.map +0 -1
  176. package/lib/chrome/workspace.js.map +0 -1
  177. package/lib/chrome.d.ts.map +0 -1
  178. package/lib/chrome.js.map +0 -1
  179. package/lib/client.d.ts.map +0 -1
  180. package/lib/client.js.map +0 -7
  181. package/lib/gaze.d.ts.map +0 -1
  182. package/lib/gaze.js.map +0 -1
  183. package/lib/generated-identity.d.ts.map +0 -1
  184. package/lib/generated-identity.js.map +0 -1
  185. package/lib/generated-keyart.d.ts.map +0 -1
  186. package/lib/generated-keyart.js.map +0 -1
  187. package/lib/generated-loading-assets.d.ts.map +0 -1
  188. package/lib/generated-loading-assets.js.map +0 -1
  189. package/lib/generated-sidebar-assets.d.ts +0 -4
  190. package/lib/generated-sidebar-assets.d.ts.map +0 -1
  191. package/lib/generated-sidebar-assets.js +0 -4
  192. package/lib/generated-sidebar-assets.js.map +0 -1
  193. package/lib/heixiu-interactions.d.ts.map +0 -1
  194. package/lib/heixiu-interactions.js.map +0 -1
  195. package/lib/index.d.ts.map +0 -1
  196. package/lib/index.js.map +0 -1
  197. package/lib/loading-heixiu.d.ts.map +0 -1
  198. package/lib/loading-heixiu.js.map +0 -1
  199. package/lib/plugin.d.ts.map +0 -1
  200. package/lib/plugin.js.map +0 -1
  201. package/lib/portal.d.ts.map +0 -1
  202. package/lib/portal.js.map +0 -1
  203. package/lib/reactions.d.ts.map +0 -1
  204. package/lib/reactions.js.map +0 -1
  205. package/lib/scene/heixiu-feedback.d.ts.map +0 -1
  206. package/lib/scene/heixiu-feedback.js.map +0 -1
  207. package/lib/scene/heixiu-interactions.d.ts.map +0 -1
  208. package/lib/scene/heixiu-interactions.js.map +0 -1
  209. package/lib/scene/state-transitions.d.ts.map +0 -1
  210. package/lib/scene/state-transitions.js.map +0 -1
  211. package/lib/scene.d.ts.map +0 -1
  212. package/lib/scene.js.map +0 -1
  213. package/lib/sidebar-glass.d.ts.map +0 -1
  214. package/lib/sidebar-glass.js.map +0 -1
  215. package/lib/sidebar-heixiu-escape.d.ts.map +0 -1
  216. package/lib/sidebar-heixiu-escape.js.map +0 -1
  217. package/lib/sidebar-heixiu-roaming.d.ts.map +0 -1
  218. package/lib/sidebar-heixiu-roaming.js.map +0 -1
  219. package/lib/state.d.ts.map +0 -1
  220. package/lib/state.js.map +0 -1
  221. package/lib/theme.d.ts.map +0 -1
  222. package/lib/theme.js.map +0 -1
@@ -0,0 +1,3 @@
1
+ /** Runtime helpers inserted beside the Xiaohei model in ThreeUI's own r149 scene. */
2
+ export declare const XIAOHEI_AVATAR_MOTION_RUNTIME = "\n var xiaoheiMotionEuler = new THREE.Euler();\n var xiaoheiMotionDeltaQ = new THREE.Quaternion();\n var xiaoheiMotionPoseQ = new THREE.Quaternion();\n var xiaoheiMotionArmDown = {\n leftUpper: new THREE.Quaternion(0.54427280, 0.01192567, 0.03342154, 0.83815747),\n rightUpper: new THREE.Quaternion(0.54406160, -0.01540707, -0.03727146, 0.83807547),\n leftLower: new THREE.Quaternion(0, 0, 0, 1),\n rightLower: new THREE.Quaternion(0, 0, 0, 1)\n };\n var xiaoheiMotionSitArms = {\n leftUpper: new THREE.Quaternion(0.42277680, 0.04837124, 0.43673194, 0.79258139),\n rightUpper: new THREE.Quaternion(0.58108784, 0.00464093, 0.18044704, 0.79357061),\n leftLower: new THREE.Quaternion(0.00485389, -0.02619754, 0.18480416, 0.98241418),\n rightLower: new THREE.Quaternion(0.12449678, 0.00258430, -0.01948060, 0.99202538)\n };\n\n function xiaoheiMotionSmoothstep(a, b, value) {\n var t = Math.max(0, Math.min(1, (value - a) / (b - a)));\n return t * t * (3 - 2 * t);\n }\n\n function xiaoheiAvatarFindLegRegions(geometry, height) {\n var position = geometry.getAttribute('position');\n var index = geometry.getIndex();\n var parent = new Int32Array(position.count);\n for (var vertex = 0; vertex < position.count; vertex += 1) parent[vertex] = vertex;\n\n function find(vertexIndex) {\n var root = vertexIndex;\n while (parent[root] !== root) root = parent[root];\n while (parent[vertexIndex] !== vertexIndex) {\n var next = parent[vertexIndex];\n parent[vertexIndex] = root;\n vertexIndex = next;\n }\n return root;\n }\n\n function join(first, second) {\n var firstRoot = find(first);\n var secondRoot = find(second);\n if (firstRoot !== secondRoot) parent[secondRoot] = firstRoot;\n }\n\n if (index) {\n for (var offset = 0; offset < index.count; offset += 3) {\n var first = index.getX(offset);\n join(first, index.getX(offset + 1));\n join(first, index.getX(offset + 2));\n }\n }\n\n var regions = Object.create(null);\n for (vertex = 0; vertex < position.count; vertex += 1) {\n var root = find(vertex);\n var x = position.getX(vertex) / height;\n var y = position.getY(vertex) / height;\n var region = regions[root];\n if (!region) {\n region = regions[root] = { minX: x, maxX: x, minY: y, maxY: y };\n } else {\n region.minX = Math.min(region.minX, x);\n region.maxX = Math.max(region.maxX, x);\n region.minY = Math.min(region.minY, y);\n region.maxY = Math.max(region.maxY, y);\n }\n }\n\n var legSide = new Int8Array(position.count);\n for (vertex = 0; vertex < position.count; vertex += 1) {\n root = find(vertex);\n region = regions[root];\n /* The shorts are built from separate side panels too. Keep every island\n that rises into the garment on the pelvis, otherwise the two panels\n rotate like rigid armour plates when a thigh swings. */\n if (region.minY >= 0.36 || region.maxY >= 0.44) continue;\n if (region.maxX < 0.012 && region.minX > -0.19) legSide[vertex] = -1;\n else if (region.minX > -0.012 && region.maxX < 0.19) legSide[vertex] = 1;\n }\n return legSide;\n }\n\n function xiaoheiAvatarBuildRig(geometry, height) {\n var bones = {\n root: new THREE.Bone(),\n pelvis: new THREE.Bone(),\n spine: new THREE.Bone(),\n chest: new THREE.Bone(),\n neck: new THREE.Bone(),\n head: new THREE.Bone(),\n upperArmL: new THREE.Bone(),\n lowerArmL: new THREE.Bone(),\n handL: new THREE.Bone(),\n upperArmR: new THREE.Bone(),\n lowerArmR: new THREE.Bone(),\n handR: new THREE.Bone(),\n upperLegL: new THREE.Bone(),\n lowerLegL: new THREE.Bone(),\n footL: new THREE.Bone(),\n upperLegR: new THREE.Bone(),\n lowerLegR: new THREE.Bone(),\n footR: new THREE.Bone()\n };\n var boneNames = {\n root: 'root',\n pelvis: 'pelvis',\n spine: 'spine',\n chest: 'chest',\n neck: 'neck',\n head: 'head',\n upperArmL: 'upper-arm-left',\n lowerArmL: 'lower-arm-left',\n handL: 'hand-left',\n upperArmR: 'upper-arm-right',\n lowerArmR: 'lower-arm-right',\n handR: 'hand-right',\n upperLegL: 'upper-leg-left',\n lowerLegL: 'lower-leg-left',\n footL: 'foot-left',\n upperLegR: 'upper-leg-right',\n lowerLegR: 'lower-leg-right',\n footR: 'foot-right'\n };\n Object.keys(boneNames).forEach(function (key) {\n bones[key].name = 'xiaohei-rig-' + boneNames[key];\n });\n\n bones.root.add(bones.pelvis);\n bones.pelvis.position.set(0, height * 0.285, 0);\n bones.pelvis.add(bones.spine, bones.upperLegL, bones.upperLegR);\n bones.spine.position.set(0, height * 0.105, 0);\n bones.spine.add(bones.chest);\n bones.chest.position.set(0, height * 0.135, 0);\n bones.chest.add(bones.neck, bones.upperArmL, bones.upperArmR);\n bones.neck.position.set(0, height * 0.080, 0);\n bones.neck.add(bones.head);\n bones.head.position.set(0, height * 0.055, 0);\n\n bones.upperArmL.position.set(-height * 0.095, height * 0.035, 0);\n bones.upperArmL.add(bones.lowerArmL);\n bones.lowerArmL.position.set(-height * 0.125, 0, 0);\n bones.lowerArmL.add(bones.handL);\n bones.handL.position.set(-height * 0.085, 0, 0);\n bones.upperArmR.position.set(height * 0.095, height * 0.035, 0);\n bones.upperArmR.add(bones.lowerArmR);\n bones.lowerArmR.position.set(height * 0.125, 0, 0);\n bones.lowerArmR.add(bones.handR);\n bones.handR.position.set(height * 0.085, 0, 0);\n\n bones.upperLegL.position.set(-height * 0.055, height * 0.065, 0);\n bones.upperLegL.add(bones.lowerLegL);\n bones.lowerLegL.position.set(0, -height * 0.140, 0);\n bones.lowerLegL.add(bones.footL);\n bones.footL.position.set(0, -height * 0.120, height * 0.008);\n bones.upperLegR.position.set(height * 0.055, height * 0.065, 0);\n bones.upperLegR.add(bones.lowerLegR);\n bones.lowerLegR.position.set(0, -height * 0.140, 0);\n bones.lowerLegR.add(bones.footR);\n bones.footR.position.set(0, -height * 0.120, height * 0.008);\n\n var ordered = [\n bones.root,\n bones.pelvis,\n bones.spine,\n bones.chest,\n bones.neck,\n bones.head,\n bones.upperArmL,\n bones.lowerArmL,\n bones.handL,\n bones.upperArmR,\n bones.lowerArmR,\n bones.handR,\n bones.upperLegL,\n bones.lowerLegL,\n bones.footL,\n bones.upperLegR,\n bones.lowerLegR,\n bones.footR\n ];\n var position = geometry.getAttribute('position');\n var legSide = xiaoheiAvatarFindLegRegions(geometry, height);\n var skinIndex = new Uint16Array(position.count * 4);\n var skinWeight = new Float32Array(position.count * 4);\n\n function weightPair(vertex, firstIndex, firstWeight, secondIndex) {\n var offset = vertex * 4;\n var clamped = Math.max(0, Math.min(1, firstWeight));\n skinIndex[offset] = firstIndex;\n skinIndex[offset + 1] = secondIndex;\n skinWeight[offset] = clamped;\n skinWeight[offset + 1] = 1 - clamped;\n }\n\n for (var vertex = 0; vertex < position.count; vertex += 1) {\n var x = position.getX(vertex) / height;\n var y = position.getY(vertex) / height;\n var ax = Math.abs(x);\n var left = x < 0;\n\n var armMask = xiaoheiMotionSmoothstep(0.105, 0.155, ax)\n * xiaoheiMotionSmoothstep(0.515, 0.545, y)\n * (1 - xiaoheiMotionSmoothstep(0.615, 0.645, y));\n if (armMask > 0.06) {\n var upperArm = left ? 6 : 9;\n var lowerArm = left ? 7 : 10;\n var hand = left ? 8 : 11;\n if (ax < 0.190) {\n weightPair(vertex, upperArm, armMask, 3);\n } else if (ax < 0.270) {\n weightPair(vertex, lowerArm, xiaoheiMotionSmoothstep(0.205, 0.265, ax), upperArm);\n } else if (ax < 0.335) {\n weightPair(vertex, hand, xiaoheiMotionSmoothstep(0.292, 0.332, ax), lowerArm);\n } else {\n weightPair(vertex, hand, 1, lowerArm);\n }\n continue;\n }\n\n if (y >= 0.585) {\n var headWeight = xiaoheiMotionSmoothstep(0.595, 0.650, y);\n weightPair(vertex, 5, headWeight, 4);\n continue;\n }\n\n if (legSide[vertex]) {\n var legIsLeft = legSide[vertex] < 0;\n var upperLeg = legIsLeft ? 12 : 15;\n var lowerLeg = legIsLeft ? 13 : 16;\n var foot = legIsLeft ? 14 : 17;\n if (y < 0.135) {\n weightPair(vertex, foot, xiaoheiMotionSmoothstep(0.135, 0.075, y), lowerLeg);\n } else if (y < 0.270) {\n weightPair(vertex, lowerLeg, 1 - xiaoheiMotionSmoothstep(0.210, 0.270, y), upperLeg);\n } else {\n weightPair(vertex, upperLeg, 1 - xiaoheiMotionSmoothstep(0.340, 0.405, y), 1);\n }\n continue;\n }\n\n if (y >= 0.535) {\n weightPair(vertex, 4, xiaoheiMotionSmoothstep(0.545, 0.605, y), 3);\n } else if (y >= 0.420) {\n weightPair(vertex, 3, xiaoheiMotionSmoothstep(0.430, 0.515, y), 2);\n } else if (y >= 0.285) {\n weightPair(vertex, 2, xiaoheiMotionSmoothstep(0.300, 0.410, y), 1);\n } else {\n weightPair(vertex, 1, 1, 0);\n }\n }\n\n geometry.setAttribute('skinIndex', new THREE.Uint16BufferAttribute(skinIndex, 4));\n geometry.setAttribute('skinWeight', new THREE.Float32BufferAttribute(skinWeight, 4));\n return {\n rootBone: bones.root,\n skeleton: new THREE.Skeleton(ordered),\n bones: bones,\n rest: {\n pelvisY: bones.pelvis.position.y,\n spineY: bones.spine.position.y,\n chestY: bones.chest.position.y,\n neckY: bones.neck.position.y,\n headY: bones.head.position.y,\n upperArmLX: bones.upperArmL.position.x,\n upperArmRX: bones.upperArmR.position.x\n }\n };\n }\n\n function xiaoheiAvatarPrepareMotion(avatar) {\n avatar.motion = {\n action: 'settle',\n anchorLimb: 0,\n anchorT: 0.38,\n walkMinT: 0.30,\n walkMaxT: 0.48,\n walkSpeed: 0.021,\n walkDirection: 1,\n walkPhase: 0,\n walkBlend: 0,\n runBlend: 0,\n queuedAction: '',\n lastAction: '',\n travelTargetT: 0.38,\n poseReview: 'sit',\n reviewStarted: 0,\n reviewProgress: 0,\n reviewStartT: 0.38,\n reviewSeatT: 0.38,\n reviewSeatReady: false,\n phase: 'settle',\n phaseStarted: 0,\n phaseUntil: 0,\n lastNow: 0,\n reportedAction: ''\n };\n }\n\n function xiaoheiAvatarSetMotionPhase(motion, phase, now, duration) {\n motion.phase = phase;\n motion.phaseStarted = now;\n motion.phaseUntil = duration ? now + duration : 0;\n }\n\n function xiaoheiAvatarMotionProgress(motion, now) {\n var duration = motion.phaseUntil - motion.phaseStarted;\n if (duration <= 0) return 0;\n return xiaoheiMotionSmoothstep(\n 0,\n 1,\n (now - motion.phaseStarted) / duration\n );\n }\n\n function xiaoheiAvatarBeginIndependentAction(motion, now) {\n var roll = Math.random();\n var action = roll < 0.30\n ? 'walk'\n : roll < 0.48\n ? 'jump'\n : roll < 0.66\n ? 'sit'\n : roll < 0.82\n ? 'run'\n : 'idle';\n if (action === motion.lastAction) action = action === 'walk' ? 'jump' : 'walk';\n motion.lastAction = action;\n if (action === 'idle') {\n xiaoheiAvatarSetMotionPhase(motion, 'idle', now, 1800 + Math.random() * 1400);\n return;\n }\n if (action === 'jump') {\n xiaoheiAvatarSetMotionPhase(motion, 'jump-crouch', now, 280);\n return;\n }\n if (action === 'sit') {\n xiaoheiAvatarSetMotionPhase(motion, 'sit-down', now, 680);\n return;\n }\n var distance = action === 'run'\n ? 0.045 + Math.random() * 0.025\n : 0.026 + Math.random() * 0.020;\n var direction = Math.random() < 0.5 ? -1 : 1;\n if (motion.anchorT <= motion.walkMinT + 0.025) direction = 1;\n if (motion.anchorT >= motion.walkMaxT - 0.025) direction = -1;\n motion.walkDirection = direction;\n motion.travelTargetT = THREE.MathUtils.clamp(\n motion.anchorT + direction * distance,\n motion.walkMinT,\n motion.walkMaxT\n );\n motion.queuedAction = action;\n xiaoheiAvatarSetMotionPhase(motion, 'turn', now, 440);\n }\n\n function xiaoheiAvatarAdvanceMotion(avatar, now) {\n var motion = avatar.motion;\n if (!motion) return;\n if (!motion.lastNow) motion.lastNow = now;\n var dt = Math.min(0.05, Math.max(0, (now - motion.lastNow) * 0.001));\n motion.lastNow = now;\n var scanComplete = !avatar.scan || avatar.scan.complete;\n\n if (motion.poseReview) {\n if (scanComplete && motion.reviewSeatReady && !motion.reviewStarted) {\n motion.reviewStarted = now + 650;\n }\n if (motion.reviewStarted) {\n motion.reviewProgress = THREE.MathUtils.clamp(\n (now - motion.reviewStarted) / 1350,\n 0,\n 1\n );\n }\n motion.phase = motion.reviewProgress < 1 ? 'sit-review-transition' : 'sit-review';\n motion.action = motion.phase;\n motion.anchorT = THREE.MathUtils.lerp(\n motion.reviewStartT,\n motion.reviewSeatT,\n xiaoheiMotionSmoothstep(0, 0.58, motion.reviewProgress)\n );\n motion.walkBlend = 0;\n motion.runBlend = 0;\n if (motion.reportedAction !== motion.action) {\n motion.reportedAction = motion.action;\n document.documentElement.dataset.xiaoheiAvatarAction = motion.action + '-3d';\n document.documentElement.dataset.xiaoheiAvatarPose = motion.action;\n }\n return;\n }\n\n if (REDUCED || !scanComplete) {\n motion.action = 'settle';\n motion.walkBlend += (0 - motion.walkBlend) * (1 - Math.exp(-dt * 8));\n motion.runBlend += (0 - motion.runBlend) * (1 - Math.exp(-dt * 8));\n } else {\n if (motion.phase === 'settle') {\n xiaoheiAvatarSetMotionPhase(motion, 'idle', now, 1400);\n } else if (motion.phase === 'idle' && now >= motion.phaseUntil) {\n xiaoheiAvatarBeginIndependentAction(motion, now);\n } else if (motion.phase === 'turn' && now >= motion.phaseUntil) {\n var queuedAction = motion.queuedAction || 'walk';\n motion.queuedAction = '';\n xiaoheiAvatarSetMotionPhase(motion, queuedAction, now, 0);\n } else if (motion.phase === 'jump-crouch' && now >= motion.phaseUntil) {\n xiaoheiAvatarSetMotionPhase(motion, 'jump-air', now, 680);\n } else if (motion.phase === 'jump-air' && now >= motion.phaseUntil) {\n xiaoheiAvatarSetMotionPhase(motion, 'jump-land', now, 320);\n } else if (motion.phase === 'jump-land' && now >= motion.phaseUntil) {\n xiaoheiAvatarSetMotionPhase(motion, 'idle', now, 1500 + Math.random() * 1100);\n } else if (motion.phase === 'sit-down' && now >= motion.phaseUntil) {\n xiaoheiAvatarSetMotionPhase(motion, 'sit', now, 1650);\n } else if (motion.phase === 'sit' && now >= motion.phaseUntil) {\n xiaoheiAvatarSetMotionPhase(motion, 'stand-up', now, 720);\n } else if (motion.phase === 'stand-up' && now >= motion.phaseUntil) {\n xiaoheiAvatarSetMotionPhase(motion, 'idle', now, 1600 + Math.random() * 1200);\n }\n\n var travelling = motion.phase === 'walk' || motion.phase === 'run';\n if (travelling) {\n var running = motion.phase === 'run';\n motion.anchorT += motion.walkDirection\n * (running ? 0.036 : motion.walkSpeed)\n * dt;\n motion.walkPhase += dt * (running ? 9.4 : 6.7);\n var reachedTarget = motion.walkDirection > 0\n ? motion.anchorT >= motion.travelTargetT\n : motion.anchorT <= motion.travelTargetT;\n if (reachedTarget) {\n motion.anchorT = motion.travelTargetT;\n xiaoheiAvatarSetMotionPhase(motion, 'idle', now, 1500 + Math.random() * 1300);\n }\n }\n\n var actions = {\n walk: 'walking',\n run: 'running',\n turn: 'turning',\n 'jump-crouch': 'jumping',\n 'jump-air': 'jumping',\n 'jump-land': 'landing',\n 'sit-down': 'sitting-down',\n sit: 'sitting',\n 'stand-up': 'standing-up'\n };\n motion.action = actions[motion.phase] || 'waiting';\n var locomotionTarget = travelling ? 1 : 0;\n var runTarget = motion.phase === 'run' ? 1 : 0;\n motion.walkBlend += (locomotionTarget - motion.walkBlend)\n * (1 - Math.exp(-dt * 10));\n motion.runBlend += (runTarget - motion.runBlend)\n * (1 - Math.exp(-dt * 10));\n }\n\n if (motion.reportedAction !== motion.action) {\n motion.reportedAction = motion.action;\n document.documentElement.dataset.xiaoheiAvatarAction = motion.action + '-3d';\n document.documentElement.dataset.xiaoheiAvatarPose = motion.action;\n }\n }\n\n function xiaoheiAvatarRestoreImportedRig(rig) {\n Object.keys(rig.restByName).forEach(function (name) {\n var bone = rig.bonesByName[name];\n var rest = rig.restByName[name];\n bone.position.copy(rest.position);\n bone.quaternion.copy(rest.quaternion);\n bone.scale.copy(rest.scale);\n });\n }\n\n function xiaoheiAvatarApplyImportedDelta(rig, name, x, y, z) {\n var bone = rig.bonesByName[name];\n var rest = rig.restByName[name];\n if (!bone || !rest) return;\n xiaoheiMotionEuler.set(x, y, z, 'XYZ');\n xiaoheiMotionDeltaQ.setFromEuler(xiaoheiMotionEuler);\n bone.quaternion.copy(rest.quaternion).multiply(xiaoheiMotionDeltaQ);\n }\n\n function xiaoheiAvatarApplyImportedArmPose(rig, name, base, swing) {\n var bone = rig.bonesByName[name];\n var rest = rig.restByName[name];\n if (!bone || !rest) return;\n xiaoheiMotionEuler.set(swing, 0, 0, 'XYZ');\n xiaoheiMotionDeltaQ.setFromEuler(xiaoheiMotionEuler);\n bone.quaternion.copy(rest.quaternion).multiply(base).multiply(xiaoheiMotionDeltaQ);\n }\n\n function xiaoheiAvatarApplyImportedArmBlend(rig, name, from, to, blend) {\n var bone = rig.bonesByName[name];\n var rest = rig.restByName[name];\n if (!bone || !rest) return;\n xiaoheiMotionPoseQ.copy(from).slerp(to, blend);\n bone.quaternion.copy(rest.quaternion).multiply(xiaoheiMotionPoseQ);\n }\n\n /* Mixamo legs are hinge joints in the sagittal plane. Keep the complete\n gait on each bone's local X axis: this prevents a procedural target from\n twisting a knee sideways or rolling a shoe onto its outer edge. */\n function xiaoheiAvatarResolveImportedLegPose(phase, blend, runBlend) {\n var stanceEnd = THREE.MathUtils.lerp(0.62, 0.54, runBlend);\n var forward = THREE.MathUtils.lerp(0.24, 0.34, runBlend);\n var backward = THREE.MathUtils.lerp(-0.22, -0.30, runBlend);\n var swingKnee = THREE.MathUtils.lerp(0.62, 0.82, runBlend);\n var hip = 0;\n var knee = 0;\n if (phase < stanceEnd) {\n var stance = xiaoheiMotionSmoothstep(0, stanceEnd, phase);\n hip = THREE.MathUtils.lerp(forward, backward, stance);\n knee = -0.045 - Math.sin(Math.PI * stance)\n * THREE.MathUtils.lerp(0.055, 0.10, runBlend);\n } else {\n var swing = xiaoheiMotionSmoothstep(stanceEnd, 1, phase);\n hip = THREE.MathUtils.lerp(backward, forward, swing);\n knee = -0.045 - Math.sin(Math.PI * swing) * swingKnee;\n }\n hip *= blend;\n knee *= blend;\n return {\n hip: hip,\n knee: Math.min(0, knee),\n foot: THREE.MathUtils.clamp(-hip - knee * 0.72, -0.30, 0.46)\n };\n }\n\n function xiaoheiAvatarResolveImportedActionPose(avatar, now) {\n var motion = avatar.motion;\n var progress = xiaoheiAvatarMotionProgress(motion, now);\n var pose = {\n sit: 0,\n crouch: 0,\n air: 0,\n rootY: 0,\n spineX: 0,\n armX: 0\n };\n if (motion.phase === 'sit-down') pose.sit = progress;\n else if (motion.phase === 'sit') pose.sit = 1;\n else if (motion.phase === 'stand-up') pose.sit = 1 - progress;\n else if (motion.phase === 'jump-crouch') pose.crouch = progress;\n else if (motion.phase === 'jump-air') {\n pose.crouch = 1 - Math.sin(Math.PI * progress) * 0.48;\n pose.air = Math.sin(Math.PI * progress);\n } else if (motion.phase === 'jump-land') {\n pose.crouch = 1 - progress;\n }\n pose.rootY = -pose.sit * avatar.reviewedHeight * 0.235\n - pose.crouch * avatar.reviewedHeight * 0.052\n + pose.air * avatar.reviewedHeight * 0.13;\n pose.spineX = pose.sit * 0.12 + pose.crouch * 0.10;\n pose.armX = pose.crouch * 0.10 + pose.air * 0.12;\n return pose;\n }\n\n function xiaoheiAvatarPoseImportedMotion(avatar, now) {\n var motion = avatar.motion;\n var rig = avatar.rig;\n var seconds = now * 0.001;\n var breath = Math.sin(seconds * 1.45);\n var sway = Math.sin(seconds * 0.58 + 0.7);\n var gaze = xiaoheiAvatarHover;\n var pointerX = ndc.x <= 2 ? ndc.x : 0;\n var pointerY = ndc.y <= 2 ? ndc.y : 0;\n var walk = motion.walkBlend || 0;\n var run = motion.runBlend || 0;\n var step = Math.sin(motion.walkPhase || 0) * walk;\n var actionPose = xiaoheiAvatarResolveImportedActionPose(avatar, now);\n var armSwing = step * THREE.MathUtils.lerp(0.055, 0.15, run);\n\n xiaoheiAvatarRestoreImportedRig(rig);\n if (motion.poseReview) {\n var review = xiaoheiMotionSmoothstep(0, 1, motion.reviewProgress || 0);\n var support = xiaoheiMotionSmoothstep(0.12, 0.88, review);\n var seated = xiaoheiMotionSmoothstep(0, 0.78, review);\n var dangling = review > 0.98\n ? Math.sin((now - motion.reviewStarted) * 0.001 * 1.45) * 0.085\n : 0;\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:Spine', seated * 0.075, 0, seated * -0.055\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:Spine2', seated * -0.035, 0, seated * 0.025\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:Head', avatar.screenPitch || 0, 0, seated * 0.035\n );\n xiaoheiAvatarApplyImportedArmBlend(\n rig, 'mixamorig:LeftArm',\n xiaoheiMotionArmDown.leftUpper, xiaoheiMotionSitArms.leftUpper, support\n );\n xiaoheiAvatarApplyImportedArmBlend(\n rig, 'mixamorig:RightArm',\n xiaoheiMotionArmDown.rightUpper, xiaoheiMotionSitArms.rightUpper, support\n );\n xiaoheiAvatarApplyImportedArmBlend(\n rig, 'mixamorig:LeftForeArm',\n xiaoheiMotionArmDown.leftLower, xiaoheiMotionSitArms.leftLower, support\n );\n xiaoheiAvatarApplyImportedArmBlend(\n rig, 'mixamorig:RightForeArm',\n xiaoheiMotionArmDown.rightLower, xiaoheiMotionSitArms.rightLower, support\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:LeftUpLeg', seated * 1.08, 0, 0\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:LeftLeg', seated * (-1.02 + dangling), 0, 0\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:LeftFoot', seated * 0.20, 0, 0\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:RightUpLeg', seated * 0.78, 0, 0\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:RightLeg', seated * -1.26, 0, 0\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:RightFoot', seated * 0.36, 0, 0\n );\n avatar.model.position.y = (avatar.groundOffset || 0)\n - avatar.reviewedHeight * 0.369 * seated;\n avatar.model.scale.set(1, 1, 1);\n return;\n }\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:Spine',\n breath * 0.012 + walk * THREE.MathUtils.lerp(0.025, 0.075, run)\n + actionPose.spineX,\n -sway * 0.010,\n -sway * 0.015\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:Spine2',\n -breath * 0.010,\n sway * 0.012,\n sway * 0.012\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:Head',\n (avatar.screenPitch || 0) + Math.sin(seconds * 0.78) * 0.018 - pointerY * gaze * 0.045,\n pointerX * gaze * 0.12 - sway * 0.012,\n sway * 0.018\n );\n xiaoheiAvatarApplyImportedArmPose(\n rig, 'mixamorig:LeftArm',\n xiaoheiMotionArmDown.leftUpper,\n -armSwing - actionPose.armX + breath * 0.008\n );\n xiaoheiAvatarApplyImportedArmPose(\n rig, 'mixamorig:RightArm',\n xiaoheiMotionArmDown.rightUpper,\n armSwing + actionPose.armX - breath * 0.008\n );\n xiaoheiAvatarApplyImportedArmPose(\n rig, 'mixamorig:LeftForeArm',\n xiaoheiMotionArmDown.leftLower,\n run * Math.max(0, step) * 0.035\n );\n xiaoheiAvatarApplyImportedArmPose(\n rig, 'mixamorig:RightForeArm',\n xiaoheiMotionArmDown.rightLower,\n -run * Math.max(0, -step) * 0.035\n );\n\n avatar.model.position.y = (avatar.groundOffset || 0) + actionPose.rootY;\n avatar.model.scale.set(1, 1, 1);\n if (\n (motion.phase === 'walk' || motion.phase === 'run')\n && walk > 0.04\n && (!avatar.scan || avatar.scan.complete)\n ) {\n var cycle = (motion.walkPhase / (Math.PI * 2)) % 1;\n if (cycle < 0) cycle += 1;\n var leftLeg = xiaoheiAvatarResolveImportedLegPose(cycle, walk, run);\n var rightLeg = xiaoheiAvatarResolveImportedLegPose((cycle + 0.5) % 1, walk, run);\n } else {\n leftLeg = { hip: 0, knee: 0, foot: 0 };\n rightLeg = { hip: 0, knee: 0, foot: 0 };\n }\n var seatedHip = actionPose.sit * 0.82;\n var seatedKnee = actionPose.sit * -1.18;\n var seatedFoot = actionPose.sit * 0.30;\n var jumpHip = actionPose.crouch * 0.20;\n var jumpKnee = actionPose.crouch * -0.58;\n var jumpFoot = actionPose.crouch * 0.22;\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:LeftUpLeg',\n THREE.MathUtils.clamp(leftLeg.hip + seatedHip + jumpHip, -0.55, 1.10), 0, 0\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:LeftLeg',\n THREE.MathUtils.clamp(leftLeg.knee + seatedKnee + jumpKnee, -1.32, 0), 0, 0\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:LeftFoot',\n THREE.MathUtils.clamp(leftLeg.foot + seatedFoot + jumpFoot, -0.34, 0.52), 0, 0\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:RightUpLeg',\n THREE.MathUtils.clamp(rightLeg.hip + seatedHip + jumpHip, -0.55, 1.10), 0, 0\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:RightLeg',\n THREE.MathUtils.clamp(rightLeg.knee + seatedKnee + jumpKnee, -1.32, 0), 0, 0\n );\n xiaoheiAvatarApplyImportedDelta(\n rig, 'mixamorig:RightFoot',\n THREE.MathUtils.clamp(rightLeg.foot + seatedFoot + jumpFoot, -0.34, 0.52), 0, 0\n );\n }\n\n function xiaoheiAvatarPoseMotion(avatar, now) {\n var motion = avatar.motion;\n var rig = avatar.rig;\n if (!motion || !rig) return;\n if (rig.imported) {\n xiaoheiAvatarPoseImportedMotion(avatar, now);\n return;\n }\n if (avatar.animation) {\n if (!avatar.animation.lastNow) avatar.animation.lastNow = now;\n var animationDelta = Math.min(\n 0.05,\n Math.max(0, (now - avatar.animation.lastNow) * 0.001)\n );\n avatar.animation.lastNow = now;\n if (!avatar.scan || avatar.scan.complete) avatar.animation.mixer.update(animationDelta);\n avatar.model.position.y = avatar.groundOffset || 0;\n avatar.model.scale.set(1, 1, 1);\n return;\n }\n var bones = rig.bones;\n var rest = rig.rest;\n var seconds = now * 0.001;\n var breath = Math.sin(seconds * 1.45);\n var breathLift = Math.sin(seconds * 1.45 + 0.58);\n var sway = Math.sin(seconds * 0.56 + 0.7);\n var counterSway = Math.sin(seconds * 0.56 + 2.65);\n var gaze = xiaoheiAvatarHover;\n var pointerX = ndc.x <= 2 ? ndc.x : 0;\n var pointerY = ndc.y <= 2 ? ndc.y : 0;\n var walk = motion.walkBlend || 0;\n var step = Math.sin(motion.walkPhase || 0);\n var stepOpposite = Math.sin((motion.walkPhase || 0) + Math.PI);\n var strideL = step * walk;\n var strideR = stepOpposite * walk;\n var footfall = Math.abs(Math.cos(motion.walkPhase || 0)) * walk;\n\n bones.pelvis.position.y = rest.pelvisY\n + breath * avatar.reviewedHeight * 0.0035 * (1 - walk * 0.65)\n + footfall * avatar.reviewedHeight * 0.0055;\n bones.spine.position.y = rest.spineY + breathLift * avatar.reviewedHeight * 0.0012;\n bones.chest.position.y = rest.chestY + breathLift * avatar.reviewedHeight * 0.0018;\n bones.neck.position.y = rest.neckY;\n bones.head.position.y = rest.headY;\n bones.upperArmL.position.x = rest.upperArmLX * 0.92;\n bones.upperArmR.position.x = rest.upperArmRX * 0.92;\n\n bones.pelvis.rotation.set(strideL * 0.025, sway * 0.006, sway * 0.013);\n bones.spine.rotation.set(breath * 0.007 + walk * 0.035, -sway * 0.010, -sway * 0.020);\n bones.chest.rotation.set(-breath * 0.009 - walk * 0.022, sway * 0.014, sway * 0.014);\n bones.neck.rotation.set(-breath * 0.004, 0, -sway * 0.006);\n bones.head.rotation.set(\n (avatar.screenPitch || 0) + Math.sin(seconds * 0.78) * 0.020 - pointerY * gaze * 0.050,\n pointerX * gaze * 0.135 + counterSway * 0.014,\n sway * 0.026 - pointerX * gaze * 0.012\n );\n\n bones.upperArmL.rotation.set(\n breath * 0.012 + strideR * 0.075,\n -0.075 + sway * 0.010 + strideR * 0.18,\n 1.385 + breath * 0.022 - gaze * 0.016\n );\n bones.lowerArmL.rotation.set(0, 0, 0.165 + breathLift * 0.016 + gaze * 0.012);\n bones.handL.rotation.set(0, -0.018, -0.055 + sway * 0.014);\n bones.upperArmR.rotation.set(\n -breath * 0.012 + strideL * 0.075,\n 0.075 - sway * 0.010 + strideL * 0.18,\n -1.385 - breath * 0.022 + gaze * 0.016\n );\n bones.lowerArmR.rotation.set(0, 0, -0.165 - breathLift * 0.016 - gaze * 0.012);\n bones.handR.rotation.set(0, 0.018, 0.055 - sway * 0.014);\n\n bones.upperLegL.rotation.set(strideL * 0.24, 0, sway * 0.004);\n bones.lowerLegL.rotation.set(Math.max(0, -strideL) * 0.28, 0, 0);\n bones.footL.rotation.set(-strideL * 0.10 - Math.max(0, -strideL) * 0.16, 0, 0);\n bones.upperLegR.rotation.set(strideR * 0.24, 0, -sway * 0.004);\n bones.lowerLegR.rotation.set(Math.max(0, -strideR) * 0.28, 0, 0);\n bones.footR.rotation.set(-strideR * 0.10 - Math.max(0, -strideR) * 0.16, 0, 0);\n\n avatar.model.position.y = breath * avatar.reviewedHeight * 0.0018 * (1 - walk * 0.6);\n avatar.model.scale.set(1, 1, 1);\n }\n";
3
+ //# sourceMappingURL=avatar-motion.d.ts.map