Clock.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../list.js"></script>
  6. <script src="../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <div class="desc">Object for keeping track of time.</div>
  12. <h2>Constructor</h2>
  13. <h3>[name]( [page:Boolean autoStart] )</h3>
  14. <div>
  15. autoStart — Automatically start the clock.
  16. </div>
  17. <h2>Properties</h2>
  18. <h3>.[page:Boolean autoStart]</h3>
  19. <div>
  20. If set, starts the clock automatically when the first update is called.
  21. </div>
  22. <h3>.[page:Float startTime]</h3>
  23. <div>
  24. When the clock is running, It holds the start time of the clock. <br />
  25. This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
  26. </div>
  27. <h3>.[page:Float oldTime]</h3>
  28. <div>
  29. When the clock is running, It holds the previous time from a update.<br />
  30. This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
  31. </div>
  32. <h3>.[page:Float elapsedTime]</h3>
  33. <div>
  34. When the clock is running, It holds the time elapsed between the start of the clock to the previous update.<br />
  35. This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
  36. </div>
  37. <h3>.[page:Boolean running]</h3>
  38. <div>
  39. This property keeps track whether the clock is running or not.
  40. </div>
  41. <h2>Methods</h2>
  42. <h3>.start()</h3>
  43. <div>
  44. Starts clock.
  45. </div>
  46. <h3>.stop()</h3>
  47. <div>
  48. Stops clock.
  49. </div>
  50. <h3>.getElapsedTime() [page:Float]</h3>
  51. <div>
  52. Get the seconds passed since the clock started.
  53. </div>
  54. <h3>.getDelta() [page:Float]</h3>
  55. <div>
  56. Get the seconds passed since the last call to this method.
  57. </div>
  58. <h2>Source</h2>
  59. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  60. </body>
  61. </html>