@chanmeng666/archlang-3d 0.8.1 → 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 +24 -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-WOEJKIXN.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-JQTG6BDR.js → chunk-PKFGND2A.js} +7 -3
- package/dist/{chunk-33J3YGNF.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/package.json +7 -1
- package/dist/chunk-CYSES7C3.js +0 -2276
package/dist/cli.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
ARCHLANG_3D_VERSION,
|
|
3
4
|
DOOR_POSES,
|
|
4
5
|
adaptPlan,
|
|
5
6
|
buildMesh
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TFXNKG6J.js";
|
|
8
|
+
import "./chunk-ISFIFLC7.js";
|
|
7
9
|
import {
|
|
8
10
|
SWIFTSHADER_ARGS,
|
|
9
11
|
checkGlb,
|
|
@@ -11,20 +13,23 @@ import {
|
|
|
11
13
|
checkShells,
|
|
12
14
|
makeNodeWorld,
|
|
13
15
|
renderReplay,
|
|
14
|
-
replayHtml
|
|
15
|
-
|
|
16
|
-
} from "./chunk-WOEJKIXN.js";
|
|
16
|
+
replayHtml
|
|
17
|
+
} from "./chunk-4WHBM4NV.js";
|
|
17
18
|
import {
|
|
18
|
-
ARCHLANG_3D_VERSION,
|
|
19
19
|
replayFacts
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-E65Z5S4K.js";
|
|
21
|
+
import "./chunk-6EAHOIL6.js";
|
|
22
22
|
import {
|
|
23
23
|
storeysOf,
|
|
24
24
|
timeline,
|
|
25
25
|
viewLabel,
|
|
26
26
|
viewMesh
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-EL4456GB.js";
|
|
28
|
+
import {
|
|
29
|
+
writeGlb
|
|
30
|
+
} from "./chunk-7FYCBISZ.js";
|
|
31
|
+
import "./chunk-P2BDEK2Q.js";
|
|
32
|
+
import "./chunk-ONUOWO37.js";
|
|
28
33
|
|
|
29
34
|
// src/cli/run.ts
|
|
30
35
|
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { World } from '@chanmeng666/archlang';
|
|
2
|
-
import {
|
|
2
|
+
import { b as ReplayView, c as ReplayFacts } from './payload-CKSLN1CG.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The metrics strip's numbers (card G4), read from the core's public `describe()` and `lint()` for
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { a as MeshNode, M as Mesh3D } from './types-BQ7xE4YH.js';
|
|
2
|
+
|
|
3
|
+
/** `asset.generator`: the package and its version (`ARCHLANG_3D_VERSION`), never a time (plan §3.7). */
|
|
4
|
+
declare const GLB_GENERATOR: string;
|
|
5
|
+
/**
|
|
6
|
+
* The material a node's untagged (`body`) shells are written in (visual-assets V9): a floor's finish
|
|
7
|
+
* (`floor:<finish>`, from `extras.finish`), a window's frame or glass, a demolished wall's ghost
|
|
8
|
+
* (`wall:demolish`, B3a), else its kind. Each reads the one palette the viewer reads (`materials.ts`).
|
|
9
|
+
*/
|
|
10
|
+
declare function bodyMaterialName(n: MeshNode): string;
|
|
11
|
+
/** The glTF node name of a Mesh3D node: its key without the storey prefix (plan §3.6). */
|
|
12
|
+
declare const glbNodeName: (n: MeshNode) => string;
|
|
13
|
+
/** The storey group node's name. */
|
|
14
|
+
declare const levelNodeName: (level: number) => string;
|
|
15
|
+
/** `extras.archlang` of a Mesh3D node: identity first, then the node's own facts, in a fixed key order. */
|
|
16
|
+
declare function nodeExtras(n: MeshNode): Record<string, string | number | boolean>;
|
|
17
|
+
/** The GLB of `mesh`: same Mesh3D and `generator`, same bytes. */
|
|
18
|
+
declare function writeGlb(mesh: Mesh3D, opts?: {
|
|
19
|
+
generator?: string;
|
|
20
|
+
}): Promise<Uint8Array>;
|
|
21
|
+
/** One node read back from a GLB: its global key (`L<n>/<name>`) and its `extras.archlang`. */
|
|
22
|
+
interface GlbNode {
|
|
23
|
+
key: string;
|
|
24
|
+
name: string;
|
|
25
|
+
extras: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The storey groups (each scene's root nodes) and every node below them at any depth, depth first
|
|
29
|
+
* in file order. This module writes element nodes one level under their group only, so a node
|
|
30
|
+
* nested deeper is reported too (and then named and diffed like any other), never skipped.
|
|
31
|
+
*/
|
|
32
|
+
declare function readGlbNodes(glb: Uint8Array): Promise<{
|
|
33
|
+
levels: string[];
|
|
34
|
+
nodes: GlbNode[];
|
|
35
|
+
}>;
|
|
36
|
+
|
|
37
|
+
export { type GlbNode as G, GLB_GENERATOR as a, bodyMaterialName as b, glbNodeName as g, levelNodeName as l, nodeExtras as n, readGlbNodes as r, writeGlb as w };
|
package/dist/glb.d.ts
ADDED
package/dist/glb.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GLB_GENERATOR,
|
|
3
|
+
bodyMaterialName,
|
|
4
|
+
glbNodeName,
|
|
5
|
+
levelNodeName,
|
|
6
|
+
nodeExtras,
|
|
7
|
+
writeGlb
|
|
8
|
+
} from "./chunk-7FYCBISZ.js";
|
|
9
|
+
import "./chunk-P2BDEK2Q.js";
|
|
10
|
+
import "./chunk-ONUOWO37.js";
|
|
11
|
+
export {
|
|
12
|
+
GLB_GENERATOR,
|
|
13
|
+
bodyMaterialName,
|
|
14
|
+
glbNodeName,
|
|
15
|
+
levelNodeName,
|
|
16
|
+
nodeExtras,
|
|
17
|
+
writeGlb
|
|
18
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as _chanmeng666_archlang from '@chanmeng666/archlang';
|
|
2
2
|
import { RWall, Point, JoinedCut, loopsToPolygons, ResolvedPlan, World, Diagnostic } from '@chanmeng666/archlang';
|
|
3
3
|
export { Point } from '@chanmeng666/archlang';
|
|
4
|
-
import {
|
|
5
|
-
export { C as CONTACT_SHADOW, D as DoorKind,
|
|
6
|
-
|
|
7
|
-
export {
|
|
4
|
+
import { c as Scene3D, e as Floor, P as Polygon, M as Mesh3D, f as Pt, d as Shell, R as Ring3, A as Assumption, O as Opening, L as Level, g as Side, h as Stair, i as StairFlight, j as StairLanding, b as MaterialSlot, k as Furniture, l as Fence, G as GroundTint } from './types-BQ7xE4YH.js';
|
|
5
|
+
export { C as CONTACT_SHADOW, D as DoorKind, m as FENCE_PALETTE, n as FINISH_PALETTE, o as FLOOR_FINISHES, p as FLOOR_FINISH_RULES, q as FLOOR_WORD_FINISH, F as FloorFinish, r as GROUND_PLANE, s as GROUND_ROUGHNESS, t as GROUND_SPLITS, u as GROUND_TINT, v as GROUND_WASH, K as KIND_PALETTE, w as KindMaterial, x as MATERIAL_SLOTS, a as MeshNode, y as Meta, N as NodeKind, z as Outdoor, B as PALETTE, E as Provenance, H as Roof, I as SITE_PALETTE, J as STAIR_MATERIAL, Q as STAIR_RAIL_MATERIAL, T as SlotMaterial, U as Source, S as Stage, V as TRIM_MATERIAL, W as Um, X as WALL_CAP_SRGB, Y as Wall, Z as contactBandMm, _ as finishColour, $ as floorFinish, a0 as linearRgb, a1 as siteColour, a2 as slotColour, a3 as slotGroups, a4 as wordFinish } from './types-BQ7xE4YH.js';
|
|
6
|
+
import { h as ReplayNode } from './payload-CKSLN1CG.js';
|
|
7
|
+
export { E as EXPLODE_GAP_MM, F as FIXTURE_FAMILIES, N as NodeState, j as PHASE, R as ReplayEvent, c as ReplayFacts, a as ReplayState, b as ReplayView, k as STOP_LEAD, S as StripItem, l as authoringOrder, m as ease, o as explodeLifts, p as keyFrames, q as stateAt, t as storeysOf, s as stripAt, u as timeline, w as viewLabel, x as viewMesh } from './payload-CKSLN1CG.js';
|
|
8
|
+
export { F as FactsOptions, r as replayFacts } from './facts-DGA14BcU.js';
|
|
9
|
+
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-BqK_JhhV.js';
|
|
8
10
|
|
|
9
11
|
/** A ring of plan points (mm), as `loopsToPolygons` returns it: closed, no repeated vertex. */
|
|
10
12
|
type Ring = Point[];
|
package/dist/index.js
CHANGED
|
@@ -1,110 +1,91 @@
|
|
|
1
1
|
import {
|
|
2
2
|
contactFade,
|
|
3
3
|
contactShadows
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PKFGND2A.js";
|
|
5
5
|
import {
|
|
6
|
+
ARCHLANG_3D_VERSION,
|
|
6
7
|
CORE_POSTS_PER_RUN,
|
|
7
8
|
CORE_POST_PITCH_MM,
|
|
8
9
|
DOOR_POSES,
|
|
9
10
|
FENCE_HEIGHT_MM,
|
|
10
11
|
FENCE_PROFILES,
|
|
11
12
|
FLAT_MM,
|
|
13
|
+
FLOOR_LIFT_UM,
|
|
14
|
+
FLOOR_OVERLAP_MIN_UM2,
|
|
12
15
|
FURNITURE_HEIGHT_MM,
|
|
13
16
|
MAX_FENCE_REPEAT,
|
|
14
17
|
MIN_CORE,
|
|
15
18
|
OPENING_DETAIL,
|
|
16
19
|
OUTDOOR_MM,
|
|
17
20
|
STAIR_DETAIL,
|
|
18
|
-
adaptPlan,
|
|
19
|
-
buildMesh,
|
|
20
|
-
corePostCount,
|
|
21
|
-
fenceColour,
|
|
22
|
-
fencePieces,
|
|
23
|
-
fencePosts,
|
|
24
|
-
fenceRuns,
|
|
25
|
-
groundColour,
|
|
26
|
-
insideOf,
|
|
27
|
-
openLeaf,
|
|
28
|
-
outdoorColour,
|
|
29
|
-
rectsOf,
|
|
30
|
-
slabRegion,
|
|
31
|
-
stairDetail,
|
|
32
|
-
stairRisers,
|
|
33
|
-
stairSolid,
|
|
34
|
-
storeyTrim
|
|
35
|
-
} from "./chunk-CYSES7C3.js";
|
|
36
|
-
import {
|
|
37
|
-
ARCHLANG_3D_VERSION,
|
|
38
|
-
FLOOR_LIFT_UM,
|
|
39
|
-
FLOOR_OVERLAP_MIN_UM2,
|
|
40
21
|
T0_FAMILIES,
|
|
41
22
|
T0_HANDED,
|
|
42
23
|
T0_HEIGHT_MM,
|
|
43
24
|
T0_HUNG_FROM_TOP,
|
|
44
25
|
T0_MATERIALS,
|
|
45
26
|
T0_MOUNT_MM,
|
|
27
|
+
adaptPlan,
|
|
46
28
|
assetFor,
|
|
29
|
+
buildMesh,
|
|
47
30
|
buildScene3D,
|
|
48
31
|
clipToConvex,
|
|
32
|
+
corePostCount,
|
|
49
33
|
cutSector,
|
|
34
|
+
fenceColour,
|
|
35
|
+
fencePieces,
|
|
36
|
+
fencePosts,
|
|
37
|
+
fenceRuns,
|
|
50
38
|
floorLifts,
|
|
51
39
|
floorOverlaps,
|
|
40
|
+
groundColour,
|
|
52
41
|
handedAt,
|
|
53
42
|
insideCut,
|
|
43
|
+
insideOf,
|
|
54
44
|
mixedHeightJoints,
|
|
45
|
+
openLeaf,
|
|
46
|
+
outdoorColour,
|
|
55
47
|
overlapArea,
|
|
56
48
|
partShell,
|
|
57
49
|
piecesOf,
|
|
58
50
|
piecesTouch,
|
|
59
51
|
prism,
|
|
60
|
-
|
|
52
|
+
rectsOf,
|
|
61
53
|
sectionRing,
|
|
62
54
|
sectorBand,
|
|
63
55
|
slab2d,
|
|
56
|
+
slabRegion,
|
|
57
|
+
stairDetail,
|
|
58
|
+
stairRisers,
|
|
59
|
+
stairSolid,
|
|
60
|
+
storeyTrim,
|
|
64
61
|
t0LocalParts,
|
|
65
62
|
t0Shells,
|
|
66
63
|
um,
|
|
67
64
|
umPoint,
|
|
68
|
-
validateScene3D,
|
|
69
65
|
wallOwnership
|
|
70
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-TFXNKG6J.js";
|
|
67
|
+
import "./chunk-ISFIFLC7.js";
|
|
68
|
+
import {
|
|
69
|
+
replayFacts,
|
|
70
|
+
validateScene3D
|
|
71
|
+
} from "./chunk-E65Z5S4K.js";
|
|
71
72
|
import {
|
|
72
|
-
CONTACT_SHADOW,
|
|
73
73
|
ELEVATION_AZIMUTH,
|
|
74
74
|
ELEVATION_RANGE,
|
|
75
75
|
END_AZIMUTH,
|
|
76
76
|
END_FOV,
|
|
77
77
|
EXPLODE_GAP_MM,
|
|
78
|
-
FENCE_PALETTE,
|
|
79
78
|
FILL,
|
|
80
|
-
FINISH_PALETTE,
|
|
81
79
|
FIXTURE_FAMILIES,
|
|
82
|
-
FLOOR_FINISHES,
|
|
83
|
-
FLOOR_FINISH_RULES,
|
|
84
|
-
FLOOR_WORD_FINISH,
|
|
85
|
-
GROUND_PLANE,
|
|
86
|
-
GROUND_ROUGHNESS,
|
|
87
|
-
GROUND_SPLITS,
|
|
88
|
-
GROUND_TINT,
|
|
89
|
-
GROUND_WASH,
|
|
90
|
-
KIND_PALETTE,
|
|
91
|
-
MATERIAL_SLOTS,
|
|
92
|
-
PALETTE,
|
|
93
80
|
PHASE,
|
|
94
81
|
PRESET_NAMES,
|
|
95
|
-
SITE_PALETTE,
|
|
96
|
-
STAIR_MATERIAL,
|
|
97
|
-
STAIR_RAIL_MATERIAL,
|
|
98
82
|
START_FOV,
|
|
99
83
|
STOP_LEAD,
|
|
100
|
-
TRIM_MATERIAL,
|
|
101
|
-
WALL_CAP_SRGB,
|
|
102
84
|
ZOOM,
|
|
103
85
|
authoringOrder,
|
|
104
86
|
boxOfNodes,
|
|
105
87
|
cameraAtStop,
|
|
106
88
|
cameraStops,
|
|
107
|
-
contactBandMm,
|
|
108
89
|
corners,
|
|
109
90
|
coverage,
|
|
110
91
|
distanceLimits,
|
|
@@ -112,19 +93,13 @@ import {
|
|
|
112
93
|
ease,
|
|
113
94
|
endElevation,
|
|
114
95
|
explodeLifts,
|
|
115
|
-
finishColour,
|
|
116
96
|
fitEndCamera,
|
|
117
|
-
floorFinish,
|
|
118
97
|
frameCamera,
|
|
119
98
|
keyFrames,
|
|
120
|
-
linearRgb,
|
|
121
99
|
pivotAbove,
|
|
122
100
|
presetCamera,
|
|
123
101
|
projectBox,
|
|
124
102
|
settledLift,
|
|
125
|
-
siteColour,
|
|
126
|
-
slotColour,
|
|
127
|
-
slotGroups,
|
|
128
103
|
stateAt,
|
|
129
104
|
stopCount,
|
|
130
105
|
storeysOf,
|
|
@@ -133,9 +108,38 @@ import {
|
|
|
133
108
|
targetBounds,
|
|
134
109
|
timeline,
|
|
135
110
|
viewLabel,
|
|
136
|
-
viewMesh
|
|
111
|
+
viewMesh
|
|
112
|
+
} from "./chunk-EL4456GB.js";
|
|
113
|
+
import "./chunk-P2BDEK2Q.js";
|
|
114
|
+
import {
|
|
115
|
+
CONTACT_SHADOW,
|
|
116
|
+
FENCE_PALETTE,
|
|
117
|
+
FINISH_PALETTE,
|
|
118
|
+
FLOOR_FINISHES,
|
|
119
|
+
FLOOR_FINISH_RULES,
|
|
120
|
+
FLOOR_WORD_FINISH,
|
|
121
|
+
GROUND_PLANE,
|
|
122
|
+
GROUND_ROUGHNESS,
|
|
123
|
+
GROUND_SPLITS,
|
|
124
|
+
GROUND_TINT,
|
|
125
|
+
GROUND_WASH,
|
|
126
|
+
KIND_PALETTE,
|
|
127
|
+
MATERIAL_SLOTS,
|
|
128
|
+
PALETTE,
|
|
129
|
+
SITE_PALETTE,
|
|
130
|
+
STAIR_MATERIAL,
|
|
131
|
+
STAIR_RAIL_MATERIAL,
|
|
132
|
+
TRIM_MATERIAL,
|
|
133
|
+
WALL_CAP_SRGB,
|
|
134
|
+
contactBandMm,
|
|
135
|
+
finishColour,
|
|
136
|
+
floorFinish,
|
|
137
|
+
linearRgb,
|
|
138
|
+
siteColour,
|
|
139
|
+
slotColour,
|
|
140
|
+
slotGroups,
|
|
137
141
|
wordFinish
|
|
138
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-ONUOWO37.js";
|
|
139
143
|
export {
|
|
140
144
|
ARCHLANG_3D_VERSION,
|
|
141
145
|
CONTACT_SHADOW,
|
package/dist/node.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { World } from '@chanmeng666/archlang';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export {
|
|
2
|
+
import { M as Mesh3D, c as Scene3D, d as Shell } from './types-BQ7xE4YH.js';
|
|
3
|
+
import { i as ReplayOptions, R as ReplayEvent } from './payload-CKSLN1CG.js';
|
|
4
|
+
export { P as PREVIEW_ABOUT_URL, e as PREVIEW_LABEL, f as PREVIEW_LEAD, g as PREVIEW_LIMITS, c as ReplayFacts, S as StripItem, r as replayPayload, s as stripAt, v as viewBoxOf } from './payload-CKSLN1CG.js';
|
|
5
|
+
export { F as FactsOptions, r as replayFacts } from './facts-DGA14BcU.js';
|
|
6
|
+
import { G as GlbNode } from './glb-BxaVYFWv.js';
|
|
7
|
+
export { a as GLB_GENERATOR, b as bodyMaterialName, g as glbNodeName, l as levelNodeName, n as nodeExtras, r as readGlbNodes, w as writeGlb } from './glb-BxaVYFWv.js';
|
|
5
8
|
|
|
6
9
|
/**
|
|
7
10
|
* A World that reads an `import`ed module relative to `baseDir` (the plan's own directory). It is
|
|
@@ -83,40 +86,6 @@ interface VideoOptions {
|
|
|
83
86
|
/** Render key frames (and, given `mp4`, every frame) of a replay HTML in headless Chromium. */
|
|
84
87
|
declare function renderReplay(o: VideoOptions): Promise<VideoReport>;
|
|
85
88
|
|
|
86
|
-
/** `asset.generator`: the package and its version, never a time (plan §3.7). */
|
|
87
|
-
declare const GLB_GENERATOR: string;
|
|
88
|
-
/**
|
|
89
|
-
* The material a node's untagged (`body`) shells are written in (visual-assets V9): a floor's finish
|
|
90
|
-
* (`floor:<finish>`, from `extras.finish`), a window's frame or glass, a demolished wall's ghost
|
|
91
|
-
* (`wall:demolish`, B3a), else its kind. Each reads the one palette the viewer reads (`materials.ts`).
|
|
92
|
-
*/
|
|
93
|
-
declare function bodyMaterialName(n: MeshNode): string;
|
|
94
|
-
/** The glTF node name of a Mesh3D node: its key without the storey prefix (plan §3.6). */
|
|
95
|
-
declare const glbNodeName: (n: MeshNode) => string;
|
|
96
|
-
/** The storey group node's name. */
|
|
97
|
-
declare const levelNodeName: (level: number) => string;
|
|
98
|
-
/** `extras.archlang` of a Mesh3D node: identity first, then the node's own facts, in a fixed key order. */
|
|
99
|
-
declare function nodeExtras(n: MeshNode): Record<string, string | number | boolean>;
|
|
100
|
-
/** The GLB of `mesh`: same Mesh3D and `generator`, same bytes. */
|
|
101
|
-
declare function writeGlb(mesh: Mesh3D, opts?: {
|
|
102
|
-
generator?: string;
|
|
103
|
-
}): Promise<Uint8Array>;
|
|
104
|
-
/** One node read back from a GLB: its global key (`L<n>/<name>`) and its `extras.archlang`. */
|
|
105
|
-
interface GlbNode {
|
|
106
|
-
key: string;
|
|
107
|
-
name: string;
|
|
108
|
-
extras: Record<string, unknown>;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* The storey groups (each scene's root nodes) and every node below them at any depth, depth first
|
|
112
|
-
* in file order. This module writes element nodes one level under their group only, so a node
|
|
113
|
-
* nested deeper is reported too (and then named and diffed like any other), never skipped.
|
|
114
|
-
*/
|
|
115
|
-
declare function readGlbNodes(glb: Uint8Array): Promise<{
|
|
116
|
-
levels: string[];
|
|
117
|
-
nodes: GlbNode[];
|
|
118
|
-
}>;
|
|
119
|
-
|
|
120
89
|
/**
|
|
121
90
|
* The checks `archlang3d build` and `check` run (archlang-3d plan §8.1), each a named verdict:
|
|
122
91
|
*
|
|
@@ -161,4 +130,4 @@ declare function checkValidator(glb: Uint8Array): Promise<CheckResult>;
|
|
|
161
130
|
/** Every check a GLB alone allows (`archlang3d check model.glb`); given its Mesh3D, the node sets are compared. */
|
|
162
131
|
declare function checkGlb(glb: Uint8Array, mesh?: Mesh3D): Promise<CheckResult[]>;
|
|
163
132
|
|
|
164
|
-
export { type CheckId, type CheckResult,
|
|
133
|
+
export { type CheckId, type CheckResult, GlbNode, type KeyFrame, type ReplayHtmlOptions, type ReplayNotice, ReplayOptions, SWIFTSHADER_ARGS, type VideoOptions, type VideoReport, checkGlb, checkNaming, checkScene, checkShells, checkValidator, glbJson, glbLeaks, makeNodeWorld, openEdges, renderReplay, replayHtml, signedVolume, viewerScript };
|
package/dist/node.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
GLB_GENERATOR,
|
|
3
2
|
SWIFTSHADER_ARGS,
|
|
4
|
-
bodyMaterialName,
|
|
5
3
|
checkGlb,
|
|
6
4
|
checkNaming,
|
|
7
5
|
checkScene,
|
|
@@ -9,21 +7,16 @@ import {
|
|
|
9
7
|
checkValidator,
|
|
10
8
|
glbJson,
|
|
11
9
|
glbLeaks,
|
|
12
|
-
glbNodeName,
|
|
13
|
-
levelNodeName,
|
|
14
10
|
makeNodeWorld,
|
|
15
|
-
nodeExtras,
|
|
16
11
|
openEdges,
|
|
17
|
-
readGlbNodes,
|
|
18
12
|
renderReplay,
|
|
19
13
|
replayHtml,
|
|
20
14
|
signedVolume,
|
|
21
|
-
viewerScript
|
|
22
|
-
|
|
23
|
-
} from "./chunk-WOEJKIXN.js";
|
|
15
|
+
viewerScript
|
|
16
|
+
} from "./chunk-4WHBM4NV.js";
|
|
24
17
|
import {
|
|
25
18
|
replayFacts
|
|
26
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-E65Z5S4K.js";
|
|
27
20
|
import {
|
|
28
21
|
PREVIEW_ABOUT_URL,
|
|
29
22
|
PREVIEW_LABEL,
|
|
@@ -31,10 +24,21 @@ import {
|
|
|
31
24
|
PREVIEW_LIMITS,
|
|
32
25
|
replayPayload,
|
|
33
26
|
viewBoxOf
|
|
34
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-6EAHOIL6.js";
|
|
35
28
|
import {
|
|
36
29
|
stripAt
|
|
37
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-EL4456GB.js";
|
|
31
|
+
import {
|
|
32
|
+
GLB_GENERATOR,
|
|
33
|
+
bodyMaterialName,
|
|
34
|
+
glbNodeName,
|
|
35
|
+
levelNodeName,
|
|
36
|
+
nodeExtras,
|
|
37
|
+
readGlbNodes,
|
|
38
|
+
writeGlb
|
|
39
|
+
} from "./chunk-7FYCBISZ.js";
|
|
40
|
+
import "./chunk-P2BDEK2Q.js";
|
|
41
|
+
import "./chunk-ONUOWO37.js";
|
|
38
42
|
export {
|
|
39
43
|
GLB_GENERATOR,
|
|
40
44
|
PREVIEW_ABOUT_URL,
|