This package exposes engine-neutral accessibility helpers for visual and audio features that need renderer, platform, or profile-storage integration.
Renderer Integration#
createColorblindPostProcessShaderreturns a matrix, uniforms, and fragment source for protanopia, deuteranopia, tritanopia, achromatopsia, and anomaly filters.createScreenMagnifierState,moveScreenMagnifierFocus, andgetMagnifiedViewportcalculate stable source and target rectangles for a movable zoom lens.createMotionAccessibilitySettings,createMotionAccessibilityPlan, andscaleCameraShakeAmplitudecentralize camera shake sliders and reduced motion behavior.evaluatePhotosensitivityreviews a frame sample window and returns brightness, contrast, blending, and suppression decisions for rapid flashing.
Platform Accessibility#
ScreenReaderEngineowns the UI tree and live announcements.exportScreenReaderBridgeSnapshotexports that tree for UIAutomation, NSAccessibility, TalkBack, or ARIA bridge adapters.- Exported nodes include role, label, value, parent/child links, focus state, live-region politeness, and string properties.
Captions and Audio Cues#
SubtitleCaptionEnginerenders speaker subtitles, sound-effect captions, music descriptions, and directional sound indicators.authorClosedCaptionTagsconverts timed non-verbal audio events into bracketed caption tags such as[door creaks].createVisualCuePlanduplicates audio-only feedback with screen flash, directional indicator, caption text, and haptic values.
Text and Preferences#
TextAccessibilityEngineprovides accessible fonts, letter spacing, line height, category overrides, and global scaling.planTextScaleForLayoutclamps global scale to the 0.5x-3x UI range and reports whether a bounded region should fit, wrap, reduce scale, or truncate.createAccessibilitySettingsSnapshot,serializeAccessibilitySettings,deserializeAccessibilitySettings, andapplyAccessibilitySettingspersist per-player preferences and apply them before gameplay systems start.