@pascal-app/core 0.6.0 → 0.8.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 (120) hide show
  1. package/dist/events/bus.d.ts +45 -6
  2. package/dist/events/bus.d.ts.map +1 -1
  3. package/dist/events/bus.js +1 -1
  4. package/dist/hooks/scene-registry/scene-registry.d.ts +2 -0
  5. package/dist/hooks/scene-registry/scene-registry.d.ts.map +1 -1
  6. package/dist/hooks/scene-registry/scene-registry.js +2 -0
  7. package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
  8. package/dist/hooks/spatial-grid/spatial-grid-manager.js +164 -6
  9. package/dist/index.d.ts +8 -15
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +7 -14
  12. package/dist/lib/door-operation.d.ts +7 -0
  13. package/dist/lib/door-operation.d.ts.map +1 -0
  14. package/dist/lib/door-operation.js +25 -0
  15. package/dist/lib/polygon-geometry.d.ts.map +1 -1
  16. package/dist/lib/slab-polygon.d.ts +3 -0
  17. package/dist/lib/slab-polygon.d.ts.map +1 -0
  18. package/dist/lib/slab-polygon.js +58 -0
  19. package/dist/lib/space-detection.d.ts.map +1 -1
  20. package/dist/lib/space-detection.js +10 -8
  21. package/dist/material-library.d.ts +5 -3
  22. package/dist/material-library.d.ts.map +1 -1
  23. package/dist/material-library.js +28 -32
  24. package/dist/schema/asset-url.d.ts +34 -0
  25. package/dist/schema/asset-url.d.ts.map +1 -0
  26. package/dist/schema/asset-url.js +79 -0
  27. package/dist/schema/asset-url.test.d.ts +2 -0
  28. package/dist/schema/asset-url.test.d.ts.map +1 -0
  29. package/dist/schema/asset-url.test.js +134 -0
  30. package/dist/schema/index.d.ts +7 -5
  31. package/dist/schema/index.d.ts.map +1 -1
  32. package/dist/schema/index.js +5 -3
  33. package/dist/schema/material.d.ts +1 -0
  34. package/dist/schema/material.d.ts.map +1 -1
  35. package/dist/schema/material.js +13 -11
  36. package/dist/schema/nodes/column.d.ts +520 -0
  37. package/dist/schema/nodes/column.d.ts.map +1 -0
  38. package/dist/schema/nodes/column.js +385 -0
  39. package/dist/schema/nodes/door.d.ts +72 -0
  40. package/dist/schema/nodes/door.d.ts.map +1 -1
  41. package/dist/schema/nodes/door.js +39 -2
  42. package/dist/schema/nodes/fence.d.ts +1 -1
  43. package/dist/schema/nodes/fence.js +2 -2
  44. package/dist/schema/nodes/guide.d.ts +17 -0
  45. package/dist/schema/nodes/guide.d.ts.map +1 -1
  46. package/dist/schema/nodes/guide.js +11 -1
  47. package/dist/schema/nodes/item.d.ts +20 -0
  48. package/dist/schema/nodes/item.d.ts.map +1 -1
  49. package/dist/schema/nodes/item.js +30 -1
  50. package/dist/schema/nodes/level.d.ts +1 -1
  51. package/dist/schema/nodes/level.d.ts.map +1 -1
  52. package/dist/schema/nodes/level.js +6 -0
  53. package/dist/schema/nodes/roof-segment.d.ts +2 -2
  54. package/dist/schema/nodes/roof.d.ts +2 -2
  55. package/dist/schema/nodes/roof.d.ts.map +1 -1
  56. package/dist/schema/nodes/roof.js +5 -5
  57. package/dist/schema/nodes/scan.d.ts.map +1 -1
  58. package/dist/schema/nodes/scan.js +2 -1
  59. package/dist/schema/nodes/site.d.ts +7 -0
  60. package/dist/schema/nodes/site.d.ts.map +1 -1
  61. package/dist/schema/nodes/spawn.d.ts +24 -0
  62. package/dist/schema/nodes/spawn.d.ts.map +1 -0
  63. package/dist/schema/nodes/spawn.js +8 -0
  64. package/dist/schema/nodes/stair.d.ts +6 -6
  65. package/dist/schema/nodes/stair.d.ts.map +1 -1
  66. package/dist/schema/nodes/stair.js +9 -7
  67. package/dist/schema/nodes/window.d.ts +55 -0
  68. package/dist/schema/nodes/window.d.ts.map +1 -1
  69. package/dist/schema/nodes/window.js +29 -0
  70. package/dist/schema/types.d.ts +320 -5
  71. package/dist/schema/types.d.ts.map +1 -1
  72. package/dist/schema/types.js +4 -0
  73. package/dist/store/actions/node-actions.d.ts.map +1 -1
  74. package/dist/store/actions/node-actions.js +13 -10
  75. package/dist/store/use-interactive.d.ts +43 -0
  76. package/dist/store/use-interactive.d.ts.map +1 -1
  77. package/dist/store/use-interactive.js +66 -0
  78. package/dist/store/use-scene.d.ts.map +1 -1
  79. package/dist/store/use-scene.js +69 -5
  80. package/dist/systems/stair/stair-opening-sync.d.ts.map +1 -1
  81. package/dist/systems/stair/stair-opening-sync.js +41 -7
  82. package/dist/systems/stair/stair-opening-sync.test.d.ts +2 -0
  83. package/dist/systems/stair/stair-opening-sync.test.d.ts.map +1 -0
  84. package/dist/systems/stair/stair-opening-sync.test.js +63 -0
  85. package/dist/systems/wall/wall-curve.d.ts +1 -1
  86. package/dist/systems/wall/wall-curve.d.ts.map +1 -1
  87. package/dist/systems/wall/wall-curve.js +1 -1
  88. package/dist/systems/wall/wall-mitering.d.ts.map +1 -1
  89. package/dist/systems/wall/wall-mitering.js +2 -6
  90. package/package.json +34 -5
  91. package/dist/materials.d.ts +0 -10
  92. package/dist/materials.d.ts.map +0 -1
  93. package/dist/materials.js +0 -22
  94. package/dist/systems/ceiling/ceiling-system.d.ts +0 -8
  95. package/dist/systems/ceiling/ceiling-system.d.ts.map +0 -1
  96. package/dist/systems/ceiling/ceiling-system.js +0 -92
  97. package/dist/systems/door/door-system.d.ts +0 -2
  98. package/dist/systems/door/door-system.d.ts.map +0 -1
  99. package/dist/systems/door/door-system.js +0 -195
  100. package/dist/systems/fence/fence-system.d.ts +0 -2
  101. package/dist/systems/fence/fence-system.d.ts.map +0 -1
  102. package/dist/systems/fence/fence-system.js +0 -187
  103. package/dist/systems/item/item-system.d.ts +0 -2
  104. package/dist/systems/item/item-system.d.ts.map +0 -1
  105. package/dist/systems/item/item-system.js +0 -48
  106. package/dist/systems/roof/roof-system.d.ts +0 -16
  107. package/dist/systems/roof/roof-system.d.ts.map +0 -1
  108. package/dist/systems/roof/roof-system.js +0 -797
  109. package/dist/systems/slab/slab-system.d.ts +0 -8
  110. package/dist/systems/slab/slab-system.d.ts.map +0 -1
  111. package/dist/systems/slab/slab-system.js +0 -214
  112. package/dist/systems/stair/stair-system.d.ts +0 -2
  113. package/dist/systems/stair/stair-system.d.ts.map +0 -1
  114. package/dist/systems/stair/stair-system.js +0 -776
  115. package/dist/systems/wall/wall-system.d.ts +0 -12
  116. package/dist/systems/wall/wall-system.d.ts.map +0 -1
  117. package/dist/systems/wall/wall-system.js +0 -455
  118. package/dist/systems/window/window-system.d.ts +0 -2
  119. package/dist/systems/window/window-system.d.ts.map +0 -1
  120. package/dist/systems/window/window-system.js +0 -131
@@ -0,0 +1,385 @@
1
+ import dedent from 'dedent';
2
+ import { z } from 'zod';
3
+ import { BaseNode, nodeType, objectId } from '../base';
4
+ import { MaterialSchema } from '../material';
5
+ export const ColumnStyle = z.enum([
6
+ 'plain',
7
+ 'faceted',
8
+ 'fluted',
9
+ 'lathe-turned',
10
+ 'dravidian-carved',
11
+ 'cluster',
12
+ ]);
13
+ export const ColumnCrossSection = z.enum([
14
+ 'round',
15
+ 'square',
16
+ 'rectangular',
17
+ 'octagonal',
18
+ 'sixteen-sided',
19
+ ]);
20
+ export const ColumnShaftProfile = z.enum(['straight', 'tapered', 'bulged', 'baluster', 'hourglass']);
21
+ export const ColumnShaftDetail = z.enum(['none', 'fluted', 'spiral', 'panelled', 'lathe-turned']);
22
+ export const ColumnPanelShape = z.enum(['rectangle', 'arched', 'diamond']);
23
+ export const ColumnBaseStyle = z.enum([
24
+ 'none',
25
+ 'simple-square',
26
+ 'round-rings',
27
+ 'square-plinth',
28
+ 'stepped-square',
29
+ 'lotus',
30
+ 'ribbed-lotus',
31
+ 'panelled-pedestal',
32
+ ]);
33
+ export const ColumnCapitalStyle = z.enum([
34
+ 'none',
35
+ 'simple',
36
+ 'simple-slab',
37
+ 'rounded',
38
+ 'stepped',
39
+ 'doric',
40
+ 'volute',
41
+ 'ionic-volute',
42
+ 'leaf-carved',
43
+ 'corinthian-leaf',
44
+ 'south-indian-bracket',
45
+ 'wood-bracket',
46
+ ]);
47
+ export const ColumnRingPlacement = z.enum(['ends', 'even', 'top', 'bottom']);
48
+ export const ColumnCarvingPlacement = z.enum(['shaft', 'base', 'capital', 'all']);
49
+ export const ColumnNode = BaseNode.extend({
50
+ id: objectId('column'),
51
+ type: nodeType('column'),
52
+ position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
53
+ rotation: z.number().default(0),
54
+ style: ColumnStyle.default('plain'),
55
+ crossSection: ColumnCrossSection.default('round'),
56
+ height: z.number().positive().default(2.8),
57
+ radius: z.number().positive().default(0.22),
58
+ width: z.number().positive().default(0.44),
59
+ depth: z.number().positive().default(0.44),
60
+ edgeSoftness: z.number().min(0).max(0.12).default(0.025),
61
+ baseHeight: z.number().min(0).default(0.18),
62
+ capitalHeight: z.number().min(0).default(0.18),
63
+ shaftProfile: ColumnShaftProfile.default('straight'),
64
+ shaftTaper: z.number().min(0).max(0.85).default(0),
65
+ shaftBulge: z.number().min(-0.5).max(0.8).default(0),
66
+ shaftStartScale: z.number().min(0.2).max(2).default(0.72),
67
+ shaftEndScale: z.number().min(0.2).max(2).default(0.72),
68
+ shaftSegmentCount: z.number().int().min(1).max(64).default(24),
69
+ shaftTwistStep: z.number().min(-90).max(90).default(0),
70
+ shaftCornerRadius: z.number().min(0).max(0.3).default(0.035),
71
+ shaftDetail: ColumnShaftDetail.default('none'),
72
+ baseStyle: ColumnBaseStyle.default('round-rings'),
73
+ baseWidthScale: z.number().min(0.4).max(3).default(1.24),
74
+ baseDepthScale: z.number().min(0.4).max(3).default(1.24),
75
+ baseTierCount: z.number().int().min(1).max(8).default(3),
76
+ baseStepSpread: z.number().min(0).max(1).default(0.42),
77
+ basePlinthHeightRatio: z.number().min(0.2).max(0.7).default(0.44),
78
+ baseRoundBandScale: z.number().min(0.5).max(1.2).default(0.92),
79
+ baseNeckScale: z.number().min(0.35).max(1).default(0.72),
80
+ baseRoundBandCount: z.number().int().min(0).max(16).default(3),
81
+ baseRibCount: z.number().int().min(0).max(48).default(0),
82
+ baseCarvingLevel: z.number().int().min(0).max(4).default(0),
83
+ basePanelInset: z.number().min(0).max(0.1).default(0.02),
84
+ capitalStyle: ColumnCapitalStyle.default('simple'),
85
+ capitalWidthScale: z.number().min(0.4).max(3).default(1.46),
86
+ capitalDepthScale: z.number().min(0.4).max(3).default(1.46),
87
+ capitalTierCount: z.number().int().min(1).max(8).default(3),
88
+ capitalStepSpread: z.number().min(0).max(1).default(0.42),
89
+ capitalBandCount: z.number().int().min(0).max(16).default(2),
90
+ voluteSize: z.number().min(0.02).max(0.3).default(0.08),
91
+ voluteCount: z.number().int().min(0).max(8).default(4),
92
+ leafCount: z.number().int().min(0).max(48).default(18),
93
+ leafRows: z.number().int().min(0).max(4).default(2),
94
+ bracketDepth: z.number().min(0).max(1.5).default(0.35),
95
+ bracketTierCount: z.number().int().min(0).max(8).default(3),
96
+ pendantCount: z.number().int().min(0).max(16).default(0),
97
+ capitalCarvingLevel: z.number().int().min(0).max(4).default(0),
98
+ ringCount: z.number().int().min(0).max(16).default(0),
99
+ ringPlacement: ColumnRingPlacement.default('ends'),
100
+ ringThickness: z.number().min(0.01).max(0.14).default(0.055),
101
+ ringSpread: z.number().min(0.04).max(0.45).default(0.16),
102
+ fluteCount: z.number().int().min(0).max(32).default(0),
103
+ fluteDepth: z.number().min(0.005).max(0.08).default(0.02),
104
+ fluteWidth: z.number().min(0.005).max(0.1).default(0.02),
105
+ spiralTwist: z.number().min(-3).max(3).default(0),
106
+ spiralRibCount: z.number().int().min(0).max(32).default(0),
107
+ panelCount: z.number().int().min(0).max(24).default(0),
108
+ panelInsetDepth: z.number().min(0).max(0.1).default(0.02),
109
+ panelShape: ColumnPanelShape.default('rectangle'),
110
+ latheRingCount: z.number().int().min(0).max(32).default(0),
111
+ latheRingSpacing: ColumnRingPlacement.default('ends'),
112
+ carvingLevel: z.number().int().min(0).max(4).default(0),
113
+ carvingPlacement: ColumnCarvingPlacement.default('capital'),
114
+ lowerBandEnabled: z.boolean().default(false),
115
+ lowerBandHeight: z.number().min(0).max(1).default(0.24),
116
+ lowerBandCarvingLevel: z.number().int().min(0).max(4).default(0),
117
+ dentilCount: z.number().int().min(0).max(48).default(0),
118
+ beadCount: z.number().int().min(0).max(64).default(0),
119
+ material: MaterialSchema.optional(),
120
+ materialPreset: z.string().optional(),
121
+ }).describe(dedent `
122
+ Column node - used to represent structural or decorative pillars/columns.
123
+ - style: visual approach such as plain, lathe-turned, carved, or cluster
124
+ - crossSection: plan shape used by the procedural renderer
125
+ - height/radius/width/depth: primary dimensions in meters
126
+ - edgeSoftness: bevel radius for square/plinth/block edges
127
+ - shaftProfile/shaftDetail: profile and surface treatment of the shaft
128
+ - shaftTwistStep: per-segment shaft rotation in degrees
129
+ - shaftCornerRadius: rounded-corner radius for square/rectangular shaft cross-sections
130
+ - baseStyle/capitalStyle: procedural base and top treatment with tier/detail controls
131
+ - baseHeight/capitalHeight: bottom and top block proportions
132
+ - ring/flute/spiral/panel/lathe/carving fields: procedural detail controls
133
+ `);
134
+ export const COLUMN_PRESETS = {
135
+ basicPillar: {
136
+ label: 'Straight Round',
137
+ style: 'plain',
138
+ crossSection: 'round',
139
+ height: 2.9,
140
+ radius: 0.22,
141
+ width: 0.44,
142
+ depth: 0.44,
143
+ edgeSoftness: 0.025,
144
+ baseHeight: 0.22,
145
+ capitalHeight: 0.2,
146
+ shaftProfile: 'straight',
147
+ shaftTaper: 0,
148
+ shaftBulge: 0,
149
+ shaftStartScale: 0.72,
150
+ shaftEndScale: 0.72,
151
+ shaftSegmentCount: 1,
152
+ shaftTwistStep: 0,
153
+ shaftCornerRadius: 0.035,
154
+ shaftDetail: 'none',
155
+ baseStyle: 'square-plinth',
156
+ baseWidthScale: 1.26,
157
+ baseDepthScale: 1.26,
158
+ baseTierCount: 1,
159
+ baseStepSpread: 0.34,
160
+ basePlinthHeightRatio: 0.44,
161
+ baseRoundBandScale: 0.92,
162
+ baseNeckScale: 0.72,
163
+ baseRoundBandCount: 0,
164
+ baseRibCount: 0,
165
+ baseCarvingLevel: 0,
166
+ capitalStyle: 'simple-slab',
167
+ capitalWidthScale: 1.22,
168
+ capitalDepthScale: 1.22,
169
+ capitalTierCount: 1,
170
+ capitalStepSpread: 0.34,
171
+ capitalBandCount: 0,
172
+ capitalCarvingLevel: 0,
173
+ ringCount: 0,
174
+ ringSpread: 0.16,
175
+ fluteCount: 0,
176
+ spiralTwist: 0,
177
+ spiralRibCount: 0,
178
+ panelCount: 0,
179
+ latheRingCount: 0,
180
+ carvingLevel: 0,
181
+ lowerBandEnabled: false,
182
+ dentilCount: 0,
183
+ beadCount: 0,
184
+ },
185
+ squarePillar: {
186
+ label: 'Square Block',
187
+ style: 'faceted',
188
+ crossSection: 'square',
189
+ height: 2.9,
190
+ radius: 0.24,
191
+ width: 0.48,
192
+ depth: 0.48,
193
+ edgeSoftness: 0.035,
194
+ baseHeight: 0.22,
195
+ capitalHeight: 0.2,
196
+ shaftProfile: 'straight',
197
+ shaftTaper: 0,
198
+ shaftBulge: 0,
199
+ shaftStartScale: 0.72,
200
+ shaftEndScale: 0.72,
201
+ shaftSegmentCount: 1,
202
+ shaftTwistStep: 0,
203
+ shaftCornerRadius: 0.045,
204
+ shaftDetail: 'none',
205
+ baseStyle: 'simple-square',
206
+ baseWidthScale: 1.18,
207
+ baseDepthScale: 1.18,
208
+ baseTierCount: 1,
209
+ baseStepSpread: 0.34,
210
+ basePlinthHeightRatio: 0.44,
211
+ baseRoundBandScale: 0.92,
212
+ baseNeckScale: 0.72,
213
+ baseRoundBandCount: 0,
214
+ baseRibCount: 0,
215
+ baseCarvingLevel: 0,
216
+ capitalStyle: 'simple-slab',
217
+ capitalWidthScale: 1.18,
218
+ capitalDepthScale: 1.18,
219
+ capitalTierCount: 1,
220
+ capitalStepSpread: 0.34,
221
+ capitalBandCount: 0,
222
+ capitalCarvingLevel: 0,
223
+ ringCount: 0,
224
+ ringSpread: 0.16,
225
+ fluteCount: 0,
226
+ spiralTwist: 0,
227
+ spiralRibCount: 0,
228
+ panelCount: 0,
229
+ latheRingCount: 0,
230
+ carvingLevel: 0,
231
+ lowerBandEnabled: false,
232
+ dentilCount: 0,
233
+ beadCount: 0,
234
+ },
235
+ taperedPillar: {
236
+ label: 'Tapered Round',
237
+ style: 'plain',
238
+ crossSection: 'round',
239
+ height: 3,
240
+ radius: 0.23,
241
+ width: 0.46,
242
+ depth: 0.46,
243
+ edgeSoftness: 0.025,
244
+ baseHeight: 0.23,
245
+ capitalHeight: 0.2,
246
+ shaftProfile: 'tapered',
247
+ shaftTaper: 0.14,
248
+ shaftBulge: 0,
249
+ shaftStartScale: 0.82,
250
+ shaftEndScale: 0.72,
251
+ shaftSegmentCount: 32,
252
+ shaftTwistStep: 0,
253
+ shaftCornerRadius: 0.035,
254
+ shaftDetail: 'none',
255
+ baseStyle: 'square-plinth',
256
+ baseWidthScale: 1.26,
257
+ baseDepthScale: 1.26,
258
+ baseTierCount: 1,
259
+ baseStepSpread: 0.34,
260
+ basePlinthHeightRatio: 0.44,
261
+ baseRoundBandScale: 0.92,
262
+ baseNeckScale: 0.72,
263
+ baseRoundBandCount: 0,
264
+ baseRibCount: 0,
265
+ baseCarvingLevel: 0,
266
+ capitalStyle: 'simple-slab',
267
+ capitalWidthScale: 1.22,
268
+ capitalDepthScale: 1.22,
269
+ capitalTierCount: 1,
270
+ capitalStepSpread: 0.34,
271
+ capitalBandCount: 0,
272
+ capitalCarvingLevel: 0,
273
+ ringCount: 0,
274
+ ringSpread: 0.16,
275
+ fluteCount: 0,
276
+ spiralTwist: 0,
277
+ spiralRibCount: 0,
278
+ panelCount: 0,
279
+ latheRingCount: 0,
280
+ carvingLevel: 0,
281
+ lowerBandEnabled: false,
282
+ dentilCount: 0,
283
+ beadCount: 0,
284
+ },
285
+ bulgedPillar: {
286
+ label: 'Soft Bulged',
287
+ style: 'plain',
288
+ crossSection: 'round',
289
+ height: 2.9,
290
+ radius: 0.22,
291
+ width: 0.44,
292
+ depth: 0.44,
293
+ edgeSoftness: 0.025,
294
+ baseHeight: 0.22,
295
+ capitalHeight: 0.2,
296
+ shaftProfile: 'bulged',
297
+ shaftTaper: 0,
298
+ shaftBulge: 0.12,
299
+ shaftStartScale: 0.68,
300
+ shaftEndScale: 0.68,
301
+ shaftSegmentCount: 32,
302
+ shaftTwistStep: 0,
303
+ shaftCornerRadius: 0.035,
304
+ shaftDetail: 'none',
305
+ baseStyle: 'square-plinth',
306
+ baseWidthScale: 1.24,
307
+ baseDepthScale: 1.24,
308
+ baseTierCount: 1,
309
+ baseStepSpread: 0.34,
310
+ basePlinthHeightRatio: 0.44,
311
+ baseRoundBandScale: 0.92,
312
+ baseNeckScale: 0.72,
313
+ baseRoundBandCount: 0,
314
+ baseRibCount: 0,
315
+ baseCarvingLevel: 0,
316
+ capitalStyle: 'simple-slab',
317
+ capitalWidthScale: 1.2,
318
+ capitalDepthScale: 1.2,
319
+ capitalTierCount: 1,
320
+ capitalStepSpread: 0.34,
321
+ capitalBandCount: 0,
322
+ capitalCarvingLevel: 0,
323
+ ringCount: 0,
324
+ ringSpread: 0.16,
325
+ fluteCount: 0,
326
+ spiralTwist: 0,
327
+ spiralRibCount: 0,
328
+ panelCount: 0,
329
+ latheRingCount: 0,
330
+ carvingLevel: 0,
331
+ lowerBandEnabled: false,
332
+ dentilCount: 0,
333
+ beadCount: 0,
334
+ },
335
+ hourglassPillar: {
336
+ label: 'Hourglass',
337
+ style: 'plain',
338
+ crossSection: 'round',
339
+ height: 2.9,
340
+ radius: 0.22,
341
+ width: 0.44,
342
+ depth: 0.44,
343
+ edgeSoftness: 0.025,
344
+ baseHeight: 0.22,
345
+ capitalHeight: 0.2,
346
+ shaftProfile: 'hourglass',
347
+ shaftTaper: 0,
348
+ shaftBulge: 0.12,
349
+ shaftStartScale: 0.84,
350
+ shaftEndScale: 0.84,
351
+ shaftSegmentCount: 32,
352
+ shaftTwistStep: 0,
353
+ shaftCornerRadius: 0.035,
354
+ shaftDetail: 'none',
355
+ baseStyle: 'square-plinth',
356
+ baseWidthScale: 1.24,
357
+ baseDepthScale: 1.24,
358
+ baseTierCount: 1,
359
+ baseStepSpread: 0.34,
360
+ basePlinthHeightRatio: 0.44,
361
+ baseRoundBandScale: 0.92,
362
+ baseNeckScale: 0.72,
363
+ baseRoundBandCount: 0,
364
+ baseRibCount: 0,
365
+ baseCarvingLevel: 0,
366
+ capitalStyle: 'simple-slab',
367
+ capitalWidthScale: 1.2,
368
+ capitalDepthScale: 1.2,
369
+ capitalTierCount: 1,
370
+ capitalStepSpread: 0.34,
371
+ capitalBandCount: 0,
372
+ capitalCarvingLevel: 0,
373
+ ringCount: 0,
374
+ ringSpread: 0.16,
375
+ fluteCount: 0,
376
+ spiralTwist: 0,
377
+ spiralRibCount: 0,
378
+ panelCount: 0,
379
+ latheRingCount: 0,
380
+ carvingLevel: 0,
381
+ lowerBandEnabled: false,
382
+ dentilCount: 0,
383
+ beadCount: 0,
384
+ },
385
+ };
@@ -12,6 +12,31 @@ export declare const DoorSegment: z.ZodObject<{
12
12
  panelInset: z.ZodDefault<z.ZodNumber>;
13
13
  }, z.core.$strip>;
14
14
  export type DoorSegment = z.infer<typeof DoorSegment>;
15
+ export declare const DoorCategory: z.ZodEnum<{
16
+ interior: "interior";
17
+ garage: "garage";
18
+ }>;
19
+ export declare const DoorType: z.ZodEnum<{
20
+ double: "double";
21
+ hinged: "hinged";
22
+ french: "french";
23
+ folding: "folding";
24
+ pocket: "pocket";
25
+ barn: "barn";
26
+ sliding: "sliding";
27
+ "garage-sectional": "garage-sectional";
28
+ "garage-rollup": "garage-rollup";
29
+ "garage-tiltup": "garage-tiltup";
30
+ }>;
31
+ export declare const DoorTrackStyle: z.ZodEnum<{
32
+ visible: "visible";
33
+ none: "none";
34
+ pocket: "pocket";
35
+ overhead: "overhead";
36
+ }>;
37
+ export type DoorCategory = z.infer<typeof DoorCategory>;
38
+ export type DoorType = z.infer<typeof DoorType>;
39
+ export type DoorTrackStyle = z.infer<typeof DoorTrackStyle>;
15
40
  export declare const DoorNode: z.ZodObject<{
16
41
  object: z.ZodDefault<z.ZodLiteral<"node">>;
17
42
  name: z.ZodOptional<z.ZodString>;
@@ -71,6 +96,52 @@ export declare const DoorNode: z.ZodObject<{
71
96
  wallId: z.ZodOptional<z.ZodString>;
72
97
  width: z.ZodDefault<z.ZodNumber>;
73
98
  height: z.ZodDefault<z.ZodNumber>;
99
+ doorCategory: z.ZodDefault<z.ZodEnum<{
100
+ interior: "interior";
101
+ garage: "garage";
102
+ }>>;
103
+ doorType: z.ZodDefault<z.ZodEnum<{
104
+ double: "double";
105
+ hinged: "hinged";
106
+ french: "french";
107
+ folding: "folding";
108
+ pocket: "pocket";
109
+ barn: "barn";
110
+ sliding: "sliding";
111
+ "garage-sectional": "garage-sectional";
112
+ "garage-rollup": "garage-rollup";
113
+ "garage-tiltup": "garage-tiltup";
114
+ }>>;
115
+ leafCount: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
116
+ operationState: z.ZodDefault<z.ZodNumber>;
117
+ slideDirection: z.ZodDefault<z.ZodEnum<{
118
+ left: "left";
119
+ right: "right";
120
+ }>>;
121
+ trackStyle: z.ZodDefault<z.ZodEnum<{
122
+ visible: "visible";
123
+ none: "none";
124
+ pocket: "pocket";
125
+ overhead: "overhead";
126
+ }>>;
127
+ garagePanelCount: z.ZodDefault<z.ZodNumber>;
128
+ openingKind: z.ZodDefault<z.ZodEnum<{
129
+ door: "door";
130
+ opening: "opening";
131
+ }>>;
132
+ openingShape: z.ZodDefault<z.ZodEnum<{
133
+ rectangle: "rectangle";
134
+ rounded: "rounded";
135
+ arch: "arch";
136
+ }>>;
137
+ openingRadiusMode: z.ZodDefault<z.ZodEnum<{
138
+ all: "all";
139
+ individual: "individual";
140
+ }>>;
141
+ openingTopRadii: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
142
+ cornerRadius: z.ZodDefault<z.ZodNumber>;
143
+ archHeight: z.ZodDefault<z.ZodNumber>;
144
+ openingRevealRadius: z.ZodDefault<z.ZodNumber>;
74
145
  frameThickness: z.ZodDefault<z.ZodNumber>;
75
146
  frameDepth: z.ZodDefault<z.ZodNumber>;
76
147
  threshold: z.ZodDefault<z.ZodBoolean>;
@@ -83,6 +154,7 @@ export declare const DoorNode: z.ZodObject<{
83
154
  inward: "inward";
84
155
  outward: "outward";
85
156
  }>>;
157
+ swingAngle: z.ZodDefault<z.ZodNumber>;
86
158
  segments: z.ZodDefault<z.ZodArray<z.ZodObject<{
87
159
  type: z.ZodEnum<{
88
160
  glass: "glass";
@@ -1 +1 @@
1
- {"version":3,"file":"door.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/door.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,WAAW;;;;;;;;;;;iBAWtB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAErD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8DnB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA"}
1
+ {"version":3,"file":"door.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/door.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,WAAW;;;;;;;;;;;iBAWtB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAErD,eAAO,MAAM,YAAY;;;EAAiC,CAAA;AAC1D,eAAO,MAAM,QAAQ;;;;;;;;;;;EAWnB,CAAA;AACF,eAAO,MAAM,cAAc;;;;;EAAoD,CAAA;AAE/E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACvD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA;AAC/C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuFnB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAA"}
@@ -12,6 +12,20 @@ export const DoorSegment = z.object({
12
12
  panelDepth: z.number().default(0.01), // + raised, - recessed
13
13
  panelInset: z.number().default(0.04),
14
14
  });
15
+ export const DoorCategory = z.enum(['interior', 'garage']);
16
+ export const DoorType = z.enum([
17
+ 'hinged',
18
+ 'double',
19
+ 'french',
20
+ 'folding',
21
+ 'pocket',
22
+ 'barn',
23
+ 'sliding',
24
+ 'garage-sectional',
25
+ 'garage-rollup',
26
+ 'garage-tiltup',
27
+ ]);
28
+ export const DoorTrackStyle = z.enum(['none', 'visible', 'pocket', 'overhead']);
15
29
  export const DoorNode = BaseNode.extend({
16
30
  id: objectId('door'),
17
31
  type: nodeType('door'),
@@ -23,6 +37,22 @@ export const DoorNode = BaseNode.extend({
23
37
  // Overall dimensions
24
38
  width: z.number().default(0.9),
25
39
  height: z.number().default(2.1),
40
+ // Door family
41
+ doorCategory: DoorCategory.default('interior'),
42
+ doorType: DoorType.default('hinged'),
43
+ leafCount: z.union([z.literal(1), z.literal(2), z.literal(3), z.literal(4)]).default(1),
44
+ operationState: z.number().min(0).max(1).default(0),
45
+ slideDirection: z.enum(['left', 'right']).default('left'),
46
+ trackStyle: DoorTrackStyle.default('none'),
47
+ garagePanelCount: z.number().int().min(1).max(12).default(4),
48
+ // Opening mode
49
+ openingKind: z.enum(['door', 'opening']).default('door'),
50
+ openingShape: z.enum(['rectangle', 'rounded', 'arch']).default('rectangle'),
51
+ openingRadiusMode: z.enum(['all', 'individual']).default('all'),
52
+ openingTopRadii: z.tuple([z.number(), z.number()]).default([0.15, 0.15]),
53
+ cornerRadius: z.number().min(0).default(0.15),
54
+ archHeight: z.number().min(0).default(0.45),
55
+ openingRevealRadius: z.number().min(0).default(0.025),
26
56
  // Frame
27
57
  frameThickness: z.number().default(0.05),
28
58
  frameDepth: z.number().default(0.07),
@@ -31,6 +61,11 @@ export const DoorNode = BaseNode.extend({
31
61
  // Swing
32
62
  hingesSide: z.enum(['left', 'right']).default('left'),
33
63
  swingDirection: z.enum(['inward', 'outward']).default('inward'),
64
+ swingAngle: z
65
+ .number()
66
+ .min(0)
67
+ .max(Math.PI / 2)
68
+ .default(0),
34
69
  // Leaf segments — stacked top to bottom, each with its own column split
35
70
  segments: z.array(DoorSegment).default([
36
71
  {
@@ -62,8 +97,10 @@ export const DoorNode = BaseNode.extend({
62
97
  panicBarHeight: z.number().default(1.0),
63
98
  }).describe(dedent `Door node - a parametric door placed on a wall
64
99
  - position: center of the door in wall-local coordinate system (Y = height/2, always at floor)
100
+ - doorCategory/doorType: explicit operation family, defaulting old doors to interior hinged
101
+ - openingKind/openingShape: hinged door or frameless wall opening shape
65
102
  - segments: rows stacked top to bottom, each defining its own columnRatios
66
- - type 'empty' = flush flat fill, 'panel' = raised/recessed panel, 'glass' = glazed
67
- - hingesSide/swingDirection: which way the door opens
103
+ - type 'empty' = no leaf fill for that segment, 'panel' = raised/recessed panel, 'glass' = glazed
104
+ - hingesSide/swingDirection/swingAngle: which way the door opens and how far it is currently open
68
105
  - doorCloser/panicBar: commercial and emergency hardware options
69
106
  `);
@@ -61,9 +61,9 @@ export declare const FenceNode: z.ZodObject<{
61
61
  materialPreset: z.ZodOptional<z.ZodString>;
62
62
  start: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
63
63
  end: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
64
- curveOffset: z.ZodOptional<z.ZodNumber>;
65
64
  height: z.ZodDefault<z.ZodNumber>;
66
65
  thickness: z.ZodDefault<z.ZodNumber>;
66
+ curveOffset: z.ZodOptional<z.ZodNumber>;
67
67
  baseHeight: z.ZodDefault<z.ZodNumber>;
68
68
  postSpacing: z.ZodDefault<z.ZodNumber>;
69
69
  postSize: z.ZodDefault<z.ZodNumber>;
@@ -11,9 +11,9 @@ export const FenceNode = BaseNode.extend({
11
11
  materialPreset: z.string().optional(),
12
12
  start: z.tuple([z.number(), z.number()]),
13
13
  end: z.tuple([z.number(), z.number()]),
14
- curveOffset: z.number().optional(),
15
14
  height: z.number().default(1.8),
16
15
  thickness: z.number().default(0.08),
16
+ curveOffset: z.number().optional(),
17
17
  baseHeight: z.number().default(0.22),
18
18
  postSpacing: z.number().default(2),
19
19
  postSize: z.number().default(0.1),
@@ -26,8 +26,8 @@ export const FenceNode = BaseNode.extend({
26
26
  }).describe(dedent `
27
27
  Fence node - used to represent a fence segment in the building/site level coordinate system
28
28
  - start/end: fence endpoints in level coordinate system
29
- - curveOffset: midpoint sagitta offset used to bend the fence into an arc
30
29
  - height/thickness: overall fence dimensions in meters
30
+ - curveOffset: midpoint sagitta offset used to bend the fence into an arc
31
31
  - baseHeight/postSpacing/postSize/topRailHeight: exact geometric controls from the plan3D fence model
32
32
  - groundClearance/edgeInset/baseStyle: fence support and inset configuration
33
33
  - color/style: visual appearance options
@@ -1,4 +1,12 @@
1
1
  import { z } from 'zod';
2
+ export declare const GuideScaleReference: z.ZodObject<{
3
+ start: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
4
+ end: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
5
+ realLengthMeters: z.ZodNumber;
6
+ measuredLengthUnits: z.ZodNumber;
7
+ metersPerUnit: z.ZodNumber;
8
+ label: z.ZodString;
9
+ }, z.core.$strip>;
2
10
  export declare const GuideNode: z.ZodObject<{
3
11
  object: z.ZodDefault<z.ZodLiteral<"node">>;
4
12
  name: z.ZodOptional<z.ZodString>;
@@ -22,6 +30,15 @@ export declare const GuideNode: z.ZodObject<{
22
30
  rotation: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
23
31
  scale: z.ZodDefault<z.ZodNumber>;
24
32
  opacity: z.ZodDefault<z.ZodNumber>;
33
+ scaleReference: z.ZodDefault<z.ZodNullable<z.ZodObject<{
34
+ start: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
35
+ end: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
36
+ realLengthMeters: z.ZodNumber;
37
+ measuredLengthUnits: z.ZodNumber;
38
+ metersPerUnit: z.ZodNumber;
39
+ label: z.ZodString;
40
+ }, z.core.$strip>>>;
25
41
  }, z.core.$strip>;
42
+ export type GuideScaleReference = z.infer<typeof GuideScaleReference>;
26
43
  export type GuideNode = z.infer<typeof GuideNode>;
27
44
  //# sourceMappingURL=guide.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"guide.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;iBAQpB,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA"}
1
+ {"version":3,"file":"guide.d.ts","sourceRoot":"","sources":["../../../src/schema/nodes/guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,mBAAmB;;;;;;;iBAO9B,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASpB,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AACrE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA"}
@@ -1,11 +1,21 @@
1
1
  import { z } from 'zod';
2
+ import { AssetUrl } from '../asset-url';
2
3
  import { BaseNode, nodeType, objectId } from '../base';
4
+ export const GuideScaleReference = z.object({
5
+ start: z.tuple([z.number(), z.number()]),
6
+ end: z.tuple([z.number(), z.number()]),
7
+ realLengthMeters: z.number().positive(),
8
+ measuredLengthUnits: z.number().positive(),
9
+ metersPerUnit: z.number().positive(),
10
+ label: z.string(),
11
+ });
3
12
  export const GuideNode = BaseNode.extend({
4
13
  id: objectId('guide'),
5
14
  type: nodeType('guide'),
6
- url: z.string(),
15
+ url: AssetUrl,
7
16
  position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
8
17
  rotation: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]),
9
18
  scale: z.number().default(1),
10
19
  opacity: z.number().min(0).max(100).default(50),
20
+ scaleReference: GuideScaleReference.nullable().default(null),
11
21
  });
@@ -143,6 +143,13 @@ declare const assetSchema: z.ZodObject<{
143
143
  category: z.ZodString;
144
144
  name: z.ZodString;
145
145
  thumbnail: z.ZodString;
146
+ floorPlanUrl: z.ZodOptional<z.ZodString>;
147
+ source: z.ZodDefault<z.ZodEnum<{
148
+ library: "library";
149
+ community: "community";
150
+ mine: "mine";
151
+ }>>;
152
+ isDraft: z.ZodOptional<z.ZodBoolean>;
146
153
  src: z.ZodString;
147
154
  dimensions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
148
155
  attachTo: z.ZodOptional<z.ZodEnum<{
@@ -238,6 +245,13 @@ export declare const ItemNode: z.ZodObject<{
238
245
  category: z.ZodString;
239
246
  name: z.ZodString;
240
247
  thumbnail: z.ZodString;
248
+ floorPlanUrl: z.ZodOptional<z.ZodString>;
249
+ source: z.ZodDefault<z.ZodEnum<{
250
+ library: "library";
251
+ community: "community";
252
+ mine: "mine";
253
+ }>>;
254
+ isDraft: z.ZodOptional<z.ZodBoolean>;
241
255
  src: z.ZodString;
242
256
  dimensions: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
243
257
  attachTo: z.ZodOptional<z.ZodEnum<{
@@ -299,6 +313,12 @@ export declare const ItemNode: z.ZodObject<{
299
313
  }, z.core.$strip>;
300
314
  }, z.core.$strip>;
301
315
  export type ItemNode = z.infer<typeof ItemNode>;
316
+ export declare const LOW_PROFILE_ITEM_SURFACE_MAX_HEIGHT = 0.1;
317
+ /**
318
+ * Low, floor-resting items like rugs and parking mats can receive items visually,
319
+ * but should not become item parents or block normal floor placement.
320
+ */
321
+ export declare function isLowProfileItemSurface(item: ItemNode): boolean;
302
322
  /**
303
323
  * Returns the effective world-space dimensions of an item after applying its scale.
304
324
  * Use this everywhere item.asset.dimensions is used for spatial calculations.