← Back to Documentation Index

✨ Visual Effects

Post-processing effects like bloom, chromatic aberration, and CRT scanlines

📋 Overview

The Effects API provides stunning post-processing effects to enhance your game's visual style, from retro CRT effects to modern bloom and color grading.

💡 Available Effects
  • Bloom - Glow effect for lights and bright objects
  • Chromatic Aberration - RGB color split for retro/glitch aesthetic
  • CRT Scanlines - Classic monitor effect
  • FXAA - Fast anti-aliasing for smooth edges
  • Color Grading - Adjust brightness, contrast, saturation

✨ Effect Functions

enableBloom(intensity, threshold)

Enables bloom glow effect.

intensity number - Bloom strength (0-3, default: 1)
threshold number - Brightness threshold (0-1, default: 0.8)
Returns: void - No return value
Example:
enableBloom(1.5, 0.7); // Strong bloom effect
enableChromaticAberration(strength)

Enables RGB color split effect.

strength number - Effect intensity (0-0.05, default: 0.002)
Returns: void - No return value
Example:
enableChromaticAberration(0.005);
enableScanlines(intensity)

Enables CRT scanline effect.

intensity number - Scanline darkness (0-1, default: 0.3)
Returns: void - No return value
Example:
enableScanlines(0.5); // Retro CRT look