AnimationMixer.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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">
  13. The AnimationMixer is a player for animations on a particular object in the scene. When
  14. multiple objects in the scene are animated independently, one AnimationMixer may be used for
  15. each object.<br /><br />
  16. For an overview of the different elements of the three.js animation system see the
  17. "Animation System" article in the "Next Steps" section of the manual.
  18. </div>
  19. <h2>Constructor</h2>
  20. <h3>[name]( [param:Object3D rootObject] )</h3>
  21. <div>
  22. [page:Object3D rootObject] - the object whose animations shall be played by this mixer.<br />
  23. </div>
  24. <h2>Properties</h2>
  25. <h3>[property:Number time]</h3>
  26. <div>
  27. The global mixer time (in seconds; starting with 0 on the mixer's creation).
  28. </div>
  29. <h3>[property:Number timeScale]</h3>
  30. <div>
  31. A scaling factor for the global [page:.time mixer time].<br /><br />
  32. Note: Setting the mixer's timeScale to 0 and later back to 1 is a possibility to pause/unpause
  33. all actions that are controlled by this mixer.
  34. </div>
  35. <h2>Methods</h2>
  36. <h3>[method:AnimationAction clipAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
  37. <div>
  38. Returns an [page:AnimationAction] for the passed clip, optionally using a root object different
  39. from the mixer's default root. The first parameter can be either an [page:AnimationClip] object
  40. or the name of an AnimationClip.<br /><br />
  41. If an action fitting these parameters doesn't yet exist, it will be created by this method.<br /><br />
  42. Note: Calling this method several times with the same parameters returns always the same clip
  43. instance.
  44. </div>
  45. <h3>[method:AnimationAction existingAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
  46. <div>
  47. Returns an existing [page:AnimationAction] for the passed clip, optionally using a root object
  48. different from the mixer's default root.<br /><br />
  49. The first parameter can be either an [page:AnimationClip] object or the name of an AnimationClip.
  50. </div>
  51. <h3>[method:Object3D getRoot]()</h3>
  52. <div>
  53. Returns this mixer's root object.
  54. </div>
  55. <h3>[method:AnimationMixer stopAllAction]()</h3>
  56. <div>
  57. Deactivates all previously scheduled actions on this mixer.
  58. </div>
  59. <h3>[method:AnimationMixer update]([param:Number deltaTimeInSeconds]) </h3>
  60. <div>
  61. Advances the global mixer time and updates the animation.<br /><br />
  62. This is usually done in the render loop, passing [page:Clock.getDelta clock.getDelta] scaled by the mixer's [page:.timeScale timeScale]).
  63. </div>
  64. <h3>[method:null uncacheClip]([param:AnimationClip clip])</h3>
  65. <div>
  66. Deallocates all memory resources for a clip.
  67. </div>
  68. <h3>[method:null uncacheRoot]([param:Object3D root]) </h3>
  69. <div>
  70. Deallocates all memory resources for a root object.
  71. </div>
  72. <h3>[method:null uncacheAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
  73. <div>
  74. Deallocates all memory resources for an action.
  75. </div>
  76. <h2>Source</h2>
  77. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  78. </body>
  79. </html>