Skip to content

Replace Clock instance by Timer instance (three r183+)#5800

Open
vincentfretin wants to merge 1 commit into
aframevr:masterfrom
vincentfretin:replace-clock-by-timer
Open

Replace Clock instance by Timer instance (three r183+)#5800
vincentfretin wants to merge 1 commit into
aframevr:masterfrom
vincentfretin:replace-clock-by-timer

Conversation

@vincentfretin
Copy link
Copy Markdown
Contributor

Replace Clock instance by Timer instance. Clock is deprecated in three r183.
To be merged after the repo is updated to three r183+

I didn't call self.timer.connect(document);
The connect(document) call on the timer leverages the Page Visibility API similar to Clock to prevent large time jumps when the browser tab is inactive.
I don't think we want it?

FYI networked-aframe accessed that clock instance so I did some changes in networked-aframe/networked-aframe#521 That's the only occurrence of it I saw in community components.

@vincentfretin vincentfretin force-pushed the replace-clock-by-timer branch from 2839887 to ffee435 Compare May 8, 2026 08:11
@vincentfretin
Copy link
Copy Markdown
Contributor Author

Actually I think it's good to have the self.timer.connect(document), it fixes the issue with orbit-controls="autoRotate: true" that speed up the rotation when you come back to the tab. I amended the commit.

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