Package Exports
- tsl-easings
Readme
TSL Easings
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
Installation
npm install tsl-easingsUsage
import { easeInOutCubic, easeOutQuad } from 'tsl-easings';
// Use in your TSL code context
let easedValue = easeInOutCubic(value);Available Easing Functions
Linear
easeLinear
Quadratic
easeInQuadeaseOutQuadeaseInOutQuad
Cubic
easeInCubiceaseOutCubiceaseInOutCubic
Quartic
easeInQuarteaseOutQuarteaseInOutQuart
Quintic
easeInQuinteaseOutQuinteaseInOutQuint
Sine
easeInSineeaseOutSineeaseInOutSine
Exponential
easeInExpoeaseOutExpoeaseInOutExpo
Circular
easeInCirculareaseOutCirculareaseInOutCircular
Back
easeInBackeaseOutBackeaseInOutBack
Elastic
easeInElasticeaseOutElasticeaseInOutElastic
Bounce
easeInBounceeaseOutBounceeaseInOutBounce
API
Each easing function takes a single parameter t which should be a value between 0 and 1, and returns an eased value.
License
MIT © Yuri Artiukh