Function: applyMatrixLive()
applyMatrixLive(
target,matrix,options):LiveMatrixBinding
Defined in: src/interaction/DynamicMatrix.ts:280
Bind a mobject to a live 2x2 matrix so it morphs continuously.
Every VMobject leaf in target's family is snapshotted at bind time. An
updater is added to target; each frame it re-maps every snapshotted point
by the current matrix (about aboutPoint) and moves any dependent points.
Because the re-map always starts from the snapshot, the transform is absolute
and free of per-frame drift — a collapsed (singular) matrix is just a flat
grid, with full recovery on the next frame.
The one-shot applyMatrix is untouched; this is the additive live mode.
Parameters
target
The grid/plane/mobject to morph (e.g. a NumberPlane).
matrix
The driving matrix, getter, or MatrixTracker.
options
DynamicMatrixOptions = {}
Pivot, dependent points and an onChange render hook.
Returns
A LiveMatrixBinding controlling the binding.
Example
const tracker = MatrixTracker.fromBasisVectors(iPoint, jPoint);
applyMatrixLive(plane, tracker, {
dependents: [{ mobject: vector, base: [2, 1, 0] }],
onChange: () => scene.render(),
});