Skip to content

Fix Ballpit TypeScript errors: migrate THREE.Clock to THREE.Timer#979

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-typescript-errors-ballpit
Draft

Fix Ballpit TypeScript errors: migrate THREE.Clock to THREE.Timer#979
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-typescript-errors-ballpit

Conversation

Copilot AI commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Ballpit raised TypeScript errors and THREE.Clock deprecation warnings on modern three.js. Root cause: the package shipped three@^0.167.1 while already declaring @types/three@^0.180.0 — a mismatch where Clock is deprecated (removed in newer releases) and Timer lives in three's core.

Changes

  • Align runtime with types: bump three ^0.167.1^0.180.0 (@react-three/* peer ranges are >=0.156).
  • Clock → Timer in all four Ballpit sources (ts-default, ts-tailwind, content jsx, tailwind jsx):
    • timer.update() before getDelta() each frame
    • clock.start() (resume) → timer.reset()
    • drop clock.stop() — pause/visibility already handled by the component
    • timer.dispose() on cleanup
  • Regenerated public/r/*.json registry via npm run registry:build (Ballpit sources + three@^0.180.0 dependency strings).

Animation loop

// before
this.#animationState.delta = this.#clock.getDelta();
// after
this.#timer.update();
this.#animationState.delta = this.#timer.getDelta();

Notes

  • Non-Ballpit registry diffs are auto-generated dependency-string bumps (three@^0.167.1^0.180.0).
  • Pre-existing, unrelated tsc errors remain in SideRays, Lanyard, and SplitText.

Copilot AI changed the title [WIP] Fix TypeScript errors in Ballpit background and update THREE.Clock Fix Ballpit TypeScript errors: migrate THREE.Clock to THREE.Timer Jun 9, 2026
Copilot AI requested a review from DavidHDev June 9, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: TYPESCRIPT errors in Ballpit background AND THREE.Clock update to THREE.Timer

2 participants