KeyFrameAnimation.html 2.8 KB

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