:right-sidebar: True SpringParams =================================================================== .. currentmodule:: gi.repository.Adw .. class:: SpringParams(**kwargs) :no-contents-entry: :Constructors: :: new(damping_ratio:float, mass:float, stiffness:float) -> Adw.SpringParams new_full(damping:float, mass:float, stiffness:float) -> Adw.SpringParams Constructors ------------ .. rst-class:: interim-class .. class:: SpringParams :no-index: .. classmethod:: new(damping_ratio: float, mass: float, stiffness: float) -> ~gi.repository.Adw.SpringParams Creates a new ``AdwSpringParams`` from ``mass``, ``stiffness`` and ``damping_ratio``. The damping value is calculated from ``damping_ratio`` and the other two parameters. * If ``damping_ratio`` is 0, the spring will not be damped and will oscillate endlessly. * If ``damping_ratio`` is between 0 and 1, the spring is underdamped and will always overshoot. * If ``damping_ratio`` is 1, the spring is critically damped and will reach its resting position the quickest way possible. * If ``damping_ratio`` is larger than 1, the spring is overdamped and will reach its resting position faster than it can complete an oscillation. :obj:`~gi.repository.SpringParams.new_full` allows to pass a raw damping value instead. :param damping_ratio: the damping ratio of the spring :param mass: the mass of the spring :param stiffness: the stiffness of the spring .. classmethod:: new_full(damping: float, mass: float, stiffness: float) -> ~gi.repository.Adw.SpringParams Creates a new ``AdwSpringParams`` from ``mass``, ``stiffness`` and ``damping``. See :obj:`~gi.repository.SpringParams.new` for a simplified constructor using damping ratio instead of ``damping``. :param damping: the damping of the spring :param mass: the mass of the spring :param stiffness: the stiffness of the spring Methods ------- .. rst-class:: interim-class .. class:: SpringParams :no-index: .. method:: get_damping() -> float Gets the damping of ``self``. .. method:: get_damping_ratio() -> float Gets the damping ratio of ``self``. .. method:: get_mass() -> float Gets the mass of ``self``. .. method:: get_stiffness() -> float Gets the stiffness of ``self``.