@nice2dev/ui-graphics 1.3.15 → 1.3.16

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 (294) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/animation/AnimatedPerson.js +470 -143
  3. package/dist/cjs/animation/AnimationEditor.js +289 -101
  4. package/dist/cjs/animation/Audience.js +83 -61
  5. package/dist/cjs/animation/BodyRenderer.js +69 -28
  6. package/dist/cjs/animation/animationHelper.js +281 -288
  7. package/dist/cjs/animation/characterTypes.js +200 -203
  8. package/dist/cjs/animation/choreoDSL.js +205 -219
  9. package/dist/cjs/animation/choreography.js +4 -32
  10. package/dist/cjs/animation/karaokeIntegration.js +68 -77
  11. package/dist/cjs/animation/lottieExport.js +108 -114
  12. package/dist/cjs/animation/motionPath.js +225 -248
  13. package/dist/cjs/animation/physics.js +227 -254
  14. package/dist/cjs/animation/rig/RigPlayer.js +53 -56
  15. package/dist/cjs/animation/rig/RiggedBody.js +71 -26
  16. package/dist/cjs/animation/rig/choreoRigBridge.js +72 -77
  17. package/dist/cjs/animation/rig/ik.js +13 -18
  18. package/dist/cjs/animation/rig/poseOps.js +34 -41
  19. package/dist/cjs/animation/rig/presets.js +64 -72
  20. package/dist/cjs/animation/rig/rigMath.js +25 -32
  21. package/dist/cjs/animation/rig/rigTypes.js +59 -63
  22. package/dist/cjs/animation/shapes/arms.js +31 -13
  23. package/dist/cjs/animation/shapes/eyes.js +129 -47
  24. package/dist/cjs/animation/shapes/hair.js +72 -45
  25. package/dist/cjs/animation/shapes/heads.js +131 -57
  26. package/dist/cjs/animation/shapes/headwear.js +47 -38
  27. package/dist/cjs/animation/shapes/legs.js +31 -13
  28. package/dist/cjs/animation/shapes/mouths.js +120 -44
  29. package/dist/cjs/animation/shapes/noses.js +80 -25
  30. package/dist/cjs/animation/shapes/outfits.js +101 -39
  31. package/dist/cjs/animation/shapes/torsos.js +15 -11
  32. package/dist/cjs/animation/spineExport.js +103 -121
  33. package/dist/cjs/core/LocalUI.js +108 -43
  34. package/dist/cjs/core/NiceBrushEngine.js +758 -552
  35. package/dist/cjs/core/collaboration.js +249 -251
  36. package/dist/cjs/core/colorBlindness.js +100 -115
  37. package/dist/cjs/core/dragDrop.js +155 -158
  38. package/dist/cjs/core/editorAsk.js +51 -41
  39. package/dist/cjs/core/fixes.js +140 -171
  40. package/dist/cjs/core/gridGuides.js +166 -201
  41. package/dist/cjs/core/historyVisual.js +156 -135
  42. package/dist/cjs/core/i18n.js +13 -14
  43. package/dist/cjs/core/integrations.js +238 -249
  44. package/dist/cjs/core/minimap.js +149 -151
  45. package/dist/cjs/core/plugins.js +98 -113
  46. package/dist/cjs/core/rtl.js +71 -83
  47. package/dist/cjs/core/shortcuts.js +196 -225
  48. package/dist/cjs/core/theme.js +142 -149
  49. package/dist/cjs/core/yjsCollaboration.js +232 -293
  50. package/dist/cjs/design/design-tools.js +12 -22
  51. package/dist/cjs/font/NiceFontEditor.js +877 -316
  52. package/dist/cjs/font/fontFormatUtils.js +388 -448
  53. package/dist/cjs/game/GameAsset2dEditor.js +1201 -392
  54. package/dist/cjs/game/GameAsset2dEditor.module.css.js +146 -5
  55. package/dist/cjs/game/gameAssetTypes.js +7 -16
  56. package/dist/cjs/game/gameAssetUtils.js +390 -413
  57. package/dist/cjs/game/useGameAssetEditor.js +820 -763
  58. package/dist/cjs/index.js +81 -84
  59. package/dist/cjs/nice2dev-ui-graphics.css +1 -1
  60. package/dist/cjs/node_modules/lib0/array.js +8 -70
  61. package/dist/cjs/node_modules/lib0/binary.js +3 -20
  62. package/dist/cjs/node_modules/lib0/broadcastchannel.js +24 -86
  63. package/dist/cjs/node_modules/lib0/buffer.js +15 -82
  64. package/dist/cjs/node_modules/lib0/conditions.js +3 -16
  65. package/dist/cjs/node_modules/lib0/decoding.js +108 -287
  66. package/dist/cjs/node_modules/lib0/dom.js +14 -44
  67. package/dist/cjs/node_modules/lib0/encoding.js +68 -418
  68. package/dist/cjs/node_modules/lib0/environment.js +26 -92
  69. package/dist/cjs/node_modules/lib0/error.js +5 -29
  70. package/dist/cjs/node_modules/lib0/function.js +27 -66
  71. package/dist/cjs/node_modules/lib0/iterator.js +8 -33
  72. package/dist/cjs/node_modules/lib0/logging.common.js +12 -22
  73. package/dist/cjs/node_modules/lib0/logging.js +32 -71
  74. package/dist/cjs/node_modules/lib0/map.js +16 -86
  75. package/dist/cjs/node_modules/lib0/math.js +3 -32
  76. package/dist/cjs/node_modules/lib0/number.js +4 -15
  77. package/dist/cjs/node_modules/lib0/object.js +14 -88
  78. package/dist/cjs/node_modules/lib0/observable.js +38 -78
  79. package/dist/cjs/node_modules/lib0/pair.js +3 -20
  80. package/dist/cjs/node_modules/lib0/prng.js +8 -77
  81. package/dist/cjs/node_modules/lib0/promise.js +6 -30
  82. package/dist/cjs/node_modules/lib0/random.js +8 -23
  83. package/dist/cjs/node_modules/lib0/schema.js +313 -687
  84. package/dist/cjs/node_modules/lib0/set.js +3 -10
  85. package/dist/cjs/node_modules/lib0/storage.js +20 -55
  86. package/dist/cjs/node_modules/lib0/string.js +17 -72
  87. package/dist/cjs/node_modules/lib0/symbol.js +2 -12
  88. package/dist/cjs/node_modules/lib0/time.js +2 -15
  89. package/dist/cjs/node_modules/lib0/trait/equality.js +3 -28
  90. package/dist/cjs/node_modules/lib0/url.js +4 -18
  91. package/dist/cjs/node_modules/lib0/webcrypto.js +2 -5
  92. package/dist/cjs/node_modules/y-protocols/auth.js +5 -19
  93. package/dist/cjs/node_modules/y-protocols/awareness.js +53 -116
  94. package/dist/cjs/node_modules/y-protocols/sync.js +16 -103
  95. package/dist/cjs/node_modules/y-websocket/src/y-websocket.js +77 -219
  96. package/dist/cjs/node_modules/yjs/dist/yjs.js +2128 -4868
  97. package/dist/cjs/photo/FilterThumb.js +37 -25
  98. package/dist/cjs/photo/NiceAITools.js +679 -467
  99. package/dist/cjs/photo/PhotoEditor.js +34 -20
  100. package/dist/cjs/photo/PhotoEditor.module.css.js +296 -5
  101. package/dist/cjs/photo/PhotoEditorCanvas.js +250 -91
  102. package/dist/cjs/photo/PhotoEditorLeftPanel.js +1086 -224
  103. package/dist/cjs/photo/PhotoEditorToolbar.js +135 -19
  104. package/dist/cjs/photo/photoEditorActions.js +89 -72
  105. package/dist/cjs/photo/photoEditorTypes.js +29 -32
  106. package/dist/cjs/photo/photoFilters.js +959 -985
  107. package/dist/cjs/photo/photoOverlays.js +899 -945
  108. package/dist/cjs/photo/photoSelection.js +427 -499
  109. package/dist/cjs/photo/usePhotoEditor.js +739 -741
  110. package/dist/cjs/pixel/HSVPicker.js +191 -175
  111. package/dist/cjs/pixel/PixelEditor.js +159 -48
  112. package/dist/cjs/pixel/PixelEditor.module.css.js +209 -5
  113. package/dist/cjs/pixel/PixelEditorCanvas.js +29 -16
  114. package/dist/cjs/pixel/PixelEditorMenuBar.js +160 -162
  115. package/dist/cjs/pixel/PixelEditorRightPanel.js +377 -45
  116. package/dist/cjs/pixel/PixelEditorStatusBar.js +47 -20
  117. package/dist/cjs/pixel/PixelEditorTimeline.js +106 -23
  118. package/dist/cjs/pixel/PixelEditorToolbar.js +99 -21
  119. package/dist/cjs/pixel/SpriteGeneratorPanel.js +483 -303
  120. package/dist/cjs/pixel/animalGeneratorPresets.js +776 -601
  121. package/dist/cjs/pixel/asepriteFormat.js +511 -560
  122. package/dist/cjs/pixel/buildingGeneratorPresets.js +693 -520
  123. package/dist/cjs/pixel/characterGeneratorPresets.js +644 -544
  124. package/dist/cjs/pixel/pixel-pro.js +52 -63
  125. package/dist/cjs/pixel/pixelEditorExports.js +388 -428
  126. package/dist/cjs/pixel/pixelEditorTypes.js +91 -108
  127. package/dist/cjs/pixel/pixelEditorUtils.js +519 -561
  128. package/dist/cjs/pixel/spriteGeneratorCore.js +206 -257
  129. package/dist/cjs/pixel/usePixelEditor.js +1321 -1343
  130. package/dist/cjs/texture/Nice3DTexturePainter.js +707 -440
  131. package/dist/cjs/ui/NiceUIDesigner.js +954 -527
  132. package/dist/cjs/vector/NiceSvgToCode.js +586 -446
  133. package/dist/cjs/vector/VectorEditor.js +290 -117
  134. package/dist/cjs/vector/VectorEditor.module.css.js +86 -5
  135. package/dist/cjs/vector/VectorEditorMenuBar.js +333 -275
  136. package/dist/cjs/vector/VectorEditorRightPanel.js +1094 -371
  137. package/dist/cjs/vector/VectorEditorShapeRenderer.js +198 -60
  138. package/dist/cjs/vector/VectorEditorStatusBar.js +39 -13
  139. package/dist/cjs/vector/useVectorEditor.js +848 -889
  140. package/dist/cjs/vector/vectorAnimation.js +110 -137
  141. package/dist/cjs/vector/vectorBooleanOps.js +398 -485
  142. package/dist/cjs/vector/vectorEditorExport.js +201 -203
  143. package/dist/cjs/vector/vectorEditorImport.js +173 -189
  144. package/dist/cjs/vector/vectorEditorTypes.js +42 -49
  145. package/dist/cjs/vector/vectorGradients.js +151 -174
  146. package/dist/cjs/vector/vectorIconExport.js +52 -59
  147. package/dist/cjs/vector/vectorIconImport.js +169 -219
  148. package/dist/esm/animation/AnimatedPerson.js +470 -141
  149. package/dist/esm/animation/AnimationEditor.js +290 -100
  150. package/dist/esm/animation/Audience.js +83 -59
  151. package/dist/esm/animation/BodyRenderer.js +71 -25
  152. package/dist/esm/animation/animationHelper.js +284 -287
  153. package/dist/esm/animation/characterTypes.js +204 -202
  154. package/dist/esm/animation/choreoDSL.js +212 -218
  155. package/dist/esm/animation/choreography.js +8 -31
  156. package/dist/esm/animation/karaokeIntegration.js +74 -76
  157. package/dist/esm/animation/lottieExport.js +112 -113
  158. package/dist/esm/animation/motionPath.js +235 -247
  159. package/dist/esm/animation/physics.js +235 -253
  160. package/dist/esm/animation/rig/RigPlayer.js +53 -54
  161. package/dist/esm/animation/rig/RiggedBody.js +71 -24
  162. package/dist/esm/animation/rig/choreoRigBridge.js +74 -76
  163. package/dist/esm/animation/rig/ik.js +14 -17
  164. package/dist/esm/animation/rig/poseOps.js +37 -40
  165. package/dist/esm/animation/rig/presets.js +70 -71
  166. package/dist/esm/animation/rig/rigMath.js +28 -31
  167. package/dist/esm/animation/rig/rigTypes.js +62 -62
  168. package/dist/esm/animation/shapes/arms.js +32 -12
  169. package/dist/esm/animation/shapes/eyes.js +135 -46
  170. package/dist/esm/animation/shapes/hair.js +80 -44
  171. package/dist/esm/animation/shapes/heads.js +140 -56
  172. package/dist/esm/animation/shapes/headwear.js +54 -37
  173. package/dist/esm/animation/shapes/legs.js +32 -12
  174. package/dist/esm/animation/shapes/mouths.js +127 -43
  175. package/dist/esm/animation/shapes/noses.js +87 -24
  176. package/dist/esm/animation/shapes/outfits.js +106 -38
  177. package/dist/esm/animation/shapes/torsos.js +16 -10
  178. package/dist/esm/animation/spineExport.js +106 -120
  179. package/dist/esm/core/LocalUI.js +111 -42
  180. package/dist/esm/core/NiceBrushEngine.js +761 -551
  181. package/dist/esm/core/collaboration.js +255 -250
  182. package/dist/esm/core/colorBlindness.js +106 -114
  183. package/dist/esm/core/dragDrop.js +157 -157
  184. package/dist/esm/core/editorAsk.js +53 -40
  185. package/dist/esm/core/fixes.js +145 -170
  186. package/dist/esm/core/gridGuides.js +178 -200
  187. package/dist/esm/core/historyVisual.js +158 -134
  188. package/dist/esm/core/i18n.js +15 -13
  189. package/dist/esm/core/integrations.js +244 -248
  190. package/dist/esm/core/minimap.js +151 -150
  191. package/dist/esm/core/plugins.js +102 -112
  192. package/dist/esm/core/rtl.js +77 -82
  193. package/dist/esm/core/shortcuts.js +200 -224
  194. package/dist/esm/core/theme.js +150 -148
  195. package/dist/esm/core/yjsCollaboration.js +240 -292
  196. package/dist/esm/design/design-tools.js +13 -21
  197. package/dist/esm/font/NiceFontEditor.js +880 -315
  198. package/dist/esm/font/fontFormatUtils.js +394 -447
  199. package/dist/esm/game/GameAsset2dEditor.js +1202 -391
  200. package/dist/esm/game/GameAsset2dEditor.module.css.js +146 -3
  201. package/dist/esm/game/gameAssetTypes.js +8 -15
  202. package/dist/esm/game/gameAssetUtils.js +408 -412
  203. package/dist/esm/game/useGameAssetEditor.js +821 -762
  204. package/dist/esm/index.js +332 -69
  205. package/dist/esm/nice2dev-ui-graphics.css +1 -1
  206. package/dist/esm/node_modules/lib0/array.js +15 -69
  207. package/dist/esm/node_modules/lib0/binary.js +14 -19
  208. package/dist/esm/node_modules/lib0/broadcastchannel.js +27 -85
  209. package/dist/esm/node_modules/lib0/buffer.js +20 -80
  210. package/dist/esm/node_modules/lib0/conditions.js +4 -15
  211. package/dist/esm/node_modules/lib0/decoding.js +128 -286
  212. package/dist/esm/node_modules/lib0/dom.js +20 -43
  213. package/dist/esm/node_modules/lib0/encoding.js +90 -415
  214. package/dist/esm/node_modules/lib0/environment.js +33 -91
  215. package/dist/esm/node_modules/lib0/error.js +8 -28
  216. package/dist/esm/node_modules/lib0/function.js +31 -65
  217. package/dist/esm/node_modules/lib0/iterator.js +11 -32
  218. package/dist/esm/node_modules/lib0/logging.common.js +22 -21
  219. package/dist/esm/node_modules/lib0/logging.js +44 -70
  220. package/dist/esm/node_modules/lib0/map.js +21 -85
  221. package/dist/esm/node_modules/lib0/math.js +9 -31
  222. package/dist/esm/node_modules/lib0/number.js +7 -14
  223. package/dist/esm/node_modules/lib0/object.js +26 -87
  224. package/dist/esm/node_modules/lib0/observable.js +40 -77
  225. package/dist/esm/node_modules/lib0/pair.js +5 -19
  226. package/dist/esm/node_modules/lib0/prng.js +15 -76
  227. package/dist/esm/node_modules/lib0/promise.js +7 -29
  228. package/dist/esm/node_modules/lib0/random.js +10 -22
  229. package/dist/esm/node_modules/lib0/schema.js +367 -686
  230. package/dist/esm/node_modules/lib0/set.js +4 -9
  231. package/dist/esm/node_modules/lib0/storage.js +23 -54
  232. package/dist/esm/node_modules/lib0/string.js +26 -71
  233. package/dist/esm/node_modules/lib0/symbol.js +3 -11
  234. package/dist/esm/node_modules/lib0/time.js +3 -14
  235. package/dist/esm/node_modules/lib0/trait/equality.js +5 -27
  236. package/dist/esm/node_modules/lib0/url.js +5 -17
  237. package/dist/esm/node_modules/lib0/webcrypto.js +3 -4
  238. package/dist/esm/node_modules/y-protocols/auth.js +7 -18
  239. package/dist/esm/node_modules/y-protocols/awareness.js +58 -115
  240. package/dist/esm/node_modules/y-protocols/sync.js +26 -102
  241. package/dist/esm/node_modules/y-websocket/src/y-websocket.js +82 -218
  242. package/dist/esm/node_modules/yjs/dist/yjs.js +2263 -4899
  243. package/dist/esm/photo/FilterThumb.js +37 -23
  244. package/dist/esm/photo/NiceAITools.js +685 -466
  245. package/dist/esm/photo/PhotoEditor.js +34 -18
  246. package/dist/esm/photo/PhotoEditor.module.css.js +296 -3
  247. package/dist/esm/photo/PhotoEditorCanvas.js +250 -89
  248. package/dist/esm/photo/PhotoEditorLeftPanel.js +1086 -222
  249. package/dist/esm/photo/PhotoEditorToolbar.js +135 -17
  250. package/dist/esm/photo/photoEditorActions.js +93 -71
  251. package/dist/esm/photo/photoEditorTypes.js +32 -31
  252. package/dist/esm/photo/photoFilters.js +967 -984
  253. package/dist/esm/photo/photoOverlays.js +913 -944
  254. package/dist/esm/photo/photoSelection.js +438 -498
  255. package/dist/esm/photo/usePhotoEditor.js +740 -740
  256. package/dist/esm/pixel/HSVPicker.js +192 -174
  257. package/dist/esm/pixel/PixelEditor.js +160 -47
  258. package/dist/esm/pixel/PixelEditor.module.css.js +209 -3
  259. package/dist/esm/pixel/PixelEditorCanvas.js +29 -14
  260. package/dist/esm/pixel/PixelEditorMenuBar.js +160 -160
  261. package/dist/esm/pixel/PixelEditorRightPanel.js +377 -43
  262. package/dist/esm/pixel/PixelEditorStatusBar.js +47 -18
  263. package/dist/esm/pixel/PixelEditorTimeline.js +106 -21
  264. package/dist/esm/pixel/PixelEditorToolbar.js +99 -19
  265. package/dist/esm/pixel/SpriteGeneratorPanel.js +483 -301
  266. package/dist/esm/pixel/animalGeneratorPresets.js +782 -600
  267. package/dist/esm/pixel/asepriteFormat.js +517 -559
  268. package/dist/esm/pixel/buildingGeneratorPresets.js +699 -519
  269. package/dist/esm/pixel/characterGeneratorPresets.js +650 -543
  270. package/dist/esm/pixel/pixel-pro.js +53 -62
  271. package/dist/esm/pixel/pixelEditorExports.js +397 -427
  272. package/dist/esm/pixel/pixelEditorTypes.js +103 -107
  273. package/dist/esm/pixel/pixelEditorUtils.js +551 -560
  274. package/dist/esm/pixel/spriteGeneratorCore.js +223 -256
  275. package/dist/esm/pixel/usePixelEditor.js +1322 -1342
  276. package/dist/esm/texture/Nice3DTexturePainter.js +709 -439
  277. package/dist/esm/ui/NiceUIDesigner.js +957 -526
  278. package/dist/esm/vector/NiceSvgToCode.js +589 -445
  279. package/dist/esm/vector/VectorEditor.js +291 -116
  280. package/dist/esm/vector/VectorEditor.module.css.js +86 -3
  281. package/dist/esm/vector/VectorEditorMenuBar.js +333 -273
  282. package/dist/esm/vector/VectorEditorRightPanel.js +1094 -369
  283. package/dist/esm/vector/VectorEditorShapeRenderer.js +199 -59
  284. package/dist/esm/vector/VectorEditorStatusBar.js +39 -11
  285. package/dist/esm/vector/useVectorEditor.js +849 -888
  286. package/dist/esm/vector/vectorAnimation.js +115 -136
  287. package/dist/esm/vector/vectorBooleanOps.js +401 -484
  288. package/dist/esm/vector/vectorEditorExport.js +207 -202
  289. package/dist/esm/vector/vectorEditorImport.js +174 -188
  290. package/dist/esm/vector/vectorEditorTypes.js +50 -48
  291. package/dist/esm/vector/vectorGradients.js +158 -173
  292. package/dist/esm/vector/vectorIconExport.js +53 -58
  293. package/dist/esm/vector/vectorIconImport.js +171 -218
  294. package/package.json +9 -15
@@ -1,569 +1,742 @@
1
- 'use strict';
2
-
3
- var spriteGeneratorCore = require('./spriteGeneratorCore.js');
4
-
5
- /**
6
- * buildingGeneratorPresets.ts — Modular building generator.
7
- *
8
- * Buildings are assembled from stackable floors: foundation, wall floors,
9
- * roof. Each floor has layout, style and colour options.
10
- * Doors, windows, chimneys are placed as decoration parts.
11
- */
12
- /* ════════════════════════════════════════════════════════════════
13
- COLOUR PALETTES
14
- ════════════════════════════════════════════════════════════════ */
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const spriteGeneratorCore = require("./spriteGeneratorCore.js");
15
4
  const WALL_PALETTES = {
16
- stone: ['var(--nice-text-muted, #a0a0a0)', 'var(--nice-text-secondary, #808080)', '#606060', 'var(--nice-border, #404040)'],
17
- brick: ['#c06040', '#a04830', '#803020', '#602018'],
18
- wood: ['#c09060', '#a07848', '#806038', '#604828'],
19
- sandstone: ['#e0c890', '#c8b070', '#b09850', '#988038'],
20
- marble: ['var(--nice-bg-secondary, #f0f0f0)', '#d8d8e0', 'var(--nice-border, #c0c0c8)', '#a8a8b0'],
21
- darkStone: ['#585860', '#404048', '#303038', '#202028'],
5
+ stone: ["var(--nice-text-muted, #a0a0a0)", "var(--nice-text-secondary, #808080)", "#606060", "var(--nice-border, #404040)"],
6
+ brick: ["#c06040", "#a04830", "#803020", "#602018"],
7
+ wood: ["#c09060", "#a07848", "#806038", "#604828"],
8
+ sandstone: ["#e0c890", "#c8b070", "#b09850", "#988038"],
9
+ marble: ["var(--nice-bg-secondary, #f0f0f0)", "#d8d8e0", "var(--nice-border, #c0c0c8)", "#a8a8b0"],
10
+ darkStone: ["#585860", "#404048", "#303038", "#202028"]
22
11
  };
23
12
  const ROOF_PALETTES = {
24
- redTile: ['#c04030', '#a03020', '#802018', '#601010'],
25
- darkTile: ['#505058', '#404048', '#303038', '#202028'],
26
- thatch: ['#c0a040', '#a08830', '#807020', '#605818'],
27
- blue: ['#4060b0', '#304890', '#203870', '#182850'],
28
- green: ['#408040', '#306830', '#205020', '#103810'],
13
+ redTile: ["#c04030", "#a03020", "#802018", "#601010"],
14
+ darkTile: ["#505058", "#404048", "#303038", "#202028"],
15
+ thatch: ["#c0a040", "#a08830", "#807020", "#605818"],
16
+ blue: ["#4060b0", "#304890", "#203870", "#182850"],
17
+ green: ["#408040", "#306830", "#205020", "#103810"]
29
18
  };
30
- /* ════════════════════════════════════════════════════════════════
31
- BUILDING PARTS — transparent shorthand
32
- ════════════════════════════════════════════════════════════════ */
33
19
  const _ = -1;
34
- /* ── Foundations ── */
35
20
  const FOUNDATION_STONE = /* @__PURE__ */ spriteGeneratorCore.createPartData(16, 4, [
36
- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
37
- [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0],
38
- [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0],
39
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
40
- ], ['var(--nice-text-muted, #a0a0a0)', '#606060']);
21
+ [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
22
+ [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0],
23
+ [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0],
24
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
25
+ ], ["var(--nice-text-muted, #a0a0a0)", "#606060"]);
41
26
  const FOUNDATION_BRICK = /* @__PURE__ */ spriteGeneratorCore.createPartData(16, 4, [
42
- [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0],
43
- [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0],
44
- [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0],
45
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
46
- ], ['#c06040', '#803020']);
27
+ [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0],
28
+ [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0],
29
+ [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0],
30
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
31
+ ], ["#c06040", "#803020"]);
47
32
  const FOUNDATION_WOOD = /* @__PURE__ */ spriteGeneratorCore.createPartData(16, 3, [
48
- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
49
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
50
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
51
- ], ['#c09060', '#604828']);
52
- /* ── Wall sections (one floor height) ── */
33
+ [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
34
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
35
+ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
36
+ ], ["#c09060", "#604828"]);
53
37
  const WALL_STONE_SECTION = /* @__PURE__ */ spriteGeneratorCore.createPartData(16, 8, [
54
- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
55
- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
56
- [0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0],
57
- [0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0],
58
- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
59
- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
60
- [0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0],
61
- [0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0],
62
- ], ['var(--nice-text-muted, #a0a0a0)', 'var(--nice-text-secondary, #808080)', '#606060']);
38
+ [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
39
+ [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
40
+ [0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0],
41
+ [0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0],
42
+ [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
43
+ [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
44
+ [0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0],
45
+ [0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0]
46
+ ], ["var(--nice-text-muted, #a0a0a0)", "var(--nice-text-secondary, #808080)", "#606060"]);
63
47
  const WALL_BRICK_SECTION = /* @__PURE__ */ spriteGeneratorCore.createPartData(16, 8, [
64
- [2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0],
65
- [0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0],
66
- [2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0],
67
- [0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0],
68
- [2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0],
69
- [0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0],
70
- [2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0],
71
- [0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0],
72
- ], ['#c06040', '#a04830', '#803020']);
48
+ [2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0],
49
+ [0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0],
50
+ [2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0],
51
+ [0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0],
52
+ [2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0],
53
+ [0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0],
54
+ [2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0],
55
+ [0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0]
56
+ ], ["#c06040", "#a04830", "#803020"]);
73
57
  const WALL_WOOD_SECTION = /* @__PURE__ */ spriteGeneratorCore.createPartData(16, 8, [
74
- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
75
- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
76
- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
77
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
78
- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
79
- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
80
- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
81
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
82
- ], ['#c09060', '#806038']);
58
+ [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
59
+ [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
60
+ [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
61
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
62
+ [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
63
+ [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
64
+ [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
65
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
66
+ ], ["#c09060", "#806038"]);
83
67
  const WALL_HALFTIMBER_SECTION = /* @__PURE__ */ spriteGeneratorCore.createPartData(16, 8, [
84
- [2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2],
85
- [2, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 2],
86
- [2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2],
87
- [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
88
- [2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2],
89
- [2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2],
90
- [2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2],
91
- [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
92
- ], ['#f0e8d0', '#e0d8c0', '#806038']);
93
- /* ── Roofs ── */
68
+ [2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2],
69
+ [2, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 2],
70
+ [2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2],
71
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
72
+ [2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2],
73
+ [2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2],
74
+ [2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2],
75
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
76
+ ], ["#f0e8d0", "#e0d8c0", "#806038"]);
94
77
  const ROOF_TRIANGLE = /* @__PURE__ */ spriteGeneratorCore.createPartData(20, 8, [
95
- [_, _, _, _, _, _, _, _, _, 0, 0, _, _, _, _, _, _, _, _, _],
96
- [_, _, _, _, _, _, _, _, 0, 1, 1, 0, _, _, _, _, _, _, _, _],
97
- [_, _, _, _, _, _, _, 0, 1, 1, 1, 1, 0, _, _, _, _, _, _, _],
98
- [_, _, _, _, _, _, 0, 1, 1, 1, 1, 1, 1, 0, _, _, _, _, _, _],
99
- [_, _, _, _, _, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, _, _, _, _, _],
100
- [_, _, _, _, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, _, _, _, _],
101
- [_, _, _, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, _, _, _],
102
- [_, _, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, _, _],
103
- ], ['#c04030', '#a03020', '#602018']);
78
+ [_, _, _, _, _, _, _, _, _, 0, 0, _, _, _, _, _, _, _, _, _],
79
+ [_, _, _, _, _, _, _, _, 0, 1, 1, 0, _, _, _, _, _, _, _, _],
80
+ [_, _, _, _, _, _, _, 0, 1, 1, 1, 1, 0, _, _, _, _, _, _, _],
81
+ [_, _, _, _, _, _, 0, 1, 1, 1, 1, 1, 1, 0, _, _, _, _, _, _],
82
+ [_, _, _, _, _, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, _, _, _, _, _],
83
+ [_, _, _, _, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, _, _, _, _],
84
+ [_, _, _, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, _, _, _],
85
+ [_, _, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, _, _]
86
+ ], ["#c04030", "#a03020", "#602018"]);
104
87
  const ROOF_FLAT = /* @__PURE__ */ spriteGeneratorCore.createPartData(18, 4, [
105
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
106
- [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
107
- [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
108
- [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
109
- ], ['#505058', '#404048', '#303038']);
88
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
89
+ [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
90
+ [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
91
+ [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
92
+ ], ["#505058", "#404048", "#303038"]);
110
93
  const ROOF_PAGODA = /* @__PURE__ */ spriteGeneratorCore.createPartData(22, 6, [
111
- [_, _, _, _, _, _, _, _, _, _, 0, 0, _, _, _, _, _, _, _, _, _, _],
112
- [_, _, _, _, _, _, _, _, 0, 0, 1, 1, 0, 0, _, _, _, _, _, _, _, _],
113
- [_, _, _, _, _, _, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, _, _, _, _, _, _],
114
- [_, _, _, _, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, _, _, _, _],
115
- [_, _, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, _, _],
116
- [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
117
- ], ['#c04030', '#a03020', '#602018']);
94
+ [_, _, _, _, _, _, _, _, _, _, 0, 0, _, _, _, _, _, _, _, _, _, _],
95
+ [_, _, _, _, _, _, _, _, 0, 0, 1, 1, 0, 0, _, _, _, _, _, _, _, _],
96
+ [_, _, _, _, _, _, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, _, _, _, _, _, _],
97
+ [_, _, _, _, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, _, _, _, _],
98
+ [_, _, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, _, _],
99
+ [0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0]
100
+ ], ["#c04030", "#a03020", "#602018"]);
118
101
  const ROOF_DOME = /* @__PURE__ */ spriteGeneratorCore.createPartData(18, 8, [
119
- [_, _, _, _, _, _, _, 0, 0, 0, 0, _, _, _, _, _, _, _],
120
- [_, _, _, _, _, 0, 0, 1, 1, 1, 1, 0, 0, _, _, _, _, _],
121
- [_, _, _, _, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, _, _, _, _],
122
- [_, _, _, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, _, _, _],
123
- [_, _, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, _, _],
124
- [_, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, _],
125
- [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
126
- [0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0],
127
- ], ['#4060b0', '#304890', '#203870']);
128
- /* ── Doors ── */
102
+ [_, _, _, _, _, _, _, 0, 0, 0, 0, _, _, _, _, _, _, _],
103
+ [_, _, _, _, _, 0, 0, 1, 1, 1, 1, 0, 0, _, _, _, _, _],
104
+ [_, _, _, _, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, _, _, _, _],
105
+ [_, _, _, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, _, _, _],
106
+ [_, _, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, _, _],
107
+ [_, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, _],
108
+ [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
109
+ [0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0]
110
+ ], ["#4060b0", "#304890", "#203870"]);
129
111
  const DOOR_WOOD = /* @__PURE__ */ spriteGeneratorCore.createPartData(4, 6, [
130
- [_, 0, 0, _],
131
- [0, 1, 1, 0],
132
- [0, 1, 1, 0],
133
- [0, 1, 2, 0],
134
- [0, 1, 1, 0],
135
- [0, 1, 1, 0],
136
- ], ['#604828', '#c09060', '#f0d060']);
112
+ [_, 0, 0, _],
113
+ [0, 1, 1, 0],
114
+ [0, 1, 1, 0],
115
+ [0, 1, 2, 0],
116
+ [0, 1, 1, 0],
117
+ [0, 1, 1, 0]
118
+ ], ["#604828", "#c09060", "#f0d060"]);
137
119
  const DOOR_ARCH = /* @__PURE__ */ spriteGeneratorCore.createPartData(6, 8, [
138
- [_, _, 0, 0, _, _],
139
- [_, 0, 1, 1, 0, _],
140
- [0, 1, 1, 1, 1, 0],
141
- [0, 1, 1, 1, 1, 0],
142
- [0, 1, 1, 1, 1, 0],
143
- [0, 1, 1, 2, 1, 0],
144
- [0, 1, 1, 1, 1, 0],
145
- [0, 1, 1, 1, 1, 0],
146
- ], ['#604828', '#a07848', '#f0d060']);
120
+ [_, _, 0, 0, _, _],
121
+ [_, 0, 1, 1, 0, _],
122
+ [0, 1, 1, 1, 1, 0],
123
+ [0, 1, 1, 1, 1, 0],
124
+ [0, 1, 1, 1, 1, 0],
125
+ [0, 1, 1, 2, 1, 0],
126
+ [0, 1, 1, 1, 1, 0],
127
+ [0, 1, 1, 1, 1, 0]
128
+ ], ["#604828", "#a07848", "#f0d060"]);
147
129
  const DOOR_DOUBLE = /* @__PURE__ */ spriteGeneratorCore.createPartData(8, 7, [
148
- [_, 0, 0, 0, 0, 0, 0, _],
149
- [0, 1, 1, 0, 0, 1, 1, 0],
150
- [0, 1, 1, 0, 0, 1, 1, 0],
151
- [0, 1, 2, 0, 0, 2, 1, 0],
152
- [0, 1, 1, 0, 0, 1, 1, 0],
153
- [0, 1, 1, 0, 0, 1, 1, 0],
154
- [0, 0, 0, 0, 0, 0, 0, 0],
155
- ], ['#604828', '#c09060', '#f0d060']);
156
- /* ── Windows ── */
130
+ [_, 0, 0, 0, 0, 0, 0, _],
131
+ [0, 1, 1, 0, 0, 1, 1, 0],
132
+ [0, 1, 1, 0, 0, 1, 1, 0],
133
+ [0, 1, 2, 0, 0, 2, 1, 0],
134
+ [0, 1, 1, 0, 0, 1, 1, 0],
135
+ [0, 1, 1, 0, 0, 1, 1, 0],
136
+ [0, 0, 0, 0, 0, 0, 0, 0]
137
+ ], ["#604828", "#c09060", "#f0d060"]);
157
138
  const WINDOW_SIMPLE = /* @__PURE__ */ spriteGeneratorCore.createPartData(4, 4, [
158
- [0, 0, 0, 0],
159
- [0, 1, 1, 0],
160
- [0, 1, 1, 0],
161
- [0, 0, 0, 0],
162
- ], ['var(--nice-border, #404040)', '#88c8ff']);
139
+ [0, 0, 0, 0],
140
+ [0, 1, 1, 0],
141
+ [0, 1, 1, 0],
142
+ [0, 0, 0, 0]
143
+ ], ["var(--nice-border, #404040)", "#88c8ff"]);
163
144
  const WINDOW_CROSS = /* @__PURE__ */ spriteGeneratorCore.createPartData(4, 4, [
164
- [0, 0, 0, 0],
165
- [0, 1, 0, 1],
166
- [0, 0, 0, 0],
167
- [0, 1, 0, 1],
168
- ], ['var(--nice-border, #404040)', '#88c8ff']);
145
+ [0, 0, 0, 0],
146
+ [0, 1, 0, 1],
147
+ [0, 0, 0, 0],
148
+ [0, 1, 0, 1]
149
+ ], ["var(--nice-border, #404040)", "#88c8ff"]);
169
150
  const WINDOW_ARCH = /* @__PURE__ */ spriteGeneratorCore.createPartData(4, 5, [
170
- [_, 0, 0, _],
171
- [0, 1, 1, 0],
172
- [0, 1, 1, 0],
173
- [0, 0, 0, 0],
174
- [0, 1, 1, 0],
175
- ], ['var(--nice-border, #404040)', '#88c8ff']);
151
+ [_, 0, 0, _],
152
+ [0, 1, 1, 0],
153
+ [0, 1, 1, 0],
154
+ [0, 0, 0, 0],
155
+ [0, 1, 1, 0]
156
+ ], ["var(--nice-border, #404040)", "#88c8ff"]);
176
157
  const WINDOW_ROUND = /* @__PURE__ */ spriteGeneratorCore.createPartData(4, 4, [
177
- [_, 0, 0, _],
178
- [0, 1, 1, 0],
179
- [0, 1, 1, 0],
180
- [_, 0, 0, _],
181
- ], ['var(--nice-border, #404040)', '#88c8ff']);
182
- /* ── Chimneys ── */
158
+ [_, 0, 0, _],
159
+ [0, 1, 1, 0],
160
+ [0, 1, 1, 0],
161
+ [_, 0, 0, _]
162
+ ], ["var(--nice-border, #404040)", "#88c8ff"]);
183
163
  const CHIMNEY_BRICK = /* @__PURE__ */ spriteGeneratorCore.createPartData(4, 6, [
184
- [_, 2, 2, _],
185
- [0, 0, 0, 0],
186
- [0, 1, 1, 0],
187
- [0, 1, 1, 0],
188
- [0, 1, 1, 0],
189
- [0, 0, 0, 0],
190
- ], ['#c06040', '#a04830', '#606060']);
164
+ [_, 2, 2, _],
165
+ [0, 0, 0, 0],
166
+ [0, 1, 1, 0],
167
+ [0, 1, 1, 0],
168
+ [0, 1, 1, 0],
169
+ [0, 0, 0, 0]
170
+ ], ["#c06040", "#a04830", "#606060"]);
191
171
  const CHIMNEY_STONE = /* @__PURE__ */ spriteGeneratorCore.createPartData(3, 5, [
192
- [_, 2, _],
193
- [0, 0, 0],
194
- [0, 1, 0],
195
- [0, 1, 0],
196
- [0, 0, 0],
197
- ], ['var(--nice-text-secondary, #808080)', 'var(--nice-text-muted, #a0a0a0)', '#505050']);
198
- /* ── Decorations ── */
172
+ [_, 2, _],
173
+ [0, 0, 0],
174
+ [0, 1, 0],
175
+ [0, 1, 0],
176
+ [0, 0, 0]
177
+ ], ["var(--nice-text-secondary, #808080)", "var(--nice-text-muted, #a0a0a0)", "#505050"]);
199
178
  const BALCONY = /* @__PURE__ */ spriteGeneratorCore.createPartData(8, 3, [
200
- [0, 0, 0, 0, 0, 0, 0, 0],
201
- [0, _, 0, _, _, 0, _, 0],
202
- [0, 0, 0, 0, 0, 0, 0, 0],
203
- ], ['var(--nice-text-secondary, #808080)']);
179
+ [0, 0, 0, 0, 0, 0, 0, 0],
180
+ [0, _, 0, _, _, 0, _, 0],
181
+ [0, 0, 0, 0, 0, 0, 0, 0]
182
+ ], ["var(--nice-text-secondary, #808080)"]);
204
183
  const BANNER = /* @__PURE__ */ spriteGeneratorCore.createPartData(4, 6, [
205
- [_, 0, 0, _],
206
- [_, 1, 1, _],
207
- [_, 1, 1, _],
208
- [_, 1, 1, _],
209
- [_, 1, 1, _],
210
- [_, _, 1, _],
211
- ], ['#806038', '#d04040']);
184
+ [_, 0, 0, _],
185
+ [_, 1, 1, _],
186
+ [_, 1, 1, _],
187
+ [_, 1, 1, _],
188
+ [_, 1, 1, _],
189
+ [_, _, 1, _]
190
+ ], ["#806038", "#d04040"]);
212
191
  const TOWER_TOP = /* @__PURE__ */ spriteGeneratorCore.createPartData(8, 4, [
213
- [0, _, 0, _, 0, _, 0, _],
214
- [0, 0, 0, 0, 0, 0, 0, 0],
215
- [0, 1, 1, 1, 1, 1, 1, 0],
216
- [0, 1, 1, 1, 1, 1, 1, 0],
217
- ], ['var(--nice-text-secondary, #808080)', 'var(--nice-text-muted, #a0a0a0)']);
192
+ [0, _, 0, _, 0, _, 0, _],
193
+ [0, 0, 0, 0, 0, 0, 0, 0],
194
+ [0, 1, 1, 1, 1, 1, 1, 0],
195
+ [0, 1, 1, 1, 1, 1, 1, 0]
196
+ ], ["var(--nice-text-secondary, #808080)", "var(--nice-text-muted, #a0a0a0)"]);
218
197
  const SHOP_AWNING = /* @__PURE__ */ spriteGeneratorCore.createPartData(14, 4, [
219
- [_, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _],
220
- [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
221
- [_, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, _],
222
- [_, _, 0, _, 0, _, 0, _, 0, _, 0, _, _, _],
223
- ], ['#d04040', 'var(--nice-bg-secondary, #f0f0f0)']);
224
- /* ════════════════════════════════════════════════════════════════
225
- REGISTER BUILDING PARTS
226
- ════════════════════════════════════════════════════════════════ */
198
+ [_, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _],
199
+ [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
200
+ [_, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, _],
201
+ [_, _, 0, _, 0, _, 0, _, 0, _, 0, _, _, _]
202
+ ], ["#d04040", "var(--nice-bg-secondary, #f0f0f0)"]);
227
203
  const BUILDING_PARTS = [
228
- // ── Foundations ──
229
- {
230
- id: 'foundation-stone', name: 'Stone Foundation', category: 'foundation', slot: 'foundation',
231
- anchorX: 8, anchorY: 0, zOrder: 0, tags: ['stone', 'foundation'],
232
- pixels: { S: FOUNDATION_STONE }, recolorableIndices: [0, 1],
233
- },
234
- {
235
- id: 'foundation-brick', name: 'Brick Foundation', category: 'foundation', slot: 'foundation',
236
- anchorX: 8, anchorY: 0, zOrder: 0, tags: ['brick', 'foundation'],
237
- pixels: { S: FOUNDATION_BRICK }, recolorableIndices: [0, 1],
238
- },
239
- {
240
- id: 'foundation-wood', name: 'Wood Foundation', category: 'foundation', slot: 'foundation',
241
- anchorX: 8, anchorY: 0, zOrder: 0, tags: ['wood', 'foundation'],
242
- pixels: { S: FOUNDATION_WOOD }, recolorableIndices: [0, 1],
243
- },
244
- // ── Walls ──
245
- {
246
- id: 'wall-stone', name: 'Stone Wall', category: 'wall', slot: 'wall',
247
- anchorX: 8, anchorY: 0, zOrder: 1, tags: ['stone', 'wall'],
248
- pixels: { S: WALL_STONE_SECTION }, recolorableIndices: [0, 1, 2],
249
- },
250
- {
251
- id: 'wall-brick', name: 'Brick Wall', category: 'wall', slot: 'wall',
252
- anchorX: 8, anchorY: 0, zOrder: 1, tags: ['brick', 'wall'],
253
- pixels: { S: WALL_BRICK_SECTION }, recolorableIndices: [0, 1, 2],
254
- },
255
- {
256
- id: 'wall-wood', name: 'Wood Wall', category: 'wall', slot: 'wall',
257
- anchorX: 8, anchorY: 0, zOrder: 1, tags: ['wood', 'wall'],
258
- pixels: { S: WALL_WOOD_SECTION }, recolorableIndices: [0, 1],
259
- },
260
- {
261
- id: 'wall-halftimber', name: 'Half-timber Wall', category: 'wall', slot: 'wall',
262
- anchorX: 8, anchorY: 0, zOrder: 1, tags: ['halftimber', 'medieval', 'wall'],
263
- pixels: { S: WALL_HALFTIMBER_SECTION }, recolorableIndices: [0, 1, 2],
264
- },
265
- // ── Roofs ──
266
- {
267
- id: 'roof-triangle', name: 'Triangle Roof', category: 'roof', slot: 'roof',
268
- anchorX: 10, anchorY: 7, zOrder: 10, tags: ['triangle', 'classic'],
269
- pixels: { S: ROOF_TRIANGLE }, recolorableIndices: [0, 1, 2],
270
- },
271
- {
272
- id: 'roof-flat', name: 'Flat Roof', category: 'roof', slot: 'roof',
273
- anchorX: 9, anchorY: 3, zOrder: 10, tags: ['flat', 'modern'],
274
- pixels: { S: ROOF_FLAT }, recolorableIndices: [0, 1, 2],
275
- },
276
- {
277
- id: 'roof-pagoda', name: 'Pagoda Roof', category: 'roof', slot: 'roof',
278
- anchorX: 11, anchorY: 5, zOrder: 10, tags: ['pagoda', 'asian', 'curved'],
279
- pixels: { S: ROOF_PAGODA }, recolorableIndices: [0, 1, 2],
280
- },
281
- {
282
- id: 'roof-dome', name: 'Dome Roof', category: 'roof', slot: 'roof',
283
- anchorX: 9, anchorY: 7, zOrder: 10, tags: ['dome', 'round', 'church'],
284
- pixels: { S: ROOF_DOME }, recolorableIndices: [0, 1, 2],
285
- },
286
- // ── Doors ──
287
- {
288
- id: 'door-wood', name: 'Wooden Door', category: 'door', slot: 'door',
289
- anchorX: 2, anchorY: 0, zOrder: 5, tags: ['wood', 'simple'],
290
- pixels: { S: DOOR_WOOD }, recolorableIndices: [0, 1, 2],
291
- },
292
- {
293
- id: 'door-arch', name: 'Arch Door', category: 'door', slot: 'door',
294
- anchorX: 3, anchorY: 0, zOrder: 5, tags: ['arch', 'medieval'],
295
- pixels: { S: DOOR_ARCH }, recolorableIndices: [0, 1, 2],
296
- },
297
- {
298
- id: 'door-double', name: 'Double Door', category: 'door', slot: 'door',
299
- anchorX: 4, anchorY: 0, zOrder: 5, tags: ['double', 'grand'],
300
- pixels: { S: DOOR_DOUBLE }, recolorableIndices: [0, 1, 2],
301
- },
302
- // ── Windows ──
303
- {
304
- id: 'window-simple', name: 'Simple Window', category: 'window', slot: 'window',
305
- anchorX: 2, anchorY: 2, zOrder: 5, tags: ['simple', 'basic'],
306
- pixels: { S: WINDOW_SIMPLE }, recolorableIndices: [0, 1],
307
- },
308
- {
309
- id: 'window-cross', name: 'Cross Window', category: 'window', slot: 'window',
310
- anchorX: 2, anchorY: 2, zOrder: 5, tags: ['cross', 'medieval'],
311
- pixels: { S: WINDOW_CROSS }, recolorableIndices: [0, 1],
312
- },
313
- {
314
- id: 'window-arch', name: 'Arch Window', category: 'window', slot: 'window',
315
- anchorX: 2, anchorY: 2, zOrder: 5, tags: ['arch', 'gothic'],
316
- pixels: { S: WINDOW_ARCH }, recolorableIndices: [0, 1],
317
- },
318
- {
319
- id: 'window-round', name: 'Round Window', category: 'window', slot: 'window',
320
- anchorX: 2, anchorY: 2, zOrder: 5, tags: ['round', 'porthole'],
321
- pixels: { S: WINDOW_ROUND }, recolorableIndices: [0, 1],
322
- },
323
- // ── Chimneys ──
324
- {
325
- id: 'chimney-brick', name: 'Brick Chimney', category: 'chimney', slot: 'chimney',
326
- anchorX: 2, anchorY: 5, zOrder: 12, tags: ['brick', 'chimney'],
327
- pixels: { S: CHIMNEY_BRICK }, recolorableIndices: [0, 1, 2],
328
- },
329
- {
330
- id: 'chimney-stone', name: 'Stone Chimney', category: 'chimney', slot: 'chimney',
331
- anchorX: 1, anchorY: 4, zOrder: 12, tags: ['stone', 'chimney'],
332
- pixels: { S: CHIMNEY_STONE }, recolorableIndices: [0, 1, 2],
333
- },
334
- // ── Decorations ──
335
- {
336
- id: 'deco-balcony', name: 'Balcony', category: 'decoration', slot: 'wall',
337
- anchorX: 4, anchorY: 0, zOrder: 6, tags: ['balcony', 'decoration'],
338
- pixels: { S: BALCONY }, recolorableIndices: [0],
339
- },
340
- {
341
- id: 'deco-banner', name: 'Banner', category: 'decoration', slot: 'wall',
342
- anchorX: 2, anchorY: 0, zOrder: 7, tags: ['banner', 'decoration', 'flag'],
343
- pixels: { S: BANNER }, recolorableIndices: [0, 1],
344
- },
345
- {
346
- id: 'deco-tower-top', name: 'Tower Battlements', category: 'decoration', slot: 'roof',
347
- anchorX: 4, anchorY: 3, zOrder: 11, tags: ['tower', 'castle', 'battlements'],
348
- pixels: { S: TOWER_TOP }, recolorableIndices: [0, 1],
349
- },
350
- {
351
- id: 'deco-shop-awning', name: 'Shop Awning', category: 'decoration', slot: 'wall',
352
- anchorX: 7, anchorY: 0, zOrder: 6, tags: ['shop', 'awning', 'market'],
353
- pixels: { S: SHOP_AWNING }, recolorableIndices: [0, 1],
354
- },
204
+ // ── Foundations ──
205
+ {
206
+ id: "foundation-stone",
207
+ name: "Stone Foundation",
208
+ category: "foundation",
209
+ slot: "foundation",
210
+ anchorX: 8,
211
+ anchorY: 0,
212
+ zOrder: 0,
213
+ tags: ["stone", "foundation"],
214
+ pixels: { S: FOUNDATION_STONE },
215
+ recolorableIndices: [0, 1]
216
+ },
217
+ {
218
+ id: "foundation-brick",
219
+ name: "Brick Foundation",
220
+ category: "foundation",
221
+ slot: "foundation",
222
+ anchorX: 8,
223
+ anchorY: 0,
224
+ zOrder: 0,
225
+ tags: ["brick", "foundation"],
226
+ pixels: { S: FOUNDATION_BRICK },
227
+ recolorableIndices: [0, 1]
228
+ },
229
+ {
230
+ id: "foundation-wood",
231
+ name: "Wood Foundation",
232
+ category: "foundation",
233
+ slot: "foundation",
234
+ anchorX: 8,
235
+ anchorY: 0,
236
+ zOrder: 0,
237
+ tags: ["wood", "foundation"],
238
+ pixels: { S: FOUNDATION_WOOD },
239
+ recolorableIndices: [0, 1]
240
+ },
241
+ // ── Walls ──
242
+ {
243
+ id: "wall-stone",
244
+ name: "Stone Wall",
245
+ category: "wall",
246
+ slot: "wall",
247
+ anchorX: 8,
248
+ anchorY: 0,
249
+ zOrder: 1,
250
+ tags: ["stone", "wall"],
251
+ pixels: { S: WALL_STONE_SECTION },
252
+ recolorableIndices: [0, 1, 2]
253
+ },
254
+ {
255
+ id: "wall-brick",
256
+ name: "Brick Wall",
257
+ category: "wall",
258
+ slot: "wall",
259
+ anchorX: 8,
260
+ anchorY: 0,
261
+ zOrder: 1,
262
+ tags: ["brick", "wall"],
263
+ pixels: { S: WALL_BRICK_SECTION },
264
+ recolorableIndices: [0, 1, 2]
265
+ },
266
+ {
267
+ id: "wall-wood",
268
+ name: "Wood Wall",
269
+ category: "wall",
270
+ slot: "wall",
271
+ anchorX: 8,
272
+ anchorY: 0,
273
+ zOrder: 1,
274
+ tags: ["wood", "wall"],
275
+ pixels: { S: WALL_WOOD_SECTION },
276
+ recolorableIndices: [0, 1]
277
+ },
278
+ {
279
+ id: "wall-halftimber",
280
+ name: "Half-timber Wall",
281
+ category: "wall",
282
+ slot: "wall",
283
+ anchorX: 8,
284
+ anchorY: 0,
285
+ zOrder: 1,
286
+ tags: ["halftimber", "medieval", "wall"],
287
+ pixels: { S: WALL_HALFTIMBER_SECTION },
288
+ recolorableIndices: [0, 1, 2]
289
+ },
290
+ // ── Roofs ──
291
+ {
292
+ id: "roof-triangle",
293
+ name: "Triangle Roof",
294
+ category: "roof",
295
+ slot: "roof",
296
+ anchorX: 10,
297
+ anchorY: 7,
298
+ zOrder: 10,
299
+ tags: ["triangle", "classic"],
300
+ pixels: { S: ROOF_TRIANGLE },
301
+ recolorableIndices: [0, 1, 2]
302
+ },
303
+ {
304
+ id: "roof-flat",
305
+ name: "Flat Roof",
306
+ category: "roof",
307
+ slot: "roof",
308
+ anchorX: 9,
309
+ anchorY: 3,
310
+ zOrder: 10,
311
+ tags: ["flat", "modern"],
312
+ pixels: { S: ROOF_FLAT },
313
+ recolorableIndices: [0, 1, 2]
314
+ },
315
+ {
316
+ id: "roof-pagoda",
317
+ name: "Pagoda Roof",
318
+ category: "roof",
319
+ slot: "roof",
320
+ anchorX: 11,
321
+ anchorY: 5,
322
+ zOrder: 10,
323
+ tags: ["pagoda", "asian", "curved"],
324
+ pixels: { S: ROOF_PAGODA },
325
+ recolorableIndices: [0, 1, 2]
326
+ },
327
+ {
328
+ id: "roof-dome",
329
+ name: "Dome Roof",
330
+ category: "roof",
331
+ slot: "roof",
332
+ anchorX: 9,
333
+ anchorY: 7,
334
+ zOrder: 10,
335
+ tags: ["dome", "round", "church"],
336
+ pixels: { S: ROOF_DOME },
337
+ recolorableIndices: [0, 1, 2]
338
+ },
339
+ // ── Doors ──
340
+ {
341
+ id: "door-wood",
342
+ name: "Wooden Door",
343
+ category: "door",
344
+ slot: "door",
345
+ anchorX: 2,
346
+ anchorY: 0,
347
+ zOrder: 5,
348
+ tags: ["wood", "simple"],
349
+ pixels: { S: DOOR_WOOD },
350
+ recolorableIndices: [0, 1, 2]
351
+ },
352
+ {
353
+ id: "door-arch",
354
+ name: "Arch Door",
355
+ category: "door",
356
+ slot: "door",
357
+ anchorX: 3,
358
+ anchorY: 0,
359
+ zOrder: 5,
360
+ tags: ["arch", "medieval"],
361
+ pixels: { S: DOOR_ARCH },
362
+ recolorableIndices: [0, 1, 2]
363
+ },
364
+ {
365
+ id: "door-double",
366
+ name: "Double Door",
367
+ category: "door",
368
+ slot: "door",
369
+ anchorX: 4,
370
+ anchorY: 0,
371
+ zOrder: 5,
372
+ tags: ["double", "grand"],
373
+ pixels: { S: DOOR_DOUBLE },
374
+ recolorableIndices: [0, 1, 2]
375
+ },
376
+ // ── Windows ──
377
+ {
378
+ id: "window-simple",
379
+ name: "Simple Window",
380
+ category: "window",
381
+ slot: "window",
382
+ anchorX: 2,
383
+ anchorY: 2,
384
+ zOrder: 5,
385
+ tags: ["simple", "basic"],
386
+ pixels: { S: WINDOW_SIMPLE },
387
+ recolorableIndices: [0, 1]
388
+ },
389
+ {
390
+ id: "window-cross",
391
+ name: "Cross Window",
392
+ category: "window",
393
+ slot: "window",
394
+ anchorX: 2,
395
+ anchorY: 2,
396
+ zOrder: 5,
397
+ tags: ["cross", "medieval"],
398
+ pixels: { S: WINDOW_CROSS },
399
+ recolorableIndices: [0, 1]
400
+ },
401
+ {
402
+ id: "window-arch",
403
+ name: "Arch Window",
404
+ category: "window",
405
+ slot: "window",
406
+ anchorX: 2,
407
+ anchorY: 2,
408
+ zOrder: 5,
409
+ tags: ["arch", "gothic"],
410
+ pixels: { S: WINDOW_ARCH },
411
+ recolorableIndices: [0, 1]
412
+ },
413
+ {
414
+ id: "window-round",
415
+ name: "Round Window",
416
+ category: "window",
417
+ slot: "window",
418
+ anchorX: 2,
419
+ anchorY: 2,
420
+ zOrder: 5,
421
+ tags: ["round", "porthole"],
422
+ pixels: { S: WINDOW_ROUND },
423
+ recolorableIndices: [0, 1]
424
+ },
425
+ // ── Chimneys ──
426
+ {
427
+ id: "chimney-brick",
428
+ name: "Brick Chimney",
429
+ category: "chimney",
430
+ slot: "chimney",
431
+ anchorX: 2,
432
+ anchorY: 5,
433
+ zOrder: 12,
434
+ tags: ["brick", "chimney"],
435
+ pixels: { S: CHIMNEY_BRICK },
436
+ recolorableIndices: [0, 1, 2]
437
+ },
438
+ {
439
+ id: "chimney-stone",
440
+ name: "Stone Chimney",
441
+ category: "chimney",
442
+ slot: "chimney",
443
+ anchorX: 1,
444
+ anchorY: 4,
445
+ zOrder: 12,
446
+ tags: ["stone", "chimney"],
447
+ pixels: { S: CHIMNEY_STONE },
448
+ recolorableIndices: [0, 1, 2]
449
+ },
450
+ // ── Decorations ──
451
+ {
452
+ id: "deco-balcony",
453
+ name: "Balcony",
454
+ category: "decoration",
455
+ slot: "wall",
456
+ anchorX: 4,
457
+ anchorY: 0,
458
+ zOrder: 6,
459
+ tags: ["balcony", "decoration"],
460
+ pixels: { S: BALCONY },
461
+ recolorableIndices: [0]
462
+ },
463
+ {
464
+ id: "deco-banner",
465
+ name: "Banner",
466
+ category: "decoration",
467
+ slot: "wall",
468
+ anchorX: 2,
469
+ anchorY: 0,
470
+ zOrder: 7,
471
+ tags: ["banner", "decoration", "flag"],
472
+ pixels: { S: BANNER },
473
+ recolorableIndices: [0, 1]
474
+ },
475
+ {
476
+ id: "deco-tower-top",
477
+ name: "Tower Battlements",
478
+ category: "decoration",
479
+ slot: "roof",
480
+ anchorX: 4,
481
+ anchorY: 3,
482
+ zOrder: 11,
483
+ tags: ["tower", "castle", "battlements"],
484
+ pixels: { S: TOWER_TOP },
485
+ recolorableIndices: [0, 1]
486
+ },
487
+ {
488
+ id: "deco-shop-awning",
489
+ name: "Shop Awning",
490
+ category: "decoration",
491
+ slot: "wall",
492
+ anchorX: 7,
493
+ anchorY: 0,
494
+ zOrder: 6,
495
+ tags: ["shop", "awning", "market"],
496
+ pixels: { S: SHOP_AWNING },
497
+ recolorableIndices: [0, 1]
498
+ }
355
499
  ];
356
- /** Assemble a building from config into a SpriteAssembly */
357
500
  function assembleBuildingFromConfig(config) {
358
- var _a;
359
- const floorHeight = 8;
360
- const foundationHeight = 4;
361
- const roofHeight = 8;
362
- const totalHeight = foundationHeight + config.floors.length * floorHeight + roofHeight + 4;
363
- const parts = [];
364
- // Foundation at bottom
365
- const baseY = totalHeight - foundationHeight;
366
- parts.push({ partId: config.foundationId, offsetX: 0, offsetY: baseY });
367
- // Floors bottom-up
368
- for (let i = 0; i < config.floors.length; i++) {
369
- const floor = config.floors[i];
370
- const floorY = baseY - (i + 1) * floorHeight;
371
- // Wall
372
- parts.push({
373
- partId: floor.wallId,
374
- offsetX: 0,
375
- offsetY: floorY,
376
- colorOverrides: floor.colorOverrides,
377
- });
378
- // Windows
379
- for (const wx of floor.windowPositions) {
380
- const winId = floor.windowIds[0] || 'window-simple';
381
- parts.push({ partId: winId, offsetX: wx, offsetY: floorY + 2 });
382
- }
383
- // Door (only ground floor typically)
384
- if (floor.doorId && floor.doorPosition !== undefined) {
385
- parts.push({ partId: floor.doorId, offsetX: floor.doorPosition, offsetY: floorY + 2 });
386
- }
387
- // Decorations
388
- if (floor.decorationIds) {
389
- for (const dId of floor.decorationIds) {
390
- parts.push({ partId: dId, offsetX: 0, offsetY: floorY });
391
- }
392
- }
501
+ const floorHeight = 8;
502
+ const foundationHeight = 4;
503
+ const roofHeight = 8;
504
+ const totalHeight = foundationHeight + config.floors.length * floorHeight + roofHeight + 4;
505
+ const parts = [];
506
+ const baseY = totalHeight - foundationHeight;
507
+ parts.push({ partId: config.foundationId, offsetX: 0, offsetY: baseY });
508
+ for (let i = 0; i < config.floors.length; i++) {
509
+ const floor = config.floors[i];
510
+ const floorY = baseY - (i + 1) * floorHeight;
511
+ parts.push({
512
+ partId: floor.wallId,
513
+ offsetX: 0,
514
+ offsetY: floorY,
515
+ colorOverrides: floor.colorOverrides
516
+ });
517
+ for (const wx of floor.windowPositions) {
518
+ const winId = floor.windowIds[0] || "window-simple";
519
+ parts.push({ partId: winId, offsetX: wx, offsetY: floorY + 2 });
520
+ }
521
+ if (floor.doorId && floor.doorPosition !== void 0) {
522
+ parts.push({ partId: floor.doorId, offsetX: floor.doorPosition, offsetY: floorY + 2 });
393
523
  }
394
- // Roof
395
- const roofY = baseY - config.floors.length * floorHeight - roofHeight;
396
- parts.push({ partId: config.roofId, offsetX: -2, offsetY: roofY });
397
- // Chimney
398
- if (config.chimneyId) {
399
- parts.push({
400
- partId: config.chimneyId,
401
- offsetX: (_a = config.chimneyPosition) !== null && _a !== void 0 ? _a : (config.width - 6),
402
- offsetY: roofY - 3,
403
- });
524
+ if (floor.decorationIds) {
525
+ for (const dId of floor.decorationIds) {
526
+ parts.push({ partId: dId, offsetX: 0, offsetY: floorY });
527
+ }
404
528
  }
405
- return {
406
- id: `building-${config.name.toLowerCase().replace(/\s+/g, '-')}`,
407
- name: config.name,
408
- parts,
409
- canvasWidth: Math.max(config.width, 24),
410
- canvasHeight: totalHeight,
411
- projection: 'sideView',
412
- };
529
+ }
530
+ const roofY = baseY - config.floors.length * floorHeight - roofHeight;
531
+ parts.push({ partId: config.roofId, offsetX: -2, offsetY: roofY });
532
+ if (config.chimneyId) {
533
+ parts.push({
534
+ partId: config.chimneyId,
535
+ offsetX: config.chimneyPosition ?? config.width - 6,
536
+ offsetY: roofY - 3
537
+ });
538
+ }
539
+ return {
540
+ id: `building-${config.name.toLowerCase().replace(/\s+/g, "-")}`,
541
+ name: config.name,
542
+ parts,
543
+ canvasWidth: Math.max(config.width, 24),
544
+ canvasHeight: totalHeight,
545
+ projection: "sideView"
546
+ };
413
547
  }
414
548
  const BUILDING_PRESETS = [
415
- {
416
- id: 'preset-cottage', name: 'Cottage', description: 'Simple wooden cottage',
417
- tags: ['wood', 'simple', 'village'],
418
- config: {
419
- name: 'Cottage', foundationId: 'foundation-wood', roofId: 'roof-triangle',
420
- chimneyId: 'chimney-brick', chimneyPosition: 12, width: 16,
421
- floors: [{
422
- wallId: 'wall-wood',
423
- windowIds: ['window-simple'],
424
- windowPositions: [2, 10],
425
- doorId: 'door-wood', doorPosition: 6,
426
- }],
549
+ {
550
+ id: "preset-cottage",
551
+ name: "Cottage",
552
+ description: "Simple wooden cottage",
553
+ tags: ["wood", "simple", "village"],
554
+ config: {
555
+ name: "Cottage",
556
+ foundationId: "foundation-wood",
557
+ roofId: "roof-triangle",
558
+ chimneyId: "chimney-brick",
559
+ chimneyPosition: 12,
560
+ width: 16,
561
+ floors: [{
562
+ wallId: "wall-wood",
563
+ windowIds: ["window-simple"],
564
+ windowPositions: [2, 10],
565
+ doorId: "door-wood",
566
+ doorPosition: 6
567
+ }]
568
+ }
569
+ },
570
+ {
571
+ id: "preset-house",
572
+ name: "Town House",
573
+ description: "Two-story brick house",
574
+ tags: ["brick", "town", "residential"],
575
+ config: {
576
+ name: "Town House",
577
+ foundationId: "foundation-brick",
578
+ roofId: "roof-triangle",
579
+ chimneyId: "chimney-brick",
580
+ chimneyPosition: 11,
581
+ width: 16,
582
+ floors: [
583
+ {
584
+ wallId: "wall-brick",
585
+ windowIds: ["window-cross"],
586
+ windowPositions: [2, 10],
587
+ doorId: "door-wood",
588
+ doorPosition: 6
427
589
  },
428
- },
429
- {
430
- id: 'preset-house', name: 'Town House', description: 'Two-story brick house',
431
- tags: ['brick', 'town', 'residential'],
432
- config: {
433
- name: 'Town House', foundationId: 'foundation-brick', roofId: 'roof-triangle',
434
- chimneyId: 'chimney-brick', chimneyPosition: 11, width: 16,
435
- floors: [
436
- {
437
- wallId: 'wall-brick',
438
- windowIds: ['window-cross'],
439
- windowPositions: [2, 10],
440
- doorId: 'door-wood', doorPosition: 6,
441
- },
442
- {
443
- wallId: 'wall-brick',
444
- windowIds: ['window-cross'],
445
- windowPositions: [2, 6, 10],
446
- },
447
- ],
590
+ {
591
+ wallId: "wall-brick",
592
+ windowIds: ["window-cross"],
593
+ windowPositions: [2, 6, 10]
594
+ }
595
+ ]
596
+ }
597
+ },
598
+ {
599
+ id: "preset-castle-tower",
600
+ name: "Castle Tower",
601
+ description: "Medieval stone tower",
602
+ tags: ["stone", "castle", "medieval", "tower"],
603
+ config: {
604
+ name: "Castle Tower",
605
+ foundationId: "foundation-stone",
606
+ roofId: "roof-flat",
607
+ width: 16,
608
+ floors: [
609
+ {
610
+ wallId: "wall-stone",
611
+ windowIds: ["window-arch"],
612
+ windowPositions: [6],
613
+ doorId: "door-arch",
614
+ doorPosition: 5
448
615
  },
449
- },
450
- {
451
- id: 'preset-castle-tower', name: 'Castle Tower', description: 'Medieval stone tower',
452
- tags: ['stone', 'castle', 'medieval', 'tower'],
453
- config: {
454
- name: 'Castle Tower', foundationId: 'foundation-stone', roofId: 'roof-flat',
455
- width: 16,
456
- floors: [
457
- {
458
- wallId: 'wall-stone',
459
- windowIds: ['window-arch'],
460
- windowPositions: [6],
461
- doorId: 'door-arch', doorPosition: 5,
462
- },
463
- {
464
- wallId: 'wall-stone',
465
- windowIds: ['window-arch'],
466
- windowPositions: [3, 9],
467
- },
468
- {
469
- wallId: 'wall-stone',
470
- windowIds: ['window-arch'],
471
- windowPositions: [3, 9],
472
- decorationIds: ['deco-banner'],
473
- },
474
- ],
616
+ {
617
+ wallId: "wall-stone",
618
+ windowIds: ["window-arch"],
619
+ windowPositions: [3, 9]
475
620
  },
476
- },
477
- {
478
- id: 'preset-shop', name: 'Shop', description: 'Market shop with awning',
479
- tags: ['wood', 'shop', 'market', 'town'],
480
- config: {
481
- name: 'Shop', foundationId: 'foundation-wood', roofId: 'roof-triangle',
482
- width: 16,
483
- floors: [{
484
- wallId: 'wall-halftimber',
485
- windowIds: ['window-simple'],
486
- windowPositions: [2, 10],
487
- doorId: 'door-double', doorPosition: 4,
488
- decorationIds: ['deco-shop-awning'],
489
- }],
621
+ {
622
+ wallId: "wall-stone",
623
+ windowIds: ["window-arch"],
624
+ windowPositions: [3, 9],
625
+ decorationIds: ["deco-banner"]
626
+ }
627
+ ]
628
+ }
629
+ },
630
+ {
631
+ id: "preset-shop",
632
+ name: "Shop",
633
+ description: "Market shop with awning",
634
+ tags: ["wood", "shop", "market", "town"],
635
+ config: {
636
+ name: "Shop",
637
+ foundationId: "foundation-wood",
638
+ roofId: "roof-triangle",
639
+ width: 16,
640
+ floors: [{
641
+ wallId: "wall-halftimber",
642
+ windowIds: ["window-simple"],
643
+ windowPositions: [2, 10],
644
+ doorId: "door-double",
645
+ doorPosition: 4,
646
+ decorationIds: ["deco-shop-awning"]
647
+ }]
648
+ }
649
+ },
650
+ {
651
+ id: "preset-inn",
652
+ name: "Inn",
653
+ description: "Half-timber two-story inn",
654
+ tags: ["halftimber", "inn", "medieval", "town"],
655
+ config: {
656
+ name: "Inn",
657
+ foundationId: "foundation-stone",
658
+ roofId: "roof-triangle",
659
+ chimneyId: "chimney-stone",
660
+ chimneyPosition: 12,
661
+ width: 16,
662
+ floors: [
663
+ {
664
+ wallId: "wall-halftimber",
665
+ windowIds: ["window-simple"],
666
+ windowPositions: [2, 10],
667
+ doorId: "door-double",
668
+ doorPosition: 4
490
669
  },
491
- },
492
- {
493
- id: 'preset-inn', name: 'Inn', description: 'Half-timber two-story inn',
494
- tags: ['halftimber', 'inn', 'medieval', 'town'],
495
- config: {
496
- name: 'Inn', foundationId: 'foundation-stone', roofId: 'roof-triangle',
497
- chimneyId: 'chimney-stone', chimneyPosition: 12, width: 16,
498
- floors: [
499
- {
500
- wallId: 'wall-halftimber',
501
- windowIds: ['window-simple'],
502
- windowPositions: [2, 10],
503
- doorId: 'door-double', doorPosition: 4,
504
- },
505
- {
506
- wallId: 'wall-halftimber',
507
- windowIds: ['window-cross'],
508
- windowPositions: [2, 6, 10],
509
- decorationIds: ['deco-balcony'],
510
- },
511
- ],
670
+ {
671
+ wallId: "wall-halftimber",
672
+ windowIds: ["window-cross"],
673
+ windowPositions: [2, 6, 10],
674
+ decorationIds: ["deco-balcony"]
675
+ }
676
+ ]
677
+ }
678
+ },
679
+ {
680
+ id: "preset-temple",
681
+ name: "Temple",
682
+ description: "Domed temple building",
683
+ tags: ["stone", "temple", "church", "dome"],
684
+ config: {
685
+ name: "Temple",
686
+ foundationId: "foundation-stone",
687
+ roofId: "roof-dome",
688
+ width: 18,
689
+ floors: [
690
+ {
691
+ wallId: "wall-stone",
692
+ windowIds: ["window-round"],
693
+ windowPositions: [3, 11],
694
+ doorId: "door-arch",
695
+ doorPosition: 6
512
696
  },
513
- },
514
- {
515
- id: 'preset-temple', name: 'Temple', description: 'Domed temple building',
516
- tags: ['stone', 'temple', 'church', 'dome'],
517
- config: {
518
- name: 'Temple', foundationId: 'foundation-stone', roofId: 'roof-dome',
519
- width: 18,
520
- floors: [
521
- {
522
- wallId: 'wall-stone',
523
- windowIds: ['window-round'],
524
- windowPositions: [3, 11],
525
- doorId: 'door-arch', doorPosition: 6,
526
- },
527
- {
528
- wallId: 'wall-stone',
529
- windowIds: ['window-arch'],
530
- windowPositions: [3, 7, 11],
531
- },
532
- ],
697
+ {
698
+ wallId: "wall-stone",
699
+ windowIds: ["window-arch"],
700
+ windowPositions: [3, 7, 11]
701
+ }
702
+ ]
703
+ }
704
+ },
705
+ {
706
+ id: "preset-pagoda",
707
+ name: "Pagoda",
708
+ description: "Multi-story pagoda tower",
709
+ tags: ["wood", "pagoda", "asian", "tower"],
710
+ config: {
711
+ name: "Pagoda",
712
+ foundationId: "foundation-stone",
713
+ roofId: "roof-pagoda",
714
+ width: 16,
715
+ floors: [
716
+ {
717
+ wallId: "wall-wood",
718
+ windowIds: ["window-arch"],
719
+ windowPositions: [3, 9],
720
+ doorId: "door-arch",
721
+ doorPosition: 6
533
722
  },
534
- },
535
- {
536
- id: 'preset-pagoda', name: 'Pagoda', description: 'Multi-story pagoda tower',
537
- tags: ['wood', 'pagoda', 'asian', 'tower'],
538
- config: {
539
- name: 'Pagoda', foundationId: 'foundation-stone', roofId: 'roof-pagoda',
540
- width: 16,
541
- floors: [
542
- {
543
- wallId: 'wall-wood',
544
- windowIds: ['window-arch'],
545
- windowPositions: [3, 9],
546
- doorId: 'door-arch', doorPosition: 6,
547
- },
548
- {
549
- wallId: 'wall-wood',
550
- windowIds: ['window-arch'],
551
- windowPositions: [3, 9],
552
- },
553
- {
554
- wallId: 'wall-wood',
555
- windowIds: ['window-round'],
556
- windowPositions: [6],
557
- },
558
- ],
723
+ {
724
+ wallId: "wall-wood",
725
+ windowIds: ["window-arch"],
726
+ windowPositions: [3, 9]
559
727
  },
560
- },
728
+ {
729
+ wallId: "wall-wood",
730
+ windowIds: ["window-round"],
731
+ windowPositions: [6]
732
+ }
733
+ ]
734
+ }
735
+ }
561
736
  ];
562
- /** Initialize: register all building parts */
563
737
  function initBuildingParts() {
564
- spriteGeneratorCore.registerParts(BUILDING_PARTS);
738
+ spriteGeneratorCore.registerParts(BUILDING_PARTS);
565
739
  }
566
-
567
740
  exports.BUILDING_PARTS = BUILDING_PARTS;
568
741
  exports.BUILDING_PRESETS = BUILDING_PRESETS;
569
742
  exports.ROOF_PALETTES = ROOF_PALETTES;