Class: Crossfade

rune.transition.Crossfade(optionsopt)

Fades the old image over the new image using two canvas image draws.

Constructor

new Crossfade(optionsopt)

Fades the old image over the new image using two canvas image draws.
Parameters:
Name Type Attributes Description
options Object <optional>
Effect settings; duration defaults to 600 milliseconds.
Source:

Extends

Members

duration :number

Effect duration in milliseconds, excluding scene initialization. Configure before starting an effect; must be finite and greater than zero.
Type:
  • number
Inherited From:
Default Value:
  • 600
Source:

Methods

render(canvas, from, to, progress) → {undefined}

Draws an effect frame. The target is cleared before each call.
Parameters:
Name Type Description
canvas rune.display.Canvas Output canvas.
from rune.display.Canvas Frozen previous image.
to rune.display.Canvas Frozen next image.
progress number Normalized progress from zero to one.
Overrides:
Source:
Returns:
Type
undefined