@chanmeng666/archlang-3d 0.5.0 → 0.7.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/CHANGELOG.md +102 -0
- package/README.md +4 -3
- package/THIRD_PARTY_NOTICES +2 -2
- package/dist/browser.d.ts +4 -3
- package/dist/browser.js +612 -11
- package/dist/{camera-DVOiag0F.d.ts → camera-CGIIudHj.d.ts} +1 -1
- package/dist/{chunk-4SQ5YKKX.js → chunk-FHBR2U5Z.js} +17 -4
- package/dist/{chunk-OWZWBKMI.js → chunk-FVD3DZU2.js} +34 -7
- package/dist/{chunk-WCWLYIVD.js → chunk-GXWLZ2KC.js} +61 -9
- package/dist/chunk-QN4LQTVG.js +2192 -0
- package/dist/{chunk-EQBMPXB5.js → chunk-TI4RYEOL.js} +80 -5
- package/dist/cli.js +5 -5
- package/dist/{facts-BRIFxHL_.d.ts → facts-3wb9egIT.d.ts} +1 -1
- package/dist/index.d.ts +308 -7
- package/dist/index.js +62 -4
- package/dist/node.d.ts +5 -3
- package/dist/node.js +4 -4
- package/dist/replay.d.ts +22 -2
- package/dist/{strip-Nt7eJ-4E.d.ts → strip-Sdsm54Qw.d.ts} +118 -4
- package/dist/viewer.iife.js +504 -499
- package/package.json +3 -3
- package/dist/chunk-L2CX7KWM.js +0 -950
package/dist/index.js
CHANGED
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
|
+
CORE_POSTS_PER_RUN,
|
|
3
|
+
CORE_POST_PITCH_MM,
|
|
2
4
|
DOOR_POSES,
|
|
5
|
+
FENCE_HEIGHT_MM,
|
|
6
|
+
FENCE_PROFILES,
|
|
7
|
+
FLAT_MM,
|
|
3
8
|
FURNITURE_HEIGHT_MM,
|
|
9
|
+
MAX_FENCE_REPEAT,
|
|
4
10
|
MIN_CORE,
|
|
11
|
+
OPENING_DETAIL,
|
|
12
|
+
OUTDOOR_MM,
|
|
13
|
+
STAIR_DETAIL,
|
|
5
14
|
adaptPlan,
|
|
6
15
|
buildMesh,
|
|
16
|
+
corePostCount,
|
|
17
|
+
fenceColour,
|
|
18
|
+
fencePieces,
|
|
19
|
+
fencePosts,
|
|
20
|
+
fenceRuns,
|
|
21
|
+
groundColour,
|
|
22
|
+
insideOf,
|
|
7
23
|
openLeaf,
|
|
24
|
+
outdoorColour,
|
|
8
25
|
rectsOf,
|
|
9
26
|
slabRegion,
|
|
27
|
+
stairDetail,
|
|
10
28
|
stairRisers,
|
|
11
|
-
stairSolid
|
|
12
|
-
|
|
29
|
+
stairSolid,
|
|
30
|
+
storeyTrim
|
|
31
|
+
} from "./chunk-QN4LQTVG.js";
|
|
13
32
|
import {
|
|
14
33
|
ARCHLANG_3D_VERSION,
|
|
15
34
|
FLOOR_LIFT_UM,
|
|
@@ -44,26 +63,35 @@ import {
|
|
|
44
63
|
umPoint,
|
|
45
64
|
validateScene3D,
|
|
46
65
|
wallOwnership
|
|
47
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-GXWLZ2KC.js";
|
|
48
67
|
import {
|
|
49
68
|
ELEVATION_AZIMUTH,
|
|
50
69
|
ELEVATION_RANGE,
|
|
51
70
|
END_AZIMUTH,
|
|
52
71
|
END_FOV,
|
|
53
72
|
EXPLODE_GAP_MM,
|
|
73
|
+
FENCE_PALETTE,
|
|
54
74
|
FILL,
|
|
55
75
|
FINISH_PALETTE,
|
|
56
76
|
FIXTURE_FAMILIES,
|
|
57
77
|
FLOOR_FINISHES,
|
|
58
78
|
FLOOR_FINISH_RULES,
|
|
79
|
+
GROUND_PLANE,
|
|
80
|
+
GROUND_ROUGHNESS,
|
|
81
|
+
GROUND_SPLITS,
|
|
82
|
+
GROUND_TINT,
|
|
83
|
+
GROUND_WASH,
|
|
59
84
|
KIND_PALETTE,
|
|
60
85
|
MATERIAL_SLOTS,
|
|
61
86
|
PALETTE,
|
|
62
87
|
PHASE,
|
|
63
88
|
PRESET_NAMES,
|
|
89
|
+
SITE_PALETTE,
|
|
64
90
|
STAIR_MATERIAL,
|
|
91
|
+
STAIR_RAIL_MATERIAL,
|
|
65
92
|
START_FOV,
|
|
66
93
|
STOP_LEAD,
|
|
94
|
+
TRIM_MATERIAL,
|
|
67
95
|
WALL_CAP_SRGB,
|
|
68
96
|
ZOOM,
|
|
69
97
|
authoringOrder,
|
|
@@ -87,6 +115,7 @@ import {
|
|
|
87
115
|
presetCamera,
|
|
88
116
|
projectBox,
|
|
89
117
|
settledLift,
|
|
118
|
+
siteColour,
|
|
90
119
|
slotColour,
|
|
91
120
|
slotGroups,
|
|
92
121
|
stateAt,
|
|
@@ -98,30 +127,47 @@ import {
|
|
|
98
127
|
timeline,
|
|
99
128
|
viewLabel,
|
|
100
129
|
viewMesh
|
|
101
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-TI4RYEOL.js";
|
|
102
131
|
export {
|
|
103
132
|
ARCHLANG_3D_VERSION,
|
|
133
|
+
CORE_POSTS_PER_RUN,
|
|
134
|
+
CORE_POST_PITCH_MM,
|
|
104
135
|
DOOR_POSES,
|
|
105
136
|
ELEVATION_AZIMUTH,
|
|
106
137
|
ELEVATION_RANGE,
|
|
107
138
|
END_AZIMUTH,
|
|
108
139
|
END_FOV,
|
|
109
140
|
EXPLODE_GAP_MM,
|
|
141
|
+
FENCE_HEIGHT_MM,
|
|
142
|
+
FENCE_PALETTE,
|
|
143
|
+
FENCE_PROFILES,
|
|
110
144
|
FILL,
|
|
111
145
|
FINISH_PALETTE,
|
|
112
146
|
FIXTURE_FAMILIES,
|
|
147
|
+
FLAT_MM,
|
|
113
148
|
FLOOR_FINISHES,
|
|
114
149
|
FLOOR_FINISH_RULES,
|
|
115
150
|
FLOOR_LIFT_UM,
|
|
116
151
|
FLOOR_OVERLAP_MIN_UM2,
|
|
117
152
|
FURNITURE_HEIGHT_MM,
|
|
153
|
+
GROUND_PLANE,
|
|
154
|
+
GROUND_ROUGHNESS,
|
|
155
|
+
GROUND_SPLITS,
|
|
156
|
+
GROUND_TINT,
|
|
157
|
+
GROUND_WASH,
|
|
118
158
|
KIND_PALETTE,
|
|
119
159
|
MATERIAL_SLOTS,
|
|
160
|
+
MAX_FENCE_REPEAT,
|
|
120
161
|
MIN_CORE,
|
|
162
|
+
OPENING_DETAIL,
|
|
163
|
+
OUTDOOR_MM,
|
|
121
164
|
PALETTE,
|
|
122
165
|
PHASE,
|
|
123
166
|
PRESET_NAMES,
|
|
167
|
+
SITE_PALETTE,
|
|
168
|
+
STAIR_DETAIL,
|
|
124
169
|
STAIR_MATERIAL,
|
|
170
|
+
STAIR_RAIL_MATERIAL,
|
|
125
171
|
START_FOV,
|
|
126
172
|
STOP_LEAD,
|
|
127
173
|
T0_FAMILIES,
|
|
@@ -130,6 +176,7 @@ export {
|
|
|
130
176
|
T0_HUNG_FROM_TOP,
|
|
131
177
|
T0_MATERIALS,
|
|
132
178
|
T0_MOUNT_MM,
|
|
179
|
+
TRIM_MATERIAL,
|
|
133
180
|
WALL_CAP_SRGB,
|
|
134
181
|
ZOOM,
|
|
135
182
|
adaptPlan,
|
|
@@ -141,6 +188,7 @@ export {
|
|
|
141
188
|
cameraAtStop,
|
|
142
189
|
cameraStops,
|
|
143
190
|
clipToConvex,
|
|
191
|
+
corePostCount,
|
|
144
192
|
corners,
|
|
145
193
|
coverage,
|
|
146
194
|
cutSector,
|
|
@@ -149,18 +197,25 @@ export {
|
|
|
149
197
|
ease,
|
|
150
198
|
endElevation,
|
|
151
199
|
explodeLifts,
|
|
200
|
+
fenceColour,
|
|
201
|
+
fencePieces,
|
|
202
|
+
fencePosts,
|
|
203
|
+
fenceRuns,
|
|
152
204
|
finishColour,
|
|
153
205
|
fitEndCamera,
|
|
154
206
|
floorFinish,
|
|
155
207
|
floorLifts,
|
|
156
208
|
floorOverlaps,
|
|
157
209
|
frameCamera,
|
|
210
|
+
groundColour,
|
|
158
211
|
handedAt,
|
|
159
212
|
insideCut,
|
|
213
|
+
insideOf,
|
|
160
214
|
keyFrames,
|
|
161
215
|
linearRgb,
|
|
162
216
|
mixedHeightJoints,
|
|
163
217
|
openLeaf,
|
|
218
|
+
outdoorColour,
|
|
164
219
|
overlapArea,
|
|
165
220
|
partShell,
|
|
166
221
|
piecesOf,
|
|
@@ -174,14 +229,17 @@ export {
|
|
|
174
229
|
sectionRing,
|
|
175
230
|
sectorBand,
|
|
176
231
|
settledLift,
|
|
232
|
+
siteColour,
|
|
177
233
|
slab2d,
|
|
178
234
|
slabRegion,
|
|
179
235
|
slotColour,
|
|
180
236
|
slotGroups,
|
|
237
|
+
stairDetail,
|
|
181
238
|
stairRisers,
|
|
182
239
|
stairSolid,
|
|
183
240
|
stateAt,
|
|
184
241
|
stopCount,
|
|
242
|
+
storeyTrim,
|
|
185
243
|
storeysOf,
|
|
186
244
|
stripAt,
|
|
187
245
|
t0LocalParts,
|
package/dist/node.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { World } from '@chanmeng666/archlang';
|
|
2
|
-
import { M as Mesh3D,
|
|
3
|
-
export { R as ReplayFacts, S as StripItem, s as stripAt } from './strip-
|
|
2
|
+
import { M as Mesh3D, Q as ReplayEvent, y as MeshNode, a as Scene3D, c as Shell } from './strip-Sdsm54Qw.js';
|
|
3
|
+
export { R as ReplayFacts, S as StripItem, s as stripAt } from './strip-Sdsm54Qw.js';
|
|
4
4
|
import { ReplayOptions } from './replay.js';
|
|
5
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-
|
|
6
|
+
export { F as FactsOptions, r as replayFacts } from './facts-3wb9egIT.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A World that reads an `import`ed module relative to `baseDir` (the plan's own directory). It is
|
|
@@ -61,6 +61,8 @@ interface VideoOptions {
|
|
|
61
61
|
ffmpeg?: string;
|
|
62
62
|
/** libx264's constant rate factor for the MP4 (default 18; 0 is lossless: a master to re-encode). */
|
|
63
63
|
crf?: number;
|
|
64
|
+
/** {@link withSupersample}: 1 (off) unless given; the key-frame baseline is taken without it. */
|
|
65
|
+
supersample?: number;
|
|
64
66
|
}
|
|
65
67
|
/** Render key frames (and, given `mp4`, every frame) of a replay HTML in headless Chromium. */
|
|
66
68
|
declare function renderReplay(o: VideoOptions): Promise<VideoReport>;
|
package/dist/node.js
CHANGED
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
signedVolume,
|
|
21
21
|
viewerScript,
|
|
22
22
|
writeGlb
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FVD3DZU2.js";
|
|
24
24
|
import {
|
|
25
25
|
replayFacts
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GXWLZ2KC.js";
|
|
27
27
|
import {
|
|
28
28
|
PREVIEW_ABOUT_URL,
|
|
29
29
|
PREVIEW_LABEL,
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
PREVIEW_LIMITS,
|
|
32
32
|
replayPayload,
|
|
33
33
|
viewBoxOf
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-FHBR2U5Z.js";
|
|
35
35
|
import {
|
|
36
36
|
stripAt
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-TI4RYEOL.js";
|
|
38
38
|
export {
|
|
39
39
|
GLB_GENERATOR,
|
|
40
40
|
PREVIEW_ABOUT_URL,
|
package/dist/replay.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as MaterialSlot, p as FloorFinish, R as ReplayFacts, Q as ReplayEvent, M as Mesh3D } from './strip-Sdsm54Qw.js';
|
|
2
|
+
import '@chanmeng666/archlang';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* The replay's data (card A3), browser-safe: `replayPayload(mesh, opts)` is what a replay carries
|
|
@@ -29,6 +30,11 @@ interface ReplayNode {
|
|
|
29
30
|
}>;
|
|
30
31
|
/** A floor's finish (visual-assets V9, `extras.finish`), drawn in its colour; absent on every other node. */
|
|
31
32
|
finish?: FloorFinish;
|
|
33
|
+
/**
|
|
34
|
+
* An outdoor surface's or a fence's colour (card RM8.3, `extras.colour`, sRGB `#rrggbb`), the one
|
|
35
|
+
* the GLB writes too; absent on every other node.
|
|
36
|
+
*/
|
|
37
|
+
colour?: string;
|
|
32
38
|
}
|
|
33
39
|
interface ReplayPayload {
|
|
34
40
|
title: string;
|
|
@@ -45,6 +51,20 @@ interface ReplayPayload {
|
|
|
45
51
|
facts?: ReplayFacts;
|
|
46
52
|
nodes: ReplayNode[];
|
|
47
53
|
events: ReplayEvent[];
|
|
54
|
+
/**
|
|
55
|
+
* The ground plane's height (card RM8.3, `GROUND_PLANE`): the top of the lowest storey's slab, its
|
|
56
|
+
* floor level, in micrometres. Absent when that storey has no slab: then no ground is drawn.
|
|
57
|
+
*/
|
|
58
|
+
ground?: {
|
|
59
|
+
y: number;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* For offline generation only (`renderReplay`'s `supersample`, product-roadmap card RM8.2): each
|
|
63
|
+
* frame is the mean of k × k renders, a whole number from 1 to 4. Absent (1) everywhere else:
|
|
64
|
+
* `replayPayload` never sets it, and a live 3D preview takes one sample a frame. A host that sets
|
|
65
|
+
* it in a live page draws every frame k × k times, outside the viewer's frame-time budget.
|
|
66
|
+
*/
|
|
67
|
+
supersample?: number;
|
|
48
68
|
}
|
|
49
69
|
/**
|
|
50
70
|
* The line every surface that shows the preview carries (public-surfaces PS-D12, owner ruling
|
|
@@ -65,7 +85,7 @@ declare const PREVIEW_LABEL = "Same source, plan and 3D preview. The 3D preview
|
|
|
65
85
|
* The limits line, always near a 3D view (PS-D12). It states what the package builds today
|
|
66
86
|
* (`3d.md` §3): change it when the package changes.
|
|
67
87
|
*/
|
|
68
|
-
declare const PREVIEW_LIMITS = "3D preview: walls, openings, floors, stairs and
|
|
88
|
+
declare const PREVIEW_LIMITS = "3D preview: walls, openings, floors, stairs, furniture, outdoor surfaces and fences in flat colours; the ground is a backdrop the viewer draws, not part of the building and not in the file; no pitched roofs or balcony railings yet, and no sections, elevations or BIM.";
|
|
69
89
|
/** The page that says what the 3D preview shows and does not (the docs site's `/3d`). */
|
|
70
90
|
declare const PREVIEW_ABOUT_URL = "https://archlang.uk/3d";
|
|
71
91
|
interface ReplayOptions {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { RFence, ROutdoor } from '@chanmeng666/archlang';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Material slots (visual-assets card V1): the ONE palette both the GLB writer (`glb/write.ts`) and
|
|
3
5
|
* the replay viewer (`replay/mount.ts`) read, so a piece's oak or ceramic is the same colour in
|
|
@@ -30,6 +32,9 @@ declare const PALETTE: Readonly<Record<Exclude<MaterialSlot, "body">, SlotMateri
|
|
|
30
32
|
/** The slot a stair is built in (card X3): oak treads. The core gives a stair no material, so
|
|
31
33
|
* this is a drafting default, ledgered (`stair-material-default`). */
|
|
32
34
|
declare const STAIR_MATERIAL = "wood";
|
|
35
|
+
/** The slot a stair's handrails, balusters and newels are built in (card RM8.6): walnut, so the
|
|
36
|
+
* balustrade reads against the oak treads. A drafting default, ledgered (`stair-rail-material-default`). */
|
|
37
|
+
declare const STAIR_RAIL_MATERIAL = "wood_dark";
|
|
33
38
|
/**
|
|
34
39
|
* The building's own materials (visual-assets V9), by Mesh3D kind, and `<kind>:<part>` where a
|
|
35
40
|
* part differs (a window's frame and glass, a demolished wall's ghost): the light replay's colours
|
|
@@ -44,13 +49,54 @@ declare const KIND_PALETTE: {
|
|
|
44
49
|
readonly door: SlotMaterial;
|
|
45
50
|
readonly "window:frame": SlotMaterial;
|
|
46
51
|
readonly "window:glass": SlotMaterial;
|
|
52
|
+
readonly "window:reveal": SlotMaterial;
|
|
53
|
+
readonly "window:sill": SlotMaterial;
|
|
54
|
+
readonly "window:board": SlotMaterial;
|
|
55
|
+
readonly "opening:lining": SlotMaterial;
|
|
56
|
+
readonly "opening:casing": SlotMaterial;
|
|
47
57
|
readonly opening: SlotMaterial;
|
|
48
58
|
readonly furniture: SlotMaterial;
|
|
49
59
|
readonly roof: SlotMaterial;
|
|
50
60
|
readonly "wall:demolish": SlotMaterial;
|
|
51
61
|
readonly stair: SlotMaterial;
|
|
62
|
+
readonly "stair:rail": SlotMaterial;
|
|
52
63
|
};
|
|
53
64
|
type KindMaterial = keyof typeof KIND_PALETTE;
|
|
65
|
+
/**
|
|
66
|
+
* What each trim part (card RM8.6) is built in, as the ledger records it (`trim-material-default`,
|
|
67
|
+
* review m1 on PR #729): the material its node is written in (`KIND_PALETTE` entry) and that
|
|
68
|
+
* entry's colour. A door's lining and casing are its leaf's oak.
|
|
69
|
+
*/
|
|
70
|
+
declare const TRIM_MATERIAL: {
|
|
71
|
+
readonly "door:lining": {
|
|
72
|
+
readonly material: "door";
|
|
73
|
+
readonly srgb: string;
|
|
74
|
+
};
|
|
75
|
+
readonly "door:casing": {
|
|
76
|
+
readonly material: "door";
|
|
77
|
+
readonly srgb: string;
|
|
78
|
+
};
|
|
79
|
+
readonly "opening:lining": {
|
|
80
|
+
readonly material: "opening:lining";
|
|
81
|
+
readonly srgb: string;
|
|
82
|
+
};
|
|
83
|
+
readonly "opening:casing": {
|
|
84
|
+
readonly material: "opening:casing";
|
|
85
|
+
readonly srgb: string;
|
|
86
|
+
};
|
|
87
|
+
readonly "window:reveal": {
|
|
88
|
+
readonly material: "window:reveal";
|
|
89
|
+
readonly srgb: string;
|
|
90
|
+
};
|
|
91
|
+
readonly "window:sill": {
|
|
92
|
+
readonly material: "window:sill";
|
|
93
|
+
readonly srgb: string;
|
|
94
|
+
};
|
|
95
|
+
readonly "window:board": {
|
|
96
|
+
readonly material: "window:board";
|
|
97
|
+
readonly srgb: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
54
100
|
/**
|
|
55
101
|
* The replay's colour for a wall's cut top (its cap, the faces at its full height): the poché of a
|
|
56
102
|
* plan, read as the section through a model whose roof is lifted off. A display convention of the
|
|
@@ -73,6 +119,66 @@ declare const FINISH_PALETTE: Readonly<Record<FloorFinish, SlotMaterial>>;
|
|
|
73
119
|
declare const FLOOR_FINISH_RULES: ReadonlyArray<readonly [FloorFinish, readonly string[]]>;
|
|
74
120
|
/** The finish {@link FLOOR_FINISH_RULES} gives a room with these `uses`. */
|
|
75
121
|
declare function floorFinish(uses: readonly string[] | undefined): FloorFinish;
|
|
122
|
+
/**
|
|
123
|
+
* The core's ground tints (`Theme.lawn`, `Theme.paving`, `Theme.water`), one of which each `outdoor`
|
|
124
|
+
* kind is filled with in the drawing: the `tint` column of the core's `GROUND` table
|
|
125
|
+
* (`src/elements/outdoor.ts`), which the core does not export. Keyed by the core's own kind type, so
|
|
126
|
+
* a kind the core adds fails the typecheck here; `test/outdoor.test.ts` holds every row to the fill
|
|
127
|
+
* the core really draws (product-roadmap card RM8.3).
|
|
128
|
+
*/
|
|
129
|
+
type GroundTint = "lawn" | "paving" | "water";
|
|
130
|
+
declare const GROUND_TINT: Readonly<Record<ROutdoor["surface"], GroundTint>>;
|
|
131
|
+
/**
|
|
132
|
+
* A drawing tint is a pale wash laid under a hatch; a 3D surface has no hatch, so it carries its
|
|
133
|
+
* colour alone. Its 3D colour is the wash laid on this many times over the theme's paper (`bg`):
|
|
134
|
+
* each channel `bg − k·(bg − tint)`, clamped to 0…255 (`groundColour`, `mesh/outdoor.ts`). With the
|
|
135
|
+
* default theme: lawn #99b76f, paving #ab9f87, water #699fc3. A drafting default, ledgered per kind
|
|
136
|
+
* (`outdoor-colour-theme`).
|
|
137
|
+
*/
|
|
138
|
+
declare const GROUND_WASH = 6;
|
|
139
|
+
/**
|
|
140
|
+
* The site's own materials, which no fixture is made of: a light gravel and a tarmac drive. Apart
|
|
141
|
+
* from `PALETTE` on purpose: `PALETTE`'s keys are the material slots, which equal the core's
|
|
142
|
+
* `FIXTURE_MATERIALS` (`test/material-vocabulary.test.ts`), and a ground is no fixture's material.
|
|
143
|
+
*/
|
|
144
|
+
declare const SITE_PALETTE: {
|
|
145
|
+
readonly gravel: SlotMaterial;
|
|
146
|
+
readonly tarmac: SlotMaterial;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* The kinds the 3D preview tells apart where the drawing does it by hatch alone (one `paving` tint
|
|
150
|
+
* covers six kinds, one `lawn` tint two; with no hatch they would be one colour): a planted bed in the
|
|
151
|
+
* palette's foliage, a timber deck in its oak, gravel and a tarmac drive in their own greys. Every
|
|
152
|
+
* other kind keeps its theme colour; a patio is paving in the core's own words and a balcony a plain
|
|
153
|
+
* slab. Ledgered per kind (`outdoor-colour-3d`).
|
|
154
|
+
*/
|
|
155
|
+
declare const GROUND_SPLITS: Readonly<Partial<Record<ROutdoor["surface"], SlotMaterial>>>;
|
|
156
|
+
/** The GLB roughness of a ground surface in its theme colour, by tint (the viewer reads none). */
|
|
157
|
+
declare const GROUND_ROUGHNESS: Readonly<Record<GroundTint, number>>;
|
|
158
|
+
/**
|
|
159
|
+
* A fence's colour by style (the core draws a fence in line ink only): white-painted pickets, a
|
|
160
|
+
* timber panel in the palette's oak, posts and rail in its walnut. Ledgered per style
|
|
161
|
+
* (`fence-colour-default`).
|
|
162
|
+
*/
|
|
163
|
+
declare const FENCE_PALETTE: Readonly<Record<RFence["style"], SlotMaterial>>;
|
|
164
|
+
/**
|
|
165
|
+
* The ground plane the replay draws round the building (card RM8.3): in the viewer only, never in
|
|
166
|
+
* the Mesh3D or the GLB, which hold only what the plan's elements build. Its top is the lowest
|
|
167
|
+
* storey's floor level (its slab's top), so a garden's surfaces lie flush in it; it reaches
|
|
168
|
+
* `marginMm` past everything drawn on every side. `light` and `dark` are its colours under the two
|
|
169
|
+
* replay themes. Ledgered in every Mesh3D (`ground-plane-viewer-only`) so a reader of the file
|
|
170
|
+
* knows the preview shows a ground the file does not contain.
|
|
171
|
+
*/
|
|
172
|
+
declare const GROUND_PLANE: {
|
|
173
|
+
readonly light: "#e2ddd3";
|
|
174
|
+
readonly dark: "#16293d";
|
|
175
|
+
readonly marginMm: 6000;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* An `outdoor` or `fence` colour under a replay theme: its own on the light theme; on the dark one,
|
|
179
|
+
* 60% of the way to `toward` (the theme's floor colour), the arithmetic of `slotColour`.
|
|
180
|
+
*/
|
|
181
|
+
declare function siteColour(own: string, theme: "light" | "dark", toward: string): string;
|
|
76
182
|
/** sRGB `#rrggbb` → linear RGB, each channel rounded to 4 decimals (glTF base colours are linear). */
|
|
77
183
|
declare function linearRgb(hex: string): [number, number, number];
|
|
78
184
|
/**
|
|
@@ -344,7 +450,7 @@ interface Shell {
|
|
|
344
450
|
/** A T0 part's material slot (`materials.ts`); absent = `body`, the node kind's own colour. */
|
|
345
451
|
slot?: Exclude<MaterialSlot, "body">;
|
|
346
452
|
}
|
|
347
|
-
type NodeKind = "slab" | "floor" | "column" | "wall" | "door" | "window" | "opening" | "furniture" | "roof" | "stair";
|
|
453
|
+
type NodeKind = "slab" | "floor" | "column" | "wall" | "door" | "window" | "opening" | "furniture" | "roof" | "stair" | "outdoor" | "fence";
|
|
348
454
|
interface MeshNode {
|
|
349
455
|
/** `L<level>/<kind>:<id>[:<part>]`, unique in the mesh (plan §3.6). */
|
|
350
456
|
key: string;
|
|
@@ -376,8 +482,9 @@ interface Mesh3D {
|
|
|
376
482
|
* draws itself in its authoring order, then rises:
|
|
377
483
|
*
|
|
378
484
|
* 0.00–0.40 top-down: each node's footprint appears, flat, in stage order
|
|
379
|
-
* brief (slab) → rooms (floors) → walls (columns,
|
|
380
|
-
*
|
|
485
|
+
* brief (slab, then the site's surfaces) → rooms (floors) → walls (columns,
|
|
486
|
+
* exterior walls, the rest, stairs, fences) → openings (doors, windows) → fixtures
|
|
487
|
+
* (catalogued fixtures, then loose furniture);
|
|
381
488
|
* source order inside a group;
|
|
382
489
|
* 0.40–0.55 the core's own drawing (its SVG) fades in over the footprints and holds;
|
|
383
490
|
* 0.55–1.00 the drawing fades out as the camera tilts to a 45° elevation with a narrow-lens
|
|
@@ -530,6 +637,13 @@ interface ReplayState {
|
|
|
530
637
|
settle: number;
|
|
531
638
|
/** Opacity of the core's drawing over the scene. */
|
|
532
639
|
svg: number;
|
|
640
|
+
/**
|
|
641
|
+
* The viewer's ground plane's opacity, 0…1 (card RM8.3, `GROUND_PLANE`): 0 until the core's drawing
|
|
642
|
+
* starts to fade (`PHASE.rise`), then it fades in as the drawing fades out (`1 − svg`), opaque from
|
|
643
|
+
* `PHASE.svgOut`. So the top-down phase draws the plan on the page as before, and no frame shows
|
|
644
|
+
* the ground appear at once where the drawing does not cover it (the letterbox bars; review R1, S1).
|
|
645
|
+
*/
|
|
646
|
+
ground: number;
|
|
533
647
|
nodes: Map<string, NodeState>;
|
|
534
648
|
}
|
|
535
649
|
/** The whole state of the replay at `t` (0…1): a pure function of `t` and the event table. */
|
|
@@ -585,4 +699,4 @@ interface StripItem {
|
|
|
585
699
|
*/
|
|
586
700
|
declare function stripAt(facts: ReplayFacts, events: readonly ReplayEvent[], t: number): StripItem[];
|
|
587
701
|
|
|
588
|
-
export {
|
|
702
|
+
export { type Source as $, type Assumption as A, type NodeState as B, type Outdoor as C, type DoorKind as D, EXPLODE_GAP_MM as E, type Floor as F, type GroundTint as G, PALETTE as H, PHASE as I, type Provenance as J, KIND_PALETTE as K, type Level as L, type Mesh3D as M, type NodeKind as N, type Opening as O, type Polygon as P, type ReplayEvent as Q, type ReplayFacts as R, type StripItem as S, type ReplayState as T, type ReplayView as U, type Roof as V, SITE_PALETTE as W, STAIR_MATERIAL as X, STAIR_RAIL_MATERIAL as Y, STOP_LEAD as Z, type SlotMaterial as _, type Scene3D as a, type Stage as a0, type StairLanding as a1, TRIM_MATERIAL as a2, type Um as a3, WALL_CAP_SRGB as a4, type Wall as a5, authoringOrder as a6, ease as a7, explodeLifts as a8, finishColour as a9, floorFinish as aa, keyFrames as ab, linearRgb as ac, siteColour as ad, slotColour as ae, slotGroups as af, stateAt as ag, storeysOf as ah, timeline as ai, viewLabel as aj, viewMesh as ak, type Pt as b, type Shell as c, type Ring3 as d, type Side as e, type Stair as f, type StairFlight as g, type MaterialSlot as h, type Furniture as i, type Fence as j, FENCE_PALETTE as k, FINISH_PALETTE as l, FIXTURE_FAMILIES as m, FLOOR_FINISHES as n, FLOOR_FINISH_RULES as o, type FloorFinish as p, GROUND_PLANE as q, GROUND_ROUGHNESS as r, stripAt as s, GROUND_SPLITS as t, GROUND_TINT as u, GROUND_WASH as v, type KindMaterial as w, MATERIAL_SLOTS as x, type MeshNode as y, type Meta as z };
|