@nice2dev/ui-3d 1.3.14 → 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 (108) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/collaborative/collaborativeScene.js +160 -206
  3. package/dist/cjs/core/editorAsk.js +51 -41
  4. package/dist/cjs/core/i18n.js +13 -14
  5. package/dist/cjs/core/threeCompat.js +29 -42
  6. package/dist/cjs/dance/DanceBridge.js +148 -177
  7. package/dist/cjs/dance/DanceScoreEngine.js +209 -221
  8. package/dist/cjs/dance/PoseDetector.js +302 -275
  9. package/dist/cjs/index.js +110 -113
  10. package/dist/cjs/material/MaterialEditor.module.css.js +242 -5
  11. package/dist/cjs/material/NiceMaterialEditor.js +1213 -757
  12. package/dist/cjs/material/materialEditorTypes.js +35 -49
  13. package/dist/cjs/material/materialEditorUtils.js +684 -747
  14. package/dist/cjs/material/materialNodeDefinitions.js +1411 -1459
  15. package/dist/cjs/model/ModelEditor.js +90 -40
  16. package/dist/cjs/model/ModelEditor.module.css.js +257 -5
  17. package/dist/cjs/model/ModelEditorLeftPanel.js +126 -47
  18. package/dist/cjs/model/ModelEditorMenuBar.js +359 -32
  19. package/dist/cjs/model/ModelEditorRightPanel.js +647 -131
  20. package/dist/cjs/model/ModelEditorSubComponents.js +277 -112
  21. package/dist/cjs/model/ModelEditorTimeline.js +232 -34
  22. package/dist/cjs/model/ModelEditorToolbar.js +170 -14
  23. package/dist/cjs/model/ModelEditorViewport.js +231 -39
  24. package/dist/cjs/model/ModelViewer.js +388 -63
  25. package/dist/cjs/model/ModelViewer.module.css.js +77 -5
  26. package/dist/cjs/model/NiceArmatureEditor.js +473 -274
  27. package/dist/cjs/model/NiceMorphTargetEditor.js +333 -227
  28. package/dist/cjs/model/NiceOctree.js +372 -320
  29. package/dist/cjs/model/NicePhysicsSimulation.js +528 -298
  30. package/dist/cjs/model/NiceProceduralGeometry.js +673 -300
  31. package/dist/cjs/model/NiceTerrainEditor.js +595 -385
  32. package/dist/cjs/model/NiceWeightPainter.js +384 -261
  33. package/dist/cjs/model/NiceXRPreview.js +385 -308
  34. package/dist/cjs/model/cadModeUtils.js +103 -106
  35. package/dist/cjs/model/editorShortcuts.js +171 -194
  36. package/dist/cjs/model/modelEditorTypes.js +100 -118
  37. package/dist/cjs/model/modelEditorUtils.js +1061 -1146
  38. package/dist/cjs/model/simsModeUtils.js +1023 -1053
  39. package/dist/cjs/model/useModelEditor.js +1977 -1933
  40. package/dist/cjs/model/useModelViewer.js +633 -665
  41. package/dist/cjs/nice2dev-ui-3d.css +1 -1
  42. package/dist/cjs/particle/NiceParticleEditor.js +1186 -571
  43. package/dist/cjs/particle/ParticleEditor.module.css.js +122 -5
  44. package/dist/cjs/particle/particleEditorTypes.js +62 -70
  45. package/dist/cjs/particle/particleEditorUtils.js +998 -1013
  46. package/dist/cjs/rendering/NiceCascadedShadows.js +381 -259
  47. package/dist/cjs/rendering/NiceRenderExport.js +424 -337
  48. package/dist/cjs/rendering/NiceSSAO.js +454 -337
  49. package/dist/cjs/rendering/NiceSSR.js +387 -261
  50. package/dist/cjs/rendering/NiceWebGPURenderer.js +359 -230
  51. package/dist/cjs/uv/NiceUVEditor.js +787 -550
  52. package/dist/cjs/uv/UVEditor.module.css.js +53 -5
  53. package/dist/cjs/uv/uvEditorTypes.js +59 -76
  54. package/dist/cjs/uv/uvEditorUtils.js +501 -575
  55. package/dist/esm/collaborative/collaborativeScene.js +163 -205
  56. package/dist/esm/core/editorAsk.js +53 -40
  57. package/dist/esm/core/i18n.js +15 -13
  58. package/dist/esm/core/threeCompat.js +18 -26
  59. package/dist/esm/dance/DanceBridge.js +151 -176
  60. package/dist/esm/dance/DanceScoreEngine.js +211 -220
  61. package/dist/esm/dance/PoseDetector.js +304 -274
  62. package/dist/esm/index.js +258 -36
  63. package/dist/esm/material/MaterialEditor.module.css.js +242 -3
  64. package/dist/esm/material/NiceMaterialEditor.js +1215 -756
  65. package/dist/esm/material/materialEditorTypes.js +45 -48
  66. package/dist/esm/material/materialEditorUtils.js +713 -746
  67. package/dist/esm/material/materialNodeDefinitions.js +1415 -1458
  68. package/dist/esm/model/ModelEditor.js +91 -39
  69. package/dist/esm/model/ModelEditor.module.css.js +257 -3
  70. package/dist/esm/model/ModelEditorLeftPanel.js +126 -45
  71. package/dist/esm/model/ModelEditorMenuBar.js +359 -30
  72. package/dist/esm/model/ModelEditorRightPanel.js +634 -114
  73. package/dist/esm/model/ModelEditorSubComponents.js +265 -94
  74. package/dist/esm/model/ModelEditorTimeline.js +232 -32
  75. package/dist/esm/model/ModelEditorToolbar.js +170 -12
  76. package/dist/esm/model/ModelEditorViewport.js +231 -37
  77. package/dist/esm/model/ModelViewer.js +389 -62
  78. package/dist/esm/model/ModelViewer.module.css.js +77 -3
  79. package/dist/esm/model/NiceArmatureEditor.js +462 -258
  80. package/dist/esm/model/NiceMorphTargetEditor.js +322 -211
  81. package/dist/esm/model/NiceOctree.js +361 -304
  82. package/dist/esm/model/NicePhysicsSimulation.js +517 -282
  83. package/dist/esm/model/NiceProceduralGeometry.js +667 -284
  84. package/dist/esm/model/NiceTerrainEditor.js +584 -369
  85. package/dist/esm/model/NiceWeightPainter.js +373 -245
  86. package/dist/esm/model/NiceXRPreview.js +374 -292
  87. package/dist/esm/model/cadModeUtils.js +95 -88
  88. package/dist/esm/model/editorShortcuts.js +172 -193
  89. package/dist/esm/model/modelEditorTypes.js +90 -100
  90. package/dist/esm/model/modelEditorUtils.js +1056 -1128
  91. package/dist/esm/model/simsModeUtils.js +1021 -1035
  92. package/dist/esm/model/useModelEditor.js +1946 -1920
  93. package/dist/esm/model/useModelViewer.js +619 -647
  94. package/dist/esm/nice2dev-ui-3d.css +1 -1
  95. package/dist/esm/particle/NiceParticleEditor.js +1188 -570
  96. package/dist/esm/particle/ParticleEditor.module.css.js +122 -3
  97. package/dist/esm/particle/particleEditorTypes.js +69 -69
  98. package/dist/esm/particle/particleEditorUtils.js +1027 -1012
  99. package/dist/esm/rendering/NiceCascadedShadows.js +370 -243
  100. package/dist/esm/rendering/NiceRenderExport.js +413 -321
  101. package/dist/esm/rendering/NiceSSAO.js +450 -328
  102. package/dist/esm/rendering/NiceSSR.js +383 -252
  103. package/dist/esm/rendering/NiceWebGPURenderer.js +326 -214
  104. package/dist/esm/uv/NiceUVEditor.js +788 -549
  105. package/dist/esm/uv/UVEditor.module.css.js +53 -3
  106. package/dist/esm/uv/uvEditorTypes.js +68 -75
  107. package/dist/esm/uv/uvEditorUtils.js +515 -557
  108. package/package.json +7 -12
@@ -1,1092 +1,1062 @@
1
- 'use strict';
2
-
3
- var THREE = require('three');
4
-
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const THREE = require("three");
5
4
  function _interopNamespaceDefault(e) {
6
- var n = Object.create(null);
7
- if (e) {
8
- Object.keys(e).forEach(function (k) {
9
- if (k !== 'default') {
10
- var d = Object.getOwnPropertyDescriptor(e, k);
11
- Object.defineProperty(n, k, d.get ? d : {
12
- enumerable: true,
13
- get: function () { return e[k]; }
14
- });
15
- }
16
- });
17
- }
18
- n.default = e;
19
- return Object.freeze(n);
5
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
6
+ if (e) {
7
+ for (const k in e) {
8
+ if (k !== "default") {
9
+ const d = Object.getOwnPropertyDescriptor(e, k);
10
+ Object.defineProperty(n, k, d.get ? d : {
11
+ enumerable: true,
12
+ get: () => e[k]
13
+ });
14
+ }
15
+ }
16
+ }
17
+ n.default = e;
18
+ return Object.freeze(n);
20
19
  }
21
-
22
- var THREE__namespace = /*#__PURE__*/_interopNamespaceDefault(THREE);
23
-
24
- /**
25
- * simsModeUtils.ts — Sims-style simplified drag-drop mode for ModelEditor.
26
- *
27
- * Provides: furniture catalog, room decorator, drag-drop placement,
28
- * grid snapping, resize handles, and room preset layouts.
29
- */
30
- /* ════════════════════════════════════════════════════════════════
31
- FURNITURE CATALOG
32
- ════════════════════════════════════════════════════════════════ */
20
+ const THREE__namespace = /* @__PURE__ */ _interopNamespaceDefault(THREE);
33
21
  const FURNITURE_CATALOG = [
34
- // Seating
35
- {
36
- id: 'sofa-3seat',
37
- name: '3-Seat Sofa',
38
- category: 'seating',
39
- icon: 'sofa',
40
- width: 2.2,
41
- depth: 0.9,
42
- height: 0.85,
43
- color: '#8B7355',
44
- tags: ['living', 'comfort'],
45
- stackable: false,
46
- wallMounted: false,
47
- price: 599,
48
- },
49
- {
50
- id: 'sofa-2seat',
51
- name: 'Love Seat',
52
- category: 'seating',
53
- icon: 'sofa',
54
- width: 1.5,
55
- depth: 0.85,
56
- height: 0.82,
57
- color: '#A0522D',
58
- tags: ['living'],
59
- stackable: false,
60
- wallMounted: false,
61
- price: 399,
62
- },
63
- {
64
- id: 'armchair',
65
- name: 'Armchair',
66
- category: 'seating',
67
- icon: 'chair',
68
- width: 0.85,
69
- depth: 0.85,
70
- height: 0.9,
71
- color: '#6B4423',
72
- tags: ['living', 'comfort'],
73
- stackable: false,
74
- wallMounted: false,
75
- price: 249,
76
- },
77
- {
78
- id: 'dining-chair',
79
- name: 'Dining Chair',
80
- category: 'seating',
81
- icon: 'chair',
82
- width: 0.45,
83
- depth: 0.45,
84
- height: 0.9,
85
- color: '#8B7355',
86
- tags: ['dining'],
87
- stackable: true,
88
- wallMounted: false,
89
- price: 79,
90
- },
91
- {
92
- id: 'office-chair',
93
- name: 'Office Chair',
94
- category: 'seating',
95
- icon: 'chair',
96
- width: 0.6,
97
- depth: 0.6,
98
- height: 1.1,
99
- color: '#333333',
100
- tags: ['office'],
101
- stackable: false,
102
- wallMounted: false,
103
- price: 199,
104
- },
105
- {
106
- id: 'bar-stool',
107
- name: 'Bar Stool',
108
- category: 'seating',
109
- icon: 'chair',
110
- width: 0.4,
111
- depth: 0.4,
112
- height: 0.75,
113
- color: '#696969',
114
- tags: ['kitchen', 'bar'],
115
- stackable: true,
116
- wallMounted: false,
117
- price: 89,
118
- },
119
- {
120
- id: 'bean-bag',
121
- name: 'Bean Bag',
122
- category: 'seating',
123
- icon: 'droplet',
124
- width: 0.8,
125
- depth: 0.8,
126
- height: 0.7,
127
- color: '#ff6b6b',
128
- tags: ['casual'],
129
- stackable: false,
130
- wallMounted: false,
131
- price: 59,
132
- },
133
- // Tables
134
- {
135
- id: 'dining-table-6',
136
- name: 'Dining Table (6p)',
137
- category: 'tables',
138
- icon: 'box',
139
- width: 1.8,
140
- depth: 0.9,
141
- height: 0.75,
142
- color: '#8B6914',
143
- tags: ['dining'],
144
- stackable: false,
145
- wallMounted: false,
146
- price: 499,
147
- },
148
- {
149
- id: 'dining-table-4',
150
- name: 'Dining Table (4p)',
151
- category: 'tables',
152
- icon: 'box',
153
- width: 1.2,
154
- depth: 0.8,
155
- height: 0.75,
156
- color: '#A0522D',
157
- tags: ['dining'],
158
- stackable: false,
159
- wallMounted: false,
160
- price: 349,
161
- },
162
- {
163
- id: 'coffee-table',
164
- name: 'Coffee Table',
165
- category: 'tables',
166
- icon: 'box',
167
- width: 1.2,
168
- depth: 0.6,
169
- height: 0.45,
170
- color: '#654321',
171
- tags: ['living'],
172
- stackable: false,
173
- wallMounted: false,
174
- price: 179,
175
- },
176
- {
177
- id: 'side-table',
178
- name: 'Side Table',
179
- category: 'tables',
180
- icon: 'box',
181
- width: 0.5,
182
- depth: 0.5,
183
- height: 0.55,
184
- color: '#8B6914',
185
- tags: ['living', 'bedroom'],
186
- stackable: false,
187
- wallMounted: false,
188
- price: 99,
189
- },
190
- {
191
- id: 'desk',
192
- name: 'Office Desk',
193
- category: 'tables',
194
- icon: 'box',
195
- width: 1.4,
196
- depth: 0.7,
197
- height: 0.75,
198
- color: '#696969',
199
- tags: ['office'],
200
- stackable: false,
201
- wallMounted: false,
202
- price: 299,
203
- },
204
- {
205
- id: 'console-table',
206
- name: 'Console Table',
207
- category: 'tables',
208
- icon: 'box',
209
- width: 1.2,
210
- depth: 0.35,
211
- height: 0.8,
212
- color: '#B8860B',
213
- tags: ['hallway'],
214
- stackable: false,
215
- wallMounted: false,
216
- price: 199,
217
- },
218
- // Beds
219
- {
220
- id: 'bed-king',
221
- name: 'King Bed',
222
- category: 'beds',
223
- icon: 'bed',
224
- width: 1.9,
225
- depth: 2.1,
226
- height: 0.6,
227
- color: '#F5DEB3',
228
- tags: ['bedroom'],
229
- stackable: false,
230
- wallMounted: false,
231
- price: 899,
232
- },
233
- {
234
- id: 'bed-queen',
235
- name: 'Queen Bed',
236
- category: 'beds',
237
- icon: 'bed',
238
- width: 1.6,
239
- depth: 2.0,
240
- height: 0.6,
241
- color: '#DEB887',
242
- tags: ['bedroom'],
243
- stackable: false,
244
- wallMounted: false,
245
- price: 699,
246
- },
247
- {
248
- id: 'bed-single',
249
- name: 'Single Bed',
250
- category: 'beds',
251
- icon: 'bed',
252
- width: 1.0,
253
- depth: 2.0,
254
- height: 0.55,
255
- color: '#87CEEB',
256
- tags: ['bedroom', 'kids'],
257
- stackable: false,
258
- wallMounted: false,
259
- price: 349,
260
- },
261
- {
262
- id: 'bunk-bed',
263
- name: 'Bunk Bed',
264
- category: 'beds',
265
- icon: 'bed',
266
- width: 1.0,
267
- depth: 2.0,
268
- height: 1.7,
269
- color: '#BC8F8F',
270
- tags: ['kids'],
271
- stackable: false,
272
- wallMounted: false,
273
- price: 499,
274
- },
275
- {
276
- id: 'crib',
277
- name: 'Baby Crib',
278
- category: 'beds',
279
- icon: 'bed',
280
- width: 0.7,
281
- depth: 1.3,
282
- height: 1.0,
283
- color: '#FFFAF0',
284
- tags: ['nursery'],
285
- stackable: false,
286
- wallMounted: false,
287
- price: 299,
288
- },
289
- // Storage
290
- {
291
- id: 'bookshelf',
292
- name: 'Bookshelf',
293
- category: 'storage',
294
- icon: 'book',
295
- width: 0.8,
296
- depth: 0.35,
297
- height: 1.8,
298
- color: '#8B6914',
299
- tags: ['living', 'office'],
300
- stackable: false,
301
- wallMounted: false,
302
- price: 229,
303
- },
304
- {
305
- id: 'wardrobe',
306
- name: 'Wardrobe',
307
- category: 'storage',
308
- icon: 'door',
309
- width: 1.2,
310
- depth: 0.6,
311
- height: 2.0,
312
- color: '#A0522D',
313
- tags: ['bedroom'],
314
- stackable: false,
315
- wallMounted: false,
316
- price: 449,
317
- },
318
- {
319
- id: 'tv-unit',
320
- name: 'TV Unit',
321
- category: 'storage',
322
- icon: 'monitor',
323
- width: 1.6,
324
- depth: 0.45,
325
- height: 0.55,
326
- color: '#36454F',
327
- tags: ['living'],
328
- stackable: false,
329
- wallMounted: false,
330
- price: 329,
331
- },
332
- {
333
- id: 'dresser',
334
- name: 'Dresser',
335
- category: 'storage',
336
- icon: 'archive',
337
- width: 1.0,
338
- depth: 0.5,
339
- height: 0.85,
340
- color: '#DEB887',
341
- tags: ['bedroom'],
342
- stackable: false,
343
- wallMounted: false,
344
- price: 279,
345
- },
346
- {
347
- id: 'shelf-wall',
348
- name: 'Wall Shelf',
349
- category: 'storage',
350
- icon: 'ruler',
351
- width: 0.8,
352
- depth: 0.2,
353
- height: 0.03,
354
- color: '#8B6914',
355
- tags: ['any'],
356
- stackable: false,
357
- wallMounted: true,
358
- price: 49,
359
- },
360
- // Lighting
361
- {
362
- id: 'floor-lamp',
363
- name: 'Floor Lamp',
364
- category: 'lighting',
365
- icon: 'lightbulb',
366
- width: 0.4,
367
- depth: 0.4,
368
- height: 1.7,
369
- color: '#FFD700',
370
- tags: ['living'],
371
- stackable: false,
372
- wallMounted: false,
373
- price: 119,
374
- },
375
- {
376
- id: 'table-lamp',
377
- name: 'Table Lamp',
378
- category: 'lighting',
379
- icon: 'lightbulb',
380
- width: 0.3,
381
- depth: 0.3,
382
- height: 0.5,
383
- color: '#FAFAD2',
384
- tags: ['bedroom', 'living'],
385
- stackable: false,
386
- wallMounted: false,
387
- price: 59,
388
- },
389
- {
390
- id: 'ceiling-fan',
391
- name: 'Ceiling Fan',
392
- category: 'lighting',
393
- icon: 'refresh',
394
- width: 1.2,
395
- depth: 1.2,
396
- height: 0.35,
397
- color: '#C0C0C0',
398
- tags: ['any'],
399
- stackable: false,
400
- wallMounted: false,
401
- price: 179,
402
- },
403
- {
404
- id: 'pendant',
405
- name: 'Pendant Light',
406
- category: 'lighting',
407
- icon: 'lightbulb',
408
- width: 0.4,
409
- depth: 0.4,
410
- height: 0.6,
411
- color: '#FFD700',
412
- tags: ['kitchen', 'dining'],
413
- stackable: false,
414
- wallMounted: false,
415
- price: 149,
416
- },
417
- // Appliances
418
- {
419
- id: 'fridge',
420
- name: 'Refrigerator',
421
- category: 'appliances',
422
- icon: 'box',
423
- width: 0.7,
424
- depth: 0.7,
425
- height: 1.8,
426
- color: '#C0C0C0',
427
- tags: ['kitchen'],
428
- stackable: false,
429
- wallMounted: false,
430
- price: 999,
431
- },
432
- {
433
- id: 'stove',
434
- name: 'Stove/Oven',
435
- category: 'appliances',
436
- icon: 'utensils',
437
- width: 0.6,
438
- depth: 0.6,
439
- height: 0.9,
440
- color: '#696969',
441
- tags: ['kitchen'],
442
- stackable: false,
443
- wallMounted: false,
444
- price: 799,
445
- },
446
- {
447
- id: 'dishwasher',
448
- name: 'Dishwasher',
449
- category: 'appliances',
450
- icon: 'utensils',
451
- width: 0.6,
452
- depth: 0.6,
453
- height: 0.85,
454
- color: '#C0C0C0',
455
- tags: ['kitchen'],
456
- stackable: false,
457
- wallMounted: false,
458
- price: 549,
459
- },
460
- {
461
- id: 'washer',
462
- name: 'Washing Machine',
463
- category: 'appliances',
464
- icon: 'box',
465
- width: 0.6,
466
- depth: 0.6,
467
- height: 0.85,
468
- color: '#f5f5f5',
469
- tags: ['laundry'],
470
- stackable: false,
471
- wallMounted: false,
472
- price: 599,
473
- },
474
- {
475
- id: 'microwave',
476
- name: 'Microwave',
477
- category: 'appliances',
478
- icon: 'music',
479
- width: 0.5,
480
- depth: 0.4,
481
- height: 0.3,
482
- color: '#333333',
483
- tags: ['kitchen'],
484
- stackable: true,
485
- wallMounted: false,
486
- price: 149,
487
- },
488
- // Bathroom
489
- {
490
- id: 'toilet',
491
- name: 'Toilet',
492
- category: 'bathroom',
493
- icon: 'droplet',
494
- width: 0.4,
495
- depth: 0.7,
496
- height: 0.75,
497
- color: '#FFFFF0',
498
- tags: ['bathroom'],
499
- stackable: false,
500
- wallMounted: false,
501
- price: 199,
502
- },
503
- {
504
- id: 'bathtub',
505
- name: 'Bathtub',
506
- category: 'bathroom',
507
- icon: 'droplet',
508
- width: 0.75,
509
- depth: 1.7,
510
- height: 0.6,
511
- color: '#FFFFF0',
512
- tags: ['bathroom'],
513
- stackable: false,
514
- wallMounted: false,
515
- price: 599,
516
- },
517
- {
518
- id: 'shower',
519
- name: 'Shower Cabin',
520
- category: 'bathroom',
521
- icon: 'droplet',
522
- width: 0.9,
523
- depth: 0.9,
524
- height: 2.1,
525
- color: '#E0FFFF',
526
- tags: ['bathroom'],
527
- stackable: false,
528
- wallMounted: false,
529
- price: 449,
530
- },
531
- {
532
- id: 'vanity',
533
- name: 'Bathroom Vanity',
534
- category: 'bathroom',
535
- icon: 'copy',
536
- width: 0.8,
537
- depth: 0.5,
538
- height: 0.85,
539
- color: '#FFFFF0',
540
- tags: ['bathroom'],
541
- stackable: false,
542
- wallMounted: false,
543
- price: 349,
544
- },
545
- {
546
- id: 'sink-kitchen',
547
- name: 'Kitchen Sink',
548
- category: 'kitchen',
549
- icon: 'droplet',
550
- width: 0.6,
551
- depth: 0.5,
552
- height: 0.85,
553
- color: '#C0C0C0',
554
- tags: ['kitchen'],
555
- stackable: false,
556
- wallMounted: false,
557
- price: 199,
558
- },
559
- // Decor
560
- {
561
- id: 'painting-large',
562
- name: 'Large Painting',
563
- category: 'decor',
564
- icon: 'image',
565
- width: 1.0,
566
- depth: 0.05,
567
- height: 0.7,
568
- color: '#B8860B',
569
- tags: ['any'],
570
- stackable: false,
571
- wallMounted: true,
572
- price: 89,
573
- },
574
- {
575
- id: 'mirror',
576
- name: 'Wall Mirror',
577
- category: 'decor',
578
- icon: 'copy',
579
- width: 0.6,
580
- depth: 0.03,
581
- height: 0.9,
582
- color: '#e0e0e0',
583
- tags: ['bathroom', 'hallway'],
584
- stackable: false,
585
- wallMounted: true,
586
- price: 69,
587
- },
588
- {
589
- id: 'clock',
590
- name: 'Wall Clock',
591
- category: 'decor',
592
- icon: 'clock',
593
- width: 0.3,
594
- depth: 0.05,
595
- height: 0.3,
596
- color: '#333333',
597
- tags: ['any'],
598
- stackable: false,
599
- wallMounted: true,
600
- price: 39,
601
- },
602
- // Plants
603
- {
604
- id: 'plant-large',
605
- name: 'Large Plant',
606
- category: 'plants',
607
- icon: 'tree',
608
- width: 0.5,
609
- depth: 0.5,
610
- height: 1.4,
611
- color: '#228B22',
612
- tags: ['any'],
613
- stackable: false,
614
- wallMounted: false,
615
- price: 49,
616
- },
617
- {
618
- id: 'plant-small',
619
- name: 'Small Plant',
620
- category: 'plants',
621
- icon: 'tree',
622
- width: 0.2,
623
- depth: 0.2,
624
- height: 0.35,
625
- color: '#2E8B57',
626
- tags: ['any'],
627
- stackable: true,
628
- wallMounted: false,
629
- price: 19,
630
- },
631
- {
632
- id: 'flower-vase',
633
- name: 'Flower Vase',
634
- category: 'plants',
635
- icon: 'tree',
636
- width: 0.15,
637
- depth: 0.15,
638
- height: 0.35,
639
- color: '#FF69B4',
640
- tags: ['decor'],
641
- stackable: true,
642
- wallMounted: false,
643
- price: 25,
644
- },
645
- // Electronics
646
- {
647
- id: 'tv-65',
648
- name: '65" TV',
649
- category: 'electronics',
650
- icon: 'monitor',
651
- width: 1.45,
652
- depth: 0.08,
653
- height: 0.85,
654
- color: '#1a1a1a',
655
- tags: ['living'],
656
- stackable: false,
657
- wallMounted: true,
658
- price: 799,
659
- },
660
- {
661
- id: 'tv-50',
662
- name: '50" TV',
663
- category: 'electronics',
664
- icon: 'monitor',
665
- width: 1.12,
666
- depth: 0.08,
667
- height: 0.65,
668
- color: '#1a1a1a',
669
- tags: ['living', 'bedroom'],
670
- stackable: false,
671
- wallMounted: true,
672
- price: 449,
673
- },
674
- {
675
- id: 'computer',
676
- name: 'Desktop Computer',
677
- category: 'electronics',
678
- icon: 'monitor',
679
- width: 0.55,
680
- depth: 0.3,
681
- height: 0.45,
682
- color: '#2F4F4F',
683
- tags: ['office'],
684
- stackable: false,
685
- wallMounted: false,
686
- price: 999,
687
- },
688
- // Rugs
689
- {
690
- id: 'rug-large',
691
- name: 'Large Area Rug',
692
- category: 'rugs',
693
- icon: 'box',
694
- width: 2.5,
695
- depth: 3.5,
696
- height: 0.02,
697
- color: '#8B4513',
698
- tags: ['living'],
699
- stackable: false,
700
- wallMounted: false,
701
- price: 199,
702
- },
703
- {
704
- id: 'rug-round',
705
- name: 'Round Rug',
706
- category: 'rugs',
707
- icon: 'circle',
708
- width: 1.5,
709
- depth: 1.5,
710
- height: 0.02,
711
- color: '#CD853F',
712
- tags: ['any'],
713
- stackable: false,
714
- wallMounted: false,
715
- price: 129,
716
- },
717
- // Outdoor
718
- {
719
- id: 'patio-table',
720
- name: 'Patio Table',
721
- category: 'outdoor',
722
- icon: 'cloud',
723
- width: 1.0,
724
- depth: 1.0,
725
- height: 0.72,
726
- color: '#808080',
727
- tags: ['outdoor'],
728
- stackable: false,
729
- wallMounted: false,
730
- price: 249,
731
- },
732
- {
733
- id: 'patio-chair',
734
- name: 'Patio Chair',
735
- category: 'outdoor',
736
- icon: 'chair',
737
- width: 0.55,
738
- depth: 0.55,
739
- height: 0.85,
740
- color: '#808080',
741
- tags: ['outdoor'],
742
- stackable: true,
743
- wallMounted: false,
744
- price: 99,
745
- },
746
- {
747
- id: 'bbq-grill',
748
- name: 'BBQ Grill',
749
- category: 'outdoor',
750
- icon: 'zap',
751
- width: 1.2,
752
- depth: 0.6,
753
- height: 1.1,
754
- color: '#333333',
755
- tags: ['outdoor'],
756
- stackable: false,
757
- wallMounted: false,
758
- price: 399,
759
- },
760
- // Kitchen
761
- {
762
- id: 'counter',
763
- name: 'Kitchen Counter',
764
- category: 'kitchen',
765
- icon: 'box',
766
- width: 0.6,
767
- depth: 0.6,
768
- height: 0.9,
769
- color: '#D2B48C',
770
- tags: ['kitchen'],
771
- stackable: false,
772
- wallMounted: false,
773
- price: 199,
774
- },
775
- {
776
- id: 'island',
777
- name: 'Kitchen Island',
778
- category: 'kitchen',
779
- icon: 'box',
780
- width: 1.5,
781
- depth: 0.8,
782
- height: 0.9,
783
- color: '#DCDCDC',
784
- tags: ['kitchen'],
785
- stackable: false,
786
- wallMounted: false,
787
- price: 599,
788
- },
789
- {
790
- id: 'cabinet-upper',
791
- name: 'Upper Cabinet',
792
- category: 'kitchen',
793
- icon: 'archive',
794
- width: 0.6,
795
- depth: 0.35,
796
- height: 0.7,
797
- color: '#F5DEB3',
798
- tags: ['kitchen'],
799
- stackable: false,
800
- wallMounted: true,
801
- price: 149,
802
- },
803
- // Office
804
- {
805
- id: 'filing-cabinet',
806
- name: 'Filing Cabinet',
807
- category: 'office',
808
- icon: 'archive',
809
- width: 0.4,
810
- depth: 0.6,
811
- height: 1.0,
812
- color: '#808080',
813
- tags: ['office'],
814
- stackable: false,
815
- wallMounted: false,
816
- price: 129,
817
- },
818
- {
819
- id: 'whiteboard',
820
- name: 'Whiteboard',
821
- category: 'office',
822
- icon: 'clipboard',
823
- width: 1.2,
824
- depth: 0.05,
825
- height: 0.9,
826
- color: '#ffffff',
827
- tags: ['office'],
828
- stackable: false,
829
- wallMounted: true,
830
- price: 99,
831
- },
22
+ // Seating
23
+ {
24
+ id: "sofa-3seat",
25
+ name: "3-Seat Sofa",
26
+ category: "seating",
27
+ icon: "sofa",
28
+ width: 2.2,
29
+ depth: 0.9,
30
+ height: 0.85,
31
+ color: "#8B7355",
32
+ tags: ["living", "comfort"],
33
+ stackable: false,
34
+ wallMounted: false,
35
+ price: 599
36
+ },
37
+ {
38
+ id: "sofa-2seat",
39
+ name: "Love Seat",
40
+ category: "seating",
41
+ icon: "sofa",
42
+ width: 1.5,
43
+ depth: 0.85,
44
+ height: 0.82,
45
+ color: "#A0522D",
46
+ tags: ["living"],
47
+ stackable: false,
48
+ wallMounted: false,
49
+ price: 399
50
+ },
51
+ {
52
+ id: "armchair",
53
+ name: "Armchair",
54
+ category: "seating",
55
+ icon: "chair",
56
+ width: 0.85,
57
+ depth: 0.85,
58
+ height: 0.9,
59
+ color: "#6B4423",
60
+ tags: ["living", "comfort"],
61
+ stackable: false,
62
+ wallMounted: false,
63
+ price: 249
64
+ },
65
+ {
66
+ id: "dining-chair",
67
+ name: "Dining Chair",
68
+ category: "seating",
69
+ icon: "chair",
70
+ width: 0.45,
71
+ depth: 0.45,
72
+ height: 0.9,
73
+ color: "#8B7355",
74
+ tags: ["dining"],
75
+ stackable: true,
76
+ wallMounted: false,
77
+ price: 79
78
+ },
79
+ {
80
+ id: "office-chair",
81
+ name: "Office Chair",
82
+ category: "seating",
83
+ icon: "chair",
84
+ width: 0.6,
85
+ depth: 0.6,
86
+ height: 1.1,
87
+ color: "#333333",
88
+ tags: ["office"],
89
+ stackable: false,
90
+ wallMounted: false,
91
+ price: 199
92
+ },
93
+ {
94
+ id: "bar-stool",
95
+ name: "Bar Stool",
96
+ category: "seating",
97
+ icon: "chair",
98
+ width: 0.4,
99
+ depth: 0.4,
100
+ height: 0.75,
101
+ color: "#696969",
102
+ tags: ["kitchen", "bar"],
103
+ stackable: true,
104
+ wallMounted: false,
105
+ price: 89
106
+ },
107
+ {
108
+ id: "bean-bag",
109
+ name: "Bean Bag",
110
+ category: "seating",
111
+ icon: "droplet",
112
+ width: 0.8,
113
+ depth: 0.8,
114
+ height: 0.7,
115
+ color: "#ff6b6b",
116
+ tags: ["casual"],
117
+ stackable: false,
118
+ wallMounted: false,
119
+ price: 59
120
+ },
121
+ // Tables
122
+ {
123
+ id: "dining-table-6",
124
+ name: "Dining Table (6p)",
125
+ category: "tables",
126
+ icon: "box",
127
+ width: 1.8,
128
+ depth: 0.9,
129
+ height: 0.75,
130
+ color: "#8B6914",
131
+ tags: ["dining"],
132
+ stackable: false,
133
+ wallMounted: false,
134
+ price: 499
135
+ },
136
+ {
137
+ id: "dining-table-4",
138
+ name: "Dining Table (4p)",
139
+ category: "tables",
140
+ icon: "box",
141
+ width: 1.2,
142
+ depth: 0.8,
143
+ height: 0.75,
144
+ color: "#A0522D",
145
+ tags: ["dining"],
146
+ stackable: false,
147
+ wallMounted: false,
148
+ price: 349
149
+ },
150
+ {
151
+ id: "coffee-table",
152
+ name: "Coffee Table",
153
+ category: "tables",
154
+ icon: "box",
155
+ width: 1.2,
156
+ depth: 0.6,
157
+ height: 0.45,
158
+ color: "#654321",
159
+ tags: ["living"],
160
+ stackable: false,
161
+ wallMounted: false,
162
+ price: 179
163
+ },
164
+ {
165
+ id: "side-table",
166
+ name: "Side Table",
167
+ category: "tables",
168
+ icon: "box",
169
+ width: 0.5,
170
+ depth: 0.5,
171
+ height: 0.55,
172
+ color: "#8B6914",
173
+ tags: ["living", "bedroom"],
174
+ stackable: false,
175
+ wallMounted: false,
176
+ price: 99
177
+ },
178
+ {
179
+ id: "desk",
180
+ name: "Office Desk",
181
+ category: "tables",
182
+ icon: "box",
183
+ width: 1.4,
184
+ depth: 0.7,
185
+ height: 0.75,
186
+ color: "#696969",
187
+ tags: ["office"],
188
+ stackable: false,
189
+ wallMounted: false,
190
+ price: 299
191
+ },
192
+ {
193
+ id: "console-table",
194
+ name: "Console Table",
195
+ category: "tables",
196
+ icon: "box",
197
+ width: 1.2,
198
+ depth: 0.35,
199
+ height: 0.8,
200
+ color: "#B8860B",
201
+ tags: ["hallway"],
202
+ stackable: false,
203
+ wallMounted: false,
204
+ price: 199
205
+ },
206
+ // Beds
207
+ {
208
+ id: "bed-king",
209
+ name: "King Bed",
210
+ category: "beds",
211
+ icon: "bed",
212
+ width: 1.9,
213
+ depth: 2.1,
214
+ height: 0.6,
215
+ color: "#F5DEB3",
216
+ tags: ["bedroom"],
217
+ stackable: false,
218
+ wallMounted: false,
219
+ price: 899
220
+ },
221
+ {
222
+ id: "bed-queen",
223
+ name: "Queen Bed",
224
+ category: "beds",
225
+ icon: "bed",
226
+ width: 1.6,
227
+ depth: 2,
228
+ height: 0.6,
229
+ color: "#DEB887",
230
+ tags: ["bedroom"],
231
+ stackable: false,
232
+ wallMounted: false,
233
+ price: 699
234
+ },
235
+ {
236
+ id: "bed-single",
237
+ name: "Single Bed",
238
+ category: "beds",
239
+ icon: "bed",
240
+ width: 1,
241
+ depth: 2,
242
+ height: 0.55,
243
+ color: "#87CEEB",
244
+ tags: ["bedroom", "kids"],
245
+ stackable: false,
246
+ wallMounted: false,
247
+ price: 349
248
+ },
249
+ {
250
+ id: "bunk-bed",
251
+ name: "Bunk Bed",
252
+ category: "beds",
253
+ icon: "bed",
254
+ width: 1,
255
+ depth: 2,
256
+ height: 1.7,
257
+ color: "#BC8F8F",
258
+ tags: ["kids"],
259
+ stackable: false,
260
+ wallMounted: false,
261
+ price: 499
262
+ },
263
+ {
264
+ id: "crib",
265
+ name: "Baby Crib",
266
+ category: "beds",
267
+ icon: "bed",
268
+ width: 0.7,
269
+ depth: 1.3,
270
+ height: 1,
271
+ color: "#FFFAF0",
272
+ tags: ["nursery"],
273
+ stackable: false,
274
+ wallMounted: false,
275
+ price: 299
276
+ },
277
+ // Storage
278
+ {
279
+ id: "bookshelf",
280
+ name: "Bookshelf",
281
+ category: "storage",
282
+ icon: "book",
283
+ width: 0.8,
284
+ depth: 0.35,
285
+ height: 1.8,
286
+ color: "#8B6914",
287
+ tags: ["living", "office"],
288
+ stackable: false,
289
+ wallMounted: false,
290
+ price: 229
291
+ },
292
+ {
293
+ id: "wardrobe",
294
+ name: "Wardrobe",
295
+ category: "storage",
296
+ icon: "door",
297
+ width: 1.2,
298
+ depth: 0.6,
299
+ height: 2,
300
+ color: "#A0522D",
301
+ tags: ["bedroom"],
302
+ stackable: false,
303
+ wallMounted: false,
304
+ price: 449
305
+ },
306
+ {
307
+ id: "tv-unit",
308
+ name: "TV Unit",
309
+ category: "storage",
310
+ icon: "monitor",
311
+ width: 1.6,
312
+ depth: 0.45,
313
+ height: 0.55,
314
+ color: "#36454F",
315
+ tags: ["living"],
316
+ stackable: false,
317
+ wallMounted: false,
318
+ price: 329
319
+ },
320
+ {
321
+ id: "dresser",
322
+ name: "Dresser",
323
+ category: "storage",
324
+ icon: "archive",
325
+ width: 1,
326
+ depth: 0.5,
327
+ height: 0.85,
328
+ color: "#DEB887",
329
+ tags: ["bedroom"],
330
+ stackable: false,
331
+ wallMounted: false,
332
+ price: 279
333
+ },
334
+ {
335
+ id: "shelf-wall",
336
+ name: "Wall Shelf",
337
+ category: "storage",
338
+ icon: "ruler",
339
+ width: 0.8,
340
+ depth: 0.2,
341
+ height: 0.03,
342
+ color: "#8B6914",
343
+ tags: ["any"],
344
+ stackable: false,
345
+ wallMounted: true,
346
+ price: 49
347
+ },
348
+ // Lighting
349
+ {
350
+ id: "floor-lamp",
351
+ name: "Floor Lamp",
352
+ category: "lighting",
353
+ icon: "lightbulb",
354
+ width: 0.4,
355
+ depth: 0.4,
356
+ height: 1.7,
357
+ color: "#FFD700",
358
+ tags: ["living"],
359
+ stackable: false,
360
+ wallMounted: false,
361
+ price: 119
362
+ },
363
+ {
364
+ id: "table-lamp",
365
+ name: "Table Lamp",
366
+ category: "lighting",
367
+ icon: "lightbulb",
368
+ width: 0.3,
369
+ depth: 0.3,
370
+ height: 0.5,
371
+ color: "#FAFAD2",
372
+ tags: ["bedroom", "living"],
373
+ stackable: false,
374
+ wallMounted: false,
375
+ price: 59
376
+ },
377
+ {
378
+ id: "ceiling-fan",
379
+ name: "Ceiling Fan",
380
+ category: "lighting",
381
+ icon: "refresh",
382
+ width: 1.2,
383
+ depth: 1.2,
384
+ height: 0.35,
385
+ color: "#C0C0C0",
386
+ tags: ["any"],
387
+ stackable: false,
388
+ wallMounted: false,
389
+ price: 179
390
+ },
391
+ {
392
+ id: "pendant",
393
+ name: "Pendant Light",
394
+ category: "lighting",
395
+ icon: "lightbulb",
396
+ width: 0.4,
397
+ depth: 0.4,
398
+ height: 0.6,
399
+ color: "#FFD700",
400
+ tags: ["kitchen", "dining"],
401
+ stackable: false,
402
+ wallMounted: false,
403
+ price: 149
404
+ },
405
+ // Appliances
406
+ {
407
+ id: "fridge",
408
+ name: "Refrigerator",
409
+ category: "appliances",
410
+ icon: "box",
411
+ width: 0.7,
412
+ depth: 0.7,
413
+ height: 1.8,
414
+ color: "#C0C0C0",
415
+ tags: ["kitchen"],
416
+ stackable: false,
417
+ wallMounted: false,
418
+ price: 999
419
+ },
420
+ {
421
+ id: "stove",
422
+ name: "Stove/Oven",
423
+ category: "appliances",
424
+ icon: "utensils",
425
+ width: 0.6,
426
+ depth: 0.6,
427
+ height: 0.9,
428
+ color: "#696969",
429
+ tags: ["kitchen"],
430
+ stackable: false,
431
+ wallMounted: false,
432
+ price: 799
433
+ },
434
+ {
435
+ id: "dishwasher",
436
+ name: "Dishwasher",
437
+ category: "appliances",
438
+ icon: "utensils",
439
+ width: 0.6,
440
+ depth: 0.6,
441
+ height: 0.85,
442
+ color: "#C0C0C0",
443
+ tags: ["kitchen"],
444
+ stackable: false,
445
+ wallMounted: false,
446
+ price: 549
447
+ },
448
+ {
449
+ id: "washer",
450
+ name: "Washing Machine",
451
+ category: "appliances",
452
+ icon: "box",
453
+ width: 0.6,
454
+ depth: 0.6,
455
+ height: 0.85,
456
+ color: "#f5f5f5",
457
+ tags: ["laundry"],
458
+ stackable: false,
459
+ wallMounted: false,
460
+ price: 599
461
+ },
462
+ {
463
+ id: "microwave",
464
+ name: "Microwave",
465
+ category: "appliances",
466
+ icon: "music",
467
+ width: 0.5,
468
+ depth: 0.4,
469
+ height: 0.3,
470
+ color: "#333333",
471
+ tags: ["kitchen"],
472
+ stackable: true,
473
+ wallMounted: false,
474
+ price: 149
475
+ },
476
+ // Bathroom
477
+ {
478
+ id: "toilet",
479
+ name: "Toilet",
480
+ category: "bathroom",
481
+ icon: "droplet",
482
+ width: 0.4,
483
+ depth: 0.7,
484
+ height: 0.75,
485
+ color: "#FFFFF0",
486
+ tags: ["bathroom"],
487
+ stackable: false,
488
+ wallMounted: false,
489
+ price: 199
490
+ },
491
+ {
492
+ id: "bathtub",
493
+ name: "Bathtub",
494
+ category: "bathroom",
495
+ icon: "droplet",
496
+ width: 0.75,
497
+ depth: 1.7,
498
+ height: 0.6,
499
+ color: "#FFFFF0",
500
+ tags: ["bathroom"],
501
+ stackable: false,
502
+ wallMounted: false,
503
+ price: 599
504
+ },
505
+ {
506
+ id: "shower",
507
+ name: "Shower Cabin",
508
+ category: "bathroom",
509
+ icon: "droplet",
510
+ width: 0.9,
511
+ depth: 0.9,
512
+ height: 2.1,
513
+ color: "#E0FFFF",
514
+ tags: ["bathroom"],
515
+ stackable: false,
516
+ wallMounted: false,
517
+ price: 449
518
+ },
519
+ {
520
+ id: "vanity",
521
+ name: "Bathroom Vanity",
522
+ category: "bathroom",
523
+ icon: "copy",
524
+ width: 0.8,
525
+ depth: 0.5,
526
+ height: 0.85,
527
+ color: "#FFFFF0",
528
+ tags: ["bathroom"],
529
+ stackable: false,
530
+ wallMounted: false,
531
+ price: 349
532
+ },
533
+ {
534
+ id: "sink-kitchen",
535
+ name: "Kitchen Sink",
536
+ category: "kitchen",
537
+ icon: "droplet",
538
+ width: 0.6,
539
+ depth: 0.5,
540
+ height: 0.85,
541
+ color: "#C0C0C0",
542
+ tags: ["kitchen"],
543
+ stackable: false,
544
+ wallMounted: false,
545
+ price: 199
546
+ },
547
+ // Decor
548
+ {
549
+ id: "painting-large",
550
+ name: "Large Painting",
551
+ category: "decor",
552
+ icon: "image",
553
+ width: 1,
554
+ depth: 0.05,
555
+ height: 0.7,
556
+ color: "#B8860B",
557
+ tags: ["any"],
558
+ stackable: false,
559
+ wallMounted: true,
560
+ price: 89
561
+ },
562
+ {
563
+ id: "mirror",
564
+ name: "Wall Mirror",
565
+ category: "decor",
566
+ icon: "copy",
567
+ width: 0.6,
568
+ depth: 0.03,
569
+ height: 0.9,
570
+ color: "#e0e0e0",
571
+ tags: ["bathroom", "hallway"],
572
+ stackable: false,
573
+ wallMounted: true,
574
+ price: 69
575
+ },
576
+ {
577
+ id: "clock",
578
+ name: "Wall Clock",
579
+ category: "decor",
580
+ icon: "clock",
581
+ width: 0.3,
582
+ depth: 0.05,
583
+ height: 0.3,
584
+ color: "#333333",
585
+ tags: ["any"],
586
+ stackable: false,
587
+ wallMounted: true,
588
+ price: 39
589
+ },
590
+ // Plants
591
+ {
592
+ id: "plant-large",
593
+ name: "Large Plant",
594
+ category: "plants",
595
+ icon: "tree",
596
+ width: 0.5,
597
+ depth: 0.5,
598
+ height: 1.4,
599
+ color: "#228B22",
600
+ tags: ["any"],
601
+ stackable: false,
602
+ wallMounted: false,
603
+ price: 49
604
+ },
605
+ {
606
+ id: "plant-small",
607
+ name: "Small Plant",
608
+ category: "plants",
609
+ icon: "tree",
610
+ width: 0.2,
611
+ depth: 0.2,
612
+ height: 0.35,
613
+ color: "#2E8B57",
614
+ tags: ["any"],
615
+ stackable: true,
616
+ wallMounted: false,
617
+ price: 19
618
+ },
619
+ {
620
+ id: "flower-vase",
621
+ name: "Flower Vase",
622
+ category: "plants",
623
+ icon: "tree",
624
+ width: 0.15,
625
+ depth: 0.15,
626
+ height: 0.35,
627
+ color: "#FF69B4",
628
+ tags: ["decor"],
629
+ stackable: true,
630
+ wallMounted: false,
631
+ price: 25
632
+ },
633
+ // Electronics
634
+ {
635
+ id: "tv-65",
636
+ name: '65" TV',
637
+ category: "electronics",
638
+ icon: "monitor",
639
+ width: 1.45,
640
+ depth: 0.08,
641
+ height: 0.85,
642
+ color: "#1a1a1a",
643
+ tags: ["living"],
644
+ stackable: false,
645
+ wallMounted: true,
646
+ price: 799
647
+ },
648
+ {
649
+ id: "tv-50",
650
+ name: '50" TV',
651
+ category: "electronics",
652
+ icon: "monitor",
653
+ width: 1.12,
654
+ depth: 0.08,
655
+ height: 0.65,
656
+ color: "#1a1a1a",
657
+ tags: ["living", "bedroom"],
658
+ stackable: false,
659
+ wallMounted: true,
660
+ price: 449
661
+ },
662
+ {
663
+ id: "computer",
664
+ name: "Desktop Computer",
665
+ category: "electronics",
666
+ icon: "monitor",
667
+ width: 0.55,
668
+ depth: 0.3,
669
+ height: 0.45,
670
+ color: "#2F4F4F",
671
+ tags: ["office"],
672
+ stackable: false,
673
+ wallMounted: false,
674
+ price: 999
675
+ },
676
+ // Rugs
677
+ {
678
+ id: "rug-large",
679
+ name: "Large Area Rug",
680
+ category: "rugs",
681
+ icon: "box",
682
+ width: 2.5,
683
+ depth: 3.5,
684
+ height: 0.02,
685
+ color: "#8B4513",
686
+ tags: ["living"],
687
+ stackable: false,
688
+ wallMounted: false,
689
+ price: 199
690
+ },
691
+ {
692
+ id: "rug-round",
693
+ name: "Round Rug",
694
+ category: "rugs",
695
+ icon: "circle",
696
+ width: 1.5,
697
+ depth: 1.5,
698
+ height: 0.02,
699
+ color: "#CD853F",
700
+ tags: ["any"],
701
+ stackable: false,
702
+ wallMounted: false,
703
+ price: 129
704
+ },
705
+ // Outdoor
706
+ {
707
+ id: "patio-table",
708
+ name: "Patio Table",
709
+ category: "outdoor",
710
+ icon: "cloud",
711
+ width: 1,
712
+ depth: 1,
713
+ height: 0.72,
714
+ color: "#808080",
715
+ tags: ["outdoor"],
716
+ stackable: false,
717
+ wallMounted: false,
718
+ price: 249
719
+ },
720
+ {
721
+ id: "patio-chair",
722
+ name: "Patio Chair",
723
+ category: "outdoor",
724
+ icon: "chair",
725
+ width: 0.55,
726
+ depth: 0.55,
727
+ height: 0.85,
728
+ color: "#808080",
729
+ tags: ["outdoor"],
730
+ stackable: true,
731
+ wallMounted: false,
732
+ price: 99
733
+ },
734
+ {
735
+ id: "bbq-grill",
736
+ name: "BBQ Grill",
737
+ category: "outdoor",
738
+ icon: "zap",
739
+ width: 1.2,
740
+ depth: 0.6,
741
+ height: 1.1,
742
+ color: "#333333",
743
+ tags: ["outdoor"],
744
+ stackable: false,
745
+ wallMounted: false,
746
+ price: 399
747
+ },
748
+ // Kitchen
749
+ {
750
+ id: "counter",
751
+ name: "Kitchen Counter",
752
+ category: "kitchen",
753
+ icon: "box",
754
+ width: 0.6,
755
+ depth: 0.6,
756
+ height: 0.9,
757
+ color: "#D2B48C",
758
+ tags: ["kitchen"],
759
+ stackable: false,
760
+ wallMounted: false,
761
+ price: 199
762
+ },
763
+ {
764
+ id: "island",
765
+ name: "Kitchen Island",
766
+ category: "kitchen",
767
+ icon: "box",
768
+ width: 1.5,
769
+ depth: 0.8,
770
+ height: 0.9,
771
+ color: "#DCDCDC",
772
+ tags: ["kitchen"],
773
+ stackable: false,
774
+ wallMounted: false,
775
+ price: 599
776
+ },
777
+ {
778
+ id: "cabinet-upper",
779
+ name: "Upper Cabinet",
780
+ category: "kitchen",
781
+ icon: "archive",
782
+ width: 0.6,
783
+ depth: 0.35,
784
+ height: 0.7,
785
+ color: "#F5DEB3",
786
+ tags: ["kitchen"],
787
+ stackable: false,
788
+ wallMounted: true,
789
+ price: 149
790
+ },
791
+ // Office
792
+ {
793
+ id: "filing-cabinet",
794
+ name: "Filing Cabinet",
795
+ category: "office",
796
+ icon: "archive",
797
+ width: 0.4,
798
+ depth: 0.6,
799
+ height: 1,
800
+ color: "#808080",
801
+ tags: ["office"],
802
+ stackable: false,
803
+ wallMounted: false,
804
+ price: 129
805
+ },
806
+ {
807
+ id: "whiteboard",
808
+ name: "Whiteboard",
809
+ category: "office",
810
+ icon: "clipboard",
811
+ width: 1.2,
812
+ depth: 0.05,
813
+ height: 0.9,
814
+ color: "#ffffff",
815
+ tags: ["office"],
816
+ stackable: false,
817
+ wallMounted: true,
818
+ price: 99
819
+ }
832
820
  ];
833
821
  const FURNITURE_CATEGORIES = [
834
- { id: 'seating', name: 'Seating', icon: 'sofa' },
835
- { id: 'tables', name: 'Tables', icon: 'box' },
836
- { id: 'beds', name: 'Beds', icon: 'bed' },
837
- { id: 'storage', name: 'Storage', icon: 'book' },
838
- { id: 'lighting', name: 'Lighting', icon: 'lightbulb' },
839
- { id: 'appliances', name: 'Appliances', icon: 'box' },
840
- { id: 'bathroom', name: 'Bathroom', icon: 'droplet' },
841
- { id: 'kitchen', name: 'Kitchen', icon: 'utensils' },
842
- { id: 'decor', name: 'Decor', icon: 'image' },
843
- { id: 'plants', name: 'Plants', icon: 'tree' },
844
- { id: 'electronics', name: 'Electronics', icon: 'monitor' },
845
- { id: 'rugs', name: 'Rugs', icon: 'box' },
846
- { id: 'outdoor', name: 'Outdoor', icon: 'cloud' },
847
- { id: 'office', name: 'Office', icon: 'monitor' },
822
+ { id: "seating", name: "Seating", icon: "sofa" },
823
+ { id: "tables", name: "Tables", icon: "box" },
824
+ { id: "beds", name: "Beds", icon: "bed" },
825
+ { id: "storage", name: "Storage", icon: "book" },
826
+ { id: "lighting", name: "Lighting", icon: "lightbulb" },
827
+ { id: "appliances", name: "Appliances", icon: "box" },
828
+ { id: "bathroom", name: "Bathroom", icon: "droplet" },
829
+ { id: "kitchen", name: "Kitchen", icon: "utensils" },
830
+ { id: "decor", name: "Decor", icon: "image" },
831
+ { id: "plants", name: "Plants", icon: "tree" },
832
+ { id: "electronics", name: "Electronics", icon: "monitor" },
833
+ { id: "rugs", name: "Rugs", icon: "box" },
834
+ { id: "outdoor", name: "Outdoor", icon: "cloud" },
835
+ { id: "office", name: "Office", icon: "monitor" }
848
836
  ];
849
- /* ════════════════════════════════════════════════════════════════
850
- ROOM PRESETS
851
- ════════════════════════════════════════════════════════════════ */
852
837
  const ROOM_PRESETS = [
853
- {
854
- id: 'living-modern',
855
- name: 'Modern Living Room',
856
- icon: 'sofa',
857
- items: [
858
- { itemId: 'sofa-3seat', x: 0, z: -1.5, rotation: 0 },
859
- { itemId: 'coffee-table', x: 0, z: 0, rotation: 0 },
860
- { itemId: 'tv-unit', x: 0, z: 2, rotation: 180 },
861
- { itemId: 'tv-65', x: 0, z: 2.2, rotation: 180 },
862
- { itemId: 'floor-lamp', x: -1.5, z: -1.5, rotation: 0 },
863
- { itemId: 'rug-large', x: 0, z: 0, rotation: 0 },
864
- { itemId: 'plant-large', x: 1.8, z: -1.8, rotation: 0 },
865
- ],
866
- },
867
- {
868
- id: 'bedroom-master',
869
- name: 'Master Bedroom',
870
- icon: 'bed',
871
- items: [
872
- { itemId: 'bed-queen', x: 0, z: -0.5, rotation: 0 },
873
- { itemId: 'side-table', x: -1.1, z: -0.5, rotation: 0 },
874
- { itemId: 'side-table', x: 1.1, z: -0.5, rotation: 0 },
875
- { itemId: 'table-lamp', x: -1.1, z: -0.5, rotation: 0 },
876
- { itemId: 'table-lamp', x: 1.1, z: -0.5, rotation: 0 },
877
- { itemId: 'wardrobe', x: -2, z: 1.5, rotation: 90 },
878
- { itemId: 'dresser', x: 2, z: 1, rotation: -90 },
879
- ],
880
- },
881
- {
882
- id: 'kitchen-l',
883
- name: 'L-Shaped Kitchen',
884
- icon: 'utensils',
885
- items: [
886
- { itemId: 'counter', x: -1.5, z: -2, rotation: 0 },
887
- { itemId: 'counter', x: -0.9, z: -2, rotation: 0 },
888
- { itemId: 'sink-kitchen', x: -0.3, z: -2, rotation: 0 },
889
- { itemId: 'counter', x: 0.3, z: -2, rotation: 0 },
890
- { itemId: 'stove', x: 0.9, z: -2, rotation: 0 },
891
- { itemId: 'counter', x: 1.5, z: -2, rotation: 0 },
892
- { itemId: 'fridge', x: 1.5, z: -1.2, rotation: 90 },
893
- { itemId: 'island', x: 0, z: 0, rotation: 0 },
894
- { itemId: 'bar-stool', x: -0.4, z: 0.6, rotation: 0 },
895
- { itemId: 'bar-stool', x: 0.4, z: 0.6, rotation: 0 },
896
- ],
897
- },
898
- {
899
- id: 'bathroom-main',
900
- name: 'Main Bathroom',
901
- icon: 'droplet',
902
- items: [
903
- { itemId: 'bathtub', x: -0.6, z: -1, rotation: 0 },
904
- { itemId: 'vanity', x: 0.8, z: -1.5, rotation: 90 },
905
- { itemId: 'toilet', x: 0.8, z: 0, rotation: 90 },
906
- { itemId: 'mirror', x: 0.8, z: -1.5, rotation: 90 },
907
- ],
908
- },
909
- {
910
- id: 'office-home',
911
- name: 'Home Office',
912
- icon: 'monitor',
913
- items: [
914
- { itemId: 'desk', x: 0, z: -1.2, rotation: 0 },
915
- { itemId: 'office-chair', x: 0, z: -0.3, rotation: 0 },
916
- { itemId: 'computer', x: 0, z: -1.3, rotation: 0 },
917
- { itemId: 'bookshelf', x: 1.5, z: -1.5, rotation: 90 },
918
- { itemId: 'filing-cabinet', x: -1.2, z: -1.5, rotation: 0 },
919
- { itemId: 'plant-small', x: 0.6, z: -1.3, rotation: 0 },
920
- ],
921
- },
922
- {
923
- id: 'dining-formal',
924
- name: 'Formal Dining Room',
925
- icon: 'utensils',
926
- items: [
927
- { itemId: 'dining-table-6', x: 0, z: 0, rotation: 0 },
928
- { itemId: 'dining-chair', x: -0.7, z: -0.6, rotation: 0 },
929
- { itemId: 'dining-chair', x: 0, z: -0.6, rotation: 0 },
930
- { itemId: 'dining-chair', x: 0.7, z: -0.6, rotation: 0 },
931
- { itemId: 'dining-chair', x: -0.7, z: 0.6, rotation: 180 },
932
- { itemId: 'dining-chair', x: 0, z: 0.6, rotation: 180 },
933
- { itemId: 'dining-chair', x: 0.7, z: 0.6, rotation: 180 },
934
- { itemId: 'console-table', x: -2, z: 0, rotation: 90 },
935
- { itemId: 'painting-large', x: -2.5, z: 0, rotation: 90 },
936
- ],
937
- },
838
+ {
839
+ id: "living-modern",
840
+ name: "Modern Living Room",
841
+ icon: "sofa",
842
+ items: [
843
+ { itemId: "sofa-3seat", x: 0, z: -1.5, rotation: 0 },
844
+ { itemId: "coffee-table", x: 0, z: 0, rotation: 0 },
845
+ { itemId: "tv-unit", x: 0, z: 2, rotation: 180 },
846
+ { itemId: "tv-65", x: 0, z: 2.2, rotation: 180 },
847
+ { itemId: "floor-lamp", x: -1.5, z: -1.5, rotation: 0 },
848
+ { itemId: "rug-large", x: 0, z: 0, rotation: 0 },
849
+ { itemId: "plant-large", x: 1.8, z: -1.8, rotation: 0 }
850
+ ]
851
+ },
852
+ {
853
+ id: "bedroom-master",
854
+ name: "Master Bedroom",
855
+ icon: "bed",
856
+ items: [
857
+ { itemId: "bed-queen", x: 0, z: -0.5, rotation: 0 },
858
+ { itemId: "side-table", x: -1.1, z: -0.5, rotation: 0 },
859
+ { itemId: "side-table", x: 1.1, z: -0.5, rotation: 0 },
860
+ { itemId: "table-lamp", x: -1.1, z: -0.5, rotation: 0 },
861
+ { itemId: "table-lamp", x: 1.1, z: -0.5, rotation: 0 },
862
+ { itemId: "wardrobe", x: -2, z: 1.5, rotation: 90 },
863
+ { itemId: "dresser", x: 2, z: 1, rotation: -90 }
864
+ ]
865
+ },
866
+ {
867
+ id: "kitchen-l",
868
+ name: "L-Shaped Kitchen",
869
+ icon: "utensils",
870
+ items: [
871
+ { itemId: "counter", x: -1.5, z: -2, rotation: 0 },
872
+ { itemId: "counter", x: -0.9, z: -2, rotation: 0 },
873
+ { itemId: "sink-kitchen", x: -0.3, z: -2, rotation: 0 },
874
+ { itemId: "counter", x: 0.3, z: -2, rotation: 0 },
875
+ { itemId: "stove", x: 0.9, z: -2, rotation: 0 },
876
+ { itemId: "counter", x: 1.5, z: -2, rotation: 0 },
877
+ { itemId: "fridge", x: 1.5, z: -1.2, rotation: 90 },
878
+ { itemId: "island", x: 0, z: 0, rotation: 0 },
879
+ { itemId: "bar-stool", x: -0.4, z: 0.6, rotation: 0 },
880
+ { itemId: "bar-stool", x: 0.4, z: 0.6, rotation: 0 }
881
+ ]
882
+ },
883
+ {
884
+ id: "bathroom-main",
885
+ name: "Main Bathroom",
886
+ icon: "droplet",
887
+ items: [
888
+ { itemId: "bathtub", x: -0.6, z: -1, rotation: 0 },
889
+ { itemId: "vanity", x: 0.8, z: -1.5, rotation: 90 },
890
+ { itemId: "toilet", x: 0.8, z: 0, rotation: 90 },
891
+ { itemId: "mirror", x: 0.8, z: -1.5, rotation: 90 }
892
+ ]
893
+ },
894
+ {
895
+ id: "office-home",
896
+ name: "Home Office",
897
+ icon: "monitor",
898
+ items: [
899
+ { itemId: "desk", x: 0, z: -1.2, rotation: 0 },
900
+ { itemId: "office-chair", x: 0, z: -0.3, rotation: 0 },
901
+ { itemId: "computer", x: 0, z: -1.3, rotation: 0 },
902
+ { itemId: "bookshelf", x: 1.5, z: -1.5, rotation: 90 },
903
+ { itemId: "filing-cabinet", x: -1.2, z: -1.5, rotation: 0 },
904
+ { itemId: "plant-small", x: 0.6, z: -1.3, rotation: 0 }
905
+ ]
906
+ },
907
+ {
908
+ id: "dining-formal",
909
+ name: "Formal Dining Room",
910
+ icon: "utensils",
911
+ items: [
912
+ { itemId: "dining-table-6", x: 0, z: 0, rotation: 0 },
913
+ { itemId: "dining-chair", x: -0.7, z: -0.6, rotation: 0 },
914
+ { itemId: "dining-chair", x: 0, z: -0.6, rotation: 0 },
915
+ { itemId: "dining-chair", x: 0.7, z: -0.6, rotation: 0 },
916
+ { itemId: "dining-chair", x: -0.7, z: 0.6, rotation: 180 },
917
+ { itemId: "dining-chair", x: 0, z: 0.6, rotation: 180 },
918
+ { itemId: "dining-chair", x: 0.7, z: 0.6, rotation: 180 },
919
+ { itemId: "console-table", x: -2, z: 0, rotation: 90 },
920
+ { itemId: "painting-large", x: -2.5, z: 0, rotation: 90 }
921
+ ]
922
+ }
938
923
  ];
939
- /* ════════════════════════════════════════════════════════════════
940
- FURNITURE MESH CREATION
941
- ════════════════════════════════════════════════════════════════ */
942
924
  function createFurnitureMesh(item, color) {
943
- const geometry = new THREE__namespace.BoxGeometry(item.width, item.height, item.depth);
944
- const material = new THREE__namespace.MeshStandardMaterial({
945
- color: color || item.color,
946
- roughness: 0.7,
947
- metalness: 0.1,
948
- });
949
- const mesh = new THREE__namespace.Mesh(geometry, material);
950
- mesh.name = item.name;
951
- mesh.position.y = item.height / 2;
952
- mesh.castShadow = true;
953
- mesh.receiveShadow = true;
954
- mesh.userData = { simsType: 'furniture', itemData: item };
955
- return mesh;
925
+ const geometry = new THREE__namespace.BoxGeometry(item.width, item.height, item.depth);
926
+ const material = new THREE__namespace.MeshStandardMaterial({
927
+ color: color || item.color,
928
+ roughness: 0.7,
929
+ metalness: 0.1
930
+ });
931
+ const mesh = new THREE__namespace.Mesh(geometry, material);
932
+ mesh.name = item.name;
933
+ mesh.position.y = item.height / 2;
934
+ mesh.castShadow = true;
935
+ mesh.receiveShadow = true;
936
+ mesh.userData = { simsType: "furniture", itemData: item };
937
+ return mesh;
956
938
  }
957
939
  function placeFurnitureInScene(scene, item, position, rotation = 0, gridSize = 0.5, snapEnabled = true) {
958
- const mesh = createFurnitureMesh(item);
959
- const pos = snapEnabled
960
- ? new THREE__namespace.Vector3(Math.round(position.x / gridSize) * gridSize, position.y, Math.round(position.z / gridSize) * gridSize)
961
- : position.clone();
962
- mesh.position.set(pos.x, item.height / 2, pos.z);
963
- mesh.rotation.y = (rotation * Math.PI) / 180;
964
- const id = `placed_${item.id}_${Date.now()}`;
965
- mesh.userData.placedId = id;
966
- scene.add(mesh);
967
- return {
968
- id,
969
- itemId: item.id,
970
- position: pos,
971
- rotation,
972
- scale: new THREE__namespace.Vector3(1, 1, 1),
973
- locked: false,
974
- };
940
+ const mesh = createFurnitureMesh(item);
941
+ const pos = snapEnabled ? new THREE__namespace.Vector3(
942
+ Math.round(position.x / gridSize) * gridSize,
943
+ position.y,
944
+ Math.round(position.z / gridSize) * gridSize
945
+ ) : position.clone();
946
+ mesh.position.set(pos.x, item.height / 2, pos.z);
947
+ mesh.rotation.y = rotation * Math.PI / 180;
948
+ const id = `placed_${item.id}_${Date.now()}`;
949
+ mesh.userData.placedId = id;
950
+ scene.add(mesh);
951
+ return {
952
+ id,
953
+ itemId: item.id,
954
+ position: pos,
955
+ rotation,
956
+ scale: new THREE__namespace.Vector3(1, 1, 1),
957
+ locked: false
958
+ };
975
959
  }
976
960
  function removeFurnitureFromScene(scene, placedId) {
977
- const obj = scene.children.find((c) => { var _a; return ((_a = c.userData) === null || _a === void 0 ? void 0 : _a.placedId) === placedId; });
978
- if (obj) {
979
- scene.remove(obj);
980
- if (obj instanceof THREE__namespace.Mesh) {
981
- obj.geometry.dispose();
982
- if (Array.isArray(obj.material)) {
983
- obj.material.forEach((m) => m.dispose());
984
- }
985
- else {
986
- obj.material.dispose();
987
- }
988
- }
961
+ const obj = scene.children.find((c) => c.userData?.placedId === placedId);
962
+ if (obj) {
963
+ scene.remove(obj);
964
+ if (obj instanceof THREE__namespace.Mesh) {
965
+ obj.geometry.dispose();
966
+ if (Array.isArray(obj.material)) {
967
+ obj.material.forEach((m) => m.dispose());
968
+ } else {
969
+ obj.material.dispose();
970
+ }
989
971
  }
972
+ }
990
973
  }
991
974
  function rotatePlacedItem(scene, placedId, degrees) {
992
- const obj = scene.children.find((c) => { var _a; return ((_a = c.userData) === null || _a === void 0 ? void 0 : _a.placedId) === placedId; });
993
- if (obj) {
994
- obj.rotation.y += (degrees * Math.PI) / 180;
995
- }
975
+ const obj = scene.children.find((c) => c.userData?.placedId === placedId);
976
+ if (obj) {
977
+ obj.rotation.y += degrees * Math.PI / 180;
978
+ }
996
979
  }
997
980
  function resizePlacedItem(scene, placedId, scale) {
998
- const obj = scene.children.find((c) => { var _a; return ((_a = c.userData) === null || _a === void 0 ? void 0 : _a.placedId) === placedId; });
999
- if (obj) {
1000
- obj.scale.copy(scale);
1001
- }
981
+ const obj = scene.children.find((c) => c.userData?.placedId === placedId);
982
+ if (obj) {
983
+ obj.scale.copy(scale);
984
+ }
1002
985
  }
1003
- /* ════════════════════════════════════════════════════════════════
1004
- DRAG & DROP HELPERS
1005
- ════════════════════════════════════════════════════════════════ */
1006
986
  function createDragPreview(item) {
1007
- const geometry = new THREE__namespace.BoxGeometry(item.width, item.height, item.depth);
1008
- const material = new THREE__namespace.MeshStandardMaterial({
1009
- color: item.color,
1010
- transparent: true,
1011
- opacity: 0.5,
1012
- depthWrite: false,
1013
- });
1014
- const mesh = new THREE__namespace.Mesh(geometry, material);
1015
- mesh.name = '__dragPreview';
1016
- mesh.position.y = item.height / 2;
1017
- return mesh;
987
+ const geometry = new THREE__namespace.BoxGeometry(item.width, item.height, item.depth);
988
+ const material = new THREE__namespace.MeshStandardMaterial({
989
+ color: item.color,
990
+ transparent: true,
991
+ opacity: 0.5,
992
+ depthWrite: false
993
+ });
994
+ const mesh = new THREE__namespace.Mesh(geometry, material);
995
+ mesh.name = "__dragPreview";
996
+ mesh.position.y = item.height / 2;
997
+ return mesh;
1018
998
  }
1019
999
  function getFloorIntersection(raycaster, camera, mouse, floorY = 0) {
1020
- raycaster.setFromCamera(mouse, camera);
1021
- const plane = new THREE__namespace.Plane(new THREE__namespace.Vector3(0, 1, 0), -floorY);
1022
- const target = new THREE__namespace.Vector3();
1023
- const hit = raycaster.ray.intersectPlane(plane, target);
1024
- return hit;
1000
+ raycaster.setFromCamera(mouse, camera);
1001
+ const plane = new THREE__namespace.Plane(new THREE__namespace.Vector3(0, 1, 0), -floorY);
1002
+ const target = new THREE__namespace.Vector3();
1003
+ const hit = raycaster.ray.intersectPlane(plane, target);
1004
+ return hit;
1025
1005
  }
1026
- /* ════════════════════════════════════════════════════════════════
1027
- COLLISION CHECK
1028
- ════════════════════════════════════════════════════════════════ */
1029
1006
  function checkFurnitureCollision(item, position, rotation, existing, catalog) {
1030
- const bounds = getRotatedBounds(item, position, rotation);
1031
- for (const placed of existing) {
1032
- const existingItem = catalog.find((c) => c.id === placed.itemId);
1033
- if (!existingItem) {
1034
- continue;
1035
- }
1036
- const existBounds = getRotatedBounds(existingItem, placed.position, placed.rotation);
1037
- if (boundsOverlap(bounds, existBounds)) {
1038
- return true;
1039
- }
1007
+ const bounds = getRotatedBounds(item, position, rotation);
1008
+ for (const placed of existing) {
1009
+ const existingItem = catalog.find((c) => c.id === placed.itemId);
1010
+ if (!existingItem) {
1011
+ continue;
1012
+ }
1013
+ const existBounds = getRotatedBounds(existingItem, placed.position, placed.rotation);
1014
+ if (boundsOverlap(bounds, existBounds)) {
1015
+ return true;
1040
1016
  }
1041
- return false;
1017
+ }
1018
+ return false;
1042
1019
  }
1043
1020
  function getRotatedBounds(item, pos, rotation) {
1044
- const rad = (rotation * Math.PI) / 180;
1045
- const cos = Math.abs(Math.cos(rad));
1046
- const sin = Math.abs(Math.sin(rad));
1047
- const w = item.width * cos + item.depth * sin;
1048
- const d = item.width * sin + item.depth * cos;
1049
- return {
1050
- minX: pos.x - w / 2,
1051
- maxX: pos.x + w / 2,
1052
- minZ: pos.z - d / 2,
1053
- maxZ: pos.z + d / 2,
1054
- };
1021
+ const rad = rotation * Math.PI / 180;
1022
+ const cos = Math.abs(Math.cos(rad));
1023
+ const sin = Math.abs(Math.sin(rad));
1024
+ const w = item.width * cos + item.depth * sin;
1025
+ const d = item.width * sin + item.depth * cos;
1026
+ return {
1027
+ minX: pos.x - w / 2,
1028
+ maxX: pos.x + w / 2,
1029
+ minZ: pos.z - d / 2,
1030
+ maxZ: pos.z + d / 2
1031
+ };
1055
1032
  }
1056
1033
  function boundsOverlap(a, b) {
1057
- return a.minX < b.maxX && a.maxX > b.minX && a.minZ < b.maxZ && a.maxZ > b.minZ;
1034
+ return a.minX < b.maxX && a.maxX > b.minX && a.minZ < b.maxZ && a.maxZ > b.minZ;
1058
1035
  }
1059
- /* ════════════════════════════════════════════════════════════════
1060
- LAYOUT APPLICATION
1061
- ════════════════════════════════════════════════════════════════ */
1062
1036
  function applyRoomLayout(scene, layout, offset = new THREE__namespace.Vector3(0, 0, 0)) {
1063
- const placed = [];
1064
- for (const layoutItem of layout.items) {
1065
- const item = FURNITURE_CATALOG.find((f) => f.id === layoutItem.itemId);
1066
- if (!item) {
1067
- continue;
1068
- }
1069
- const pos = new THREE__namespace.Vector3(layoutItem.x + offset.x, offset.y, layoutItem.z + offset.z);
1070
- placed.push(placeFurnitureInScene(scene, item, pos, layoutItem.rotation, 0.5, false));
1037
+ const placed = [];
1038
+ for (const layoutItem of layout.items) {
1039
+ const item = FURNITURE_CATALOG.find((f) => f.id === layoutItem.itemId);
1040
+ if (!item) {
1041
+ continue;
1071
1042
  }
1072
- return placed;
1043
+ const pos = new THREE__namespace.Vector3(layoutItem.x + offset.x, offset.y, layoutItem.z + offset.z);
1044
+ placed.push(placeFurnitureInScene(scene, item, pos, layoutItem.rotation, 0.5, false));
1045
+ }
1046
+ return placed;
1073
1047
  }
1074
- /* ════════════════════════════════════════════════════════════════
1075
- BUDGET CALCULATOR
1076
- ════════════════════════════════════════════════════════════════ */
1077
1048
  function calculateBudget(placed) {
1078
- const breakdown = [];
1079
- let total = 0;
1080
- for (const p of placed) {
1081
- const item = FURNITURE_CATALOG.find((f) => f.id === p.itemId);
1082
- if (item && item.price) {
1083
- breakdown.push({ name: item.name, price: item.price });
1084
- total += item.price;
1085
- }
1049
+ const breakdown = [];
1050
+ let total = 0;
1051
+ for (const p of placed) {
1052
+ const item = FURNITURE_CATALOG.find((f) => f.id === p.itemId);
1053
+ if (item && item.price) {
1054
+ breakdown.push({ name: item.name, price: item.price });
1055
+ total += item.price;
1086
1056
  }
1087
- return { total, breakdown };
1057
+ }
1058
+ return { total, breakdown };
1088
1059
  }
1089
-
1090
1060
  exports.FURNITURE_CATALOG = FURNITURE_CATALOG;
1091
1061
  exports.FURNITURE_CATEGORIES = FURNITURE_CATEGORIES;
1092
1062
  exports.ROOM_PRESETS = ROOM_PRESETS;