@chanmeng666/archlang-3d 0.2.0 → 0.4.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.
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { ResolvedPlan, RWall, Point, JoinedCut, loopsToPolygons, World, Diagnostic } from '@chanmeng666/archlang';
2
2
  export { Point } from '@chanmeng666/archlang';
3
- import { a as Scene3D, F as Floor, P as Polygon, M as Mesh3D, b as Pt, c as Shell, d as Ring3, A as Assumption, e as MaterialSlot, f as Furniture, g as ReplayEvent, h as ReplayState } from './strip-CdTeMoHA.js';
4
- export { D as DoorKind, E as EXPLODE_GAP_MM, i as FINISH_PALETTE, j as FIXTURE_FAMILIES, k as FLOOR_FINISHES, l as FLOOR_FINISH_RULES, m as Fence, n as FloorFinish, K as KIND_PALETTE, o as KindMaterial, L as Level, p as MATERIAL_SLOTS, q as MeshNode, r as Meta, N as NodeKind, t as NodeState, O as Opening, u as Outdoor, v as PALETTE, w as PHASE, x as Provenance, R as ReplayFacts, y as ReplayView, z as Roof, B as STOP_LEAD, C as SlotMaterial, G as Source, H as Stage, I as Stair, S as StripItem, U as Um, W as WALL_CAP_SRGB, J as Wall, Q as authoringOrder, T as ease, V as explodeLifts, X as finishColour, Y as floorFinish, Z as keyFrames, _ as linearRgb, $ as slotColour, a0 as slotGroups, a1 as stateAt, a2 as storeysOf, s as stripAt, a3 as timeline, a4 as viewLabel, a5 as viewMesh } from './strip-CdTeMoHA.js';
5
- export { F as FactsOptions, r as replayFacts } from './facts-DHuCDilh.js';
3
+ import { a as Scene3D, F as Floor, P as Polygon, M as Mesh3D, b as Pt, c as Shell, d as Ring3, A as Assumption, e as StairFlight, f as Stair, g as MaterialSlot, h as Furniture } from './strip-Nt7eJ-4E.js';
4
+ export { D as DoorKind, E as EXPLODE_GAP_MM, i as FINISH_PALETTE, j as FIXTURE_FAMILIES, k as FLOOR_FINISHES, l as FLOOR_FINISH_RULES, m as Fence, n as FloorFinish, K as KIND_PALETTE, o as KindMaterial, L as Level, p as MATERIAL_SLOTS, q as MeshNode, r as Meta, N as NodeKind, t as NodeState, O as Opening, u as Outdoor, v as PALETTE, w as PHASE, x as Provenance, y as ReplayEvent, R as ReplayFacts, z as ReplayState, B as ReplayView, C as Roof, G as STAIR_MATERIAL, H as STOP_LEAD, I as Side, J as SlotMaterial, Q as Source, T as Stage, U as StairLanding, S as StripItem, V as Um, W as WALL_CAP_SRGB, X as Wall, Y as authoringOrder, Z as ease, _ as explodeLifts, $ as finishColour, a0 as floorFinish, a1 as keyFrames, a2 as linearRgb, a3 as slotColour, a4 as slotGroups, a5 as stateAt, a6 as storeysOf, s as stripAt, a7 as timeline, a8 as viewLabel, a9 as viewMesh } from './strip-Nt7eJ-4E.js';
5
+ export { F as FactsOptions, r as replayFacts } from './facts-BRIFxHL_.js';
6
+ export { B as Box, E as ELEVATION_AZIMUTH, a as ELEVATION_RANGE, b as END_AZIMUTH, c as END_FOV, d as EndCamera, F as FILL, e as FrameCamera, O as Orbit, f as PRESET_NAMES, P as PresetName, S as START_FOV, V as Vec3, g as ViewScene, Z as ZOOM, h as boxOfNodes, i as cameraAtStop, j as cameraStops, k as corners, l as coverage, m as distanceLimits, n as drawingFrame, o as endElevation, p as fitEndCamera, q as frameCamera, r as pivotAbove, s as presetCamera, t as projectBox, u as settledLift, v as stopCount, w as takenLens, x as targetBounds } from './camera-DVOiag0F.js';
6
7
 
7
8
  /** The package's own version, stamped into `meta.tool`. */
8
9
  declare const ARCHLANG_3D_VERSION: string;
@@ -145,10 +146,13 @@ interface AdaptOptions {
145
146
  }
146
147
  /**
147
148
  * The first core release that carries every export this package reads: the seam (`resolvePlan`,
148
- * ADR 0031) arrived in 1.44.0, `hatchKey`/`hatchOf` (card A0b) in 1.45.0. Kept equal to the
149
+ * ADR 0031) arrived in 1.44.0, `hatchKey`/`hatchOf` (card A0b) in 1.45.0, `treadCount` (the
150
+ * stairs, amendment 2026-11-06 to ADR 0031) in 1.57.0. An older core still builds everything but
151
+ * the stairs (`stair-no-flights`); only a core without `resolvePlan` or `hatchKey` is refused,
152
+ * `E3D_CORE_TOO_OLD`. Kept equal to the
149
153
  * `peerDependencies` floor (`test/package-meta.test.ts`).
150
154
  */
151
- declare const MIN_CORE = "1.45.0";
155
+ declare const MIN_CORE = "1.57.0";
152
156
  declare function adaptPlan(source: string, opts?: AdaptOptions): AdaptResult;
153
157
 
154
158
  /**
@@ -287,6 +291,42 @@ declare function rectsOf(r: readonly Pt[]): Rect[];
287
291
  */
288
292
  declare function slabRegion(footprint: readonly Ring3[], floors: readonly Floor[], ledger: Assumption[]): Polygon[];
289
293
 
294
+ /**
295
+ * A stair as stepped solids (card X3), from the Scene3D's flights and landings, which are the
296
+ * core's own (`scene3d/build.ts`): nothing here re-derives a stair from its bounding box.
297
+ *
298
+ * - Risers: one per tread the plan draws on a flight, plus one more at its head, because a flight's
299
+ * last riser lands on the landing or the floor above. So a stair of flights with `n₁ … n_F` treads
300
+ * climbs its rise in `R = Σ (nᵢ + 1)` equal risers, and riser `k` tops out at `z0 + round(rise·k/R)`
301
+ * (whole micrometres; the last is exactly `z0 + rise`, the floor above).
302
+ * - A flight: one closed prism whose side section is its steps, extruded across the flight band
303
+ * (the stair's `width`, centred across the flight, as the drawing centres it), each tread
304
+ * `run / treads` deep, on the drawing's tread lines. It is solid down to the stair's floor `z0`.
305
+ * - A landing: a closed box over its rectangle, from `z0` up to the riser its flight ends on.
306
+ *
307
+ * Every shell is closed and wound outward (`prism`), in integer micrometres and glTF axes.
308
+ */
309
+
310
+ /** How many risers a stair of these flights climbs: each flight's treads plus its head riser. */
311
+ declare function stairRisers(flights: readonly Pick<StairFlight, "treads">[]): number;
312
+ /** A stair's solids, how many risers it climbs, and the height each landing stands at. */
313
+ interface StairSolid {
314
+ shells: Shell[];
315
+ risers: number;
316
+ /** The top of each landing (µm), in climbing order. */
317
+ landingTops: number[];
318
+ /** The top of the highest tread (µm): one riser below `z0 + rise`. */
319
+ top: number;
320
+ }
321
+ /**
322
+ * The stepped solids of `stair` climbing `rise` µm from `z0`, or `null` when it carries no flights
323
+ * (a Scene3D the core gave no tread count) or `rise` is not positive. A shell that would be
324
+ * degenerate is left out and counted in `dropped`.
325
+ */
326
+ declare function stairSolid(stair: Stair, z0: number, rise: number): (StairSolid & {
327
+ dropped: number;
328
+ }) | null;
329
+
290
330
  /**
291
331
  * The T0 kit (visual-assets V2, V5, V6): the part type every generator returns and the few helpers
292
332
  * the generators share, kept apart from `t0.ts` so the batch modules (`t0-living.ts`,
@@ -456,122 +496,4 @@ declare function t0Shells(f: Furniture, floor: number): {
456
496
  holesDropped: number;
457
497
  } | null;
458
498
 
459
- /**
460
- * The replay's end camera as plain maths (card A3, look notes round 1): the viewer and the tests
461
- * read the same functions, so "the end frame fills the canvas" is a property a test can check
462
- * without a browser. Millimetres, the exporters' axes (X plan x, Y up, Z plan y). No three.js here:
463
- * the conventions copy three.js's `lookAt` for a camera (it looks down its local −Z; right =
464
- * up × back, true up = back × right, world up +Y).
465
- */
466
-
467
- type Vec3 = [number, number, number];
468
- interface Box {
469
- lo: Vec3;
470
- hi: Vec3;
471
- }
472
- /** Where the end camera looks from: elevation and azimuth in degrees, vertical field of view. */
473
- interface Orbit {
474
- elevation: number;
475
- azimuth: number;
476
- fov: number;
477
- /** Canvas width / height. */
478
- aspect: number;
479
- }
480
- interface EndCamera {
481
- target: Vec3;
482
- /** Distance from the target to the camera (mm). */
483
- dist: number;
484
- }
485
- /**
486
- * The fraction of each half-axis the building may use: a margin of 6 % of the frame on each side
487
- * of the binding axis.
488
- */
489
- declare const FILL = 0.88;
490
- declare function corners(b: Box): Vec3[];
491
- /**
492
- * The projected extent of `box` in normalised device coordinates (−1…1 on each axis) for a camera
493
- * at `cam` with orbit `o`.
494
- */
495
- declare function projectBox(box: Box, cam: EndCamera, o: Orbit): {
496
- x: [number, number];
497
- y: [number, number];
498
- };
499
- /**
500
- * The end camera that fills the frame with `box`: the 8 corners are projected through the end
501
- * orbit and the distance is solved so the binding corner sits at `FILL` of the half-frame; the
502
- * target is then re-centred on the projected box (perspective makes the near half larger) and the
503
- * distance solved again. A fixed number of rounds, so the result is a pure function of its input.
504
- */
505
- declare function fitEndCamera(box: Box, o: Orbit): EndCamera;
506
- /** The share of the binding axis the projected box fills (1 = edge to edge). */
507
- declare function coverage(box: Box, cam: EndCamera, o: Orbit): number;
508
- /** The end camera's lens and bearing. */
509
- declare const END_FOV = 30;
510
- declare const END_AZIMUTH = -32;
511
- /**
512
- * The end camera's elevation: 45° for every view. The combined view of a taller building needs it so
513
- * the exploded gaps show the floors below (see `timeline.ts`'s header); a one-storey view took it
514
- * too (card A9, by delegation, the owner may veto on a look): at 30° the near walls hid the floor,
515
- * the inner doors and most furniture of `studio`. The storey count stays a parameter so a later
516
- * look can split the two again without a signature change.
517
- */
518
- declare const endElevation: (_storeys: number) => number;
519
- /**
520
- * The scene's box (mm) from the payload's nodes: positions in micrometres, each node lifted by its
521
- * `lift` (the combined view's exploded storeys). A demolished wall's ghost (`part` "demolish") is not
522
- * the building and is left out of a fit (`timeline.ts`'s header), unless nothing else is there;
523
- * `ghosts: true` keeps it, for a box that must hold everything drawn (the viewer's clip range).
524
- */
525
- declare function boxOfNodes(nodes: ReadonlyArray<{
526
- positions: readonly number[];
527
- lift?: number;
528
- part?: string;
529
- }>, opts?: {
530
- ghosts?: boolean;
531
- }): Box;
532
- /** The perspective camera's lens at the start of the dolly (a near-orthographic top-down view). */
533
- declare const START_FOV = 1.5;
534
- /**
535
- * One fitted camera per stop: stop k fills the frame with storeys 0…k (the combined view; a node's
536
- * storey is its event's), the last stop with the whole building. One storey: one stop. Each stop is
537
- * fitted for the end orbit, which `stateAt` has reached by the time of the first stop.
538
- */
539
- declare function cameraStops(nodes: ReadonlyArray<{
540
- key: string;
541
- positions: readonly number[];
542
- lift?: number;
543
- part?: string;
544
- }>, events: readonly ReplayEvent[], o: Orbit): EndCamera[];
545
- /** The fitted camera at a (fractional) stop: between two stops, a straight blend of the two. */
546
- declare function cameraAtStop(fits: readonly EndCamera[], stop: number): EndCamera;
547
- /** The perspective camera of one frame: where it aims, from how far, with which lens and bearing. */
548
- interface FrameCamera {
549
- target: Vec3;
550
- dist: number;
551
- fov: number;
552
- elevation: number;
553
- azimuth: number;
554
- }
555
- /**
556
- * The perspective camera at state `s` (the viewer's `seek`): from straight down over the drawing's
557
- * centre (`cx`, `cz`; `oh` the drawing's height in the frame) it tilts to the end orbit and dollies
558
- * to the fitted camera of the current stop.
559
- */
560
- declare function frameCamera(s: Pick<ReplayState, "tilt" | "dolly" | "stop">, fits: readonly EndCamera[], view: {
561
- cx: number;
562
- cz: number;
563
- oh: number;
564
- elevation: number;
565
- }): FrameCamera;
566
- /**
567
- * The first frame frames the core drawing's viewBox exactly, letterboxed as the image is: its
568
- * centre (`cx`, `cz`) and the height (`oh`) and width (`ow`) it spans in the frame, in plan mm.
569
- */
570
- declare function drawingFrame(viewBox: readonly [number, number, number, number], aspect: number): {
571
- cx: number;
572
- cz: number;
573
- ow: number;
574
- oh: number;
575
- };
576
-
577
- export { ARCHLANG_3D_VERSION, type AdaptOptions, type AdaptResult, Assumption, type Box, type BuildOptions, type CutSector, DOOR_POSES, type DoorPose, END_AZIMUTH, END_FOV, type EndCamera, FILL, FLOOR_LIFT_UM, FLOOR_OVERLAP_MIN_UM2, FURNITURE_HEIGHT_MM, Floor, type FloorOverlap, type FrameCamera, Furniture, MIN_CORE, MaterialSlot, Mesh3D, type MeshOptions, type MixedHeightJoint, type Orbit, type OwnedWall, type Ownership, type Part, type Piece, Polygon, Pt, type Refusal, type RefusalCode, ReplayEvent, ReplayState, type Ring, Ring3, START_FOV, Scene3D, type SectionShape, Shell, type Storey, T0_FAMILIES, T0_HANDED, T0_HEIGHT_MM, T0_HUNG_FROM_TOP, T0_MATERIALS, T0_MOUNT_MM, type ValidationIssue, type Vec3, type Warning3D, adaptPlan, assetFor, boxOfNodes, buildMesh, buildScene3D, cameraAtStop, cameraStops, clipToConvex, corners, coverage, cutSector, drawingFrame, endElevation, fitEndCamera, floorLifts, floorOverlaps, frameCamera, handedAt, insideCut, mixedHeightJoints, openLeaf, overlapArea, partShell, piecesOf, piecesTouch, prism, projectBox, rectsOf, sectionRing, sectorBand, slab2d, slabRegion, t0LocalParts, t0Shells, um, umPoint, validateScene3D, wallOwnership };
499
+ export { ARCHLANG_3D_VERSION, type AdaptOptions, type AdaptResult, Assumption, type BuildOptions, type CutSector, DOOR_POSES, type DoorPose, FLOOR_LIFT_UM, FLOOR_OVERLAP_MIN_UM2, FURNITURE_HEIGHT_MM, Floor, type FloorOverlap, Furniture, MIN_CORE, MaterialSlot, Mesh3D, type MeshOptions, type MixedHeightJoint, type OwnedWall, type Ownership, type Part, type Piece, Polygon, Pt, type Refusal, type RefusalCode, type Ring, Ring3, Scene3D, type SectionShape, Shell, Stair, StairFlight, type StairSolid, type Storey, T0_FAMILIES, T0_HANDED, T0_HEIGHT_MM, T0_HUNG_FROM_TOP, T0_MATERIALS, T0_MOUNT_MM, type ValidationIssue, type Warning3D, adaptPlan, assetFor, buildMesh, buildScene3D, clipToConvex, cutSector, floorLifts, floorOverlaps, handedAt, insideCut, mixedHeightJoints, openLeaf, overlapArea, partShell, piecesOf, piecesTouch, prism, rectsOf, sectionRing, sectorBand, slab2d, slabRegion, stairRisers, stairSolid, t0LocalParts, t0Shells, um, umPoint, validateScene3D, wallOwnership };
package/dist/index.js CHANGED
@@ -6,8 +6,10 @@ import {
6
6
  buildMesh,
7
7
  openLeaf,
8
8
  rectsOf,
9
- slabRegion
10
- } from "./chunk-4AF5Q7M3.js";
9
+ slabRegion,
10
+ stairRisers,
11
+ stairSolid
12
+ } from "./chunk-VS4OAVPD.js";
11
13
  import {
12
14
  ARCHLANG_3D_VERSION,
13
15
  FLOOR_LIFT_UM,
@@ -42,8 +44,10 @@ import {
42
44
  umPoint,
43
45
  validateScene3D,
44
46
  wallOwnership
45
- } from "./chunk-VUSBWX7N.js";
47
+ } from "./chunk-EG7UT2HG.js";
46
48
  import {
49
+ ELEVATION_AZIMUTH,
50
+ ELEVATION_RANGE,
47
51
  END_AZIMUTH,
48
52
  END_FOV,
49
53
  EXPLODE_GAP_MM,
@@ -56,15 +60,19 @@ import {
56
60
  MATERIAL_SLOTS,
57
61
  PALETTE,
58
62
  PHASE,
63
+ PRESET_NAMES,
64
+ STAIR_MATERIAL,
59
65
  START_FOV,
60
66
  STOP_LEAD,
61
67
  WALL_CAP_SRGB,
68
+ ZOOM,
62
69
  authoringOrder,
63
70
  boxOfNodes,
64
71
  cameraAtStop,
65
72
  cameraStops,
66
73
  corners,
67
74
  coverage,
75
+ distanceLimits,
68
76
  drawingFrame,
69
77
  ease,
70
78
  endElevation,
@@ -75,19 +83,27 @@ import {
75
83
  frameCamera,
76
84
  keyFrames,
77
85
  linearRgb,
86
+ pivotAbove,
87
+ presetCamera,
78
88
  projectBox,
89
+ settledLift,
79
90
  slotColour,
80
91
  slotGroups,
81
92
  stateAt,
93
+ stopCount,
82
94
  storeysOf,
83
95
  stripAt,
96
+ takenLens,
97
+ targetBounds,
84
98
  timeline,
85
99
  viewLabel,
86
100
  viewMesh
87
- } from "./chunk-EYEEIS4R.js";
101
+ } from "./chunk-EQBMPXB5.js";
88
102
  export {
89
103
  ARCHLANG_3D_VERSION,
90
104
  DOOR_POSES,
105
+ ELEVATION_AZIMUTH,
106
+ ELEVATION_RANGE,
91
107
  END_AZIMUTH,
92
108
  END_FOV,
93
109
  EXPLODE_GAP_MM,
@@ -104,6 +120,8 @@ export {
104
120
  MIN_CORE,
105
121
  PALETTE,
106
122
  PHASE,
123
+ PRESET_NAMES,
124
+ STAIR_MATERIAL,
107
125
  START_FOV,
108
126
  STOP_LEAD,
109
127
  T0_FAMILIES,
@@ -113,6 +131,7 @@ export {
113
131
  T0_MATERIALS,
114
132
  T0_MOUNT_MM,
115
133
  WALL_CAP_SRGB,
134
+ ZOOM,
116
135
  adaptPlan,
117
136
  assetFor,
118
137
  authoringOrder,
@@ -125,6 +144,7 @@ export {
125
144
  corners,
126
145
  coverage,
127
146
  cutSector,
147
+ distanceLimits,
128
148
  drawingFrame,
129
149
  ease,
130
150
  endElevation,
@@ -145,21 +165,29 @@ export {
145
165
  partShell,
146
166
  piecesOf,
147
167
  piecesTouch,
168
+ pivotAbove,
169
+ presetCamera,
148
170
  prism,
149
171
  projectBox,
150
172
  rectsOf,
151
173
  replayFacts,
152
174
  sectionRing,
153
175
  sectorBand,
176
+ settledLift,
154
177
  slab2d,
155
178
  slabRegion,
156
179
  slotColour,
157
180
  slotGroups,
181
+ stairRisers,
182
+ stairSolid,
158
183
  stateAt,
184
+ stopCount,
159
185
  storeysOf,
160
186
  stripAt,
161
187
  t0LocalParts,
162
188
  t0Shells,
189
+ takenLens,
190
+ targetBounds,
163
191
  timeline,
164
192
  um,
165
193
  umPoint,
package/dist/node.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { World } from '@chanmeng666/archlang';
2
- import { M as Mesh3D, g as ReplayEvent, q as MeshNode, a as Scene3D, c as Shell } from './strip-CdTeMoHA.js';
3
- export { R as ReplayFacts, S as StripItem, s as stripAt } from './strip-CdTeMoHA.js';
2
+ import { M as Mesh3D, y as ReplayEvent, q as MeshNode, a as Scene3D, c as Shell } from './strip-Nt7eJ-4E.js';
3
+ export { R as ReplayFacts, S as StripItem, s as stripAt } from './strip-Nt7eJ-4E.js';
4
4
  import { ReplayOptions } from './replay.js';
5
- export { PREVIEW_LABEL, replayPayload, viewBoxOf } from './replay.js';
6
- export { F as FactsOptions, r as replayFacts } from './facts-DHuCDilh.js';
5
+ export { PREVIEW_ABOUT_URL, PREVIEW_LABEL, PREVIEW_LEAD, PREVIEW_LIMITS, replayPayload, viewBoxOf } from './replay.js';
6
+ export { F as FactsOptions, r as replayFacts } from './facts-BRIFxHL_.js';
7
7
 
8
8
  /** The viewer and the parts of three.js it uses, as one minified browser script (read once). */
9
9
  declare function viewerScript(): Promise<string>;
@@ -48,6 +48,8 @@ interface VideoOptions {
48
48
  /** Where to write the MP4; omit to measure the key frames only. */
49
49
  mp4?: string;
50
50
  ffmpeg?: string;
51
+ /** libx264's constant rate factor for the MP4 (default 18; 0 is lossless: a master to re-encode). */
52
+ crf?: number;
51
53
  }
52
54
  /** Render key frames (and, given `mp4`, every frame) of a replay HTML in headless Chromium. */
53
55
  declare function renderReplay(o: VideoOptions): Promise<VideoReport>;
package/dist/node.js CHANGED
@@ -20,21 +20,27 @@ import {
20
20
  signedVolume,
21
21
  viewerScript,
22
22
  writeGlb
23
- } from "./chunk-KUK6ARJC.js";
23
+ } from "./chunk-RPGAMA3G.js";
24
24
  import {
25
25
  replayFacts
26
- } from "./chunk-VUSBWX7N.js";
26
+ } from "./chunk-EG7UT2HG.js";
27
27
  import {
28
+ PREVIEW_ABOUT_URL,
28
29
  PREVIEW_LABEL,
30
+ PREVIEW_LEAD,
31
+ PREVIEW_LIMITS,
29
32
  replayPayload,
30
33
  viewBoxOf
31
- } from "./chunk-2ZINQMUB.js";
34
+ } from "./chunk-KF5ME6KH.js";
32
35
  import {
33
36
  stripAt
34
- } from "./chunk-EYEEIS4R.js";
37
+ } from "./chunk-EQBMPXB5.js";
35
38
  export {
36
39
  GLB_GENERATOR,
40
+ PREVIEW_ABOUT_URL,
37
41
  PREVIEW_LABEL,
42
+ PREVIEW_LEAD,
43
+ PREVIEW_LIMITS,
38
44
  SWIFTSHADER_ARGS,
39
45
  bodyMaterialName,
40
46
  checkGlb,
package/dist/replay.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { e as MaterialSlot, n as FloorFinish, R as ReplayFacts, g as ReplayEvent, M as Mesh3D } from './strip-CdTeMoHA.js';
1
+ import { g as MaterialSlot, n as FloorFinish, R as ReplayFacts, y as ReplayEvent, M as Mesh3D } from './strip-Nt7eJ-4E.js';
2
2
 
3
3
  /**
4
4
  * The replay's data (card A3), browser-safe: `replayPayload(mesh, opts)` is what a replay carries
@@ -10,7 +10,10 @@ interface ReplayNode {
10
10
  key: string;
11
11
  kind: string;
12
12
  part?: string;
13
- /** The combined view's exploded storeys: how far (mm) the node is lifted; absent = 0. */
13
+ /**
14
+ * The combined view's exploded storeys: how far (mm) the node is lifted while the storeys rise;
15
+ * absent = 0. It settles to 0 by the end (`settledLift`).
16
+ */
14
17
  lift?: number;
15
18
  /** Flat `[x, y, z, …]` in micrometres, exporters' axes (X plan x, Y up, Z plan y). */
16
19
  positions: number[];
@@ -43,9 +46,21 @@ interface ReplayPayload {
43
46
  nodes: ReplayNode[];
44
47
  events: ReplayEvent[];
45
48
  }
46
- /** A mounted replay: every frame is `seek(t)`. */
47
- /** The label every surface that shows the preview carries (decision D5's wording). */
48
- declare const PREVIEW_LABEL = "Preview \u2014 from the separate archlang-3d package. ArchLang itself draws plans.";
49
+ /**
50
+ * The line every surface that shows the preview carries (public-surfaces PS-D12, owner ruling
51
+ * PS-D11, `docs/plans/public-surfaces/3d.md` §2; it replaced decision D5's label). `PREVIEW_LEAD`
52
+ * is its first sentence, which a host may set in bold. The plan's full line adds "You can also
53
+ * download it as a validated GLB." where a surface offers the download.
54
+ */
55
+ declare const PREVIEW_LEAD = "Same source, plan and 3D preview.";
56
+ declare const PREVIEW_LABEL = "Same source, plan and 3D preview. The 3D preview is extruded from the same .arch file by the separate archlang-3d package, and checked against the plan.";
57
+ /**
58
+ * The limits line, always near a 3D view (PS-D12). It states what the package builds today
59
+ * (`3d.md` §3): change it when the package changes.
60
+ */
61
+ declare const PREVIEW_LIMITS = "3D preview: walls, openings, floors, stairs and furniture in flat colours; no pitched roofs yet, and no sections, elevations or BIM.";
62
+ /** The page that says what the 3D preview shows and does not (the docs site's `/3d`). */
63
+ declare const PREVIEW_ABOUT_URL = "https://archlang.uk/3d";
49
64
  interface ReplayOptions {
50
65
  title: string;
51
66
  /**
@@ -65,9 +80,10 @@ interface ReplayOptions {
65
80
  declare function viewBoxOf(svg: string): [number, number, number, number];
66
81
  /**
67
82
  * The data a replay HTML carries for `mesh`: pass `viewMesh(mesh, view)` for one view. A mesh of
68
- * more than one storey is the combined view: its storeys are exploded (`explodeLifts`) and the end
69
- * camera looks down more steeply (`endElevation`).
83
+ * more than one storey is the combined view: its storeys are exploded (`explodeLifts`) while they
84
+ * rise and come down to their real heights by the end (`stateAt`'s `settle`), and the end camera
85
+ * looks down at 45° (`endElevation`).
70
86
  */
71
87
  declare function replayPayload(mesh: Mesh3D, opts: ReplayOptions): ReplayPayload;
72
88
 
73
- export { PREVIEW_LABEL, type ReplayNode, type ReplayOptions, type ReplayPayload, replayPayload, viewBoxOf };
89
+ export { PREVIEW_ABOUT_URL, PREVIEW_LABEL, PREVIEW_LEAD, PREVIEW_LIMITS, type ReplayNode, type ReplayOptions, type ReplayPayload, replayPayload, viewBoxOf };
@@ -502,6 +502,69 @@
502
502
  },
503
503
  "width": {
504
504
  "$ref": "#/$defs/um"
505
+ },
506
+ "flights": {
507
+ "type": "array",
508
+ "minItems": 1,
509
+ "description": "The flights in climbing order (one on a straight stair); absent when the core gave no tread count.",
510
+ "items": {
511
+ "type": "object",
512
+ "required": ["at", "size", "foot", "treads"],
513
+ "additionalProperties": false,
514
+ "properties": {
515
+ "at": {
516
+ "$ref": "#/$defs/pt"
517
+ },
518
+ "size": {
519
+ "type": "object",
520
+ "required": ["w", "h"],
521
+ "additionalProperties": false,
522
+ "properties": {
523
+ "w": {
524
+ "$ref": "#/$defs/um"
525
+ },
526
+ "h": {
527
+ "$ref": "#/$defs/um"
528
+ }
529
+ }
530
+ },
531
+ "foot": {
532
+ "enum": ["top", "bottom", "left", "right"],
533
+ "description": "The edge a person climbing the flight starts from."
534
+ },
535
+ "treads": {
536
+ "type": "integer",
537
+ "minimum": 1,
538
+ "description": "The tread divisions the plan draws on the flight (the core's treadCount of its run)."
539
+ }
540
+ }
541
+ }
542
+ },
543
+ "landings": {
544
+ "type": "array",
545
+ "items": {
546
+ "type": "object",
547
+ "required": ["at", "size"],
548
+ "additionalProperties": false,
549
+ "properties": {
550
+ "at": {
551
+ "$ref": "#/$defs/pt"
552
+ },
553
+ "size": {
554
+ "type": "object",
555
+ "required": ["w", "h"],
556
+ "additionalProperties": false,
557
+ "properties": {
558
+ "w": {
559
+ "$ref": "#/$defs/um"
560
+ },
561
+ "h": {
562
+ "$ref": "#/$defs/um"
563
+ }
564
+ }
565
+ }
566
+ }
567
+ }
505
568
  }
506
569
  }
507
570
  },