Kaleidoscope Class Specification & Developer Learning Guide

1. Introduction

The Kaleidoscope class transforms static images into living visual symmetry. It supports GPU and software fallback rendering, double-buffered transitions, and modular state control. This engine is crafted to be ethical, inclusive, performant, and enlightening β€” serving as both a powerful tool and a teaching aid.

2. Core API & Object Reference

class Kaleidoscope {
  constructor({ canvas, resolution, debug, defaultImage })
}

πŸ” Constructor Parameters

🧠 Internal Buffers & Data

βš™οΈ Public Properties

🧩 Methods


3. Rendering Pipeline

  1. Load image β†’ imageA / imageB
  2. Resize to square β†’ sourceSquareA
  3. Mirror & radialize β†’ targetBufferA
  4. Spherize both buffers β†’ outputA / outputB
  5. Crop final frame β†’ finalOutputA
  6. Crossfade with alpha
  7. Draw to canvas

4. Angle in Degrees

All public-facing angles are in degrees. Internally, radians are used. You can manipulate:

kaleido.angleA = 45;
kaleido.angleB = 270;
kaleido.rev = 12; // one full turn every 12 seconds

This keeps the API intuitive for artists and educators.

5. Debug Logging

Debug mode traces each function's entry, key state variables, and failures. Debug log can be downloaded or cleared. UI visibility is automatically toggled by debug.

6. Accessibility & Sacred Geometry

Designed for universal creative access. High-end output, low-end compatibility:

This is not a proprietary trick β€” it’s a tool for light-based exploration. Everyone’s welcome here.

7. Learning Philosophy

This engine teaches students how geometry, rotation, and pixels converge to make something beautiful. All logic is shared in plain text β€” as it should be.