Class: Slide

rune.transition.Slide(optionsopt)

Uses two image draws and whole-pixel positions to avoid seams between images. Direction describes image movement: left, right, up or down.

Constructor

new Slide(optionsopt)

Slides the old image out while the new image enters from the opposite edge.
Parameters:
Name Type Attributes Description
options Object <optional>
Effect settings; duration defaults to 600 milliseconds.
Source:

Extends

Members

direction :string

Movement direction, configured before starting the effect.
Type:
  • string
Default Value:
  • "left"
Source:

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