@chanmeng666/archlang-3d 0.8.0 → 0.9.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 +50 -0
- package/README.md +19 -0
- package/THIRD_PARTY_NOTICES +1 -1
- package/dist/browser.d.ts +4 -3
- package/dist/browser.js +14 -11
- package/dist/{camera-BAsRq_eC.d.ts → camera-BqK_JhhV.d.ts} +1 -1
- package/dist/{chunk-MCASL4MM.js → chunk-4WHBM4NV.js} +22 -147
- package/dist/{chunk-VMVKI2WQ.js → chunk-6EAHOIL6.js} +7 -5
- package/dist/chunk-7FYCBISZ.js +4992 -0
- package/dist/chunk-E65Z5S4K.js +225 -0
- package/dist/{chunk-LNIVDMPG.js → chunk-EL4456GB.js} +1 -273
- package/dist/chunk-ISFIFLC7.js +25 -0
- package/dist/chunk-ONUOWO37.js +251 -0
- package/dist/chunk-P2BDEK2Q.js +6 -0
- package/dist/{chunk-MXKKNJPU.js → chunk-PKFGND2A.js} +174 -26
- package/dist/{chunk-B4PZWWSP.js → chunk-TFXNKG6J.js} +2301 -284
- package/dist/cli.js +13 -8
- package/dist/{facts-CsO0xtFw.d.ts → facts-DGA14BcU.d.ts} +1 -1
- package/dist/glb-BxaVYFWv.d.ts +37 -0
- package/dist/glb.d.ts +3 -0
- package/dist/glb.js +18 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +58 -54
- package/dist/node.d.ts +7 -38
- package/dist/node.js +16 -12
- package/dist/payload-CKSLN1CG.d.ts +358 -0
- package/dist/replay.d.ts +2 -1
- package/dist/{payload-DwiB2P7x.d.ts → types-BQ7xE4YH.d.ts} +3 -358
- package/dist/viewer.iife.js +176 -176
- package/package.json +8 -2
- package/dist/chunk-WARUDAOQ.js +0 -2276
|
@@ -118,8 +118,8 @@ type FloorFinish = (typeof FLOOR_FINISHES)[number];
|
|
|
118
118
|
* drawing washes those floors in, V-D2), a timber deck in its oak (as an `outdoor deck`'s), paving in
|
|
119
119
|
* the colour an `outdoor paving` is built in (the default theme's `paving` tint laid on
|
|
120
120
|
* `GROUND_WASH` times; written out here so this module, which the viewer bundles, keeps reading no
|
|
121
|
-
* core value, and `test/finish.test.ts` holds it to `groundColour("paving")`),
|
|
122
|
-
* concrete grey of its own.
|
|
121
|
+
* core value, and `packages/archlang-3d/test/finish.test.ts` holds it to `groundColour("paving")`),
|
|
122
|
+
* and a polished concrete grey of its own.
|
|
123
123
|
*/
|
|
124
124
|
declare const FINISH_PALETTE: Readonly<Record<FloorFinish, SlotMaterial>>;
|
|
125
125
|
/**
|
|
@@ -564,359 +564,4 @@ interface Mesh3D {
|
|
|
564
564
|
nodes: MeshNode[];
|
|
565
565
|
}
|
|
566
566
|
|
|
567
|
-
|
|
568
|
-
* The replay as a pure function of time (card A3; archlang-3d plan §6.5; decision D3). The plan
|
|
569
|
-
* draws itself in its authoring order, then rises:
|
|
570
|
-
*
|
|
571
|
-
* 0.00–0.40 top-down: each node's footprint appears, flat, in stage order
|
|
572
|
-
* brief (slab, then the site's surfaces) → rooms (floors) → walls (columns,
|
|
573
|
-
* exterior walls, the rest, stairs, fences) → openings (doors, windows) → fixtures
|
|
574
|
-
* (catalogued fixtures, then loose furniture);
|
|
575
|
-
* source order inside a group;
|
|
576
|
-
* 0.40–0.55 the core's own drawing (its SVG) fades in over the footprints and holds;
|
|
577
|
-
* 0.55–1.00 the drawing fades out as the camera tilts to a 45° elevation with a narrow-lens
|
|
578
|
-
* dolly; walls rise in the same order, each opening with its host wall; fixtures and
|
|
579
|
-
* furniture rise after the walls; the roof stays hidden. The end frame is fitted to
|
|
580
|
-
* the building (`camera.ts`), so it fills the canvas.
|
|
581
|
-
*
|
|
582
|
-
* Views (owner's look notes round 1, D14). A plan of several storeys replays each storey on its
|
|
583
|
-
* own (`viewMesh(mesh, n)`: its nodes only, over its own page of the core's drawing) and the storeys
|
|
584
|
-
* combined (`"all"`, the default). In the combined view phase 1 draws the lowest storey under page
|
|
585
|
-
* 1, and the rise is cut into one slot per storey, lowest first: a storey's slab appears only when
|
|
586
|
-
* the storey below is fully up, furniture included.
|
|
587
|
-
*
|
|
588
|
-
* The combined view keeps the lower floors readable with EXPLODED STOREYS plus CAMERA STOPS, chosen
|
|
589
|
-
* by looking at rendered frames of two-storey and townhouse:
|
|
590
|
-
* - each storey is lifted `EXPLODE_GAP_MM` (3 m, about one storey) above the one below, and the
|
|
591
|
-
* end camera looks down at 45° (since card A9, so does a one-storey view), so the floor below
|
|
592
|
-
* shows through the gap;
|
|
593
|
-
* - the camera frames the storeys built so far: when storey k is fully up it fills the frame with
|
|
594
|
-
* storeys 1…k; the next storey's slot opens with a lead-in (`STOP_LEAD`) in which the camera
|
|
595
|
-
* pulls back and nothing new shows. So the ground floor fills the frame, furniture and all, and
|
|
596
|
-
* is seen whole from the wider framing before the storey above appears over it.
|
|
597
|
-
* Rendered and rejected: exploded storeys alone (no stops), which left the ground floor small and
|
|
598
|
-
* half covered at its only full view, the end frame; a 2.4 m gap at 42°, which hid more of it; and
|
|
599
|
-
* stops without a lead-in, where the upper slab appeared at once over the close-framed floor and
|
|
600
|
-
* filled the frame before the camera could pull back.
|
|
601
|
-
* Considered, not built: upper storeys fading (translucent walls over a furnished floor; neither
|
|
602
|
-
* storey reads cleanly) and a cutaway (it removes the storey the viewer just watched rise).
|
|
603
|
-
*
|
|
604
|
-
* The explode is the RISE's, not the building's (public-surfaces card X2): once every storey is up
|
|
605
|
-
* (`PHASE.done`), the storeys SETTLE: in the replay's last stretch each comes down by its lift to
|
|
606
|
-
* the height it really stands at, and the camera moves from the last stop (the exploded building)
|
|
607
|
-
* to a framing of the assembled one (`stateAt`'s `settle`; `cameraStops`'s last fit). So the end
|
|
608
|
-
* frame, the frame a host opens on and the Iso view show the storeys stacked; every frame before
|
|
609
|
-
* the settle is the exploded rise, unchanged. Hiding the storeys above one (the viewer's toolbar) is
|
|
610
|
-
* the cutaway of the assembled building.
|
|
611
|
-
*
|
|
612
|
-
* A demolished wall's ghost (B3a; `part` "demolish") is NOT construction (decision, red-team round 1
|
|
613
|
-
* of card A2b): it takes no place in the build order. Its footprint appears in phase 1 with its
|
|
614
|
-
* storey's walls (at the time of the standing node drawn just before it) without taking a step of
|
|
615
|
-
* its own, and it rises, translucent, across its storey's whole wall slot [a, w] in one interval,
|
|
616
|
-
* never staggered among the walls. So every standing node's event (appear, rise, rank) is the one it
|
|
617
|
-
* has in the same plan with the `status demolish` lines deleted; ghosts rank after every standing
|
|
618
|
-
* node (the table stays in authoring order). The end camera frames the standing building only (`camera.ts`, `boxOfNodes`).
|
|
619
|
-
*
|
|
620
|
-
* Nothing here reads a clock or a random source: `stateAt(events, t)` is the whole state, so a
|
|
621
|
-
* frame at `t` is the same frame however it was reached (`__seek`, plan §6.5).
|
|
622
|
-
*/
|
|
623
|
-
|
|
624
|
-
declare const PHASE: {
|
|
625
|
-
/** Footprints have all appeared. */
|
|
626
|
-
readonly drawn: 0.4;
|
|
627
|
-
/** The core's drawing is fully over the footprints. */
|
|
628
|
-
readonly svgIn: 0.5;
|
|
629
|
-
/** The drawing starts to fade and the camera to tilt. */
|
|
630
|
-
readonly rise: 0.55;
|
|
631
|
-
/** The drawing is gone. */
|
|
632
|
-
readonly svgOut: 0.62;
|
|
633
|
-
/** The camera has finished tilting (the dolly continues). */
|
|
634
|
-
readonly tilted: 0.78;
|
|
635
|
-
/** Every wall has risen; fixtures rise from here. */
|
|
636
|
-
readonly wallsUp: 0.84;
|
|
637
|
-
/** Everything has risen; several storeys combined settle from here to the end (`stateAt`). */
|
|
638
|
-
readonly done: 0.96;
|
|
639
|
-
};
|
|
640
|
-
/**
|
|
641
|
-
* Catalogued wet-room and kitchen fixtures: they rise before loose furniture (D3). A replay
|
|
642
|
-
* grouping only; the core's catalogue is the authority for what a family is.
|
|
643
|
-
*/
|
|
644
|
-
declare const FIXTURE_FAMILIES: ReadonlySet<string>;
|
|
645
|
-
/** One node's place in the replay. Times are fractions of the replay, 0…1. */
|
|
646
|
-
interface ReplayEvent {
|
|
647
|
-
key: string;
|
|
648
|
-
stage: Stage;
|
|
649
|
-
/** Position in the authoring order (0-based), the order footprints appear in. */
|
|
650
|
-
rank: number;
|
|
651
|
-
/** When its footprint appears (phase 1). */
|
|
652
|
-
appear: number;
|
|
653
|
-
/** When it starts and finishes rising; equal for a node that is flat from the start. */
|
|
654
|
-
riseFrom: number;
|
|
655
|
-
riseTo: number;
|
|
656
|
-
hidden: boolean;
|
|
657
|
-
/**
|
|
658
|
-
* The node's storey, 0-based from the lowest; present only when the replay has more than one
|
|
659
|
-
* storey (the combined view), where it sets the camera's stops (`stateAt`).
|
|
660
|
-
*/
|
|
661
|
-
storey?: number;
|
|
662
|
-
}
|
|
663
|
-
/** The authoring order of the mesh's nodes: stage, sub-group, storey, source order, key. */
|
|
664
|
-
declare function authoringOrder(mesh: Mesh3D): MeshNode[];
|
|
665
|
-
/** The storeys the replay can show on their own: the visible nodes' levels, ascending. */
|
|
666
|
-
declare function storeysOf(mesh: Mesh3D): number[];
|
|
667
|
-
/** Which replay: the storeys combined (`"all"`), or storey `n` on its own (1-based, ascending). */
|
|
668
|
-
type ReplayView = "all" | number;
|
|
669
|
-
/** The label a view carries in reports: `all` or `storey:<n>`. */
|
|
670
|
-
declare const viewLabel: (v: ReplayView) => string;
|
|
671
|
-
/**
|
|
672
|
-
* The mesh a view replays. The combined view is the whole mesh; storey `n` is that storey's nodes
|
|
673
|
-
* alone (every other storey is absent, not hidden). A one-storey plan's two views are the same mesh,
|
|
674
|
-
* so they replay byte for byte the same.
|
|
675
|
-
*/
|
|
676
|
-
declare function viewMesh(mesh: Mesh3D, view: ReplayView): Mesh3D;
|
|
677
|
-
/**
|
|
678
|
-
* The combined view's exploded storeys: how far (mm) each storey is lifted above where it stands, so
|
|
679
|
-
* a gap opens between it and the storey below (see the header). Storey `i` (0-based) is lifted
|
|
680
|
-
* `i × EXPLODE_GAP_MM`; a one-storey mesh lifts nothing.
|
|
681
|
-
*/
|
|
682
|
-
declare const EXPLODE_GAP_MM = 3000;
|
|
683
|
-
declare function explodeLifts(mesh: Mesh3D): Map<number, number>;
|
|
684
|
-
/**
|
|
685
|
-
* The combined view: the share of an upper storey's slot spent on its lead-in, in which the camera
|
|
686
|
-
* pulls back from the finished storey below before anything of the new storey shows.
|
|
687
|
-
*/
|
|
688
|
-
declare const STOP_LEAD = 0.35;
|
|
689
|
-
/**
|
|
690
|
-
* The replay's event table: every node, when it appears and when it rises.
|
|
691
|
-
*
|
|
692
|
-
* Phase 1 draws the LOWEST storey only: it is the storey the drawing that fades in shows (page 1 of
|
|
693
|
-
* the core's drawing, or the storey's own page in a storey view), so the footprints and the drawing
|
|
694
|
-
* are the same plan. The rise is then cut into one slot per storey, lowest first: a storey's slab
|
|
695
|
-
* and floors appear as its slot opens, its walls rise (each opening with its host wall), then its
|
|
696
|
-
* fixtures and furniture, and the slot closes when the last of them is up. A storey above therefore
|
|
697
|
-
* starts only once the storey below is fully up. A one-storey mesh has one slot: the whole rise.
|
|
698
|
-
*/
|
|
699
|
-
declare function timeline(mesh: Mesh3D): ReplayEvent[];
|
|
700
|
-
/** Smoothstep easing, written out (no animation library). */
|
|
701
|
-
declare const ease: (x: number) => number;
|
|
702
|
-
interface NodeState {
|
|
703
|
-
visible: boolean;
|
|
704
|
-
/** Vertical scale, 0…1 (a footprint is drawn at a hair above 0). */
|
|
705
|
-
rise: number;
|
|
706
|
-
}
|
|
707
|
-
interface ReplayState {
|
|
708
|
-
/** 0 = straight down, 1 = the final perspective (`endElevation`). */
|
|
709
|
-
tilt: number;
|
|
710
|
-
/** 0…1 along the dolly (to the first camera stop). */
|
|
711
|
-
dolly: number;
|
|
712
|
-
/**
|
|
713
|
-
* The combined view's camera stop, 0…storeys − 1 during the rise: at k the camera frames storeys
|
|
714
|
-
* 0…k; between stops it moves from one framing to the next. During the settle it runs on from
|
|
715
|
-
* storeys − 1 to storeys, the assembled building's framing (`cameraStops`'s last fit). Always 0
|
|
716
|
-
* for one storey.
|
|
717
|
-
*/
|
|
718
|
-
stop: number;
|
|
719
|
-
/**
|
|
720
|
-
* The combined view's settle, 0…1: 0 while the storeys are exploded (the whole rise), 1 when each
|
|
721
|
-
* has come down to the height it stands at (the end frame). A node's lift is `lift × (1 − settle)`
|
|
722
|
-
* (`settledLift`). Always 0 for one storey.
|
|
723
|
-
*/
|
|
724
|
-
settle: number;
|
|
725
|
-
/** Opacity of the core's drawing over the scene. */
|
|
726
|
-
svg: number;
|
|
727
|
-
/**
|
|
728
|
-
* The viewer's ground plane's opacity, 0…1 (card RM8.3, `GROUND_PLANE`): 0 until the core's drawing
|
|
729
|
-
* starts to fade (`PHASE.rise`), then it fades in as the drawing fades out (`1 − svg`), opaque from
|
|
730
|
-
* `PHASE.svgOut`. So the top-down phase draws the plan on the page as before, and no frame shows
|
|
731
|
-
* the ground appear at once where the drawing does not cover it (the letterbox bars; review R1, S1).
|
|
732
|
-
*/
|
|
733
|
-
ground: number;
|
|
734
|
-
nodes: Map<string, NodeState>;
|
|
735
|
-
}
|
|
736
|
-
/** The whole state of the replay at `t` (0…1): a pure function of `t` and the event table. */
|
|
737
|
-
declare function stateAt(events: readonly ReplayEvent[], t: number): ReplayState;
|
|
738
|
-
/**
|
|
739
|
-
* The key frames: when each stage first shows, the drawing, the tilt, then (combined view only)
|
|
740
|
-
* each upper storey's first footprint (`storey:<n>`) and each camera stop (`stop:<n>`, storey n
|
|
741
|
-
* fully up; n is 1-based), and the end.
|
|
742
|
-
*/
|
|
743
|
-
declare function keyFrames(events: readonly ReplayEvent[]): Array<{
|
|
744
|
-
label: string;
|
|
745
|
-
t: number;
|
|
746
|
-
}>;
|
|
747
|
-
|
|
748
|
-
/**
|
|
749
|
-
* The replay's metrics strip (card G4): a line of plain facts under the picture, each shown when
|
|
750
|
-
* the replay reaches the stage that draws it. Browser-safe and free of the core: the facts come in
|
|
751
|
-
* as numbers (`facts.ts` reads them from the core's `describe()` and `lint()` for the same
|
|
752
|
-
* source) and the strip is a pure function of `t` (`stripAt`), like every frame.
|
|
753
|
-
*
|
|
754
|
-
* The strip is a DOM layer over the canvas, never part of it: the canvas's pixels (and so the
|
|
755
|
-
* key-frame hashes, `__frameHash`) are the same with and without it. Text depends on installed
|
|
756
|
-
* fonts, which is why the hashed frames have none (`e2e/fixtures/README.md`).
|
|
757
|
-
*
|
|
758
|
-
* Wording is plain counts and areas, each area saying which convention it uses. It claims nothing
|
|
759
|
-
* about the plan being good, compliant or checked: a warnings count is a count of what `lint()`
|
|
760
|
-
* reported, nothing more.
|
|
761
|
-
*/
|
|
762
|
-
|
|
763
|
-
/** What the strip says. Areas are m²; `areaNet` is absent where the core cannot give it. */
|
|
764
|
-
interface ReplayFacts {
|
|
765
|
-
/** The storeys the combined view shows; absent in a single-storey view (nothing to count). */
|
|
766
|
-
storeys?: number;
|
|
767
|
-
rooms: number;
|
|
768
|
-
doors: number;
|
|
769
|
-
windows: number;
|
|
770
|
-
/** Floor area measured to the wall centre lines (the core's `floor_area_m2`). */
|
|
771
|
-
areaCentre: number;
|
|
772
|
-
/** Floor area net of the wall solids (the core's `net_floor_area_m2`). */
|
|
773
|
-
areaNet?: number;
|
|
774
|
-
/** The number of warnings `lint()` reports for the plan. */
|
|
775
|
-
warnings: number;
|
|
776
|
-
}
|
|
777
|
-
interface StripItem {
|
|
778
|
-
id: "storeys" | "rooms" | "area-net" | "area-centre" | "doors" | "windows" | "warnings";
|
|
779
|
-
text: string;
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* The items showing at replay time `t`, in a fixed order: storeys (from the start), rooms and
|
|
783
|
-
* areas (when the first floor appears), doors and windows (when the first opening appears),
|
|
784
|
-
* warnings (when the core's drawing is fully over the plan). A pure function of `facts`, the event
|
|
785
|
-
* table and `t`.
|
|
786
|
-
*/
|
|
787
|
-
declare function stripAt(facts: ReplayFacts, events: readonly ReplayEvent[], t: number): StripItem[];
|
|
788
|
-
|
|
789
|
-
/**
|
|
790
|
-
* The replay's data (card A3), browser-safe: `replayPayload(mesh, opts)` is what a replay carries
|
|
791
|
-
* for `mesh`, whether the single-file HTML inlines it (`html.ts`, Node) or the playground's 3D
|
|
792
|
-
* preview tab builds it in the browser (card A5) and mounts it with `mountReplay`.
|
|
793
|
-
*/
|
|
794
|
-
|
|
795
|
-
interface ReplayNode {
|
|
796
|
-
key: string;
|
|
797
|
-
kind: string;
|
|
798
|
-
part?: string;
|
|
799
|
-
/**
|
|
800
|
-
* The combined view's exploded storeys: how far (mm) the node is lifted while the storeys rise;
|
|
801
|
-
* absent = 0. It settles to 0 by the end (`settledLift`).
|
|
802
|
-
*/
|
|
803
|
-
lift?: number;
|
|
804
|
-
/** Flat `[x, y, z, …]` in micrometres, exporters' axes (X plan x, Y up, Z plan y). */
|
|
805
|
-
positions: number[];
|
|
806
|
-
indices: number[];
|
|
807
|
-
/**
|
|
808
|
-
* A T0 piece's material slots (visual-assets V1): consecutive runs of `indices`, in order, each
|
|
809
|
-
* drawn in its slot's colour (`materials.ts`; `body` is the kind's own). Absent on every node
|
|
810
|
-
* without a slotted shell, which is then drawn exactly as before.
|
|
811
|
-
*/
|
|
812
|
-
groups?: Array<{
|
|
813
|
-
slot: MaterialSlot;
|
|
814
|
-
count: number;
|
|
815
|
-
}>;
|
|
816
|
-
/** A floor's finish (visual-assets V9, `extras.finish`), drawn in its colour; absent on every other node. */
|
|
817
|
-
finish?: FloorFinish;
|
|
818
|
-
/**
|
|
819
|
-
* An outdoor surface's or a fence's colour (card RM8.3, `extras.colour`, sRGB `#rrggbb`), the one
|
|
820
|
-
* the GLB writes too; absent on every other node.
|
|
821
|
-
*/
|
|
822
|
-
colour?: string;
|
|
823
|
-
/**
|
|
824
|
-
* The width (mm) of the contact shadow the node casts (card RM8.8, `CONTACT_SHADOW`,
|
|
825
|
-
* `shadows.ts`): on a standing wall and a column, a standing piece of furniture, a fence and a
|
|
826
|
-
* stair's stringers. Absent on every node that casts none (a hung piece, a flat one, a door …).
|
|
827
|
-
*/
|
|
828
|
-
band?: number;
|
|
829
|
-
/**
|
|
830
|
-
* A standing piece of furniture lower than its band would be (a rug): it casts no contact shadow
|
|
831
|
-
* and its top receives the others' (card RM8.8). Absent on every other node.
|
|
832
|
-
*/
|
|
833
|
-
flat?: true;
|
|
834
|
-
}
|
|
835
|
-
interface ReplayPayload {
|
|
836
|
-
title: string;
|
|
837
|
-
theme: "light" | "dark";
|
|
838
|
-
width: number;
|
|
839
|
-
height: number;
|
|
840
|
-
seconds: number;
|
|
841
|
-
/** The core's own drawing of the plan (light theme) and its viewBox in plan millimetres. */
|
|
842
|
-
svg: string;
|
|
843
|
-
viewBox: [number, number, number, number];
|
|
844
|
-
/** The end camera's elevation in degrees (`endElevation`). */
|
|
845
|
-
elevation: number;
|
|
846
|
-
/** The metrics strip's numbers (card G4); with none, no strip is painted. */
|
|
847
|
-
facts?: ReplayFacts;
|
|
848
|
-
nodes: ReplayNode[];
|
|
849
|
-
events: ReplayEvent[];
|
|
850
|
-
/**
|
|
851
|
-
* The ground plane's height (card RM8.3, `GROUND_PLANE`): the top of the lowest storey's slab, its
|
|
852
|
-
* floor level, in micrometres. Absent when that storey has no slab: then no ground is drawn.
|
|
853
|
-
*/
|
|
854
|
-
ground?: {
|
|
855
|
-
y: number;
|
|
856
|
-
};
|
|
857
|
-
/**
|
|
858
|
-
* For offline generation only (`renderReplay`'s `supersample`, product-roadmap card RM8.2): each
|
|
859
|
-
* frame is the mean of k × k renders, a whole number from 1 to 4. Absent (1) everywhere else:
|
|
860
|
-
* `replayPayload` never sets it, and a live 3D preview takes one sample a frame. A host that sets
|
|
861
|
-
* it in a live page draws every frame k × k times, outside the viewer's frame-time budget.
|
|
862
|
-
*/
|
|
863
|
-
supersample?: number;
|
|
864
|
-
/**
|
|
865
|
-
* `false` draws no contact shadows (card RM8.8): only the frame-time measurement sets it
|
|
866
|
-
* (`e2e/frame-budget.e2e.ts`), to time frames with and without them. Absent: drawn.
|
|
867
|
-
*/
|
|
868
|
-
shadows?: false;
|
|
869
|
-
}
|
|
870
|
-
/**
|
|
871
|
-
* The line every surface that shows the preview carries (public-surfaces PS-D12, owner ruling
|
|
872
|
-
* PS-D11, `docs/plans/public-surfaces/3d.md` §2; it replaced decision D5's label). `PREVIEW_LEAD`
|
|
873
|
-
* is its first sentence, which a host may set in bold. The plan's full line adds "You can also
|
|
874
|
-
* download it as a validated GLB." where a surface offers the download.
|
|
875
|
-
*
|
|
876
|
-
* What "checked against the plan" means, as the line says it: every 3D element comes from the
|
|
877
|
-
* plan's elements (each Scene3D record carries the `source` naming its plan element, required by
|
|
878
|
-
* the schema, V-SCH-01 in `check/verify.ts`; the slab and a default roof come from the storey's
|
|
879
|
-
* rooms and walls; V-GLTF-02 holds the GLB's nodes to the Mesh3D's, each named `<kind>:<id>`), and
|
|
880
|
-
* every solid is closed (V-GEO-02, `openEdges` in `check/verify.ts`: every shell closed,
|
|
881
|
-
* consistently wound, of positive volume). `build` writes nothing when a check fails.
|
|
882
|
-
*/
|
|
883
|
-
declare const PREVIEW_LEAD = "Same source, plan and 3D preview.";
|
|
884
|
-
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: every 3D element comes from the plan's elements, and every solid is closed.";
|
|
885
|
-
/**
|
|
886
|
-
* The limits line, always near a 3D view (PS-D12). It states what the package builds today
|
|
887
|
-
* (`3d.md` §3): change it when the package changes.
|
|
888
|
-
*/
|
|
889
|
-
declare const PREVIEW_LIMITS = "3D preview: walls, openings, floors, stairs, furniture, outdoor surfaces and fences in plain colours; the ground and the soft contact shadows are the viewer's, not part of the building and not in the file; no pitched roofs or balcony railings yet, and no sections, elevations or BIM.";
|
|
890
|
-
/** The page that says what the 3D preview shows and does not (the docs site's `/3d`). */
|
|
891
|
-
declare const PREVIEW_ABOUT_URL = "https://archlang.uk/3d";
|
|
892
|
-
/**
|
|
893
|
-
* The words that tell which storey a notice is about in the combined view (card RM8.10): `L2 ·`.
|
|
894
|
-
* One function for the replay HTML and the playground, from the warning's own `level`.
|
|
895
|
-
*/
|
|
896
|
-
declare function noticeLevelLabel(level: number): string;
|
|
897
|
-
interface ReplayOptions {
|
|
898
|
-
title: string;
|
|
899
|
-
/**
|
|
900
|
-
* The core's drawing of the storey phase 1 draws, light theme: `compile(source).svg` (page 1) for
|
|
901
|
-
* the combined view, the storey's own `compile(source).pages[i].svg` for a storey view.
|
|
902
|
-
*/
|
|
903
|
-
svg: string;
|
|
904
|
-
width?: number;
|
|
905
|
-
height?: number;
|
|
906
|
-
seconds?: number;
|
|
907
|
-
/** Exports only: the sites stay light (D11, ADR 0014). */
|
|
908
|
-
theme?: "light" | "dark";
|
|
909
|
-
/** The metrics strip's numbers (`replayFacts`); omit for a replay without the strip (card G4). */
|
|
910
|
-
facts?: ReplayFacts;
|
|
911
|
-
}
|
|
912
|
-
/** The `viewBox` of an SVG document, in its user units (plan millimetres for the core's drawing). */
|
|
913
|
-
declare function viewBoxOf(svg: string): [number, number, number, number];
|
|
914
|
-
/**
|
|
915
|
-
* The data a replay HTML carries for `mesh`: pass `viewMesh(mesh, view)` for one view. A mesh of
|
|
916
|
-
* more than one storey is the combined view: its storeys are exploded (`explodeLifts`) while they
|
|
917
|
-
* rise and come down to their real heights by the end (`stateAt`'s `settle`), and the end camera
|
|
918
|
-
* looks down at 45° (`endElevation`).
|
|
919
|
-
*/
|
|
920
|
-
declare function replayPayload(mesh: Mesh3D, opts: ReplayOptions): ReplayPayload;
|
|
921
|
-
|
|
922
|
-
export { type Outdoor as $, type Assumption as A, FLOOR_FINISH_RULES as B, CONTACT_SHADOW as C, type DoorKind as D, EXPLODE_GAP_MM as E, type Floor as F, type GroundTint as G, FLOOR_WORD_FINISH as H, type FloorFinish as I, GROUND_PLANE as J, GROUND_ROUGHNESS as K, type Level as L, type Mesh3D as M, GROUND_SPLITS as N, type Opening as O, PREVIEW_ABOUT_URL as P, GROUND_TINT as Q, type ReplayPayload as R, type StripItem as S, GROUND_WASH as T, KIND_PALETTE as U, type KindMaterial as V, MATERIAL_SLOTS as W, type MeshNode as X, type Meta as Y, type NodeKind as Z, type NodeState as _, PREVIEW_LABEL as a, PALETTE as a0, PHASE as a1, type Provenance as a2, type ReplayEvent as a3, type ReplayState as a4, type ReplayView as a5, type Roof as a6, SITE_PALETTE as a7, STAIR_MATERIAL as a8, STAIR_RAIL_MATERIAL as a9, STOP_LEAD as aa, type SlotMaterial as ab, type Source as ac, type Stage as ad, TRIM_MATERIAL as ae, type Um as af, WALL_CAP_SRGB as ag, type Wall as ah, authoringOrder as ai, contactBandMm as aj, ease as ak, explodeLifts as al, finishColour as am, floorFinish as an, keyFrames as ao, linearRgb as ap, siteColour as aq, slotColour as ar, slotGroups as as, stateAt as at, storeysOf as au, timeline as av, viewLabel as aw, viewMesh as ax, wordFinish as ay, PREVIEW_LEAD as b, PREVIEW_LIMITS as c, type ReplayFacts as d, type ReplayNode as e, type ReplayOptions as f, type Scene3D as g, type Polygon as h, type Pt as i, type Shell as j, type Ring3 as k, type Side as l, type Stair as m, noticeLevelLabel as n, type StairFlight as o, type StairLanding as p, type MaterialSlot as q, replayPayload as r, stripAt as s, type Furniture as t, type Fence as u, viewBoxOf as v, FENCE_PALETTE as w, FINISH_PALETTE as x, FIXTURE_FAMILIES as y, FLOOR_FINISHES as z };
|
|
567
|
+
export { floorFinish as $, type Assumption as A, PALETTE as B, CONTACT_SHADOW as C, type DoorKind as D, type Provenance as E, type FloorFinish as F, type GroundTint as G, type Roof as H, SITE_PALETTE as I, STAIR_MATERIAL 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, STAIR_RAIL_MATERIAL as Q, type Ring3 as R, type Stage as S, type SlotMaterial as T, type Source as U, TRIM_MATERIAL as V, type Um as W, WALL_CAP_SRGB as X, type Wall as Y, contactBandMm as Z, finishColour as _, type MeshNode as a, linearRgb as a0, siteColour as a1, slotColour as a2, slotGroups as a3, wordFinish as a4, type MaterialSlot as b, type Scene3D as c, type Shell as d, type Floor as e, type Pt as f, type Side as g, type Stair as h, type StairFlight as i, type StairLanding as j, type Furniture as k, type Fence as l, FENCE_PALETTE as m, FINISH_PALETTE as n, FLOOR_FINISHES as o, FLOOR_FINISH_RULES as p, FLOOR_WORD_FINISH as q, GROUND_PLANE as r, GROUND_ROUGHNESS as s, GROUND_SPLITS as t, GROUND_TINT as u, GROUND_WASH as v, type KindMaterial as w, MATERIAL_SLOTS as x, type Meta as y, type Outdoor as z };
|