3D engine that AI agents drive
Merge main
Nguyen Xuan An286bdcbc5f11
diff --cc CHANGELOG.mdindex 222eb02a,51f91fd3..265fd337--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -2,8 -2,9 +2,11 @@@## Unreleased+- Add reflection probes and a `metal-room` reference scene (part of issue #55, which stays open). `bake.probes` ('room' or up to 4 `{ position, radius? }`) traces the room around a point once, prefilters it through `createEnvironmentResources` and lets nearby parts reflect it (specular only, no parallax, not in GLB). Off by default: without a bake the rooms score 0.02 to 0.06 better against Cycles, but with a bake the picture did not change and open scenes score worse. Core growth is 48 bytes gzip (`lit-box`). `npm run reference -- --probes` and `frame-time.mjs` take the new variant.++ - Add the `weighted_normal` and `smooth_by_angle` modifiers as edits and stack nodes (part of issue #42). `smooth_by_angle` marks edges over an angle sharp and the rest smooth, overriding the geometry `smoothAngle`; `weighted_normal` stores an area-weighted normal per corner that the render extraction uses as is. The edge attribute `smooth` is new.+ - Add the `lattice`, `curve`, `hook` and `wave` modifiers as edits and stack nodes (part of issue #42). `lattice` moves up to 64 control points of a grid over the mesh bounds, `curve` bends a mesh along a Catmull-Rom path, `hook` pulls the vertices near a point and `wave` is a travelling ripple that matches Blender 5.2 at the same frame on two cases. Lists are bounded and the errors name the limit.+ - Add the `screw`, `wireframe` and `skin` modifiers as edits and stack nodes (part of issue #42). `screw` revolves the edges of a mesh about an axis with steps, iterations and lift, and `wireframe` leaves a rim on every face with thickness, offset and even offset; both match Blender 5.2 on counts, area and positions (`wireframe` on three cases, `screw` on two). `skin` is a simple version, a closed square tube per edge with a radius per vertex and no branch solver. Sizes are bounded and the errors say what to lower. Details are in `scene_capabilities` `meshModifiers`, and the modifier entry of the mesh tool schemas is now one free record that the backend validates, so the schemas no longer grow with each modifier.- Compare cloth with a Blender cloth bake by picture and find why the drape did not match (part of issue #62, which stays open: soft bodies are not built). `npm run reference -- --cloth` renders a pinned banner in wind (1 and 2 s) and a sheet dropped on a ball (0.5, 1 and 2 s) from 67js and from Blender's cloth modifier in Cycles and EEVEE and scores them with FLIP into `bench/reference/cloth.json`: the banner scores 0.043 against Cycles (EEVEE 0.042) and the drape 0.08 to 0.09 (EEVEE 0.04). The earlier 63 percent drape mismatch was a mirrored vertex order in `scripts/blender-cloth.py` plus Blender's default air damping, which on a 3 g particle is a drag of about 54 per second against 0.3 here. Cloth `damping` now accepts up to 100 per second. With the drag matched, the sheet lands like Blender within 5 percent at 0.5 s; Blender then wrinkles into a bell while this solver hangs smooth panels.- Add walking routes over terrain with holes (part of issue #64; splat layers stay at four, see `docs/terrain.md`). `addons/navmesh` builds a walkable grid from triangles (slope limit, agent radius, holes, obstacle footprints) and `findPath` runs A* with line-of-sight string pulling, deterministic, with cell and search budgets that throw a `RangeError` naming what to raise. `scene_inspect` takes `path: { ground, from, to, avoid, ... }` and returns keyframes for a node translation track, described in `scene_capabilities` `navigation`; the `scene_capabilities` result grew by 624 bytes and the `scene_inspect` schema by one record field. The suite gets `terrain-path-walk` (two holes and a rock) and records `pathQueries`; the `walkPath` check takes several openings and `avoidNodes`. Size: `entry:navmesh` 3,257 B gzip, `agent-scene+lazy` +4.5 KB, core entries unchanged.