KeyFrameAnimation.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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">Runs a keyframe animation as imported from the [page:ColladaLoader].</div>
  12. <h2>Examples</h2>
  13. <div>[example:webgl_loader_collada_keyframe loader / collada / keyframe ]</div>
  14. <h2>Constructor</h2>
  15. <h3>[name]([page:Object data])</h3>
  16. <div>
  17. data -- An individual animation object from a the [page:ColladaLoader], e.g. loadedColladaObj.animations[0] <br />
  18. </div>
  19. <div>
  20. Creates a new keyframe animation and initializes it to the first keyframes.
  21. </div>
  22. <h2>Properties</h2>
  23. <h3>[property:Object3D root]</h3>
  24. <div>
  25. The root object of the animation
  26. </div>
  27. <h3>[property:Object data]</h3>
  28. <div>
  29. The data containing the animation
  30. </div>
  31. <h3>[property:Array hierarchy]</h3>
  32. <div>
  33. The objects that are influenced by the animation.
  34. </div>
  35. <h3>[property:number currentTime]</h3>
  36. <div>
  37. The time elapsed since the last start/restart of the animation.
  38. </div>
  39. <h3>[property:number timeScale]</h3>
  40. <div>
  41. How much to scale the speed of the animation. Defaults to 1.
  42. </div>
  43. <h3>[property:boolean isPlaying]</h3>
  44. <div>
  45. Indicates whether the animation is playing. This shouldn't be adapted by user code.
  46. </div>
  47. <h3>[property:boolean isPaused]</h3>
  48. <div>
  49. Indicates whether the animation is paused. This shouldn't be adapted by user code.
  50. </div>
  51. <h3>[property:boolean loop]</h3>
  52. <div>
  53. Set to make the animation restart when the animation ends.
  54. </div>
  55. <h2>Methods</h2>
  56. <h3>[method:null play]([page:Number startTime])</h3>
  57. <div>
  58. Starts the animation at the startTime (in seconds) of the animation.
  59. </div>
  60. <h3>[method:null stop]()</h3>
  61. <div>
  62. Stops the animation.
  63. </div>
  64. <h3>[method:null update]([page:Float deltaTime])</h3>
  65. <div>
  66. deltaTime -- The change in time in seconds
  67. </div>
  68. <div>
  69. Updates the keyframe animation
  70. </div>
  71. <h3>[method:Object getNextKeyWith]([page:String sid], [page:Integer h], [page:Integer key])</h3>
  72. <div>
  73. sid -- The string id <br />
  74. h -- The index in the heirarchy to use<br />
  75. key -- The index of which key to start from
  76. </div>
  77. <div>
  78. Used internally to traverse the animation
  79. </div>
  80. <h3>[method:Object getPrevKeyWith]([page:String sid], [page:Integer h], [page:Integer key])</h3>
  81. <div>
  82. sid -- The string id <br />
  83. h -- The index in the heirarchy to use<br />
  84. key -- The index of which key to start from
  85. </div>
  86. <div>
  87. Used internally to traverse the animation
  88. </div>
  89. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  90. </body>
  91. </html>