OptionalcustomOnly consulted when projection.mode === "custom" -- required in that case (the constructor
throws otherwise), ignored for "flat-plane". Not serialized by WorldWriter: a closure
can't round-trip through glTF, so a "custom" scene is loadable but not re-saveable with its
original projection intact (see StageProjection's own doc comment).
OptionalfacingConstant radians added to every computed facing angle, to re-center this behavior's
"0 = facing -Z (the engine's forward convention, and directly toward the camera when the
scene's camera looks down -Z)" assumption onto whichever direction a specific character
asset's neutral pose (rotation.y = 0) actually faces. Mixamo/FBX-derived rigs frequently
don't face -Z at rest -- e.g. the flakturm-tunnel scene's rig faces along local X instead,
needing Math.PI / 2 here, confirmed by directly forcing rotation.y through 0/±90/180 and
observing which one actually shows the character's front. Defaults to 0 (no correction
needed) for a rig that IS authored facing -Z.
Input interface to query keys.
OptionalonCallback fired when character transitions between locomotion states.
OptionalonCallback fired when character moves into a different stage zone.
Declarative stage-space-to-world mapping -- see StageProjection. Deliberately NOT a camera
unprojection -- a simple, fixed, artist-tunable formula (e.g. linear), so dragging zone
points on screen never risks the numerical blowup a real perspective inverse has near the
camera's horizon.
OptionalrotationRotation smoothing speed in radians per second (default: 10.0).
OptionalrunSpeed multiplier when holding Shift to run (default: 2.0).
OptionalspeedMovement speed in normalized stage-space (u, v) units per second (default: 0.15).
OptionalstartOptionalstartExtra radians added only to the INITIAL facing angle (on top of startFacing/facingOffset),
never to angles computed from movement. Purely cosmetic: a startFacing that lands the
character's stance exactly in line with a fixed, non-orbitable camera (e.g. dead-on from
behind) can make one leg fully self-occlude the other in the idle pose -- correct geometry,
but a jarring first impression since a fixed camera never lets the player see past it. A few
degrees of nudge breaks that exact alignment without otherwise changing the intended starting
orientation. Defaults to 0 (no nudge).
OptionalstartStarting stage-space position (default: { u: 0.5, v: 0.5 }).
OptionalzonesWalkable stage zones defining the navigation mesh, in normalized (u, v) space.
Configuration options for StageMovementBehavior.