Package com.ardor3d.util.stat.graph
Class DefColorFadeController
java.lang.Object
com.ardor3d.util.stat.graph.DefColorFadeController
- All Implemented Interfaces:
SpatialController<Spatial>
A controller that changes over time the alpha value of the default color of a given Geometry. When coupled with an appropriate BlendState, this can be used to fade in and out unlit objects.
An example of an appropriate BlendState to use with this class:
BlendState blend = new BlendState(); blend.setBlendEnabled(true); blend.setSourceFunction(SourceFunction.SourceAlpha); blend.setDestinationFunction(DestinationFunction.OneMinusSourceAlpha);
-
Constructor Summary
ConstructorDescriptionDefColorFadeController
(Mesh target, float targetAlpha, double rate) Sets up a new instance of the controller. -
Method Summary
-
Constructor Details
-
DefColorFadeController
Sets up a new instance of the controller. The- Parameters:
target
- the object whose default color we want to change the alpha on.targetAlpha
- the alpha value we want to end up at.rate
- the amount, per second, to change the alpha. This value will be have its sign flipped if it is not the appropriate direction given the current default color's alpha.
-
-
Method Details
-
update
- Specified by:
update
in interfaceSpatialController<Spatial>
- Parameters:
time
- The time in seconds between the last call to update and the current onecaller
- The spatial currently executing this controller.
-