easings #
Easing Functions
This is a pure V module that provides easing functions calculation.
Usage
Use the animate function to apply an easing function over a range of numbers
module main
import vsl.easings
println(easings.animate(easings.bounce_ease_out, 0, 100, 100))
Credits
Based on the works of:
fn animate #
fn animate(easing EasingFn, from f64, to f64, frames int) []f64
animate exposes this operation as part of the public API.
fn back_ease_in #
fn back_ease_in(p f64) f64
back_ease_in exposes this operation as part of the public API.
fn back_ease_in_out #
fn back_ease_in_out(p f64) f64
back_ease_in_out exposes this operation as part of the public API.
fn back_ease_out #
fn back_ease_out(p f64) f64
back_ease_out exposes this operation as part of the public API.
fn bounce_ease_in #
fn bounce_ease_in(p f64) f64
bounce_ease_in exposes this operation as part of the public API.
fn bounce_ease_in_out #
fn bounce_ease_in_out(p f64) f64
bounce_ease_in_out exposes this operation as part of the public API.
fn bounce_ease_out #
fn bounce_ease_out(p f64) f64
bounce_ease_out exposes this operation as part of the public API.
fn circular_ease_in #
fn circular_ease_in(p f64) f64
circular_ease_in exposes this operation as part of the public API.
fn circular_ease_in_out #
fn circular_ease_in_out(p f64) f64
circular_ease_in_out exposes this operation as part of the public API.
fn circular_ease_out #
fn circular_ease_out(p f64) f64
circular_ease_out exposes this operation as part of the public API.
fn cubic_ease_in #
fn cubic_ease_in(p f64) f64
cubic_ease_in exposes this operation as part of the public API.
fn cubic_ease_in_out #
fn cubic_ease_in_out(p f64) f64
cubic_ease_in_out exposes this operation as part of the public API.
fn cubic_ease_out #
fn cubic_ease_out(p f64) f64
cubic_ease_out exposes this operation as part of the public API.
fn elastic_ease_in #
fn elastic_ease_in(p f64) f64
elastic_ease_in exposes this operation as part of the public API.
fn elastic_ease_in_out #
fn elastic_ease_in_out(p f64) f64
elastic_ease_in_out exposes this operation as part of the public API.
fn elastic_ease_out #
fn elastic_ease_out(p f64) f64
elastic_ease_out exposes this operation as part of the public API.
fn exponential_ease_in #
fn exponential_ease_in(p f64) f64
exponential_ease_in exposes this operation as part of the public API.
fn exponential_ease_in_out #
fn exponential_ease_in_out(p f64) f64
exponential_ease_in_out exposes this operation as part of the public API.
fn exponential_ease_out #
fn exponential_ease_out(p f64) f64
exponential_ease_out exposes this operation as part of the public API.
fn linear_interpolation #
fn linear_interpolation(p f64) f64
linear_interpolation exposes this operation as part of the public API.
fn quadratic_ease_in #
fn quadratic_ease_in(p f64) f64
quadratic_ease_in exposes this operation as part of the public API.
fn quadratic_ease_in_out #
fn quadratic_ease_in_out(p f64) f64
quadratic_ease_in_out exposes this operation as part of the public API.
fn quadratic_ease_out #
fn quadratic_ease_out(p f64) f64
quadratic_ease_out exposes this operation as part of the public API.
fn quartic_ease_in #
fn quartic_ease_in(p f64) f64
quartic_ease_in exposes this operation as part of the public API.
fn quartic_ease_in_out #
fn quartic_ease_in_out(p f64) f64
quartic_ease_in_out exposes this operation as part of the public API.
fn quartic_ease_out #
fn quartic_ease_out(p f64) f64
quartic_ease_out exposes this operation as part of the public API.
fn quintic_ease_in #
fn quintic_ease_in(p f64) f64
quintic_ease_in exposes this operation as part of the public API.
fn quintic_ease_in_out #
fn quintic_ease_in_out(p f64) f64
quintic_ease_in_out exposes this operation as part of the public API.
fn quintic_ease_out #
fn quintic_ease_out(p f64) f64
quintic_ease_out exposes this operation as part of the public API.
fn sine_ease_in #
fn sine_ease_in(p f64) f64
sine_ease_in exposes this operation as part of the public API.
fn sine_ease_in_out #
fn sine_ease_in_out(p f64) f64
sine_ease_in_out exposes this operation as part of the public API.
fn sine_ease_out #
fn sine_ease_out(p f64) f64
sine_ease_out exposes this operation as part of the public API.
type EasingFn #
type EasingFn = fn (x f64) f64
EasingFn defines a public type used by this module.
- README
- fn animate
- fn back_ease_in
- fn back_ease_in_out
- fn back_ease_out
- fn bounce_ease_in
- fn bounce_ease_in_out
- fn bounce_ease_out
- fn circular_ease_in
- fn circular_ease_in_out
- fn circular_ease_out
- fn cubic_ease_in
- fn cubic_ease_in_out
- fn cubic_ease_out
- fn elastic_ease_in
- fn elastic_ease_in_out
- fn elastic_ease_out
- fn exponential_ease_in
- fn exponential_ease_in_out
- fn exponential_ease_out
- fn linear_interpolation
- fn quadratic_ease_in
- fn quadratic_ease_in_out
- fn quadratic_ease_out
- fn quartic_ease_in
- fn quartic_ease_in_out
- fn quartic_ease_out
- fn quintic_ease_in
- fn quintic_ease_in_out
- fn quintic_ease_out
- fn sine_ease_in
- fn sine_ease_in_out
- fn sine_ease_out
- type EasingFn