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,56 @@
1
+ import { readFileSync } from 'node:fs'
2
+ import { bakeCameraMotion, evaluateDocumentFrames, validateDirectorDocument } from './evaluate.mjs'
3
+ import { applyEditSequenceOps } from './editSequence.mjs'
4
+ import { applyStudioIntentCommand, applyStudioIntentsCommand, listCameraPresetsCommand } from './applyIntent.mjs'
5
+
6
+ import { evaluateStaticPlan } from './staticIntent.mjs'
7
+
8
+ const command = process.argv[2]
9
+ const inputPath = command === 'browser' ? undefined : process.argv[3]
10
+ if (!command || (command === 'browser' && process.argv[3] !== 'ensure')
11
+ || (command !== 'browser' && command !== 'list-camera-presets' && !inputPath)) {
12
+ process.stderr.write('usage: node cli.mjs bake|evaluate|evaluate-plan|inspect-nodes|apply-library-pose|apply-library-poses|render-frames|validate|edit-sequence|apply-intent|apply-intents|list-camera-presets <payload.json> | browser ensure [--with-deps]\n')
13
+ process.exit(2)
14
+ }
15
+
16
+ const body = inputPath ? JSON.parse(readFileSync(inputPath, 'utf8')) : {}
17
+
18
+ const handlers = {
19
+ bake: () => bakeCameraMotion(body),
20
+ 'evaluate-plan': () => evaluateStaticPlan(body),
21
+ 'inspect-nodes': async () => (await import('./render.mjs')).inspectNodes(body),
22
+ 'apply-library-pose': async () => (await import('./render.mjs')).applyLibraryPose(body),
23
+ 'apply-library-poses': async () => (await import('./render.mjs')).applyLibraryPoses(body),
24
+ evaluate: () => evaluateDocumentFrames(body),
25
+ validate: () => validateDirectorDocument(body),
26
+ 'edit-sequence': () => applyEditSequenceOps(body),
27
+ 'apply-intent': () => applyStudioIntentCommand(body),
28
+ 'apply-intents': () => applyStudioIntentsCommand(body),
29
+ 'list-camera-presets': () => listCameraPresetsCommand(),
30
+ browser: async () => {
31
+ const args = process.argv.slice(4)
32
+ if (args.some((arg) => arg !== '--with-deps')) throw new Error('BROWSER_OPTION_INVALID')
33
+ const { ensureBrowser } = await import('./browser.mjs')
34
+ return ensureBrowser({ withDeps: args.includes('--with-deps') })
35
+ },
36
+ 'render-frames': async () => {
37
+ const { renderFrames } = await import('./render.mjs')
38
+ return renderFrames(body)
39
+ },
40
+ }
41
+
42
+ if (!handlers[command]) {
43
+ process.stderr.write(`unknown command ${command}\n`)
44
+ process.exit(2)
45
+ }
46
+
47
+ try {
48
+ const result = await handlers[command]()
49
+ process.stdout.write(`${JSON.stringify(result)}\n`)
50
+ } catch (error) {
51
+ const text = error instanceof Error
52
+ ? `${error.message}\n${error.stack || ''}`
53
+ : String(error)
54
+ process.stderr.write(`${text}\n`)
55
+ process.exit(1)
56
+ }
@@ -0,0 +1,125 @@
1
+ import {
2
+ activateSequence,
3
+ clearSequenceClips,
4
+ createSequence,
5
+ deleteEditClip,
6
+ deleteSequence,
7
+ duplicateEditClip,
8
+ duplicateSequence,
9
+ getEditSequenceDurationFrames,
10
+ insertEditClip,
11
+ materializeEditorial,
12
+ moveEditClip,
13
+ renameSequence,
14
+ updateEditClip,
15
+ validateEditorial,
16
+ } from '@topview/3d-builder/evaluate'
17
+
18
+ const OP_LIMIT = 64
19
+
20
+ function withEditorial(document, editorial) {
21
+ return {
22
+ ...document,
23
+ content: { ...document.content, editorial },
24
+ }
25
+ }
26
+
27
+ function activeSequenceId(document) {
28
+ const editorial = document?.content?.editorial
29
+ return (typeof editorial?.activeSequenceId === 'string' && editorial.activeSequenceId)
30
+ ? editorial.activeSequenceId
31
+ : 'sequence_1'
32
+ }
33
+
34
+ function applyOne(document, op) {
35
+ switch (op.op) {
36
+ case 'sequence.create':
37
+ return createSequence(document, { name: op.name, activate: op.activate })
38
+ case 'sequence.rename':
39
+ return renameSequence(document, op.sequenceId, op.name ?? null)
40
+ case 'sequence.duplicate':
41
+ return duplicateSequence(document, op.sequenceId, { activate: op.activate })
42
+ case 'sequence.delete':
43
+ return deleteSequence(document, op.sequenceId)
44
+ case 'sequence.activate':
45
+ return activateSequence(document, op.sequenceId)
46
+ case 'sequence.clear':
47
+ return clearSequenceClips(document, op.sequenceId)
48
+ case 'clip.insert':
49
+ return insertEditClip(document, {
50
+ sequenceId: op.sequenceId || activeSequenceId(document),
51
+ cameraNodeId: op.cameraNodeId,
52
+ sourceFrameStart: op.sourceFrameStart,
53
+ sourceFrameEnd: op.sourceFrameEnd,
54
+ index: op.index,
55
+ })
56
+ case 'clip.update':
57
+ return updateEditClip(document, op.clipId, {
58
+ cameraNodeId: op.cameraNodeId,
59
+ sourceFrameStart: op.sourceFrameStart,
60
+ sourceFrameEnd: op.sourceFrameEnd,
61
+ })
62
+ case 'clip.move':
63
+ return moveEditClip(document, op.clipId, op.index)
64
+ case 'clip.duplicate':
65
+ return duplicateEditClip(document, op.clipId, { index: op.index })
66
+ case 'clip.delete':
67
+ return deleteEditClip(document, op.clipId)
68
+ default:
69
+ throw new Error(`UNKNOWN_DIRECTOR_EDITORIAL_OP:${op.op}`)
70
+ }
71
+ }
72
+
73
+ export function summarizeEditorial(document) {
74
+ const editorial = materializeEditorial(document)
75
+ return {
76
+ version: editorial.version,
77
+ activeSequenceId: editorial.activeSequenceId,
78
+ sequences: editorial.sequences.map((sequence) => ({
79
+ id: sequence.id,
80
+ ...(sequence.name ? { name: sequence.name } : {}),
81
+ durationFrames: getEditSequenceDurationFrames(sequence.clips),
82
+ clips: sequence.clips.map((clip) => ({
83
+ id: clip.id,
84
+ cameraNodeId: clip.cameraNodeId,
85
+ sourceFrameStart: clip.sourceFrameStart,
86
+ sourceFrameEnd: clip.sourceFrameEnd,
87
+ })),
88
+ })),
89
+ }
90
+ }
91
+
92
+ export function applyEditSequenceOps(body) {
93
+ const document = body?.document
94
+ if (!document || typeof document !== 'object') {
95
+ throw new Error('DIRECTOR_DOCUMENT_MISSING')
96
+ }
97
+ const ops = body.ops
98
+ if (!Array.isArray(ops) || ops.length < 1 || ops.length > OP_LIMIT) {
99
+ throw new Error('INVALID_DIRECTOR_EDITORIAL_OPS')
100
+ }
101
+ let next = withEditorial(document, materializeEditorial(document))
102
+ const createdIds = []
103
+ for (const op of ops) {
104
+ if (!op || typeof op !== 'object' || typeof op.op !== 'string') {
105
+ throw new Error('INVALID_DIRECTOR_EDITORIAL_OP')
106
+ }
107
+ const result = applyOne(next, op)
108
+ if (!result.ok) {
109
+ return {
110
+ ok: false,
111
+ error: result.error,
112
+ issues: result.issues ?? [],
113
+ createdIds,
114
+ }
115
+ }
116
+ next = withEditorial(next, result.editorial)
117
+ if (result.createdId) createdIds.push(result.createdId)
118
+ }
119
+ return {
120
+ ok: true,
121
+ editorial: next.content.editorial,
122
+ createdIds,
123
+ issues: validateEditorial(next),
124
+ }
125
+ }
@@ -0,0 +1,254 @@
1
+ import { Box3, Euler, Frustum, Matrix4, PerspectiveCamera, Vector3 } from 'three'
2
+ import {
3
+ CAMERA_MOTIONS,
4
+ FCurveSet,
5
+ bakeCameraMotionClip,
6
+ createFrameSnapshot,
7
+ evaluateFrame,
8
+ sceneFromDocument,
9
+ } from '@topview/3d-builder/evaluate'
10
+
11
+ export async function validateDirectorDocument(body) {
12
+ const { parseDirectorDocument } = await import('@topview/3d-builder/evaluate')
13
+ parseDirectorDocument(body.document ?? body)
14
+ return { ok: true }
15
+ }
16
+
17
+ export function bakeCameraMotion(body) {
18
+ const preset = CAMERA_MOTIONS.find((item) => item.id === body.presetId)
19
+ if (!preset) throw new Error(`unknown preset ${body.presetId}`)
20
+ const cameraNode = (body.document?.content?.nodes ?? []).find((node) => node.id === body.cameraNodeId)
21
+ if (!cameraNode) throw new Error(`camera ${body.cameraNodeId} not found`)
22
+ return bakeCameraMotionClip(
23
+ preset,
24
+ { cameraNode, doc: body.document },
25
+ body.frameStart ?? 0,
26
+ body.config,
27
+ )
28
+ }
29
+
30
+ function primitiveWorldBox(node, xf) {
31
+ if (node?.type !== 'primitive') return null
32
+ const kind = node.primitive?.kind
33
+ const parameters = node.primitive?.parameters || {}
34
+ let halfX = 0
35
+ let halfY = 0
36
+ let halfZ = 0
37
+ if (kind === 'BoxGeometry') {
38
+ halfX = (parameters.width ?? 0) / 2
39
+ halfY = (parameters.height ?? 0) / 2
40
+ halfZ = (parameters.depth ?? 0) / 2
41
+ } else if (kind === 'SphereGeometry') {
42
+ halfX = halfY = halfZ = parameters.radius ?? 0
43
+ } else if (kind === 'CylinderGeometry') {
44
+ halfX = halfZ = Math.max(parameters.radiusTop ?? 0, parameters.radiusBottom ?? 0)
45
+ halfY = (parameters.height ?? 0) / 2
46
+ } else if (kind === 'ConeGeometry') {
47
+ halfX = halfZ = parameters.radius ?? 0
48
+ halfY = (parameters.height ?? 0) / 2
49
+ } else {
50
+ return null
51
+ }
52
+ const scale = xf.scale || {}
53
+ const box = new Box3(
54
+ new Vector3(-halfX * (scale.x ?? 1), -halfY * (scale.y ?? 1), -halfZ * (scale.z ?? 1)),
55
+ new Vector3(halfX * (scale.x ?? 1), halfY * (scale.y ?? 1), halfZ * (scale.z ?? 1)),
56
+ )
57
+ const rotation = xf.rotation || {}
58
+ const matrix = new Matrix4().makeRotationFromEuler(new Euler(
59
+ (rotation.x ?? 0) * Math.PI / 180,
60
+ (rotation.y ?? 0) * Math.PI / 180,
61
+ (rotation.z ?? 0) * Math.PI / 180,
62
+ 'XYZ',
63
+ ))
64
+ matrix.setPosition(xf.position.x, xf.position.y, xf.position.z)
65
+ return box.applyMatrix4(matrix)
66
+ }
67
+
68
+ // Mesh bounds measured in Chromium (`inspect-nodes`), keyed by frame then node id. Posed characters
69
+ // are judged by these instead of their origin, which a pose or seat offset can put below the floor.
70
+ const MESH_GROUND_TOLERANCE = 0.02
71
+
72
+ function meshBox(nodeBounds, frame, nodeId) {
73
+ const bounds = nodeBounds?.[String(frame)]?.[nodeId]
74
+ if (!bounds?.min || !bounds?.max) return null
75
+ return new Box3(
76
+ new Vector3(bounds.min.x, bounds.min.y, bounds.min.z),
77
+ new Vector3(bounds.max.x, bounds.max.y, bounds.max.z),
78
+ )
79
+ }
80
+
81
+ function frustumFor(camera, node, aspect) {
82
+ if (!camera) return null
83
+ const view = new PerspectiveCamera(camera.fov, aspect, node?.camera?.near ?? 0.1, node?.camera?.far ?? 2000)
84
+ view.position.set(camera.position.x, camera.position.y, camera.position.z)
85
+ view.lookAt(camera.lookAt.x, camera.lookAt.y, camera.lookAt.z)
86
+ view.rotateZ((node?.transform?.rotation?.z ?? 0) * Math.PI / 180)
87
+ view.updateMatrixWorld(true)
88
+ return new Frustum().setFromProjectionMatrix(new Matrix4().multiplyMatrices(view.projectionMatrix, view.matrixWorldInverse))
89
+ }
90
+
91
+ function collectClips(document) {
92
+ const animation = document?.content?.timeline?.animation ?? {}
93
+ const groups = [
94
+ ['cameraMotion', animation.cameraMotionClips ?? []],
95
+ ['motion', animation.motionClips ?? []],
96
+ ['pathMotion', animation.pathMotionClips ?? []],
97
+ ]
98
+ const clips = []
99
+ for (const [clipKind, list] of groups) {
100
+ for (const clip of list) {
101
+ clips.push({
102
+ clipKind,
103
+ id: clip.id,
104
+ nodeId: clip.target?.nodeId,
105
+ frameStart: Number(clip.frameStart ?? 0),
106
+ frameEnd: Number(clip.frameEnd ?? 0),
107
+ })
108
+ }
109
+ }
110
+ return clips
111
+ }
112
+
113
+ function clipOverlaps(clips) {
114
+ const overlaps = []
115
+ for (let i = 0; i < clips.length; i += 1) {
116
+ for (let j = i + 1; j < clips.length; j += 1) {
117
+ const a = clips[i]
118
+ const b = clips[j]
119
+ if (a.nodeId && b.nodeId && a.nodeId !== b.nodeId) continue
120
+ if (a.clipKind !== b.clipKind) continue
121
+ const start = Math.max(a.frameStart, b.frameStart)
122
+ const end = Math.min(a.frameEnd, b.frameEnd)
123
+ if (start < end) {
124
+ overlaps.push({
125
+ a: a.id,
126
+ b: b.id,
127
+ clipKind: a.clipKind,
128
+ frameStart: start,
129
+ frameEnd: end,
130
+ })
131
+ }
132
+ }
133
+ }
134
+ return overlaps
135
+ }
136
+
137
+ function pathEndJumps(document, scene, snapshot) {
138
+ const jumps = []
139
+ for (const clip of document?.content?.timeline?.animation?.pathMotionClips ?? []) {
140
+ const end = Number(clip.frameEnd ?? 0)
141
+ const start = Number(clip.frameStart ?? 0)
142
+ if (end - start < 2) continue
143
+ evaluateFrame(scene, end - 2, snapshot)
144
+ const before = snapshot.transforms.get(clip.target?.nodeId)?.position
145
+ evaluateFrame(scene, end - 1, snapshot)
146
+ const after = snapshot.transforms.get(clip.target?.nodeId)?.position
147
+ if (!before || !after) continue
148
+ const distance = Math.hypot(after.x - before.x, after.y - before.y, after.z - before.z)
149
+ if (distance > 0.75) {
150
+ jumps.push({ clipId: clip.id, nodeId: clip.target?.nodeId, distance })
151
+ }
152
+ }
153
+ return jumps
154
+ }
155
+
156
+ function targetVisible(frustum, mesh, target) {
157
+ if (!frustum) return false
158
+ return mesh ? frustum.intersectsBox(mesh) : frustum.containsPoint(new Vector3(target.position.x, target.position.y, target.position.z))
159
+ }
160
+
161
+ export function evaluateDocumentFrames(body) {
162
+ const overlays = body.fcurves ? { fcurves: FCurveSet.parse(body.fcurves) } : {}
163
+ const scene = sceneFromDocument(body.document, overlays)
164
+ const snapshot = createFrameSnapshot()
165
+ const ground = body.document?.content?.environment?.display?.groundHeight ?? 0
166
+ const clips = collectClips(body.document)
167
+ const frames = []
168
+ const issues = []
169
+ const nodes = body.document.content.nodes
170
+ const nodeById = new Map(nodes.map(node => [node.id, node]))
171
+ const cameraId = body.cameraNodeId || body.document.content.activeShotCameraNodeId || nodes.find(n => n.type === 'camera')?.id
172
+ const cameraNode = nodeById.get(cameraId)
173
+ if (!cameraNode || cameraNode.type !== 'camera') throw new Error('DIRECTOR_CAMERA_REQUIRED')
174
+ const parts = String(body.document.content.aspectRatio || '16:9').split(':').map(Number)
175
+ const aspect = body.width && body.height ? body.width / body.height : (parts.length === 2 && parts[0] > 0 && parts[1] > 0 ? parts[0] / parts[1] : 16 / 9)
176
+ const animatedIds = new Set(clips.map(clip => clip.nodeId))
177
+ for (const curve of body.fcurves?.fcurves ?? []) {
178
+ const nodeId = Array.isArray(curve.t) ? curve.t[1] : (curve.t ?? curve.nodeId)
179
+ if (nodeId) animatedIds.add(String(nodeId))
180
+ }
181
+ for (const frame of body.frames ?? []) {
182
+ evaluateFrame(scene, frame, snapshot)
183
+ const selected = snapshot.transforms.get(cameraId)
184
+ const camera = selected?.lookAt ? { position: selected.position, lookAt: selected.lookAt, fov: selected.fov ?? cameraNode.camera.fov } : snapshot.camera
185
+ const frustum = frustumFor(camera, cameraNode, aspect)
186
+ const targetId = cameraNode.camera.lookAtTarget?.nodeId || cameraNode.camera.subject?.nodeId
187
+ const target = targetId ? snapshot.transforms.get(targetId) : null
188
+ const metrics = []
189
+ for (const [nodeId, xf] of snapshot.transforms.entries()) {
190
+ const node = nodeById.get(nodeId)
191
+ const finite = ['position', 'rotation', 'scale'].every(key => Object.values(xf[key] || {}).every(Number.isFinite))
192
+ const positiveScale = Object.values(xf.scale || {}).every(value => value > 0)
193
+ const origin = new Vector3(xf.position.x, xf.position.y, xf.position.z)
194
+ const mesh = meshBox(body.nodeBounds, frame, nodeId)
195
+ const box = mesh ?? primitiveWorldBox(node, xf)
196
+ const groundPenetration = node?.type !== 'camera' && (
197
+ mesh ? mesh.min.y < ground - MESH_GROUND_TOLERANCE
198
+ : box ? box.max.y < ground - 0.001 : xf.position.y < ground - 0.001
199
+ )
200
+ const visible = node?.visible !== false
201
+ const inFrustum = Boolean(frustum && (
202
+ (!mesh && frustum.containsPoint(origin)) || (box && frustum.intersectsBox(box))
203
+ ))
204
+ if (!finite || !positiveScale) issues.push({ severity: 'error', frame, nodeId, code: !finite ? 'NON_FINITE_TRANSFORM' : 'NON_POSITIVE_SCALE' })
205
+ if (visible && groundPenetration) issues.push({ severity: 'warning', frame, nodeId, code: mesh ? 'MESH_BELOW_GROUND' : 'ORIGIN_BELOW_GROUND' })
206
+ if (visible && node?.type !== 'camera' && !inFrustum) issues.push({ severity: 'warning', frame, nodeId, code: mesh ? 'MESH_OUTSIDE_FRUSTUM' : 'ORIGIN_OUTSIDE_FRUSTUM' })
207
+ const distance = camera
208
+ ? Math.hypot(
209
+ xf.position.x - camera.position.x,
210
+ xf.position.y - camera.position.y,
211
+ xf.position.z - camera.position.z,
212
+ )
213
+ : null
214
+ metrics.push({
215
+ nodeId,
216
+ position: { ...xf.position },
217
+ type: node?.type, finite, positiveScale, visible, animated: animatedIds.has(nodeId), inFrustum,
218
+ cameraDistance: distance,
219
+ groundPenetration,
220
+ basis: mesh ? 'mesh' : (box ? 'primitive' : 'origin'),
221
+ })
222
+ }
223
+ frames.push({
224
+ frame,
225
+ camera: camera
226
+ ? {
227
+ position: { ...camera.position },
228
+ lookAt: { ...camera.lookAt },
229
+ fov: camera.fov,
230
+ }
231
+ : null,
232
+ cameraTargetDistance: camera && target
233
+ ? Math.hypot(
234
+ target.position.x - camera.position.x,
235
+ target.position.y - camera.position.y,
236
+ target.position.z - camera.position.z,
237
+ )
238
+ : null,
239
+ cameraNodeId: cameraId,
240
+ targetNodeId: targetId ?? null,
241
+ targetInFrustum: target ? targetVisible(frustum, meshBox(body.nodeBounds, frame, targetId), target) : null,
242
+ nodes: metrics,
243
+ })
244
+ }
245
+ return {
246
+ ok: !issues.some(issue => issue.severity === 'error'), issues,
247
+ measurement: body.nodeBounds
248
+ ? 'mesh bounds for measured nodes, primitive boxes and origins otherwise; render for occlusion'
249
+ : 'primitive boxes and node origins (characters by origin); inspect views measures character meshes',
250
+ frames,
251
+ clipOverlaps: clipOverlaps(clips),
252
+ pathEndJumps: pathEndJumps(body.document, scene, snapshot),
253
+ }
254
+ }
@@ -0,0 +1,47 @@
1
+ const LIBRARY_PREFIX = '3d-builder/library/'
2
+ const PUBLIC_PREFIX = '3d-builder/public/'
3
+
4
+ // Resolution order: local asset map (key -> same-origin URL served by the renderer),
5
+ // then an explicitly configured public asset base. There is no default CDN, so
6
+ // offline renders never leave the machine.
7
+ export function resolveHeadlessMediaUrl(ref, publicAssetBase, localAssets = {}) {
8
+ if (typeof ref === 'string') {
9
+ if (/^https?:\/\//i.test(ref)) return ref
10
+ return resolveAssetKey(ref, publicAssetBase, localAssets, undefined)
11
+ }
12
+ const kind = ref?.kind
13
+ const sourcePath = typeof ref?.sourcePath === 'string' ? ref.sourcePath : ''
14
+ if (kind === 'character' && sourcePath === 'user' && ref?.assetId) {
15
+ const local = localAssets?.[`user:${ref.assetId}`]
16
+ if (local) return local
17
+ const origin = String(publicAssetBase || '')
18
+ .replace(/\/+$/, '')
19
+ .replace(/\/3d-builder\/public$/i, '')
20
+ if (origin) return `${origin}/3d-builder/public/characters/user_child_${ref.assetId}.glb`
21
+ throw new Error(`ASSET_NOT_AVAILABLE:user:${ref.assetId}`)
22
+ }
23
+ const raw = String(ref?.sourceUrl || ref?.sourcePath || '').trim()
24
+ if (/^https?:\/\//i.test(raw)) return raw
25
+ return resolveAssetKey(raw, publicAssetBase, localAssets, kind)
26
+ }
27
+
28
+ export function assetKey(raw) {
29
+ return String(raw || '').replace(/^\/+/, '').split('?')[0]
30
+ }
31
+
32
+ function resolveAssetKey(raw, publicAssetBase, localAssets, kind) {
33
+ const key = assetKey(raw)
34
+ if (!key) return ''
35
+ const local = localAssets?.[key]
36
+ if (local) return local
37
+ const origin = String(publicAssetBase || '')
38
+ .replace(/\/+$/, '')
39
+ .replace(/\/3d-builder\/public$/i, '')
40
+ if (origin && key.startsWith(PUBLIC_PREFIX)) return `${origin}/${key}`
41
+ // Motions are optional: an unavailable clip leaves the character in its pose.
42
+ if (kind === 'motion') return ''
43
+ if (key.startsWith(LIBRARY_PREFIX) || key.startsWith(PUBLIC_PREFIX)) {
44
+ throw new Error(`ASSET_NOT_AVAILABLE:${key}`)
45
+ }
46
+ return ''
47
+ }