|
Fade_Smooth
Creates a new Smooth fade object.
myFade = new Fade_Smooth( Blending_Mode )
myFade = new Fade_Smooth( )
Return value
Newly created fade object.
Parameters
- Blending_Mode
Pointer to a blending function; This can be one of your own (takes a value from 0 to 1 and returns a value from 0 to 255) or one of the following:
- Blending_Off
No blending used
- Blending_Linear
Linear blending used (default)
- Blending_Square
Blending amount related to the square of the time
- Blending_Root
Blending amount related to the square root of the time
- Blending_Sine
Starts and ends solid
- Blending_Log
Logarithmic rise in opacity
- Blending_Inverse
Not sure what this does
- Blending_Smooth
More complex version of linear. Gives a more natural result.
- Blending_Power
Interesting blending based on the square of the time
- Blending_Sine2
Again, more interesting, based on the sine of the time
- Blending_Electric
Slow flashing which gets faster towards the end of the fade
- Blending_Bounce
Blending "bounces" through the fade
Comments
When making your own blending functions, it is recomended to only return integers from 0 to 255 to avoid unexpected behaviour. This can be achieved by adding Max(Min(Round( [result] ),255),0) when the value is returned (replace [result] with your variable) This is not necessary if you know the value will be safe.
It is possible, though fairly pointless, to change the blending mode later on through SetFade.
JAM © 2005 no one in partiular Project started by David Evans in 2005 | |