class Adw::SpringParams


Physical parameters of a spring for #SpringAnimation.

Any spring can be described by three parameters: mass, stiffness and damping.

An undamped spring will produce an oscillatory motion which will go on forever.

The frequency and amplitude of the oscillations will be determined by the stiffness (how "strong" the spring is) and its mass (how much "inertia" it has).

If damping is larger than 0, the amplitude of that oscillating motion will exponientally decrease over time. If that damping is strong enough that the spring can't complete a full oscillation, it's called an overdamped spring.

If we the spring can oscillate, it's called an underdamped spring.

The value between these two behaviors is called critical damping; a critically damped spring will comes to rest in the minimum possible time without producing oscillations.

The damping can be replaced by damping ratio, which produces the following springs:

As such

Defined in:



Class Method Summary

Instance Method Summary

Constructor Detail

def : Float64, mass : Float64, stiffness : Float64) : self #

def : Pointer(Void), transfer : GICrystal::Transfer) #

def self.new_full(damping : Float64, mass : Float64, stiffness : Float64) : self #

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.

Instance Method Detail

def damping : Float64 #

def damping_ratio : Float64 #

def finalize #

def mass : Float64 #

def ref : Adw::SpringParams #

def stiffness : Float64 #

def to_unsafe : Pointer(Void) #

def unref : Nil #