@ff6347/p5-easingDocs


function easeOutExpo(
   time, 
   start, 
   end, 
   duration): number

Expo out easing function

Parameters

ParameterTypeDescription
timenumberThe current time.
startnumberThe start value.
endnumberThe end in value.
durationnumberThe duration of the animation.

Returns

number

The calculated value at the current time.

Example

const start = 0;
const end = 100;
const duration = 100;
function setup() {
 createCanvas(end, end);
}
function draw() {
background(255, 10);
const x = easeOutExpo(frameCount % duration, start, end, duration);
const y = frameCount % duration;
circle(x, y, 10);
}

Defined in

../src/easing/expo.ts:61