Skip to content
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

Closed
roy192 opened this issue Mar 12, 2014 · 5 comments
Closed

three.js clock seconds or milliseconds #1828

roy192 opened this issue Mar 12, 2014 · 5 comments

Comments

@roy192
Copy link

roy192 commented Mar 12, 2014

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).

@gyohk
Copy link
Contributor

gyohk commented Mar 17, 2014

I checked the source code of three.js, and made ​​sure you are correct.
I will commit a modified version in a few days.
Thank you for pointing out.

@gyohk
Copy link
Contributor

gyohk commented Mar 18, 2014

Please check #1869.

@roy192
Copy link
Author

roy192 commented Mar 18, 2014

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"
btween should be between.

@gyohk
Copy link
Contributor

gyohk commented Mar 19, 2014

Sorry. It was missing. Please check #1876.

@orta orta closed this as completed Jun 7, 2021
@orta
Copy link
Collaborator

orta commented Jun 7, 2021

Hi thread, we're moving DefinitelyTyped to use GitHub Discussions for conversations the @types modules in DefinitelyTyped.

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 definitely-typed channel.

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

No branches or pull requests

3 participants