Function: alwaysRotate()
alwaysRotate<
M>(mob,rate,options?):M
Defined in: src/animation/updaters.ts:82
Continuously rotate a mobject at a fixed rate.
Adds a dt-based updater that rotates mob by dt * rate radians each
frame (CE always_rotate).
Type Parameters
M
M extends Mobject
Parameters
mob
M
The mobject to rotate.
rate
number = DEFAULT_ROTATE_RATE
Angle in radians per second. Default 20 * PI / 180.
options?
AxisOrOptions
Optional axis / about-point passed to Mobject.rotate.
Returns
M
mob, for chaining.
Example
alwaysRotate(triangle, 2 * Math.PI); // one full turn per second