Vizard 7 » Command Index » Vizard modules » vizact » <vizact>.fadeCompositeTo
7.7

<vizact>.fadeCompositeTo

Create an action that will fade the composite alpha to a given value

<vizact>.fadeCompositeTo(  
value  
begin = None  
speed = None  
time = None  
node = ''  
op = viz.OP_DEFAULT  
interpolate = None  
)  
value
The target composite alpha value.
begin = None
Specifies the beginning value to fade from. If None, the objects current value will be used.
speed = None
The speed to fade to in units/second
time = None
The number of seconds to fade
node = ''
Name of sub-node to fade
op = viz.OP_DEFAULT
The op mode to use when changing the composite alpha.
interpolate = None
The interpolation method to use when performing the action. Can be one of the following interpolation methods, or None to use linear.

Interpolation method

vizact.linear

Linear interpolation. Animation will occur at a constant speed.

vizact.cubic

Cubic interpolation. The default control points are 0.1 and 0.9, which causes a slight easing in and out of the animation. You can specify different control points by creating an instance and passing the values into the constructor (e.g. vizact.cubic(0.1,1.1))

vizact.easeIn
vizact.easeOut
vizact.easeInOut

An alias for quadratic easing.

vizact.easeInStrong
vizact.easeOutStrong
vizact.easeInOutStrong

An alias for quintic easing.

vizact.easeInQuadratic
vizact.easeOutQuadratic
vizact.easeInOutQuadratic

Use quadratic (x^2) easing when going in and/or out of animation.

vizact.easeInCubic
vizact.easeOutCubic
vizact.easeInOutCubic

Use cubic (x^3) easing when going in and/or out of animation.

vizact.easeInQuartic
vizact.easeOutQuartic
vizact.easeInOutQuartic

Use quartic (x^4) easing when going in and/or out of animation.

vizact.easeInQuintic
vizact.easeOutQuintic
vizact.easeInOutQuintic

Use quintic (x^5) easing when going in and/or out of animation.

vizact.easeInSine
vizact.easeOutSine
vizact.easeInOutSine

Use sinusoidal (sin(x)) easing when going in and/or out of animation.

vizact.easeInExp
vizact.easeOutExp
vizact.easeInOutExp

Use exponential (2^x) easing when going in and/or out of animation.

vizact.easeInCircular
vizact.easeOutCircular
vizact.easeInOutCircular

Use circular (sqrt(x)) easing when going in and/or out of animation.

vizact.backIn
vizact.backOut
vizact.backInOut

Back up in opposite direction when going in and/or out of animation.

vizact.bounceIn
vizact.bounceOut
vizact.bounceInOut

Bounce when going in and/or out of animation.

Remarks

After you have created the action you can add it to any object as many times as you want.

Return Value

An action that can be applied to any <node3d> object

Example

# Create action to fade out for 2 seconds
fadeOut = vizact.fadeCompositeTo(0, time=2)
model.addAction(fadeOut)

# Create action to fade in at 1 unit/second
fadeIn = vizact.fadeCompositeTo(1.0, speed=1)
model.addAction(fadeIn)

See also

<node3d>.setCompositeAlpha
<node3d>.getCompositeAlpha
<node3d>.alpha
<vizact>.fadeTo