@felbrasil/dreamy 0.0.0-stage → 0.1.0

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 (450) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +69 -2
  3. package/dist/api.d.ts +1 -0
  4. package/dist/api.js +2 -0
  5. package/dist/api.js.map +7 -0
  6. package/dist/chunks/chunk-72DMUKP3.js +1470 -0
  7. package/dist/chunks/chunk-72DMUKP3.js.map +7 -0
  8. package/dist/chunks/chunk-VZMBE5MV.js +5936 -0
  9. package/dist/chunks/chunk-VZMBE5MV.js.map +7 -0
  10. package/dist/chunks/chunk-ZU72KKME.js +8600 -0
  11. package/dist/chunks/chunk-ZU72KKME.js.map +7 -0
  12. package/dist/core.d.ts +1 -0
  13. package/dist/core.js +34 -0
  14. package/dist/core.js.map +7 -0
  15. package/dist/dreamy_evaluator.wasm +0 -0
  16. package/dist/evaluator.d.ts +1 -0
  17. package/dist/evaluator.js +52 -0
  18. package/dist/evaluator.js.map +7 -0
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.js +7280 -0
  21. package/dist/index.js.map +7 -0
  22. package/dist/styles.css +1 -0
  23. package/dist/types/api/src/commands/command.d.ts +7 -0
  24. package/dist/types/api/src/commands/decal-commands.d.ts +35 -0
  25. package/dist/types/api/src/commands/palette-commands.d.ts +14 -0
  26. package/dist/types/api/src/commands/rig-commands.d.ts +229 -0
  27. package/dist/types/api/src/commands/scene-commands.d.ts +64 -0
  28. package/dist/types/api/src/commands/sculpt-commands.d.ts +111 -0
  29. package/dist/types/api/src/commands/stamp-spec.d.ts +3 -0
  30. package/dist/types/api/src/commands/target.d.ts +8 -0
  31. package/dist/types/api/src/creation-api.d.ts +52 -0
  32. package/dist/types/api/src/events/creation-event.d.ts +7 -0
  33. package/dist/types/api/src/events/decal-events.d.ts +20 -0
  34. package/dist/types/api/src/events/event-of.d.ts +6 -0
  35. package/dist/types/api/src/events/palette-events.d.ts +8 -0
  36. package/dist/types/api/src/events/rig-events.d.ts +161 -0
  37. package/dist/types/api/src/events/scene-events.d.ts +34 -0
  38. package/dist/types/api/src/events/sculpt-events.d.ts +53 -0
  39. package/dist/types/api/src/id.d.ts +1 -0
  40. package/dist/types/api/src/index.d.ts +31 -0
  41. package/dist/types/api/src/model/creation.d.ts +22 -0
  42. package/dist/types/api/src/model/decal.d.ts +48 -0
  43. package/dist/types/api/src/model/look.d.ts +56 -0
  44. package/dist/types/api/src/model/math.d.ts +18 -0
  45. package/dist/types/api/src/model/palette.d.ts +11 -0
  46. package/dist/types/api/src/model/rig.d.ts +125 -0
  47. package/dist/types/api/src/model/scene-object.d.ts +22 -0
  48. package/dist/types/api/src/model/sculpt.d.ts +13 -0
  49. package/dist/types/api/src/model/stamp.d.ts +53 -0
  50. package/dist/types/api/src/model/wing.d.ts +35 -0
  51. package/dist/types/api/src/ports/basic-ports.d.ts +7 -0
  52. package/dist/types/api/src/ports/evaluator.d.ts +62 -0
  53. package/dist/types/api/src/ports/persistence.d.ts +89 -0
  54. package/dist/types/api/src/ports/viewport.d.ts +125 -0
  55. package/dist/types/core/src/apply/body-part-added.d.ts +2 -0
  56. package/dist/types/core/src/apply/body-part-removed.d.ts +2 -0
  57. package/dist/types/core/src/apply/bone-removed.d.ts +3 -0
  58. package/dist/types/core/src/apply/bone-renamed.d.ts +2 -0
  59. package/dist/types/core/src/apply/bone-reparented.d.ts +2 -0
  60. package/dist/types/core/src/apply/bone-sizes-set.d.ts +3 -0
  61. package/dist/types/core/src/apply/bone-tags-set.d.ts +2 -0
  62. package/dist/types/core/src/apply/bone-transforms-set.d.ts +6 -0
  63. package/dist/types/core/src/apply/bones-added.d.ts +2 -0
  64. package/dist/types/core/src/apply/creature-generated.d.ts +3 -0
  65. package/dist/types/core/src/apply/decal-removed.d.ts +2 -0
  66. package/dist/types/core/src/apply/decals-added.d.ts +2 -0
  67. package/dist/types/core/src/apply/design-deleted.d.ts +2 -0
  68. package/dist/types/core/src/apply/design-saved.d.ts +2 -0
  69. package/dist/types/core/src/apply/flat-wings-set.d.ts +2 -0
  70. package/dist/types/core/src/apply/object-renamed.d.ts +2 -0
  71. package/dist/types/core/src/apply/object-reparented.d.ts +2 -0
  72. package/dist/types/core/src/apply/object-transforms-set.d.ts +2 -0
  73. package/dist/types/core/src/apply/objects-deleted.d.ts +2 -0
  74. package/dist/types/core/src/apply/objects-duplicated.d.ts +3 -0
  75. package/dist/types/core/src/apply/palette-color-set.d.ts +2 -0
  76. package/dist/types/core/src/apply/palette-reset.d.ts +2 -0
  77. package/dist/types/core/src/apply/part-grafted.d.ts +3 -0
  78. package/dist/types/core/src/apply/part-slot-swapped.d.ts +3 -0
  79. package/dist/types/core/src/apply/pivot-set.d.ts +2 -0
  80. package/dist/types/core/src/apply/pose-preset-applied.d.ts +3 -0
  81. package/dist/types/core/src/apply/pose-reset.d.ts +3 -0
  82. package/dist/types/core/src/apply/premade-applied.d.ts +3 -0
  83. package/dist/types/core/src/apply/region-blend-set.d.ts +3 -0
  84. package/dist/types/core/src/apply/rig-created.d.ts +2 -0
  85. package/dist/types/core/src/apply/rig-mirror-set.d.ts +2 -0
  86. package/dist/types/core/src/apply/rig-mode-set.d.ts +2 -0
  87. package/dist/types/core/src/apply/sculpt-created.d.ts +2 -0
  88. package/dist/types/core/src/apply/sculpt-look-set.d.ts +3 -0
  89. package/dist/types/core/src/apply/smear-group-set.d.ts +2 -0
  90. package/dist/types/core/src/apply/stamp-placements-set.d.ts +2 -0
  91. package/dist/types/core/src/apply/stamp-props-set.d.ts +2 -0
  92. package/dist/types/core/src/apply/stamps-added.d.ts +2 -0
  93. package/dist/types/core/src/apply/stamps-removed.d.ts +2 -0
  94. package/dist/types/core/src/apply/symmetry-set-for-all.d.ts +2 -0
  95. package/dist/types/core/src/atoms/check/check.d.ts +7 -0
  96. package/dist/types/core/src/atoms/decal/decal-limits.d.ts +6 -0
  97. package/dist/types/core/src/atoms/decal/decal-problem.d.ts +4 -0
  98. package/dist/types/core/src/atoms/decal/design-problem.d.ts +4 -0
  99. package/dist/types/core/src/atoms/look/catalogs.d.ts +9 -0
  100. package/dist/types/core/src/atoms/look/default-look.d.ts +4 -0
  101. package/dist/types/core/src/atoms/look/look-problem.d.ts +7 -0
  102. package/dist/types/core/src/atoms/look/merge-look.d.ts +3 -0
  103. package/dist/types/core/src/atoms/math/mat4.d.ts +14 -0
  104. package/dist/types/core/src/atoms/math/quat.d.ts +18 -0
  105. package/dist/types/core/src/atoms/math/transform.d.ts +7 -0
  106. package/dist/types/core/src/atoms/math/vec3.d.ts +18 -0
  107. package/dist/types/core/src/atoms/palette/default-palette.d.ts +4 -0
  108. package/dist/types/core/src/atoms/palette/is-color-ref.d.ts +2 -0
  109. package/dist/types/core/src/atoms/palette/poc-color-ref.d.ts +6 -0
  110. package/dist/types/core/src/atoms/rig/bone-matrices.d.ts +8 -0
  111. package/dist/types/core/src/atoms/rig/bone-region.d.ts +8 -0
  112. package/dist/types/core/src/atoms/rig/bone-role.d.ts +11 -0
  113. package/dist/types/core/src/atoms/rig/bone-size.d.ts +7 -0
  114. package/dist/types/core/src/atoms/rig/compose-local.d.ts +6 -0
  115. package/dist/types/core/src/atoms/rig/find-rig.d.ts +11 -0
  116. package/dist/types/core/src/atoms/rig/mirror-partner.d.ts +3 -0
  117. package/dist/types/core/src/atoms/rig/mirror-sculpt.d.ts +9 -0
  118. package/dist/types/core/src/atoms/rig/mirror-transform.d.ts +9 -0
  119. package/dist/types/core/src/atoms/rig/partner-target.d.ts +3 -0
  120. package/dist/types/core/src/atoms/rig/pose-presets.d.ts +11 -0
  121. package/dist/types/core/src/atoms/rig/pose-rule.d.ts +48 -0
  122. package/dist/types/core/src/atoms/rig/pose-template-rules.d.ts +8 -0
  123. package/dist/types/core/src/atoms/rig/rebase-pose.d.ts +6 -0
  124. package/dist/types/core/src/atoms/rig/resize-bones.d.ts +12 -0
  125. package/dist/types/core/src/atoms/rig/rig-extent.d.ts +3 -0
  126. package/dist/types/core/src/atoms/rig/side-from-name.d.ts +7 -0
  127. package/dist/types/core/src/atoms/rig/size-frame.d.ts +18 -0
  128. package/dist/types/core/src/atoms/rig/with-slot-parts.d.ts +9 -0
  129. package/dist/types/core/src/atoms/scene/copy-with-new-ids.d.ts +7 -0
  130. package/dist/types/core/src/atoms/scene/object-tree.d.ts +8 -0
  131. package/dist/types/core/src/atoms/scene/place-in-order.d.ts +7 -0
  132. package/dist/types/core/src/atoms/scene/unique-name.d.ts +4 -0
  133. package/dist/types/core/src/atoms/scene/world-matrix.d.ts +4 -0
  134. package/dist/types/core/src/atoms/sculpt/all-sculpts.d.ts +3 -0
  135. package/dist/types/core/src/atoms/sculpt/is-wing-target.d.ts +3 -0
  136. package/dist/types/core/src/atoms/sculpt/target-sculpt.d.ts +10 -0
  137. package/dist/types/core/src/atoms/sculpt/update-target.d.ts +8 -0
  138. package/dist/types/core/src/atoms/stamp/apply-stamp-props.d.ts +11 -0
  139. package/dist/types/core/src/atoms/stamp/clamp-symmetry.d.ts +11 -0
  140. package/dist/types/core/src/atoms/stamp/clean-props.d.ts +3 -0
  141. package/dist/types/core/src/atoms/stamp/emptied-groups.d.ts +3 -0
  142. package/dist/types/core/src/atoms/stamp/move-locked-groups.d.ts +12 -0
  143. package/dist/types/core/src/atoms/stamp/normalize-base.d.ts +6 -0
  144. package/dist/types/core/src/atoms/stamp/resolve-stamp-props.d.ts +14 -0
  145. package/dist/types/core/src/atoms/stamp/smear.d.ts +15 -0
  146. package/dist/types/core/src/atoms/stamp/stamp-problem.d.ts +7 -0
  147. package/dist/types/core/src/atoms/wing/wing-problem.d.ts +6 -0
  148. package/dist/types/core/src/create-creation-api.d.ts +12 -0
  149. package/dist/types/core/src/decide.d.ts +4 -0
  150. package/dist/types/core/src/empty-creation.d.ts +2 -0
  151. package/dist/types/core/src/fold.d.ts +6 -0
  152. package/dist/types/core/src/index.d.ts +9 -0
  153. package/dist/types/core/src/molecules/add-body-part.d.ts +8 -0
  154. package/dist/types/core/src/molecules/add-bone.d.ts +8 -0
  155. package/dist/types/core/src/molecules/add-decals.d.ts +4 -0
  156. package/dist/types/core/src/molecules/add-stamps.d.ts +8 -0
  157. package/dist/types/core/src/molecules/apply-pose-preset.d.ts +4 -0
  158. package/dist/types/core/src/molecules/apply-premade.d.ts +9 -0
  159. package/dist/types/core/src/molecules/auto-tag-sides.d.ts +4 -0
  160. package/dist/types/core/src/molecules/create-rig.d.ts +4 -0
  161. package/dist/types/core/src/molecules/create-sculpt.d.ts +4 -0
  162. package/dist/types/core/src/molecules/delete-design.d.ts +4 -0
  163. package/dist/types/core/src/molecules/delete-objects.d.ts +4 -0
  164. package/dist/types/core/src/molecules/duplicate-objects.d.ts +6 -0
  165. package/dist/types/core/src/molecules/generate-creature.d.ts +7 -0
  166. package/dist/types/core/src/molecules/graft-part.d.ts +4 -0
  167. package/dist/types/core/src/molecules/mirror-objects.d.ts +7 -0
  168. package/dist/types/core/src/molecules/molecule.d.ts +17 -0
  169. package/dist/types/core/src/molecules/remove-body-part.d.ts +3 -0
  170. package/dist/types/core/src/molecules/remove-bone.d.ts +4 -0
  171. package/dist/types/core/src/molecules/remove-decal.d.ts +3 -0
  172. package/dist/types/core/src/molecules/remove-smear-group.d.ts +4 -0
  173. package/dist/types/core/src/molecules/remove-stamps.d.ts +4 -0
  174. package/dist/types/core/src/molecules/rename-bone.d.ts +3 -0
  175. package/dist/types/core/src/molecules/rename-object.d.ts +3 -0
  176. package/dist/types/core/src/molecules/reparent-bone.d.ts +4 -0
  177. package/dist/types/core/src/molecules/reparent-object.d.ts +4 -0
  178. package/dist/types/core/src/molecules/reset-palette.d.ts +3 -0
  179. package/dist/types/core/src/molecules/reset-pose.d.ts +3 -0
  180. package/dist/types/core/src/molecules/save-design.d.ts +4 -0
  181. package/dist/types/core/src/molecules/set-bone-sizes.d.ts +8 -0
  182. package/dist/types/core/src/molecules/set-bone-tags.d.ts +4 -0
  183. package/dist/types/core/src/molecules/set-bone-transforms.d.ts +7 -0
  184. package/dist/types/core/src/molecules/set-flat-wings.d.ts +4 -0
  185. package/dist/types/core/src/molecules/set-object-transforms.d.ts +3 -0
  186. package/dist/types/core/src/molecules/set-palette-color.d.ts +3 -0
  187. package/dist/types/core/src/molecules/set-pivot.d.ts +3 -0
  188. package/dist/types/core/src/molecules/set-region-blend.d.ts +4 -0
  189. package/dist/types/core/src/molecules/set-rig-mirror.d.ts +3 -0
  190. package/dist/types/core/src/molecules/set-rig-mode.d.ts +3 -0
  191. package/dist/types/core/src/molecules/set-sculpt-look.d.ts +7 -0
  192. package/dist/types/core/src/molecules/set-smear-group.d.ts +4 -0
  193. package/dist/types/core/src/molecules/set-stamp-placements.d.ts +4 -0
  194. package/dist/types/core/src/molecules/set-stamp-props.d.ts +3 -0
  195. package/dist/types/core/src/molecules/set-symmetry-for-all.d.ts +4 -0
  196. package/dist/types/core/src/molecules/swap-part-slot.d.ts +7 -0
  197. package/dist/types/core/src/premades/ant-bake.d.ts +2 -0
  198. package/dist/types/core/src/premades/bake-authoring.d.ts +35 -0
  199. package/dist/types/core/src/premades/bake-types.d.ts +65 -0
  200. package/dist/types/core/src/premades/baked-part-for.d.ts +11 -0
  201. package/dist/types/core/src/premades/bee-bake.d.ts +2 -0
  202. package/dist/types/core/src/premades/bird-bake.d.ts +2 -0
  203. package/dist/types/core/src/premades/body-stamps-for-bone.d.ts +14 -0
  204. package/dist/types/core/src/premades/bone-tree.d.ts +15 -0
  205. package/dist/types/core/src/premades/build-premade-rig.d.ts +23 -0
  206. package/dist/types/core/src/premades/build-template.d.ts +6 -0
  207. package/dist/types/core/src/premades/centipede-bake.d.ts +2 -0
  208. package/dist/types/core/src/premades/coat-stamps.d.ts +3 -0
  209. package/dist/types/core/src/premades/crab-bake.d.ts +2 -0
  210. package/dist/types/core/src/premades/dragon-bake.d.ts +2 -0
  211. package/dist/types/core/src/premades/face-decals.d.ts +17 -0
  212. package/dist/types/core/src/premades/fish-bake.d.ts +2 -0
  213. package/dist/types/core/src/premades/fit-part-slot.d.ts +21 -0
  214. package/dist/types/core/src/premades/generate-creature.d.ts +21 -0
  215. package/dist/types/core/src/premades/gorilla-bake.d.ts +2 -0
  216. package/dist/types/core/src/premades/graft-slot.d.ts +34 -0
  217. package/dist/types/core/src/premades/humanoid-bake.d.ts +2 -0
  218. package/dist/types/core/src/premades/insect6-bake.d.ts +2 -0
  219. package/dist/types/core/src/premades/jellyfish-bake.d.ts +2 -0
  220. package/dist/types/core/src/premades/lizard-bake.d.ts +2 -0
  221. package/dist/types/core/src/premades/make-baked-part.d.ts +9 -0
  222. package/dist/types/core/src/premades/make-body-part.d.ts +9 -0
  223. package/dist/types/core/src/premades/make-flat-part.d.ts +13 -0
  224. package/dist/types/core/src/premades/part-context.d.ts +20 -0
  225. package/dist/types/core/src/premades/part-kits.d.ts +36 -0
  226. package/dist/types/core/src/premades/part-slots.d.ts +17 -0
  227. package/dist/types/core/src/premades/part-stamp.d.ts +13 -0
  228. package/dist/types/core/src/premades/part-styles.d.ts +44 -0
  229. package/dist/types/core/src/premades/premade-fit.d.ts +18 -0
  230. package/dist/types/core/src/premades/premade-infos.d.ts +3 -0
  231. package/dist/types/core/src/premades/reseat-attachments.d.ts +31 -0
  232. package/dist/types/core/src/premades/rig-builder.d.ts +51 -0
  233. package/dist/types/core/src/premades/rodent-bake.d.ts +2 -0
  234. package/dist/types/core/src/premades/scorpion-bake.d.ts +2 -0
  235. package/dist/types/core/src/premades/shark-bake.d.ts +2 -0
  236. package/dist/types/core/src/premades/sitter-bake.d.ts +3 -0
  237. package/dist/types/core/src/premades/skeleton-bakes.d.ts +4 -0
  238. package/dist/types/core/src/premades/snake-bake.d.ts +2 -0
  239. package/dist/types/core/src/premades/spider-bake.d.ts +2 -0
  240. package/dist/types/core/src/premades/stamps-box.d.ts +9 -0
  241. package/dist/types/core/src/premades/style-for-bone.d.ts +7 -0
  242. package/dist/types/core/src/premades/swap-slot.d.ts +13 -0
  243. package/dist/types/core/src/premades/template-catalog.d.ts +20 -0
  244. package/dist/types/core/src/premades/template-color.d.ts +9 -0
  245. package/dist/types/core/src/premades/turtle-bake.d.ts +2 -0
  246. package/dist/types/core/src/premades/variants/aquatic-variants.d.ts +16 -0
  247. package/dist/types/core/src/premades/variants/coat-variants.d.ts +7 -0
  248. package/dist/types/core/src/premades/variants/ear-variants.d.ts +8 -0
  249. package/dist/types/core/src/premades/variants/fantasy-more-variants.d.ts +3 -0
  250. package/dist/types/core/src/premades/variants/fantasy-variants.d.ts +17 -0
  251. package/dist/types/core/src/premades/variants/head-variants.d.ts +9 -0
  252. package/dist/types/core/src/premades/variants/horn-variants.d.ts +7 -0
  253. package/dist/types/core/src/premades/variants/index.d.ts +10 -0
  254. package/dist/types/core/src/premades/variants/land-variants.d.ts +3 -0
  255. package/dist/types/core/src/premades/variants/leg-variants.d.ts +7 -0
  256. package/dist/types/core/src/premades/variants/part-variant.d.ts +14 -0
  257. package/dist/types/core/src/premades/variants/tail-variants.d.ts +6 -0
  258. package/dist/types/core/src/premades/variants/variant-authoring.d.ts +29 -0
  259. package/dist/types/core/src/premades/whale-bake.d.ts +2 -0
  260. package/dist/types/core/src/premades/wing-defaults.d.ts +4 -0
  261. package/dist/types/core/src/premades/wing-frame.d.ts +10 -0
  262. package/dist/types/core/src/premades/wolf-bake.d.ts +2 -0
  263. package/dist/types/core/src/premades/worm-bake.d.ts +2 -0
  264. package/dist/types/evaluator/src/abi.d.ts +64 -0
  265. package/dist/types/evaluator/src/chunks.d.ts +53 -0
  266. package/dist/types/evaluator/src/index.d.ts +11 -0
  267. package/dist/types/evaluator/src/prep/colors.d.ts +11 -0
  268. package/dist/types/evaluator/src/prep/mat3.d.ts +13 -0
  269. package/dist/types/evaluator/src/prep/pack.d.ts +23 -0
  270. package/dist/types/evaluator/src/prep/props.d.ts +16 -0
  271. package/dist/types/evaluator/src/prep/symmetry.d.ts +23 -0
  272. package/dist/types/evaluator/src/reference/core.d.ts +3 -0
  273. package/dist/types/evaluator/src/reference/mesher.d.ts +22 -0
  274. package/dist/types/evaluator/src/reference/skin.d.ts +8 -0
  275. package/dist/types/evaluator/src/session.d.ts +21 -0
  276. package/dist/types/evaluator/src/wasm/core.d.ts +9 -0
  277. package/dist/types/evaluator/src/worker/client.d.ts +28 -0
  278. package/dist/types/evaluator/src/worker/host.d.ts +8 -0
  279. package/dist/types/evaluator/src/worker/protocol.d.ts +39 -0
  280. package/dist/types/evaluator/src/worker/spawn.d.ts +6 -0
  281. package/dist/types/evaluator/src/worker/worker-inline.d.ts +1 -0
  282. package/dist/types/evaluator/src/worker/worker.d.ts +1 -0
  283. package/dist/types/module/src/index.d.ts +2 -0
  284. package/dist/types/module/src/ui/atoms/action-button.d.ts +10 -0
  285. package/dist/types/module/src/ui/atoms/badge.d.ts +9 -0
  286. package/dist/types/module/src/ui/atoms/checkbox.d.ts +6 -0
  287. package/dist/types/module/src/ui/atoms/color-input.d.ts +10 -0
  288. package/dist/types/module/src/ui/atoms/hex-chip.d.ts +5 -0
  289. package/dist/types/module/src/ui/atoms/icon-button.d.ts +14 -0
  290. package/dist/types/module/src/ui/atoms/icon.d.ts +8 -0
  291. package/dist/types/module/src/ui/atoms/kbd.d.ts +4 -0
  292. package/dist/types/module/src/ui/atoms/match-button.d.ts +10 -0
  293. package/dist/types/module/src/ui/atoms/number-input.d.ts +11 -0
  294. package/dist/types/module/src/ui/atoms/pill-button.d.ts +11 -0
  295. package/dist/types/module/src/ui/atoms/range-input.d.ts +17 -0
  296. package/dist/types/module/src/ui/atoms/select-input.d.ts +12 -0
  297. package/dist/types/module/src/ui/atoms/separator.d.ts +2 -0
  298. package/dist/types/module/src/ui/atoms/side-button.d.ts +13 -0
  299. package/dist/types/module/src/ui/atoms/swatch.d.ts +13 -0
  300. package/dist/types/module/src/ui/atoms/tool-button.d.ts +22 -0
  301. package/dist/types/module/src/ui/hooks/editor-actions.d.ts +50 -0
  302. package/dist/types/module/src/ui/hooks/editor-context.d.ts +37 -0
  303. package/dist/types/module/src/ui/hooks/use-compact.d.ts +2 -0
  304. package/dist/types/module/src/ui/hooks/use-editor-controller.d.ts +17 -0
  305. package/dist/types/module/src/ui/hooks/use-keyboard.d.ts +11 -0
  306. package/dist/types/module/src/ui/lib/catalog.d.ts +76 -0
  307. package/dist/types/module/src/ui/lib/colors.d.ts +15 -0
  308. package/dist/types/module/src/ui/lib/decals.d.ts +6 -0
  309. package/dist/types/module/src/ui/lib/design-geometry.d.ts +60 -0
  310. package/dist/types/module/src/ui/lib/math.d.ts +18 -0
  311. package/dist/types/module/src/ui/lib/placement.d.ts +8 -0
  312. package/dist/types/module/src/ui/lib/scene.d.ts +51 -0
  313. package/dist/types/module/src/ui/lib/symmetry.d.ts +5 -0
  314. package/dist/types/module/src/ui/lib/targets.d.ts +28 -0
  315. package/dist/types/module/src/ui/lib/view-state.d.ts +74 -0
  316. package/dist/types/module/src/ui/molecules/axis-pill.d.ts +7 -0
  317. package/dist/types/module/src/ui/molecules/color-field.d.ts +14 -0
  318. package/dist/types/module/src/ui/molecules/count-stepper.d.ts +9 -0
  319. package/dist/types/module/src/ui/molecules/floating-panel.d.ts +26 -0
  320. package/dist/types/module/src/ui/molecules/help-row.d.ts +8 -0
  321. package/dist/types/module/src/ui/molecules/inline-edit.d.ts +9 -0
  322. package/dist/types/module/src/ui/molecules/list-row.d.ts +25 -0
  323. package/dist/types/module/src/ui/molecules/modal.d.ts +11 -0
  324. package/dist/types/module/src/ui/molecules/mode-pill.d.ts +7 -0
  325. package/dist/types/module/src/ui/molecules/scroll-row.d.ts +10 -0
  326. package/dist/types/module/src/ui/molecules/slider-row.d.ts +16 -0
  327. package/dist/types/module/src/ui/molecules/swatch-row.d.ts +11 -0
  328. package/dist/types/module/src/ui/molecules/tab-bar.d.ts +9 -0
  329. package/dist/types/module/src/ui/molecules/toolbar-pill.d.ts +7 -0
  330. package/dist/types/module/src/ui/molecules/toolbar.d.ts +10 -0
  331. package/dist/types/module/src/ui/molecules/vec3-field.d.ts +10 -0
  332. package/dist/types/module/src/ui/organisms/bone-panel.d.ts +2 -0
  333. package/dist/types/module/src/ui/organisms/bone-size-sliders.d.ts +9 -0
  334. package/dist/types/module/src/ui/organisms/category-bar.d.ts +2 -0
  335. package/dist/types/module/src/ui/organisms/decal-bar.d.ts +2 -0
  336. package/dist/types/module/src/ui/organisms/decal-editor.d.ts +2 -0
  337. package/dist/types/module/src/ui/organisms/fleck-style-tab.d.ts +7 -0
  338. package/dist/types/module/src/ui/organisms/git-sync-panel.d.ts +10 -0
  339. package/dist/types/module/src/ui/organisms/help-panel.d.ts +2 -0
  340. package/dist/types/module/src/ui/organisms/material-tab.d.ts +3 -0
  341. package/dist/types/module/src/ui/organisms/object-list-panel.d.ts +2 -0
  342. package/dist/types/module/src/ui/organisms/palette-panel.d.ts +2 -0
  343. package/dist/types/module/src/ui/organisms/parts-tab.d.ts +26 -0
  344. package/dist/types/module/src/ui/organisms/pattern-tab.d.ts +3 -0
  345. package/dist/types/module/src/ui/organisms/pose-tab.d.ts +8 -0
  346. package/dist/types/module/src/ui/organisms/premade-picker.d.ts +2 -0
  347. package/dist/types/module/src/ui/organisms/properties-panel.d.ts +2 -0
  348. package/dist/types/module/src/ui/organisms/region-blends.d.ts +5 -0
  349. package/dist/types/module/src/ui/organisms/rendering-bar.d.ts +5 -0
  350. package/dist/types/module/src/ui/organisms/rig-bar.d.ts +2 -0
  351. package/dist/types/module/src/ui/organisms/scenes-modal.d.ts +2 -0
  352. package/dist/types/module/src/ui/organisms/select-hint.d.ts +2 -0
  353. package/dist/types/module/src/ui/organisms/shape-list-panel.d.ts +2 -0
  354. package/dist/types/module/src/ui/organisms/side-dock.d.ts +4 -0
  355. package/dist/types/module/src/ui/organisms/stamp-bar.d.ts +2 -0
  356. package/dist/types/module/src/ui/organisms/stamp-props-panel.d.ts +2 -0
  357. package/dist/types/module/src/ui/organisms/stamp-size-panel.d.ts +4 -0
  358. package/dist/types/module/src/ui/organisms/stats-badge.d.ts +2 -0
  359. package/dist/types/module/src/ui/organisms/style-bar.d.ts +2 -0
  360. package/dist/types/module/src/ui/organisms/symmetry-bar.d.ts +2 -0
  361. package/dist/types/module/src/ui/organisms/toast.d.ts +2 -0
  362. package/dist/types/module/src/ui/organisms/token-guide.d.ts +5 -0
  363. package/dist/types/module/src/ui/organisms/touch-mods.d.ts +2 -0
  364. package/dist/types/module/src/ui/organisms/transform-bar.d.ts +2 -0
  365. package/dist/types/module/src/ui/organisms/transform-tab.d.ts +2 -0
  366. package/dist/types/module/src/ui/organisms/utilities-bar.d.ts +2 -0
  367. package/dist/types/module/src/ui/organisms/viewport-host.d.ts +2 -0
  368. package/dist/types/module/src/ui/organisms/voxel-panel.d.ts +2 -0
  369. package/dist/types/module/src/ui/organisms/wing-tab.d.ts +10 -0
  370. package/dist/types/module/src/ui/pages/editor-page.d.ts +9 -0
  371. package/dist/types/module/src/ui/templates/editor-shell.d.ts +2 -0
  372. package/dist/types/studio/src/browser-files.d.ts +3 -0
  373. package/dist/types/studio/src/clock.d.ts +2 -0
  374. package/dist/types/studio/src/creation-file.d.ts +21 -0
  375. package/dist/types/studio/src/git-remote.d.ts +36 -0
  376. package/dist/types/studio/src/git-sync.d.ts +33 -0
  377. package/dist/types/studio/src/ids.d.ts +3 -0
  378. package/dist/types/studio/src/index.d.ts +15 -0
  379. package/dist/types/studio/src/indexed-db-library.d.ts +2 -0
  380. package/dist/types/studio/src/library-persistence.d.ts +29 -0
  381. package/dist/types/studio/src/library-sync.d.ts +29 -0
  382. package/dist/types/studio/src/preferences.d.ts +9 -0
  383. package/dist/types/studio/src/seed.d.ts +3 -0
  384. package/dist/types/studio/src/studio.d.ts +17 -0
  385. package/dist/types/viewport/src/create-viewport.d.ts +10 -0
  386. package/dist/types/viewport/src/decals/builtin-art.d.ts +19 -0
  387. package/dist/types/viewport/src/decals/builtin-docs.d.ts +7 -0
  388. package/dist/types/viewport/src/decals/decal-atlas.d.ts +37 -0
  389. package/dist/types/viewport/src/decals/decal-catalog.d.ts +17 -0
  390. package/dist/types/viewport/src/decals/decal-glsl.d.ts +2 -0
  391. package/dist/types/viewport/src/decals/decal-limits.d.ts +11 -0
  392. package/dist/types/viewport/src/decals/decal-uniforms.d.ts +40 -0
  393. package/dist/types/viewport/src/decals/design-raster.d.ts +8 -0
  394. package/dist/types/viewport/src/decals/interior-thumbs.d.ts +6 -0
  395. package/dist/types/viewport/src/index.d.ts +1 -0
  396. package/dist/types/viewport/src/interaction/bone-tool.d.ts +13 -0
  397. package/dist/types/viewport/src/interaction/bones-visible.d.ts +7 -0
  398. package/dist/types/viewport/src/interaction/cursor.d.ts +3 -0
  399. package/dist/types/viewport/src/interaction/decal-tool.d.ts +18 -0
  400. package/dist/types/viewport/src/interaction/esc-hold.d.ts +13 -0
  401. package/dist/types/viewport/src/interaction/ghost-geometry.d.ts +6 -0
  402. package/dist/types/viewport/src/interaction/gizmo.d.ts +34 -0
  403. package/dist/types/viewport/src/interaction/interaction-context.d.ts +41 -0
  404. package/dist/types/viewport/src/interaction/marquee.d.ts +8 -0
  405. package/dist/types/viewport/src/interaction/pivot-helper.d.ts +13 -0
  406. package/dist/types/viewport/src/interaction/select-tool.d.ts +30 -0
  407. package/dist/types/viewport/src/interaction/selection-boxes.d.ts +11 -0
  408. package/dist/types/viewport/src/interaction/stamp-tool.d.ts +41 -0
  409. package/dist/types/viewport/src/interaction/stamp-wires.d.ts +18 -0
  410. package/dist/types/viewport/src/interaction/surface-hit.d.ts +14 -0
  411. package/dist/types/viewport/src/materials/fleck-material.d.ts +69 -0
  412. package/dist/types/viewport/src/materials/global-uniforms.d.ts +15 -0
  413. package/dist/types/viewport/src/materials/skin.d.ts +18 -0
  414. package/dist/types/viewport/src/materials/wing-material.d.ts +21 -0
  415. package/dist/types/viewport/src/math/colors.d.ts +29 -0
  416. package/dist/types/viewport/src/math/convert.d.ts +15 -0
  417. package/dist/types/viewport/src/math/decal-pose.d.ts +7 -0
  418. package/dist/types/viewport/src/math/lod.d.ts +16 -0
  419. package/dist/types/viewport/src/math/picking.d.ts +32 -0
  420. package/dist/types/viewport/src/math/pixel-palette.d.ts +15 -0
  421. package/dist/types/viewport/src/math/screen.d.ts +26 -0
  422. package/dist/types/viewport/src/math/skeleton-math.d.ts +32 -0
  423. package/dist/types/viewport/src/math/smear.d.ts +20 -0
  424. package/dist/types/viewport/src/math/symmetry.d.ts +21 -0
  425. package/dist/types/viewport/src/objects/default-look.d.ts +3 -0
  426. package/dist/types/viewport/src/objects/mesh-driver.d.ts +26 -0
  427. package/dist/types/viewport/src/objects/mesh-key.d.ts +8 -0
  428. package/dist/types/viewport/src/objects/rig-view.d.ts +31 -0
  429. package/dist/types/viewport/src/objects/scene-views.d.ts +53 -0
  430. package/dist/types/viewport/src/objects/sculpt-view.d.ts +66 -0
  431. package/dist/types/viewport/src/objects/view-context.d.ts +19 -0
  432. package/dist/types/viewport/src/objects/wing-view.d.ts +27 -0
  433. package/dist/types/viewport/src/rig/bone-viz.d.ts +13 -0
  434. package/dist/types/viewport/src/scene/camera-motion.d.ts +10 -0
  435. package/dist/types/viewport/src/scene/camera-sun.d.ts +3 -0
  436. package/dist/types/viewport/src/scene/environment.d.ts +3 -0
  437. package/dist/types/viewport/src/scene/frame-camera.d.ts +10 -0
  438. package/dist/types/viewport/src/scene/play-mode.d.ts +9 -0
  439. package/dist/types/viewport/src/scene/render-pipeline.d.ts +26 -0
  440. package/dist/types/viewport/src/scene/render-settings.d.ts +18 -0
  441. package/dist/types/viewport/src/scene/resolve-frag.d.ts +3 -0
  442. package/dist/types/viewport/src/scene/stage.d.ts +38 -0
  443. package/dist/types/viewport/src/scene/stress-test.d.ts +6 -0
  444. package/dist/types/viewport/src/wings/wing-mesh.d.ts +19 -0
  445. package/dist/types/viewport/src/wings/wing-outlines.d.ts +32 -0
  446. package/dist/types/viewport/src/wings/wing-pattern.d.ts +7 -0
  447. package/dist/viewport.d.ts +1 -0
  448. package/dist/viewport.js +8 -0
  449. package/dist/viewport.js.map +7 -0
  450. package/package.json +74 -4
@@ -0,0 +1,13 @@
1
+ import type { BodyPart, Material } from "../../../api/src/index.js";
2
+ import type { BoneNode } from "./bone-tree.js";
3
+ import type { PartContext } from "./part-context.js";
4
+ /**
5
+ * POC makeFlatPart + createFlatWingPart: defaults, then the frame's fore / hind guess, then the style's
6
+ * parameters ("@key" colors from the template; base and base2 default to the style's color key).
7
+ */
8
+ export declare function makeFlatPart(node: BoneNode, style: {
9
+ readonly colorKey: string;
10
+ readonly wing?: {
11
+ readonly [key: string]: number | string;
12
+ };
13
+ }, material: Partial<Material>, ctx: PartContext): BodyPart;
@@ -0,0 +1,20 @@
1
+ import type { RegionBlends, Vec3 } from "../../../api/src/index.js";
2
+ import type { Bake, TemplateColor } from "./bake-types.js";
3
+ import type { BoneNode } from "./bone-tree.js";
4
+ import type { TemplateStyle } from "./rig-builder.js";
5
+ /** What building one body part needs to know about its rig and template (POC partHints). */
6
+ export type PartContext = {
7
+ readonly colors: {
8
+ readonly [key: string]: TemplateColor;
9
+ };
10
+ readonly styles: {
11
+ readonly [pattern: string]: TemplateStyle;
12
+ };
13
+ readonly bake?: Bake;
14
+ /** The template fit: template-space p maps to c + p * h. */
15
+ readonly c: Vec3;
16
+ readonly h: Vec3;
17
+ readonly regionBlends: RegionBlends;
18
+ readonly extent: number;
19
+ readonly roots: readonly BoneNode[];
20
+ };
@@ -0,0 +1,36 @@
1
+ import type { Decal, FlatWing, Material, PartSlot, Rig, SculptLook, Stamp, Vec3 } from "../../../api/src/index.js";
2
+ import { type SlotChain } from "./part-slots.js";
3
+ /** A stamp of a kit with the look of the part it came from. */
4
+ export type KitStamp = {
5
+ readonly stamp: Stamp;
6
+ readonly look: SculptLook;
7
+ };
8
+ /** One chain of a kit, in its premade's rig space at the template's default fit. */
9
+ export type KitChain = {
10
+ /** Its first bone's name (to match a rig's chain of the same name). */
11
+ readonly name?: string;
12
+ readonly start: Vec3;
13
+ readonly end: Vec3;
14
+ /** Its joints in order, when the chain is a single path (no branches): parts are fitted segment by segment. */
15
+ readonly path?: readonly Vec3[];
16
+ readonly side: 1 | -1 | 0;
17
+ readonly front: boolean;
18
+ readonly stamps: readonly KitStamp[];
19
+ readonly decals: readonly Decal[];
20
+ /** The chain's flat wing, when its parts are a flat membrane. */
21
+ readonly wing?: {
22
+ readonly wing: Omit<FlatWing, "frame">;
23
+ readonly material: Material;
24
+ };
25
+ };
26
+ /** A premade's parts for one slot (chains), or its coat (the look of its torso). */
27
+ export type PartKit = {
28
+ readonly chains: readonly KitChain[];
29
+ readonly coat?: SculptLook;
30
+ };
31
+ /** The premade's (or part variant's) rig as built for a new rig (cached; ids are local to the kit). */
32
+ export declare function kitRig(templateId: string): Rig | undefined;
33
+ /** True when a chain is a single path: each of its bones has at most one child in it. */
34
+ export declare const isPath: (c: SlotChain) => boolean;
35
+ /** A premade's kit for a slot; undefined for an unknown premade. */
36
+ export declare function partKit(templateId: string, slot: PartSlot): PartKit | undefined;
@@ -0,0 +1,17 @@
1
+ import type { Bone, PartSlot, Vec3 } from "../../../api/src/index.js";
2
+ /** The chain slots in picker order; the coat is the skin, not a chain. */
3
+ export declare const PART_SLOTS: readonly PartSlot[];
4
+ /** Bone roles whose parts wear the coat (not claws, horns, fangs, wings, fins or eyes). */
5
+ export declare const COAT_ROLES: Set<string>;
6
+ export declare const slotOfBone: (bone: Pick<Bone, "name" | "tags">) => PartSlot | undefined;
7
+ /** One chain of a slot: its bones from the start outward, their bind heads, side and (legs) front or hind. */
8
+ export type SlotChain = {
9
+ readonly bones: readonly Bone[];
10
+ readonly heads: readonly Vec3[];
11
+ readonly side: 1 | -1 | 0;
12
+ readonly front: boolean;
13
+ };
14
+ /** A slot's chains in a rig: runs of bones in that slot, each from a bone whose parent is not in it. */
15
+ export declare function slotChains(bones: readonly Bone[], slot: PartSlot): SlotChain[];
16
+ /** The slots a skeleton has (chains present, plus the coat when it has any coat part). */
17
+ export declare const slotsOf: (bones: readonly Bone[]) => PartSlot[];
@@ -0,0 +1,13 @@
1
+ import type { ColorRef, Quaternion, Stamp, StampMode, StampShape, Vec3 } from "../../../api/src/index.js";
2
+ /** A stamp before it gets its id (the part generator's output). */
3
+ export type PartStamp = {
4
+ readonly shape: StampShape;
5
+ readonly mode: StampMode;
6
+ readonly position: Vec3;
7
+ readonly rotation: Quaternion;
8
+ readonly scale: Vec3;
9
+ readonly color: ColorRef;
10
+ readonly blend?: number;
11
+ readonly foundationColor?: ColorRef;
12
+ };
13
+ export declare const withId: (s: PartStamp, id: string) => Stamp;
@@ -0,0 +1,44 @@
1
+ import type { FleckShape } from "../../../api/src/index.js";
2
+ export type PartFleck = {
3
+ readonly shape: FleckShape;
4
+ readonly size?: number;
5
+ readonly coverage?: number;
6
+ readonly variation?: number;
7
+ readonly regularity?: number;
8
+ readonly boil?: number;
9
+ readonly normalStrength?: number;
10
+ };
11
+ export type PartStyle = {
12
+ readonly kind: "body" | "head" | "limb" | "wing" | "flat";
13
+ readonly colorKey: string;
14
+ readonly fleck?: PartFleck;
15
+ readonly mat?: {
16
+ readonly roughness?: number;
17
+ readonly metalness?: number;
18
+ readonly foundationDarkness?: number;
19
+ };
20
+ readonly opacity?: number;
21
+ /** limb: radius at the chain root / tip (× extent), joint sphere factor, cone at the chain tip. */
22
+ readonly r0?: number;
23
+ readonly r1?: number;
24
+ readonly joint?: number;
25
+ readonly tipCone?: boolean;
26
+ /** wing panels: thickness and chord (× extent). */
27
+ readonly thick?: number;
28
+ readonly chord?: readonly number[];
29
+ /** flat wing parameters (templates override them per bone). */
30
+ readonly wing?: {
31
+ readonly [key: string]: number | string;
32
+ };
33
+ };
34
+ /** Radius = segment length × K for body kinds. */
35
+ export declare const PART_K: {
36
+ readonly [role: string]: number;
37
+ };
38
+ /** Default color per role (index into the editable palette) when no template color applies. */
39
+ export declare const PART_PALETTE: {
40
+ readonly [role: string]: number;
41
+ };
42
+ export declare const PART_STYLES: {
43
+ readonly [role: string]: PartStyle;
44
+ };
@@ -0,0 +1,18 @@
1
+ import type { Vec3 } from "../../../api/src/index.js";
2
+ import type { SkeletonTemplate } from "./template-catalog.js";
3
+ /** Templates fill 90% of the object's bounds. */
4
+ export declare const RIG_FIT = 0.9;
5
+ export declare const RIG_DEFAULT_SIZE: readonly [number, number, number];
6
+ export type Fit = {
7
+ readonly c: Vec3;
8
+ readonly h: Vec3;
9
+ };
10
+ /**
11
+ * POC applyPremadeSkeleton's fit: a new rig uses the template size around the origin; an object uses its
12
+ * content's center and 90% of its half-size (no content, e.g. an empty rig: the template size). Each
13
+ * half-size is at least 0.15.
14
+ */
15
+ export declare function premadeFit(tpl: SkeletonTemplate, content?: {
16
+ readonly center: Vec3;
17
+ readonly halfSize: Vec3;
18
+ }): Fit;
@@ -0,0 +1,3 @@
1
+ import type { PremadeInfo } from "../../../api/src/index.js";
2
+ /** The picker's list, in the POC's order. */
3
+ export declare const PREMADE_INFOS: readonly PremadeInfo[];
@@ -0,0 +1,31 @@
1
+ import type { BodyPart, Id, Rig, Transform, Vec3 } from "../../../api/src/index.js";
2
+ /** A head as drawn: its parts' additive stamps as ellipsoids, sized as the viewport sizes them. */
3
+ /** Where a seated chain sits: on the head, or on the torso (core / abdomen bones). */
4
+ export type SeatRegion = "head" | "torso" | ReadonlySet<Id>;
5
+ export type Reseated = {
6
+ readonly moved: readonly {
7
+ readonly boneId: Id;
8
+ readonly bind: Transform;
9
+ readonly pose: Transform;
10
+ }[];
11
+ readonly parts: readonly BodyPart[];
12
+ };
13
+ /**
14
+ * Where a point near one rig's head (or torso) goes on another's: the same direction from the head's center, at the same
15
+ * fraction of the way to its surface. Undefined when either rig has no head shape.
16
+ */
17
+ export declare function seatPoint(from: Rig, to: Rig, p: Vec3, region?: SeatRegion, toRegion?: SeatRegion): Vec3 | undefined;
18
+ /** The heads' size ratio (`to` over `from`), by their craniums (largest stamps); 1 without a head shape. */
19
+ export declare function headRatio(from: Rig, to: Rig, region?: SeatRegion, toRegion?: SeatRegion): number;
20
+ /** Resolved joint moves and parts with re-seated ones laid over them (by bone). */
21
+ export declare function withReseated<T extends Reseated>(resolved: T, re: Reseated): T;
22
+ /** True when a change touches the head (its parts or its size), so the chains on it may need re-seating. */
23
+ export declare const touchesHead: (rig: Rig, boneIds: Iterable<Id>) => boolean;
24
+ /**
25
+ * Keeps the chains on a head (ears, horns, antennae, mandibles, a beak) on its surface when the head changes (a
26
+ * swapped head, a resized one). Each chain's root sat some fraction of the way to the `before` head's surface along
27
+ * its direction from the head's center; it's put at the same fraction of the `after` head's. An unchanged head moves
28
+ * nothing, and swapping a head back restores the roots. The chain and its parts move with the root. Bones only
29
+ * `after` has (a fresh graft) stay where they are.
30
+ */
31
+ export declare function reseatAttachments(before: Rig, after: Rig): Reseated;
@@ -0,0 +1,51 @@
1
+ import type { Bake, TemplateColor } from "./bake-types.js";
2
+ type V3 = readonly [number, number, number];
3
+ /** A bone of a template, in template space (the fit maps p to c + p * h). */
4
+ export type TemplateBone = {
5
+ readonly name: string;
6
+ readonly parent: string | null;
7
+ readonly p: V3;
8
+ readonly tags: readonly string[];
9
+ };
10
+ /** A face decal of a generated template: u / v across the head's front, size in head widths. */
11
+ export type TemplateDecal = {
12
+ readonly bone: string;
13
+ readonly cat: string;
14
+ readonly name: string;
15
+ readonly pair?: boolean;
16
+ readonly u?: number;
17
+ readonly v?: number;
18
+ readonly size?: number;
19
+ readonly flip?: boolean;
20
+ readonly tint?: TemplateColor;
21
+ };
22
+ /** A per-bone style override (bone-name regex → style), used for flat wing parameters. */
23
+ export type TemplateStyle = {
24
+ readonly kind: "flat";
25
+ readonly colorKey: string;
26
+ readonly wing: {
27
+ readonly [key: string]: number | string;
28
+ };
29
+ };
30
+ export type RigBuilder = {
31
+ readonly bones: TemplateBone[];
32
+ readonly decals: TemplateDecal[];
33
+ readonly styles: {
34
+ [pattern: string]: TemplateStyle;
35
+ };
36
+ bake: Bake | undefined;
37
+ role<T>(id: string, fn: () => T): T;
38
+ decal(bone: string, cat: string, name: string, o?: Omit<TemplateDecal, "bone" | "cat" | "name">): void;
39
+ style(key: string, over: TemplateStyle): void;
40
+ bone(name: string, parent: string | null, p: V3, tags?: readonly string[]): string;
41
+ chain(name: string, parent: string | null, from: V3, to: V3, n: number): string[];
42
+ limb(parent: string | readonly string[] | null, names: string | readonly string[], pts: readonly V3[], mirror?: boolean): {
43
+ first: string[];
44
+ last: string[];
45
+ };
46
+ };
47
+ /** POC makeRigBuilder: bone() adds one bone, chain() a line of bones, limb() a (mirrored) chain. */
48
+ export declare function makeRigBuilder(): RigBuilder;
49
+ /** POC bakeBones: a baked template's bones come straight from the bake, and so do its parts and decals. */
50
+ export declare function bakeBones(b: RigBuilder, bake: Bake): void;
51
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { Bake } from "./bake-types.js";
2
+ export declare const RODENT_BAKE: Bake;
@@ -0,0 +1,2 @@
1
+ import type { Bake } from "./bake-types.js";
2
+ export declare const SCORPION_BAKE: Bake;
@@ -0,0 +1,2 @@
1
+ import type { Bake } from "./bake-types.js";
2
+ export declare const SHARK_BAKE: Bake;
@@ -0,0 +1,3 @@
1
+ import type { Bake } from "./bake-types.js";
2
+ export declare const FELINE_BAKE: Bake;
3
+ export declare const FOX_BAKE: Bake;
@@ -0,0 +1,4 @@
1
+ import type { Bake } from "./bake-types.js";
2
+ export declare const SKELETON_BAKES: {
3
+ readonly [id: string]: Bake;
4
+ };
@@ -0,0 +1,2 @@
1
+ import type { Bake } from "./bake-types.js";
2
+ export declare const SNAKE_BAKE: Bake;
@@ -0,0 +1,2 @@
1
+ import type { Bake } from "./bake-types.js";
2
+ export declare const SPIDER_BAKE: Bake;
@@ -0,0 +1,9 @@
1
+ import type { Stamp, Vec3 } from "../../../api/src/index.js";
2
+ /**
3
+ * The box around a sculpt's additive stamps (each a rotated box of its scale): the core's stand-in for the
4
+ * mesh bounds the POC read after meshing. Blends make the real mesh slightly larger.
5
+ */
6
+ export declare function stampsBox(stamps: readonly Pick<Stamp, "mode" | "position" | "rotation" | "scale">[]): {
7
+ readonly min: Vec3;
8
+ readonly max: Vec3;
9
+ } | undefined;
@@ -0,0 +1,7 @@
1
+ import type { BoneNode } from "./bone-tree.js";
2
+ import { type PartStyle } from "./part-styles.js";
3
+ import type { TemplateStyle } from "./rig-builder.js";
4
+ /** POC getStyleForBone: a template style whose key (a regex) matches the name, else the role's style. */
5
+ export declare function styleForBone(node: BoneNode, role: string, styles: {
6
+ readonly [pattern: string]: TemplateStyle;
7
+ }): PartStyle | TemplateStyle | undefined;
@@ -0,0 +1,13 @@
1
+ import type { IdGenerator, PartSlot, PartSlotSwapped, Rig } from "../../../api/src/index.js";
2
+ export type ResolvedSwap = Omit<PartSlotSwapped["payload"], "rigId">;
3
+ /** The tag on bones a kit brought for a slot (a variant's trunk, ear chains): the slot's next swap removes them. */
4
+ export declare const kitTag: (slot: PartSlot) => string;
5
+ /**
6
+ * What giving a slot `kit`'s parts does to a rig. A head takes the kit's head parts; the chains a head variant carries
7
+ * (a trunk) come as bones, and an earlier kit's are removed; the chains on the head re-seat on it. Ears or horns from
8
+ * a variant (or replacing a variant's) come as their own bones seated on this head, a variant's tail as its own bones
9
+ * on the torso. Anything else is fitted to the rig's own chains.
10
+ */
11
+ export declare function resolveSwap(rig: Rig, slot: PartSlot, kit: string, ids: IdGenerator): ResolvedSwap | string;
12
+ /** A rig with a resolved swap applied (the fold's and the generator's one way of doing it). */
13
+ export declare function withSwap(r: Rig, e: ResolvedSwap): Rig;
@@ -0,0 +1,20 @@
1
+ import { type RigBuilder } from "./rig-builder.js";
2
+ import type { CreatureFamily } from "../../../api/src/index.js";
3
+ import type { TemplateColor } from "./bake-types.js";
4
+ export type SkeletonTemplate = {
5
+ readonly id: string;
6
+ readonly name: string;
7
+ readonly icon: string;
8
+ /** Parts swap within a family unless the user asks for a chimera. */
9
+ readonly family: CreatureFamily;
10
+ readonly desc: string;
11
+ /** Template-space extent for a new rig (default 2.2 on each axis). */
12
+ readonly size?: readonly [number, number, number];
13
+ /** Body color keys → POC color refs ("s:0", "s:black"…). */
14
+ readonly colors: {
15
+ readonly [key: string]: TemplateColor;
16
+ };
17
+ readonly build: (b: RigBuilder) => void;
18
+ };
19
+ export declare const SKELETON_TEMPLATES: readonly SkeletonTemplate[];
20
+ export declare const findTemplate: (id: string) => SkeletonTemplate | undefined;
@@ -0,0 +1,9 @@
1
+ import type { ColorRef } from "../../../api/src/index.js";
2
+ import type { TemplateColor } from "./bake-types.js";
3
+ /**
4
+ * POC bakeColor + slot refs: "@key" is the template's color for that key (the POC falls back to the
5
+ * literal 0xfbbf24, the default Secondary, which is the Secondary slot here); "s:N" refs become slots.
6
+ */
7
+ export declare function templateColor(c: TemplateColor | undefined, colors: {
8
+ readonly [key: string]: TemplateColor;
9
+ }): ColorRef;
@@ -0,0 +1,2 @@
1
+ import type { Bake } from "./bake-types.js";
2
+ export declare const TURTLE_BAKE: Bake;
@@ -0,0 +1,16 @@
1
+ import type { BakeBone, BakeLook, BakePart, BakeStamp } from "../bake-types.js";
2
+ import { type V3 } from "../bake-authoring.js";
3
+ import type { PartVariant } from "./part-variant.js";
4
+ export declare const FISH: {
5
+ head: V3;
6
+ spine: V3[];
7
+ pecBase: V3;
8
+ };
9
+ export declare const TAIL_BASE: V3;
10
+ export declare const finBones: (tailUp: V3, tailDown: V3, dorsal: V3, pecTip: V3, pelvic: V3) => BakeBone[];
11
+ export declare const finVariant: (id: string, name: string, icon: string, desc: string, bones: readonly BakeBone[], parts: {
12
+ readonly [bone: string]: BakePart | null;
13
+ }, family?: PartVariant["family"]) => PartVariant;
14
+ export declare const tentacleVariant: (id: string, name: string, icon: string, desc: string, segment: (k: number, j: number, a: V3, b: V3) => readonly BakeStamp[], look?: BakeLook, reach?: number, droop?: number, family?: PartVariant["family"]) => PartVariant;
15
+ /** Aquatic variants: fins, tentacles and sea heads. */
16
+ export declare const AQUATIC_VARIANTS: readonly PartVariant[];
@@ -0,0 +1,7 @@
1
+ import type { BakeLook } from "../bake-types.js";
2
+ import type { PartVariant } from "./part-variant.js";
3
+ /** A patterned look: the pattern (by its index in the catalog), its scale, strength and colors. */
4
+ export declare const patterned: (base: BakeLook, kind: number, scale: number, rot?: readonly [number, number, number], strength?: number, color?: string) => BakeLook;
5
+ export declare const coatVariant: (id: string, name: string, icon: string, desc: string, look: BakeLook, family?: PartVariant["family"]) => PartVariant;
6
+ /** Coat variants: a fleck and a pattern for a rig's skin. */
7
+ export declare const COAT_VARIANTS: readonly PartVariant[];
@@ -0,0 +1,8 @@
1
+ import type { BakePart } from "../bake-types.js";
2
+ import { type V3 } from "../bake-authoring.js";
3
+ import type { PartVariant } from "./part-variant.js";
4
+ export declare const earVariant: (id: string, name: string, icon: string, desc: string, joints: readonly (readonly [string, V3])[], parts: {
5
+ readonly [bone: string]: BakePart | null;
6
+ }, family?: PartVariant["family"]) => PartVariant;
7
+ /** Ear variants: jointed ear chains on a reference head (the head itself isn't given). */
8
+ export declare const EAR_VARIANTS: readonly PartVariant[];
@@ -0,0 +1,3 @@
1
+ import type { PartVariant } from "./part-variant.js";
2
+ /** The second batch of made-up variants. */
3
+ export declare const FANTASY_MORE_VARIANTS: readonly PartVariant[];
@@ -0,0 +1,17 @@
1
+ import type { BakeLook, BakeStamp } from "../bake-types.js";
2
+ import { type V3 } from "../bake-authoring.js";
3
+ import type { PartVariant } from "./part-variant.js";
4
+ export declare const METAL_LOOK: BakeLook;
5
+ export declare const CRYSTAL_LOOK: BakeLook;
6
+ export declare const ROCK_LOOK: BakeLook;
7
+ export declare const BARK_LOOK: BakeLook;
8
+ export declare const LEAF_LOOK: BakeLook;
9
+ export declare const SHROOM_LOOK: BakeLook;
10
+ export declare const FIRE_LOOK: BakeLook;
11
+ export declare const SLIME_LOOK: BakeLook;
12
+ export declare const NEON_LOOK: BakeLook;
13
+ /** An ellipsoid from a to b, `w` wide and `t` thin (a leaf, a plate, a petal). */
14
+ export declare const blade: (a: V3, b: V3, w: number, t: number, color: string) => BakeStamp;
15
+ export declare const lerp3: (a: V3, b: V3, t: number) => V3;
16
+ /** Made-up variants: fungus, plant, mineral, machine and elemental parts. */
17
+ export declare const FANTASY_VARIANTS: readonly PartVariant[];
@@ -0,0 +1,9 @@
1
+ import type { BakeDecal, TemplateColor } from "../bake-types.js";
2
+ import { type V3 } from "../bake-authoring.js";
3
+ import type { PartVariant } from "./part-variant.js";
4
+ import { variant } from "./variant-authoring.js";
5
+ export declare const eyes: (c: V3, s: V3, name: string, size: number, d: V3) => BakeDecal[];
6
+ export declare const mouth: (c: V3, s: V3, name: string, size: number, d: V3, tint?: TemplateColor) => BakeDecal;
7
+ export declare const headVariant: (...args: Parameters<typeof variant> extends [unknown, ...infer R] ? R : never) => PartVariant;
8
+ /** Head variants (the slot's parts: the head's shapes and face; a trunk comes as a jointed chain). */
9
+ export declare const HEAD_VARIANTS: readonly PartVariant[];
@@ -0,0 +1,7 @@
1
+ import type { BakeBone, BakePart } from "../bake-types.js";
2
+ import type { PartVariant } from "./part-variant.js";
3
+ export declare const hornVariant: (id: string, name: string, icon: string, desc: string, bones: readonly BakeBone[], parts: {
4
+ readonly [bone: string]: BakePart | null;
5
+ }, head?: BakePart, family?: PartVariant["family"]) => PartVariant;
6
+ /** Horn variants: jointed horn chains on a reference head (the head itself isn't given). */
7
+ export declare const HORN_VARIANTS: readonly PartVariant[];
@@ -0,0 +1,10 @@
1
+ import type { PartVariantInfo } from "../../../../api/src/index.js";
2
+ import { type SkeletonTemplate } from "../template-catalog.js";
3
+ import type { PartVariant } from "./part-variant.js";
4
+ export type { PartVariant } from "./part-variant.js";
5
+ /** Every part variant, by slot then picker order. */
6
+ export declare const PART_VARIANTS: readonly PartVariant[];
7
+ export declare const PART_VARIANT_INFOS: readonly PartVariantInfo[];
8
+ export declare const findVariant: (id: string) => PartVariant | undefined;
9
+ /** A kit's source: a premade template or a part variant. */
10
+ export declare const findKitTemplate: (id: string) => SkeletonTemplate | undefined;
@@ -0,0 +1,3 @@
1
+ import type { PartVariant } from "./part-variant.js";
2
+ /** Land-animal variants: more heads, horns, ears and coats. */
3
+ export declare const LAND_VARIANTS: readonly PartVariant[];
@@ -0,0 +1,7 @@
1
+ import type { BakeStamp } from "../bake-types.js";
2
+ import { type V3 } from "../bake-authoring.js";
3
+ import type { PartVariant } from "./part-variant.js";
4
+ export declare const legVariant: (id: string, name: string, icon: string, family: PartVariant["family"], desc: string, segs: readonly (readonly BakeStamp[])[], look?: import("../bake-types.js").BakeLook) => PartVariant;
5
+ export declare const LEG_JOINTS: readonly V3[];
6
+ /** Leg variants: leg shapes fitted along a rig's own legs. */
7
+ export declare const LEG_VARIANTS: readonly PartVariant[];
@@ -0,0 +1,14 @@
1
+ import type { PartSlot } from "../../../../api/src/index.js";
2
+ import type { SkeletonTemplate } from "../template-catalog.js";
3
+ /**
4
+ * A body part variant: a small bake built like a premade (a `Head` bone, and for ears a reference head, plus its
5
+ * chains), whose parts for `slot` fill that slot of a premade rig. Its bones beyond the head chain (a trunk, ear
6
+ * chains) come along as jointed chains.
7
+ */
8
+ export type PartVariant = SkeletonTemplate & {
9
+ readonly slot: PartSlot;
10
+ /** Parts that suit it in other slots (an elephant head's ears): the generator usually takes them along. */
11
+ readonly companions?: {
12
+ readonly [Slot in PartSlot]?: string;
13
+ };
14
+ };
@@ -0,0 +1,6 @@
1
+ import type { BakeStamp } from "../bake-types.js";
2
+ import { type V3 } from "../bake-authoring.js";
3
+ import type { PartVariant } from "./part-variant.js";
4
+ export declare const tailVariant: (id: string, name: string, icon: string, desc: string, joints: readonly V3[], parts: (j: readonly V3[]) => readonly (readonly BakeStamp[] | null)[], look?: import("../bake-types.js").BakeLook, blend?: number, family?: PartVariant["family"]) => PartVariant;
5
+ /** Tail variants: a jointed tail chain on a reference torso (the torso itself isn't given). */
6
+ export declare const TAIL_VARIANTS: readonly PartVariant[];
@@ -0,0 +1,29 @@
1
+ import type { CreatureFamily, PartSlot } from "../../../../api/src/index.js";
2
+ import type { Bake, BakeBone, BakeLook, BakePart, BakeStamp, TemplateColor } from "../bake-types.js";
3
+ import { type V3 } from "../bake-authoring.js";
4
+ import type { PartVariant } from "./part-variant.js";
5
+ export declare const LEAF = "@leaf", MOSS = "@moss", PETAL = "@petal", CAP = "@cap", SPOT = "@spot", STEM = "@stem", CRYSTAL = "@crystal", ROCK = "@rock";
6
+ export declare const METAL = "@metal", PANEL = "@panel", NEON = "@neon", FIRE = "@fire", EMBER = "@ember", ICE = "@ice", SLIME = "@slime";
7
+ export declare const CORE = "@core", HORN = "@horn", HOOF = "@hoof", WHITE = "@white", PALE = "@pale", NOSE = "@nose", INNER = "@inner", STRIPE = "@stripe", MANE = "@mane", TUSK = "@tusk", BEAK = "@beak";
8
+ /** Every variant's color keys (the scene palette's roles). */
9
+ export declare const COLORS: {
10
+ readonly [key: string]: TemplateColor;
11
+ };
12
+ export declare const FUR: BakeLook;
13
+ export declare const SKIN: BakeLook;
14
+ export declare const SCALES: BakeLook;
15
+ export declare const FEATHERS: BakeLook;
16
+ export declare const HORNY: BakeLook;
17
+ export declare const corePart: (stamps: readonly BakeStamp[], look?: BakeLook, blend?: number) => BakePart;
18
+ /** A paint mark with its own sharp blend (a part's blend would smear a small mark into a blot). */
19
+ export declare const mark: (p: V3, s: V3, color: TemplateColor, rot?: V3) => BakeStamp;
20
+ /** Both sides of a sided stamp. */
21
+ export declare const both: (f: (side: 1 | -1) => BakeStamp) => BakeStamp[];
22
+ export declare const HEAD_BONE: BakeBone;
23
+ /** A reference torso (`Hips`, a core bone at the origin) for variants that hang from the body: tails, legs, coats. */
24
+ export declare const HIPS_BONE: BakeBone;
25
+ /** A variant from its bake (the `Head` bone is added first, or `root` instead: the `Hips` for body parts). */
26
+ export declare function variant(slot: PartSlot, id: string, name: string, icon: string, family: CreatureFamily, desc: string, bake: Omit<Bake, "regionBlends" | "bones"> & {
27
+ readonly bones?: readonly BakeBone[];
28
+ readonly root?: BakeBone;
29
+ }, companions?: PartVariant["companions"]): PartVariant;
@@ -0,0 +1,2 @@
1
+ import type { Bake } from "./bake-types.js";
2
+ export declare const WHALE_BAKE: Bake;
@@ -0,0 +1,4 @@
1
+ import type { FlatWing } from "../../../api/src/index.js";
2
+ /** POC WING_DEFAULTS (colors as palette refs). */
3
+ export declare const WING_DEFAULTS: Omit<FlatWing, "frame">;
4
+ export declare const WING_COLOR_KEYS: readonly ["base", "base2", "mark", "ink", "dot"];
@@ -0,0 +1,10 @@
1
+ import type { WingFrame } from "../../../api/src/index.js";
2
+ import type { BoneNode } from "./bone-tree.js";
3
+ /**
4
+ * POC wingFrameFor: span from the root to the end of the wing chain; the membrane plane is the sibling
5
+ * wing pair's plane (fore and hind coplanar), else level; the chord points backwards, as long as the span.
6
+ */
7
+ export declare function wingFrameFor(node: BoneNode, siblings: readonly BoneNode[], extent: number): {
8
+ frame: WingFrame;
9
+ part: "fore" | "hind";
10
+ };
@@ -0,0 +1,2 @@
1
+ import type { Bake } from "./bake-types.js";
2
+ export declare const WOLF_BAKE: Bake;
@@ -0,0 +1,2 @@
1
+ import type { Bake } from "./bake-types.js";
2
+ export declare const WORM_BAKE: Bake;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * The mesher ABI shared by the Rust / WASM core and the TypeScript reference core.
3
+ *
4
+ * Stamp table: `STAMP_STRIDE` f64 per stamp, in CSG order (stamp 0 starts the stack):
5
+ * 0 shape code (SHAPE_CODE) 1 mode code (MODE_CODE)
6
+ * 2..4 position 5..13 inverse rotation, row-major 3x3 (local = SR * (p - position))
7
+ * 14..16 half sizes 17 blend
8
+ * 18 bounding radius 19 bound scale (lower-bound factor of stretched shapes)
9
+ * 20..22 color rgb 23..25 foundation rgb
10
+ * 26..29 roughness, metalness, glow, flecks (f32-rounded)
11
+ * 30 override mask (bit k = material channel k is the stamp's own) 31 unused
12
+ *
13
+ * Grid params: `PARAMS_LEN` f64:
14
+ * 0..2 origin of sample (0,0,0) 3..5 step 6..8 samples per axis (RX, RY, RZ)
15
+ * 9 own (first index along an edge's axis that emits quads; chunks own their low side only)
16
+ * 10 cache slot (-1: none) 11..16 inclusive voxel box to evaluate x0 x1 y0 y1 z0 z1 (x0 > x1: none)
17
+ *
18
+ * The optional stamp list (i32) holds the stamp indices to apply, in order; empty means all.
19
+ * When a slot's arrays have to be (re)allocated, the core evaluates the whole grid whatever the box says.
20
+ */
21
+ export declare const STAMP_STRIDE = 32;
22
+ export declare const PARAMS_LEN = 17;
23
+ export declare const SHAPE_CODE: {
24
+ readonly cube: 0;
25
+ readonly sphere: 1;
26
+ readonly cylinder: 2;
27
+ readonly torus: 3;
28
+ readonly cone: 4;
29
+ readonly pyramid: 5;
30
+ readonly prism: 6;
31
+ readonly octahedron: 7;
32
+ readonly capsule: 8;
33
+ readonly dome: 9;
34
+ };
35
+ export declare const MODE_CODE: {
36
+ readonly add: 0;
37
+ readonly subtract: 1;
38
+ readonly intersect: 2;
39
+ readonly paint: 3;
40
+ };
41
+ /** Skin segment table: 7 f64 per segment: head xyz, end xyz, bone index. */
42
+ export declare const SEGMENT_STRIDE = 7;
43
+ export type RawMesh = {
44
+ readonly positions: Float32Array;
45
+ readonly normals: Float32Array;
46
+ readonly colors: Float32Array;
47
+ readonly foundation: Float32Array;
48
+ readonly material: Float32Array;
49
+ readonly indices: Uint32Array;
50
+ /** Vertex AABB (zeros for an empty mesh). */
51
+ readonly bounds: readonly [number, number, number, number, number, number];
52
+ };
53
+ export type RawSkin = {
54
+ readonly boneIndices: Float32Array;
55
+ readonly boneWeights: Float32Array;
56
+ };
57
+ /** One mesher implementation. Every output array is freshly allocated (safe to transfer). */
58
+ export type MesherCore = {
59
+ readonly kind: "wasm" | "reference";
60
+ mesh(table: Float64Array, stampCount: number, params: Float64Array, list: Int32Array | null): RawMesh;
61
+ /** Frees a cache slot's voxel arrays. */
62
+ dropSlot(slot: number): void;
63
+ skin(positions: Float32Array, segments: Float64Array, segmentCount: number, boneCount: number): RawSkin;
64
+ };