@nice2dev/ui-graphics 1.0.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 (511) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/LICENSE +21 -0
  3. package/README.md +339 -0
  4. package/dist/cjs/animation/AnimatedPerson.js +153 -0
  5. package/dist/cjs/animation/AnimatedPerson.js.map +1 -0
  6. package/dist/cjs/animation/AnimationEditor.js +106 -0
  7. package/dist/cjs/animation/AnimationEditor.js.map +1 -0
  8. package/dist/cjs/animation/Audience.js +59 -0
  9. package/dist/cjs/animation/Audience.js.map +1 -0
  10. package/dist/cjs/animation/BodyRenderer.js +33 -0
  11. package/dist/cjs/animation/BodyRenderer.js.map +1 -0
  12. package/dist/cjs/animation/animationHelper.js +272 -0
  13. package/dist/cjs/animation/animationHelper.js.map +1 -0
  14. package/dist/cjs/animation/characterTypes.js +75 -0
  15. package/dist/cjs/animation/characterTypes.js.map +1 -0
  16. package/dist/cjs/animation/choreoDSL.js +190 -0
  17. package/dist/cjs/animation/choreoDSL.js.map +1 -0
  18. package/dist/cjs/animation/choreography.js +41 -0
  19. package/dist/cjs/animation/choreography.js.map +1 -0
  20. package/dist/cjs/animation/karaokeIntegration.js +98 -0
  21. package/dist/cjs/animation/karaokeIntegration.js.map +1 -0
  22. package/dist/cjs/animation/lottieExport.js +128 -0
  23. package/dist/cjs/animation/lottieExport.js.map +1 -0
  24. package/dist/cjs/animation/motionPath.js +196 -0
  25. package/dist/cjs/animation/motionPath.js.map +1 -0
  26. package/dist/cjs/animation/physics.js +201 -0
  27. package/dist/cjs/animation/physics.js.map +1 -0
  28. package/dist/cjs/animation/rig/RigPlayer.js +63 -0
  29. package/dist/cjs/animation/rig/RigPlayer.js.map +1 -0
  30. package/dist/cjs/animation/rig/RiggedBody.js +30 -0
  31. package/dist/cjs/animation/rig/RiggedBody.js.map +1 -0
  32. package/dist/cjs/animation/rig/choreoRigBridge.js +63 -0
  33. package/dist/cjs/animation/rig/choreoRigBridge.js.map +1 -0
  34. package/dist/cjs/animation/rig/ik.js +22 -0
  35. package/dist/cjs/animation/rig/ik.js.map +1 -0
  36. package/dist/cjs/animation/rig/poseOps.js +49 -0
  37. package/dist/cjs/animation/rig/poseOps.js.map +1 -0
  38. package/dist/cjs/animation/rig/presets.js +60 -0
  39. package/dist/cjs/animation/rig/presets.js.map +1 -0
  40. package/dist/cjs/animation/rig/rigMath.js +41 -0
  41. package/dist/cjs/animation/rig/rigMath.js.map +1 -0
  42. package/dist/cjs/animation/rig/rigTypes.js +44 -0
  43. package/dist/cjs/animation/rig/rigTypes.js.map +1 -0
  44. package/dist/cjs/animation/shapes/arms.js +15 -0
  45. package/dist/cjs/animation/shapes/arms.js.map +1 -0
  46. package/dist/cjs/animation/shapes/eyes.js +52 -0
  47. package/dist/cjs/animation/shapes/eyes.js.map +1 -0
  48. package/dist/cjs/animation/shapes/hair.js +55 -0
  49. package/dist/cjs/animation/shapes/hair.js.map +1 -0
  50. package/dist/cjs/animation/shapes/heads.js +62 -0
  51. package/dist/cjs/animation/shapes/heads.js.map +1 -0
  52. package/dist/cjs/animation/shapes/headwear.js +44 -0
  53. package/dist/cjs/animation/shapes/headwear.js.map +1 -0
  54. package/dist/cjs/animation/shapes/legs.js +15 -0
  55. package/dist/cjs/animation/shapes/legs.js.map +1 -0
  56. package/dist/cjs/animation/shapes/mouths.js +53 -0
  57. package/dist/cjs/animation/shapes/mouths.js.map +1 -0
  58. package/dist/cjs/animation/shapes/noses.js +31 -0
  59. package/dist/cjs/animation/shapes/noses.js.map +1 -0
  60. package/dist/cjs/animation/shapes/outfits.js +43 -0
  61. package/dist/cjs/animation/shapes/outfits.js.map +1 -0
  62. package/dist/cjs/animation/shapes/torsos.js +13 -0
  63. package/dist/cjs/animation/shapes/torsos.js.map +1 -0
  64. package/dist/cjs/animation/spineExport.js +132 -0
  65. package/dist/cjs/animation/spineExport.js.map +1 -0
  66. package/dist/cjs/core/LocalUI.js +54 -0
  67. package/dist/cjs/core/LocalUI.js.map +1 -0
  68. package/dist/cjs/core/collaboration.js +259 -0
  69. package/dist/cjs/core/collaboration.js.map +1 -0
  70. package/dist/cjs/core/colorBlindness.js +97 -0
  71. package/dist/cjs/core/colorBlindness.js.map +1 -0
  72. package/dist/cjs/core/dragDrop.js +168 -0
  73. package/dist/cjs/core/dragDrop.js.map +1 -0
  74. package/dist/cjs/core/fixes.js +185 -0
  75. package/dist/cjs/core/fixes.js.map +1 -0
  76. package/dist/cjs/core/gridGuides.js +245 -0
  77. package/dist/cjs/core/gridGuides.js.map +1 -0
  78. package/dist/cjs/core/historyVisual.js +124 -0
  79. package/dist/cjs/core/historyVisual.js.map +1 -0
  80. package/dist/cjs/core/i18n.js +16 -0
  81. package/dist/cjs/core/i18n.js.map +1 -0
  82. package/dist/cjs/core/integrations.js +261 -0
  83. package/dist/cjs/core/integrations.js.map +1 -0
  84. package/dist/cjs/core/minimap.js +142 -0
  85. package/dist/cjs/core/minimap.js.map +1 -0
  86. package/dist/cjs/core/plugins.js +129 -0
  87. package/dist/cjs/core/plugins.js.map +1 -0
  88. package/dist/cjs/core/rtl.js +102 -0
  89. package/dist/cjs/core/rtl.js.map +1 -0
  90. package/dist/cjs/core/shortcuts.js +205 -0
  91. package/dist/cjs/core/shortcuts.js.map +1 -0
  92. package/dist/cjs/core/theme.js +171 -0
  93. package/dist/cjs/core/theme.js.map +1 -0
  94. package/dist/cjs/font/NiceFontEditor.js +193 -0
  95. package/dist/cjs/font/NiceFontEditor.js.map +1 -0
  96. package/dist/cjs/game/GameAsset2dEditor.js +371 -0
  97. package/dist/cjs/game/GameAsset2dEditor.js.map +1 -0
  98. package/dist/cjs/game/GameAsset2dEditor.module.css.js +6 -0
  99. package/dist/cjs/game/GameAsset2dEditor.module.css.js.map +1 -0
  100. package/dist/cjs/game/gameAssetTypes.js +20 -0
  101. package/dist/cjs/game/gameAssetTypes.js.map +1 -0
  102. package/dist/cjs/game/gameAssetUtils.js +475 -0
  103. package/dist/cjs/game/gameAssetUtils.js.map +1 -0
  104. package/dist/cjs/game/useGameAssetEditor.js +761 -0
  105. package/dist/cjs/game/useGameAssetEditor.js.map +1 -0
  106. package/dist/cjs/icon/NiceIconEditor.js +249 -0
  107. package/dist/cjs/icon/NiceIconEditor.js.map +1 -0
  108. package/dist/cjs/index.js +264 -0
  109. package/dist/cjs/index.js.map +1 -0
  110. package/dist/cjs/nice2dev-ui/dist/index.js +32070 -0
  111. package/dist/cjs/nice2dev-ui/dist/index.js.map +1 -0
  112. package/dist/cjs/nice2dev-ui-graphics.css +1 -0
  113. package/dist/cjs/photo/FilterThumb.js +29 -0
  114. package/dist/cjs/photo/FilterThumb.js.map +1 -0
  115. package/dist/cjs/photo/PhotoEditor.js +20 -0
  116. package/dist/cjs/photo/PhotoEditor.js.map +1 -0
  117. package/dist/cjs/photo/PhotoEditor.module.css.js +6 -0
  118. package/dist/cjs/photo/PhotoEditor.module.css.js.map +1 -0
  119. package/dist/cjs/photo/PhotoEditorCanvas.js +59 -0
  120. package/dist/cjs/photo/PhotoEditorCanvas.js.map +1 -0
  121. package/dist/cjs/photo/PhotoEditorLeftPanel.js +174 -0
  122. package/dist/cjs/photo/PhotoEditorLeftPanel.js.map +1 -0
  123. package/dist/cjs/photo/PhotoEditorToolbar.js +15 -0
  124. package/dist/cjs/photo/PhotoEditorToolbar.js.map +1 -0
  125. package/dist/cjs/photo/photoEditorActions.js +80 -0
  126. package/dist/cjs/photo/photoEditorActions.js.map +1 -0
  127. package/dist/cjs/photo/photoEditorTypes.js +40 -0
  128. package/dist/cjs/photo/photoEditorTypes.js.map +1 -0
  129. package/dist/cjs/photo/photoFilters.js +880 -0
  130. package/dist/cjs/photo/photoFilters.js.map +1 -0
  131. package/dist/cjs/photo/photoOverlays.js +651 -0
  132. package/dist/cjs/photo/photoOverlays.js.map +1 -0
  133. package/dist/cjs/photo/photoSelection.js +547 -0
  134. package/dist/cjs/photo/photoSelection.js.map +1 -0
  135. package/dist/cjs/photo/usePhotoEditor.js +640 -0
  136. package/dist/cjs/photo/usePhotoEditor.js.map +1 -0
  137. package/dist/cjs/pixel/HSVPicker.js +173 -0
  138. package/dist/cjs/pixel/HSVPicker.js.map +1 -0
  139. package/dist/cjs/pixel/PixelEditor.js +28 -0
  140. package/dist/cjs/pixel/PixelEditor.js.map +1 -0
  141. package/dist/cjs/pixel/PixelEditor.module.css.js +6 -0
  142. package/dist/cjs/pixel/PixelEditor.module.css.js.map +1 -0
  143. package/dist/cjs/pixel/PixelEditorCanvas.js +15 -0
  144. package/dist/cjs/pixel/PixelEditorCanvas.js.map +1 -0
  145. package/dist/cjs/pixel/PixelEditorMenuBar.js +11 -0
  146. package/dist/cjs/pixel/PixelEditorMenuBar.js.map +1 -0
  147. package/dist/cjs/pixel/PixelEditorRightPanel.js +15 -0
  148. package/dist/cjs/pixel/PixelEditorRightPanel.js.map +1 -0
  149. package/dist/cjs/pixel/PixelEditorStatusBar.js +15 -0
  150. package/dist/cjs/pixel/PixelEditorStatusBar.js.map +1 -0
  151. package/dist/cjs/pixel/PixelEditorTimeline.js +11 -0
  152. package/dist/cjs/pixel/PixelEditorTimeline.js.map +1 -0
  153. package/dist/cjs/pixel/PixelEditorToolbar.js +16 -0
  154. package/dist/cjs/pixel/PixelEditorToolbar.js.map +1 -0
  155. package/dist/cjs/pixel/asepriteFormat.js +512 -0
  156. package/dist/cjs/pixel/asepriteFormat.js.map +1 -0
  157. package/dist/cjs/pixel/pixelEditorExports.js +471 -0
  158. package/dist/cjs/pixel/pixelEditorExports.js.map +1 -0
  159. package/dist/cjs/pixel/pixelEditorTypes.js +102 -0
  160. package/dist/cjs/pixel/pixelEditorTypes.js.map +1 -0
  161. package/dist/cjs/pixel/pixelEditorUtils.js +664 -0
  162. package/dist/cjs/pixel/pixelEditorUtils.js.map +1 -0
  163. package/dist/cjs/pixel/usePixelEditor.js +1112 -0
  164. package/dist/cjs/pixel/usePixelEditor.js.map +1 -0
  165. package/dist/cjs/texture/Nice3DTexturePainter.js +236 -0
  166. package/dist/cjs/texture/Nice3DTexturePainter.js.map +1 -0
  167. package/dist/cjs/ui/NiceUIDesigner.js +191 -0
  168. package/dist/cjs/ui/NiceUIDesigner.js.map +1 -0
  169. package/dist/cjs/vector/VectorEditor.js +31 -0
  170. package/dist/cjs/vector/VectorEditor.js.map +1 -0
  171. package/dist/cjs/vector/VectorEditor.module.css.js +6 -0
  172. package/dist/cjs/vector/VectorEditor.module.css.js.map +1 -0
  173. package/dist/cjs/vector/VectorEditorMenuBar.js +16 -0
  174. package/dist/cjs/vector/VectorEditorMenuBar.js.map +1 -0
  175. package/dist/cjs/vector/VectorEditorRightPanel.js +126 -0
  176. package/dist/cjs/vector/VectorEditorRightPanel.js.map +1 -0
  177. package/dist/cjs/vector/VectorEditorShapeRenderer.js +55 -0
  178. package/dist/cjs/vector/VectorEditorShapeRenderer.js.map +1 -0
  179. package/dist/cjs/vector/VectorEditorStatusBar.js +14 -0
  180. package/dist/cjs/vector/VectorEditorStatusBar.js.map +1 -0
  181. package/dist/cjs/vector/useVectorEditor.js +613 -0
  182. package/dist/cjs/vector/useVectorEditor.js.map +1 -0
  183. package/dist/cjs/vector/vectorBooleanOps.js +511 -0
  184. package/dist/cjs/vector/vectorBooleanOps.js.map +1 -0
  185. package/dist/cjs/vector/vectorEditorExport.js +159 -0
  186. package/dist/cjs/vector/vectorEditorExport.js.map +1 -0
  187. package/dist/cjs/vector/vectorEditorImport.js +150 -0
  188. package/dist/cjs/vector/vectorEditorImport.js.map +1 -0
  189. package/dist/cjs/vector/vectorEditorTypes.js +72 -0
  190. package/dist/cjs/vector/vectorEditorTypes.js.map +1 -0
  191. package/dist/cjs/vector/vectorGradients.js +201 -0
  192. package/dist/cjs/vector/vectorGradients.js.map +1 -0
  193. package/dist/esm/animation/AnimatedPerson.js +151 -0
  194. package/dist/esm/animation/AnimatedPerson.js.map +1 -0
  195. package/dist/esm/animation/AnimationEditor.js +104 -0
  196. package/dist/esm/animation/AnimationEditor.js.map +1 -0
  197. package/dist/esm/animation/Audience.js +57 -0
  198. package/dist/esm/animation/Audience.js.map +1 -0
  199. package/dist/esm/animation/BodyRenderer.js +28 -0
  200. package/dist/esm/animation/BodyRenderer.js.map +1 -0
  201. package/dist/esm/animation/animationHelper.js +268 -0
  202. package/dist/esm/animation/animationHelper.js.map +1 -0
  203. package/dist/esm/animation/characterTypes.js +70 -0
  204. package/dist/esm/animation/characterTypes.js.map +1 -0
  205. package/dist/esm/animation/choreoDSL.js +182 -0
  206. package/dist/esm/animation/choreoDSL.js.map +1 -0
  207. package/dist/esm/animation/choreography.js +36 -0
  208. package/dist/esm/animation/choreography.js.map +1 -0
  209. package/dist/esm/animation/karaokeIntegration.js +91 -0
  210. package/dist/esm/animation/karaokeIntegration.js.map +1 -0
  211. package/dist/esm/animation/lottieExport.js +123 -0
  212. package/dist/esm/animation/lottieExport.js.map +1 -0
  213. package/dist/esm/animation/motionPath.js +185 -0
  214. package/dist/esm/animation/motionPath.js.map +1 -0
  215. package/dist/esm/animation/physics.js +192 -0
  216. package/dist/esm/animation/physics.js.map +1 -0
  217. package/dist/esm/animation/rig/RigPlayer.js +61 -0
  218. package/dist/esm/animation/rig/RigPlayer.js.map +1 -0
  219. package/dist/esm/animation/rig/RiggedBody.js +28 -0
  220. package/dist/esm/animation/rig/RiggedBody.js.map +1 -0
  221. package/dist/esm/animation/rig/choreoRigBridge.js +60 -0
  222. package/dist/esm/animation/rig/choreoRigBridge.js.map +1 -0
  223. package/dist/esm/animation/rig/ik.js +20 -0
  224. package/dist/esm/animation/rig/ik.js.map +1 -0
  225. package/dist/esm/animation/rig/poseOps.js +45 -0
  226. package/dist/esm/animation/rig/poseOps.js.map +1 -0
  227. package/dist/esm/animation/rig/presets.js +53 -0
  228. package/dist/esm/animation/rig/presets.js.map +1 -0
  229. package/dist/esm/animation/rig/rigMath.js +37 -0
  230. package/dist/esm/animation/rig/rigMath.js.map +1 -0
  231. package/dist/esm/animation/rig/rigTypes.js +40 -0
  232. package/dist/esm/animation/rig/rigTypes.js.map +1 -0
  233. package/dist/esm/animation/shapes/arms.js +13 -0
  234. package/dist/esm/animation/shapes/arms.js.map +1 -0
  235. package/dist/esm/animation/shapes/eyes.js +45 -0
  236. package/dist/esm/animation/shapes/eyes.js.map +1 -0
  237. package/dist/esm/animation/shapes/hair.js +46 -0
  238. package/dist/esm/animation/shapes/hair.js.map +1 -0
  239. package/dist/esm/animation/shapes/heads.js +52 -0
  240. package/dist/esm/animation/shapes/heads.js.map +1 -0
  241. package/dist/esm/animation/shapes/headwear.js +36 -0
  242. package/dist/esm/animation/shapes/headwear.js.map +1 -0
  243. package/dist/esm/animation/shapes/legs.js +13 -0
  244. package/dist/esm/animation/shapes/legs.js.map +1 -0
  245. package/dist/esm/animation/shapes/mouths.js +45 -0
  246. package/dist/esm/animation/shapes/mouths.js.map +1 -0
  247. package/dist/esm/animation/shapes/noses.js +23 -0
  248. package/dist/esm/animation/shapes/noses.js.map +1 -0
  249. package/dist/esm/animation/shapes/outfits.js +37 -0
  250. package/dist/esm/animation/shapes/outfits.js.map +1 -0
  251. package/dist/esm/animation/shapes/torsos.js +11 -0
  252. package/dist/esm/animation/shapes/torsos.js.map +1 -0
  253. package/dist/esm/animation/spineExport.js +128 -0
  254. package/dist/esm/animation/spineExport.js.map +1 -0
  255. package/dist/esm/core/LocalUI.js +50 -0
  256. package/dist/esm/core/LocalUI.js.map +1 -0
  257. package/dist/esm/core/collaboration.js +252 -0
  258. package/dist/esm/core/collaboration.js.map +1 -0
  259. package/dist/esm/core/colorBlindness.js +90 -0
  260. package/dist/esm/core/colorBlindness.js.map +1 -0
  261. package/dist/esm/core/dragDrop.js +165 -0
  262. package/dist/esm/core/dragDrop.js.map +1 -0
  263. package/dist/esm/core/fixes.js +179 -0
  264. package/dist/esm/core/fixes.js.map +1 -0
  265. package/dist/esm/core/gridGuides.js +232 -0
  266. package/dist/esm/core/gridGuides.js.map +1 -0
  267. package/dist/esm/core/historyVisual.js +121 -0
  268. package/dist/esm/core/historyVisual.js.map +1 -0
  269. package/dist/esm/core/i18n.js +13 -0
  270. package/dist/esm/core/i18n.js.map +1 -0
  271. package/dist/esm/core/integrations.js +254 -0
  272. package/dist/esm/core/integrations.js.map +1 -0
  273. package/dist/esm/core/minimap.js +139 -0
  274. package/dist/esm/core/minimap.js.map +1 -0
  275. package/dist/esm/core/plugins.js +124 -0
  276. package/dist/esm/core/plugins.js.map +1 -0
  277. package/dist/esm/core/rtl.js +95 -0
  278. package/dist/esm/core/rtl.js.map +1 -0
  279. package/dist/esm/core/shortcuts.js +200 -0
  280. package/dist/esm/core/shortcuts.js.map +1 -0
  281. package/dist/esm/core/theme.js +162 -0
  282. package/dist/esm/core/theme.js.map +1 -0
  283. package/dist/esm/font/NiceFontEditor.js +189 -0
  284. package/dist/esm/font/NiceFontEditor.js.map +1 -0
  285. package/dist/esm/game/GameAsset2dEditor.js +369 -0
  286. package/dist/esm/game/GameAsset2dEditor.js.map +1 -0
  287. package/dist/esm/game/GameAsset2dEditor.module.css.js +4 -0
  288. package/dist/esm/game/GameAsset2dEditor.module.css.js.map +1 -0
  289. package/dist/esm/game/gameAssetTypes.js +18 -0
  290. package/dist/esm/game/gameAssetTypes.js.map +1 -0
  291. package/dist/esm/game/gameAssetUtils.js +456 -0
  292. package/dist/esm/game/gameAssetUtils.js.map +1 -0
  293. package/dist/esm/game/useGameAssetEditor.js +759 -0
  294. package/dist/esm/game/useGameAssetEditor.js.map +1 -0
  295. package/dist/esm/icon/NiceIconEditor.js +246 -0
  296. package/dist/esm/icon/NiceIconEditor.js.map +1 -0
  297. package/dist/esm/index.js +59 -0
  298. package/dist/esm/index.js.map +1 -0
  299. package/dist/esm/nice2dev-ui/dist/index.js +31720 -0
  300. package/dist/esm/nice2dev-ui/dist/index.js.map +1 -0
  301. package/dist/esm/nice2dev-ui-graphics.css +1 -0
  302. package/dist/esm/photo/FilterThumb.js +27 -0
  303. package/dist/esm/photo/FilterThumb.js.map +1 -0
  304. package/dist/esm/photo/PhotoEditor.js +18 -0
  305. package/dist/esm/photo/PhotoEditor.js.map +1 -0
  306. package/dist/esm/photo/PhotoEditor.module.css.js +4 -0
  307. package/dist/esm/photo/PhotoEditor.module.css.js.map +1 -0
  308. package/dist/esm/photo/PhotoEditorCanvas.js +57 -0
  309. package/dist/esm/photo/PhotoEditorCanvas.js.map +1 -0
  310. package/dist/esm/photo/PhotoEditorLeftPanel.js +172 -0
  311. package/dist/esm/photo/PhotoEditorLeftPanel.js.map +1 -0
  312. package/dist/esm/photo/PhotoEditorToolbar.js +13 -0
  313. package/dist/esm/photo/PhotoEditorToolbar.js.map +1 -0
  314. package/dist/esm/photo/photoEditorActions.js +75 -0
  315. package/dist/esm/photo/photoEditorActions.js.map +1 -0
  316. package/dist/esm/photo/photoEditorTypes.js +36 -0
  317. package/dist/esm/photo/photoEditorTypes.js.map +1 -0
  318. package/dist/esm/photo/photoFilters.js +871 -0
  319. package/dist/esm/photo/photoFilters.js.map +1 -0
  320. package/dist/esm/photo/photoOverlays.js +636 -0
  321. package/dist/esm/photo/photoOverlays.js.map +1 -0
  322. package/dist/esm/photo/photoSelection.js +535 -0
  323. package/dist/esm/photo/photoSelection.js.map +1 -0
  324. package/dist/esm/photo/usePhotoEditor.js +638 -0
  325. package/dist/esm/photo/usePhotoEditor.js.map +1 -0
  326. package/dist/esm/pixel/HSVPicker.js +171 -0
  327. package/dist/esm/pixel/HSVPicker.js.map +1 -0
  328. package/dist/esm/pixel/PixelEditor.js +26 -0
  329. package/dist/esm/pixel/PixelEditor.js.map +1 -0
  330. package/dist/esm/pixel/PixelEditor.module.css.js +4 -0
  331. package/dist/esm/pixel/PixelEditor.module.css.js.map +1 -0
  332. package/dist/esm/pixel/PixelEditorCanvas.js +13 -0
  333. package/dist/esm/pixel/PixelEditorCanvas.js.map +1 -0
  334. package/dist/esm/pixel/PixelEditorMenuBar.js +9 -0
  335. package/dist/esm/pixel/PixelEditorMenuBar.js.map +1 -0
  336. package/dist/esm/pixel/PixelEditorRightPanel.js +13 -0
  337. package/dist/esm/pixel/PixelEditorRightPanel.js.map +1 -0
  338. package/dist/esm/pixel/PixelEditorStatusBar.js +13 -0
  339. package/dist/esm/pixel/PixelEditorStatusBar.js.map +1 -0
  340. package/dist/esm/pixel/PixelEditorTimeline.js +9 -0
  341. package/dist/esm/pixel/PixelEditorTimeline.js.map +1 -0
  342. package/dist/esm/pixel/PixelEditorToolbar.js +14 -0
  343. package/dist/esm/pixel/PixelEditorToolbar.js.map +1 -0
  344. package/dist/esm/pixel/asepriteFormat.js +505 -0
  345. package/dist/esm/pixel/asepriteFormat.js.map +1 -0
  346. package/dist/esm/pixel/pixelEditorExports.js +461 -0
  347. package/dist/esm/pixel/pixelEditorExports.js.map +1 -0
  348. package/dist/esm/pixel/pixelEditorTypes.js +90 -0
  349. package/dist/esm/pixel/pixelEditorTypes.js.map +1 -0
  350. package/dist/esm/pixel/pixelEditorUtils.js +631 -0
  351. package/dist/esm/pixel/pixelEditorUtils.js.map +1 -0
  352. package/dist/esm/pixel/usePixelEditor.js +1110 -0
  353. package/dist/esm/pixel/usePixelEditor.js.map +1 -0
  354. package/dist/esm/texture/Nice3DTexturePainter.js +233 -0
  355. package/dist/esm/texture/Nice3DTexturePainter.js.map +1 -0
  356. package/dist/esm/ui/NiceUIDesigner.js +187 -0
  357. package/dist/esm/ui/NiceUIDesigner.js.map +1 -0
  358. package/dist/esm/vector/VectorEditor.js +29 -0
  359. package/dist/esm/vector/VectorEditor.js.map +1 -0
  360. package/dist/esm/vector/VectorEditor.module.css.js +4 -0
  361. package/dist/esm/vector/VectorEditor.module.css.js.map +1 -0
  362. package/dist/esm/vector/VectorEditorMenuBar.js +14 -0
  363. package/dist/esm/vector/VectorEditorMenuBar.js.map +1 -0
  364. package/dist/esm/vector/VectorEditorRightPanel.js +124 -0
  365. package/dist/esm/vector/VectorEditorRightPanel.js.map +1 -0
  366. package/dist/esm/vector/VectorEditorShapeRenderer.js +53 -0
  367. package/dist/esm/vector/VectorEditorShapeRenderer.js.map +1 -0
  368. package/dist/esm/vector/VectorEditorStatusBar.js +12 -0
  369. package/dist/esm/vector/VectorEditorStatusBar.js.map +1 -0
  370. package/dist/esm/vector/useVectorEditor.js +611 -0
  371. package/dist/esm/vector/useVectorEditor.js.map +1 -0
  372. package/dist/esm/vector/vectorBooleanOps.js +507 -0
  373. package/dist/esm/vector/vectorBooleanOps.js.map +1 -0
  374. package/dist/esm/vector/vectorEditorExport.js +152 -0
  375. package/dist/esm/vector/vectorEditorExport.js.map +1 -0
  376. package/dist/esm/vector/vectorEditorImport.js +148 -0
  377. package/dist/esm/vector/vectorEditorImport.js.map +1 -0
  378. package/dist/esm/vector/vectorEditorTypes.js +63 -0
  379. package/dist/esm/vector/vectorEditorTypes.js.map +1 -0
  380. package/dist/esm/vector/vectorGradients.js +193 -0
  381. package/dist/esm/vector/vectorGradients.js.map +1 -0
  382. package/dist/types/__benchmarks__/bench.d.ts +13 -0
  383. package/dist/types/__tests__/setup.d.ts +4 -0
  384. package/dist/types/animation/AnimatedPerson.d.ts +14 -0
  385. package/dist/types/animation/AnimationEditor.d.ts +20 -0
  386. package/dist/types/animation/Audience.d.ts +11 -0
  387. package/dist/types/animation/BodyRenderer.d.ts +12 -0
  388. package/dist/types/animation/animationHelper.d.ts +28 -0
  389. package/dist/types/animation/characterTypes.d.ts +37 -0
  390. package/dist/types/animation/choreoDSL.d.ts +88 -0
  391. package/dist/types/animation/choreography.d.ts +8 -0
  392. package/dist/types/animation/karaokeIntegration.d.ts +31 -0
  393. package/dist/types/animation/lottieExport.d.ts +77 -0
  394. package/dist/types/animation/motionPath.d.ts +60 -0
  395. package/dist/types/animation/physics.d.ts +73 -0
  396. package/dist/types/animation/rig/RigPlayer.d.ts +32 -0
  397. package/dist/types/animation/rig/RiggedBody.d.ts +19 -0
  398. package/dist/types/animation/rig/choreoRigBridge.d.ts +9 -0
  399. package/dist/types/animation/rig/ik.d.ts +8 -0
  400. package/dist/types/animation/rig/poseOps.d.ts +14 -0
  401. package/dist/types/animation/rig/presets.d.ts +13 -0
  402. package/dist/types/animation/rig/rigMath.d.ts +7 -0
  403. package/dist/types/animation/rig/rigTypes.d.ts +38 -0
  404. package/dist/types/animation/shapes/arms.d.ts +10 -0
  405. package/dist/types/animation/shapes/eyes.d.ts +17 -0
  406. package/dist/types/animation/shapes/hair.d.ts +17 -0
  407. package/dist/types/animation/shapes/heads.d.ts +18 -0
  408. package/dist/types/animation/shapes/headwear.d.ts +16 -0
  409. package/dist/types/animation/shapes/legs.d.ts +10 -0
  410. package/dist/types/animation/shapes/mouths.d.ts +17 -0
  411. package/dist/types/animation/shapes/noses.d.ts +17 -0
  412. package/dist/types/animation/shapes/outfits.d.ts +14 -0
  413. package/dist/types/animation/shapes/torsos.d.ts +9 -0
  414. package/dist/types/animation/spineExport.d.ts +66 -0
  415. package/dist/types/core/LocalUI.d.ts +21 -0
  416. package/dist/types/core/collaboration.d.ts +164 -0
  417. package/dist/types/core/colorBlindness.d.ts +24 -0
  418. package/dist/types/core/dragDrop.d.ts +46 -0
  419. package/dist/types/core/fixes.d.ts +80 -0
  420. package/dist/types/core/gridGuides.d.ts +70 -0
  421. package/dist/types/core/historyVisual.d.ts +915 -0
  422. package/dist/types/core/i18n.d.ts +27 -0
  423. package/dist/types/core/integrations.d.ts +103 -0
  424. package/dist/types/core/minimap.d.ts +49 -0
  425. package/dist/types/core/plugins.d.ts +111 -0
  426. package/dist/types/core/rtl.d.ts +32 -0
  427. package/dist/types/core/shortcuts.d.ts +150 -0
  428. package/dist/types/core/theme.d.ts +78 -0
  429. package/dist/types/core/useGamepad.d.ts +64 -0
  430. package/dist/types/core/usePointerPressure.d.ts +88 -0
  431. package/dist/types/font/NiceFontEditor.d.ts +62 -0
  432. package/dist/types/game/AnimationPreviewPlayer.d.ts +29 -0
  433. package/dist/types/game/CollisionEditor.d.ts +101 -0
  434. package/dist/types/game/GameAsset2dEditor.d.ts +17 -0
  435. package/dist/types/game/GameAssetExportPanel.d.ts +20 -0
  436. package/dist/types/game/IsometricEditor.d.ts +22 -0
  437. package/dist/types/game/IsometricTilePanel.d.ts +18 -0
  438. package/dist/types/game/gameAssetExport.d.ts +160 -0
  439. package/dist/types/game/gameAssetTypes.d.ts +238 -0
  440. package/dist/types/game/gameAssetUtils.d.ts +23 -0
  441. package/dist/types/game/index.d.ts +8 -0
  442. package/dist/types/game/isometricTiles.d.ts +250 -0
  443. package/dist/types/game/useAnimationPreview.d.ts +63 -0
  444. package/dist/types/game/useCollisionEditor.d.ts +96 -0
  445. package/dist/types/game/useGameAssetEditor.d.ts +79 -0
  446. package/dist/types/game/useGameAssetExport.d.ts +82 -0
  447. package/dist/types/icon/NiceIconEditor.d.ts +79 -0
  448. package/dist/types/index.d.ts +85 -0
  449. package/dist/types/photo/BatchProcessingPanel.d.ts +13 -0
  450. package/dist/types/photo/FaceDetectionPanel.d.ts +18 -0
  451. package/dist/types/photo/FilterThumb.d.ts +14 -0
  452. package/dist/types/photo/PerspectiveCorrectionPanel.d.ts +17 -0
  453. package/dist/types/photo/PhotoEditor.d.ts +2 -0
  454. package/dist/types/photo/PhotoEditorCanvas.d.ts +14 -0
  455. package/dist/types/photo/PhotoEditorLeftPanel.d.ts +13 -0
  456. package/dist/types/photo/PhotoEditorToolbar.d.ts +13 -0
  457. package/dist/types/photo/RawFilePanel.d.ts +14 -0
  458. package/dist/types/photo/StyleTransferPanel.d.ts +15 -0
  459. package/dist/types/photo/aiStyleTransfer.d.ts +58 -0
  460. package/dist/types/photo/batchProcessing.d.ts +95 -0
  461. package/dist/types/photo/faceDetection.d.ts +103 -0
  462. package/dist/types/photo/index.d.ts +17 -0
  463. package/dist/types/photo/perspectiveCorrection.d.ts +134 -0
  464. package/dist/types/photo/photoEditorActions.d.ts +40 -0
  465. package/dist/types/photo/photoEditorTypes.d.ts +34 -0
  466. package/dist/types/photo/photoFilters.d.ts +55 -0
  467. package/dist/types/photo/photoOverlays.d.ts +126 -0
  468. package/dist/types/photo/photoSelection.d.ts +56 -0
  469. package/dist/types/photo/rawFileSupport.d.ts +124 -0
  470. package/dist/types/photo/usePhotoEditor.d.ts +123 -0
  471. package/dist/types/pixel/HSVPicker.d.ts +11 -0
  472. package/dist/types/pixel/PaletteExtractorPanel.d.ts +16 -0
  473. package/dist/types/pixel/PixelEditor.d.ts +17 -0
  474. package/dist/types/pixel/PixelEditorCanvas.d.ts +10 -0
  475. package/dist/types/pixel/PixelEditorMenuBar.d.ts +11 -0
  476. package/dist/types/pixel/PixelEditorRightPanel.d.ts +11 -0
  477. package/dist/types/pixel/PixelEditorStatusBar.d.ts +11 -0
  478. package/dist/types/pixel/PixelEditorTimeline.d.ts +11 -0
  479. package/dist/types/pixel/PixelEditorToolbar.d.ts +11 -0
  480. package/dist/types/pixel/TileMapPanel.d.ts +14 -0
  481. package/dist/types/pixel/asepriteFormat.d.ts +62 -0
  482. package/dist/types/pixel/paletteExtractor.d.ts +73 -0
  483. package/dist/types/pixel/pixelEditorExports.d.ts +31 -0
  484. package/dist/types/pixel/pixelEditorTypes.d.ts +51 -0
  485. package/dist/types/pixel/pixelEditorUtils.d.ts +136 -0
  486. package/dist/types/pixel/tileMapMode.d.ts +122 -0
  487. package/dist/types/pixel/usePixelEditor.d.ts +114 -0
  488. package/dist/types/texture/Nice3DTexturePainter.d.ts +55 -0
  489. package/dist/types/ui/NiceUIDesigner.d.ts +43 -0
  490. package/dist/types/vector/PathSimplificationPanel.d.ts +15 -0
  491. package/dist/types/vector/PdfExportPanel.d.ts +20 -0
  492. package/dist/types/vector/TextOnPathPanel.d.ts +26 -0
  493. package/dist/types/vector/VectorEditor.d.ts +32 -0
  494. package/dist/types/vector/VectorEditorMenuBar.d.ts +8 -0
  495. package/dist/types/vector/VectorEditorRightPanel.d.ts +7 -0
  496. package/dist/types/vector/VectorEditorShapeRenderer.d.ts +9 -0
  497. package/dist/types/vector/VectorEditorStatusBar.d.ts +9 -0
  498. package/dist/types/vector/VectorFilterPanel.d.ts +19 -0
  499. package/dist/types/vector/VectorPatternPanel.d.ts +21 -0
  500. package/dist/types/vector/pathSimplification.d.ts +135 -0
  501. package/dist/types/vector/pdfExport.d.ts +65 -0
  502. package/dist/types/vector/textOnPath.d.ts +145 -0
  503. package/dist/types/vector/useVectorEditor.d.ts +90 -0
  504. package/dist/types/vector/vectorBooleanOps.d.ts +22 -0
  505. package/dist/types/vector/vectorEditorExport.d.ts +8 -0
  506. package/dist/types/vector/vectorEditorImport.d.ts +7 -0
  507. package/dist/types/vector/vectorEditorTypes.d.ts +47 -0
  508. package/dist/types/vector/vectorGradients.d.ts +64 -0
  509. package/dist/types/vector/vectorPatternFills.d.ts +101 -0
  510. package/dist/types/vector/vectorSvgFilters.d.ts +134 -0
  511. package/package.json +93 -0
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import type { CharacterConfig } from "./characterTypes";
3
+ export interface AnimationEditorProps {
4
+ /** Initial character config. Defaults to DEFAULT_CHARACTER. */
5
+ initialConfig?: CharacterConfig;
6
+ /** Called whenever config changes. */
7
+ onChange?: (config: CharacterConfig) => void;
8
+ /** Persist/restore state to localStorage with this key. Pass false to disable. Default: "nice2dev.animation-editor.character" */
9
+ storageKey?: string | false;
10
+ /** Optional notification callback (replaces Toast integration). */
11
+ onNotify?: (message: string, type?: "success" | "error" | "info") => void;
12
+ /** Show JSON editor panel (default: true). Set false for compact mode. */
13
+ showJsonPanel?: boolean;
14
+ /** Show the preview panel (default: true). Set false to hide the avatar preview. */
15
+ showPreview?: boolean;
16
+ className?: string;
17
+ style?: React.CSSProperties;
18
+ }
19
+ export declare function AnimationEditor({ initialConfig, onChange, storageKey, onNotify, showJsonPanel, showPreview, className, style, }: AnimationEditorProps): import("react/jsx-runtime").JSX.Element;
20
+ export default AnimationEditor;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ /** Props for the Audience grid component. */
3
+ export type AudienceProps = {
4
+ /** Number of audience members. */
5
+ count?: number;
6
+ /** Columns in CSS grid. */
7
+ columns?: number;
8
+ };
9
+ /** Grid of animated audience members with wave/cheer actions. */
10
+ declare const Audience: React.FC<AudienceProps>;
11
+ export default Audience;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import type { CharacterConfig } from "./characterTypes";
3
+ /** Props for BodyRenderer (pure visual; no animation). */
4
+ export type BodyRendererProps = {
5
+ /** Character configuration (features + palettes). */
6
+ character: CharacterConfig;
7
+ /** Optional pixel size. Defaults to character.size (or 180). */
8
+ size?: number;
9
+ };
10
+ /** Static character body composed from modular SVG shapes. */
11
+ export declare const BodyRenderer: React.FC<BodyRendererProps>;
12
+ export default BodyRenderer;
@@ -0,0 +1,28 @@
1
+ import { AnimationControls } from "framer-motion";
2
+ export type PersonControls = {
3
+ root: AnimationControls;
4
+ body: AnimationControls;
5
+ head: AnimationControls;
6
+ eyes: AnimationControls;
7
+ mouth: AnimationControls;
8
+ leftArm: AnimationControls;
9
+ rightArm: AnimationControls;
10
+ card: AnimationControls;
11
+ curse: AnimationControls;
12
+ };
13
+ export declare function usePersonControls(): PersonControls;
14
+ /** Dotychczasowe pozy + 10 nowych */
15
+ export type PersonPose = "idle" | "raiseCard" | "happy" | "angry" | "disappointed" | "swearing" | "shouting" | "rock" | "danceA" | "danceB" | "danceC" | "hideDown" | "exitLeft" | "exitRight" | "enterFromLeft" | "enterFromRight" | "waveHand" | "facepalm" | "shrug" | "nodYes" | "shakeNo" | "pointRight" | "leanBack" | "jump" | "spin" | "celebrate";
16
+ export type PoseOptions = {
17
+ duration?: number;
18
+ score?: number | string;
19
+ screenW?: number;
20
+ screenH?: number;
21
+ };
22
+ export type ChoreoStep = {
23
+ pose: PersonPose;
24
+ holdMs?: number;
25
+ options?: PoseOptions;
26
+ };
27
+ export declare function playPose(fx: PersonControls, pose: PersonPose, opts?: PoseOptions): Promise<void>;
28
+ export declare function runChoreo(fx: PersonControls, steps: ChoreoStep[]): Promise<void>;
@@ -0,0 +1,37 @@
1
+ export type FeatureConfig = {
2
+ /** nazwa wariantu, np. "short", "dot" itp. */
3
+ variant: string;
4
+ /** 1+ colors per variant. Excess trimmed in renderers, missing duplicated. */
5
+ colors: string[];
6
+ };
7
+ export type CharacterConfig = {
8
+ face: FeatureConfig;
9
+ hair: FeatureConfig;
10
+ eyes: FeatureConfig;
11
+ nose: FeatureConfig;
12
+ mouth: FeatureConfig;
13
+ outfit: FeatureConfig;
14
+ headwear: FeatureConfig;
15
+ prop: FeatureConfig;
16
+ name?: string;
17
+ size?: number;
18
+ };
19
+ export declare const VARIANTS: {
20
+ readonly face: readonly ["round", "oval", "square", "heart", "diamond", "long", "chubby", "flatTop", "egg", "triangle", "hex", "pear", "bean", "heroJaw"];
21
+ readonly hair: readonly ["none", "short", "long", "curly", "wavy", "mohawk", "afro", "bunHigh", "bunLow", "bob", "pixie", "sidePart", "undercut", "spiky", "braids", "dreadlocks", "ponytail", "twinTails", "mullet", "balding", "bangs"];
22
+ readonly eyes: readonly ["classic", "big", "anime", "sleepy", "angry", "surprised", "winkLeft", "winkRight", "smile", "oval", "upturned", "downturned", "lashes", "sparkle", "heart", "star", "sad", "focused"];
23
+ readonly nose: readonly ["line", "triangle", "round", "button", "hook", "flat", "wide", "tiny", "pointy", "roman", "none"];
24
+ readonly mouth: readonly ["smile", "frown", "open", "flat", "o", "grin", "teeth", "smirk", "wow", "tongue", "laugh", "sad", "angry", "kiss", "grimace"];
25
+ readonly outfit: readonly ["tee", "hoodie", "suit", "dress", "tank", "jacket", "blazer", "vest", "sweatshirt", "kimono", "polo", "stripes", "checker", "jersey", "tux", "robe"];
26
+ readonly headwear: readonly ["none", "cap", "headphones", "hat", "crown", "beanie", "bandana", "visor", "bow", "tiara", "fedora", "beret", "headband", "helmet", "headsetMic", "hood", "cowboy", "bunnyEars"];
27
+ readonly prop: readonly ["none", "mic", "clipboard", "star", "flag", "phone", "glass", "trophy", "rose", "glowstick", "megaphone", "tambourine", "lightstick", "scoreCard", "camera", "tablet", "remote", "foamFinger", "whistle", "drumstick"];
28
+ };
29
+ export declare const DEFAULT_COLORS: {
30
+ skin: string;
31
+ hair: string;
32
+ shirt: string;
33
+ stroke: string;
34
+ };
35
+ export declare const DEFAULT_CHARACTER: CharacterConfig;
36
+ /** Returns color from list; if missing – uses last or fallback */
37
+ export declare function pick(colors: string[], index: number, fallback?: string): string;
@@ -0,0 +1,88 @@
1
+ import type { ChoreoStep, PersonControls, PersonPose, PoseOptions } from "./animationHelper";
2
+ /** Context passed to choreography runtime (conditions, scoring, etc.). */
3
+ export type RunContext = {
4
+ score?: number;
5
+ [k: string]: unknown;
6
+ };
7
+ type InternalStep = {
8
+ type: "pose";
9
+ pose: PersonPose;
10
+ holdMs?: number;
11
+ options?: PoseOptions;
12
+ } | {
13
+ type: "wait";
14
+ ms: number;
15
+ } | {
16
+ type: "label";
17
+ name: string;
18
+ } | {
19
+ type: "goto";
20
+ name: string;
21
+ when?: (ctx: RunContext) => boolean;
22
+ };
23
+ /**
24
+ * Builder-pattern DSL for choreography sequences.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * seq()
29
+ * .enterFromLeft(0.6)
30
+ * .happy(300)
31
+ * .waveHand(600)
32
+ * .celebrate(500)
33
+ * ```
34
+ */
35
+ export declare class ChoreoBuilder {
36
+ private steps;
37
+ private labels;
38
+ private loopCount;
39
+ pose(pose: PersonPose, holdMs?: number, options?: PoseOptions): this;
40
+ wait(ms: number): this;
41
+ tempo(multiplier: number): this;
42
+ repeat(times: number): this;
43
+ loop(times: number | typeof Infinity): this;
44
+ label(name: string): this;
45
+ goto(name: string): this;
46
+ gotoIf(name: string, when: (ctx: RunContext) => boolean): this;
47
+ idle(ms?: number): this;
48
+ enterFromLeft(duration?: number): this;
49
+ enterFromRight(duration?: number): this;
50
+ exitLeft(duration?: number): this;
51
+ exitRight(duration?: number): this;
52
+ hideDown(duration?: number): this;
53
+ happy(ms?: number): this;
54
+ angry(ms?: number): this;
55
+ disappointed(ms?: number): this;
56
+ swearing(ms?: number): this;
57
+ shouting(ms?: number): this;
58
+ rock(ms?: number): this;
59
+ danceA(ms?: number): this;
60
+ danceB(ms?: number): this;
61
+ danceC(ms?: number): this;
62
+ waveHand(ms?: number): this;
63
+ facepalm(ms?: number): this;
64
+ shrug(ms?: number): this;
65
+ nodYes(ms?: number): this;
66
+ shakeNo(ms?: number): this;
67
+ pointRight(ms?: number): this;
68
+ leanBack(ms?: number): this;
69
+ jump(ms?: number): this;
70
+ spin(ms?: number): this;
71
+ celebrate(ms?: number): this;
72
+ raiseCard(score?: number | string, holdMs?: number, duration?: number): this;
73
+ build(): InternalStep[];
74
+ getLoop(): number | typeof Infinity | undefined;
75
+ }
76
+ /** Create a new ChoreoBuilder. */
77
+ export declare const seq: () => ChoreoBuilder;
78
+ /** Compile builder or steps into flat ChoreoStep[] (resolving gotos). */
79
+ export declare function compile(builderOrSteps: ChoreoBuilder | ChoreoStep[] | InternalStep[], ctx?: RunContext): ChoreoStep[];
80
+ /** Run compiled choreography on a single actor (with optional looping). */
81
+ export declare function runSeq(fx: PersonControls, builderOrSteps: ChoreoBuilder | ChoreoStep[] | InternalStep[], ctx?: RunContext): Promise<void>;
82
+ /** Wave pattern: stagger actors left→right. */
83
+ export declare function runWave(actors: PersonControls[], choreo: ChoreoBuilder | ChoreoStep[] | InternalStep[], staggerMs?: number, ctx?: RunContext): Promise<void>;
84
+ /** Cannon pattern: wave left→right, then right→left. */
85
+ export declare function runCannon(actors: PersonControls[], choreo: ChoreoBuilder | ChoreoStep[] | InternalStep[], staggerMs?: number, ctx?: RunContext): Promise<void>;
86
+ /** Assign programs to actors round-robin. */
87
+ export declare function runRounds(actors: PersonControls[], programs: Array<ChoreoBuilder | ChoreoStep[] | InternalStep[]>, staggerMs?: number, ctx?: RunContext): Promise<void>;
88
+ export {};
@@ -0,0 +1,8 @@
1
+ /** Wave + score reveal choreography. */
2
+ export declare const waveScoreChoreo: (score: number) => import("./choreoDSL").ChoreoBuilder;
3
+ /** Boo / disapproval choreography. */
4
+ export declare const booChoreo: import("./choreoDSL").ChoreoBuilder;
5
+ /** Dance party loop. */
6
+ export declare const danceParty: import("./choreoDSL").ChoreoBuilder;
7
+ /** Showcase all poses. */
8
+ export declare const showcaseAll: import("./choreoDSL").ChoreoBuilder;
@@ -0,0 +1,31 @@
1
+ import type { PersonControls } from "./animationHelper";
2
+ import type { ChoreoBuilder } from "./choreoDSL";
3
+ /** Score event emitted on the score bus. */
4
+ export type ScoreEvent = {
5
+ score: number;
6
+ at: number;
7
+ };
8
+ type ScoreHandler = (e: ScoreEvent) => void;
9
+ declare class ScoreBus {
10
+ private target;
11
+ push(score: number): void;
12
+ subscribe(handler: ScoreHandler): () => void;
13
+ }
14
+ /** Shared score event bus. */
15
+ export declare const scoreBus: ScoreBus;
16
+ export type ScoreListenerOptions = {
17
+ minIntervalMs?: number;
18
+ dedupeWindowMs?: number;
19
+ roundTo?: number;
20
+ };
21
+ /** Subscribe to score events with throttling + dedup. */
22
+ export declare function onScore(handler: (score: number) => void, opts?: ScoreListenerOptions): () => void;
23
+ /** Map a score to a reaction choreography. */
24
+ export declare function reactionForScore(score: number, rng?: () => number): ChoreoBuilder;
25
+ /** Play intro choreography for actors. */
26
+ export declare function playIntro(actors: PersonControls[]): Promise<void>;
27
+ /** Emit a score event for testing. */
28
+ export declare const simulateScore: (score: number) => void;
29
+ /** Attach score reactions to actors. */
30
+ export declare function attachScoreReactions(actors: PersonControls[], opts?: ScoreListenerOptions, rng?: () => number): () => void;
31
+ export {};
@@ -0,0 +1,77 @@
1
+ /**
2
+ * lottieExport.ts — Export animations to Lottie/Bodymovin JSON format.
3
+ *
4
+ * Converts rig poses and choreography sequences to Lottie animation format
5
+ * that can be played back with lottie-web, lottie-ios, lottie-android, etc.
6
+ */
7
+ import type { RigPose, RigConfig } from "./rig/rigTypes";
8
+ export interface LottieKeyframe {
9
+ /** Time in ms. */
10
+ time: number;
11
+ /** Pose at this keyframe. */
12
+ pose: RigPose;
13
+ }
14
+ export interface LottieExportOptions {
15
+ /** Animation name. */
16
+ name?: string;
17
+ /** Width in pixels. */
18
+ width?: number;
19
+ /** Height in pixels. */
20
+ height?: number;
21
+ /** Frames per second. */
22
+ fps?: number;
23
+ /** Rig configuration (defaults to DEFAULT_RIG). */
24
+ rig?: RigConfig;
25
+ /** Character size for FK solving. */
26
+ size?: number;
27
+ /** Author name. */
28
+ author?: string;
29
+ }
30
+ interface LottieLayer {
31
+ ddd: number;
32
+ ind: number;
33
+ ty: number;
34
+ nm: string;
35
+ sr: number;
36
+ ks: Record<string, unknown>;
37
+ ao: number;
38
+ shapes: unknown[];
39
+ ip: number;
40
+ op: number;
41
+ st: number;
42
+ bm: number;
43
+ }
44
+ interface LottieAnimation {
45
+ v: string;
46
+ fr: number;
47
+ ip: number;
48
+ op: number;
49
+ w: number;
50
+ h: number;
51
+ nm: string;
52
+ ddd: number;
53
+ assets: unknown[];
54
+ layers: LottieLayer[];
55
+ meta?: {
56
+ a: string;
57
+ g: string;
58
+ };
59
+ }
60
+ /**
61
+ * Export a sequence of RigPose keyframes to Lottie JSON format.
62
+ * Returns a Lottie animation object that can be serialized with JSON.stringify().
63
+ */
64
+ export declare function exportToLottie(keyframes: LottieKeyframe[], options?: LottieExportOptions): LottieAnimation;
65
+ /** Serialize Lottie animation to a JSON string. */
66
+ export declare function lottieToJSON(animation: LottieAnimation): string;
67
+ /** Create a downloadable Blob for the Lottie animation. */
68
+ export declare function lottieToBlob(animation: LottieAnimation): Blob;
69
+ /**
70
+ * Convert a choreography sequence (pose name + duration) to Lottie keyframes.
71
+ * Utility for bridging the choreography system to Lottie export.
72
+ */
73
+ export declare function choreoToLottieKeyframes(poses: Array<{
74
+ pose: RigPose;
75
+ durationMs: number;
76
+ }>): LottieKeyframe[];
77
+ export {};
@@ -0,0 +1,60 @@
1
+ /**
2
+ * motionPath.ts — Spline-based motion path editor for AnimationEditor.
3
+ *
4
+ * Cubic Bézier paths that can be evaluated at any t ∈ [0..1]
5
+ * to drive bone position or object translation.
6
+ */
7
+ export interface Vec2 {
8
+ x: number;
9
+ y: number;
10
+ }
11
+ export interface BezierPoint {
12
+ /** Anchor position. */
13
+ pos: Vec2;
14
+ /** Control point before anchor (incoming tangent). */
15
+ cpIn: Vec2;
16
+ /** Control point after anchor (outgoing tangent). */
17
+ cpOut: Vec2;
18
+ }
19
+ export interface MotionPath {
20
+ id: string;
21
+ name: string;
22
+ points: BezierPoint[];
23
+ closed: boolean;
24
+ }
25
+ export interface MotionPathKeyframe {
26
+ /** Time in ms. */
27
+ time: number;
28
+ /** Parameter t on the path [0..1]. */
29
+ t: number;
30
+ /** Easing to next keyframe. */
31
+ easing?: "linear" | "ease-in" | "ease-out" | "ease-in-out";
32
+ }
33
+ export interface MotionPathAnimation {
34
+ pathId: string;
35
+ keyframes: MotionPathKeyframe[];
36
+ loop: boolean;
37
+ }
38
+ /** Create a straight-line motion path between two points. */
39
+ export declare function createLinearPath(id: string, from: Vec2, to: Vec2, name?: string): MotionPath;
40
+ /** Create a circular motion path. */
41
+ export declare function createCircularPath(id: string, cx: number, cy: number, radius: number, name?: string): MotionPath;
42
+ /** Create a figure-8 motion path. */
43
+ export declare function createFigure8Path(id: string, cx: number, cy: number, width: number, height: number, name?: string): MotionPath;
44
+ /** Evaluate a position on the motion path at parameter t ∈ [0..1]. */
45
+ export declare function evaluatePath(path: MotionPath, t: number): Vec2;
46
+ /** Get the tangent direction at parameter t. */
47
+ export declare function evaluatePathTangent(path: MotionPath, t: number): Vec2;
48
+ /** Approximate total path length by sampling. */
49
+ export declare function pathLength(path: MotionPath, samples?: number): number;
50
+ /** Compute arc-length parameterization lookup table. */
51
+ export declare function arcLengthTable(path: MotionPath, samples?: number): number[];
52
+ /** Convert distance fraction → parametric t using arc-length table. */
53
+ export declare function distanceToT(arcTable: number[], d: number): number;
54
+ /** Evaluate a motion path animation at a given time (ms). Returns position on path. */
55
+ export declare function evaluateMotionPathAnimation(path: MotionPath, anim: MotionPathAnimation, timeMs: number): Vec2 | null;
56
+ export declare const PRESET_PATHS: {
57
+ bouncingArc: (cx: number, cy: number, w: number, h: number) => MotionPath;
58
+ circle: (cx: number, cy: number, r: number) => MotionPath;
59
+ figure8: (cx: number, cy: number, w: number, h: number) => MotionPath;
60
+ };
@@ -0,0 +1,73 @@
1
+ /**
2
+ * physics.ts — 2D physics simulation for animation (ragdoll, cloth).
3
+ *
4
+ * Verlet integration with constraints for realistic body/cloth simulation.
5
+ */
6
+ import type { RigPose } from "./rig/rigTypes";
7
+ export interface Vec2 {
8
+ x: number;
9
+ y: number;
10
+ }
11
+ export interface PhysicsParticle {
12
+ pos: Vec2;
13
+ prev: Vec2;
14
+ acc: Vec2;
15
+ mass: number;
16
+ pinned: boolean;
17
+ }
18
+ export interface DistanceConstraint {
19
+ a: number;
20
+ b: number;
21
+ restLength: number;
22
+ stiffness: number;
23
+ }
24
+ export interface PhysicsConfig {
25
+ gravity: Vec2;
26
+ damping: number;
27
+ iterations: number;
28
+ timestep: number;
29
+ }
30
+ export interface RagdollConfig {
31
+ size: number;
32
+ gravity?: Vec2;
33
+ damping?: number;
34
+ }
35
+ export interface ClothConfig {
36
+ width: number;
37
+ height: number;
38
+ cols: number;
39
+ rows: number;
40
+ pinTop?: boolean;
41
+ stiffness?: number;
42
+ gravity?: Vec2;
43
+ damping?: number;
44
+ }
45
+ export interface ClothSimulation {
46
+ particles: PhysicsParticle[];
47
+ constraints: DistanceConstraint[];
48
+ cols: number;
49
+ rows: number;
50
+ }
51
+ export interface RagdollSimulation {
52
+ particles: PhysicsParticle[];
53
+ constraints: DistanceConstraint[];
54
+ boneMap: Record<string, number>;
55
+ }
56
+ /** Create a ragdoll simulation from a rig pose. */
57
+ export declare function createRagdoll(cfg: RagdollConfig): RagdollSimulation;
58
+ /** Step the ragdoll simulation forward by one frame. */
59
+ export declare function stepRagdoll(sim: RagdollSimulation, config?: Partial<PhysicsConfig>): void;
60
+ /** Extract a RigPose from the current ragdoll particle positions. */
61
+ export declare function ragdollToPose(sim: RagdollSimulation): RigPose;
62
+ /** Apply a force impulse to a ragdoll particle. */
63
+ export declare function applyImpulse(sim: RagdollSimulation, boneName: string, force: Vec2): void;
64
+ /** Create a cloth simulation grid. */
65
+ export declare function createCloth(cfg: ClothConfig): ClothSimulation;
66
+ /** Step the cloth simulation forward by one frame. */
67
+ export declare function stepCloth(sim: ClothSimulation, config?: Partial<PhysicsConfig>): void;
68
+ /** Get cloth vertex positions as a flat array [x0,y0, x1,y1, ...]. */
69
+ export declare function clothVertices(sim: ClothSimulation): number[];
70
+ /** Pin or unpin a cloth particle by grid position. */
71
+ export declare function pinClothParticle(sim: ClothSimulation, col: number, row: number, pinned: boolean): void;
72
+ export type Ragdoll = RagdollSimulation;
73
+ export type Cloth = ClothSimulation;
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ import type { CharacterConfig } from "../characterTypes";
3
+ import { type RigConfig, type RigPose } from "./rigTypes";
4
+ import type { ChoreoStep } from "../animationHelper";
5
+ /** Public methods exposed via ref. */
6
+ export interface RigPlayerHandle {
7
+ /** Set pose immediately (no tween). */
8
+ setPose(p: RigPose): void;
9
+ /** Tween to pose in given duration. */
10
+ tweenTo(p: RigPose, durationMs?: number): Promise<void>;
11
+ /** Play DSL choreo mapped to rig angles. */
12
+ playChoreo(steps: ChoreoStep[], defaultMs?: number): Promise<void>;
13
+ /** Aim right hand to (x,y) in SVG space. */
14
+ aimRightHandAt(x: number, y: number): void;
15
+ /** Raise card using IK and hold optional score. */
16
+ raiseCardIK(score?: number, durationMs?: number): Promise<void>;
17
+ }
18
+ /** Props for RigPlayer. */
19
+ export type RigPlayerProps = {
20
+ /** Character visuals. */
21
+ character: CharacterConfig;
22
+ /** Rig proportions preset. */
23
+ rig?: RigConfig;
24
+ /** Initial pose (optional). */
25
+ pose?: RigPose;
26
+ /** Pixel size. */
27
+ size?: number;
28
+ /** Show debug joints. */
29
+ debug?: boolean;
30
+ };
31
+ declare const RigPlayer: React.ForwardRefExoticComponent<RigPlayerProps & React.RefAttributes<RigPlayerHandle>>;
32
+ export default RigPlayer;
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ import type { CharacterConfig } from "../characterTypes";
3
+ import { type RigConfig, type RigPose } from "./rigTypes";
4
+ /** Props for the rigged body renderer (pure SVG). */
5
+ export type RiggedBodyProps = {
6
+ /** Character visuals (colors). */
7
+ character: CharacterConfig;
8
+ /** Rig proportions; defaults to DEFAULT_RIG. */
9
+ rig?: RigConfig;
10
+ /** Angles (deg) for each bone; defaults to DEFAULT_POSE. */
11
+ pose?: RigPose;
12
+ /** Pixel size (falls back to character.size or 180). */
13
+ size?: number;
14
+ /** Draw joints overlay. */
15
+ debug?: boolean;
16
+ };
17
+ /** Render a multi-bone body (arms: 3, legs: 3, torso: 3, neck+head). */
18
+ declare const RiggedBody: React.FC<RiggedBodyProps>;
19
+ export default RiggedBody;
@@ -0,0 +1,9 @@
1
+ import type { RigPose } from "./rigTypes";
2
+ import type { PersonPose, ChoreoStep } from "../animationHelper";
3
+ /** Map a high-level PersonPose to a rig pose. */
4
+ export declare function rigPoseFor(pose: PersonPose): RigPose;
5
+ /** Play a DSL choreography program by tweening the provided pose setter. */
6
+ export declare function playRigFromChoreo(steps: ChoreoStep[], setPose: (p: RigPose) => void, opts?: {
7
+ duration?: number;
8
+ easing?: (t: number) => number;
9
+ }): Promise<void>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 2-bone planar IK solver (shoulder→elbow→hand).
3
+ * Returns absolute angles (deg) for upper and forearm.
4
+ */
5
+ export declare function solveTwoBoneIK(sx: number, sy: number, L1: number, L2: number, tx: number, ty: number): {
6
+ upper: number;
7
+ fore: number;
8
+ };
@@ -0,0 +1,14 @@
1
+ import type { RigPose } from "./rigTypes";
2
+ /** Easing functions (t in [0..1]). */
3
+ export declare const ease: {
4
+ /** Smoothstep-like ease in-out. */
5
+ inOut: (t: number) => number;
6
+ /** Fast-in, slow-out. */
7
+ outCubic: (t: number) => number;
8
+ /** Slow-in, fast-out. */
9
+ inCubic: (t: number) => number;
10
+ };
11
+ /** Blend two poses by factor t (0..1). */
12
+ export declare function blendPose(a: RigPose, b: RigPose, t: number): RigPose;
13
+ /** Tween helper driven by requestAnimationFrame. */
14
+ export declare function tweenPose(from: RigPose, to: RigPose, durationMs: number, set: (p: RigPose) => void, easing?: (t: number) => number): Promise<void>;
@@ -0,0 +1,13 @@
1
+ import type { RigConfig, RigPose } from "./rigTypes";
2
+ /** Slim proportions preset. */
3
+ export declare const RIG_SLIM: RigConfig;
4
+ /** Broad shoulders preset. */
5
+ export declare const RIG_HERO: RigConfig;
6
+ /** Robot-like short limbs preset. */
7
+ export declare const RIG_ROBOT: RigConfig;
8
+ /** Happy pose. */
9
+ export declare const POSE_HAPPY: RigPose;
10
+ /** Angry pose. */
11
+ export declare const POSE_ANGRY: RigPose;
12
+ /** Dance pose A. */
13
+ export declare const POSE_DANCE_A: RigPose;
@@ -0,0 +1,7 @@
1
+ import type { BoneKey, RigConfig, RigPose, SolvedBone } from "./rigTypes";
2
+ /** Convert degrees to radians. */
3
+ export declare const deg2rad: (deg: number) => number;
4
+ /** Linear interpolation of angles with wrap-around. */
5
+ export declare function lerpAngle(a: number, b: number, t: number): number;
6
+ /** Forward kinematics — compute world-space positions for all bones. */
7
+ export declare function solveFK(rig: RigConfig, pose: RigPose, sizePx: number): Record<BoneKey, SolvedBone>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Bone name keys used in the rig system.
3
+ * Full humanoid skeleton: root → pelvis → spine → neck → head,
4
+ * shoulders → arms → hands, thighs → shins → feet.
5
+ */
6
+ export type BoneKey = "root" | "pelvis" | "spineLower" | "spineUpper" | "neck" | "head" | "lShoulder" | "lUpperArm" | "lForearm" | "lHand" | "rShoulder" | "rUpperArm" | "rForearm" | "rHand" | "lThigh" | "lShin" | "lFoot" | "rThigh" | "rShin" | "rFoot";
7
+ /** Bone specification relative to the character size. */
8
+ export type BoneSpec = {
9
+ /** Parent bone key (undefined for the root). */
10
+ parent?: BoneKey;
11
+ /** Length as a fraction of character size (px = length * size). */
12
+ length?: number;
13
+ /** Static offset from parent joint, in fractions of size [dx, dy]. */
14
+ offset?: [number, number];
15
+ };
16
+ /** Complete rig configuration describing all bones. */
17
+ export type RigConfig = Record<BoneKey, BoneSpec>;
18
+ /** Per-bone rotation in degrees (clockwise, 0° = pointing right). */
19
+ export type RigPose = Partial<Record<BoneKey, number>>;
20
+ /** World-space FK result for a single bone. */
21
+ export type SolvedBone = {
22
+ /** Start x (px). */
23
+ x: number;
24
+ /** Start y (px). */
25
+ y: number;
26
+ /** End x (px). */
27
+ x2: number;
28
+ /** End y (px). */
29
+ y2: number;
30
+ /** World rotation (deg). */
31
+ angle: number;
32
+ };
33
+ /** Ordered list for safe FK traversal. */
34
+ export declare const BONE_ORDER: BoneKey[];
35
+ /** Default humanoid rig (proportions tuned for ~180px height). */
36
+ export declare const DEFAULT_RIG: RigConfig;
37
+ /** Neutral standing pose (deg). */
38
+ export declare const DEFAULT_POSE: RigPose;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export type ArmProps = {
3
+ colors: string[];
4
+ side: -1 | 1;
5
+ variant?: string;
6
+ scale?: number;
7
+ transform?: string;
8
+ strokeWidth?: number;
9
+ };
10
+ export declare const Arm: React.FC<ArmProps>;
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ export type EyesProps = {
3
+ colors: string[];
4
+ spread?: number;
5
+ y?: number;
6
+ scale?: number;
7
+ transform?: string;
8
+ eyebrows?: boolean;
9
+ };
10
+ export declare const EyesClassic: React.FC<EyesProps>;
11
+ export declare const EyesAnime: React.FC<EyesProps>;
12
+ export declare const EyesSleepy: React.FC<EyesProps>;
13
+ export declare const EyesSmile: React.FC<EyesProps>;
14
+ export declare const EYES_RENDERERS: Record<string, React.FC<EyesProps>>;
15
+ export declare const Eyes: React.FC<EyesProps & {
16
+ variant: string;
17
+ }>;
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ export type HairProps = {
3
+ colors: string[];
4
+ scale?: number;
5
+ transform?: string;
6
+ strokeWidth?: number;
7
+ };
8
+ export declare const HairNone: React.FC<HairProps>;
9
+ export declare const HairShort: React.FC<HairProps>;
10
+ export declare const HairLong: React.FC<HairProps>;
11
+ export declare const HairMohawk: React.FC<HairProps>;
12
+ export declare const HairAfro: React.FC<HairProps>;
13
+ export declare const HairBob: React.FC<HairProps>;
14
+ export declare const HAIR_RENDERERS: Record<string, React.FC<HairProps>>;
15
+ export declare const Hair: React.FC<HairProps & {
16
+ variant: string;
17
+ }>;