lustre/ui/tween

Types

The type of easing function to use.

pub type Function {
  Linear
  Sine(Kind)
  Quadratic(Kind)
  Cubic(Kind)
  Quartic(Kind)
  Quintic(Kind)
  Exponential(Kind)
  Circular(Kind)
  Elastic(Kind)
  Back(Kind)
  Bounce(Kind)
}

Constructors

  • Linear
  • Sine(Kind)
  • Quadratic(Kind)
  • Cubic(Kind)
  • Quartic(Kind)
  • Quintic(Kind)
  • Exponential(Kind)
  • Circular(Kind)
  • Elastic(Kind)
  • Back(Kind)
  • Bounce(Kind)
pub type Kind {
  In
  Out
  InOut
}

Constructors

  • In
  • Out
  • InOut

Functions

pub fn back(
  at: Float,
  from: Float,
  to: Float,
  kind: Kind,
) -> Float
pub fn bounce(
  at: Float,
  from: Float,
  to: Float,
  kind: Kind,
) -> Float
pub fn circular(
  at: Float,
  from: Float,
  to: Float,
  kind: Kind,
) -> Float
pub fn cubic(
  at: Float,
  from: Float,
  to: Float,
  kind: Kind,
) -> Float
pub fn elastic(
  at: Float,
  from: Float,
  to: Float,
  kind: Kind,
) -> Float
pub fn exponential(
  at: Float,
  from: Float,
  to: Float,
  kind: Kind,
) -> Float
pub fn from_string(function: String) -> Result(Function, Nil)
pub fn linear(at: Float, from: Float, to: Float) -> Float
pub fn quadratic(
  at: Float,
  from: Float,
  to: Float,
  kind: Kind,
) -> Float
pub fn quartic(
  at: Float,
  from: Float,
  to: Float,
  kind: Kind,
) -> Float
pub fn quintic(
  at: Float,
  from: Float,
  to: Float,
  kind: Kind,
) -> Float
pub fn sine(
  at: Float,
  from: Float,
  to: Float,
  kind: Kind,
) -> Float
pub fn to_string(function: Function) -> String
pub fn tween(
  at: Float,
  from: Float,
  to: Float,
  using: Function,
) -> Float
Search Document