avbd-babylon 0.4.0 → 0.4.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/README.md +17 -6
- package/dist/avbd.global.js +182 -109
- package/dist/avbd.js +182 -109
- package/dist/nativeScenes.d.ts +4 -2
- package/docs/BABYLON_API.md +16 -2
- package/package.json +2 -1
- package/tests/README.md +9 -1
package/README.md
CHANGED
|
@@ -78,6 +78,7 @@ JavaScript examples. Run `npm start`, then open the
|
|
|
78
78
|
| Batched body edits, pose reads and queries | [Bulk-edit examples](#bulk-edits-and-gpu-dispatches), [measurement code](tests/native-edit-performance.js), [runner](scripts/check-native-performance.mjs) |
|
|
79
79
|
| CPU compatibility versus WebGPU | [Settings and results](#backend-differences-and-benchmarks), [measurement code](tests/compatibility-performance.js), [runner](scripts/benchmark-backends.mjs) |
|
|
80
80
|
| Sleeping and waking in large connected scenes | [Sleeping example](#queries-callbacks-and-sleeping), [connected-wall runner](scripts/benchmark-connected-sleep.mjs) |
|
|
81
|
+
| Sleeping stability while grabbing and settling | [28K ring check](scripts/check-sleep-stability.mjs), [jointed-drop timing and view check](scripts/check-jointed-settling.mjs), [saved jointed-drop results](test-results/jointed-settling.json) |
|
|
81
82
|
| Ships, buoyancy and water | [Scene explanation](#ships-water-and-destruction), [scene builder](demo/naval/scene.js), [runner](scripts/benchmark-naval.mjs) |
|
|
82
83
|
| Grid versus HPLOC++ collisions | [Collision guide](docs/HPLOC.md), [paired scene measurements](tests/performance.js), [tree refit runner](scripts/benchmark-hploc-refit.mjs) |
|
|
83
84
|
| D20 particle collisions | [Capacity benchmark](#d20-particle-capacity), [runner](scripts/benchmark-particles.mjs), [reusable GPU particles](src/gpu/surfaceParticles.js), [collision shader](src/gpu/surfaceParticles.wgsl) |
|
|
@@ -110,6 +111,8 @@ disabled collision groups are excluded from the initial contact-capacity estimat
|
|
|
110
111
|
The [startup check](scripts/check-demo-startup.mjs) initializes every demo in a
|
|
111
112
|
paused worker with `--all` and records setup times separately from simulation
|
|
112
113
|
performance. Shader caches, device checks and scene size affect those times.
|
|
114
|
+
The scene view shows loading messages during setup, even with its performance
|
|
115
|
+
panel collapsed. Worker startup reports also list the time spent in each setup phase.
|
|
113
116
|
|
|
114
117
|
## Install
|
|
115
118
|
|
|
@@ -217,8 +220,8 @@ portable 2D/3D APIs and a Babylon integration:
|
|
|
217
220
|
step/sleep/bounce settings and skips repeated buffer bindings within a compute
|
|
218
221
|
pass.
|
|
219
222
|
- **Sleeping and live editing.** Per-body sleep permission, support checks and
|
|
220
|
-
impact checks allow resting objects to sleep and wake again. Large
|
|
221
|
-
3D worlds
|
|
223
|
+
impact checks allow resting objects to sleep and wake again. Large desktop
|
|
224
|
+
3D worlds track connected groups so impacts can wake a wall
|
|
222
225
|
without waking unrelated walls on the same floor. Velocities,
|
|
223
226
|
impulses, teleports, filters and motor targets can change during simulation.
|
|
224
227
|
Welds capture their rest rotation from live GPU poses, and released
|
|
@@ -2202,11 +2205,12 @@ console.log(await physics.readSleepStats());
|
|
|
2202
2205
|
```
|
|
2203
2206
|
|
|
2204
2207
|
Impulses, teleports, constraint edits, new bodies and removed supports wake the
|
|
2205
|
-
world.
|
|
2208
|
+
world. Desktop WebGPU worlds with at least 4,096 bodies automatically track connected
|
|
2206
2209
|
groups, so an impact wakes the touched group while unrelated piles stay asleep.
|
|
2207
|
-
The static floor does not connect separate piles.
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
+
The static floor does not connect separate piles. Contact and joint connections
|
|
2211
|
+
let eligible members settle together. Awake groups rebuild their connections
|
|
2212
|
+
each step so separated debris can settle independently. Sleeping groups retain
|
|
2213
|
+
their support history. Moving a grab anchor wakes the held body. Smaller worlds and mobile compatibility paths use
|
|
2210
2214
|
whole-world impact waking. Set `sleeping: { islands: true }` to opt into connected
|
|
2211
2215
|
groups in a smaller 3D world, or `islands: false` to use whole-world waking. Under
|
|
2212
2216
|
gravity, unsupported slow-moving bodies stay awake; supports extend upward
|
|
@@ -2217,6 +2221,13 @@ world makes bodies eligible by default; `allowSleep:false` excludes a body.
|
|
|
2217
2221
|
Paper comparisons keep sleeping disabled. Portable 3D solvers accept these
|
|
2218
2222
|
same world and initial-body options.
|
|
2219
2223
|
|
|
2224
|
+
For stacks assembled at rest, native 3D solvers accept
|
|
2225
|
+
`world.createSolver(device, { sleeping: { islands: true, startAsleep: true } })`.
|
|
2226
|
+
Initialization takes one physics step to validate contacts, then sleeps stationary
|
|
2227
|
+
groups connected to stationary solid support. Floating, moving and sleep-excluded
|
|
2228
|
+
groups stay awake. The interactive half-million walls use this option; benchmark
|
|
2229
|
+
comparisons with the paper disable sleeping.
|
|
2230
|
+
|
|
2220
2231
|
Small jointless 3D worlds with up to 32 bodies also batch all movement iterations
|
|
2221
2232
|
into one GPU workgroup. Body poses stay in shared memory; contacts remain in GPU
|
|
2222
2233
|
storage. The equations, contact order, lane reductions and iteration count stay
|