Physics · const
DOF_LOCKED
What one degree of freedom does, for JOINT_SIX_DOF.
Explained in Your first game, Rigid bodies.
const DOF_LOCKED = 0import { DOF_LOCKED } from '@driftengine/physics';In depth
Locked is zero so that a zero-filled array is a rigid joint. A joint somebody forgot to describe holds its bodies together rather than letting them fly apart, which is the safe direction for a default nobody chose.
Explicit rather than inferred from the bounds. The widespread convention is that
lower > upper means free and lower === upper means locked, which needs no extra field and
turns a caller who swapped their two numbers into a joint that silently does nothing. A mode is
one byte and it cannot be mistyped into the wrong meaning.