@ff6347/p5-easing • Docs
function easeInOutQuart(
time,
start,
end,
duration): number
Quart in-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 = easeInOutQuart(frameCount % duration, start, end, duration);
const y = frameCount % duration;
circle(x, y, 10);
}