@feds01/graphika / core/animation
core/animation
Interfaces
EasingAnimationFn()
Defined in: core/animation.ts:6
Interface representing an easing function for animations.
EasingAnimationFn(t): number;Defined in: core/animation.ts:7
Interface representing an easing function for animations.
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
Type Aliases
Vec2
type Vec2 = {
x: number;
y: number;
};Defined in: core/animation.ts:81
A 2D point for bezier calculations.
Properties
| Property | Type | Defined in |
|---|---|---|
x | number | core/animation.ts:81 |
y | number | core/animation.ts:81 |
Functions
easeInCubic()
function easeInCubic(t): number;Defined in: core/animation.ts:31
Ease-in cubic easing function that starts slowly and accelerates towards the end.
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
easeInOutCubic()
function easeInOutCubic(t): number;Defined in: core/animation.ts:41
Ease-in-out cubic easing function that starts and ends slowly, with a faster middle phase.
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
easeInOutQuad()
function easeInOutQuad(t): number;Defined in: core/animation.ts:26
Ease-in-out quadratic easing function that starts and ends slowly, with a faster middle phase.
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
easeInOutSine()
function easeInOutSine(t): number;Defined in: core/animation.ts:76
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
easeInQuad()
function easeInQuad(t): number;Defined in: core/animation.ts:16
Ease-in quadratic easing function that starts slowly and accelerates towards the end.
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
easeInSine()
function easeInSine(t): number;Defined in: core/animation.ts:68
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
easeOutBounce()
function easeOutBounce(t): number;Defined in: core/animation.ts:46
Ease-out bounce easing function that simulates a bouncing effect at the end of the animation.
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
easeOutCubic()
function easeOutCubic(t): number;Defined in: core/animation.ts:36
Ease-out cubic easing function that starts quickly and decelerates towards the end.
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
easeOutElastic()
function easeOutElastic(t): number;Defined in: core/animation.ts:62
Elastic easing function that creates an oscillating effect, simulating a spring-like motion.
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
easeOutQuad()
function easeOutQuad(t): number;Defined in: core/animation.ts:21
Ease-out quadratic easing function that starts quickly and decelerates towards the end.
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
easeOutSine()
function easeOutSine(t): number;Defined in: core/animation.ts:72
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
lerp()
function lerp(
a,
b,
t): Vec2;Defined in: core/animation.ts:99
Linear interpolation between two points.
Parameters
| Parameter | Type |
|---|---|
a | Vec2 |
b | Vec2 |
t | number |
Returns
linearEasing()
function linearEasing(t): number;Defined in: core/animation.ts:11
Linear easing function that returns the input value as is, resulting in a constant speed animation.
Parameters
| Parameter | Type |
|---|---|
t | number |
Returns
number
splitCubicAt()
function splitCubicAt(
p0,
cp1,
cp2,
p1,
t): PartialCubic;Defined in: core/animation.ts:126
Splits a cubic bezier curve at parameter t and returns the first portion. Uses de Casteljau's algorithm.
Parameters
| Parameter | Type |
|---|---|
p0 | Vec2 |
cp1 | Vec2 |
cp2 | Vec2 |
p1 | Vec2 |
t | number |
Returns
PartialCubic
splitQuadraticAt()
function splitQuadraticAt(
p0,
cp,
p1,
t): PartialQuadratic;Defined in: core/animation.ts:110
Splits a quadratic bezier curve at parameter t and returns the first portion. Uses de Casteljau's algorithm.
Parameters
| Parameter | Type |
|---|---|
p0 | Vec2 |
cp | Vec2 |
p1 | Vec2 |
t | number |
Returns
PartialQuadratic