@chanmeng666/archlang-3d 0.3.0 → 0.5.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 +92 -0
- package/README.md +14 -3
- package/dist/browser.d.ts +38 -6
- package/dist/browser.js +82 -21
- package/dist/{camera-CLNYQ1Xv.d.ts → camera-DVOiag0F.d.ts} +21 -5
- package/dist/{chunk-WBA4LABI.js → chunk-4SQ5YKKX.js} +70 -10
- package/dist/{chunk-VPYTRKMK.js → chunk-EQBMPXB5.js} +24 -4
- package/dist/{chunk-QUSG4UCO.js → chunk-L2CX7KWM.js} +278 -22
- package/dist/{chunk-ZE4PL6KP.js → chunk-OWZWBKMI.js} +107 -38
- package/dist/{chunk-PRZXP6FP.js → chunk-WCWLYIVD.js} +45 -4
- package/dist/cli.js +6 -6
- package/dist/{facts-B47HOKOh.d.ts → facts-BRIFxHL_.d.ts} +1 -1
- package/dist/index.d.ts +46 -7
- package/dist/index.js +14 -4
- package/dist/node.d.ts +17 -7
- package/dist/node.js +10 -4
- package/dist/replay.d.ts +31 -8
- package/dist/scene3d.schema.json +63 -0
- package/dist/{strip-CN_dTKqy.d.ts → strip-Nt7eJ-4E.d.ts} +59 -5
- package/dist/viewer.iife.js +170 -170
- package/package.json +5 -4
package/dist/scene3d.schema.json
CHANGED
|
@@ -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
|
},
|
|
@@ -27,6 +27,9 @@ interface SlotMaterial {
|
|
|
27
27
|
* brushed steel, a sage-grey kitchen and muted greens outdoors.
|
|
28
28
|
*/
|
|
29
29
|
declare const PALETTE: Readonly<Record<Exclude<MaterialSlot, "body">, SlotMaterial>>;
|
|
30
|
+
/** The slot a stair is built in (card X3): oak treads. The core gives a stair no material, so
|
|
31
|
+
* this is a drafting default, ledgered (`stair-material-default`). */
|
|
32
|
+
declare const STAIR_MATERIAL = "wood";
|
|
30
33
|
/**
|
|
31
34
|
* The building's own materials (visual-assets V9), by Mesh3D kind, and `<kind>:<part>` where a
|
|
32
35
|
* part differs (a window's frame and glass, a demolished wall's ghost): the light replay's colours
|
|
@@ -45,6 +48,7 @@ declare const KIND_PALETTE: {
|
|
|
45
48
|
readonly furniture: SlotMaterial;
|
|
46
49
|
readonly roof: SlotMaterial;
|
|
47
50
|
readonly "wall:demolish": SlotMaterial;
|
|
51
|
+
readonly stair: SlotMaterial;
|
|
48
52
|
};
|
|
49
53
|
type KindMaterial = keyof typeof KIND_PALETTE;
|
|
50
54
|
/**
|
|
@@ -225,12 +229,46 @@ interface Box {
|
|
|
225
229
|
h: Um;
|
|
226
230
|
};
|
|
227
231
|
}
|
|
232
|
+
/** A plan rectangle's edge. */
|
|
233
|
+
type Side = "top" | "bottom" | "left" | "right";
|
|
234
|
+
/**
|
|
235
|
+
* One straight flight of a stair, as the core resolves it: its rectangle, the edge a person
|
|
236
|
+
* CLIMBING it starts from (`foot`, the same on every storey whatever `dir` that storey draws), and
|
|
237
|
+
* the tread divisions the plan draws on it (the core's `treadCount` of its run).
|
|
238
|
+
*/
|
|
239
|
+
interface StairFlight {
|
|
240
|
+
at: Pt;
|
|
241
|
+
size: {
|
|
242
|
+
w: Um;
|
|
243
|
+
h: Um;
|
|
244
|
+
};
|
|
245
|
+
foot: Side;
|
|
246
|
+
treads: number;
|
|
247
|
+
}
|
|
248
|
+
/** A landing between two flights of a turning stair: its rectangle. */
|
|
249
|
+
interface StairLanding {
|
|
250
|
+
at: Pt;
|
|
251
|
+
size: {
|
|
252
|
+
w: Um;
|
|
253
|
+
h: Um;
|
|
254
|
+
};
|
|
255
|
+
}
|
|
228
256
|
interface Stair {
|
|
229
257
|
id: string;
|
|
230
258
|
source: Source;
|
|
259
|
+
/** The footprint's bounding box (on a turning stair it holds floor that is no stair: read `flights`). */
|
|
231
260
|
box: Box;
|
|
232
261
|
dir: "up" | "down";
|
|
262
|
+
/** The flight band's width, centred across each flight. */
|
|
233
263
|
width: Um;
|
|
264
|
+
/**
|
|
265
|
+
* The flights in climbing order (one on a straight stair), from the core's `RStair.flights` or
|
|
266
|
+
* the stair itself. Absent when the core does not export `treadCount`, or on a Scene3D written
|
|
267
|
+
* before 0.4.0: such a stair is not built (ledgered `stair-no-flights`).
|
|
268
|
+
*/
|
|
269
|
+
flights?: StairFlight[];
|
|
270
|
+
/** `landings[i]` stands between `flights[i]` and `flights[i + 1]`; present with `flights`. */
|
|
271
|
+
landings?: StairLanding[];
|
|
234
272
|
}
|
|
235
273
|
interface Outdoor {
|
|
236
274
|
id: string;
|
|
@@ -306,7 +344,7 @@ interface Shell {
|
|
|
306
344
|
/** A T0 part's material slot (`materials.ts`); absent = `body`, the node kind's own colour. */
|
|
307
345
|
slot?: Exclude<MaterialSlot, "body">;
|
|
308
346
|
}
|
|
309
|
-
type NodeKind = "slab" | "floor" | "column" | "wall" | "door" | "window" | "opening" | "furniture" | "roof";
|
|
347
|
+
type NodeKind = "slab" | "floor" | "column" | "wall" | "door" | "window" | "opening" | "furniture" | "roof" | "stair";
|
|
310
348
|
interface MeshNode {
|
|
311
349
|
/** `L<level>/<kind>:<id>[:<part>]`, unique in the mesh (plan §3.6). */
|
|
312
350
|
key: string;
|
|
@@ -369,6 +407,14 @@ interface Mesh3D {
|
|
|
369
407
|
* Considered, not built: upper storeys fading (translucent walls over a furnished floor; neither
|
|
370
408
|
* storey reads cleanly) and a cutaway (it removes the storey the viewer just watched rise).
|
|
371
409
|
*
|
|
410
|
+
* The explode is the RISE's, not the building's (public-surfaces card X2): once every storey is up
|
|
411
|
+
* (`PHASE.done`), the storeys SETTLE: in the replay's last stretch each comes down by its lift to
|
|
412
|
+
* the height it really stands at, and the camera moves from the last stop (the exploded building)
|
|
413
|
+
* to a framing of the assembled one (`stateAt`'s `settle`; `cameraStops`'s last fit). So the end
|
|
414
|
+
* frame, the frame a host opens on and the Iso view show the storeys stacked; every frame before
|
|
415
|
+
* the settle is the exploded rise, unchanged. Hiding the storeys above one (the viewer's toolbar) is
|
|
416
|
+
* the cutaway of the assembled building.
|
|
417
|
+
*
|
|
372
418
|
* A demolished wall's ghost (B3a; `part` "demolish") is NOT construction (decision, red-team round 1
|
|
373
419
|
* of card A2b): it takes no place in the build order. Its footprint appears in phase 1 with its
|
|
374
420
|
* storey's walls (at the time of the standing node drawn just before it) without taking a step of
|
|
@@ -394,7 +440,7 @@ declare const PHASE: {
|
|
|
394
440
|
readonly tilted: 0.78;
|
|
395
441
|
/** Every wall has risen; fixtures rise from here. */
|
|
396
442
|
readonly wallsUp: 0.84;
|
|
397
|
-
/** Everything has risen. */
|
|
443
|
+
/** Everything has risen; several storeys combined settle from here to the end (`stateAt`). */
|
|
398
444
|
readonly done: 0.96;
|
|
399
445
|
};
|
|
400
446
|
/**
|
|
@@ -470,10 +516,18 @@ interface ReplayState {
|
|
|
470
516
|
/** 0…1 along the dolly (to the first camera stop). */
|
|
471
517
|
dolly: number;
|
|
472
518
|
/**
|
|
473
|
-
* The combined view's camera stop, 0…storeys − 1: at k the camera frames storeys
|
|
474
|
-
* stops it moves from one framing to the next.
|
|
519
|
+
* The combined view's camera stop, 0…storeys − 1 during the rise: at k the camera frames storeys
|
|
520
|
+
* 0…k; between stops it moves from one framing to the next. During the settle it runs on from
|
|
521
|
+
* storeys − 1 to storeys, the assembled building's framing (`cameraStops`'s last fit). Always 0
|
|
522
|
+
* for one storey.
|
|
475
523
|
*/
|
|
476
524
|
stop: number;
|
|
525
|
+
/**
|
|
526
|
+
* The combined view's settle, 0…1: 0 while the storeys are exploded (the whole rise), 1 when each
|
|
527
|
+
* has come down to the height it stands at (the end frame). A node's lift is `lift × (1 − settle)`
|
|
528
|
+
* (`settledLift`). Always 0 for one storey.
|
|
529
|
+
*/
|
|
530
|
+
settle: number;
|
|
477
531
|
/** Opacity of the core's drawing over the scene. */
|
|
478
532
|
svg: number;
|
|
479
533
|
nodes: Map<string, NodeState>;
|
|
@@ -531,4 +585,4 @@ interface StripItem {
|
|
|
531
585
|
*/
|
|
532
586
|
declare function stripAt(facts: ReplayFacts, events: readonly ReplayEvent[], t: number): StripItem[];
|
|
533
587
|
|
|
534
|
-
export {
|
|
588
|
+
export { finishColour as $, type Assumption as A, type ReplayView as B, type Roof as C, type DoorKind as D, EXPLODE_GAP_MM as E, type Floor as F, STAIR_MATERIAL as G, STOP_LEAD as H, type Side as I, type SlotMaterial 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 Source as Q, type ReplayFacts as R, type StripItem as S, type Stage as T, type StairLanding as U, type Um as V, WALL_CAP_SRGB as W, type Wall as X, authoringOrder as Y, ease as Z, explodeLifts as _, type Scene3D as a, floorFinish as a0, keyFrames as a1, linearRgb as a2, slotColour as a3, slotGroups as a4, stateAt as a5, storeysOf as a6, timeline as a7, viewLabel as a8, viewMesh as a9, type Pt as b, type Shell as c, type Ring3 as d, type StairFlight as e, type Stair as f, type MaterialSlot as g, type Furniture as h, FINISH_PALETTE as i, FIXTURE_FAMILIES as j, FLOOR_FINISHES as k, FLOOR_FINISH_RULES as l, type Fence as m, type FloorFinish as n, type KindMaterial as o, MATERIAL_SLOTS as p, type MeshNode as q, type Meta as r, stripAt as s, type NodeState as t, type Outdoor as u, PALETTE as v, PHASE as w, type Provenance as x, type ReplayEvent as y, type ReplayState as z };
|