Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Update notices, docs and changelog for query without three.js

Nguyen Xuan Ana92206e85b27
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cad289ad..7ff8b917 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
- Load glTF without Three.js: the addon has its own GLB and glTF parser, node sampler and animation clips, so a box with the addon drops from 159,422 to 67,467 bytes gzip. Draco, meshopt and KTX2 still come from the decoders you pass in `options.decoders`. Only the default scene is decoded, and a node outside it is decoded only when a skin or an animation names it
- Remove three.js from modeling and the agent scene: `lathe`, `extrude` and `tube` no longer import it, and `scene:agent-scene` drops from 185,681 to 117,290 bytes gzip. `lathe` and `tube` output is identical to before, vertex for vertex. `extrude` walls, bevels, UVs, normals and bounds are identical, and volume matches within 1e-4. Extrusion caps use a new ear-clipping triangulation, so a cap can split along other diagonals, and a cap with collinear points can add or drop a seam vertex. A clockwise hole under a clockwise contour is now flipped to face outward, where it used to keep inward walls
+- Remove three.js and three-mesh-bvh from mesh queries, shrinkwrap and surface patches: a typed-array BVH and its own triangle tests replace them, so no source file in `src/` except the benchmark page imports three.js and the npm archive drops from 856,115 to 798,532 bytes. `entry:mesh-query` drops from 85,555 to 15,535 bytes gzip, `entry:shrinkwrap` from 86,779 to 17,860 and `entry:surface` from 72,974 to 9,838. Nearest, project, raycast and pair results match three-mesh-bvh on fixtures and random queries. Nearest queries on 100k triangles are about 20 percent slower and a pair query with one mesh shifted against itself is slower (21 ms against 2 ms), while a closed-solid pair is 2.4 times faster. The surface patch clipper follows DecalGeometry and keeps its triangle order
- Update the bundled `zod` to 4.6.7, which fixes a memory exhaustion advisory in the validation of oversized collections
- Make the MCP preview server reject requests with another Host header, which closes DNS rebinding
- Check the size of a mesh `array` before it allocates. Before this, the check ran after the copies existed
diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md
index 2b80d3b5..be64a19b 100644
--- a/THIRD-PARTY-NOTICES.md
+++ b/THIRD-PARTY-NOTICES.md
@@ -20,29 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-## three-mesh-bvh 0.9.16 (optional mesh query addon)
-
-MIT License
-
-Copyright (c) 2018 Garrett Johnson
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+The notice above covers the decal clipping in the surface addon, which follows three.js DecalGeometry.
## highlight.js 11.12.0 (website syntax highlighting)
diff --git a/docs/mesh-query.md b/docs/mesh-query.md
index 8b049f24..1b767f04 100644
--- a/docs/mesh-query.md
+++ b/docs/mesh-query.md
@@ -153,9 +153,8 @@ The explicit design gives the caller control over rebuilds, disposal, budgets, a
It avoids hidden invalidation rules and prevents source edits from changing a query midway through evaluation.
Fresh results also avoid partially updated output objects after validation fails.
-The implementation reuses maintained triangle intersection, BVH traversal, and ray methods from [three-mesh-bvh 0.9.16](https://github.com/gkjohnson/three-mesh-bvh/releases/tag/v0.9.16).
-The library documents local coordinate frames, indirect indices, and query methods in its [API reference](https://github.com/gkjohnson/three-mesh-bvh/blob/v0.9.16/API.md).
-It does not supply the closed-manifold validation and containment contract described here.
-Those checks remain part of this module.
+The index is a typed-array BVH (`src/triangle-bvh.js`) with its own triangle tests (`src/triangle-math.js`), and imports neither Three.js nor three-mesh-bvh.
+It returned the same hits, distances and pair results as three-mesh-bvh 0.9.16 on the test fixtures and on random queries.
+Closed-manifold validation and the containment contract described here are part of this module.
These APIs are available in the current source build. The published npm version can lag behind it.
diff --git a/docs/parity.md b/docs/parity.md
index 55669266..bc84068b 100644
--- a/docs/parity.md
+++ b/docs/parity.md
@@ -237,7 +237,7 @@ The goal also needs this work, and no page in the Blender manual covers it.
| Work | Status | Why | Issues |
| --- | --- | --- | --- |
| Parity evidence | partial | This ledger exists. The Blender comparisons do not. | #24, #25, #26 |
-| Bundle size | partial | `npm run size` checks a budget for each entry, and the package has a 1 MiB limit. three.js is gone from the glTF path and still in the modeling paths. | #27, #33, #34, #35, #36 |
+| Bundle size | partial | `npm run size` checks a budget for each entry, and the package has a 1 MiB limit. three.js is gone from the library; only the benchmark page imports it. | #27, #33, #34, #35, #36 |
| Runtime speed | partial | `bench/runtime` compares 7 scenes, and three.js wins most of them. There is no culling, LOD selection or adaptive quality, and bakes run on the main thread. | #28, #37, #38, #74 |
| Agent measurement | partial | A task suite runs on one model and reads recipes only. | #29, #30, #31, #69 |
| Pull request checks | partial | The `Test` workflow reports a status and does not block a merge. | #32 |
diff --git a/docs/surface.md b/docs/surface.md
index 4b8542b0..1411120e 100644
--- a/docs/surface.md
+++ b/docs/surface.md
@@ -1,6 +1,6 @@
# Fit a patch to a curved surface
-Available from version `0.4.0`. The optional addon reuses Three.js DecalGeometry without adding it to the core renderer.
+Available from version `0.4.0`. The optional addon has its own decal clipper, which follows Three.js DecalGeometry, and imports no Three.js code.
```js
import { sphere } from '@codepawlhq/67js';