Loading...
Searching...
No Matches
SpringEasingOptions Class Reference

A selection of options available for customising a spring style easing function. More...

#include <juce_Easings.h>

Public Member Functions

auto withFrequency (float newFrequency) const
 Specifies the number of oscillations the easing would undergo.
 
auto withAttenuation (float newAttenuation) const
 Affects how quickly the oscillations die down.
 
auto withExtraAttenuationRange (float newExtraAttenuationRange) const
 Specifies the input value at which an extra non-physical attenuation begins to be applied.
 
auto getFrequency () const
 Returns the value specified by withFrequency.
 
auto getAttenuation () const
 Returns the value specified by withAttenuation.
 
auto getExtraAttenuationRange () const
 Returns the value specified by withExtraAttenuationRange.
 

Detailed Description

A selection of options available for customising a spring style easing function.

Member Function Documentation

◆ withFrequency()

auto SpringEasingOptions::withFrequency ( float newFrequency) const
nodiscard

Specifies the number of oscillations the easing would undergo.

This also affects the speed of the movement.

See also
getFrequency, withAttenuation, withExtraAttenuationRange

References withMember().

◆ withAttenuation()

auto SpringEasingOptions::withAttenuation ( float newAttenuation) const
nodiscard

Affects how quickly the oscillations die down.

See also
getAttenuation, withFrequency, withExtraAttenuationRange

References withMember().

◆ withExtraAttenuationRange()

auto SpringEasingOptions::withExtraAttenuationRange ( float newExtraAttenuationRange) const
nodiscard

Specifies the input value at which an extra non-physical attenuation begins to be applied.

The value must be in the range [0.05f, 0.98f].

This ensures that the easing always reaches an output value of 1.0f when the input value is 1.0f. If the attenuation is set sufficiently high this won't have a visible effect.

See also
getExtraAttenuationRange, withFrequency, withAttenuation

References withMember().

◆ getFrequency()

auto SpringEasingOptions::getFrequency ( ) const
nodiscard

Returns the value specified by withFrequency.

If no value was specified the default value is 3.0f.

See also
withFrequency

◆ getAttenuation()

auto SpringEasingOptions::getAttenuation ( ) const
nodiscard

Returns the value specified by withAttenuation.

If no value was specified the default value is 3.0f.

See also
withAttenuation

◆ getExtraAttenuationRange()

auto SpringEasingOptions::getExtraAttenuationRange ( ) const
nodiscard

Returns the value specified by withExtraAttenuationRange.

If no value was specified the default value is 0.25f.

See also
withExtraAttenuationRange

The documentation for this class was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram