2
0

AnimationMixer.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. <p 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. </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 by this mixer.<br />
  23. </p>
  24. <h2>Properties</h2>
  25. <h3>[property:Number time]</h3>
  26. <p>
  27. The global mixer time (in seconds; starting with 0 on the mixer's creation).
  28. </p>
  29. <h3>[property:Number timeScale]</h3>
  30. <p>
  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. </p>
  35. <h2>Methods</h2>
  36. <h3>[method:AnimationAction clipAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
  37. <p>
  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 the clip and root parameters doesn't yet exist, it will be created by
  42. this method. Calling this method several times with the same clip and root parameters always
  43. returns the same clip instance.
  44. </p>
  45. <h3>[method:AnimationAction existingAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
  46. <p>
  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. </p>
  51. <h3>[method:Object3D getRoot]()</h3>
  52. <p>
  53. Returns this mixer's root object.
  54. </p>
  55. <h3>[method:AnimationMixer stopAllAction]()</h3>
  56. <p>
  57. Deactivates all previously scheduled actions on this mixer.
  58. </p>
  59. <h3>[method:AnimationMixer update]([param:Number deltaTimeInSeconds]) </h3>
  60. <p>
  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. </p>
  64. <h3>[method:null uncacheClip]([param:AnimationClip clip])</h3>
  65. <p>
  66. Deallocates all memory resources for a clip.
  67. </p>
  68. <h3>[method:null uncacheRoot]([param:Object3D root]) </h3>
  69. <p>
  70. Deallocates all memory resources for a root object.
  71. </p>
  72. <h3>[method:null uncacheAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
  73. <p>
  74. Deallocates all memory resources for an action.
  75. </p>
  76. <h2>Source</h2>
  77. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  78. </body>
  79. </html>