orbit
const orbit: (from, to, duration, timing?) => (cam) => CamEffect & (cam, from, to, duration, timing?) => CamEffect;
Variable: orbit
const orbit: (from, to, duration, timing?) => (cam) => CamEffect & (cam, from, to, duration, timing?) => CamEffect;Defined in: packages/motion/src/Camera.ts:430
Like orbitTo, but starting from an explicit azimuth.
Remarks
Stating both ends is what makes a full revolution expressible: orbit(0, Math.PI * 2, …) sweeps all the way around, whereas orbitTo(Math.PI * 2)
from a resting camera would already be at its target and not move.
Param
from
Starting angle in radians.
Param
to
Target angle in radians.
Param
duration
How long, in scene time.
Param
timing
An easing name or function.
Returns
The camera, so animators chain.
Example
One full revolution.
yield* camera.pipe(Camera.orbit(0, Math.PI * 2, "4 seconds"));