Skip to main content

Accessibility Settings

Turns accessibility preferences into values a slot can multiply and switch on: a motion multiplier for animation durations, pass-through high-contrast and colour-blind switches, and a six-colour palette that stays distinguishable under the selected deficiency. It runs only in the browser and is never compiled to the RGS.

Motion Scale is the value most of your game will read: 1 normally and Motion Scale When Reduced (default 0.25) while reduced motion is active. Multiply spin, cascade and celebration durations by it; 0 makes them instant. Reduced Motion decides when that happens: auto follows the operating system's prefers-reduced-motion setting live, the other two options force it. Where the browser cannot report the preference, auto behaves as not reduced.

High Contrast and Colour Blind Mode are your own settings-menu switches passed through unchanged; the node reads no operating-system contrast or colour setting. Palette is { mode, colours: [six hex strings], c0..c5 }: six colours that stay distinguishable under the selected mode. none is the Okabe-Ito set, the deuteranopia and protanopia sets drop the red-green pairs, and the tritanopia set drops the blue-green and yellow-violet pairs. It is a design aid, not a certification: check it against the actual art.

Changed fires whenever Reduced Motion, Motion Scale, High Contrast or Colour Blind Mode actually changes, including an operating-system flip while the game runs, so wire it to whatever re-applies durations and tints. It does not fire on start-up: read the outputs when you first apply them. Refresh re-reads the operating-system setting on demand and fires Changed only if something differs. The system listener is removed when the node is deleted.

Inputs​

Motion​

DataDescription
Reduced Motion (enum)Default auto follows the operating system's prefers-reduced-motion setting live; the other options force the value. Options: auto, on, off.
Motion Scale When Reduced (number)Multiplier for durations while reduced motion is active. Default 0.25; 0 makes animations instant; negative or non-numeric values revert to 0.25.

Display​

DataDescription
High Contrast (boolean)Your high-contrast switch, passed through unchanged. Default false; the node reads no operating-system contrast setting.
Colour Blind Mode (enum)Which colour-vision deficiency Palette must stay distinguishable under. Default none; unknown values become none. Options: none, deuteranopia, protanopia, tritanopia.

Actions​

SignalDescription
RefreshRe-reads the operating-system reduced-motion setting now and recomputes; Changed fires only if something differs.

Outputs​

Motion​

DataDescription
Reduced Motion (boolean)true when motion should be reduced: forced by on, or the operating-system preference under auto.
Motion Scale (number)1 normally, Motion Scale When Reduced while reduced. Multiply spin, cascade and celebration durations by it.

Display​

DataDescription
High Contrast (boolean)The High Contrast input, echoed for your own switches.
Colour Blind Mode (string)The active mode as a string: none, deuteranopia, protanopia or tritanopia.
Palette (object){ mode, colours: [six hex strings], c0..c5 }: six colours distinguishable under the selected mode. A design aid, not a certification.

Events​

SignalDescription
ChangedFires when Reduced Motion, Motion Scale, High Contrast or Colour Blind Mode changes, including an operating-system flip. Not fired on start-up.

Usage​

  1. Feed Reduced Motion, High Contrast and Colour Blind Mode from your settings menu, or leave Reduced Motion on auto.
  2. Multiply every spin, cascade and celebration duration by Motion Scale when you start the animation.
  3. Tint symbols, paylines and meters from Palette (c0 to c5) and your High Contrast styles.
  4. Wire Changed to the action that re-applies steps 2 and 3.
note

Changed does not fire when the game starts; the outputs simply hold their initial values. Apply Motion Scale and Palette once on start-up, then let Changed keep them current.