refactor(renderer): extract artboard checkerboard drawing

This commit is contained in:
syntaxbullet
2026-07-03 09:56:03 +02:00
parent 3d32e8fbef
commit fb0c424745
7 changed files with 75 additions and 26 deletions

View File

@@ -1,6 +1,9 @@
# Renderer Rules
- `renderer/` draws the current `ImageDocument` plus read-only editor overlays.
- `renderer.ts` is the renderer entrypoint/orchestrator only; keep it small.
- Extract feature rendering into focused files such as `artboard.ts`, `checkerboard.ts`, `layers.ts`, or backend helpers.
- Do not place shape drawing, shader setup, hit testing, cache management, or feature-specific rendering loops directly in `renderer.ts`.
- Rendering backend details, e.g. WebGL objects, stay isolated here.
- Do not mutate document or editor state directly.
- Renderer interactions may emit intents/events only; callers translate them into commands.