Skip to content

Replace THREE.Clock with THREE.Timer#378

Open
mrxz wants to merge 1 commit into
sparkjsdev:mainfrom
mrxz:three-clock
Open

Replace THREE.Clock with THREE.Timer#378
mrxz wants to merge 1 commit into
sparkjsdev:mainfrom
mrxz:three-clock

Conversation

@mrxz

@mrxz mrxz commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

When using Spark with Three.js r183 or later a warning will be logged in the dev console that the THREE.Clock class has been deprecated. This PR replaces it with THREE.Timer which is already available in core Three.js since r179, so should be usable in the entire supported version range of Spark (>= r180).

The cloning is no longer needed as querying the elapsed time and/or delta time no longer updates the internal state. This also means that it can now properly be used for effect synchronization. Although in the various examples of Spark a custom time uniform seems to be consistently used making me wonder if the built-in approach should be better documented or alternatively scrapped entirely.

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.

1 participant