@ff6347/p5-easing • Docs
function easeOutLinear(
time,
start,
end,
duration): number
Linear out easing function
Parameters
Parameter | Type | Description |
---|---|---|
time | number | The current time. |
start | number | The start value. |
end | number | The end in value. |
duration | number | The 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 = easeOutLinear(frameCount % duration, start, end, duration);
const y = frameCount % duration;
circle(x, y, 10);
}