Parameters
Name | Type | Description |
---|---|---|
t | f32 | Input parameter (0-1). |
power | f32 | Easing power (higher = more pronounced curve). |
Returns
f32value.
WGSL Code
fn easeOut(t: f32, power: f32) -> f32 {return 1.0 - pow(1.0 - clamp(t, 0.0, 1.0), power);}
Name | Type | Description |
---|---|---|
t | f32 | Input parameter (0-1). |
power | f32 | Easing power (higher = more pronounced curve). |
fn easeOut(t: f32, power: f32) -> f32 {return 1.0 - pow(1.0 - clamp(t, 0.0, 1.0), power);}
a cubic Bezier curve and returns both value and derivative.
ease-in function for smooth acceleration.
ease-in-out function for smooth acceleration and deceleration.
ease-in function with oscillating motion.
ease-out function with oscillating motion.
ease-in function that overshoots before settling.
ease-out function that overshoots before settling.
spring animation with configurable parameters.
A JavaScript library providing WGSL utility functions as strings for WebGPU shader development. Includes mathematical utilities, noise generation, signed distance fields, and color manipulation functions.
npm install wgsl-fns
import { easeOut, getFns } from 'wgsl-fns'
getFns(['easeOut'])