Reference for the Mosaic class Effects::Int32Effect

Effects::Int32Effect
Outlet
Value
Value1
Value2
Effects::Effect
Amplitude
Bounces
CycleDuration
Elasticity
Enabled
Exponent
InitialDelay
InterCycleDelay
NoOfCycles
Noise
OnAnimate
OnFinished
Oscillations
Reversed
Symmetric
Timing
TimingCustom1
TimingCustom2
ReverseEffect
StartEffect
StopEffect

SEE ALSO

Using the Change int32 Effect to interpolate between two int32 key values and animate a property with data type 'int32'.

The class Effects::Int32Effect provides an animation effect intended to animate an 'int32' value within a range determined by the properties Value1 and value2. During the animation the value is interpolated and stored in the variable Value. Additionally the Outlet property can refer to an 'int32' property which thus will be 'remote controlled' by the effect.

Beside the both end values, animation effects are determined by their duration and by the timing function. The duration is primarily controlled by the value of the property CycleDuration. This is the time the effect will take for a single animation run. Whether and how often the animation is repeated is stored in the property NoOfCycles. In this case the property InterCycleDelay can determine an optional interval to wait between two consecutive animation runs. Finally the property InitialDelay determines the interval to wait at the very beginning of the effect still before the first animation run began.

The timing function determines the curve to run the animation. The class implements an extensive set of various timing functions. In its simplest case the animation can follow a straight line, or it can start slow and get faster afterwards. More complex timings perform realistic spring elastic and bounce animations. Besides it the user can configure his/her own animation curve. In such case the timing function is based on a cubic Bezier curve. It gives the designer a lot of possibilities to specify very fancy timing functions. The timing is controlled by the property Timing. In the case the designer wants to specify a new curve, the properties TimingCustom1 and TimingCustom2 are available. With the property Noise an additional random noise can be added to the effect.

During the runtime of the animation, the effect will send signals to the slot method stored in the property OnAnimate. When the effect is finished a signal is send to the slot method stored in the OnFinished property.

Whether the effect is running or not is controlled by its property Enabled. It can be used to start and stop the effect. The effect can also be controlled by sending signals to its StartEffect and StopEffect slot methods. With the property Reversed the playback direction can be determined. This allows to simply rewind running effects or to configure an effect to be played in the reverse direction. The slot method ReverseEffect can also be used to switch the playback direction.

property ^int32 Outlet = null;

The property 'Outlet' can store a reference to an 'int32' property to modify at the runtime of the animation effect. To obtain a reference to a property, the Chora ^ Reference property operator should be used. See 'Chora User Manual'.

var int32 Value;

The variable 'Value' stores the actual value interpolated by the running animation.

property int32 Value1 = 0;

The property 'Value1' determines the start value for the animation.

property int32 Value2 = 255;

The property 'Value2' determines the end value for the animation.