Opt-in Physics & Node Lifecycle Hooks
Breaking
- Physics is now opt-in via the `physics` build tag (previously opt-out via `nophysics`).
- Build with `-tags physics` to compile the Chipmunk-backed implementation; default builds exclude physics and the `jakecoffman/cp/v2` dependency entirely.
- Without the tag, physics verbs (`EnablePhysics`, `SetBody`, `SetBodyEnabled`, `StepPhysics`) panic with a message telling you to rebuild with `-tags physics`; per-frame engine hooks remain safe no-ops, so a default build with no physics usage is unchanged.
- Migration: add `-tags physics` to your build/test/run commands, and to your editor (gopls `buildFlags: ["-tags=physics"]`).
Added
- Node lifecycle hooks: `OnReady`, `OnEnter`, `OnExit` — fields you assign a func to, like `OnUpdate`.
- `OnReady` fires once, the first time the node enters the live scene tree.
- `OnEnter` fires each time the node enters the live tree (including being re-added after removal); `OnExit` fires each time it leaves.
- Enter is top-down (a parent before its children); exit is bottom-up. Re-parenting within the same scene does not re-fire.
- `Color32` is now exported (`type Color32 = render.Color32`) so custom-paint code can construct `RenderCommand`s against the public API.