ElasticTweenEquation
abstract class ElasticTweenEquation
Extends: TweenEquation
Package: dev.joid.lib.animation.tween.equation · Module: core · Source: ElasticTweenEquation.java
Easing curves that oscillate like a spring at the start or at the end.
Description
Section titled “Description”Each constant is also in TweenEquations, as ELASTIC_IN, ELASTIC_OUT and ELASTIC_IN_OUT.
period(...) and amplitude(...) give the same curve with other oscillations, whose toString() carries them, period first: "Elastic.IN(0.3, 2.0)", which TweenEquations.of reads back.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| ElasticTweenEquation(float period, float amplitude) protected | Creates a curve with the oscillation period and the amplitude, for a subclass. |
Properties
Section titled “Properties”| Property | Type | Default | Summary |
|---|---|---|---|
| period | float | 0.3F in IN and OUT, 0.45F in IN_OUT | The length of one oscillation, as a part of the step: smaller values oscillate faster. |
| amplitude | float | 0F in the three constants, which counts as 1F | The height of the oscillations; a value below 1F counts as 1F. |
Methods
Section titled “Methods”Inherited from TweenEquation (1)
Constants and fields
Section titled “Constants and fields”| Type | Name | Value | Summary |
|---|---|---|---|
ElasticTweenEquation | IN | ElasticTweenEquation.in(0.3F, 0F) | Oscillates at the start, like a spring. |
ElasticTweenEquation | OUT | ElasticTweenEquation.out(0.3F, 0F) | Oscillates at the end, like a spring. |
ElasticTweenEquation | IN_OUT | ElasticTweenEquation.inOut(0.3F * 1.5F, 0F) | Oscillates at the start and at the end. |
float | period | The length of one oscillation, as a part of the step: smaller values oscillate faster. | |
float | amplitude | The height of the oscillations; a value below 1F counts as 1F. |
Creation details
Section titled “Creation details”ElasticTweenEquation
Section titled “ElasticTweenEquation”ElasticTweenEquation(float period, float amplitude) protected
Creates a curve with the oscillation period and the amplitude, for a subclass.
Property details
Section titled “Property details”period
Section titled “period”this period(float period)fluent hook abstractfloat getPeriod()
Default: 0.3F in IN and OUT, 0.45F in IN_OUT
The length of one oscillation, as a part of the step: smaller values oscillate faster.
period(float) returns a curve of the same direction with that period and leaves this one unchanged.
amplitude
Section titled “amplitude”this amplitude(float amplitude)fluent hook abstractfloat getAmplitude()
Default: 0F in the three constants, which counts as 1F
The height of the oscillations; a value below 1F counts as 1F.
amplitude(float) returns a curve of the same direction with that amplitude and leaves this one unchanged.
Constant and field details
Section titled “Constant and field details”ElasticTweenEquation IN
Oscillates at the start, like a spring.
ElasticTweenEquation OUT
Oscillates at the end, like a spring.
IN_OUT
Section titled “IN_OUT”ElasticTweenEquation IN_OUT
Oscillates at the start and at the end.
period
Section titled “period”float period protected
The length of one oscillation, as a part of the step: smaller values oscillate faster.
period(float) returns a curve of the same direction with that period and leaves this one unchanged.
amplitude
Section titled “amplitude”float amplitude protected
The height of the oscillations; a value below 1F counts as 1F.
amplitude(float) returns a curve of the same direction with that amplitude and leaves this one unchanged.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
