Class: Glitch

rune.display.Glitch(owneropt)

Applies horizontal band displacement without changing the owner's cached image.CameraGlitch reuses the same displacement operation on its freshly drawn image.

Constructor

new Glitch(owneropt)

Creates an optional display glitch subsystem. Buffers are allocated on first use.
Parameters:
Name Type Attributes Description
owner rune.display.DisplayObject <optional>
Object owning the effect.
Source:

Members

(readonly) running :boolean

Whether a nonzero displacement effect is active.
Type:
  • boolean
Source:

Methods

start(durationopt, amountopt) → {undefined}

Starts or restarts the effect. Displacements use local buffer pixels.
Parameters:
Name Type Attributes Default Description
duration number <optional>
300 Effect duration in milliseconds.
amount number <optional>
8 Maximum horizontal displacement in pixels.
Source:
Returns:
Type
undefined

stop() → {undefined}

Stops the effect, retaining its buffer for later reuse.
Source:
Returns:
Type
undefined