@chanmeng666/archlang-3d 0.8.1 → 0.9.1

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 CHANGED
@@ -2,6 +2,42 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.1] - 2026-11-23
6
+
7
+ The core peer range stays `^1.61.0` (`MIN_CORE`): nothing below reads a core export that 1.61.0 lacks.
8
+
9
+ ### Changed
10
+
11
+ - A room whose `room polygon` ring has an arc edge (core 1.68.0, card ARC2) lays its floor finish
12
+ to the curve at the chord tolerance, read from the room's exact `edges` (a public `RRoom` field
13
+ new in core 1.68.0), the way a `room circle`'s floor is cut from its exact circle, where it took
14
+ the core's fixed-step ring. The read is feature-detected: a core without the field carries no arc
15
+ ring, and every other room builds as before.
16
+
17
+ ## [0.9.0] - 2026-11-17
18
+
19
+ The core peer range stays `^1.61.0` (`MIN_CORE`): nothing below reads a core export that 1.61.0 lacks.
20
+
21
+ ### Added
22
+
23
+ - `writeGlb` from a new entry, `@chanmeng666/archlang-3d/glb`, which carries no Node module, so a
24
+ browser can write a plan's GLB bytes (a `Uint8Array`) without Node: the same function and the same
25
+ bytes as `./node`'s `writeGlb` and `archlang3d build`, with `GLB_GENERATOR`, `bodyMaterialName`,
26
+ `glbNodeName`, `levelNodeName` and `nodeExtras`. `./node` still exports all of them, and `.` and
27
+ `./browser` are unchanged, so glTF-Transform reaches neither. The checks (glTF-Validator) stay in
28
+ `./node`. The entry needs no bundler configuration: glTF-Transform (with `property-graph`) is
29
+ now inlined into `dist/` at build, its unused Node reader (a lazy `import("node:fs")`, which
30
+ webpack refuses for a browser target) shaken out, so `./glb` imports no Node module and no other
31
+ package. `./node` and the CLI share that one copy; `@gltf-transform/core` stays a dependency at
32
+ the same exact pin, though `dist/` no longer imports it.
33
+
34
+ ### Fixed
35
+
36
+ - The no-browser path of `view` no longer leaves its scratch directory in the temp folder:
37
+ `renderReplay` now removes it however it ends, including when no browser starts. The removal
38
+ retries a busy directory (seen on Windows), and a failed removal never replaces the render's
39
+ result or its error.
40
+
5
41
  ## [0.8.1] - 2026-11-15
6
42
 
7
43
  The core peer range stays `^1.61.0` (`MIN_CORE`): nothing below reads a core export that 1.61.0 lacks.
package/README.md CHANGED
@@ -86,10 +86,29 @@ if (!result.ok) throw new Error(result.refusal.code); // E3D_PLAN_ERRORS, E3D_NO
86
86
  writeFileSync("plan.glb", await writeGlb(buildMesh(result.scene)));
87
87
  ```
88
88
 
89
+ In a browser, `writeGlb` comes from `./glb` and returns the same bytes, with no file system
90
+ (`./glb` is new in 0.9.0):
91
+
92
+ ```js
93
+ import { adaptPlan, buildMesh } from "@chanmeng666/archlang-3d";
94
+ import { writeGlb } from "@chanmeng666/archlang-3d/glb";
95
+
96
+ const result = adaptPlan(source);
97
+ if (result.ok) {
98
+ const bytes = await writeGlb(buildMesh(result.scene)); // a Uint8Array
99
+ const url = URL.createObjectURL(new Blob([bytes], { type: "model/gltf-binary" }));
100
+ }
101
+ ```
102
+
103
+ The checks `build` runs (glTF-Validator among them) need Node and stay in `./node`. `./glb` needs no
104
+ bundler configuration: glTF-Transform, which writes the GLB, is built into the package with its
105
+ unused Node reader removed, so the entry imports no Node module and no other package.
106
+
89
107
  | Entry | For | Holds |
90
108
  |---|---|---|
91
109
  | `@chanmeng666/archlang-3d` | Node and browsers | `adaptPlan`, Scene3D, `buildMesh`, the replay's timeline |
92
110
  | `@chanmeng666/archlang-3d/browser` | browsers, with three.js | `mountReplay(canvas, payload)`, `replayPayload` |
111
+ | `@chanmeng666/archlang-3d/glb` | Node and browsers (0.9.0 and later) | `writeGlb` (the GLB's bytes) and its node names |
93
112
  | `@chanmeng666/archlang-3d/node` | Node | `makeNodeWorld`, `replayHtml`, `renderReplay`, `writeGlb`, the checks |
94
113
 
95
114
  ## Licence
@@ -8,7 +8,7 @@ The packages below are the package's runtime dependencies, transitively, each so
8
8
  @gltf-transform/core 4.5.1 — MIT
9
9
  https://github.com/donmccurdy/glTF-Transform
10
10
 
11
- LICENSE.md is MIT (Don McCurdy). Original TypeScript; it wraps or ports no other project. One dependency, property-graph (same author).
11
+ LICENSE.md is MIT (Don McCurdy). Original TypeScript; its published dist/index.js bundles parts of gl-matrix 3.4.4 (vec3, mat4; MIT, read 2026-11-17 from the gl-matrix 3.4.4 tarball: Copyright (c) 2015-2025, Brandon Jones, Colin MacKenzie IV, under the same MIT permission notice as below), which this package inlines into dist/ with the library (tsup.config.ts). One dependency, property-graph (same author).
12
12
 
13
13
  The MIT License (MIT)
14
14
 
package/dist/browser.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import { P as PresetName, V as Vec3 } from './camera-BAsRq_eC.js';
2
- import { R as ReplayPayload, S as StripItem } from './payload-DwiB2P7x.js';
3
- export { P as PREVIEW_ABOUT_URL, a as PREVIEW_LABEL, b as PREVIEW_LEAD, c as PREVIEW_LIMITS, d as ReplayFacts, e as ReplayNode, f as ReplayOptions, n as noticeLevelLabel, r as replayPayload, s as stripAt, v as viewBoxOf } from './payload-DwiB2P7x.js';
1
+ import { P as PresetName, V as Vec3 } from './camera-BqK_JhhV.js';
2
+ import { d as ReplayPayload, S as StripItem } from './payload-CKSLN1CG.js';
3
+ export { P as PREVIEW_ABOUT_URL, e as PREVIEW_LABEL, f as PREVIEW_LEAD, g as PREVIEW_LIMITS, c as ReplayFacts, h as ReplayNode, i as ReplayOptions, n as noticeLevelLabel, r as replayPayload, s as stripAt, v as viewBoxOf } from './payload-CKSLN1CG.js';
4
+ import './types-BQ7xE4YH.js';
4
5
  import '@chanmeng666/archlang';
5
6
 
6
7
  interface ReplayHandle {
package/dist/browser.js CHANGED
@@ -4,7 +4,8 @@ import {
4
4
  faceParts,
5
5
  joinedGroups,
6
6
  wallOutline
7
- } from "./chunk-JQTG6BDR.js";
7
+ } from "./chunk-PKFGND2A.js";
8
+ import "./chunk-ISFIFLC7.js";
8
9
  import {
9
10
  PRESET_LABELS,
10
11
  PREVIEW_ABOUT_URL,
@@ -17,35 +18,37 @@ import {
17
18
  replayPayload,
18
19
  viewBoxOf,
19
20
  viewToolbar
20
- } from "./chunk-VMVKI2WQ.js";
21
+ } from "./chunk-6EAHOIL6.js";
21
22
  import {
22
- CONTACT_SHADOW,
23
23
  ELEVATION_RANGE,
24
24
  END_AZIMUTH,
25
25
  END_FOV,
26
- GROUND_PLANE,
27
- KIND_PALETTE,
28
- PALETTE,
29
26
  START_FOV,
30
- WALL_CAP_SRGB,
31
27
  boxOfNodes,
32
28
  cameraPosition,
33
29
  cameraStops,
34
30
  distanceLimits,
35
31
  drawingFrame,
36
- finishColour,
37
32
  frameCamera,
38
33
  pivotAbove,
39
34
  presetCamera,
40
35
  settledLift,
41
- siteColour,
42
- slotColour,
43
36
  stateAt,
44
37
  stopCount,
45
38
  stripAt,
46
39
  takenLens,
47
40
  targetBounds
48
- } from "./chunk-LNIVDMPG.js";
41
+ } from "./chunk-EL4456GB.js";
42
+ import {
43
+ CONTACT_SHADOW,
44
+ GROUND_PLANE,
45
+ KIND_PALETTE,
46
+ PALETTE,
47
+ WALL_CAP_SRGB,
48
+ finishColour,
49
+ siteColour,
50
+ slotColour
51
+ } from "./chunk-ONUOWO37.js";
49
52
 
50
53
  // src/replay/mount.ts
51
54
  import {
@@ -1,4 +1,4 @@
1
- import { a3 as ReplayEvent, a4 as ReplayState } from './payload-DwiB2P7x.js';
1
+ import { R as ReplayEvent, a as ReplayState } from './payload-CKSLN1CG.js';
2
2
 
3
3
  /**
4
4
  * The replay's end camera as plain maths (card A3, look notes round 1): the viewer and the tests