Alpha - Ren'Py Visual Novel Engine

documentation index ◦ reference manual ◦ function index

# Alpha

Function: | Alpha | (start, end, time, repeat=False, bounce=False, time_warp=None, add_sizes=False, anim_timebase=False, **properties):

Alpha returns a function that, when called with a displayable, allows the alpha of that displayable to be changed over time. It's a more expensive version of im.Alpha that works with any displayable, and can change over time.

start is the alpha at the start, a number between 0 and 1.

end is the alpha at the end, a number between 0 and 1.

time is the time, in seconds, it takes to complete one cycle. If repeat is True, then the cycle repeats when it finishes, if False, the motion stops after one period. If bounce is True, the alpha goes from start to end to start in a single period, if False, it goes from start to end only.

time_warp, if given, is a function that takes a fractional time period (a number between 0.0 and 1.0) and returns a fractional time period. This function must be pickleable.

anim_timebase is true to use the animation timebase, false to use the displayable timebase.

## Example

        show eileen happy at Alpha(0, 1, 2.0)

        e "It'll take me 2 seconds to get here completely."

documentation index ◦ reference manual ◦ function index