Skip to content
pixi-silk
GitHub repository
Type

Easing

import type { Easing } from 'pixi-silk';
type Easing = "linear" | "smooth" | ((t: number) => number);

How the ramp moves between stops.

  • linear: piecewise linear between stops (CSS behaviour).
  • smooth: monotone cubic spline through the stops with eased ends. Removes the Mach bands you see at every stop of a linear ramp and never overshoots.
  • a function remaps the gradient parameter 0..1 before lookup, for example an easing curve for scrims. Reuse one function instance: each new function bakes a new atlas row.