A collection of Robert Penner's easing functions implemented in TSL (Three.js Shader Language) for use with Three.js, WebGL, and WebGPU.
Read more about TSL here
npm install tsl-easingsimport { easeInOutCubic, easeOutQuad } from 'tsl-easings';
// Use in your TSL code context
let easedValue = easeInOutCubic(value);easeLinear
easeInQuadeaseOutQuadeaseInOutQuad
easeInCubiceaseOutCubiceaseInOutCubic
easeInQuarteaseOutQuarteaseInOutQuart
easeInQuinteaseOutQuinteaseInOutQuint
easeInSineeaseOutSineeaseInOutSine
easeInExpoeaseOutExpoeaseInOutExpo
easeInCirculareaseOutCirculareaseInOutCircular
easeInBackeaseOutBackeaseInOutBack
easeInElasticeaseOutElasticeaseInOutElastic
easeInBounceeaseOutBounceeaseInOutBounce
Each easing function takes a single parameter t which should be a value between 0 and 1, and returns an eased value.
MIT © Yuri Artiukh