Skip to content

Extract createFrameLoop #114

Open
Open

Description

@JadRizk

Part of #107.

Merge: held until 2.0 ships. Depends on #113.

Scope: move frame() into createFrameLoop(deps). That covers the fixed-step physics, rig.tick, onFrame, uniform writes, the four render passes, label placement and stats. Make the label-pool diff and the stats accumulator pure. GraphCanvas keeps only lifecycle and wiring.

Acceptance

  • The same as Extract prepareGraph and packBuffers #111.
  • boot(), or what remains of it, is at complexity ≤ 12.
  • GraphCanvas.tsx is ≤ 300 code lines. If that isn't reachable without over-splitting, the PR explains why.

Activity

  1. added
    refactorCode-quality refactor tracked under the code-quality direction issue
    on Oct 10, 2026
  2. JadRizk commented on Oct 11, 2026

    @JadRizk
    OwnerAuthor

    Carried over from the #112 review (PR #122)

    Add this to the scope for this issue. It was deferred so it wouldn't change createScene's return shape while #113 was being built on top of it.

    • createScene's return value mixes unrelated things (scene.ts ~183–196).
      • It spreads all of post into the return, including screenGeometry, which GraphCanvas never reads.
      • It returns the six edge attributes and the bufferSize scratch vector, but only resize uses those.
    • Fix, while rewiring the frame loop:
      • Keep bufferSize and the attributes inside scene.ts.
      • Return post as one nested field instead of spreading it.
      • Return only what the frame loop, highlight and refilter read.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorCode-quality refactor tracked under the code-quality direction issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions