PhysicsSystem3D.lazy constructor
PhysicsSystem3D.lazy(
- PhysicsWorld3D create(), {
- ColliderGeometry3D? geometry,
A system that makes its world with create only when the first 3-D
body or character appears. Until then an update costs a structure
check and nothing else, and there is no world at all — no worker
threads, no tables sized for thousands of bodies — so a game whose 3-D
scenes come later (a 2-D menu first) pays nothing for them.
Implementation
PhysicsSystem3D.lazy(
PhysicsWorld3D Function() create, {
ColliderGeometry3D? geometry,
}) : _physics = null,
_create = create,
shapes = ColliderShapes3D(geometry: geometry) {
priority = SystemPriorities.physics;
}