Skip to content

Split the logo subsystem: generic Triangle/Cell/Grid vs Makeability-Lab-specific content #2

Description

@jonfroehlich

From the June 2026 code audit. Deliberately parked at the time (judged not worth it yet) — filing so it's tracked.

Problem

src/lib/logo/makelab-logo.js is ~1,870 lines that mix two very different things:

  • Generic geometry primitivesTriangle, Cell, Grid, TriangleDir (a reusable "triangle-grid art" substrate).
  • Makeability-Lab-specific content — the createMakeabilityLab*Row cell-array factories, the hard-coded M/L outline coordinate arrays, and the color palette.

The primitives are already consumed by makelab-logo-morpher.js, the intro animations (leaffall/gridfade/zoomfade), and triangle-art.js — but you can't reuse them without importing the entire ML logo.

Separately, leaffall/zoomfade/gridfade share ~40–50 lines of piece-pool / delay / stagger boilerplate.

Proposal

  • Extract the generic primitives into their own module (e.g. logo/core/ or a gridart/ namespace): triangle.js, cell.js, grid.js, triangle-dir.js.
  • Leave makelab-logo.js as the ML-specific content built on the substrate.
  • Extract a BaseIntroAnimation for the shared intro-animation logic.

Acceptance

  • Triangle/Cell/Grid importable without pulling in the ML logo.
  • Intro animations deduplicated onto a shared base.
  • No behavior change to the existing demos (npm run build + gallery unchanged visually).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions