Class: TextScramble

rune.text.TextScramble(field)

Reveals the original text through temporary random glyphs. BitmapField manages its lifecycle automatically.

Constructor

new TextScramble(field)

Reveals the original text through temporary random glyphs.
Parameters:
Name Type Description
field rune.text.BitmapField Target field, retained but not owned.
Source:

Members

characters :string

Random glyph alphabet. Unsupported glyphs and whitespace are ignored. An empty supported alphabet renders the original text. Applied on next start.
Type:
  • string
Source:

(readonly) running :boolean

Whether the text is currently scrambled.
Type:
  • boolean
Source:

Methods

complete() → {undefined}

Restores the original text and invokes onComplete once if running.
Source:
Returns:
Type
undefined

dispose() → {undefined}

Releases the effect and its callback. The field is not disposed.
Source:
Returns:
Type
undefined

onComplete(func, scopeopt) → {undefined}

Registers or clears a completion callback receiving the field.
Parameters:
Name Type Attributes Description
func function Callback, or null to clear it.
scope Object <optional>
Callback execution scope.
Source:
Returns:
Type
undefined

start(text, durationopt) → {undefined}

Starts or restarts the effect, stopping other text animations on the field. Original text, wrapping and alignment remain unchanged while glyphs vary. Whitespace is preserved. Empty text and zero duration complete immediately.
Parameters:
Name Type Attributes Default Description
text string The final text.
duration number <optional>
800 Duration in milliseconds, clamped to zero.
Source:
Returns:
Type
undefined

stop() → {undefined}

Cancels scrambling and restores the original glyphs without a callback.
Source:
Returns:
Type
undefined