@kruschdev/pascal-plugin-mit-assets 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/ASSETS.md +298 -0
  2. package/LICENSE +21 -0
  3. package/README.md +71 -2
  4. package/dist/agent-operations.d.ts +8 -0
  5. package/dist/agent-operations.js +305 -0
  6. package/dist/agent-tools.d.ts +7 -0
  7. package/dist/agent-tools.js +128 -0
  8. package/dist/audit.d.ts +78 -0
  9. package/dist/bin/pascal-mit-assets.js +5238 -0
  10. package/dist/bom.d.ts +123 -0
  11. package/dist/cad/appliance-mep-builders.d.ts +7 -0
  12. package/dist/cad/furniture-builders.d.ts +9 -0
  13. package/dist/cad/index.d.ts +48 -0
  14. package/dist/cad/index.js +23 -0
  15. package/dist/cad/kitchen-bath-builders.d.ts +9 -0
  16. package/dist/cad/outdoor-fenestration-builders.d.ts +8 -0
  17. package/dist/cad/primitives.d.ts +56 -0
  18. package/dist/cad/props-vehicles-builders.d.ts +8 -0
  19. package/dist/chunk-2qgndrap.js +5200 -0
  20. package/dist/chunk-6hzyh6qv.js +346 -0
  21. package/dist/chunk-f72r2bmp.js +84 -0
  22. package/dist/chunk-hqgm57dv.js +310 -0
  23. package/dist/chunk-kgwk6kan.js +150 -0
  24. package/dist/chunk-raafkn3w.js +286 -0
  25. package/dist/chunk-vzmjt9dz.js +4380 -0
  26. package/dist/chunk-xhkwv6t4.js +5080 -0
  27. package/dist/hdri/index.d.ts +1 -0
  28. package/dist/hdri/index.js +322 -0
  29. package/dist/hdri/sky.d.ts +26 -0
  30. package/dist/index.d.ts +30 -0
  31. package/dist/index.js +198 -0
  32. package/dist/manifest.d.ts +46 -0
  33. package/dist/materials/index.d.ts +10 -0
  34. package/dist/materials/index.js +1464 -0
  35. package/dist/materials/ktx2.d.ts +10 -0
  36. package/dist/materials/noise.d.ts +89 -0
  37. package/dist/materials/patterns.d.ts +15 -0
  38. package/dist/nodes/mit-item.d.ts +76 -0
  39. package/dist/render.d.ts +10 -0
  40. package/dist/render.js +24 -0
  41. package/dist/scripts/build-assets.js +17129 -0
  42. package/dist/sfx/index.d.ts +1 -0
  43. package/dist/sfx/index.js +1223 -0
  44. package/dist/sfx/synth.d.ts +25 -0
  45. package/dist/sku-crosswalk.d.ts +46 -0
  46. package/dist/ui/chat-card.d.ts +7 -0
  47. package/dist/ui/host-panel.d.ts +1 -0
  48. package/dist/ui/inspector-card.d.ts +4 -0
  49. package/dist/ui/schedule-view.d.ts +1 -0
  50. package/package.json +135 -4
  51. package/src/agent-operations.ts +373 -0
  52. package/src/agent-tools.ts +136 -0
  53. package/src/audit.ts +356 -0
  54. package/src/bom.ts +512 -0
  55. package/src/cad/appliance-mep-builders.ts +1336 -0
  56. package/src/cad/furniture-builders.ts +1622 -0
  57. package/src/cad/index.ts +993 -0
  58. package/src/cad/kitchen-bath-builders.ts +1189 -0
  59. package/src/cad/outdoor-fenestration-builders.ts +1499 -0
  60. package/src/cad/primitives.ts +286 -0
  61. package/src/cad/props-vehicles-builders.ts +1065 -0
  62. package/src/hdri/index.ts +5 -0
  63. package/src/hdri/sky.ts +481 -0
  64. package/src/index.ts +127 -0
  65. package/src/manifest.ts +5296 -0
  66. package/src/materials/index.ts +56 -0
  67. package/src/materials/ktx2.ts +138 -0
  68. package/src/materials/noise.ts +417 -0
  69. package/src/materials/patterns.ts +1507 -0
  70. package/src/nodes/mit-item.ts +163 -0
  71. package/src/render.ts +25 -0
  72. package/src/sfx/index.ts +6 -0
  73. package/src/sfx/synth.ts +1495 -0
  74. package/src/sku-crosswalk.ts +3868 -0
  75. package/src/ui/chat-card.tsx +93 -0
  76. package/src/ui/host-panel.tsx +330 -0
  77. package/src/ui/inspector-card.tsx +213 -0
  78. package/src/ui/schedule-view.tsx +188 -0
@@ -0,0 +1,1189 @@
1
+ /**
2
+ * Clean-room MIT parametric 3D CAD builders for Kitchen & Bathroom fixtures,
3
+ * cabinetry, appliances, tableware, and plumbing hardware.
4
+ *
5
+ * Strictly React-free, editor-free, and node:*-free.
6
+ * Every builder uses only materials from the per-call MaterialPalette `p`.
7
+ */
8
+
9
+ import * as THREE from 'three'
10
+ import {
11
+ addBox,
12
+ addCyl,
13
+ addFourLegs,
14
+ addRoundedRectExtrude,
15
+ addSphere,
16
+ addTorus,
17
+ type MaterialPalette,
18
+ type SlugBuilderFn,
19
+ } from './primitives'
20
+
21
+ // ---------------------------------------------------------------------------
22
+ // Internal architectural fixture helpers (zero global cached materials)
23
+ // ---------------------------------------------------------------------------
24
+
25
+ function addGooseneckFaucet(
26
+ g: THREE.Group,
27
+ x: number,
28
+ deckY: number,
29
+ z: number,
30
+ height: number,
31
+ reach: number,
32
+ mat: THREE.Material,
33
+ ): void {
34
+ // Deck rosette base + vertical riser
35
+ addCyl(g, 0.024, 0.028, 0.018, x, deckY + 0.009, z, mat, 12)
36
+ const riserH = height * 0.72
37
+ addCyl(g, 0.011, 0.013, riserH, x, deckY + riserH / 2 + 0.01, z, mat, 10)
38
+ // Top arch elbow + forward spout + aerator nozzle
39
+ addTorus(g, reach * 0.5, 0.01, x, deckY + riserH + 0.008, z + reach * 0.5, mat, [0, Math.PI / 2, 0])
40
+ addCyl(g, 0.011, 0.012, height * 0.22, x, deckY + riserH - height * 0.06, z + reach, mat, 10)
41
+ // Single-lever side mixer handle
42
+ addCyl(g, 0.008, 0.008, 0.065, x + 0.032, deckY + 0.055, z + 0.01, mat, 8, [0.3, 0, -Math.PI / 2.2])
43
+ }
44
+
45
+ function addRecessedBasin(
46
+ g: THREE.Group,
47
+ x: number,
48
+ counterTopY: number,
49
+ z: number,
50
+ bw: number,
51
+ bd: number,
52
+ rimMat: THREE.Material,
53
+ drainMat: THREE.Material,
54
+ darkInterior: THREE.Material,
55
+ ): void {
56
+ const rimT = 0.024
57
+ const rimH = 0.022
58
+ // Perimeter lip framing the basin recess (cleanly proud above countertop)
59
+ addBox(g, bw, rimH, rimT, x, counterTopY + rimH / 2 + 0.002, z - bd / 2 + rimT / 2, rimMat)
60
+ addBox(g, bw, rimH, rimT, x, counterTopY + rimH / 2 + 0.002, z + bd / 2 - rimT / 2, rimMat)
61
+ addBox(g, rimT, rimH, bd - rimT * 2, x - bw / 2 + rimT / 2, counterTopY + rimH / 2 + 0.002, z, rimMat)
62
+ addBox(g, rimT, rimH, bd - rimT * 2, x + bw / 2 - rimT / 2, counterTopY + rimH / 2 + 0.002, z, rimMat)
63
+ // Recessed dark bowl floor + metallic drain strainer (proud of counter deck, zero Z-fighting)
64
+ addBox(g, bw - rimT * 2.1, 0.01, bd - rimT * 2.1, x, counterTopY + 0.008, z, darkInterior)
65
+ addCyl(g, 0.026, 0.026, 0.008, x, counterTopY + 0.016, z - bd * 0.06, drainMat, 12)
66
+ }
67
+
68
+ /** Build a true hollow rounded-rectangle shell using Shape + Shape.holes (zero sealed-top triangulation). */
69
+ function addHollowRoundedWall(
70
+ g: THREE.Group,
71
+ outerW: number,
72
+ outerD: number,
73
+ wallH: number,
74
+ wallT: number,
75
+ outerR: number,
76
+ x: number,
77
+ bottomY: number,
78
+ z: number,
79
+ mat: THREE.Material,
80
+ ): THREE.Mesh {
81
+ const mkRoundedPts = (rw: number, rd: number, r: number): THREE.Shape => {
82
+ const cr = Math.min(r, rw * 0.46, rd * 0.46)
83
+ const hw = rw / 2
84
+ const hd = rd / 2
85
+ const s = new THREE.Shape()
86
+ s.moveTo(-hw + cr, -hd)
87
+ s.lineTo(hw - cr, -hd)
88
+ s.quadraticCurveTo(hw, -hd, hw, -hd + cr)
89
+ s.lineTo(hw, hd - cr)
90
+ s.quadraticCurveTo(hw, hd, hw - cr, hd)
91
+ s.lineTo(-hw + cr, hd)
92
+ s.quadraticCurveTo(-hw, hd, -hw, hd - cr)
93
+ s.lineTo(-hw, -hd + cr)
94
+ s.quadraticCurveTo(-hw, -hd, -hw + cr, -hd)
95
+ return s
96
+ }
97
+
98
+ const shape = mkRoundedPts(outerW, outerD, outerR)
99
+ const effWallT = Math.min(wallT, outerW * 0.28, outerD * 0.28)
100
+ const bevelSz = Math.min(0.012, effWallT * 0.15)
101
+ const bevelTh = Math.min(0.016, wallH * 0.04)
102
+ const iw = Math.max(1e-3, outerW - effWallT * 2)
103
+ const id = Math.max(1e-3, outerD - effWallT * 2)
104
+ const ir = Math.max(1e-4, Math.min(outerR - effWallT * 0.8, iw * 0.45, id * 0.45))
105
+ const hole = new THREE.Path(mkRoundedPts(iw, id, ir).getPoints(24).reverse())
106
+ shape.holes.push(hole)
107
+
108
+ const geom = new THREE.ExtrudeGeometry(shape, {
109
+ depth: wallH,
110
+ bevelEnabled: bevelSz > 1e-4 && bevelTh > 1e-4,
111
+ bevelThickness: bevelTh,
112
+ bevelSize: bevelSz,
113
+ bevelSegments: 2,
114
+ curveSegments: 16,
115
+ })
116
+ // ExtrudeGeometry extrudes along +Z; rotate -PI/2 around X so extrusion rises along +Y
117
+ geom.rotateX(-Math.PI / 2)
118
+ const mesh = new THREE.Mesh(geom, mat)
119
+ mesh.position.set(x, bottomY, z)
120
+ g.add(mesh)
121
+ return mesh
122
+ }
123
+
124
+ function addCooktopBurners(
125
+ g: THREE.Group,
126
+ cx: number,
127
+ topY: number,
128
+ cz: number,
129
+ cw: number,
130
+ cd: number,
131
+ p: MaterialPalette,
132
+ ): void {
133
+ // Dark ceramic-glass cooktop plate
134
+ addRoundedRectExtrude(g, cw, cd, 0.014, 0.02, cx, topY + 0.007, cz, p.plasticDark)
135
+ const offsets: [number, number, number][] = [
136
+ [-cw * 0.25, -cd * 0.24, 0.072],
137
+ [cw * 0.25, -cd * 0.24, 0.088],
138
+ [-cw * 0.25, cd * 0.24, 0.084],
139
+ [cw * 0.25, cd * 0.24, 0.064],
140
+ ]
141
+ for (const [ox, oz, br] of offsets) {
142
+ addCyl(g, br * 0.55, br * 0.62, 0.016, cx + ox, topY + 0.018, cz + oz, p.metalDark, 14)
143
+ addTorus(g, br, 0.007, cx + ox, topY + 0.022, cz + oz, p.metalDark, [Math.PI / 2, 0, 0])
144
+ }
145
+ }
146
+
147
+ function addShowerColumn(
148
+ g: THREE.Group,
149
+ x: number,
150
+ baseY: number,
151
+ z: number,
152
+ colH: number,
153
+ p: MaterialPalette,
154
+ angleY = 0,
155
+ ): void {
156
+ const col = new THREE.Group()
157
+ col.position.set(x, baseY, z)
158
+ col.rotation.y = angleY
159
+ // Wall thermostatic mixer bar + twin knobs
160
+ addCyl(col, 0.018, 0.018, 0.22, 0, colH * 0.5, 0.04, p.metalChrome, 12, [0, 0, Math.PI / 2])
161
+ addCyl(col, 0.022, 0.022, 0.036, -0.1, colH * 0.5, 0.04, p.metalBrushed, 10, [0, 0, Math.PI / 2])
162
+ addCyl(col, 0.022, 0.022, 0.036, 0.1, colH * 0.5, 0.04, p.metalBrushed, 10, [0, 0, Math.PI / 2])
163
+ // Vertical chrome riser pipe
164
+ addCyl(col, 0.012, 0.012, colH * 0.56, 0, colH * 0.72, 0.04, p.metalChrome, 10)
165
+ // Horizontal overhead shower arm + wide rainfall shower head disc
166
+ addCyl(col, 0.011, 0.011, 0.26, 0, colH * 0.99, 0.16, p.metalChrome, 10, [Math.PI / 2, 0, 0])
167
+ addCyl(col, 0.11, 0.115, 0.018, 0, colH * 0.96, 0.28, p.metalChrome, 20)
168
+ // Handheld wand docked on riser
169
+ addCyl(col, 0.014, 0.01, 0.18, 0.075, colH * 0.64, 0.06, p.metalBrushed, 10, [0.15, 0, 0])
170
+ g.add(col)
171
+ }
172
+
173
+ // ---------------------------------------------------------------------------
174
+ // 31 Kitchen (18) & Bathroom (13) Builders
175
+ // ---------------------------------------------------------------------------
176
+
177
+ export const KITCHEN_BATH_BUILDERS: Record<string, SlugBuilderFn> = {
178
+ // ========================= KITCHEN (18) =========================
179
+ kitchen: (w, h, d, p) => {
180
+ const g = new THREE.Group()
181
+ // Full kitchen unit: counter at ~0.77*h (matching surfaceHeight 0.797 / 1.03), faucet rising to h
182
+ const counterY = h * 0.77
183
+ const toeH = 0.09
184
+ const topH = 0.042
185
+ const cabH = counterY - toeH - topH
186
+ const cabY = toeH + cabH / 2
187
+
188
+ // Recessed dark toe-kick + main cabinetry carcase
189
+ addBox(g, w * 0.96, toeH, d * 0.86, 0, toeH / 2, -d * 0.04, p.metalDark)
190
+ addBox(g, w * 0.98, cabH, d * 0.92, 0, cabY, -d * 0.02, p.paintWhite)
191
+ // Stone countertop + rear backsplash strip
192
+ addRoundedRectExtrude(g, w, d, topH, 0.018, 0, counterY - topH / 2, 0, p.stoneLight)
193
+ addBox(g, w, h * 0.14, 0.028, 0, counterY + h * 0.07, -d / 2 + 0.014, p.stoneLight)
194
+
195
+ // 4 front cabinetry bays: drawers, under-sink double doors, built-in oven bay
196
+ const bays = 4
197
+ const gap = 0.012
198
+ const bayW = (w * 0.96 - gap * (bays + 1)) / bays
199
+ for (let i = 0; i < bays; i++) {
200
+ const bx = -(w * 0.96) / 2 + gap + bayW / 2 + i * (bayW + gap)
201
+ if (i === 0) {
202
+ // 3 stacked utensil drawers
203
+ const dh = (cabH - 0.04) / 3
204
+ for (let r = 0; r < 3; r++) {
205
+ const dy = toeH + 0.01 + dh / 2 + r * (dh + 0.01)
206
+ addBox(g, bayW, dh, 0.022, bx, dy, d * 0.455, p.woodLight)
207
+ addBox(g, bayW * 0.44, 0.014, 0.024, bx, dy, d * 0.48, p.metalBrushed)
208
+ }
209
+ } else if (i === 3) {
210
+ // Built-in stainless oven with glass window & handle
211
+ addBox(g, bayW, cabH * 0.88, 0.025, bx, cabY, d * 0.455, p.metalBrushed)
212
+ addBox(g, bayW * 0.74, cabH * 0.5, 0.016, bx, cabY - 0.03, d * 0.47, p.plasticDark)
213
+ addCyl(g, 0.01, 0.01, bayW * 0.76, bx, cabY + cabH * 0.3, d * 0.495, p.metalChrome, 8, [0, 0, Math.PI / 2])
214
+ } else {
215
+ // Under-sink cabinet door with vertical brushed handle
216
+ addBox(g, bayW, cabH - 0.02, 0.022, bx, cabY, d * 0.455, p.woodLight)
217
+ const hx = bx + (i === 1 ? bayW * 0.36 : -bayW * 0.36)
218
+ addBox(g, 0.014, cabH * 0.28, 0.024, hx, cabY + cabH * 0.2, d * 0.48, p.metalBrushed)
219
+ }
220
+ }
221
+
222
+ // Left recessed stainless sink + tall gooseneck chrome faucet reaching h
223
+ const sinkX = -w * 0.14
224
+ addRecessedBasin(g, sinkX, counterY, 0.02, w * 0.28, d * 0.56, p.metalBrushed, p.metalChrome, p.metalDark)
225
+ addGooseneckFaucet(g, sinkX, counterY, -d * 0.32, h - counterY - 0.01, 0.16, p.metalChrome)
226
+
227
+ // Right 4-burner induction cooktop
228
+ addCooktopBurners(g, w * 0.32, counterY, 0.02, w * 0.28, d * 0.62, p)
229
+ return g
230
+ },
231
+
232
+ 'kitchen-cabinet': (w, h, d, p) => {
233
+ const g = new THREE.Group()
234
+ const toeH = 0.09
235
+ const topH = 0.044
236
+ const bodyH = h - toeH - topH
237
+ const bodyY = toeH + bodyH / 2
238
+ const drawerRowH = bodyH * 0.24
239
+ const doorRowH = bodyH - drawerRowH - 0.024
240
+
241
+ // Toe-kick, carcase, beveled overhanging stone counter
242
+ addBox(g, w * 0.94, toeH, d * 0.86, 0, toeH / 2, -d * 0.04, p.woodDark)
243
+ addBox(g, w * 0.96, bodyH, d * 0.92, 0, bodyY, -d * 0.02, p.woodWarm)
244
+ addRoundedRectExtrude(g, w, d, topH, 0.02, 0, h - topH / 2, 0, p.stoneLight)
245
+
246
+ // 3 bays: upper utensil drawers + lower shaker doors with recessed center panels
247
+ const cols = 3
248
+ const gap = 0.014
249
+ const colW = (w * 0.94 - gap * (cols + 1)) / cols
250
+ for (let c = 0; c < cols; c++) {
251
+ const cx = -(w * 0.94) / 2 + gap + colW / 2 + c * (colW + gap)
252
+ // Upper drawer front + horizontal pull
253
+ const uy = h - topH - drawerRowH / 2 - 0.008
254
+ addBox(g, colW, drawerRowH, 0.024, cx, uy, d * 0.455, p.woodLight)
255
+ addBox(g, colW * 0.36, 0.014, 0.026, cx, uy, d * 0.48, p.metalDark)
256
+ // Lower shaker door + recessed inner panel + vertical pull
257
+ const ly = toeH + doorRowH / 2 + 0.008
258
+ addBox(g, colW, doorRowH, 0.024, cx, ly, d * 0.455, p.woodLight)
259
+ addBox(g, colW * 0.74, doorRowH * 0.78, 0.01, cx, ly, d * 0.468, p.woodWarm)
260
+ const hx = cx + (c === 2 ? -colW * 0.36 : colW * 0.36)
261
+ addBox(g, 0.014, 0.14, 0.026, hx, ly + doorRowH * 0.24, d * 0.48, p.metalDark)
262
+ }
263
+ return g
264
+ },
265
+
266
+ 'kitchen-counter': (w, h, d, p) => {
267
+ const g = new THREE.Group()
268
+ const toeH = 0.08
269
+ const topH = 0.048
270
+ const bodyH = h - toeH - topH
271
+ const bodyY = toeH + bodyH / 2
272
+
273
+ // Recessed plinth + main counter cabinet + thick beveled marble/stone top
274
+ addBox(g, w * 0.94, toeH, d * 0.84, 0, toeH / 2, -d * 0.04, p.metalDark)
275
+ addRoundedRectExtrude(g, w, d, topH, 0.022, 0, h - topH / 2, 0, p.stoneLight)
276
+ // Left 72% enclosed cabinets with 3 doors, right 28% open wine/cookbook display niche
277
+ const encW = w * 0.7
278
+ const encX = -w * 0.13
279
+ addBox(g, encW, bodyH, d * 0.88, encX, bodyY, -d * 0.02, p.paintWhite)
280
+ const doorW = (encW - 0.05) / 3
281
+ for (let i = 0; i < 3; i++) {
282
+ const dx = encX - encW / 2 + 0.016 + doorW / 2 + i * (doorW + 0.012)
283
+ addBox(g, doorW, bodyH - 0.024, 0.022, dx, bodyY, d * 0.435, p.ceramicMatte)
284
+ addBox(g, 0.014, 0.12, 0.024, dx + doorW * 0.34, bodyY + bodyH * 0.22, d * 0.46, p.metalBrushed)
285
+ }
286
+ // Right open end-shelf bay
287
+ const shelfX = w * 0.35
288
+ const shelfW = w * 0.24
289
+ addBox(g, 0.028, bodyH, d * 0.88, w * 0.47, bodyY, -d * 0.02, p.woodWarm)
290
+ addBox(g, shelfW, 0.024, d * 0.84, shelfX, toeH + bodyH * 0.5, -d * 0.02, p.woodWarm)
291
+ addBox(g, shelfW, 0.024, d * 0.84, shelfX, toeH + 0.012, -d * 0.02, p.woodWarm)
292
+ return g
293
+ },
294
+
295
+ 'kitchen-fridge': (w, h, d, p) => {
296
+ const g = new THREE.Group()
297
+ // Compact under-counter / mini cube fridge (0.8 x 0.8 x 0.8)
298
+ const footH = 0.036
299
+ const bodyH = h - footH
300
+ const bodyY = footH + bodyH / 2
301
+
302
+ addFourLegs(g, w * 0.86, d * 0.86, footH, 0.024, 0.06, p.rubberBlack, 1)
303
+ // Insulated outer brushed-steel cabinet
304
+ addRoundedRectExtrude(g, w * 0.98, d * 0.88, bodyH, 0.03, 0, bodyY, -d * 0.05, p.metalBrushed)
305
+ // Black magnetic door gasket seal
306
+ addBox(g, w * 0.92, bodyH * 0.94, 0.022, 0, bodyY, d * 0.39, p.rubberBlack)
307
+ // Thick beveled front refrigerator door + proud handle, standoffs, lower intake grille & LED badge
308
+ addRoundedRectExtrude(g, w * 0.96, 0.075, bodyH * 0.96, 0.025, 0, bodyY, d * 0.445, p.metalChrome)
309
+ addCyl(g, 0.016, 0.016, bodyH * 0.62, -w * 0.37, bodyY + 0.02, d * 0.518, p.metalDark, 12)
310
+ addBox(g, 0.024, 0.024, 0.055, -w * 0.37, bodyY + bodyH * 0.28, d * 0.49, p.metalDark)
311
+ addBox(g, 0.024, 0.024, 0.055, -w * 0.37, bodyY - bodyH * 0.22, d * 0.49, p.metalDark)
312
+ // Top temperature readout badge proudly clear of door face
313
+ addBox(g, 0.2, 0.055, 0.014, 0.04, h - 0.08, d * 0.495, p.plasticDark)
314
+ addBox(g, 0.09, 0.022, 0.012, 0.04, h - 0.08, d * 0.505, p.emissiveGreen)
315
+ // Lower ventilation kick grille
316
+ addBox(g, w * 0.86, 0.036, 0.016, 0, footH + 0.03, d * 0.492, p.metalDark)
317
+ return g
318
+ },
319
+
320
+ 'kitchen-shelf': (w, h, d, p) => {
321
+ const g = new THREE.Group()
322
+ // Wall-mounted 2-tier kitchen rack with steel brackets, utensil rail & stacked dishes (2.21 x 0.89 x 0.52)
323
+ const shelfT = 0.036
324
+ const lowerY = h * 0.24
325
+ const upperY = h * 0.72
326
+
327
+ // 3 heavy dark-steel wall frame uprights + cantilever support arms at -Z
328
+ for (const sx of [-w * 0.42, 0, w * 0.42]) {
329
+ addBox(g, 0.032, h * 0.94, 0.024, sx, h * 0.5, -d / 2 + 0.014, p.metalDark)
330
+ addBox(g, 0.028, 0.028, d * 0.92, sx, lowerY - shelfT / 2 - 0.014, 0, p.metalDark)
331
+ addBox(g, 0.028, 0.028, d * 0.92, sx, upperY - shelfT / 2 - 0.014, 0, p.metalDark)
332
+ }
333
+ // 2 full-width butcher-block wooden shelves
334
+ addRoundedRectExtrude(g, w, d * 0.94, shelfT, 0.018, 0, lowerY, d * 0.02, p.woodWarm)
335
+ addRoundedRectExtrude(g, w, d * 0.94, shelfT, 0.018, 0, upperY, d * 0.02, p.woodWarm)
336
+
337
+ // Under-shelf chrome hanging utensil rail + S-hooks
338
+ addCyl(g, 0.01, 0.01, w * 0.88, 0, lowerY - 0.1, d * 0.12, p.metalChrome, 10, [0, 0, Math.PI / 2])
339
+ for (let i = -3; i <= 3; i++) {
340
+ addCyl(g, 0.005, 0.005, 0.07, i * (w * 0.11), lowerY - 0.135, d * 0.12, p.metalBrushed, 6)
341
+ }
342
+
343
+ // Stacked ceramic dinner plates on lower shelf & spice jars on upper shelf
344
+ for (let i = 0; i < 4; i++) {
345
+ addCyl(g, 0.13, 0.1, 0.022, -w * 0.28, lowerY + shelfT / 2 + 0.012 + i * 0.024, 0.02, p.ceramicWhite, 16)
346
+ }
347
+ const jarMats = [p.terracotta, p.glass, p.ceramicMatte, p.paintBlue]
348
+ for (let i = 0; i < 4; i++) {
349
+ const jx = w * 0.12 + i * 0.16
350
+ addCyl(g, 0.048, 0.048, 0.14, jx, upperY + shelfT / 2 + 0.07, 0.02, jarMats[i] ?? p.glass, 14)
351
+ addCyl(g, 0.042, 0.042, 0.024, jx, upperY + shelfT / 2 + 0.15, 0.02, p.woodDark, 12)
352
+ }
353
+ return g
354
+ },
355
+
356
+ 'kitchen-utensils': (w, h, d, p) => {
357
+ const g = new THREE.Group()
358
+ // Ceramic countertop utensil crock filled with fanned wooden/steel cooking tools (0.23 x 0.49 x 0.21)
359
+ const r = Math.min(w, d) * 0.46
360
+ const crockH = h * 0.44
361
+
362
+ // Glazed ceramic crock with dark base ring & top lip
363
+ addCyl(g, r * 0.92, r * 0.86, crockH, 0, crockH / 2, 0, p.ceramicWhite, 20)
364
+ addTorus(g, r * 0.92, 0.01, 0, crockH - 0.008, 0, p.ceramicMatte, [Math.PI / 2, 0, 0])
365
+ addCyl(g, r * 0.82, r * 0.82, 0.02, 0, crockH - 0.02, 0, p.woodDark, 16)
366
+
367
+ // 1. Wooden mixing spoon
368
+ addCyl(g, 0.008, 0.009, h * 0.72, -r * 0.28, h * 0.52, -r * 0.12, p.woodWarm, 8, [0.1, 0, 0.14])
369
+ addSphere(g, 0.036, -r * 0.42, h * 0.9, -r * 0.2, p.woodWarm, [0.75, 1.35, 0.35], 10)
370
+
371
+ // 2. Stainless slotted spatula / turner
372
+ addCyl(g, 0.007, 0.008, h * 0.74, r * 0.22, h * 0.54, 0.01, p.metalBrushed, 8, [-0.08, 0, -0.14])
373
+ addBox(g, 0.058, 0.095, 0.008, r * 0.38, h * 0.91, -0.02, p.metalChrome, [-0.08, 0.2, -0.14])
374
+
375
+ // 3. Soup ladle
376
+ addCyl(g, 0.007, 0.008, h * 0.68, 0.02, h * 0.5, r * 0.24, p.metalDark, 8, [-0.16, 0, 0.04])
377
+ addSphere(g, 0.038, 0.01, h * 0.86, r * 0.36, p.metalChrome, [1, 0.6, 1], 12)
378
+
379
+ // 4. Balloon whisk
380
+ addCyl(g, 0.01, 0.009, h * 0.54, -r * 0.04, h * 0.46, -r * 0.22, p.metalChrome, 8, [0.14, 0, -0.05])
381
+ addTorus(g, 0.034, 0.004, -r * 0.02, h * 0.82, -r * 0.3, p.metalBrushed, [0.14, 0, 0])
382
+ addTorus(g, 0.034, 0.004, -r * 0.02, h * 0.82, -r * 0.3, p.metalBrushed, [0.14, Math.PI / 2, 0])
383
+ return g
384
+ },
385
+
386
+ 'wooden-kitchen-bar-moa2hhh4': (w, h, d, p) => {
387
+ const g = new THREE.Group()
388
+ // Architectural wooden breakfast bar / kitchen island (2.5 x 1.06 x 0.96)
389
+ const topH = 0.068
390
+ const toeH = 0.09
391
+ const bodyH = h - topH - toeH
392
+ const bodyY = toeH + bodyH / 2
393
+ const bodyD = d * 0.64
394
+ const bodyZ = -d * 0.16
395
+
396
+ // Thick butcher-block cantilevered wood bar top (full depth overhang at +Z for barstools)
397
+ addRoundedRectExtrude(g, w, d, topH, 0.028, 0, h - topH / 2, 0, p.woodWarm)
398
+ // Recessed dark-metal toe-kick & solid dark-wood core
399
+ addBox(g, w * 0.92, toeH, bodyD * 0.88, 0, toeH / 2, bodyZ, p.metalDark)
400
+ addBox(g, w * 0.94, bodyH, bodyD, 0, bodyY, bodyZ, p.woodDark)
401
+
402
+ // Vertical decorative architectural wood slats proudly offset from base core (+Z face)
403
+ const slatCount = 18
404
+ const spanW = w * 0.92
405
+ for (let i = 0; i < slatCount; i++) {
406
+ const sx = -spanW / 2 + (spanW / (slatCount - 1)) * i
407
+ addBox(g, 0.034, bodyH - 0.02, 0.026, sx, bodyY, bodyZ + bodyD / 2 + 0.018, p.woodWarm)
408
+ }
409
+
410
+ // Horizontal chrome bar footrest rail along guest overhang side (+Z)
411
+ const railZ = bodyZ + bodyD / 2 + d * 0.14
412
+ addCyl(g, 0.018, 0.018, w * 0.88, 0, 0.18, railZ, p.metalChrome, 12, [0, 0, Math.PI / 2])
413
+ for (const bx of [-w * 0.38, 0, w * 0.38]) {
414
+ addCyl(g, 0.012, 0.012, d * 0.15, bx, 0.18, railZ - d * 0.075, p.metalDark, 8, [Math.PI / 2, 0, 0])
415
+ addCyl(g, 0.014, 0.018, 0.18, bx, 0.09, railZ, p.metalDark, 8)
416
+ }
417
+
418
+ // Rear chef-side storage doors & drawers (-Z face)
419
+ const bays = 3
420
+ const bayW = (w * 0.88) / bays - 0.016
421
+ for (let i = 0; i < bays; i++) {
422
+ const bx = -(w * 0.88) / 2 + bayW / 2 + 0.008 + i * (bayW + 0.016)
423
+ addBox(g, bayW, bodyH * 0.9, 0.022, bx, bodyY, bodyZ - bodyD / 2 - 0.01, p.woodLight)
424
+ addBox(g, bayW * 0.35, 0.016, 0.024, bx, bodyY + bodyH * 0.3, bodyZ - bodyD / 2 - 0.03, p.metalDark)
425
+ }
426
+ return g
427
+ },
428
+
429
+ 'sink-cabinet': (w, h, d, p) => {
430
+ const g = new THREE.Group()
431
+ const counterY = h * 0.78
432
+ const toeH = 0.09
433
+ const topH = 0.04
434
+ const bodyH = counterY - toeH - topH
435
+ const bodyY = toeH + bodyH / 2
436
+
437
+ // Toe-kick, cabinet carcase, stone counter
438
+ addBox(g, w * 0.94, toeH, d * 0.86, 0, toeH / 2, -d * 0.04, p.metalDark)
439
+ addBox(g, w * 0.96, bodyH, d * 0.92, 0, bodyY, -d * 0.02, p.paintWhite)
440
+ addRoundedRectExtrude(g, w, d, topH, 0.018, 0, counterY - topH / 2, 0, p.stoneLight)
441
+
442
+ // False top apron panel + twin lower cabinet doors with chrome handles
443
+ const apronH = bodyH * 0.2
444
+ const doorH = bodyH - apronH - 0.024
445
+ addBox(g, w * 0.92, apronH, 0.022, 0, counterY - topH - apronH / 2 - 0.006, d * 0.455, p.ceramicMatte)
446
+ const doorW = (w * 0.92 - 0.016) / 2
447
+ for (const side of [-1, 1]) {
448
+ const dx = side * (doorW / 2 + 0.008)
449
+ addBox(g, doorW, doorH, 0.022, dx, toeH + doorH / 2 + 0.008, d * 0.455, p.ceramicMatte)
450
+ addBox(g, 0.014, 0.14, 0.024, side * 0.045, toeH + doorH * 0.72, d * 0.48, p.metalChrome)
451
+ }
452
+
453
+ // Recessed stainless kitchen sink + gooseneck chrome faucet
454
+ addRecessedBasin(g, 0, counterY, 0.03, w * 0.68, d * 0.64, p.metalBrushed, p.metalChrome, p.metalDark)
455
+ addGooseneckFaucet(g, 0, counterY, -d * 0.34, h - counterY - 0.01, 0.15, p.metalChrome)
456
+ return g
457
+ },
458
+
459
+ fridge: (w, h, d, p) => {
460
+ const g = new THREE.Group()
461
+ // Tall stainless bottom-freezer refrigerator (0.7 x 1.92 x 0.72)
462
+ const footH = 0.035
463
+ const bodyH = h - footH
464
+ const freezerH = bodyH * 0.3
465
+ const upperH = bodyH - freezerH - 0.016
466
+
467
+ addFourLegs(g, w * 0.88, d * 0.86, footH, 0.022, 0.05, p.rubberBlack, 1)
468
+ // Main cabinet chassis
469
+ addBox(g, w * 0.98, bodyH, d * 0.86, 0, footH + bodyH / 2, -d * 0.06, p.metalBrushed)
470
+ // Door seal gasket
471
+ addBox(g, w * 0.94, bodyH * 0.96, 0.024, 0, footH + bodyH / 2, d * 0.38, p.rubberBlack)
472
+
473
+ // Lower freezer drawer door + horizontal tubular chrome handle
474
+ const fzY = footH + freezerH / 2
475
+ addRoundedRectExtrude(g, w * 0.98, 0.08, freezerH, 0.02, 0, fzY, d * 0.44, p.metalChrome)
476
+ addCyl(g, 0.013, 0.013, w * 0.76, 0, fzY + freezerH * 0.32, d * 0.505, p.metalBrushed, 10, [0, 0, Math.PI / 2])
477
+
478
+ // Upper refrigerator door + crisp horizontal freezer/fridge dark split reveal + vertical chrome handle
479
+ const upY = footH + freezerH + 0.02 + upperH / 2
480
+ addBox(g, w * 0.985, 0.016, 0.018, 0, footH + freezerH + 0.009, d * 0.486, p.metalDark)
481
+ addRoundedRectExtrude(g, w * 0.98, 0.08, upperH, 0.02, 0, upY, d * 0.44, p.metalChrome)
482
+ addCyl(g, 0.015, 0.015, upperH * 0.55, -w * 0.4, upY - upperH * 0.08, d * 0.51, p.metalDark, 10)
483
+ // Standoff brackets for handle
484
+ for (const oy of [-upperH * 0.3, upperH * 0.16]) {
485
+ addBox(g, 0.022, 0.022, 0.045, -w * 0.4, upY + oy, d * 0.48, p.metalDark)
486
+ }
487
+
488
+ // Recessed ice & water dispenser alcove proudly offset from door face (zero Z-fighting)
489
+ addBox(g, w * 0.34, 0.28, 0.022, w * 0.05, upY - 0.02, d * 0.494, p.plasticDark)
490
+ addBox(g, w * 0.24, 0.05, 0.012, w * 0.05, upY + 0.08, d * 0.508, p.screenGlow)
491
+ addBox(g, w * 0.14, 0.12, 0.012, w * 0.05, upY - 0.05, d * 0.506, p.metalDark)
492
+ return g
493
+ },
494
+
495
+ freezer: (w, h, d, p) => {
496
+ const g = new THREE.Group()
497
+ // Upright standing freezer (0.76 x 1.75 x 0.72)
498
+ const footH = 0.04
499
+ const bodyH = h - footH
500
+ const bodyY = footH + bodyH / 2
501
+
502
+ addFourLegs(g, w * 0.88, d * 0.86, footH, 0.022, 0.05, p.rubberBlack, 1)
503
+ addBox(g, w * 0.98, bodyH, d * 0.86, 0, bodyY, -d * 0.06, p.paintWhite)
504
+ addBox(g, w * 0.94, bodyH * 0.95, 0.024, 0, bodyY, d * 0.38, p.rubberBlack)
505
+ // Full-height insulated door
506
+ addRoundedRectExtrude(g, w * 0.98, 0.08, bodyH * 0.96, 0.024, 0, bodyY, d * 0.44, p.ceramicWhite)
507
+ // Heavy-duty vertical handle + standoffs
508
+ addCyl(g, 0.015, 0.015, bodyH * 0.42, -w * 0.39, bodyY + 0.08, d * 0.505, p.metalBrushed, 10)
509
+ for (const oy of [-bodyH * 0.1, bodyH * 0.26]) {
510
+ addBox(g, 0.024, 0.024, 0.048, -w * 0.39, bodyY + oy, d * 0.48, p.metalDark)
511
+ }
512
+ // Top digital temperature display bar + green indicator LED
513
+ addBox(g, w * 0.42, 0.055, 0.014, 0, h - 0.1, d * 0.482, p.plasticDark)
514
+ addBox(g, 0.06, 0.016, 0.016, 0.05, h - 0.1, d * 0.486, p.emissiveGreen)
515
+ // Lower intake vent grille bars
516
+ for (let i = 0; i < 3; i++) {
517
+ addBox(g, w * 0.82, 0.012, 0.014, 0, footH + 0.024 + i * 0.022, d * 0.48, p.metalDark)
518
+ }
519
+ return g
520
+ },
521
+
522
+ stove: (w, h, d, p) => {
523
+ const g = new THREE.Group()
524
+ // Freestanding range/cooker (0.92 x 0.85 x 0.76)
525
+ const deckY = h * 0.9
526
+ const footH = 0.04
527
+ const bodyH = deckY - footH
528
+
529
+ addFourLegs(g, w * 0.88, d * 0.88, footH, 0.022, 0.05, p.rubberBlack, 1)
530
+ // Stainless steel range chassis
531
+ addBox(g, w, bodyH, d * 0.94, 0, footH + bodyH / 2, -d * 0.02, p.metalBrushed)
532
+ // Low rear control backsplash guard rising to h
533
+ addBox(g, w, h - deckY, 0.06, 0, deckY + (h - deckY) / 2, -d / 2 + 0.03, p.metalDark)
534
+
535
+ // Front control console with 5 rotary burner knobs
536
+ const ctrlY = deckY - 0.065
537
+ addBox(g, w * 0.96, 0.11, 0.035, 0, ctrlY, d * 0.465, p.metalDark)
538
+ for (let i = -2; i <= 2; i++) {
539
+ addCyl(g, 0.024, 0.026, 0.032, i * (w * 0.16), ctrlY, d * 0.495, p.metalChrome, 12, [Math.PI / 2, 0, 0])
540
+ }
541
+
542
+ // Main oven door with wide tubular chrome handle & tinted glass window (cleanly proud)
543
+ const ovenH = bodyH * 0.62
544
+ const ovenY = footH + bodyH * 0.16 + ovenH / 2
545
+ addRoundedRectExtrude(g, w * 0.94, 0.045, ovenH, 0.016, 0, ovenY, d * 0.474, p.metalChrome)
546
+ addBox(g, w * 0.72, ovenH * 0.56, 0.016, 0, ovenY - 0.02, d * 0.504, p.plasticDark)
547
+ addBox(g, w * 0.66, ovenH * 0.48, 0.012, 0, ovenY - 0.02, d * 0.514, p.glass)
548
+ addCyl(g, 0.013, 0.013, w * 0.78, 0, ovenY + ovenH * 0.36, d * 0.532, p.metalBrushed, 10, [0, 0, Math.PI / 2])
549
+ // Lower warming drawer
550
+ addBox(g, w * 0.92, bodyH * 0.13, 0.032, 0, footH + bodyH * 0.075, d * 0.468, p.metalChrome)
551
+
552
+ // 4-burner gas/electric cooktop on top deck
553
+ addCooktopBurners(g, 0, deckY, 0.02, w * 0.92, d * 0.78, p)
554
+ return g
555
+ },
556
+
557
+ hood: (w, h, d, p) => {
558
+ const g = new THREE.Group()
559
+ // Wall-mounted stainless extractor range hood (1.21 x 0.52 x 0.51, back at -Z)
560
+ const canopyH = h * 0.34
561
+ const taperH = h * 0.28
562
+ const flueH = h - canopyH - taperH
563
+
564
+ // Bottom horizontal stainless fascia canopy
565
+ addBox(g, w, canopyH, d, 0, canopyH / 2, 0, p.metalBrushed)
566
+ // Tapered pyramidal mid-hood section
567
+ addBox(g, w * 0.78, taperH, d * 0.76, 0, canopyH + taperH / 2, -d * 0.1, p.metalBrushed)
568
+ // Vertical rectangular exhaust chimney duct against wall (-Z)
569
+ addBox(g, w * 0.3, flueH, d * 0.54, 0, canopyH + taperH + flueH / 2, -d * 0.23, p.metalChrome)
570
+
571
+ // Underside recessed baffle grease filter panels (x3)
572
+ const filterW = (w * 0.88) / 3 - 0.02
573
+ for (let i = -1; i <= 1; i++) {
574
+ addBox(g, filterW, 0.018, d * 0.68, i * (filterW + 0.02), 0.009, 0.02, p.metalDark)
575
+ }
576
+ // Twin warm LED cooktop spotlights underneath
577
+ for (const side of [-1, 1]) {
578
+ addCyl(g, 0.032, 0.032, 0.014, side * (w * 0.32), 0.007, -d * 0.28, p.emissiveWarm, 12)
579
+ }
580
+ // Front push-button control strip
581
+ addBox(g, 0.24, 0.036, 0.016, 0, canopyH * 0.5, d / 2 + 0.008, p.plasticDark)
582
+ addBox(g, 0.04, 0.014, 0.018, -0.07, canopyH * 0.5, d / 2 + 0.01, p.emissiveGreen)
583
+ return g
584
+ },
585
+
586
+ microwave: (w, h, d, p) => {
587
+ const g = new THREE.Group()
588
+ // Countertop stainless/black microwave oven (0.52 x 0.27 x 0.41)
589
+ const footH = 0.014
590
+ const bodyH = h - footH
591
+ const bodyY = footH + bodyH / 2
592
+
593
+ addFourLegs(g, w * 0.86, d * 0.84, footH, 0.014, 0.04, p.rubberBlack, 1)
594
+ // Outer metal casing
595
+ addRoundedRectExtrude(g, w, d * 0.94, bodyH, 0.018, 0, bodyY, -d * 0.02, p.metalDark)
596
+ // Left framed viewing door (74% of width) + vertical handle
597
+ const doorW = w * 0.72
598
+ const doorX = -w * 0.12
599
+ addBox(g, doorW, bodyH * 0.9, 0.022, doorX, bodyY, d * 0.46, p.metalBrushed)
600
+ addBox(g, doorW * 0.8, bodyH * 0.66, 0.014, doorX, bodyY, d * 0.474, p.plasticDark)
601
+ addBox(g, doorW * 0.74, bodyH * 0.58, 0.008, doorX, bodyY, d * 0.482, p.glass)
602
+ addCyl(g, 0.009, 0.009, bodyH * 0.68, doorX + doorW * 0.42, bodyY, d * 0.5, p.metalChrome, 10)
603
+
604
+ // Right control panel + glowing LED timer + keypad grid
605
+ const ctrlW = w * 0.22
606
+ const ctrlX = w * 0.37
607
+ addBox(g, ctrlW, bodyH * 0.9, 0.022, ctrlX, bodyY, d * 0.46, p.plasticDark)
608
+ addBox(g, ctrlW * 0.74, bodyH * 0.16, 0.01, ctrlX, bodyY + bodyH * 0.28, d * 0.474, p.emissiveGreen)
609
+ for (let r = 0; r < 3; r++) {
610
+ for (let c = 0; c < 3; c++) {
611
+ addBox(
612
+ g,
613
+ ctrlW * 0.18,
614
+ bodyH * 0.08,
615
+ 0.008,
616
+ ctrlX + (c - 1) * (ctrlW * 0.24),
617
+ bodyY + (1 - r) * (bodyH * 0.12) - 0.01,
618
+ d * 0.474,
619
+ p.metalBrushed,
620
+ )
621
+ }
622
+ }
623
+ // Lower door release button
624
+ addBox(g, ctrlW * 0.72, bodyH * 0.12, 0.014, ctrlX, bodyY - bodyH * 0.34, d * 0.476, p.metalChrome)
625
+ return g
626
+ },
627
+
628
+ 'dishwasher-movn72ls': (w, h, d, p) => {
629
+ const g = new THREE.Group()
630
+ // Modern stainless dishwasher (0.79 x 1.01 x 0.76)
631
+ const toeH = 0.095
632
+ const bodyH = h - toeH
633
+ const bodyY = toeH + bodyH / 2
634
+
635
+ // Recessed black kickplate grille
636
+ addBox(g, w * 0.96, toeH, d * 0.86, 0, toeH / 2, -d * 0.04, p.plasticDark)
637
+ // Main chassis box
638
+ addBox(g, w * 0.98, bodyH, d * 0.9, 0, bodyY, -d * 0.04, p.metalBrushed)
639
+ // Tall stainless drop-down door
640
+ addRoundedRectExtrude(g, w * 0.98, 0.06, bodyH * 0.85, 0.016, 0, toeH + bodyH * 0.43, d * 0.44, p.metalChrome)
641
+ // Top dark-glass control fascia panel with glowing cycle indicators
642
+ const ctrlH = bodyH * 0.14
643
+ const ctrlY = h - ctrlH / 2 - 0.006
644
+ addBox(g, w * 0.98, ctrlH, 0.065, 0, ctrlY, d * 0.44, p.plasticDark)
645
+ addBox(g, w * 0.22, ctrlH * 0.38, 0.012, 0, ctrlY, d * 0.476, p.screenGlow)
646
+ addBox(g, 0.028, 0.018, 0.014, -w * 0.34, ctrlY, d * 0.476, p.emissiveGreen)
647
+ // Wide horizontal stainless towel-bar handle below control panel
648
+ addCyl(g, 0.014, 0.014, w * 0.78, 0, h - ctrlH - 0.06, d * 0.505, p.metalBrushed, 10, [0, 0, Math.PI / 2])
649
+ for (const side of [-1, 1]) {
650
+ addBox(g, 0.024, 0.024, 0.05, side * (w * 0.34), h - ctrlH - 0.06, d * 0.48, p.metalDark)
651
+ }
652
+ return g
653
+ },
654
+
655
+ 'cutting-board': (w, h, d, p) => {
656
+ const g = new THREE.Group()
657
+ // Thick end-grain butcher block cutting board + chef knife resting on it (0.27 x 0.07 x 0.41)
658
+ const boardH = h * 0.55
659
+ addRoundedRectExtrude(g, w, d * 0.84, boardH, 0.032, 0, boardH / 2, d * 0.08, p.woodWarm)
660
+ // Contrasting dark-wood inlay strip (cleanly raised proud on top surface only)
661
+ addBox(g, w * 0.14, 0.005, d * 0.8, -w * 0.22, boardH + 0.0025, d * 0.08, p.woodDark)
662
+ // Integrated paddle handle at -Z with metal hanging grommet
663
+ addRoundedRectExtrude(g, w * 0.34, d * 0.22, boardH * 0.82, 0.022, 0, boardH / 2, -d * 0.39, p.woodWarm)
664
+ addTorus(g, 0.016, 0.005, 0, boardH * 0.94, -d * 0.42, p.metalDark, [Math.PI / 2, 0, 0])
665
+ // Chef's knife resting cleanly on top surface (+0.006m clearance)
666
+ const knife = new THREE.Group()
667
+ knife.position.set(w * 0.08, boardH + 0.012, d * 0.06)
668
+ knife.rotation.y = 0.26
669
+ addBox(knife, 0.034, 0.006, d * 0.44, 0, 0, -d * 0.1, p.metalChrome)
670
+ addRoundedRectExtrude(knife, 0.024, d * 0.26, 0.022, 0.008, 0, 0.006, d * 0.22, p.woodDark)
671
+ g.add(knife)
672
+ return g
673
+ },
674
+
675
+ fruits: (w, h, d, p) => {
676
+ const g = new THREE.Group()
677
+ // Footed ceramic fruit bowl heaped with colorful fruit (0.39 x 0.27 x 0.39)
678
+ const r = Math.min(w, d) / 2
679
+ const bowlH = h * 0.56
680
+
681
+ // Turned stepped pedestal bowl
682
+ addCyl(g, r * 0.45, r * 0.52, bowlH * 0.25, 0, bowlH * 0.125, 0, p.ceramicMatte, 20)
683
+ addCyl(g, r * 0.98, r * 0.5, bowlH * 0.78, 0, bowlH * 0.62, 0, p.ceramicWhite, 24)
684
+ addTorus(g, r * 0.96, 0.012, 0, bowlH, 0, p.ceramicMatte, [Math.PI / 2, 0, 0])
685
+ addCyl(g, r * 0.84, r * 0.84, 0.016, 0, bowlH * 0.65, 0, p.stoneLight, 20)
686
+
687
+ // Heaped assorted fruits (apples, oranges, lemons, green pears)
688
+ const baseY = bowlH * 0.82
689
+ const items: [number, number, number, number, [number, number, number], THREE.Material][] = [
690
+ [-r * 0.38, baseY + 0.02, -r * 0.18, r * 0.26, [1, 0.92, 1], p.paintRed],
691
+ [r * 0.32, baseY + 0.02, -r * 0.24, r * 0.25, [1, 1, 1], p.terracotta],
692
+ [-r * 0.12, baseY + 0.02, r * 0.34, r * 0.24, [1.25, 0.82, 0.85], p.paintYellow],
693
+ [r * 0.34, baseY + 0.03, r * 0.22, r * 0.25, [0.95, 1.15, 0.95], p.foliageLight],
694
+ [-r * 0.4, baseY + 0.01, r * 0.22, r * 0.22, [1, 0.95, 1], p.terracotta],
695
+ [0, baseY + 0.08, 0, r * 0.28, [1, 0.92, 1], p.paintRed],
696
+ [r * 0.06, baseY + 0.11, -r * 0.12, r * 0.2, [1.2, 0.82, 0.82], p.paintYellow],
697
+ ]
698
+ for (const [fx, fy, fz, fr, sc, mat] of items) {
699
+ addSphere(g, fr, fx, fy, fz, mat, sc, 12)
700
+ }
701
+ // Tiny brown stem on top apple
702
+ addCyl(g, 0.004, 0.005, 0.03, 0, baseY + 0.08 + r * 0.27, 0, p.barkBrown, 6, [0.2, 0, 0.1])
703
+ return g
704
+ },
705
+
706
+ 'frying-pan': (w, h, d, p) => {
707
+ const g = new THREE.Group()
708
+ // Cast-iron / anodized skillet with long ergonomic handle extending along +Z (0.36 x 0.09 x 0.64)
709
+ const r = Math.min(w * 0.5, d * 0.3)
710
+ const panZ = -d * 0.18
711
+ const wallH = h * 0.72
712
+
713
+ // Flat heavy induction base disc
714
+ addCyl(g, r * 0.84, r * 0.82, 0.016, 0, 0.008, panZ, p.metalBrushed, 24)
715
+ // Flared skillet outer wall + dark non-stick inner cooking floor
716
+ addCyl(g, r, r * 0.84, wallH, 0, wallH / 2 + 0.006, panZ, p.metalDark, 24)
717
+ addCyl(g, r * 0.9, r * 0.9, 0.014, 0, wallH * 0.42, panZ, p.rubberBlack, 22)
718
+ addTorus(g, r * 0.98, 0.008, 0, wallH + 0.006, panZ, p.metalChrome, [Math.PI / 2, 0, 0])
719
+ // Helper tab handle opposite the main handle (-Z)
720
+ addRoundedRectExtrude(g, r * 0.5, 0.045, 0.016, 0.01, 0, wallH * 0.88, panZ - r - 0.012, p.metalDark)
721
+ // Riveted stainless neck + ergonomic tapered handle extending to +Z
722
+ const handleLen = d * 0.44
723
+ addBox(g, 0.034, 0.018, 0.055, 0, wallH * 0.88, panZ + r + 0.018, p.metalBrushed)
724
+ addCyl(
725
+ g,
726
+ 0.015,
727
+ 0.019,
728
+ handleLen,
729
+ 0,
730
+ wallH + 0.012,
731
+ panZ + r + handleLen * 0.52,
732
+ p.plasticDark,
733
+ 10,
734
+ [Math.PI / 2 - 0.1, 0, 0],
735
+ )
736
+ addTorus(g, 0.014, 0.004, 0, h - 0.014, d * 0.47, p.metalChrome, [Math.PI / 2, 0, 0])
737
+ return g
738
+ },
739
+
740
+ 'wine-bottle': (w, h, d, p) => {
741
+ const g = new THREE.Group()
742
+ // Tabletop wine duo + stemmed wine glass on a slim wood caddy fitting [0.38, 0.35, 0.17]
743
+ const bottleGlass = p.custom(0x1f3a26, 0.12, 0.08)
744
+ const trayH = 0.018
745
+ addRoundedRectExtrude(g, w, d, trayH, 0.025, 0, trayH / 2, 0, p.woodDark)
746
+
747
+ // 2 classic Bordeaux wine bottles on left & center
748
+ for (const [idx, bx] of [-w * 0.31, -w * 0.02].entries()) {
749
+ const br = Math.min(d * 0.29, 0.046)
750
+ const bodyH = h * (idx === 0 ? 0.56 : 0.52)
751
+ const neckH = h * 0.25
752
+ // Cylindrical bottle body
753
+ addCyl(g, br, br, bodyH, bx, trayH + bodyH / 2, 0, bottleGlass, 18)
754
+ // Rounded bottle shoulder
755
+ addSphere(g, br, bx, trayH + bodyH, 0, bottleGlass, [1, 0.72, 1], 14)
756
+ // Slender bottle neck + foil capsule + lip collar
757
+ addCyl(g, br * 0.34, br * 0.36, neckH, bx, trayH + bodyH + br * 0.55 + neckH / 2, 0, bottleGlass, 12)
758
+ addCyl(
759
+ g,
760
+ br * 0.37,
761
+ br * 0.37,
762
+ neckH * 0.42,
763
+ bx,
764
+ trayH + bodyH + br * 0.55 + neckH * 0.8,
765
+ 0,
766
+ idx === 0 ? p.paintRed : p.metalCopper,
767
+ 12,
768
+ )
769
+ // Cream paper wine label wrapped around midsection
770
+ addCyl(g, br + 0.0015, br + 0.0015, bodyH * 0.42, bx, trayH + bodyH * 0.48, 0, p.ceramicMatte, 18)
771
+ }
772
+
773
+ // Stemmed crystal wine glass on right (+X)
774
+ const gx = w * 0.3
775
+ const glassH = h * 0.64
776
+ addCyl(g, 0.036, 0.038, 0.008, gx, trayH + 0.004, 0, p.glass, 16)
777
+ addCyl(g, 0.005, 0.006, glassH * 0.46, gx, trayH + glassH * 0.24, 0, p.glass, 10)
778
+ addSphere(g, 0.04, gx, trayH + glassH * 0.68, 0, p.glass, [1, 1.35, 1], 14)
779
+ addCyl(g, 0.034, 0.028, 0.035, gx, trayH + glassH * 0.62, 0, p.paintRed, 14)
780
+ return g
781
+ },
782
+
783
+ // ========================= BATHROOM (13) =========================
784
+ 'bathroom-sink': (w, h, d, p) => {
785
+ const g = new THREE.Group()
786
+ // Luxury double-basin bathroom vanity (1.83 x 0.97 x 0.63)
787
+ const legH = h * 0.16
788
+ const counterY = h * 0.82
789
+ const topH = 0.044
790
+ const bodyH = counterY - legH - topH
791
+ const bodyY = legH + bodyH / 2
792
+
793
+ // 4 sturdy tapered legs + center support leg
794
+ addFourLegs(g, w * 0.94, d * 0.86, legH, 0.024, 0.07, p.woodDark, 0.78)
795
+ addCyl(g, 0.02, 0.016, legH, 0, legH / 2, 0, p.woodDark, 10)
796
+
797
+ // Warm wood vanity carcase + white marble countertop + rear backsplash
798
+ addBox(g, w * 0.96, bodyH, d * 0.9, 0, bodyY, -d * 0.02, p.woodWarm)
799
+ addRoundedRectExtrude(g, w, d, topH, 0.02, 0, counterY - topH / 2, 0, p.ceramicWhite)
800
+ addBox(g, w, h * 0.09, 0.024, 0, counterY + h * 0.045, -d / 2 + 0.014, p.ceramicWhite)
801
+
802
+ // Left & right under-basin cabinet doors + center 3-drawer stack
803
+ const sideW = w * 0.34
804
+ const midW = w * 0.24
805
+ for (const side of [-1, 1]) {
806
+ const sx = side * (w * 0.3)
807
+ addBox(g, sideW, bodyH - 0.026, 0.022, sx, bodyY, d * 0.445, p.woodLight)
808
+ addBox(g, sideW * 0.36, 0.014, 0.024, sx, bodyY + bodyH * 0.3, d * 0.47, p.metalChrome)
809
+ // Twin ceramic vessel/undermount basins + chrome faucets
810
+ addRecessedBasin(g, sx, counterY, 0.03, sideW * 0.82, d * 0.62, p.ceramicWhite, p.metalChrome, p.stoneLight)
811
+ addGooseneckFaucet(g, sx, counterY, -d * 0.33, h - counterY - 0.01, 0.13, p.metalChrome)
812
+ }
813
+ const dh = (bodyH - 0.04) / 3
814
+ for (let r = 0; r < 3; r++) {
815
+ const dy = legH + 0.012 + dh / 2 + r * (dh + 0.01)
816
+ addBox(g, midW, dh, 0.022, 0, dy, d * 0.445, p.woodLight)
817
+ addBox(g, midW * 0.44, 0.014, 0.024, 0, dy, d * 0.47, p.metalChrome)
818
+ }
819
+ return g
820
+ },
821
+
822
+ 'wall-sink': (w, h, d, p) => {
823
+ const g = new THREE.Group()
824
+ // Wall-mounted ceramic hand basin + exposed chrome P-trap siphon (0.62 x 0.34 x 0.46, back at -Z)
825
+ const basinH = h * 0.38
826
+ const deckY = h * 0.62
827
+
828
+ // Exposed chrome P-trap drain pipe & wall tailpiece underneath
829
+ addCyl(g, 0.02, 0.02, h * 0.44, 0, h * 0.28, -0.02, p.metalChrome, 12)
830
+ addCyl(g, 0.032, 0.028, 0.06, 0, 0.04, -0.02, p.metalChrome, 14)
831
+ addCyl(g, 0.018, 0.018, d * 0.46, 0, h * 0.14, -d * 0.25, p.metalChrome, 10, [Math.PI / 2, 0, 0])
832
+ addCyl(g, 0.035, 0.035, 0.014, 0, h * 0.14, -d / 2 + 0.008, p.metalChrome, 14, [Math.PI / 2, 0, 0])
833
+
834
+ // Sculpted ceramic basin body + recessed wash bowl
835
+ addRoundedRectExtrude(g, w, d, basinH, 0.07, 0, deckY - basinH / 2, 0, p.ceramicWhite)
836
+ addBox(g, w * 0.94, basinH * 0.82, 0.04, 0, deckY - basinH * 0.45, -d / 2 + 0.02, p.ceramicWhite)
837
+ addRecessedBasin(g, 0, deckY, 0.04, w * 0.8, d * 0.64, p.ceramicWhite, p.metalChrome, p.stoneLight)
838
+
839
+ // Deck-mounted chrome mixer faucet rising to y = h
840
+ addGooseneckFaucet(g, 0, deckY, -d * 0.34, h - deckY - 0.006, 0.12, p.metalChrome)
841
+ return g
842
+ },
843
+
844
+ bathtub: (w, h, d, p) => {
845
+ const g = new THREE.Group()
846
+ // Luxury freestanding hollow soaking bathtub with connected floor-mounted chrome tub filler
847
+ const tubW = w * 0.88
848
+ const tubX = -w * 0.04
849
+ const tubH = h * 0.78
850
+ const wallT = 0.095
851
+ const baseH = tubH * 0.18
852
+
853
+ // Sculpted stepped base plinth + true recessed inner floor
854
+ addRoundedRectExtrude(g, tubW * 0.92, d * 0.88, baseH, 0.28, tubX, baseH / 2, 0, p.ceramicMatte)
855
+ addRoundedRectExtrude(g, tubW - wallT * 1.6, d - wallT * 1.6, 0.04, 0.24, tubX, baseH + 0.02, 0, p.stoneLight)
856
+ // True hollow soaking tub outer shell via Shape.holes (never sealed over!)
857
+ addHollowRoundedWall(g, tubW, d, tubH - baseH, wallT, 0.36, tubX, baseH, 0, p.ceramicWhite)
858
+ // Contoured interior backrest slope strictly inside hollow cavity
859
+ addBox(g, 0.14, tubH * 0.52, d * 0.52, tubX - tubW * 0.35, baseH + tubH * 0.36, 0, p.ceramicWhite, [0, 0, -0.32])
860
+ // Center chrome drain on recessed inner floor + inner overflow slot
861
+ addCyl(g, 0.036, 0.036, 0.012, tubX + tubW * 0.12, baseH + 0.046, 0, p.metalChrome, 14)
862
+
863
+ // Freestanding floor-mounted chrome tub filler column & connected gooseneck spout at +X end
864
+ const fx = w * 0.45
865
+ const fz = -d * 0.14
866
+ const colTopY = h * 0.93
867
+ addCyl(g, 0.055, 0.062, 0.026, fx, 0.013, fz, p.metalChrome, 16)
868
+ addCyl(g, 0.02, 0.024, colTopY, fx, colTopY / 2, fz, p.metalChrome, 14)
869
+ // Seamless elbow joint + horizontal spout reaching over tub rim + downward aerator tip
870
+ addSphere(g, 0.024, fx, colTopY, fz, p.metalChrome, undefined, 12)
871
+ addCyl(g, 0.016, 0.016, 0.26, fx - 0.13, colTopY, fz, p.metalChrome, 12, [0, 0, Math.PI / 2])
872
+ addSphere(g, 0.018, fx - 0.26, colTopY, fz, p.metalChrome, undefined, 10)
873
+ addCyl(g, 0.014, 0.012, 0.06, fx - 0.26, colTopY - 0.03, fz, p.metalChrome, 10)
874
+ // Docked hand-shower wand connected by bracket to riser
875
+ addBox(g, 0.06, 0.02, 0.02, fx + 0.03, h * 0.78, fz, p.metalChrome)
876
+ addCyl(g, 0.014, 0.011, 0.18, fx + 0.055, h * 0.78, fz, p.metalBrushed, 10)
877
+ return g
878
+ },
879
+
880
+ tub: (w, h, d, p) => {
881
+ const g = new THREE.Group()
882
+ // Standard alcove hollow rectangular porcelain bathtub (1.75 x 0.62 x 0.85)
883
+ const rimT = 0.085
884
+ const tubH = h * 0.86
885
+ const floorH = tubH * 0.18
886
+
887
+ // Solid bottom floor pan + true hollow rectangular perimeter walls via Shape.holes
888
+ addBox(g, w * 0.98, floorH, d * 0.98, 0, floorH / 2, 0, p.ceramicMatte)
889
+ addHollowRoundedWall(g, w, d, tubH - floorH, rimT, 0.06, 0, floorH, 0, p.ceramicWhite)
890
+ // Interior sloped backrest strictly inside hollow cavity
891
+ addBox(g, 0.16, tubH * 0.56, d - rimT * 2.3, -w / 2 + rimT * 1.9, floorH + tubH * 0.34, 0, p.ceramicWhite, [
892
+ 0,
893
+ 0,
894
+ -0.32,
895
+ ])
896
+
897
+ // Chrome drain, overflow plate & rim-mounted bath filler spout + twin handles at +X rim
898
+ const deckX = w / 2 - rimT * 0.5
899
+ addCyl(g, 0.032, 0.032, 0.012, w * 0.28, floorH + 0.008, 0, p.metalChrome, 14)
900
+ addCyl(g, 0.022, 0.022, 0.014, w / 2 - rimT - 0.006, tubH * 0.72, 0, p.metalChrome, 12, [0, 0, Math.PI / 2])
901
+ // Connected deck-mounted riser + curved filler spout extending inward over basin
902
+ addCyl(g, 0.022, 0.024, h - tubH + 0.01, deckX, tubH + (h - tubH) * 0.5, 0, p.metalChrome, 12)
903
+ addSphere(g, 0.022, deckX, h - 0.02, 0, p.metalChrome, undefined, 10)
904
+ addCyl(g, 0.015, 0.016, 0.16, deckX - 0.08, h - 0.02, 0, p.metalChrome, 10, [0, 0, Math.PI / 2])
905
+ for (const sz of [-0.12, 0.12]) {
906
+ addCyl(g, 0.024, 0.024, 0.055, deckX, tubH + 0.028, sz, p.metalChrome, 10)
907
+ }
908
+ return g
909
+ },
910
+
911
+ shower: (w, h, d, p) => {
912
+ const g = new THREE.Group()
913
+ // Walk-in square glass shower enclosure (0.92 x 2.05 x 0.92)
914
+ const trayH = 0.085
915
+ const glassH = h - trayH - 0.02
916
+ const glassY = trayH + glassH / 2
917
+
918
+ // Low-profile white ceramic shower tray + corner chrome drain
919
+ addRoundedRectExtrude(g, w, d, trayH, 0.03, 0, trayH / 2, 0, p.ceramicWhite)
920
+ addBox(g, w * 0.88, 0.012, d * 0.88, 0, trayH + 0.002, 0, p.stoneLight)
921
+ addCyl(g, 0.045, 0.045, 0.014, -w * 0.24, trayH + 0.006, -d * 0.24, p.metalChrome, 16)
922
+
923
+ // Corner chrome framing posts & top stabilizer header bar
924
+ const post = 0.03
925
+ for (const [px, pz] of [
926
+ [-w / 2 + post / 2, -d / 2 + post / 2],
927
+ [w / 2 - post / 2, -d / 2 + post / 2],
928
+ [-w / 2 + post / 2, d / 2 - post / 2],
929
+ [w / 2 - post / 2, d / 2 - post / 2],
930
+ ] as const) {
931
+ addBox(g, post, glassH, post, px, glassY, pz, p.metalChrome)
932
+ }
933
+ addBox(g, w, 0.028, 0.028, 0, h - 0.014, d / 2 - 0.015, p.metalChrome)
934
+ addBox(g, 0.028, 0.028, d, w / 2 - 0.015, h - 0.014, 0, p.metalChrome)
935
+
936
+ // Rear tiled stone wall panels (-Z and -X)
937
+ addBox(g, w - post, glassH, 0.024, 0, glassY, -d / 2 + 0.014, p.stoneLight)
938
+ addBox(g, 0.024, glassH, d - post, -w / 2 + 0.014, glassY, 0, p.stoneLight)
939
+
940
+ // Front (+Z) hinged glass door + right (+X) fixed tempered glass panel + chrome handle
941
+ addBox(g, w - post * 2, glassH - 0.03, 0.012, 0, glassY, d / 2 - 0.015, p.glass)
942
+ addBox(g, 0.012, glassH - 0.03, d - post * 2, w / 2 - 0.015, glassY, 0, p.glass)
943
+ addCyl(g, 0.01, 0.01, 0.34, -w * 0.28, h * 0.48, d / 2 + 0.02, p.metalChrome, 10)
944
+
945
+ // Interior chrome shower riser column with overhead rainfall head
946
+ addShowerColumn(g, 0, trayH, -d / 2 + 0.04, glassH * 0.92, p, 0)
947
+ return g
948
+ },
949
+
950
+ 'shower-angle': (w, h, d, p) => {
951
+ const g = new THREE.Group()
952
+ // True 5-sided neo-angle corner glass shower enclosure with 45-degree chamfered front entry (0.83 x 1.81 x 0.83)
953
+ const trayH = 0.095
954
+ const glassH = h - trayH - 0.02
955
+ const glassY = trayH + glassH / 2
956
+ const cut = 0.44 // bold 45-degree front corner chamfer so neo-angle pentagon silhouette reads unmistakably
957
+
958
+ // True 5-sided pentagon ceramic shower pan via ExtrudeGeometry
959
+ const panShape = new THREE.Shape()
960
+ panShape.moveTo(-w / 2, -d / 2)
961
+ panShape.lineTo(w / 2, -d / 2)
962
+ panShape.lineTo(w / 2, d / 2 - d * cut)
963
+ panShape.lineTo(w / 2 - w * cut, d / 2)
964
+ panShape.lineTo(-w / 2, d / 2)
965
+ panShape.closePath()
966
+ const panGeo = new THREE.ExtrudeGeometry(panShape, {
967
+ depth: trayH,
968
+ bevelEnabled: false,
969
+ })
970
+ panGeo.rotateX(Math.PI / 2)
971
+ const panMesh = new THREE.Mesh(panGeo, p.ceramicWhite)
972
+ panMesh.position.set(0, trayH, 0)
973
+ g.add(panMesh)
974
+ addCyl(g, 0.042, 0.042, 0.014, -w * 0.14, trayH + 0.006, -d * 0.14, p.metalChrome, 14)
975
+
976
+ // Rear tiled stone wall panels (-Z, -X)
977
+ addBox(g, w, glassH, 0.026, 0, glassY, -d / 2 + 0.013, p.stoneLight)
978
+ addBox(g, 0.026, glassH, d, -w / 2 + 0.013, glassY, 0, p.stoneLight)
979
+
980
+ // Side fixed glass panels + bold 45-degree chamfered front glass door + matte-dark structural frame
981
+ const sideLen = d * (1 - cut)
982
+ const frontLen = w * (1 - cut)
983
+ addBox(g, 0.014, glassH, sideLen, w / 2 - 0.016, glassY, -d / 2 + sideLen / 2, p.glass)
984
+ addBox(g, frontLen, glassH, 0.014, -w / 2 + frontLen / 2, glassY, d / 2 - 0.016, p.glass)
985
+ // Side/front top header rails
986
+ addBox(g, 0.032, 0.032, sideLen, w / 2 - 0.016, h - 0.016, -d / 2 + sideLen / 2, p.metalDark)
987
+ addBox(g, frontLen, 0.032, 0.032, -w / 2 + frontLen / 2, h - 0.016, d / 2 - 0.016, p.metalDark)
988
+
989
+ // Angled 45-degree diagonal neo-angle door spanning the cut corner
990
+ const diagLen = Math.hypot(w * cut, d * cut)
991
+ const diagX = w / 2 - (w * cut) / 2
992
+ const diagZ = d / 2 - (d * cut) / 2
993
+ addBox(g, diagLen, glassH, 0.014, diagX, glassY, diagZ, p.glass, [0, Math.PI / 4, 0])
994
+ addBox(g, diagLen, 0.036, 0.034, diagX, h - 0.018, diagZ, p.metalDark, [0, Math.PI / 4, 0])
995
+ addBox(g, diagLen, 0.036, 0.034, diagX, trayH + 0.018, diagZ, p.metalDark, [0, Math.PI / 4, 0])
996
+ // Vertical structural corner framing posts along pentagon vertices
997
+ addBox(g, 0.034, glassH, 0.034, w / 2 - 0.016, glassY, d / 2 - d * cut, p.metalDark)
998
+ addBox(g, 0.034, glassH, 0.034, w / 2 - w * cut, glassY, d / 2 - 0.016, p.metalDark)
999
+ addBox(g, 0.034, glassH, 0.034, w / 2 - 0.016, glassY, -d / 2 + 0.016, p.metalDark)
1000
+ addBox(g, 0.034, glassH, 0.034, -w / 2 + 0.016, glassY, d / 2 - 0.016, p.metalDark)
1001
+ addCyl(g, 0.011, 0.011, 0.34, diagX + 0.04, h * 0.48, diagZ + 0.04, p.metalChrome, 10)
1002
+
1003
+ // Corner-mounted shower column facing diagonally into stall
1004
+ addShowerColumn(g, -w * 0.34, trayH, -d * 0.34, glassH * 0.9, p, Math.PI / 4)
1005
+ return g
1006
+ },
1007
+
1008
+ 'shower-square': (w, h, d, p) => {
1009
+ const g = new THREE.Group()
1010
+ // Framed compact square glass shower stall with dark matte framing & soap caddy (0.81 x 1.8 x 0.81)
1011
+ const trayH = 0.1
1012
+ const glassH = h - trayH - 0.02
1013
+ const glassY = trayH + glassH / 2
1014
+ const frame = 0.028
1015
+
1016
+ // Raised square acrylic shower pan + center chrome drain
1017
+ addRoundedRectExtrude(g, w, d, trayH, 0.025, 0, trayH / 2, 0, p.ceramicWhite)
1018
+ addCyl(g, 0.04, 0.04, 0.012, 0, trayH + 0.004, 0, p.metalChrome, 14)
1019
+
1020
+ // 4-sided matte black architectural shower frame posts + top/bottom perimeter tracks
1021
+ for (const sx of [-1, 1]) {
1022
+ for (const sz of [-1, 1]) {
1023
+ addBox(g, frame, glassH, frame, sx * (w / 2 - frame / 2), glassY, sz * (d / 2 - frame / 2), p.metalDark)
1024
+ }
1025
+ addBox(g, frame, frame, d, sx * (w / 2 - frame / 2), h - frame / 2, 0, p.metalDark)
1026
+ addBox(g, w, frame, frame, 0, h - frame / 2, sx * (d / 2 - frame / 2), p.metalDark)
1027
+ }
1028
+
1029
+ // Back solid wall (-Z) & 3 clear glass enclosure sides (with horizontal muntin accent bar)
1030
+ addBox(g, w - frame * 2, glassH, 0.02, 0, glassY, -d / 2 + 0.014, p.ceramicMatte)
1031
+ addBox(g, w - frame * 2, glassH, 0.012, 0, glassY, d / 2 - 0.014, p.glass)
1032
+ addBox(g, 0.012, glassH, d - frame * 2, -w / 2 + 0.014, glassY, 0, p.glass)
1033
+ addBox(g, 0.012, glassH, d - frame * 2, w / 2 - 0.014, glassY, 0, p.glass)
1034
+ // Door pull handle on front +Z panel
1035
+ addBox(g, 0.016, 0.28, 0.036, -w * 0.28, h * 0.48, d / 2 + 0.012, p.metalDark)
1036
+ // Interior chrome corner soap shelf & shower column
1037
+ addBox(g, 0.22, 0.016, 0.12, w * 0.25, h * 0.52, -d / 2 + 0.08, p.metalChrome)
1038
+ addShowerColumn(g, -w * 0.08, trayH, -d / 2 + 0.04, glassH * 0.9, p, 0)
1039
+ return g
1040
+ },
1041
+
1042
+ 'shower-rug': (w, h, d, p) => {
1043
+ const g = new THREE.Group()
1044
+ // Plush ribbed cotton bath mat (0.77 x 0.03 x 0.48)
1045
+ addRoundedRectExtrude(g, w, d, h * 0.52, 0.06, 0, h * 0.26, 0, p.fabricNeutral)
1046
+ // Raised stitched border band
1047
+ addRoundedRectExtrude(g, w * 0.92, d * 0.86, h * 0.35, 0.045, 0, h * 0.62, 0, p.ceramicMatte)
1048
+ // 5 parallel plush tufted ribs across center
1049
+ const ribs = 5
1050
+ for (let i = 0; i < ribs; i++) {
1051
+ const rz = -d * 0.3 + (d * 0.6 * i) / (ribs - 1)
1052
+ addRoundedRectExtrude(g, w * 0.82, d * 0.08, h * 0.32, 0.015, 0, h * 0.82, rz, p.fabricAccent)
1053
+ }
1054
+ return g
1055
+ },
1056
+
1057
+ toilet: (w, h, d, p) => {
1058
+ const g = new THREE.Group()
1059
+ // Classic two-piece porcelain toilet (0.42 x 0.82 x 0.72, cistern at -Z, bowl at +Z)
1060
+ const bowlY = h * 0.48
1061
+ const bowlZ = d * 0.14
1062
+ const tankD = d * 0.28
1063
+ const tankZ = -d / 2 + tankD / 2
1064
+
1065
+ // Pedestal foot & sculpted tapered trapway base
1066
+ addRoundedRectExtrude(g, w * 0.66, d * 0.68, 0.045, 0.08, 0, 0.0225, 0.02, p.ceramicWhite)
1067
+ addCyl(g, w * 0.34, w * 0.26, bowlY * 0.78, 0, bowlY * 0.42, bowlZ - 0.03, p.ceramicWhite, 18)
1068
+
1069
+ // Rounded oval toilet bowl + rim + closed lid & hinge bar
1070
+ addSphere(g, 0.5, 0, bowlY * 0.76, bowlZ, p.ceramicWhite, [w * 0.9, bowlY * 0.58, d * 0.62], 18)
1071
+ addCyl(g, w * 0.45, w * 0.38, 0.055, 0, bowlY * 0.94, bowlZ, p.ceramicWhite, 20)
1072
+ // Seat ring & beveled lid
1073
+ addRoundedRectExtrude(g, w * 0.88, d * 0.56, 0.024, 0.14, 0, bowlY + 0.02, bowlZ + 0.01, p.ceramicMatte)
1074
+ addRoundedRectExtrude(g, w * 0.86, d * 0.54, 0.026, 0.14, 0, bowlY + 0.044, bowlZ + 0.01, p.ceramicWhite)
1075
+ addCyl(g, 0.012, 0.012, w * 0.52, 0, bowlY + 0.04, tankZ + tankD / 2 + 0.02, p.metalChrome, 10, [0, 0, Math.PI / 2])
1076
+
1077
+ // Rear porcelain cistern tank + beveled lid + chrome dual-flush top button
1078
+ const tankH = h - bowlY * 0.75
1079
+ addRoundedRectExtrude(g, w * 0.96, tankD, tankH - 0.03, 0.04, 0, bowlY * 0.75 + (tankH - 0.03) / 2, tankZ, p.ceramicWhite)
1080
+ addRoundedRectExtrude(g, w, tankD * 1.08, 0.036, 0.04, 0, h - 0.018, tankZ, p.ceramicWhite)
1081
+ addCyl(g, 0.026, 0.028, 0.016, 0, h + 0.004, tankZ, p.metalChrome, 14)
1082
+ return g
1083
+ },
1084
+
1085
+ urinal: (w, h, d, p) => {
1086
+ const g = new THREE.Group()
1087
+ // Wall-mounted porcelain urinal with top chrome flushometer valve (0.4 x 0.65 x 0.35, back at -Z)
1088
+ const bodyH = h * 0.78
1089
+
1090
+ // Rear wall mounting flange & sculpted ceramic back-shield
1091
+ addRoundedRectExtrude(g, w * 0.9, 0.06, bodyH, 0.08, 0, bodyH / 2, -d / 2 + 0.03, p.ceramicWhite)
1092
+ // Contoured side privacy cheek walls
1093
+ for (const side of [-1, 1]) {
1094
+ addBox(g, 0.045, bodyH * 0.74, d * 0.62, side * (w * 0.42), bodyH * 0.45, -d * 0.12, p.ceramicWhite)
1095
+ }
1096
+ // Protruding lower catch basin + recessed dark drain + chrome strainer
1097
+ addRoundedRectExtrude(g, w * 0.94, d * 0.88, bodyH * 0.28, 0.12, 0, bodyH * 0.18, 0, p.ceramicWhite)
1098
+ addCyl(g, 0.036, 0.036, 0.012, 0, bodyH * 0.33, 0.02, p.metalChrome, 14)
1099
+
1100
+ // Top chrome flushometer pipe, valve body & side flush handle
1101
+ addCyl(g, 0.018, 0.018, h - bodyH, 0, bodyH + (h - bodyH) / 2, -d * 0.2, p.metalChrome, 12)
1102
+ addCyl(g, 0.032, 0.032, 0.065, 0, h - 0.04, -d * 0.2, p.metalChrome, 14)
1103
+ addCyl(g, 0.009, 0.009, 0.08, 0.055, h - 0.04, -d * 0.2, p.metalBrushed, 8, [0, 0, Math.PI / 2])
1104
+ addCyl(g, 0.026, 0.026, 0.05, 0, h - 0.04, -d / 2 + 0.03, p.metalChrome, 12, [Math.PI / 2, 0, 0])
1105
+ return g
1106
+ },
1107
+
1108
+ 'toilet-brush': (w, h, d, p) => {
1109
+ const g = new THREE.Group()
1110
+ // Freestanding toilet brush & cylindrical canister caddy (0.13 x 0.4 x 0.13)
1111
+ const r = Math.min(w, d) * 0.48
1112
+ const caddyH = h * 0.42
1113
+
1114
+ // Non-slip rubber base ring + weighted ceramic/steel canister holder
1115
+ addCyl(g, r * 0.96, r, 0.016, 0, 0.008, 0, p.rubberBlack, 18)
1116
+ addCyl(g, r * 0.94, r * 0.96, caddyH, 0, 0.016 + caddyH / 2, 0, p.ceramicWhite, 20)
1117
+ // Tapered stainless splash-guard lid collar
1118
+ addCyl(g, r * 0.34, r * 0.95, 0.032, 0, 0.016 + caddyH + 0.016, 0, p.metalChrome, 18)
1119
+ // Vertical brushed stainless brush handle rod + rounded grip cap
1120
+ const rodH = h - caddyH - 0.045
1121
+ addCyl(g, 0.01, 0.01, rodH, 0, caddyH + 0.032 + rodH / 2, 0, p.metalBrushed, 12)
1122
+ addCyl(g, 0.015, 0.012, 0.065, 0, h - 0.034, 0, p.metalDark, 12)
1123
+ addSphere(g, 0.015, 0, h - 0.006, 0, p.metalChrome, undefined, 10)
1124
+ return g
1125
+ },
1126
+
1127
+ 'toilet-paper': (w, h, d, p) => {
1128
+ const g = new THREE.Group()
1129
+ // Wall-mounted chrome toilet paper holder with plump white roll & draped sheet (0.26 x 0.27 x 0.24)
1130
+ const rollR = Math.min(d * 0.36, h * 0.32)
1131
+ const rollW = w * 0.68
1132
+ const spindleY = h * 0.66
1133
+ const spindleZ = d * 0.08
1134
+
1135
+ // Wall rosette mounting plate at -Z + cantilevered L-arm + horizontal spindle
1136
+ addCyl(g, 0.036, 0.038, 0.016, -w * 0.38, spindleY, -d / 2 + 0.008, p.metalChrome, 14, [Math.PI / 2, 0, 0])
1137
+ addCyl(g, 0.01, 0.01, d * 0.58, -w * 0.38, spindleY, -d / 2 + d * 0.29, p.metalChrome, 10, [Math.PI / 2, 0, 0])
1138
+ addCyl(g, 0.01, 0.01, w * 0.84, 0.02, spindleY, spindleZ, p.metalChrome, 10, [0, 0, Math.PI / 2])
1139
+ addSphere(g, 0.016, w * 0.44, spindleY, spindleZ, p.metalChrome, undefined, 10)
1140
+
1141
+ // Plump white toilet paper roll + cardboard inner core
1142
+ addCyl(g, rollR, rollR, rollW, 0.04, spindleY, spindleZ, p.ceramicWhite, 22, [0, 0, Math.PI / 2])
1143
+ addCyl(g, rollR * 0.32, rollR * 0.32, rollW + 0.004, 0.04, spindleY, spindleZ, p.barkBrown, 14, [0, 0, Math.PI / 2])
1144
+
1145
+ // Short draped paper tail sheet hanging smoothly down the front (+Z)
1146
+ addBox(g, rollW * 0.98, h * 0.48, 0.008, 0.04, spindleY - h * 0.24, spindleZ + rollR - 0.004, p.ceramicWhite)
1147
+ return g
1148
+ },
1149
+
1150
+ 'washing-machine': (w, h, d, p) => {
1151
+ const g = new THREE.Group()
1152
+ // Front-loading washing machine (0.6 x 0.86 x 0.53)
1153
+ const footH = 0.024
1154
+ const topH = 0.032
1155
+ const bodyH = h - footH - topH
1156
+ const bodyY = footH + bodyH / 2
1157
+
1158
+ addFourLegs(g, w * 0.88, d * 0.84, footH, 0.018, 0.04, p.rubberBlack, 1)
1159
+ // Enameled white cabinet & overhanging top worktop lid
1160
+ addBox(g, w, bodyH, d * 0.94, 0, bodyY, -d * 0.02, p.paintWhite)
1161
+ addRoundedRectExtrude(g, w, d, topH, 0.016, 0, h - topH / 2, 0, p.ceramicWhite)
1162
+
1163
+ // Upper control fascia bar: left detergent drawer, center rotary dial, right LED screen (cleanly proud)
1164
+ const ctrlH = bodyH * 0.18
1165
+ const ctrlY = h - topH - ctrlH / 2
1166
+ addBox(g, w * 0.98, ctrlH, 0.022, 0, ctrlY, d * 0.464, p.ceramicMatte)
1167
+ // Detergent pull-out drawer outline + slot handle
1168
+ addBox(g, w * 0.28, ctrlH * 0.78, 0.016, -w * 0.32, ctrlY, d * 0.482, p.ceramicWhite)
1169
+ addBox(g, w * 0.16, 0.014, 0.018, -w * 0.32, ctrlY + ctrlH * 0.18, d * 0.494, p.metalBrushed)
1170
+ // Center chrome rotary program selector dial
1171
+ addCyl(g, ctrlH * 0.3, ctrlH * 0.34, 0.036, 0, ctrlY, d * 0.492, p.metalChrome, 16, [Math.PI / 2, 0, 0])
1172
+ // Right dark LED display panel + glowing green indicator
1173
+ addBox(g, w * 0.28, ctrlH * 0.62, 0.016, w * 0.31, ctrlY, d * 0.482, p.plasticDark)
1174
+ addBox(g, w * 0.12, ctrlH * 0.24, 0.012, w * 0.31, ctrlY, d * 0.494, p.emissiveGreen)
1175
+
1176
+ // Iconic front circular porthole door (cleanly stepped proud layers: bezel -> dark boot -> drum -> glass)
1177
+ const drumY = footH + bodyH * 0.44
1178
+ const doorR = Math.min(w * 0.34, bodyH * 0.32)
1179
+ addCyl(g, doorR, doorR * 1.04, 0.045, 0, drumY, d * 0.478, p.metalChrome, 26, [Math.PI / 2, 0, 0])
1180
+ addCyl(g, doorR * 0.78, doorR * 0.78, 0.024, 0, drumY, d * 0.494, p.metalDark, 22, [Math.PI / 2, 0, 0])
1181
+ addTorus(g, doorR * 0.9, 0.022, 0, drumY, d * 0.506, p.metalDark)
1182
+ addSphere(g, doorR * 0.75, 0, drumY, d * 0.505, p.glass, [1, 1, 0.26], 18)
1183
+ // Side door latch handle
1184
+ addBox(g, 0.028, 0.09, 0.028, doorR * 0.88, drumY, d * 0.514, p.plasticDark)
1185
+ // Lower right filter service flap
1186
+ addBox(g, 0.1, 0.075, 0.014, w * 0.34, footH + 0.06, d * 0.464, p.ceramicMatte)
1187
+ return g
1188
+ },
1189
+ }