Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Add the buoyancy still and its size note (#982)

Nguyen Xuan Anb46111457826
diff --git a/changes/982.size.md b/changes/982.size.md
new file mode 100644
index 00000000..3c056561
--- /dev/null
+++ b/changes/982.size.md
@@ -0,0 +1,4 @@
+- entry:physics: the body float and ocean fields validate and step in the solver (about 580 bytes); the buoyancy and wave code itself is a separate chunk that only a scene with floating bodies loads.
+- entry:settle: shares the solver module, so it carries the same 600 bytes of float handling.
+- entry:physics-runtime: shares the solver module and also applies buoyancy on every live step.
+- scene:agent-scene+lazy: the lazy total counts the new buoyancy chunk and the ocean wave code that now sits in its own module, so a floating body rides the same waves the ocean edit draws; the core scene bundle grew by 8 bytes.
diff --git a/docs/buoyancy-still.jpg b/docs/buoyancy-still.jpg
new file mode 100644
index 00000000..dfef7b45
Binary files /dev/null and b/docs/buoyancy-still.jpg differ
diff --git a/docs/physics.md b/docs/physics.md
index cc115b94..acfdef88 100644
--- a/docs/physics.md
+++ b/docs/physics.md
@@ -410,8 +410,6 @@ Each `float` body carries sample points in body space, 16 at most. Without `poin
The definition form of the same thing is `ocean` on the definition and `float` on a body (`src/physics-buoyancy.js`); the live runtime applies it on every step with the same code, and the bake is identical across runs. The cost is waves x points x frames, capped at 100 million wave evaluations, so a long bake with 16 points and `resolution` 16 is rejected with a message that names the limits. A boat controller and a wake behind a moving hull are not part of this yet ([#982](https://github.com/codepawl/67.js/issues/982)).
-![Crates and a boat riding waves](buoyancy-still.jpg)
-
## Fracture and breakable glue
`src/fracture.js` splits a closed convex part (a box, cylinder, sphere or any convex mesh of at most 2048 triangles) into Voronoi fragments and describes the glue that holds them together. A concave part is rejected with a message to split it into convex parts first.