fix: pin three.js to 0.182.0 for THREE.Clock deprecation (#204) - #244
Merged
Conversation
…ning (#204) THREE.Clock was deprecated in three.js r183. The project is on 0.184.0, which triggers a console warning: 'THREE.Clock: This module has been deprecated. Please use THREE.Timer instead.' @react-three/fiber 9.6.1 (latest stable) still uses new THREE.Clock() internally. R3F 10.x (alpha) drops it but is not production-ready. Fix: pin three.js to 0.182.0 (last version before the r183 deprecation). This eliminates the warning while staying on stable releases. The project source uses R3F's state.clock API, not THREE.Clock directly. Verified: identical tsc, lint, and test results before and after.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #204
What
Pins
threefrom^0.184.0to0.182.0to eliminate the THREE.Clock deprecation warning in the browser console.Root Cause
THREE.Clock was deprecated in three.js r183. The project was on 0.184.0, which triggers:
This warning originates inside @react-three/fiber (v9.6.1, latest stable), which constructs
new THREE.Clock()internally in its render loop. The project source code does not use THREE.Clock directly -- it uses R3F'sstate.clockAPI (state.clock.elapsedTime,state.clock.getElapsedTime()).Why pin instead of upgrading R3F?
new THREE.Clock()internally -- no fix availableperformance.now()instead), but is alpha -- not appropriate for productionPinning three.js to 0.182.0 (last version before r183 deprecation) is the pragmatic fix that keeps everything on stable releases.
Files Changed
package.json--threeversion pinned from^0.184.0to0.182.0pnpm-lock.yaml-- lockfile updatedCompatibility
Test Output
All three checks produce identical results before (0.184.0) and after (0.182.0) the change:
pnpm tsc --noEmitpnpm lintpnpm testNo new failures, no new errors introduced by this change.