The node this component is attached to, or null. Written by the
ComponentRegistry alone (§6a); never assign it.
Static ReadonlytypeComponent key (plan D2) and §79 serialization name.
Number of commands accepted by this controller, counting both channels and every explicit cancel.
Monotonic, starts at 0, and changes only through the command API —
never when a command completes on its own. Capture it when you issue a
command and compare later: an unchanged value means your command is still
the one that owns its channel (combine with translationActive /
rotationActive to tell "still running" from "finished").
Whether a rotateTo is currently running. See translationActive.
Whether a moveTo or followPath is currently running.
true from the moment the command is issued until the step that completes
it (inclusive of that step's write); a looping followPath keeps it true
indefinitely. Polled, not announced — see the module note.
Stops both channels. Bumps commandGeneration twice.
Stops the active rotation command where it is. See cancelTranslation.
Stops the active translation command where it is (the node keeps the position it has reached) and bumps commandGeneration. A no-op beyond the counter when the channel is already idle.
Drives the node along trajectory (§13), replacing any active translation
command — path following claims the translation channel, so it cancels
an in-flight moveTo and is cancelled by the next one.
The node is placed at trajectory.samplePosition(t) each step, with t
the seconds of simulation processed since the path started (so the node
jumps onto the path on its first step rather than easing onto it — prefix a
moveTo if you need to approach it). t is clamped to
trajectory.duration, at which point the command completes; with
options.loop it wraps (t % duration) and never completes.
A trajectory whose duration is not a finite positive number — Infinity
for an endless path, and any degenerate 0/negative/NaN value — is
neither clamped nor wrapped: t simply keeps increasing and the command
runs until it is replaced or cancelled. §13 trajectories extrapolate their
closed form outside [0, duration], so that is well defined.
The trajectory is held by reference and must not be mutated while it is
being followed. duration is read every step, so a trajectory that
recomputes its own extent stays honest.
Optionaloptions: PathFollowOptionsMoves the node to position over options.duration seconds, replacing any
active translation command (moveTo or followPath).
position is copied. Interpolation is linear, from the node's position at
the first fixed step after this call to position; the completing step
writes position exactly.
Optionaloptions: MoveOptionsRotates the node to rotation over options.duration seconds, replacing
any active rotation command. Does not touch the translation channel.
rotation is copied and assumed to be a unit quaternion (as everywhere in
@fourjs/math). Interpolation is spherical along the shortest arc (plan
D8 — Quaternion.slerp negates the target when the dot product is
negative), from the node's rotation at the first fixed step after this call;
the completing step writes rotation's components exactly, so the node
finishes on the quaternion you asked for rather than on its antipode.
Optionaloptions: RotateOptionsAdvances both channels by deltaSeconds and writes the results into
transform.
Called by KinematicSystem once per fixed step. Calling it directly is supported (a controller driven without a system, or a unit test), but it performs no §42 authority check — that belongs to the system, which knows the node; this method only knows a transform.
An idle channel costs one comparison and writes nothing, so a controller
with no active command never bumps Transform.version.
Prescribed kinematic motion attached to a node (§12), advanced by KinematicSystem.
A component per plan D2: a class with a
static readonly typeName, one per node, holding no reference to its node (hostis assigned by the registry). All behaviour is in KinematicController.step, which the system calls once per fixed step.See the module documentation for the channel model, the lazy start-pose capture, completion semantics, and the §42 authority rules.