Global Parameters
here is a list of all global parameters of an EasyEase object:
intensity
The intensity
variable determines the curve-bending factor of Exponential, Back and Circular easing methods.
By default it is set to 1.0.
Custom values can be can be assigned
-
statically, during object initialization using the constructor #2 or #3 or
-
dynamically using the .setIntensity method
Tip
The input parameter can be any float value; ideal inputs might be between >1 and 20sh.. to obtain a reasonable output;
it applies: the higher the value, the sharper the curve
-
passing
0.0
will return0.5
(in a range from0
to1
) for Exponential easing and Circular easing, or a gently shaped curve with no Back-bending for Back easing -
passing
1.0
will return a flat curve (in a range from 0 to 1)for Exponential easing and Circular easing, or a curve with a light Back-bending for Back easing -
passing a negative value (
< 0
) might return unexpected although interesting outputs
setIntensity.pde
totalLength
The totalLength
variable determines the lenght of the easing curve, in other words: how many seconds should a motion cycle last.
By default it is set to 1.0 second.
Custom values can be can be assigned
-
statically, during object initialization using the constructor #3 or
-
dynamically using the .setTotalLength method
setTotalLength.pde
span
The span
variable determines the length of the curve bending time, in other words: how many seconds should a motion last.
By default it is set to 1 second, although it can be shortened and/or be combined with the delay
parameter
Custom values can be can be assigned
-
statically, during object initialization using the constructor #3 or
-
dynamically using the .setSpan method
Info
assigning a value lower than or equal to 0 is not allowed;
it will return a WARNING
message to the console and automatically set the span
to the least allowed value which is totalLength / frameRate_
assigning a value higher than totalLength
parameter is not allowed; it will return a WARNING
message to the console and will automatically set the same value as for the totalLength
setSpan.pde
delay
The delay
variable determines the waiting time before the curve start bending, in other words: how many seconds before the motion starts
By default it is set to 0 second, so there is no delay although it can be customized and/or be combined with the span
parameter
Custom values can be can be passed
-
statically, during object initialization using the constructor #3 or
-
dynamically using the .setDelay method
Info
assigning a value higher than totalLength
parameter is not allowed and will return a ERROR
message to the console
setDelay.pde
frameRate_
The frameRate_
variable specifies the amount of frames per second a motion cycle should be divided to.
By default it is set at 60 fps like the default sketch's framerate
Custom values can be can be assigned
-
statically, during object initialization using the constructor #3 or
-
dynamically using the .seFrameRate method
Info
When setting a custom frameRate_
for the EasyEase object, please ensure to set the sketch's frameRate
accordingly, in order to avoid synchronization errors.
setFrameRate.pde