Animation.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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">This class animates an object based on an hierarchy. This hierarchy can be Object3ds or bones.</div>
  13. <h2>Constructor</h2>
  14. <h3>[name]([page:Object3d root], [page:String name])</h3>
  15. <div>
  16. root -- The mesh to animate. <br />
  17. name -- The name of the animation
  18. </div>
  19. <div>
  20. Creates an animation for root. The animation data is gathered from AnimationHandler based on its name.
  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. <h3>[property:number interpolationType]</h3>
  56. <div>
  57. The type to indicate how to interpolate between 2 data points.
  58. </div>
  59. <h2>Methods</h2>
  60. <h3>[method:null play]([page:Number startTime])</h3>
  61. <div>
  62. Starts the animation at the startTime (in seconds) of the animation.
  63. </div>
  64. <h3>[method:null stop]()</h3>
  65. <div>
  66. Stops the animation.
  67. </div>
  68. <h3>[method:Boolean update]([page:Number deltaTimeMS])</h3>
  69. <div>
  70. deltaTimeMS -- The time of the between the previous frame and this frame in miliseconds.
  71. </div>
  72. <div>
  73. Updates the animation in time. This shouldn't be called by user code. The animationHandler calls this method.
  74. </div>
  75. <h3>[method:array interpolateCatmullRom]([page:Array points], [page:Number scale])</h3>
  76. <div>
  77. points -- The 4 control point to calculate CatMullRom <br />
  78. scale -- The scale between the previous key and the nex key
  79. </div>
  80. <div>
  81. Interpolates the point based on the key. Is used in update.
  82. </div>
  83. <h3>[method:Object getNextKeyWith]([page:String type], [page:Object h], [page:Number key])</h3>
  84. <div>
  85. type -- The animationtype for the key. Can be "pos", "rot" and "scl".<br />
  86. h -- The object of the hierarchy that catins the key <br />
  87. key -- The index of the next possible key.
  88. </div>
  89. <div>
  90. Gets the next key. Is used in Update.
  91. </div>
  92. <h3>[method:Object getPrevKeyWith]([page:String type], [page:Object h], [page:Number key])</h3>
  93. <div>
  94. type -- The animationtype for the key. Can be "pos", "rot" and "scl".<br />
  95. h -- The object of the hierarchy that contains the key. <br />
  96. key -- The index of the prev possible key.
  97. </div>
  98. <div>
  99. Gets the previous key. Is used in Update.
  100. </div>
  101. <h2>Source</h2>
  102. [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/collada/[name].js examples/js/loaders/collada/[name].js]
  103. </body>
  104. </html>