AnimationMixer.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  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. <p class="desc">
  12. The AnimationMixer is a player for animations on a particular object in
  13. the scene. When multiple objects in the scene are animated independently,
  14. one AnimationMixer may be used for each object.<br /><br />
  15. For an overview of the different elements of the three.js animation system
  16. see the "Animation System" article in the "Next Steps" section of the
  17. manual.
  18. </p>
  19. <h2>Constructor</h2>
  20. <h3>[name]( [param:Object3D rootObject] )</h3>
  21. <p>
  22. [page:Object3D rootObject] - the object whose animations shall be played
  23. by this mixer.<br />
  24. </p>
  25. <h2>Properties</h2>
  26. <h3>[property:Number time]</h3>
  27. <p>
  28. The global mixer time (in seconds; starting with `0` on the mixer's
  29. creation).
  30. </p>
  31. <h3>[property:Number timeScale]</h3>
  32. <p>
  33. A scaling factor for the global [page:.time mixer time].<br /><br />
  34. Note: Setting the mixer's timeScale to `0` and later back to `1` is a
  35. possibility to pause/unpause all actions that are controlled by this
  36. mixer.
  37. </p>
  38. <h2>Methods</h2>
  39. <h3>[method:AnimationAction clipAction]([param:AnimationClip clip], [param:Object3D optionalRoot])
  40. </h3>
  41. <p>
  42. Returns an [page:AnimationAction] for the passed clip, optionally using a
  43. root object different from the mixer's default root. The first parameter
  44. can be either an [page:AnimationClip] object or the name of an
  45. AnimationClip.<br /><br />
  46. If an action fitting the clip and root parameters doesn't yet exist, it
  47. will be created by this method. Calling this method several times with the
  48. same clip and root parameters always returns the same clip instance.
  49. </p>
  50. <h3>[method:AnimationAction existingAction]([param:AnimationClip clip], [param:Object3D optionalRoot])
  51. </h3>
  52. <p>
  53. Returns an existing [page:AnimationAction] for the passed clip, optionally
  54. using a root object different from the mixer's default root.<br /><br />
  55. The first parameter can be either an [page:AnimationClip] object or the
  56. name of an AnimationClip.
  57. </p>
  58. <h3>[method:Object3D getRoot]()</h3>
  59. <p>Returns this mixer's root object.</p>
  60. <h3>[method:this stopAllAction]()</h3>
  61. <p>Deactivates all previously scheduled actions on this mixer.</p>
  62. <h3>[method:this update]([param:Number deltaTimeInSeconds])</h3>
  63. <p>
  64. Advances the global mixer time and updates the animation.<br /><br />
  65. This is usually done in the render loop, passing [page:Clock.getDelta clock.getDelta] scaled by the mixer's [page:.timeScale timeScale].
  66. </p>
  67. <h3>[method:this setTime]([param:Number timeInSeconds])</h3>
  68. <p>
  69. Sets the global mixer to a specific time and updates the animation
  70. accordingly.<br /><br />
  71. This is useful when you need to jump to an exact time in an animation. The
  72. input parameter will be scaled by the mixer's [page:.timeScale timeScale].
  73. </p>
  74. <h3>[method:undefined uncacheClip]([param:AnimationClip clip])</h3>
  75. <p>
  76. Deallocates all memory resources for a clip. Before using this method make
  77. sure to call [page:AnimationAction.stop]() for all related actions.
  78. </p>
  79. <h3>[method:undefined uncacheRoot]([param:Object3D root])</h3>
  80. <p>
  81. Deallocates all memory resources for a root object. Before using this
  82. method make sure to call [page:AnimationAction.stop]() for all related
  83. actions or alternatively [page:.stopAllAction]() when the mixer operates
  84. on a single root.
  85. </p>
  86. <h3>[method:undefined uncacheAction]([param:AnimationClip clip], [param:Object3D optionalRoot])
  87. </h3>
  88. <p>
  89. Deallocates all memory resources for an action. Before using this method
  90. make sure to call [page:AnimationAction.stop]() to deactivate the action.
  91. </p>
  92. <h2>Source</h2>
  93. <p>
  94. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  95. </p>
  96. </body>
  97. </html>