-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
three.js clock seconds or milliseconds #1828
Comments
I checked the source code of three.js, and made sure you are correct. |
Please check #1869. |
The getElapsedTime and getDelta functions also return the time in seconds. And there's a small typo in elapsedTime: "It holds the time elapsed _btween_ the start of the clock" |
Sorry. It was missing. Please check #1876. |
Hi thread, we're moving DefinitelyTyped to use GitHub Discussions for conversations the To help with the transition, we're closing all issues which haven't had activity in the last 6 months, which includes this issue. If you think closing this issue is a mistake, please pop into the TypeScript Community Discord and mention the issue in the |
The elapsedTime property, getElapsedTime function, and getDelta function of the Clock class return the time in seconds. The comments above these mention milliseconds instead of seconds.
You can see this clearly in the getDelta function, the difference is multiplied by 0.001 (divided by 1000).
Also, the comment above elapsedTime mentions that it's counted from 1 January 1970 00:00:00 UTC. This doesn't make sense, it's counted from the when the clock is started (as stated in the line above).
oldTime, and startTime return in milliseconds (so that's correct).
The text was updated successfully, but these errors were encountered: