@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,11 @@
1
+ /** Decal budgets and atlas layout (the POC's decals.js). */
2
+ export declare const MAX_DECALS = 64;
3
+ export declare const MAX_INTERIORS = 8;
4
+ /** Texels per decal: 3 matrix rows, atlas params, tint, extra (kind, room, depth, seed). */
5
+ export declare const DECAL_TEX_W = 6;
6
+ /** 1024 × 2048 atlas: the first cells hold the built-in art, the rest the creation's designs. */
7
+ export declare const DECAL_COLS = 8;
8
+ export declare const DECAL_ROWS = 16;
9
+ export declare const DECAL_CELL = 128;
10
+ /** Half-thickness of the projection box, in decal sizes. */
11
+ export declare const DECAL_DEPTH = 0.35;
@@ -0,0 +1,40 @@
1
+ import type { Decal } from "../../../api/src/index.js";
2
+ import { DataTexture, Vector3, type Texture } from "three";
3
+ /** What the shader needs about a decal's art: its atlas cell (or an interior room) and whether it tints. */
4
+ export type DecalArtInfo = {
5
+ readonly cell: number;
6
+ readonly tintable: boolean;
7
+ /** Interior room id (ray-traced, no atlas cell). */
8
+ readonly room?: number;
9
+ /** The art is gone (a deleted design): drawn fully transparent. */
10
+ readonly missing?: boolean;
11
+ };
12
+ export type DecalUniforms = {
13
+ readonly uDecalData: {
14
+ value: DataTexture;
15
+ };
16
+ readonly uDecalCount: {
17
+ value: number;
18
+ };
19
+ readonly uDecalAtlas: {
20
+ value: Texture | null;
21
+ };
22
+ readonly uDecalBounds: {
23
+ value: Float32Array;
24
+ };
25
+ /** Camera in the sculpt's bind space (interior rays). */
26
+ readonly uLocalCam: {
27
+ value: Vector3;
28
+ };
29
+ interiors: number;
30
+ };
31
+ export declare function createDecalUniforms(atlas: Texture | null): DecalUniforms;
32
+ /**
33
+ * Packs decals into the shader's layout (rows 0–2: bind space → decal space, x / y in [−0.5, 0.5], z along the
34
+ * normal; then atlas cell + flip + tintable, tint rgb + opacity, interior kind / room / depth / seed) and a
35
+ * bounding sphere per decal. Returns the count drawn and how many are interiors.
36
+ */
37
+ export declare function packDecals(decals: readonly Decal[], art: (d: Decal) => DecalArtInfo, tint: (d: Decal, info: DecalArtInfo) => readonly [number, number, number], data: Float32Array, bounds: Float32Array): {
38
+ count: number;
39
+ interiors: number;
40
+ };
@@ -0,0 +1,8 @@
1
+ import type { ColorRef, DesignPaint, DesignShape } from "../../../api/src/index.js";
2
+ /** Art is clipped this far from the cell border: the atlas has no gutters and samples linearly. */
3
+ export declare const DESIGN_INSET = 3;
4
+ /** CSS for a design paint; palette refs it used go into `slots` (palette edits re-raster only those). */
5
+ export declare function paintCss(p: DesignPaint, css: (ref: ColorRef) => string, slots: Set<ColorRef>): string | null;
6
+ export declare function drawDesignShape(g: CanvasRenderingContext2D, sh: DesignShape, css: (ref: ColorRef) => string, slots: Set<ColorRef>, index: number): void;
7
+ /** Paints a whole design (128 × 128 space) into a cell-sized context. */
8
+ export declare function paintDesign(g: CanvasRenderingContext2D, shapes: readonly DesignShape[], css: (ref: ColorRef) => string, slots: Set<ColorRef>): void;
@@ -0,0 +1,6 @@
1
+ import type { BuiltinArt } from "./builtin-art.js";
2
+ /**
3
+ * Renders each interior room once through the real shader code (a throwaway context) so the picker shows the
4
+ * real art; a plain swatch when WebGL is unavailable.
5
+ */
6
+ export declare function renderInteriorThumbs(rooms: readonly BuiltinArt[]): Map<BuiltinArt, HTMLCanvasElement>;
@@ -0,0 +1 @@
1
+ export { createViewport, type ViewportOptions } from "./create-viewport.js";
@@ -0,0 +1,13 @@
1
+ import { RigView } from "../objects/rig-view.js";
2
+ import { type InteractionContext } from "./interaction-context.js";
3
+ /** Rig bones tool (the POC's rig.js): a click picks a bone of the selected rig, or adds one with the Add tool. */
4
+ export declare class BoneTool {
5
+ private readonly ctx;
6
+ constructor(ctx: InteractionContext);
7
+ private selectedRig;
8
+ /** Screen positions of a rig's joints (as drawn). */
9
+ static jointsOnScreen(ctx: InteractionContext, view: RigView): (import("../math/screen.js").ScreenPoint | null)[];
10
+ click(): void;
11
+ private add;
12
+ private addBoneAt;
13
+ }
@@ -0,0 +1,7 @@
1
+ import type { RigObject } from "../../../api/src/index.js";
2
+ import type { InteractionContext } from "./interaction-context.js";
3
+ /**
4
+ * When a rig shows its bones (the POC's rigBonesVisible): always with the bone tool on the selected rig, and while
5
+ * one of its parts is sculpted; otherwise when bones are shown and the rig is selected or has no body to see.
6
+ */
7
+ export declare function bonesVisible(ctx: InteractionContext, o: RigObject): boolean;
@@ -0,0 +1,3 @@
1
+ import type { ViewSession } from "../../../api/src/index.js";
2
+ /** The canvas cursor for the current tool (the POC's tools-ui.js updateCursor), as a CSS cursor value. */
3
+ export declare function cursorFor(s: ViewSession, shift: boolean, ctrl: boolean): string;
@@ -0,0 +1,18 @@
1
+ import type { DecalAtlas } from "../decals/decal-atlas.js";
2
+ import { type InteractionContext } from "./interaction-context.js";
3
+ /** Decal tool (the POC's decals.js placement): ghost on the surface, click places (or erases), Q places too. */
4
+ export declare class DecalTool {
5
+ private readonly ctx;
6
+ private readonly atlas;
7
+ private readonly ghost;
8
+ private tex;
9
+ constructor(ctx: InteractionContext, atlas: () => DecalAtlas);
10
+ private hit;
11
+ /** Object-local pose: z = surface normal, y = world up (eyes stay upright), then the brush roll. */
12
+ private placement;
13
+ hover(): void;
14
+ hide(): void;
15
+ /** A click (or Q): place the brush's decal, or erase the nearest one. */
16
+ place(): void;
17
+ dispose(): void;
18
+ }
@@ -0,0 +1,13 @@
1
+ /** Holding Esc this long in sculpt mode leaves it (a tap is the module's: Select tool). */
2
+ export declare const ESC_HOLD_MS = 1000;
3
+ /** Esc tap / hold in sculpt mode, with a small progress bar over the view (the POC's #esc-hint). */
4
+ export declare class EscHold {
5
+ private readonly exit;
6
+ private hold;
7
+ private readonly bar;
8
+ private readonly fill;
9
+ constructor(host: HTMLElement, exit: () => void);
10
+ start(): void;
11
+ end(): void;
12
+ dispose(): void;
13
+ }
@@ -0,0 +1,6 @@
1
+ import type { StampShape } from "../../../api/src/index.js";
2
+ import { BufferGeometry } from "three";
3
+ /** Ghost preview geometry per shape, modelled at 1.8 units (the POC's getGeometryForType); scale = size / 1.8. */
4
+ export declare function ghostGeometry(shape: StampShape): BufferGeometry;
5
+ /** Minimal line set per shape in the stamp's unit space (matches the SDF sizes): the selected shape's wireframe. */
6
+ export declare function stampWireGeometry(shape: StampShape): BufferGeometry;
@@ -0,0 +1,34 @@
1
+ import { TransformControls } from "three/examples/jsm/controls/TransformControls.js";
2
+ import { type InteractionContext } from "./interaction-context.js";
3
+ /**
4
+ * Transform gizmo (three's TransformControls on a proxy): objects in assembly mode (one, or several about their
5
+ * center), the scoped sculpt's selected stamps, the kaleidoscope pivot, or the selected bone. A drag previews live
6
+ * and becomes one command on release.
7
+ */
8
+ export declare class Gizmo {
9
+ private readonly ctx;
10
+ readonly controls: TransformControls;
11
+ private readonly proxy;
12
+ private target;
13
+ private drag;
14
+ private previewDirty;
15
+ /** Called when a drag starts / ends (orbit is off while dragging). */
16
+ onDragging: (on: boolean) => void;
17
+ constructor(ctx: InteractionContext);
18
+ get dragging(): boolean;
19
+ /** The pointer is over a handle (a press there must not pick or stamp). */
20
+ get hovering(): boolean;
21
+ private wanted;
22
+ /** Every frame: attach to what the session asks for and keep the proxy on it (not while dragging). */
23
+ sync(): void;
24
+ private setProxy;
25
+ private place;
26
+ private begin;
27
+ /** Delta of the proxy since the drag started, applied to every dragged thing (as a preview). */
28
+ private preview;
29
+ private stampPlacements;
30
+ private pivotOf;
31
+ private boneTransform;
32
+ private end;
33
+ dispose(): void;
34
+ }
@@ -0,0 +1,41 @@
1
+ import type { Command, Creation, DispatchResult, SceneObject, SculptTarget, Selection, ViewSession, ViewportCallbacks } from "../../../api/src/index.js";
2
+ import { Raycaster, Vector2 } from "three";
3
+ import type { SceneViews } from "../objects/scene-views.js";
4
+ import type { Stage } from "../scene/stage.js";
5
+ /** Pointer state in canvas pixels and normalized device coordinates. */
6
+ export type PointerState = {
7
+ x: number;
8
+ y: number;
9
+ readonly ndc: Vector2;
10
+ down: boolean;
11
+ shift: boolean;
12
+ ctrl: boolean;
13
+ };
14
+ /** What every tool reads and how it reports back. Owned by one viewport instance. */
15
+ export type InteractionContext = {
16
+ readonly stage: Stage;
17
+ readonly views: SceneViews;
18
+ readonly pointer: PointerState;
19
+ readonly raycaster: Raycaster;
20
+ readonly keys: Set<string>;
21
+ creation(): Creation;
22
+ session(): ViewSession;
23
+ callbacks(): ViewportCallbacks | null;
24
+ /** Sends a command; a rejection becomes a toast. */
25
+ dispatch(command: Command): DispatchResult;
26
+ select(selection: Selection): void;
27
+ toast(message: string): void;
28
+ /** True while play mode or the stress test owns the view. */
29
+ locked(): boolean;
30
+ };
31
+ export declare const objectById: (c: Creation, id: string) => SceneObject | undefined;
32
+ /** The scoped sculpt in sculpt mode, if any. */
33
+ export declare function scopeOf(ctx: InteractionContext): SculptTarget | undefined;
34
+ export declare function createPointer(): PointerState;
35
+ /** Updates the pointer from a DOM event relative to the canvas. */
36
+ export declare function readPointer(p: PointerState, e: PointerEvent | MouseEvent, canvas: HTMLCanvasElement): void;
37
+ export declare const viewSize: (ctx: InteractionContext) => {
38
+ w: number;
39
+ h: number;
40
+ };
41
+ export declare const emptySelection: Selection;
@@ -0,0 +1,8 @@
1
+ /** The area-selection rectangle, a DOM overlay over the canvas (the POC's #marquee). */
2
+ export declare class MarqueeOverlay {
3
+ private readonly el;
4
+ constructor(host: HTMLElement);
5
+ show(x1: number, y1: number, x2: number, y2: number): void;
6
+ hide(): void;
7
+ dispose(): void;
8
+ }
@@ -0,0 +1,13 @@
1
+ import { type InteractionContext } from "./interaction-context.js";
2
+ /**
3
+ * The kaleidoscope pivot marker (3 axis lines + a ball) of the scoped standalone sculpt, at a constant screen size;
4
+ * bright while the pivot tool is on or any shape uses symmetry, dim otherwise.
5
+ */
6
+ export declare class PivotHelper {
7
+ private readonly ctx;
8
+ private readonly root;
9
+ private readonly mats;
10
+ constructor(ctx: InteractionContext);
11
+ update(): void;
12
+ dispose(): void;
13
+ }
@@ -0,0 +1,30 @@
1
+ import type { Id, Sculpt } from "../../../api/src/index.js";
2
+ import { Vector3 } from "three";
3
+ import { type InteractionContext } from "./interaction-context.js";
4
+ import type { MarqueeOverlay } from "./marquee.js";
5
+ /** A stamp of a locked smear group stands for the whole group. */
6
+ export declare function stampMembers(sculpt: Sculpt, stampId: Id): Id[];
7
+ /**
8
+ * Selection gestures (the POC's selection.js / multi-select.js): a click picks one thing, Ctrl / Cmd toggles it,
9
+ * Shift + drag draws an area that selects everything it touches, a double-click frames an object. Assembly mode
10
+ * picks objects (bone dots first; a part picks its rig), sculpt mode the scoped sculpt's shapes.
11
+ */
12
+ export declare class SelectTool {
13
+ private readonly ctx;
14
+ private readonly marquee;
15
+ private press;
16
+ constructor(ctx: InteractionContext, marquee: MarqueeOverlay);
17
+ get dragging(): boolean;
18
+ down(): void;
19
+ move(): void;
20
+ up(): void;
21
+ /** Esc while dragging an area cancels it. */
22
+ cancel(): boolean;
23
+ /** Picks what is under the cursor; a miss changes nothing (finishing an orbit never drops the selection). */
24
+ pick(additive: boolean): void;
25
+ /** The rig or sculpt object under the cursor (bone dots win: they are drawn on top). */
26
+ objectUnderCursor(): Id | undefined;
27
+ private finishArea;
28
+ /** Double-click in assembly mode: an object is framed and its Properties open; empty space deselects. */
29
+ doubleClick(focus: (center: Vector3) => void): void;
30
+ }
@@ -0,0 +1,11 @@
1
+ import { type Group } from "three";
2
+ import type { InteractionContext } from "./interaction-context.js";
3
+ /** Assembly-mode outlines: the primary (last) selected object in sky blue, the others lighter. */
4
+ export declare class SelectionBoxes {
5
+ private readonly ctx;
6
+ private readonly ui;
7
+ private readonly helpers;
8
+ constructor(ctx: InteractionContext, ui: Group);
9
+ update(): void;
10
+ dispose(): void;
11
+ }
@@ -0,0 +1,41 @@
1
+ import type { Sculpt, SculptTarget } from "../../../api/src/index.js";
2
+ import { type InteractionContext } from "./interaction-context.js";
3
+ /**
4
+ * Stamp tool (the POC's stamping in input.js + ghost in scene.js + ghost copies in symmetry.js). Assembly mode: a
5
+ * click creates a sculpt. Sculpt mode: a click adds one stamp; with smear on, a drag lays dabs every 0.4 × size
6
+ * (≤ 24 per move), previewed live and committed as ONE AddStamps (a smear group) on release.
7
+ */
8
+ export declare class StampTool {
9
+ private readonly ctx;
10
+ private readonly ghost;
11
+ private readonly ghostMat;
12
+ private readonly copyMat;
13
+ private readonly copies;
14
+ private shape;
15
+ private stroke;
16
+ constructor(ctx: InteractionContext);
17
+ private active;
18
+ /** Scope's sculpt space (sculpt mode), or undefined. */
19
+ private scopeSpace;
20
+ /** Follows the cursor: ghost at the surface / ground point, its symmetry copies about the pivot. */
21
+ hover(): void;
22
+ private updateCopies;
23
+ private ghostInstances;
24
+ hideGhost(): void;
25
+ /** One dab in the scope's local space: world-aligned like the ghost, at the ghost's world size. */
26
+ private spec;
27
+ /** Pointer down (or Q): stamp once, or start a smear stroke. */
28
+ press(fromKey?: boolean): void;
29
+ /** Pointer move while pressed: lay the dabs the cursor passed. */
30
+ drag(): void;
31
+ /** Pointer up: the whole stroke becomes one AddStamps (a single dab is a plain stamp). */
32
+ release(): void;
33
+ cancel(): void;
34
+ get stroking(): boolean;
35
+ private smearGroupFor;
36
+ private preview;
37
+ private commit;
38
+ private createSculpt;
39
+ dispose(): void;
40
+ }
41
+ export declare function sculptOf(c: import("../../../api/src/index.js").Creation, t: SculptTarget): Sculpt | undefined;
@@ -0,0 +1,18 @@
1
+ import { type InteractionContext } from "./interaction-context.js";
2
+ /**
3
+ * Sculpt-mode selection overlays: the selected shape's wireframe (yellow) with dimmed copies of its kaleidoscope
4
+ * instances, or a box around a locked smear group (pink) / an area-selected set (blue).
5
+ */
6
+ export declare class StampWires {
7
+ private readonly ctx;
8
+ private readonly space;
9
+ private readonly wire;
10
+ private readonly box;
11
+ private readonly instMat;
12
+ private readonly inst;
13
+ private readonly geos;
14
+ constructor(ctx: InteractionContext);
15
+ private geo;
16
+ update(): void;
17
+ dispose(): void;
18
+ }
@@ -0,0 +1,14 @@
1
+ import type { Id } from "../../../api/src/index.js";
2
+ import { Vector3, type Intersection, type Object3D } from "three";
3
+ import type { MeshOwner } from "../objects/scene-views.js";
4
+ import type { InteractionContext } from "./interaction-context.js";
5
+ export type SurfaceHit = {
6
+ readonly hit: Intersection<Object3D>;
7
+ readonly owner: MeshOwner;
8
+ };
9
+ /** The nearest sculpt / wing surface under the cursor (optionally only some objects' meshes). */
10
+ export declare function surfaceHit(ctx: InteractionContext, only?: ReadonlySet<Id>): SurfaceHit | null;
11
+ /** Where a stamp would land: a surface, else the ground, else the y = 1.5 plane. */
12
+ export declare function stampPoint(ctx: InteractionContext): Vector3 | null;
13
+ /** Average of the three vertex normals of the hit face (smoother than the face normal on a voxel mesh), in mesh space. */
14
+ export declare function hitLocalNormal(hit: Intersection<Object3D>): Vector3;
@@ -0,0 +1,69 @@
1
+ import type { FleckShape, PatternKind } from "../../../api/src/index.js";
2
+ import { Matrix3, MeshStandardMaterial, Vector3, type Texture } from "three";
3
+ import type { DecalUniforms } from "../decals/decal-uniforms.js";
4
+ import type { GlobalUniforms } from "./global-uniforms.js";
5
+ import { type SkinUniforms } from "./skin.js";
6
+ /** The POC's fleck shapes, in shader index order (the contract's FleckShape order). */
7
+ export declare const FLECK_SHAPES: readonly FleckShape[];
8
+ export declare const PATTERN_KINDS: readonly PatternKind[];
9
+ /** Per-sculpt look uniforms; the sculpt view writes them, the shader reads them. */
10
+ export type FleckUniforms = {
11
+ readonly uGrayscale: {
12
+ value: number;
13
+ };
14
+ readonly uFleckScale: {
15
+ value: number;
16
+ };
17
+ readonly uVariation: {
18
+ value: number;
19
+ };
20
+ readonly uCoverage: {
21
+ value: number;
22
+ };
23
+ readonly uFoundationDarkness: {
24
+ value: number;
25
+ };
26
+ readonly uRegularity: {
27
+ value: number;
28
+ };
29
+ readonly uBoil: {
30
+ value: number;
31
+ };
32
+ readonly uNormalStrength: {
33
+ value: number;
34
+ };
35
+ readonly uFleckShape: {
36
+ value: number;
37
+ };
38
+ readonly uOpacity: {
39
+ value: number;
40
+ };
41
+ readonly uPatternType: {
42
+ value: number;
43
+ };
44
+ readonly uPatternScale: {
45
+ value: number;
46
+ };
47
+ readonly uPatternStrength: {
48
+ value: number;
49
+ };
50
+ readonly uPatternRot: {
51
+ value: Matrix3;
52
+ };
53
+ readonly uPatternColor: {
54
+ value: Vector3;
55
+ };
56
+ readonly uPatternColor2: {
57
+ value: Vector3;
58
+ };
59
+ readonly uTeeth: {
60
+ value: Vector3;
61
+ };
62
+ };
63
+ export declare const createFleckUniforms: () => FleckUniforms;
64
+ /**
65
+ * Sculpt surface (the POC's fleck-material.js): MeshStandardMaterial with vertex colors plus the foundation bed,
66
+ * flecks, 3D patterns, per-vertex material channels, decals, skinning, dithered opacity, grayscale isolation and
67
+ * the pixel-art offscreen output.
68
+ */
69
+ export declare function createFleckMaterial(g: GlobalUniforms, f: FleckUniforms, skin: SkinUniforms, decal: DecalUniforms, env: Texture | null): MeshStandardMaterial;
@@ -0,0 +1,15 @@
1
+ /** Uniforms every sculpt / wing material shares, owned by one viewport instance. */
2
+ export type GlobalUniforms = {
3
+ readonly uTime: {
4
+ value: number;
5
+ };
6
+ /** 1 while the render pipeline draws the world offscreen: materials write gloss / kind into alpha. */
7
+ readonly uPixelOut: {
8
+ value: number;
9
+ };
10
+ /** Distance at which thin dark decal lines are boosted. */
11
+ readonly uDecalBoostDist: {
12
+ value: number;
13
+ };
14
+ };
15
+ export declare const createGlobalUniforms: () => GlobalUniforms;
@@ -0,0 +1,18 @@
1
+ import { MeshDepthMaterial } from "three";
2
+ /** Bone matrices a rig shares with its body and parts (the arrays are written in place every update). */
3
+ export type SkinUniforms = {
4
+ readonly uBones: {
5
+ value: Float32Array;
6
+ };
7
+ readonly uSeg: {
8
+ value: Float32Array;
9
+ };
10
+ readonly uSkinned: {
11
+ value: number;
12
+ };
13
+ };
14
+ export declare const createSkinUniforms: () => SkinUniforms;
15
+ /** boneWt.w < 0 marks a rigid body-part vertex: one segment matrix, no blending. */
16
+ export declare const SKIN_GLSL = "\n attribute vec4 boneIdx;\n attribute vec4 boneWt;\n uniform mat4 uBones[64];\n uniform mat4 uSeg[64];\n uniform float uSkinned;\n mat4 getSkinMat() {\n if (uSkinned < 0.5) return mat4(1.0);\n if (boneWt.w < -0.5) return uSeg[int(boneIdx.x)];\n return boneWt.x * uBones[int(boneIdx.x)] + boneWt.y * uBones[int(boneIdx.y)]\n + boneWt.z * uBones[int(boneIdx.z)] + boneWt.w * uBones[int(boneIdx.w)];\n }\n // Inverse-transpose (up to scale) so normals stay correct under non-uniform stretch\n mat3 skinNormalMat(mat4 m) {\n vec3 a = m[0].xyz, b = m[1].xyz, c = m[2].xyz;\n return mat3(cross(b, c), cross(c, a), cross(a, b));\n }\n";
17
+ /** Shadow pass must be skinned too, otherwise shadows stay in the bind pose. */
18
+ export declare function createSkinDepthMaterial(skin: SkinUniforms): MeshDepthMaterial;
@@ -0,0 +1,21 @@
1
+ import { MeshStandardMaterial, type Texture } from "three";
2
+ import type { GlobalUniforms } from "./global-uniforms.js";
3
+ import { type SkinUniforms } from "./skin.js";
4
+ export type WingUniforms = {
5
+ readonly uGrayscale: {
6
+ value: number;
7
+ };
8
+ readonly uOpacity: {
9
+ value: number;
10
+ };
11
+ readonly uGlow: {
12
+ value: number;
13
+ };
14
+ };
15
+ export declare const createWingUniforms: () => WingUniforms;
16
+ /**
17
+ * Flat wing membrane: standard material + the rig's skinning, dithered opacity (texture alpha × opacity),
18
+ * grayscale isolation and the pixel-art output the fleck material also writes. `edge` makes the material for the
19
+ * wing's contour line, drawn only in pixel art.
20
+ */
21
+ export declare function createWingMaterial(g: GlobalUniforms, w: WingUniforms, skin: SkinUniforms, tex: Texture, env: Texture | null, edge?: boolean): MeshStandardMaterial;
@@ -0,0 +1,29 @@
1
+ import type { ColorRef, Palette, Rgb } from "../../../api/src/index.js";
2
+ import { Color, Vector3 } from "three";
3
+ /** Fixed colors: always available, never edited (the POC's FIXED_COLORS). */
4
+ export declare const FIXED_COLORS: {
5
+ readonly tongue: 16021135;
6
+ readonly teeth: 16514042;
7
+ readonly black: 1118481;
8
+ };
9
+ /** The POC's palette order (slot index → the shader's palette list for pixel art). */
10
+ export declare const PALETTE_ORDER: readonly ["primary", "secondary", "detail", "highlight", "eye", "pupil", "custom"];
11
+ export declare function hexOf(ref: ColorRef, palette: Palette): Rgb;
12
+ export declare function cssOf(ref: ColorRef, palette: Palette): string;
13
+ export declare const cssHex: (hex: Rgb) => string;
14
+ /**
15
+ * The POC (three r128, no color management) fed hex / 255 to its shaders as-is. Every palette color the
16
+ * viewport hands a shader goes through here so the look matches (no sRGB → linear conversion).
17
+ */
18
+ export declare function rawColor(hex: Rgb, out?: Color): Color;
19
+ /** sRGB transfer → linear, per channel. */
20
+ export declare const srgbToLinear: (c: number) => number;
21
+ /**
22
+ * Palette colors on materials: the swatch hex is sRGB, so shading works on its linear value and the
23
+ * screen shows the swatch's color (as the wing and decal textures, which three linearizes, already do).
24
+ */
25
+ export declare function linearVec(hex: Rgb, out?: Vector3): Vector3;
26
+ export declare function linearColor(hex: Rgb, out?: Color): Color;
27
+ export declare function rawVec(hex: Rgb, out?: Vector3): Vector3;
28
+ /** A stable key of the palette (re-raster / re-paint triggers). */
29
+ export declare const paletteKey: (p: Palette) => string;
@@ -0,0 +1,15 @@
1
+ import type { Quaternion as ApiQuat, Transform, Vec3 } from "../../../api/src/index.js";
2
+ import { Matrix4, Object3D, Quaternion, Vector3 } from "three";
3
+ /** Contract values ↔ three.js objects. The contract is plain readonly data; three is mutable. */
4
+ export declare const v3: (v: Vec3, out?: Vector3) => Vector3;
5
+ export declare const quat: (q: ApiQuat, out?: Quaternion) => Quaternion;
6
+ export declare const vec3Of: (v: Vector3) => Vec3;
7
+ export declare const quatOf: (q: Quaternion) => ApiQuat;
8
+ export declare const IDENTITY_QUAT: ApiQuat;
9
+ export declare const ZERO: Vec3;
10
+ export declare const ONE: Vec3;
11
+ export declare function matrixOf(t: Transform, out?: Matrix4): Matrix4;
12
+ export declare function applyTransform(obj: Object3D, t: Transform): void;
13
+ export declare function transformOf(obj: Object3D): Transform;
14
+ export declare function transformOfMatrix(m: Matrix4): Transform;
15
+ export declare function sameTransform(a: Transform, b: Transform): boolean;
@@ -0,0 +1,7 @@
1
+ import { Quaternion, Vector3 } from "three";
2
+ /**
3
+ * Decal orientation from a surface normal (the POC's decalPoseFromHit): z = normal, y = the world up seen in
4
+ * the object's space (eyes stay upright), falling back to world −z when the surface faces straight up / down;
5
+ * then `rollDeg` about the normal.
6
+ */
7
+ export declare function decalBasis(normal: Vector3, up: Vector3, fallbackUp: Vector3, rollDeg: number): Quaternion;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Per-object distance LOD (the POC's lod.js): the voxel grid of each sculpt gets coarser the smaller it is on
3
+ * screen. Runtime only, never saved. The target is 4 px per voxel (the POC used 8, which melted small details
4
+ * such as spikes and claws off rig parts at an ordinary zoom).
5
+ */
6
+ export declare const LOD_TARGET_PX = 4;
7
+ export declare const LOD_HYST = 0.25;
8
+ /** Grid resolutions, finest first, from the base resolution (16–64, default 36 → 36 / 24 / 16). */
9
+ export declare function lodLevels(base: number): readonly number[];
10
+ /** On-screen size in pixels of an object of world size `size` at distance `dist` (perspective camera). */
11
+ export declare function projectedPx(size: number, dist: number, fovDeg: number, viewHeightPx: number): number;
12
+ /**
13
+ * Resolution the object should have: the coarsest level that still gives ≤ LOD_TARGET_PX px per voxel, finer at once,
14
+ * coarser only with 25 % slack (so orbiting doesn't flicker). Pinned objects (being edited) stay finest.
15
+ */
16
+ export declare function lodWanted(levels: readonly number[], px: number | null, current: number | undefined, pinned: boolean): number;
@@ -0,0 +1,32 @@
1
+ import type { Ray } from "three";
2
+ import type { ScreenPoint } from "./screen.js";
3
+ /** A shape candidate for sculpt-mode picking: world center and its pick radius (0.6 × size × object scale). */
4
+ export type StampPickCandidate = {
5
+ readonly center: {
6
+ x: number;
7
+ y: number;
8
+ z: number;
9
+ };
10
+ readonly radius: number;
11
+ };
12
+ /** Index of the shape whose center passes closest to the ray, within its radius, or -1. */
13
+ export declare function pickStampOnRay(ray: Ray, candidates: readonly StampPickCandidate[]): number;
14
+ /** Index of the screen point nearest to (x, y) within maxPx (bone dots: 16 px), or -1. Null points are skipped. */
15
+ export declare function nearestScreenPoint(points: readonly (ScreenPoint | null)[], x: number, y: number, maxPx?: number): number;
16
+ /** Index of the decal nearest to a local point, within 0.6 × its size (eraser), or -1. */
17
+ export declare function nearestDecal(decals: readonly {
18
+ position: {
19
+ x: number;
20
+ y: number;
21
+ z: number;
22
+ };
23
+ size: number;
24
+ }[], p: {
25
+ x: number;
26
+ y: number;
27
+ z: number;
28
+ }): number;
29
+ /** Ctrl+click: toggles one id in a list (order kept, the toggled one last when added). */
30
+ export declare function toggleId<T>(list: readonly T[], id: T): T[];
31
+ /** Ctrl+click on a stamp of a set: toggles every member (a locked group toggles as one). */
32
+ export declare function toggleMembers<T>(current: readonly T[], members: readonly T[]): T[];
@@ -0,0 +1,15 @@
1
+ import { Color } from "three";
2
+ /**
3
+ * Pixel art: one light and one shadow variation per palette color (the POC's rendering.js), in the raw
4
+ * (hex / 255) convention the shaders use.
5
+ */
6
+ export declare function paletteVariants(hex: number, black: number): {
7
+ base: Color;
8
+ light: Color;
9
+ shade: Color;
10
+ };
11
+ export declare function rgbToHsl(r: number, g: number, b: number, out: {
12
+ h: number;
13
+ s: number;
14
+ l: number;
15
+ }): void;
@@ -0,0 +1,26 @@
1
+ import type { Box3, Camera } from "three";
2
+ import { Vector3 } from "three";
3
+ export type ScreenPoint = {
4
+ x: number;
5
+ y: number;
6
+ };
7
+ export type ScreenRect = {
8
+ x1: number;
9
+ y1: number;
10
+ x2: number;
11
+ y2: number;
12
+ };
13
+ /** Pixel position of a world point in a w × h view, or null when it is behind the camera (near plane). */
14
+ export declare function worldToScreen(v: Vector3, camera: Camera & {
15
+ near: number;
16
+ }, w: number, h: number): ScreenPoint | null;
17
+ /** Screen bounds of a world box, or null when it is entirely behind the camera. */
18
+ export declare function screenRectOfBox(box: Box3, camera: Camera & {
19
+ near: number;
20
+ }, w: number, h: number): ScreenRect | null;
21
+ export declare const rectFromDrag: (sx: number, sy: number, ex: number, ey: number) => ScreenRect;
22
+ export declare const rectsOverlap: (a: ScreenRect, b: ScreenRect) => boolean;
23
+ export declare const rectContains: (r: ScreenRect, p: ScreenPoint) => boolean;
24
+ /** A press that moved at most this many pixels is a click (orbiting never places or picks). */
25
+ export declare const CLICK_SLOP_PX = 4;
26
+ export declare const isClick: (sx: number, sy: number, ex: number, ey: number) => boolean;