@felbrasil/dreamy 0.0.0-stage → 0.1.1

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,53 @@
1
+ import type { Id } from "../id.js";
2
+ import type { Quaternion, Vec3 } from "./math.js";
3
+ import type { ColorRef } from "./palette.js";
4
+ export type StampShape = "cube" | "sphere" | "cylinder" | "torus" | "cone" | "pyramid" | "prism" | "octahedron" | "capsule" | "dome";
5
+ /** Add, subtract and intersect shape the solid; paint only recolors the surface it overlaps. */
6
+ export type StampMode = "add" | "subtract" | "intersect" | "paint";
7
+ export type SymmetryAxis = "x" | "y" | "z";
8
+ /**
9
+ * Kaleidoscope repeat about the sculpt's pivot: `count` copies (1–12) on each listed axis.
10
+ * Two copies mirror, more rotate. Copies are derived when meshing, never stored.
11
+ */
12
+ export type Symmetry = {
13
+ readonly count: number;
14
+ readonly axes: readonly SymmetryAxis[];
15
+ };
16
+ /** Per-stamp material channels. Absent means the sculpt's value. */
17
+ export type MaterialOverrides = {
18
+ readonly roughness?: number;
19
+ readonly metalness?: number;
20
+ readonly glow?: number;
21
+ /** false paints the stamp's area without flecks. */
22
+ readonly flecks?: boolean;
23
+ };
24
+ export type Stamp = {
25
+ readonly id: Id;
26
+ readonly shape: StampShape;
27
+ /** Placement in the sculpt's local space. */
28
+ readonly position: Vec3;
29
+ readonly rotation: Quaternion;
30
+ readonly scale: Vec3;
31
+ readonly mode: StampMode;
32
+ /** Smooth-blend radius for this stamp. Absent means the sculpt's blend. */
33
+ readonly blend?: number;
34
+ /** Absent means the sculpt's color. */
35
+ readonly color?: ColorRef;
36
+ /** Absent means it follows the stamp's color. */
37
+ readonly foundationColor?: ColorRef;
38
+ readonly material?: MaterialOverrides;
39
+ readonly symmetry?: Symmetry;
40
+ /** The smear group this stamp belongs to; the group's settings win over the stamp's. */
41
+ readonly smearGroupId?: Id;
42
+ };
43
+ /** One smear stroke: its stamps share these settings and move as one until unlocked. */
44
+ export type SmearGroup = {
45
+ readonly id: Id;
46
+ readonly name: string;
47
+ readonly mode: StampMode;
48
+ readonly color: ColorRef;
49
+ readonly foundationColor?: ColorRef;
50
+ readonly blend: number;
51
+ readonly symmetry?: Symmetry;
52
+ readonly unlocked: boolean;
53
+ };
@@ -0,0 +1,35 @@
1
+ import type { Vec3 } from "./math.js";
2
+ import type { ColorRef } from "./palette.js";
3
+ export type WingOutline = "monarch" | "swallowtail" | "morpho" | "moth" | "dragonfly" | "bee" | "fly" | "bat";
4
+ export type WingPatternStyle = "veins" | "dots" | "bands" | "eyespots" | "morpho" | "speckled" | "clear";
5
+ /**
6
+ * Where the wing sits, in the rig's bind space: root, span axis (root to chain end) and chord axis
7
+ * (backwards, same length unit as the span). Derived from the bones when the part is made.
8
+ */
9
+ export type WingFrame = {
10
+ readonly origin: Vec3;
11
+ readonly span: Vec3;
12
+ readonly chord: Vec3;
13
+ };
14
+ /** A zero-thickness, double-sided membrane with a procedural pattern. */
15
+ export type FlatWing = {
16
+ readonly outline: WingOutline;
17
+ readonly part: "fore" | "hind";
18
+ /** 0.4–1.6. */
19
+ readonly span: number;
20
+ /** 0.3–2. */
21
+ readonly chord: number;
22
+ /** Hindwing tail length, 0–1. */
23
+ readonly tail: number;
24
+ readonly style: WingPatternStyle;
25
+ readonly density: number;
26
+ readonly spots: number;
27
+ readonly border: number;
28
+ readonly seed: number;
29
+ readonly base: ColorRef;
30
+ readonly base2: ColorRef;
31
+ readonly mark: ColorRef;
32
+ readonly ink: ColorRef;
33
+ readonly dot: ColorRef;
34
+ readonly frame: WingFrame;
35
+ };
@@ -0,0 +1,7 @@
1
+ import type { Id } from "../id.js";
2
+ export type IdGenerator = {
3
+ next(): Id;
4
+ };
5
+ export type Clock = {
6
+ now(): number;
7
+ };
@@ -0,0 +1,62 @@
1
+ import type { Vec3 } from "../model/math.js";
2
+ import type { Palette } from "../model/palette.js";
3
+ import type { Sculpt } from "../model/sculpt.js";
4
+ /** Mesh one sculpt at a voxel resolution. Colors resolve against the palette (fixed colors included). */
5
+ export type MeshRequest = {
6
+ /** Newest request per key wins; older pending ones are dropped. */
7
+ readonly key: string;
8
+ readonly sculpt: Sculpt;
9
+ readonly palette: Palette;
10
+ /** Voxels along the longest side (LOD picks 36 / 24 / 16 from the base resolution). */
11
+ readonly resolution: number;
12
+ /**
13
+ * Large standalone objects (longest side ≥ 8): chunked clipmap LOD around this view, in the sculpt's local
14
+ * space. Absent: one grid at `resolution`. Camera moves re-send the request (newest wins).
15
+ */
16
+ readonly view?: {
17
+ readonly camera: Vec3;
18
+ readonly pixelsPerUnitAtDistance1: number;
19
+ };
20
+ };
21
+ /** Surface Nets output, ready for a GPU buffer. Typed arrays are transferred, not copied. */
22
+ export type MeshResult = {
23
+ readonly key: string;
24
+ readonly positions: Float32Array;
25
+ readonly normals: Float32Array;
26
+ /** Fleck color per vertex: palette hex / 255 per channel, unconverted (the POC's convention). */
27
+ readonly colors: Float32Array;
28
+ /** Foundation (bed) color per vertex, same convention as `colors`. */
29
+ readonly foundation: Float32Array;
30
+ /** roughness, metalness, glow, flecks per vertex. */
31
+ readonly material: Float32Array;
32
+ readonly indices: Uint32Array;
33
+ readonly boundsMin: Vec3;
34
+ readonly boundsMax: Vec3;
35
+ /** Milliseconds spent meshing (for the stats display). */
36
+ readonly ms: number;
37
+ /** Kaleidoscope copies dropped by the per-sculpt cap (the UI warns "Symmetry limit reached"). */
38
+ readonly overflow?: number;
39
+ };
40
+ /** Auto skin weights against a bone set (bind pose): up to 4 bones per vertex. */
41
+ export type SkinRequest = {
42
+ readonly key: string;
43
+ readonly positions: Float32Array;
44
+ /** Per bone: its head and each child's head (a leaf bone is a point), in the mesh's space. */
45
+ readonly bones: readonly {
46
+ readonly head: Vec3;
47
+ readonly childHeads: readonly Vec3[];
48
+ }[];
49
+ };
50
+ export type SkinResult = {
51
+ readonly key: string;
52
+ readonly boneIndices: Float32Array;
53
+ readonly boneWeights: Float32Array;
54
+ };
55
+ /** Turns sculpts into meshes off the main thread (Rust / WASM in a Worker, TS fallback). */
56
+ export type Evaluator = {
57
+ mesh(request: MeshRequest): Promise<MeshResult>;
58
+ skinWeights(request: SkinRequest): Promise<SkinResult>;
59
+ /** Drops pending work for a key (the object was deleted). */
60
+ cancel(key: string): void;
61
+ dispose(): void;
62
+ };
@@ -0,0 +1,89 @@
1
+ import type { Id } from "../id.js";
2
+ import type { CreationLog } from "../model/creation.js";
3
+ export type LibraryEntry = {
4
+ readonly id: Id;
5
+ readonly name: string;
6
+ readonly updatedAt: number;
7
+ /** Small preview image (data URL), when the app captured one. */
8
+ readonly thumbnail?: string;
9
+ };
10
+ /** The app's library of creations (IndexedDB) and file import / export. */
11
+ export type Persistence = {
12
+ list(): Promise<readonly LibraryEntry[]>;
13
+ /** The creation a refresh should open. */
14
+ current(): Promise<Id | undefined>;
15
+ load(id: Id): Promise<CreationLog | undefined>;
16
+ /** Autosave of the working copy. */
17
+ save(id: Id, log: CreationLog, thumbnail?: string): Promise<void>;
18
+ create(name: string, log: CreationLog): Promise<Id>;
19
+ open(id: Id): Promise<void>;
20
+ rename(id: Id, name: string): Promise<void>;
21
+ duplicate(id: Id): Promise<Id>;
22
+ remove(id: Id): Promise<void>;
23
+ /** Downloads the log as a file. */
24
+ exportFile(id: Id): Promise<void>;
25
+ /** Reads a file into a new library entry. Undefined when cancelled or not a creation. */
26
+ importFile(): Promise<Id | undefined>;
27
+ /** Downloads any JSON document (rig export). */
28
+ downloadJson(name: string, data: unknown): Promise<void>;
29
+ };
30
+ export type GitProvider = "github" | "gitlab";
31
+ /** Where the library syncs: one repository holds every creation. */
32
+ export type GitSettings = {
33
+ readonly provider: GitProvider;
34
+ /** Personal access token (GitHub: contents read/write; GitLab: api scope). */
35
+ readonly token: string;
36
+ /** Repository name, or "owner/name" / "group/name". Created (private) when missing. */
37
+ readonly repo: string;
38
+ readonly branch: string;
39
+ /** GitLab only: the instance, default https://gitlab.com. */
40
+ readonly instanceUrl?: string;
41
+ /** GitLab only: the group that owns the repository (group access tokens). */
42
+ readonly groupPath?: string;
43
+ };
44
+ export type SyncStatus = {
45
+ readonly state: "off" | "idle" | "syncing" | "error";
46
+ /** Set while connected. */
47
+ readonly provider?: GitProvider;
48
+ readonly repo?: string;
49
+ readonly branch?: string;
50
+ readonly user?: string;
51
+ readonly lastSyncedAt?: number;
52
+ /** The last error, or a summary of the last sync. */
53
+ readonly message?: string;
54
+ };
55
+ export type SyncSummary = {
56
+ readonly pushed: number;
57
+ readonly pulled: number;
58
+ readonly deleted: number;
59
+ readonly conflicts: number;
60
+ };
61
+ /** Syncs the library with a git repository. The app does the network work; the UI only calls this port. */
62
+ export type LibrarySync = {
63
+ status(): SyncStatus;
64
+ /** Called on every status change; returns the unsubscribe. */
65
+ subscribe(listener: (status: SyncStatus) => void): () => void;
66
+ /** Settings to prefill the form with (no token). */
67
+ settings(): Omit<GitSettings, "token"> | undefined;
68
+ /** Verifies the token, finds or creates the repository, then syncs. */
69
+ connect(settings: GitSettings): Promise<void>;
70
+ disconnect(): Promise<void>;
71
+ syncNow(): Promise<SyncSummary>;
72
+ };
73
+ /** Per-browser view settings: not part of any creation. */
74
+ export type ViewPreferences = {
75
+ readonly renderMode: "normal" | "pixel";
76
+ readonly renderResolution: "32" | "64" | "128" | "256" | "hd" | "fhd" | "screen";
77
+ readonly renderSelectedOnly: boolean;
78
+ readonly cameraSun: boolean;
79
+ /** Base voxel resolution of the mesher, 16–64. */
80
+ readonly voxelResolution: number;
81
+ readonly hints: boolean;
82
+ readonly stats: boolean;
83
+ /** Decal line boost distance. */
84
+ readonly decalBoost: number;
85
+ };
86
+ export type PreferencesStore = {
87
+ load(): ViewPreferences;
88
+ save(prefs: ViewPreferences): void;
89
+ };
@@ -0,0 +1,125 @@
1
+ import type { Command } from "../commands/command.js";
2
+ import type { SculptTarget } from "../commands/target.js";
3
+ import type { DispatchResult } from "../creation-api.js";
4
+ import type { Id } from "../id.js";
5
+ import type { DecalArt } from "../model/decal.js";
6
+ import type { Creation } from "../model/creation.js";
7
+ import type { Vec3 } from "../model/math.js";
8
+ import type { ColorRef } from "../model/palette.js";
9
+ import type { StampMode, StampShape, Symmetry } from "../model/stamp.js";
10
+ import type { ViewPreferences } from "./persistence.js";
11
+ /** What is selected. View state, owned by the module, never stored in the creation. */
12
+ export type Selection = {
13
+ readonly objectIds: readonly Id[];
14
+ /** Stamps of the scoped sculpt. */
15
+ readonly stampIds: readonly Id[];
16
+ /** The selected bone of the selected rig. */
17
+ readonly boneId?: Id;
18
+ };
19
+ export type Tool = "select" | "translate" | "rotate" | "scale" | "pivot" | "stamp" | "decal" | "bone";
20
+ export type BoneTool = "select" | "add" | "rotate" | "translate" | "scale";
21
+ /** The stamp brush (also drives the ghost preview and the smear stroke). */
22
+ export type StampBrush = {
23
+ readonly shape: StampShape;
24
+ readonly mode: StampMode;
25
+ /** 0.15–4. */
26
+ readonly size: number;
27
+ readonly color: ColorRef;
28
+ readonly smear: boolean;
29
+ readonly blend: number;
30
+ readonly symmetry: Symmetry;
31
+ };
32
+ export type DecalBrush = {
33
+ /** Undefined: nothing to place (an empty "My designs" list). */
34
+ readonly art?: DecalArt;
35
+ readonly size: number;
36
+ /** Degrees about the surface normal. */
37
+ readonly roll: number;
38
+ readonly flip: boolean;
39
+ readonly tint: ColorRef;
40
+ readonly eraser: boolean;
41
+ /** Room depth for interiors. */
42
+ readonly depth: number;
43
+ };
44
+ /** Everything the viewport needs besides the creation. Sent on every change. */
45
+ export type ViewSession = {
46
+ /** Assembly edits objects; sculpt edits the scoped sculpt's stamps. */
47
+ readonly mode: "assembly" | "sculpt";
48
+ readonly scope?: SculptTarget;
49
+ readonly selection: Selection;
50
+ readonly tool: Tool;
51
+ readonly space: "world" | "local";
52
+ readonly brush: StampBrush;
53
+ readonly decalBrush: DecalBrush;
54
+ readonly boneTool: BoneTool;
55
+ /** The pivot tool's gizmo: move or turn the kaleidoscope pivot. */
56
+ readonly pivotGizmo: "translate" | "rotate";
57
+ /** Rigs whose bones are hidden (the object list's eye toggle). */
58
+ readonly hiddenBones: readonly Id[];
59
+ /** Show bones of rigs (rig bones category active). */
60
+ readonly showBones: boolean;
61
+ /** Virtual modifiers for touch: area select (Shift) and add-to-selection (Ctrl). */
62
+ readonly touchArea: boolean;
63
+ readonly touchAdd: boolean;
64
+ readonly prefs: ViewPreferences;
65
+ readonly play: boolean;
66
+ readonly stressTest: boolean;
67
+ };
68
+ /** How the viewport reports gestures back. Commands go to the module, which dispatches them. */
69
+ export type ViewportCallbacks = {
70
+ command(command: Command): DispatchResult;
71
+ select(selection: Selection): void;
72
+ /** Double-click: frame this object and open its Properties. */
73
+ focus(objectId: Id): void;
74
+ /** Escape held in sculpt mode, or the dock button. */
75
+ scopeOut(): void;
76
+ toast(message: string): void;
77
+ /** FPS, triangles, mesh time, LOD counts. */
78
+ stats(text: string): void;
79
+ };
80
+ /** One placeable decal for the picker: built-in art (the viewport owns it) or one of the creation's designs. */
81
+ export type DecalCatalogEntry = {
82
+ readonly art: DecalArt;
83
+ readonly name: string;
84
+ /** Data URL, drawn with the current palette. */
85
+ readonly thumbnail: string;
86
+ readonly tintable: boolean;
87
+ /** Default tint for tintable art. */
88
+ readonly tint?: ColorRef;
89
+ };
90
+ /** How `Viewport.frame` places the camera. */
91
+ export type FrameOptions = {
92
+ /**
93
+ * The shape of the area the objects are contained in, as width / height, centred in the view and as large as fits
94
+ * (default 1: a square, as a square render's).
95
+ */
96
+ readonly aspect?: number;
97
+ /** The share of the area left empty around the objects, 0–0.5 (default 0.03). */
98
+ readonly padding?: number;
99
+ /** Where the camera looks from, as a direction from the objects (default: the current view direction). */
100
+ readonly direction?: Vec3;
101
+ };
102
+ /** The 3D view. Imperative so the port stays framework-agnostic. */
103
+ export type Viewport = {
104
+ /** Built-ins by category, then the creation's designs (category "custom"). */
105
+ decalCatalog(creation: Creation): readonly (DecalCatalogEntry & {
106
+ readonly category: string;
107
+ })[];
108
+ /** `host` is the element the canvas goes into (typed loosely: no DOM types in the contract). */
109
+ mount(host: object, callbacks: ViewportCallbacks): void;
110
+ update(creation: Creation, session: ViewSession): void;
111
+ /** Content box of an object in its own space (its meshes' bounds), for fitting a premade to it. */
112
+ contentBounds(objectId: Id): {
113
+ readonly center: Vec3;
114
+ readonly halfSize: Vec3;
115
+ } | undefined;
116
+ /**
117
+ * Fits objects in the view like CSS `object-fit: contain`, in 3D: from the current camera angle (or `direction`),
118
+ * the camera moves so the objects' drawn silhouette (posed parts included) fills a centred area of `aspect` (a
119
+ * square by default) on its limiting side, centred in it. Objects still meshing are framed when their meshes arrive.
120
+ */
121
+ frame(objectIds: readonly Id[], options?: FrameOptions): void;
122
+ /** Small preview for the library (data URL). */
123
+ thumbnail(): string | undefined;
124
+ dispose(): void;
125
+ };
@@ -0,0 +1,2 @@
1
+ import type { BodyPartAdded, Creation } from "../../../api/src/index.js";
2
+ export declare const applyBodyPartAdded: (c: Creation, e: BodyPartAdded) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { BodyPartRemoved, Creation } from "../../../api/src/index.js";
2
+ export declare const applyBodyPartRemoved: (c: Creation, e: BodyPartRemoved) => Creation;
@@ -0,0 +1,3 @@
1
+ import type { BoneRemoved, Creation } from "../../../api/src/index.js";
2
+ /** Children move up to the removed bone's parent, keeping their bind and pose placement; its part goes. */
3
+ export declare const applyBoneRemoved: (c: Creation, e: BoneRemoved) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { BoneRenamed, Creation } from "../../../api/src/index.js";
2
+ export declare const applyBoneRenamed: (c: Creation, e: BoneRenamed) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { BoneReparented, Creation } from "../../../api/src/index.js";
2
+ export declare const applyBoneReparented: (c: Creation, e: BoneReparented) => Creation;
@@ -0,0 +1,3 @@
1
+ import type { BoneSizesSet, Creation } from "../../../api/src/index.js";
2
+ /** Sets bone sizes, moves the child joints a length change carried and the parts riding on them. */
3
+ export declare const applyBoneSizesSet: (c: Creation, e: BoneSizesSet) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { BoneTagsSet, Creation } from "../../../api/src/index.js";
2
+ export declare function applyBoneTagsSet(c: Creation, e: BoneTagsSet): Creation;
@@ -0,0 +1,6 @@
1
+ import type { BoneTransformsSet, Creation } from "../../../api/src/index.js";
2
+ /**
3
+ * Bind writes keep the pose as a delta on top of the new bind (rig mode); pose writes set the pose. A pose write on
4
+ * a premade rig keeps the whole resulting pose as its Custom preset and selects it.
5
+ */
6
+ export declare function applyBoneTransformsSet(c: Creation, e: BoneTransformsSet): Creation;
@@ -0,0 +1,2 @@
1
+ import type { BonesAdded, Creation } from "../../../api/src/index.js";
2
+ export declare const applyBonesAdded: (c: Creation, e: BonesAdded) => Creation;
@@ -0,0 +1,3 @@
1
+ import type { Creation, CreatureGenerated } from "../../../api/src/index.js";
2
+ /** A new creature object, or the object's rig (and ground-standing transform) regenerated. */
3
+ export declare function applyCreatureGenerated(c: Creation, e: CreatureGenerated): Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, DecalRemoved } from "../../../api/src/index.js";
2
+ export declare const applyDecalRemoved: (c: Creation, e: DecalRemoved) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, DecalsAdded } from "../../../api/src/index.js";
2
+ export declare const applyDecalsAdded: (c: Creation, e: DecalsAdded) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, DesignDeleted } from "../../../api/src/index.js";
2
+ export declare const applyDesignDeleted: (c: Creation, e: DesignDeleted) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, DesignSaved } from "../../../api/src/index.js";
2
+ export declare function applyDesignSaved(c: Creation, e: DesignSaved): Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, FlatWingsSet } from "../../../api/src/index.js";
2
+ export declare function applyFlatWingsSet(c: Creation, e: FlatWingsSet): Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, ObjectRenamed } from "../../../api/src/index.js";
2
+ export declare const applyObjectRenamed: (c: Creation, e: ObjectRenamed) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, ObjectReparented } from "../../../api/src/index.js";
2
+ export declare function applyObjectReparented(c: Creation, e: ObjectReparented): Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, ObjectTransformsSet } from "../../../api/src/index.js";
2
+ export declare function applyObjectTransformsSet(c: Creation, e: ObjectTransformsSet): Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, ObjectsDeleted } from "../../../api/src/index.js";
2
+ export declare function applyObjectsDeleted(c: Creation, e: ObjectsDeleted): Creation;
@@ -0,0 +1,3 @@
1
+ import type { Creation, ObjectsDuplicated } from "../../../api/src/index.js";
2
+ /** The copies go to the end of the scene list, after every original. */
3
+ export declare const applyObjectsDuplicated: (c: Creation, e: ObjectsDuplicated) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, PaletteColorSet } from "../../../api/src/index.js";
2
+ export declare const applyPaletteColorSet: (c: Creation, e: PaletteColorSet) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, PaletteReset } from "../../../api/src/index.js";
2
+ export declare const applyPaletteReset: (c: Creation, _e: PaletteReset) => Creation;
@@ -0,0 +1,3 @@
1
+ import type { Creation, PartGrafted } from "../../../api/src/index.js";
2
+ /** Removes the slot's earlier graft, adds the new bones and parts, and records the kit. */
3
+ export declare const applyPartGrafted: (c: Creation, e: PartGrafted) => Creation;
@@ -0,0 +1,3 @@
1
+ import type { Creation, PartSlotSwapped } from "../../../api/src/index.js";
2
+ /** Replaces the slot's parts (and the bones a kit brought), moves re-seated joints and records the slot's kit. */
3
+ export declare const applyPartSlotSwapped: (c: Creation, e: PartSlotSwapped) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, PivotSet } from "../../../api/src/index.js";
2
+ export declare const applyPivotSet: (c: Creation, e: PivotSet) => Creation;
@@ -0,0 +1,3 @@
1
+ import type { Creation, PosePresetApplied } from "../../../api/src/index.js";
2
+ /** Sets every listed bone's pose and remembers the preset choice. */
3
+ export declare function applyPosePresetApplied(c: Creation, e: PosePresetApplied): Creation;
@@ -0,0 +1,3 @@
1
+ import type { Creation, PoseReset } from "../../../api/src/index.js";
2
+ /** Every pose back to the bind; a premade rig selects its Front preset (its Custom pose is kept). */
3
+ export declare const applyPoseReset: (c: Creation, e: PoseReset) => Creation;
@@ -0,0 +1,3 @@
1
+ import type { Creation, PremadeApplied } from "../../../api/src/index.js";
2
+ /** A new rig object, or the object turned into a rig with the premade skeleton (its old sculpt is the body). */
3
+ export declare function applyPremadeApplied(c: Creation, e: PremadeApplied): Creation;
@@ -0,0 +1,3 @@
1
+ import type { Creation, RegionBlendSet } from "../../../api/src/index.js";
2
+ /** POC setSkeletonRegionBlend: the region's blend, and the blend of every sculpt part in it. */
3
+ export declare function applyRegionBlendSet(c: Creation, e: RegionBlendSet): Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, RigCreated } from "../../../api/src/index.js";
2
+ export declare const applyRigCreated: (c: Creation, e: RigCreated) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, RigMirrorSet } from "../../../api/src/index.js";
2
+ export declare const applyRigMirrorSet: (c: Creation, e: RigMirrorSet) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, RigModeSet } from "../../../api/src/index.js";
2
+ export declare const applyRigModeSet: (c: Creation, e: RigModeSet) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, SculptCreated } from "../../../api/src/index.js";
2
+ export declare const applySculptCreated: (c: Creation, e: SculptCreated) => Creation;
@@ -0,0 +1,3 @@
1
+ import type { Creation, SculptLookSet } from "../../../api/src/index.js";
2
+ /** Sculpt targets merge the patch into their look; flat wing parts take its material. */
3
+ export declare function applySculptLookSet(c: Creation, e: SculptLookSet): Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, SmearGroupSet } from "../../../api/src/index.js";
2
+ export declare const applySmearGroupSet: (c: Creation, e: SmearGroupSet) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, StampPlacementsSet } from "../../../api/src/index.js";
2
+ export declare function applyStampPlacementsSet(c: Creation, e: StampPlacementsSet): Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, StampPropsSet } from "../../../api/src/index.js";
2
+ export declare function applyStampPropsSet(c: Creation, e: StampPropsSet): Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, StampsAdded } from "../../../api/src/index.js";
2
+ export declare const applyStampsAdded: (c: Creation, e: StampsAdded) => Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, StampsRemoved } from "../../../api/src/index.js";
2
+ export declare function applyStampsRemoved(c: Creation, e: StampsRemoved): Creation;
@@ -0,0 +1,2 @@
1
+ import type { Creation, SymmetrySetForAll } from "../../../api/src/index.js";
2
+ export declare function applySymmetrySetForAll(c: Creation, e: SymmetrySetForAll): Creation;
@@ -0,0 +1,7 @@
1
+ /** A readable reason a value is not accepted, or undefined. */
2
+ export type Problem = string | undefined;
3
+ export declare function inRange(label: string, value: number | undefined, min: number, max: number): Problem;
4
+ export declare function positive(label: string, value: number | undefined): Problem;
5
+ export declare function oneOf<T extends string>(label: string, value: T | undefined, allowed: readonly T[]): Problem;
6
+ /** The first problem of a list. */
7
+ export declare const firstProblem: (...problems: readonly Problem[]) => Problem;
@@ -0,0 +1,6 @@
1
+ import type { Decal } from "../../../../api/src/index.js";
2
+ export declare const MAX_DECALS = 64;
3
+ export declare const MAX_INTERIORS = 8;
4
+ export declare const isInterior: (d: Pick<Decal, "art">) => boolean;
5
+ /** Why adding `added` to a sculpt's decals breaks the limits (64 decals, 8 interior rooms), if it does. */
6
+ export declare function decalLimitProblem(existing: readonly Decal[], added: readonly Pick<Decal, "art">[]): string | undefined;
@@ -0,0 +1,4 @@
1
+ import type { Creation, Decal } from "../../../../api/src/index.js";
2
+ import { type Problem } from "../check/check.js";
3
+ /** Why a decal cannot be placed, if it cannot. */
4
+ export declare function decalProblem(creation: Creation, d: Omit<Decal, "id">): Problem;
@@ -0,0 +1,4 @@
1
+ import type { DesignShape } from "../../../../api/src/index.js";
2
+ import { type Problem } from "../check/check.js";
3
+ /** Why a design shape cannot be stored, if it cannot. */
4
+ export declare const designShapeProblem: (s: DesignShape) => Problem;
@@ -0,0 +1,9 @@
1
+ import type { FleckShape, PatternKind, StampMode, StampShape } from "../../../../api/src/index.js";
2
+ /** The POC's fleck shapes; the order is the shader's index. */
3
+ export declare const FLECK_SHAPES: readonly FleckShape[];
4
+ /** The POC's pattern types; the order is its `patternType` index. */
5
+ export declare const PATTERN_KINDS: readonly PatternKind[];
6
+ export declare const STAMP_SHAPES: readonly StampShape[];
7
+ export declare const STAMP_MODES: readonly StampMode[];
8
+ /** POC shape ids that were renamed in the new model. */
9
+ export declare function pocStampShape(type: string): StampShape;
@@ -0,0 +1,4 @@
1
+ import type { ColorRef, Pivot, SculptLook } from "../../../../api/src/index.js";
2
+ /** A new sculpt's look (POC createNewSculptObject): its color is also the foundation. */
3
+ export declare function defaultLook(color: ColorRef): SculptLook;
4
+ export declare const DEFAULT_PIVOT: Pivot;
@@ -0,0 +1,7 @@
1
+ import type { Material, SculptLookPatch } from "../../../../api/src/index.js";
2
+ import { type Problem } from "../check/check.js";
3
+ export declare function colorProblem(label: string, value: unknown): Problem;
4
+ export declare function materialProblem(m: Partial<Material> | undefined): Problem;
5
+ export declare const blendProblem: (value: number | undefined) => Problem;
6
+ /** Why a look (or a patch of one) breaks the model's ranges. */
7
+ export declare function lookProblem(look: SculptLookPatch): Problem;
@@ -0,0 +1,3 @@
1
+ import type { SculptLook, SculptLookPatch } from "../../../../api/src/index.js";
2
+ /** A look with a patch applied (nested groups merge field by field). */
3
+ export declare function mergeLook(look: SculptLook, patch: SculptLookPatch): SculptLook;