topview-3d-cli 0.1.0__py3-none-any.whl

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 (332) hide show
  1. topview_3d_cli/__init__.py +3 -0
  2. topview_3d_cli/__main__.py +5 -0
  3. topview_3d_cli/_runtime/builtin-assets/LICENSE +396 -0
  4. topview_3d_cli/_runtime/builtin-assets/NOTICE +24 -0
  5. topview_3d_cli/_runtime/builtin-assets/characters/a3d_char_30ec53c93eae4173946b38639691ebe0.glb +0 -0
  6. topview_3d_cli/_runtime/builtin-assets/characters/a3d_char_461b4f4b76ae4b198f439fa4f6f743b6.glb +0 -0
  7. topview_3d_cli/_runtime/builtin-assets/characters/a3d_char_7d220ac359844c80a8faaf0e25478477.glb +0 -0
  8. topview_3d_cli/_runtime/builtin-assets/characters/a3d_char_de37873a79244fbe8a0660ea08d1b4ab.glb +0 -0
  9. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-attack-jab.webp +0 -0
  10. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-attack-lunge.webp +0 -0
  11. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-attack-rear.webp +0 -0
  12. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-crawling-forward-reaching-with-le.webp +0 -0
  13. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-exaggerated-punch-with-right-hand.webp +0 -0
  14. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-examine-fwd.webp +0 -0
  15. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-holding-bow.webp +0 -0
  16. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-jab-with-right-hand.webp +0 -0
  17. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-on-hands-and-toes-right-leg-forwa.webp +0 -0
  18. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-on-right-leg.webp +0 -0
  19. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-push-up.webp +0 -0
  20. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-pushing-backwards.webp +0 -0
  21. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-pushing-with-both-hands.webp +0 -0
  22. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-pushing-with-left-side-of-body.webp +0 -0
  23. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-sliding.webp +0 -0
  24. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-arms-spread-looking-upwards.webp +0 -0
  25. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-examine-fwd.webp +0 -0
  26. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-lean-fwd-right-hand-supporting.webp +0 -0
  27. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-leaning-against-object-look-l.webp +0 -0
  28. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-look-back.webp +0 -0
  29. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-look-down-back.webp +0 -0
  30. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-look-fwd-f.webp +0 -0
  31. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-look-fwd-m.webp +0 -0
  32. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-on-knees-arms-up.webp +0 -0
  33. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-sneaking.webp +0 -0
  34. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-l-toe-top-of-right-foot.webp +0 -0
  35. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-legs-spread-lean-l.webp +0 -0
  36. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-legs-spread-lean-r.webp +0 -0
  37. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-legs-x.webp +0 -0
  38. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-r-foot-arms-extended-backwards.webp +0 -0
  39. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-r-toe-arms-up.webp +0 -0
  40. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-r-toe-l-leg-up.webp +0 -0
  41. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-toes-arch.webp +0 -0
  42. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-toes-reach.webp +0 -0
  43. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dyn-floating-bent-forwards.webp +0 -0
  44. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dyn-floating-left-leg-bent-hands-spread.webp +0 -0
  45. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dyn-floating-legs-bent-and-arms-spread.webp +0 -0
  46. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dyn-floating-legs-raised-arms-extended-u.webp +0 -0
  47. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dyn-l-toe-look-l.webp +0 -0
  48. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dyn-leaping-forward-arms-extended-backwa.webp +0 -0
  49. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dynamic-float-arch.webp +0 -0
  50. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dynamic-float-dive.webp +0 -0
  51. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-back-arched-arms-supp.webp +0 -0
  52. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-legs-to-side-arms-up.webp +0 -0
  53. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-legs-x-arms-supp.webp +0 -0
  54. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-back-left-leg-bent-hands-head.webp +0 -0
  55. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-back-left-leg-bent.webp +0 -0
  56. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-back-legs-x-hands-head.webp +0 -0
  57. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-left-side-left-arm-supporting-hea.webp +0 -0
  58. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-left-side-left-arm-supporting.webp +0 -0
  59. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-right-side-right-arm-supporting.webp +0 -0
  60. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-right-side-right-hand-supporting.webp +0 -0
  61. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-stomach-elbows-supporting.webp +0 -0
  62. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-right-arm-supporting-l-arm-up.webp +0 -0
  63. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-right-leg-forward-arms-supp.webp +0 -0
  64. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-run-fwd.webp +0 -0
  65. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-run-reach.webp +0 -0
  66. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-sneaking-forward.webp +0 -0
  67. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-sprinting.webp +0 -0
  68. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-stepping-forward-look-l.webp +0 -0
  69. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-walk-fwd-look-r.webp +0 -0
  70. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-walk-fwd.webp +0 -0
  71. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-walking-arms-on-hips.webp +0 -0
  72. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-walking-right-arm-on-hip.webp +0 -0
  73. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-walking.webp +0 -0
  74. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-arms-holding-left-knee-reclining.webp +0 -0
  75. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-arms-holding-right-knee.webp +0 -0
  76. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-arms-resting-on-knees.webp +0 -0
  77. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-arms-supp.webp +0 -0
  78. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-arms-up.webp +0 -0
  79. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-elbows-on-legs-lean-fwd.webp +0 -0
  80. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-elbows-on-legs-lean-l.webp +0 -0
  81. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-knees-up-hold.webp +0 -0
  82. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-lean-back-arms-supp.webp +0 -0
  83. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-lean-fwd-elbows-on-knees.webp +0 -0
  84. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-lean-fwd-hands-in-front.webp +0 -0
  85. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-legs-x-arms-x.webp +0 -0
  86. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-legs-x-hands-head.webp +0 -0
  87. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-legs-x-hold.webp +0 -0
  88. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-legs-x-reclining.webp +0 -0
  89. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-legs-x-right-arm-over-knee.webp +0 -0
  90. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reaching-hands-towards-toes.webp +0 -0
  91. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reaching-left-hand-towards-right-toe.webp +0 -0
  92. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reclined-facepalm.webp +0 -0
  93. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reclined-hands-head.webp +0 -0
  94. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reclined-left-leg-crossed-hands-head.webp +0 -0
  95. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reclined-left-leg-crossed.webp +0 -0
  96. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reclined-look-down.webp +0 -0
  97. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reclined-right-leg-crossed-hands-hea.webp +0 -0
  98. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-rev-sit-hands-grasping.webp +0 -0
  99. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-rev-sit-hands-relaxed.webp +0 -0
  100. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-arms-behind-back.webp +0 -0
  101. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-arms-down.webp +0 -0
  102. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-arms-slightly-spread.webp +0 -0
  103. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-bending-forward-arms-x-over-knees.webp +0 -0
  104. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-hands-on-hips-look-back.webp +0 -0
  105. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-l-hip-f.webp +0 -0
  106. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-l-hip-m.webp +0 -0
  107. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-l-leg-r-hip-l-arm-up.webp +0 -0
  108. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-lean-back-arms-behind.webp +0 -0
  109. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-lean-back-l-hip.webp +0 -0
  110. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-left-elbow-resting-obj.webp +0 -0
  111. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-left-leg-obj-left-hand-on-knee-r-h.webp +0 -0
  112. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-left-leg-obj-left-hand-on-knee.webp +0 -0
  113. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-legs-x-arms-up.webp +0 -0
  114. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-legs-x-l-hip.webp +0 -0
  115. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-legs-x-leaning-obj.webp +0 -0
  116. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-legs-x-left-arm-obj-r-hip.webp +0 -0
  117. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-look-down-r.webp +0 -0
  118. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-look-fwd.webp +0 -0
  119. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-look-l.webp +0 -0
  120. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-look-r.webp +0 -0
  121. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-r-arm-up-l-hip.webp +0 -0
  122. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-r-foot-l-leg-up.webp +0 -0
  123. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-r-foot-up.webp +0 -0
  124. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-r-hip-l-arm-up.webp +0 -0
  125. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-r-hip.webp +0 -0
  126. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-right-hand-behind-head.webp +0 -0
  127. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-right-leg-obj-arms-x.webp +0 -0
  128. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-right-leg-obj-l-hip-right-hand-on.webp +0 -0
  129. topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_t-pose.webp +0 -0
  130. topview_3d_cli/_runtime/builtin-assets/manifest.json +2372 -0
  131. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-attack-jab.json +1 -0
  132. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-attack-lunge.json +1 -0
  133. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-attack-rear.json +1 -0
  134. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-crawling-forward-reaching-with-le.json +1 -0
  135. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-exaggerated-punch-with-right-hand.json +1 -0
  136. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-examine-fwd.json +1 -0
  137. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-holding-bow.json +1 -0
  138. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-jab-with-right-hand.json +1 -0
  139. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-on-hands-and-toes-right-leg-forwa.json +1 -0
  140. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-on-right-leg.json +1 -0
  141. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-push-up.json +1 -0
  142. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-pushing-backwards.json +1 -0
  143. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-pushing-with-both-hands.json +1 -0
  144. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-pushing-with-left-side-of-body.json +1 -0
  145. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-sliding.json +1 -0
  146. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-arms-spread-looking-upwards.json +1 -0
  147. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-examine-fwd.json +1 -0
  148. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-lean-fwd-right-hand-supporting.json +1 -0
  149. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-leaning-against-object-look-l.json +1 -0
  150. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-look-back.json +1 -0
  151. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-look-down-back.json +1 -0
  152. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-look-fwd-f.json +1 -0
  153. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-look-fwd-m.json +1 -0
  154. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-on-knees-arms-up.json +1 -0
  155. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-sneaking.json +1 -0
  156. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-l-toe-top-of-right-foot.json +1 -0
  157. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-legs-spread-lean-l.json +1 -0
  158. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-legs-spread-lean-r.json +1 -0
  159. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-legs-x.json +1 -0
  160. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-r-foot-arms-extended-backwards.json +1 -0
  161. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-r-toe-arms-up.json +1 -0
  162. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-r-toe-l-leg-up.json +1 -0
  163. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-toes-arch.json +1 -0
  164. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-toes-reach.json +1 -0
  165. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dyn-floating-bent-forwards.json +1 -0
  166. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dyn-floating-left-leg-bent-hands-spread.json +1 -0
  167. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dyn-floating-legs-bent-and-arms-spread.json +1 -0
  168. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dyn-floating-legs-raised-arms-extended-u.json +1 -0
  169. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dyn-l-toe-look-l.json +1 -0
  170. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dyn-leaping-forward-arms-extended-backwa.json +1 -0
  171. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dynamic-float-arch.json +1 -0
  172. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dynamic-float-dive.json +1 -0
  173. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-back-arched-arms-supp.json +1 -0
  174. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-legs-to-side-arms-up.json +1 -0
  175. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-legs-x-arms-supp.json +1 -0
  176. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-back-left-leg-bent-hands-head.json +1 -0
  177. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-back-left-leg-bent.json +1 -0
  178. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-back-legs-x-hands-head.json +1 -0
  179. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-left-side-left-arm-supporting-hea.json +1 -0
  180. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-left-side-left-arm-supporting.json +1 -0
  181. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-right-side-right-arm-supporting.json +1 -0
  182. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-right-side-right-hand-supporting.json +1 -0
  183. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-stomach-elbows-supporting.json +1 -0
  184. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-right-arm-supporting-l-arm-up.json +1 -0
  185. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-right-leg-forward-arms-supp.json +1 -0
  186. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-run-fwd.json +1 -0
  187. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-run-reach.json +1 -0
  188. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-sneaking-forward.json +1 -0
  189. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-sprinting.json +1 -0
  190. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-stepping-forward-look-l.json +1 -0
  191. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-walk-fwd-look-r.json +1 -0
  192. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-walk-fwd.json +1 -0
  193. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-walking-arms-on-hips.json +1 -0
  194. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-walking-right-arm-on-hip.json +1 -0
  195. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-walking.json +1 -0
  196. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-arms-holding-left-knee-reclining.json +1 -0
  197. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-arms-holding-right-knee.json +1 -0
  198. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-arms-resting-on-knees.json +1 -0
  199. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-arms-supp.json +1 -0
  200. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-arms-up.json +1 -0
  201. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-elbows-on-legs-lean-fwd.json +1 -0
  202. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-elbows-on-legs-lean-l.json +1 -0
  203. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-knees-up-hold.json +1 -0
  204. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-lean-back-arms-supp.json +1 -0
  205. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-lean-fwd-elbows-on-knees.json +1 -0
  206. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-lean-fwd-hands-in-front.json +1 -0
  207. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-legs-x-arms-x.json +1 -0
  208. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-legs-x-hands-head.json +1 -0
  209. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-legs-x-hold.json +1 -0
  210. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-legs-x-reclining.json +1 -0
  211. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-legs-x-right-arm-over-knee.json +1 -0
  212. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reaching-hands-towards-toes.json +1 -0
  213. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reaching-left-hand-towards-right-toe.json +1 -0
  214. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reclined-facepalm.json +1 -0
  215. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reclined-hands-head.json +1 -0
  216. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reclined-left-leg-crossed-hands-head.json +1 -0
  217. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reclined-left-leg-crossed.json +1 -0
  218. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reclined-look-down.json +1 -0
  219. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reclined-right-leg-crossed-hands-hea.json +1 -0
  220. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-rev-sit-hands-grasping.json +1 -0
  221. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-rev-sit-hands-relaxed.json +1 -0
  222. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-arms-behind-back.json +1 -0
  223. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-arms-down.json +1 -0
  224. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-arms-slightly-spread.json +1 -0
  225. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-bending-forward-arms-x-over-knees.json +1 -0
  226. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-hands-on-hips-look-back.json +1 -0
  227. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-l-hip-f.json +1 -0
  228. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-l-hip-m.json +1 -0
  229. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-l-leg-r-hip-l-arm-up.json +1 -0
  230. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-lean-back-arms-behind.json +1 -0
  231. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-lean-back-l-hip.json +1 -0
  232. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-left-elbow-resting-obj.json +1 -0
  233. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-left-leg-obj-left-hand-on-knee-r-h.json +1 -0
  234. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-left-leg-obj-left-hand-on-knee.json +1 -0
  235. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-legs-x-arms-up.json +1 -0
  236. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-legs-x-l-hip.json +1 -0
  237. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-legs-x-leaning-obj.json +1 -0
  238. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-legs-x-left-arm-obj-r-hip.json +1 -0
  239. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-look-down-r.json +1 -0
  240. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-look-fwd.json +1 -0
  241. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-look-l.json +1 -0
  242. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-look-r.json +1 -0
  243. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-r-arm-up-l-hip.json +1 -0
  244. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-r-foot-l-leg-up.json +1 -0
  245. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-r-foot-up.json +1 -0
  246. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-r-hip-l-arm-up.json +1 -0
  247. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-r-hip.json +1 -0
  248. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-right-hand-behind-head.json +1 -0
  249. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-right-leg-obj-arms-x.json +1 -0
  250. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-right-leg-obj-l-hip-right-hand-on.json +1 -0
  251. topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_t-pose.json +1 -0
  252. topview_3d_cli/_runtime/director-cli/applyIntent.mjs +35 -0
  253. topview_3d_cli/_runtime/director-cli/browser.mjs +47 -0
  254. topview_3d_cli/_runtime/director-cli/cli.mjs +56 -0
  255. topview_3d_cli/_runtime/director-cli/editSequence.mjs +125 -0
  256. topview_3d_cli/_runtime/director-cli/evaluate.mjs +254 -0
  257. topview_3d_cli/_runtime/director-cli/mediaUrl.mjs +47 -0
  258. topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/dist/draco/draco_decoder.js +34 -0
  259. topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/dist/draco/draco_decoder.wasm +0 -0
  260. topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/dist/draco/draco_wasm_wrapper.js +117 -0
  261. topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/dist/engine/index.mjs +22219 -0
  262. topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/dist/evaluate/index.mjs +4229 -0
  263. topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/dist/headless/index.mjs +22832 -0
  264. topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/package.json +75 -0
  265. topview_3d_cli/_runtime/director-cli/node_modules/three/LICENSE +21 -0
  266. topview_3d_cli/_runtime/director-cli/node_modules/three/build/three.core.js +59732 -0
  267. topview_3d_cli/_runtime/director-cli/node_modules/three/build/three.module.js +19552 -0
  268. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/controls/OrbitControls.js +1963 -0
  269. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/curves/NURBSCurve.js +155 -0
  270. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/curves/NURBSUtils.js +532 -0
  271. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/libs/draco/draco_decoder.js +34 -0
  272. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/libs/draco/draco_decoder.wasm +0 -0
  273. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/libs/draco/draco_wasm_wrapper.js +117 -0
  274. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/libs/fflate.module.js +2672 -0
  275. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/lines/LineMaterial.js +703 -0
  276. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/lines/LineSegments2.js +426 -0
  277. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/lines/LineSegmentsGeometry.js +298 -0
  278. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/loaders/DRACOLoader.js +739 -0
  279. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/loaders/FBXLoader.js +4580 -0
  280. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/loaders/GLTFLoader.js +4860 -0
  281. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/utils/BufferGeometryUtils.js +1434 -0
  282. topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/utils/SkeletonUtils.js +496 -0
  283. topview_3d_cli/_runtime/director-cli/node_modules/three/package.json +123 -0
  284. topview_3d_cli/_runtime/director-cli/node_modules/zod/LICENSE +21 -0
  285. topview_3d_cli/_runtime/director-cli/node_modules/zod/index.js +4 -0
  286. topview_3d_cli/_runtime/director-cli/node_modules/zod/package.json +118 -0
  287. topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/ZodError.js +133 -0
  288. topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/errors.js +9 -0
  289. topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/external.js +6 -0
  290. topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  291. topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  292. topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  293. topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/helpers/util.js +133 -0
  294. topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/locales/en.js +109 -0
  295. topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/types.js +3693 -0
  296. topview_3d_cli/_runtime/director-cli/package.json +6 -0
  297. topview_3d_cli/_runtime/director-cli/playwright.mjs +26 -0
  298. topview_3d_cli/_runtime/director-cli/render.mjs +336 -0
  299. topview_3d_cli/_runtime/director-cli/static/headless.html +124 -0
  300. topview_3d_cli/_runtime/director-cli/static/measure.mjs +61 -0
  301. topview_3d_cli/_runtime/director-cli/static/pose.mjs +71 -0
  302. topview_3d_cli/_runtime/director-cli/staticIntent.mjs +135 -0
  303. topview_3d_cli/_runtime/runtime.json +6 -0
  304. topview_3d_cli/bom.py +326 -0
  305. topview_3d_cli/contracts/director-v1/schema/director-document.schema.json +1097 -0
  306. topview_3d_cli/contracts/director-v1/schema/fcurves-compact-v1.schema.json +105 -0
  307. topview_3d_cli/director_camera_view.py +54 -0
  308. topview_3d_cli/director_document.py +793 -0
  309. topview_3d_cli/director_geometry.py +66 -0
  310. topview_3d_cli/director_operations.py +679 -0
  311. topview_3d_cli/director_static.py +134 -0
  312. topview_3d_cli/local_assets.py +248 -0
  313. topview_3d_cli/local_bom.py +108 -0
  314. topview_3d_cli/local_catalog.py +156 -0
  315. topview_3d_cli/local_cli.py +493 -0
  316. topview_3d_cli/local_edit.py +350 -0
  317. topview_3d_cli/local_errors.py +104 -0
  318. topview_3d_cli/local_inspect.py +302 -0
  319. topview_3d_cli/local_project.py +280 -0
  320. topview_3d_cli/local_read.py +139 -0
  321. topview_3d_cli/local_render.py +97 -0
  322. topview_3d_cli/node_batch.py +299 -0
  323. topview_3d_cli/renderer.py +75 -0
  324. topview_3d_cli/runtime.py +107 -0
  325. topview_3d_cli-0.1.0.dist-info/METADATA +48 -0
  326. topview_3d_cli-0.1.0.dist-info/RECORD +332 -0
  327. topview_3d_cli-0.1.0.dist-info/WHEEL +5 -0
  328. topview_3d_cli-0.1.0.dist-info/entry_points.txt +2 -0
  329. topview_3d_cli-0.1.0.dist-info/licenses/LICENSE +202 -0
  330. topview_3d_cli-0.1.0.dist-info/licenses/LICENSE-ASSETS +396 -0
  331. topview_3d_cli-0.1.0.dist-info/licenses/NOTICE +18 -0
  332. topview_3d_cli-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,155 @@
1
+ import {
2
+ Curve,
3
+ Vector3,
4
+ Vector4
5
+ } from 'three';
6
+ import * as NURBSUtils from '../curves/NURBSUtils.js';
7
+
8
+ /**
9
+ * This class represents a NURBS curve.
10
+ *
11
+ * Implementation is based on `(x, y [, z=0 [, w=1]])` control points with `w=weight`.
12
+ *
13
+ * @augments Curve
14
+ * @three_import import { NURBSCurve } from 'three/addons/curves/NURBSCurve.js';
15
+ */
16
+ class NURBSCurve extends Curve {
17
+
18
+ /**
19
+ * Constructs a new NURBS curve.
20
+ *
21
+ * @param {number} degree - The NURBS degree.
22
+ * @param {Array<number>} knots - The knots as a flat array of numbers.
23
+ * @param {Array<Vector2|Vector3|Vector4>} controlPoints - An array holding control points.
24
+ * @param {number} [startKnot] - Index of the start knot into the `knots` array.
25
+ * @param {number} [endKnot] - Index of the end knot into the `knots` array.
26
+ */
27
+ constructor( degree, knots, controlPoints, startKnot, endKnot ) {
28
+
29
+ super();
30
+
31
+ const knotsLength = knots ? knots.length - 1 : 0;
32
+ const pointsLength = controlPoints ? controlPoints.length : 0;
33
+
34
+ /**
35
+ * The NURBS degree.
36
+ *
37
+ * @type {number}
38
+ */
39
+ this.degree = degree;
40
+
41
+ /**
42
+ * The knots as a flat array of numbers.
43
+ *
44
+ * @type {Array<number>}
45
+ */
46
+ this.knots = knots;
47
+
48
+ /**
49
+ * An array of control points.
50
+ *
51
+ * @type {Array<Vector4>}
52
+ */
53
+ this.controlPoints = [];
54
+
55
+ /**
56
+ * Index of the start knot into the `knots` array.
57
+ *
58
+ * @type {number}
59
+ */
60
+ this.startKnot = startKnot || 0;
61
+
62
+ /**
63
+ * Index of the end knot into the `knots` array.
64
+ *
65
+ * @type {number}
66
+ */
67
+ this.endKnot = endKnot || knotsLength;
68
+
69
+ for ( let i = 0; i < pointsLength; ++ i ) {
70
+
71
+ // ensure Vector4 for control points
72
+ const point = controlPoints[ i ];
73
+ this.controlPoints[ i ] = new Vector4( point.x, point.y, point.z, point.w );
74
+
75
+ }
76
+
77
+ }
78
+
79
+ /**
80
+ * This method returns a vector in 3D space for the given interpolation factor.
81
+ *
82
+ * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`.
83
+ * @param {Vector3} [optionalTarget] - The optional target vector the result is written to.
84
+ * @return {Vector3} The position on the curve.
85
+ */
86
+ getPoint( t, optionalTarget = new Vector3() ) {
87
+
88
+ const point = optionalTarget;
89
+
90
+ const u = this.knots[ this.startKnot ] + t * ( this.knots[ this.endKnot ] - this.knots[ this.startKnot ] ); // linear mapping t->u
91
+
92
+ // following results in (wx, wy, wz, w) homogeneous point
93
+ const hpoint = NURBSUtils.calcBSplinePoint( this.degree, this.knots, this.controlPoints, u );
94
+
95
+ if ( hpoint.w !== 1.0 ) {
96
+
97
+ // project to 3D space: (wx, wy, wz, w) -> (x, y, z, 1)
98
+ hpoint.divideScalar( hpoint.w );
99
+
100
+ }
101
+
102
+ return point.set( hpoint.x, hpoint.y, hpoint.z );
103
+
104
+ }
105
+
106
+ /**
107
+ * Returns a unit vector tangent for the given interpolation factor.
108
+ *
109
+ * @param {number} t - The interpolation factor.
110
+ * @param {Vector3} [optionalTarget] - The optional target vector the result is written to.
111
+ * @return {Vector3} The tangent vector.
112
+ */
113
+ getTangent( t, optionalTarget = new Vector3() ) {
114
+
115
+ const tangent = optionalTarget;
116
+
117
+ const u = this.knots[ 0 ] + t * ( this.knots[ this.knots.length - 1 ] - this.knots[ 0 ] );
118
+ const ders = NURBSUtils.calcNURBSDerivatives( this.degree, this.knots, this.controlPoints, u, 1 );
119
+ tangent.copy( ders[ 1 ] ).normalize();
120
+
121
+ return tangent;
122
+
123
+ }
124
+
125
+ toJSON() {
126
+
127
+ const data = super.toJSON();
128
+
129
+ data.degree = this.degree;
130
+ data.knots = [ ...this.knots ];
131
+ data.controlPoints = this.controlPoints.map( p => p.toArray() );
132
+ data.startKnot = this.startKnot;
133
+ data.endKnot = this.endKnot;
134
+
135
+ return data;
136
+
137
+ }
138
+
139
+ fromJSON( json ) {
140
+
141
+ super.fromJSON( json );
142
+
143
+ this.degree = json.degree;
144
+ this.knots = [ ...json.knots ];
145
+ this.controlPoints = json.controlPoints.map( p => new Vector4( p[ 0 ], p[ 1 ], p[ 2 ], p[ 3 ] ) );
146
+ this.startKnot = json.startKnot;
147
+ this.endKnot = json.endKnot;
148
+
149
+ return this;
150
+
151
+ }
152
+
153
+ }
154
+
155
+ export { NURBSCurve };
@@ -0,0 +1,532 @@
1
+ import {
2
+ Vector3,
3
+ Vector4
4
+ } from 'three';
5
+
6
+ /**
7
+ * @module NURBSUtils
8
+ * @three_import import * as NURBSUtils from 'three/addons/curves/NURBSUtils.js';
9
+ */
10
+
11
+ /**
12
+ * Finds knot vector span.
13
+ *
14
+ * @param {number} p - The degree.
15
+ * @param {number} u - The parametric value.
16
+ * @param {Array<number>} U - The knot vector.
17
+ * @return {number} The span.
18
+ */
19
+ function findSpan( p, u, U ) {
20
+
21
+ const n = U.length - p - 1;
22
+
23
+ if ( u >= U[ n ] ) {
24
+
25
+ return n - 1;
26
+
27
+ }
28
+
29
+ if ( u <= U[ p ] ) {
30
+
31
+ return p;
32
+
33
+ }
34
+
35
+ let low = p;
36
+ let high = n;
37
+ let mid = Math.floor( ( low + high ) / 2 );
38
+
39
+ while ( u < U[ mid ] || u >= U[ mid + 1 ] ) {
40
+
41
+ if ( u < U[ mid ] ) {
42
+
43
+ high = mid;
44
+
45
+ } else {
46
+
47
+ low = mid;
48
+
49
+ }
50
+
51
+ mid = Math.floor( ( low + high ) / 2 );
52
+
53
+ }
54
+
55
+ return mid;
56
+
57
+ }
58
+
59
+ /**
60
+ * Calculates basis functions. See The NURBS Book, page 70, algorithm A2.2.
61
+ *
62
+ * @param {number} span - The span in which `u` lies.
63
+ * @param {number} u - The parametric value.
64
+ * @param {number} p - The degree.
65
+ * @param {Array<number>} U - The knot vector.
66
+ * @return {Array<number>} Array[p+1] with basis functions values.
67
+ */
68
+ function calcBasisFunctions( span, u, p, U ) {
69
+
70
+ const N = [];
71
+ const left = [];
72
+ const right = [];
73
+ N[ 0 ] = 1.0;
74
+
75
+ for ( let j = 1; j <= p; ++ j ) {
76
+
77
+ left[ j ] = u - U[ span + 1 - j ];
78
+ right[ j ] = U[ span + j ] - u;
79
+
80
+ let saved = 0.0;
81
+
82
+ for ( let r = 0; r < j; ++ r ) {
83
+
84
+ const rv = right[ r + 1 ];
85
+ const lv = left[ j - r ];
86
+ const temp = N[ r ] / ( rv + lv );
87
+ N[ r ] = saved + rv * temp;
88
+ saved = lv * temp;
89
+
90
+ }
91
+
92
+ N[ j ] = saved;
93
+
94
+ }
95
+
96
+ return N;
97
+
98
+ }
99
+
100
+ /**
101
+ * Calculates B-Spline curve points. See The NURBS Book, page 82, algorithm A3.1.
102
+ *
103
+ * @param {number} p - The degree of the B-Spline.
104
+ * @param {Array<number>} U - The knot vector.
105
+ * @param {Array<Vector4>} P - The control points
106
+ * @param {number} u - The parametric point.
107
+ * @return {Vector4} The point for given `u`.
108
+ */
109
+ function calcBSplinePoint( p, U, P, u ) {
110
+
111
+ const span = findSpan( p, u, U );
112
+ const N = calcBasisFunctions( span, u, p, U );
113
+ const C = new Vector4( 0, 0, 0, 0 );
114
+
115
+ for ( let j = 0; j <= p; ++ j ) {
116
+
117
+ const point = P[ span - p + j ];
118
+ const Nj = N[ j ];
119
+ const wNj = point.w * Nj;
120
+ C.x += point.x * wNj;
121
+ C.y += point.y * wNj;
122
+ C.z += point.z * wNj;
123
+ C.w += point.w * Nj;
124
+
125
+ }
126
+
127
+ return C;
128
+
129
+ }
130
+
131
+ /**
132
+ * Calculates basis functions derivatives. See The NURBS Book, page 72, algorithm A2.3.
133
+ *
134
+ * @param {number} span - The span in which `u` lies.
135
+ * @param {number} u - The parametric point.
136
+ * @param {number} p - The degree.
137
+ * @param {number} n - number of derivatives to calculate
138
+ * @param {Array<number>} U - The knot vector.
139
+ * @return {Array<Array<number>>} An array[n+1][p+1] with basis functions derivatives.
140
+ */
141
+ function calcBasisFunctionDerivatives( span, u, p, n, U ) {
142
+
143
+ const zeroArr = [];
144
+ for ( let i = 0; i <= p; ++ i )
145
+ zeroArr[ i ] = 0.0;
146
+
147
+ const ders = [];
148
+
149
+ for ( let i = 0; i <= n; ++ i )
150
+ ders[ i ] = zeroArr.slice( 0 );
151
+
152
+ const ndu = [];
153
+
154
+ for ( let i = 0; i <= p; ++ i )
155
+ ndu[ i ] = zeroArr.slice( 0 );
156
+
157
+ ndu[ 0 ][ 0 ] = 1.0;
158
+
159
+ const left = zeroArr.slice( 0 );
160
+ const right = zeroArr.slice( 0 );
161
+
162
+ for ( let j = 1; j <= p; ++ j ) {
163
+
164
+ left[ j ] = u - U[ span + 1 - j ];
165
+ right[ j ] = U[ span + j ] - u;
166
+
167
+ let saved = 0.0;
168
+
169
+ for ( let r = 0; r < j; ++ r ) {
170
+
171
+ const rv = right[ r + 1 ];
172
+ const lv = left[ j - r ];
173
+ ndu[ j ][ r ] = rv + lv;
174
+
175
+ const temp = ndu[ r ][ j - 1 ] / ndu[ j ][ r ];
176
+ ndu[ r ][ j ] = saved + rv * temp;
177
+ saved = lv * temp;
178
+
179
+ }
180
+
181
+ ndu[ j ][ j ] = saved;
182
+
183
+ }
184
+
185
+ for ( let j = 0; j <= p; ++ j ) {
186
+
187
+ ders[ 0 ][ j ] = ndu[ j ][ p ];
188
+
189
+ }
190
+
191
+ for ( let r = 0; r <= p; ++ r ) {
192
+
193
+ let s1 = 0;
194
+ let s2 = 1;
195
+
196
+ const a = [];
197
+ for ( let i = 0; i <= p; ++ i ) {
198
+
199
+ a[ i ] = zeroArr.slice( 0 );
200
+
201
+ }
202
+
203
+ a[ 0 ][ 0 ] = 1.0;
204
+
205
+ for ( let k = 1; k <= n; ++ k ) {
206
+
207
+ let d = 0.0;
208
+ const rk = r - k;
209
+ const pk = p - k;
210
+
211
+ if ( r >= k ) {
212
+
213
+ a[ s2 ][ 0 ] = a[ s1 ][ 0 ] / ndu[ pk + 1 ][ rk ];
214
+ d = a[ s2 ][ 0 ] * ndu[ rk ][ pk ];
215
+
216
+ }
217
+
218
+ const j1 = ( rk >= - 1 ) ? 1 : - rk;
219
+ const j2 = ( r - 1 <= pk ) ? k - 1 : p - r;
220
+
221
+ for ( let j = j1; j <= j2; ++ j ) {
222
+
223
+ a[ s2 ][ j ] = ( a[ s1 ][ j ] - a[ s1 ][ j - 1 ] ) / ndu[ pk + 1 ][ rk + j ];
224
+ d += a[ s2 ][ j ] * ndu[ rk + j ][ pk ];
225
+
226
+ }
227
+
228
+ if ( r <= pk ) {
229
+
230
+ a[ s2 ][ k ] = - a[ s1 ][ k - 1 ] / ndu[ pk + 1 ][ r ];
231
+ d += a[ s2 ][ k ] * ndu[ r ][ pk ];
232
+
233
+ }
234
+
235
+ ders[ k ][ r ] = d;
236
+
237
+ const j = s1;
238
+ s1 = s2;
239
+ s2 = j;
240
+
241
+ }
242
+
243
+ }
244
+
245
+ let r = p;
246
+
247
+ for ( let k = 1; k <= n; ++ k ) {
248
+
249
+ for ( let j = 0; j <= p; ++ j ) {
250
+
251
+ ders[ k ][ j ] *= r;
252
+
253
+ }
254
+
255
+ r *= p - k;
256
+
257
+ }
258
+
259
+ return ders;
260
+
261
+ }
262
+
263
+ /**
264
+ * Calculates derivatives of a B-Spline. See The NURBS Book, page 93, algorithm A3.2.
265
+ *
266
+ * @param {number} p - The degree.
267
+ * @param {Array<number>} U - The knot vector.
268
+ * @param {Array<Vector4>} P - The control points
269
+ * @param {number} u - The parametric point.
270
+ * @param {number} nd - The number of derivatives.
271
+ * @return {Array<Vector4>} An array[d+1] with derivatives.
272
+ */
273
+ function calcBSplineDerivatives( p, U, P, u, nd ) {
274
+
275
+ const du = nd < p ? nd : p;
276
+ const CK = [];
277
+ const span = findSpan( p, u, U );
278
+ const nders = calcBasisFunctionDerivatives( span, u, p, du, U );
279
+ const Pw = [];
280
+
281
+ for ( let i = 0; i < P.length; ++ i ) {
282
+
283
+ const point = P[ i ].clone();
284
+ const w = point.w;
285
+
286
+ point.x *= w;
287
+ point.y *= w;
288
+ point.z *= w;
289
+
290
+ Pw[ i ] = point;
291
+
292
+ }
293
+
294
+ for ( let k = 0; k <= du; ++ k ) {
295
+
296
+ const point = Pw[ span - p ].clone().multiplyScalar( nders[ k ][ 0 ] );
297
+
298
+ for ( let j = 1; j <= p; ++ j ) {
299
+
300
+ point.add( Pw[ span - p + j ].clone().multiplyScalar( nders[ k ][ j ] ) );
301
+
302
+ }
303
+
304
+ CK[ k ] = point;
305
+
306
+ }
307
+
308
+ for ( let k = du + 1; k <= nd + 1; ++ k ) {
309
+
310
+ CK[ k ] = new Vector4( 0, 0, 0 );
311
+
312
+ }
313
+
314
+ return CK;
315
+
316
+ }
317
+
318
+ /**
319
+ * Calculates "K over I".
320
+ *
321
+ * @param {number} k - The K value.
322
+ * @param {number} i - The I value.
323
+ * @return {number} k!/(i!(k-i)!)
324
+ */
325
+ function calcKoverI( k, i ) {
326
+
327
+ let nom = 1;
328
+
329
+ for ( let j = 2; j <= k; ++ j ) {
330
+
331
+ nom *= j;
332
+
333
+ }
334
+
335
+ let denom = 1;
336
+
337
+ for ( let j = 2; j <= i; ++ j ) {
338
+
339
+ denom *= j;
340
+
341
+ }
342
+
343
+ for ( let j = 2; j <= k - i; ++ j ) {
344
+
345
+ denom *= j;
346
+
347
+ }
348
+
349
+ return nom / denom;
350
+
351
+ }
352
+
353
+ /**
354
+ * Calculates derivatives (0-nd) of rational curve. See The NURBS Book, page 127, algorithm A4.2.
355
+ *
356
+ * @param {Array<Vector4>} Pders - Array with derivatives.
357
+ * @return {Array<Vector3>} An array with derivatives for rational curve.
358
+ */
359
+ function calcRationalCurveDerivatives( Pders ) {
360
+
361
+ const nd = Pders.length;
362
+ const Aders = [];
363
+ const wders = [];
364
+
365
+ for ( let i = 0; i < nd; ++ i ) {
366
+
367
+ const point = Pders[ i ];
368
+ Aders[ i ] = new Vector3( point.x, point.y, point.z );
369
+ wders[ i ] = point.w;
370
+
371
+ }
372
+
373
+ const CK = [];
374
+
375
+ for ( let k = 0; k < nd; ++ k ) {
376
+
377
+ const v = Aders[ k ].clone();
378
+
379
+ for ( let i = 1; i <= k; ++ i ) {
380
+
381
+ v.sub( CK[ k - i ].clone().multiplyScalar( calcKoverI( k, i ) * wders[ i ] ) );
382
+
383
+ }
384
+
385
+ CK[ k ] = v.divideScalar( wders[ 0 ] );
386
+
387
+ }
388
+
389
+ return CK;
390
+
391
+ }
392
+
393
+ /**
394
+ * Calculates NURBS curve derivatives. See The NURBS Book, page 127, algorithm A4.2.
395
+ *
396
+ * @param {number} p - The degree.
397
+ * @param {Array<number>} U - The knot vector.
398
+ * @param {Array<Vector4>} P - The control points in homogeneous space.
399
+ * @param {number} u - The parametric point.
400
+ * @param {number} nd - The number of derivatives.
401
+ * @return {Array<Vector3>} array with derivatives for rational curve.
402
+ */
403
+ function calcNURBSDerivatives( p, U, P, u, nd ) {
404
+
405
+ const Pders = calcBSplineDerivatives( p, U, P, u, nd );
406
+ return calcRationalCurveDerivatives( Pders );
407
+
408
+ }
409
+
410
+ /**
411
+ * Calculates a rational B-Spline surface point. See The NURBS Book, page 134, algorithm A4.3.
412
+ *
413
+ * @param {number} p - The first degree of B-Spline surface.
414
+ * @param {number} q - The second degree of B-Spline surface.
415
+ * @param {Array<number>} U - The first knot vector.
416
+ * @param {Array<number>} V - The second knot vector.
417
+ * @param {Array<Array<Vector4>>} P - The control points in homogeneous space.
418
+ * @param {number} u - The first parametric point.
419
+ * @param {number} v - The second parametric point.
420
+ * @param {Vector3} target - The target vector.
421
+ */
422
+ function calcSurfacePoint( p, q, U, V, P, u, v, target ) {
423
+
424
+ const uspan = findSpan( p, u, U );
425
+ const vspan = findSpan( q, v, V );
426
+ const Nu = calcBasisFunctions( uspan, u, p, U );
427
+ const Nv = calcBasisFunctions( vspan, v, q, V );
428
+ const temp = [];
429
+
430
+ for ( let l = 0; l <= q; ++ l ) {
431
+
432
+ temp[ l ] = new Vector4( 0, 0, 0, 0 );
433
+ for ( let k = 0; k <= p; ++ k ) {
434
+
435
+ const point = P[ uspan - p + k ][ vspan - q + l ].clone();
436
+ const w = point.w;
437
+ point.x *= w;
438
+ point.y *= w;
439
+ point.z *= w;
440
+ temp[ l ].add( point.multiplyScalar( Nu[ k ] ) );
441
+
442
+ }
443
+
444
+ }
445
+
446
+ const Sw = new Vector4( 0, 0, 0, 0 );
447
+ for ( let l = 0; l <= q; ++ l ) {
448
+
449
+ Sw.add( temp[ l ].multiplyScalar( Nv[ l ] ) );
450
+
451
+ }
452
+
453
+ Sw.divideScalar( Sw.w );
454
+ target.set( Sw.x, Sw.y, Sw.z );
455
+
456
+ }
457
+
458
+ /**
459
+ * Calculates a rational B-Spline volume point. See The NURBS Book, page 134, algorithm A4.3.
460
+ *
461
+ * @param {number} p - The first degree of B-Spline surface.
462
+ * @param {number} q - The second degree of B-Spline surface.
463
+ * @param {number} r - The third degree of B-Spline surface.
464
+ * @param {Array<number>} U - The first knot vector.
465
+ * @param {Array<number>} V - The second knot vector.
466
+ * @param {Array<number>} W - The third knot vector.
467
+ * @param {Array<Array<Array<Vector4>>>} P - The control points in homogeneous space.
468
+ * @param {number} u - The first parametric point.
469
+ * @param {number} v - The second parametric point.
470
+ * @param {number} w - The third parametric point.
471
+ * @param {Vector3} target - The target vector.
472
+ */
473
+ function calcVolumePoint( p, q, r, U, V, W, P, u, v, w, target ) {
474
+
475
+ const uspan = findSpan( p, u, U );
476
+ const vspan = findSpan( q, v, V );
477
+ const wspan = findSpan( r, w, W );
478
+ const Nu = calcBasisFunctions( uspan, u, p, U );
479
+ const Nv = calcBasisFunctions( vspan, v, q, V );
480
+ const Nw = calcBasisFunctions( wspan, w, r, W );
481
+ const temp = [];
482
+
483
+ for ( let m = 0; m <= r; ++ m ) {
484
+
485
+ temp[ m ] = [];
486
+
487
+ for ( let l = 0; l <= q; ++ l ) {
488
+
489
+ temp[ m ][ l ] = new Vector4( 0, 0, 0, 0 );
490
+ for ( let k = 0; k <= p; ++ k ) {
491
+
492
+ const point = P[ uspan - p + k ][ vspan - q + l ][ wspan - r + m ].clone();
493
+ const w = point.w;
494
+ point.x *= w;
495
+ point.y *= w;
496
+ point.z *= w;
497
+ temp[ m ][ l ].add( point.multiplyScalar( Nu[ k ] ) );
498
+
499
+ }
500
+
501
+ }
502
+
503
+ }
504
+
505
+ const Sw = new Vector4( 0, 0, 0, 0 );
506
+ for ( let m = 0; m <= r; ++ m ) {
507
+
508
+ for ( let l = 0; l <= q; ++ l ) {
509
+
510
+ Sw.add( temp[ m ][ l ].multiplyScalar( Nw[ m ] ).multiplyScalar( Nv[ l ] ) );
511
+
512
+ }
513
+
514
+ }
515
+
516
+ Sw.divideScalar( Sw.w );
517
+ target.set( Sw.x, Sw.y, Sw.z );
518
+
519
+ }
520
+
521
+ export {
522
+ findSpan,
523
+ calcBasisFunctions,
524
+ calcBSplinePoint,
525
+ calcBasisFunctionDerivatives,
526
+ calcBSplineDerivatives,
527
+ calcKoverI,
528
+ calcRationalCurveDerivatives,
529
+ calcNURBSDerivatives,
530
+ calcSurfacePoint,
531
+ calcVolumePoint,
532
+ };