Matrix Settings - PenguiniVogel/Matrix GitHub Wiki

Settings

Here i will go over all the possible settings and what they do.

setColor(_color: Color)

Sets the text color.

This setting also allows CanvasGradient or CanvasPattern as value.

Example:

// Normal hex color
Matrix.Settings.setColor('#9e34eb');

setBackgroundColor(_color: Color)

Sets the background color.

This setting also allows CanvasGradient or CanvasPattern as value.

Example:

// Normal hex color
Matrix.Settings.setBackgroundColor('#000000');

setSymbols(_symbols: string)

Sets the string of symbols to display.

Example:

Matrix.Settings.setSymbols('Hello world!');

setLineLength(_lineLength: number)

Sets the length of a segment line. Allowed values are 1 - 32.

Example:

Matrix.Settings.setLineLength(17);

setUpdateRate(_ups: number)

Set the render update rate (or speed of changes).

Example:

Matrix.Settings.setUpdateRate(16);

setUpdateRateFX(_upsFX: number)

Set the FX update rate.

Example:

Matrix.Settings.setUpdateRateFX(32);

setFX(_fx: MatrixFX.FX)

Set the FX that is to be used.

Example:

Matrix.Settings.setFX(MatrixFX.BUILTIN_FX_COLUMNS);

setCompositeAlpha(_alpha: number)

Set the composite alpha value, this affects how transparent e.g. the foreground or the dot background is. It also affects how fast letters fade if the OverlayMode is set to FADE. Allowed values are 0.0 - 1.0.

Example:

Matrix.Settings.setCompositeAlpha(0.15);

setCompositeMutation(_compositeMutation: boolean)

Sets if the composite alpha is used for the RANDOM letter mutation mode.

Example:

Matrix.Settings.setCompositeMutation(false);

setMoveChance(_chance: number)

Sets the chance if a column will move down. Allowed values are 0.0 - 1.0.

Example:

Matrix.Settings.setMoveChance(0.8);

setMutationChance(_chance: number)

Set the probability of a letter getting mutated in a segment if the letter mutation mode is set to RANDOM. Allowed values are 0.0 - 1.0.

Example:

Matrix.Settings.setMutationChance(0.2);

setOverlayMode(_overlayMode: Utility.OverlayMode)

Sets the overlay mode.

  • FULL
    Overlay the entire canvas.

  • NORMAL
    Overlay only old content.

  • FADE
    Gradually fade out old content.

  • NONE
    Don't render the overlay.

Example:

Matrix.Settings.setOverlayMode(Utility.OverlayMode.FADE);

setLetterMutationMode(_letterMutationMode: Utility.LetterMutationMode)

Set the letter mutation mode.

  • NORMAL
    There will always be a new letter at the start of the segment.

  • RANDOM
    A random letter within each segment will be replaced.

  • BOTH
    A combination of first NORMAL and then RANDOM.

  • NONE
    Don't mutate anything.

Example:

Matrix.Settings.setLetterMutationMode(Utility.LetterMutationMode.BOTH);

setScale(_scaleX: number, _scaleY?: number)

Sets the scale of the canvas.

Example:

Matrix.Settings.setScale(2.1);
// or also diffrent axis scaling
Matrix.Settings.setScale(2.1, 1.2);
⚠️ **GitHub.com Fallback** ⚠️