Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Merge remote-tracking branch 'origin/main' into HEAD

Nguyen Xuan An68145ad40951
diff --cc CHANGELOG.md
index 53cb7e15,b98dd117..6dfc32fb
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -2,7 -2,7 +2,8 @@@
## Unreleased
+- Export textures, skeletons and clips to GLB: `exportGlb(parts, { nodes, clips, maxTextureSize })` now writes `map`, `normalMap`, `metallicRoughnessMap`, `occlusionMap` and `emissiveMap` as embedded PNG (limit 2048 px by default, with an error that names the option), skins with joint nodes and inverse bind matrices, and animation clips (translation, rotation and scale tracks; SMOOTH becomes cubic with zero tangents). Pattern materials export their baked textures with box projected UVs, so the picture matches without `uv_unwrap`. It previously threw on skins and on every texture channel. The `entry:core` size budget goes from 67,100 to 70,500 bytes gzip (+3,400)
+ - Make the first frame and the SwiftShader frame cost less, with the same pixels. The main fragment shader now compiles only the features that a scene uses (maps, splat layers, moss, alpha and the special material tags), and a part that needs another feature later recompiles it. All programs, with the environment prefilter, now start together and use `KHR_parallel_shader_compile`. On an RTX 3060 the first frame went from 3.7 to 4.4 seconds down to 0.5 to 1.0 seconds, and a SwiftShader frame costs 0.4 to 0.5 times what it did. `bench/runtime/PROFILE.md` has the profile
- Add `subdivide` as a mesh edit and stack node: Catmull-Clark subdivision to 4 levels with semi-sharp creases picked by an edge rule, sharp boundaries, kept corners, n-gon support, and tags, UVs and edge attributes carried through each level. The size is checked before it allocates. Counts, area and positions match Blender at levels 1 to 3; the `pebble` task joins the agent modeling suite
- Remove `67js/addons/film` from the npm package. It held the 187-second trailer demo with its baked physics recording, 75 KB gzip of the archive. Nothing else in the package used it. To keep using it, copy `src/film.js`, `src/film-rig.js`, `src/film-character.js`, `src/film-physics-definition.js` and `src/film-physics-clip.json` from the repository, or read the trailer on the site at `/film.html`. The archive goes from 901,314 to 829,085 bytes
- 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
diff --cc bench/size/baseline.json
index 3d451328,476f67cf..554bc034
--- a/bench/size/baseline.json
+++ b/bench/size/baseline.json
@@@ -14,9 -14,9 +14,9 @@@
},
"bundles": {
"entry:core": {
- "min": 232549,
- "gzip": 65747,
- "brotli": 56178
- "min": 235430,
- "gzip": 66762,
- "brotli": 57079
++ "min": 248050,
++ "gzip": 71388,
++ "brotli": 60992
},
"entry:model": {
"min": 40093,
diff --cc bench/size/budgets.json
index 10530b77,68016236..7adf6073
--- a/bench/size/budgets.json
+++ b/bench/size/budgets.json
@@@ -5,7 -5,7 +5,7 @@@
"agent-scene": 100000
},
"budgets": {
- "entry:core": 70500,
- "entry:core": 68100,
++ "entry:core": 72900,
"entry:model": 14400,
"entry:nature": 13200,
"entry:motion": 13600,