diff options
author | elioat <{ID}+{username}@users.noreply.github.com> | 2025-03-31 09:59:11 -0400 |
---|---|---|
committer | elioat <{ID}+{username}@users.noreply.github.com> | 2025-03-31 09:59:11 -0400 |
commit | 679db3fc744d2b162e72c9678e99d900d913849e (patch) | |
tree | 29c70c1be0c29fe7806a839cba5d97df6a5d3ac4 /js/leibovitz/dither.js | |
parent | 3c1831c93791e502d06522820ecc9b2ee19e0d12 (diff) | |
download | tour-679db3fc744d2b162e72c9678e99d900d913849e.tar.gz |
*
Diffstat (limited to 'js/leibovitz/dither.js')
-rw-r--r-- | js/leibovitz/dither.js | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/js/leibovitz/dither.js b/js/leibovitz/dither.js index f64329b..66d6287 100644 --- a/js/leibovitz/dither.js +++ b/js/leibovitz/dither.js @@ -1,14 +1,36 @@ /** - * Dithering management module implements a few dithering algorithms - * Uses the Observer pattern for state management and effect application - * Implements block-based processing for performance optimization + * @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 = { |