API Docs for: 1.0.0
Show:

MatrixCredits Class

Widget to display text similar to what was used in the credits for The Matrix. If you render the widget into the body, then it will fill the viewport. Otherwise, you must specify a width and height for the widget.

Constructor

MatrixCredits

(
  • config
)

Parameters:

  • config Object

    Widget configuration

Attributes

background

Plugin.Base

Default: {MatrixBackground}

backgroundConfig

Object

Configuration for Y.MatrixBackground

charRange

Array

The range of Unicode characters to use for spinning characters. For most interesting results, all the characters in textSequence should be in this range.

Default: ['!', '~']

cursor

String
none
Each line is drawn all at once and then begins to phase in.
block
The text appears as a block cursor (\u2588) scans across the container.
char
The text appears as a randomly changing character scans across the container.

Default: "block"

introDelay

Number

Milliseconds to wait before starting the text sequence.

Default: 5000

maxPhaseCount

Number

The maximum number of iterations before a character is forced to the final value. Each character stops changing when it hits the correct value or exceeds the maximum. Specify zero to simply display the text.

Default: 20

pagePause

Number

Overridden by pause values in textSequence.

Default: 2000

restartDelay

Number

Milliseconds to wait before restarting the text sequence. Overridden by pause value of last item in textSequence.

Default: 5000

textSequence

Array required

The sequence of messages to display. Each item defines intro, a list of strings to display immediately, lines, a list of strings to phase in one at a time, and (optional) pause, the number of milliseconds to wait before continuing to the next item in the sequence.