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