about summary refs log tree commit diff stats
path: root/js/leibovitz/dither.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/leibovitz/dither.js')
-rw-r--r--js/leibovitz/dither.js37
1 files changed, 29 insertions, 8 deletions
diff --git a/js/leibovitz/dither.js b/js/leibovitz/dither.js
index b011eca..66d6287 100644
--- a/js/leibovitz/dither.js
+++ b/js/leibovitz/dither.js
@@ -1,15 +1,36 @@
 /**
- * Dithering management module implementing various dithering algorithms
- * Uses the Observer pattern for state management and effect application
- * Implements block-based processing for performance optimization
- * Uses the Strategy pattern for algorithm selection
+ * @fileoverview Dithering management module implementing multiple dithering algorithms.
  * 
+ * @description
+ * Implements various dithering algorithms with block-based processing for performance.
+ * Supports multiple dithering patterns with configurable block sizes.
+ * 
+ * @architecture
+ * Implements the following design patterns:
+ * - Observer Pattern: For state management and effect application
+ * - Factory Pattern: For UI initialization
+ * - Strategy Pattern: For dithering algorithm selection
+ * - Command Pattern: For state reset operations
+ * 
+ * @algorithm
+ * Supported dithering algorithms:
+ * - Floyd-Steinberg: Error diffusion with standard distribution pattern
+ * - Ordered: Matrix-based threshold dithering
+ * - Atkinson: Error diffusion with 1/8 error distribution
+ * - Bayer: Pattern-based threshold dithering
+ * 
+ * @colorLevels
  * Each color channel (Red, Green, Blue) has 4 possible values:
- * 0   -> Black/None
- * 85  -> Low
- * 170 -> Medium
- * 255 -> Full
+ * - 0   -> Black/None
+ * - 85  -> Low
+ * - 170 -> Medium
+ * - 255 -> Full
  * 
+ * Features:
+ * - Block-based processing for performance
+ * - Multiple dithering algorithms
+ * - Configurable block sizes
+ * - Error diffusion patterns
  */
 
 const DitherManager = {