AnimationAction.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>AnimationAction - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <h1 translate="no">AnimationAction</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>An instance of <code>AnimationAction</code> schedules the playback of an animation which is
  16. stored in <a href="AnimationClip.html">AnimationClip</a>.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="AnimationAction" translate="no">new <a href="#AnimationAction">AnimationAction</a><span class="signature">( mixer : <span class="param-type">AnimationMixer</span>, clip : <span class="param-type">AnimationClip</span>, localRoot : <span class="param-type">Object3D</span>, blendMode : <span class="param-type">NormalAnimationBlendMode | AdditiveAnimationBlendMode</span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new animation action.</p>
  25. </div>
  26. <table class="params">
  27. <tbody>
  28. <tr>
  29. <td class="name"><code>mixer</code></td>
  30. <td class="description last"><p>The mixer that is controlled by this action.</p></td>
  31. </tr>
  32. <tr>
  33. <td class="name"><code>clip</code></td>
  34. <td class="description last"><p>The animation clip that holds the actual keyframes.</p></td>
  35. </tr>
  36. <tr>
  37. <td class="name"><code>localRoot</code></td>
  38. <td class="description last"><p>The root object on which this action is performed.<br/>Default is <code>null</code>.</p></td>
  39. </tr>
  40. <tr>
  41. <td class="name"><code>blendMode</code></td>
  42. <td class="description last"><p>The blend mode.</p></td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. </div>
  47. </div>
  48. <h2 class="subsection-title">Properties</h2>
  49. <div class="member">
  50. <h3 class="name" id="blendMode" translate="no">.<a href="#blendMode">blendMode</a><span class="type-signature"> : <a href="global.html#NormalAnimationBlendMode">NormalAnimationBlendMode</a> | <a href="global.html#AdditiveAnimationBlendMode">AdditiveAnimationBlendMode</a></span> </h3>
  51. <div class="description">
  52. <p>Defines how the animation is blended/combined when two or more animations
  53. are simultaneously played.</p>
  54. </div>
  55. </div>
  56. <div class="member">
  57. <h3 class="name" id="clampWhenFinished" translate="no">.<a href="#clampWhenFinished">clampWhenFinished</a><span class="type-signature"> : boolean</span> </h3>
  58. <div class="description">
  59. <p>If set to true the animation will automatically be paused on its last frame.</p>
  60. <p>If set to false, <a href="AnimationAction.html#enabled">AnimationAction#enabled</a> will automatically be switched
  61. to <code>false</code> when the last loop of the action has finished, so that this action has
  62. no further impact.</p>
  63. <p>Note: This member has no impact if the action is interrupted (it
  64. has only an effect if its last loop has really finished).<br/>Default is <code>false</code>.</p>
  65. </div>
  66. </div>
  67. <div class="member">
  68. <h3 class="name" id="enabled" translate="no">.<a href="#enabled">enabled</a><span class="type-signature"> : boolean</span> </h3>
  69. <div class="description">
  70. <p>If set to <code>false</code>, the action is disabled so it has no impact.</p>
  71. <p>When the action is re-enabled, the animation continues from its current
  72. time (setting <code>enabled</code> to <code>false</code> doesn't reset the action).<br/>Default is <code>true</code>.</p>
  73. </div>
  74. </div>
  75. <div class="member">
  76. <h3 class="name" id="loop" translate="no">.<a href="#loop">loop</a><span class="type-signature"> : <a href="global.html#LoopRepeat">LoopRepeat</a> | <a href="global.html#LoopOnce">LoopOnce</a> | <a href="global.html#LoopPingPong">LoopPingPong</a></span> </h3>
  77. <div class="description">
  78. <p>The loop mode, set via <a href="AnimationAction.html#setLoop">AnimationAction#setLoop</a>.<br/>Default is <code>LoopRepeat</code>.</p>
  79. </div>
  80. </div>
  81. <div class="member">
  82. <h3 class="name" id="paused" translate="no">.<a href="#paused">paused</a><span class="type-signature"> : boolean</span> </h3>
  83. <div class="description">
  84. <p>If set to <code>true</code>, the playback of the action is paused.<br/>Default is <code>false</code>.</p>
  85. </div>
  86. </div>
  87. <div class="member">
  88. <h3 class="name" id="repetitions" translate="no">.<a href="#repetitions">repetitions</a><span class="type-signature"> : number</span> </h3>
  89. <div class="description">
  90. <p>The number of repetitions of the performed clip over the course of this action.
  91. Can be set via <a href="AnimationAction.html#setLoop">AnimationAction#setLoop</a>.</p>
  92. <p>Setting this number has no effect if <a href="AnimationAction.html#loop">AnimationAction#loop</a> is set to
  93. <code>THREE:LoopOnce</code>.<br/>Default is <code>Infinity</code>.</p>
  94. </div>
  95. </div>
  96. <div class="member">
  97. <h3 class="name" id="time" translate="no">.<a href="#time">time</a><span class="type-signature"> : number</span> </h3>
  98. <div class="description">
  99. <p>The local time of this action (in seconds, starting with <code>0</code>).</p>
  100. <p>The value gets clamped or wrapped to <code>[0,clip.duration]</code> (according to the
  101. loop state).<br/>Default is <code>Infinity</code>.</p>
  102. </div>
  103. </div>
  104. <div class="member">
  105. <h3 class="name" id="timeScale" translate="no">.<a href="#timeScale">timeScale</a><span class="type-signature"> : number</span> </h3>
  106. <div class="description">
  107. <p>Scaling factor for the <a href="AnimationAction.html#time">AnimationAction#time</a>. A value of <code>0</code> causes the
  108. animation to pause. Negative values cause the animation to play backwards.<br/>Default is <code>1</code>.</p>
  109. </div>
  110. </div>
  111. <div class="member">
  112. <h3 class="name" id="weight" translate="no">.<a href="#weight">weight</a><span class="type-signature"> : number</span> </h3>
  113. <div class="description">
  114. <p>The degree of influence of this action (in the interval <code>[0, 1]</code>). Values
  115. between <code>0</code> (no impact) and <code>1</code> (full impact) can be used to blend between
  116. several actions.<br/>Default is <code>1</code>.</p>
  117. </div>
  118. </div>
  119. <div class="member">
  120. <h3 class="name" id="zeroSlopeAtEnd" translate="no">.<a href="#zeroSlopeAtEnd">zeroSlopeAtEnd</a><span class="type-signature"> : boolean</span> </h3>
  121. <div class="description">
  122. <p>Enables smooth interpolation without separate clips for start, loop and end.<br/>Default is <code>true</code>.</p>
  123. </div>
  124. </div>
  125. <div class="member">
  126. <h3 class="name" id="zeroSlopeAtStart" translate="no">.<a href="#zeroSlopeAtStart">zeroSlopeAtStart</a><span class="type-signature"> : boolean</span> </h3>
  127. <div class="description">
  128. <p>Enables smooth interpolation without separate clips for start, loop and end.<br/>Default is <code>true</code>.</p>
  129. </div>
  130. </div>
  131. <h2 class="subsection-title">Methods</h2>
  132. <h3 class="name name-method" id="crossFadeFrom" translate="no">.<a href="#crossFadeFrom">crossFadeFrom</a><span class="signature">( fadeOutAction : <span class="param-type">AnimationAction</span>, duration : <span class="param-type">number</span>, warp : <span class="param-type">boolean</span> )</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  133. <div class="method">
  134. <div class="description">
  135. <p>Causes this action to fade in and the given action to fade out,
  136. within the passed time interval.</p>
  137. </div>
  138. <table class="params">
  139. <tbody>
  140. <tr>
  141. <td class="name"><code>fadeOutAction</code></td>
  142. <td class="description last"><p>The animation action to fade out.</p></td>
  143. </tr>
  144. <tr>
  145. <td class="name"><code>duration</code></td>
  146. <td class="description last"><p>The duration of the fade.</p></td>
  147. </tr>
  148. <tr>
  149. <td class="name"><code>warp</code></td>
  150. <td class="description last"><p>Whether warping should be used or not.<br/>Default is <code>false</code>.</p></td>
  151. </tr>
  152. </tbody>
  153. </table>
  154. <dl class="details">
  155. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  156. </dl>
  157. </div>
  158. <h3 class="name name-method" id="crossFadeTo" translate="no">.<a href="#crossFadeTo">crossFadeTo</a><span class="signature">( fadeInAction : <span class="param-type">AnimationAction</span>, duration : <span class="param-type">number</span>, warp : <span class="param-type">boolean</span> )</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  159. <div class="method">
  160. <div class="description">
  161. <p>Causes this action to fade out and the given action to fade in,
  162. within the passed time interval.</p>
  163. </div>
  164. <table class="params">
  165. <tbody>
  166. <tr>
  167. <td class="name"><code>fadeInAction</code></td>
  168. <td class="description last"><p>The animation action to fade in.</p></td>
  169. </tr>
  170. <tr>
  171. <td class="name"><code>duration</code></td>
  172. <td class="description last"><p>The duration of the fade.</p></td>
  173. </tr>
  174. <tr>
  175. <td class="name"><code>warp</code></td>
  176. <td class="description last"><p>Whether warping should be used or not.<br/>Default is <code>false</code>.</p></td>
  177. </tr>
  178. </tbody>
  179. </table>
  180. <dl class="details">
  181. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  182. </dl>
  183. </div>
  184. <h3 class="name name-method" id="fadeIn" translate="no">.<a href="#fadeIn">fadeIn</a><span class="signature">( duration : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  185. <div class="method">
  186. <div class="description">
  187. <p>Fades the animation in by increasing its weight gradually from <code>0</code> to <code>1</code>,
  188. within the passed time interval.</p>
  189. </div>
  190. <table class="params">
  191. <tbody>
  192. <tr>
  193. <td class="name"><code>duration</code></td>
  194. <td class="description last"><p>The duration of the fade.</p></td>
  195. </tr>
  196. </tbody>
  197. </table>
  198. <dl class="details">
  199. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  200. </dl>
  201. </div>
  202. <h3 class="name name-method" id="fadeOut" translate="no">.<a href="#fadeOut">fadeOut</a><span class="signature">( duration : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  203. <div class="method">
  204. <div class="description">
  205. <p>Fades the animation out by decreasing its weight gradually from <code>1</code> to <code>0</code>,
  206. within the passed time interval.</p>
  207. </div>
  208. <table class="params">
  209. <tbody>
  210. <tr>
  211. <td class="name"><code>duration</code></td>
  212. <td class="description last"><p>The duration of the fade.</p></td>
  213. </tr>
  214. </tbody>
  215. </table>
  216. <dl class="details">
  217. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  218. </dl>
  219. </div>
  220. <h3 class="name name-method" id="getClip" translate="no">.<a href="#getClip">getClip</a><span class="signature">()</span><span class="type-signature"> : <a href="AnimationClip.html">AnimationClip</a></span> </h3>
  221. <div class="method">
  222. <div class="description">
  223. <p>Returns the animation clip of this animation action.</p>
  224. </div>
  225. <dl class="details">
  226. <dt class="tag-returns"><strong>Returns:</strong> The animation clip.</dt>
  227. </dl>
  228. </div>
  229. <h3 class="name name-method" id="getEffectiveTimeScale" translate="no">.<a href="#getEffectiveTimeScale">getEffectiveTimeScale</a><span class="signature">()</span><span class="type-signature"> : number</span> </h3>
  230. <div class="method">
  231. <div class="description">
  232. <p>Returns the effective time scale of this action.</p>
  233. </div>
  234. <dl class="details">
  235. <dt class="tag-returns"><strong>Returns:</strong> The effective time scale.</dt>
  236. </dl>
  237. </div>
  238. <h3 class="name name-method" id="getEffectiveWeight" translate="no">.<a href="#getEffectiveWeight">getEffectiveWeight</a><span class="signature">()</span><span class="type-signature"> : number</span> </h3>
  239. <div class="method">
  240. <div class="description">
  241. <p>Returns the effective weight of this action.</p>
  242. </div>
  243. <dl class="details">
  244. <dt class="tag-returns"><strong>Returns:</strong> The effective weight.</dt>
  245. </dl>
  246. </div>
  247. <h3 class="name name-method" id="getMixer" translate="no">.<a href="#getMixer">getMixer</a><span class="signature">()</span><span class="type-signature"> : <a href="AnimationMixer.html">AnimationMixer</a></span> </h3>
  248. <div class="method">
  249. <div class="description">
  250. <p>Returns the animation mixer of this animation action.</p>
  251. </div>
  252. <dl class="details">
  253. <dt class="tag-returns"><strong>Returns:</strong> The animation mixer.</dt>
  254. </dl>
  255. </div>
  256. <h3 class="name name-method" id="getRoot" translate="no">.<a href="#getRoot">getRoot</a><span class="signature">()</span><span class="type-signature"> : <a href="Object3D.html">Object3D</a></span> </h3>
  257. <div class="method">
  258. <div class="description">
  259. <p>Returns the root object of this animation action.</p>
  260. </div>
  261. <dl class="details">
  262. <dt class="tag-returns"><strong>Returns:</strong> The root object.</dt>
  263. </dl>
  264. </div>
  265. <h3 class="name name-method" id="halt" translate="no">.<a href="#halt">halt</a><span class="signature">( duration : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  266. <div class="method">
  267. <div class="description">
  268. <p>Decelerates this animation's speed to <code>0</code> within the passed time interval.</p>
  269. </div>
  270. <table class="params">
  271. <tbody>
  272. <tr>
  273. <td class="name"><code>duration</code></td>
  274. <td class="description last"><p>The duration.</p></td>
  275. </tr>
  276. </tbody>
  277. </table>
  278. <dl class="details">
  279. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  280. </dl>
  281. </div>
  282. <h3 class="name name-method" id="isRunning" translate="no">.<a href="#isRunning">isRunning</a><span class="signature">()</span><span class="type-signature"> : boolean</span> </h3>
  283. <div class="method">
  284. <div class="description">
  285. <p>Returns <code>true</code> if the animation is running.</p>
  286. </div>
  287. <dl class="details">
  288. <dt class="tag-returns"><strong>Returns:</strong> Whether the animation is running or not.</dt>
  289. </dl>
  290. </div>
  291. <h3 class="name name-method" id="isScheduled" translate="no">.<a href="#isScheduled">isScheduled</a><span class="signature">()</span><span class="type-signature"> : boolean</span> </h3>
  292. <div class="method">
  293. <div class="description">
  294. <p>Returns <code>true</code> when <a href="AnimationAction.html#play">AnimationAction#play</a> has been called.</p>
  295. </div>
  296. <dl class="details">
  297. <dt class="tag-returns"><strong>Returns:</strong> Whether the animation is scheduled or not.</dt>
  298. </dl>
  299. </div>
  300. <h3 class="name name-method" id="play" translate="no">.<a href="#play">play</a><span class="signature">()</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  301. <div class="method">
  302. <div class="description">
  303. <p>Starts the playback of the animation.</p>
  304. </div>
  305. <dl class="details">
  306. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  307. </dl>
  308. </div>
  309. <h3 class="name name-method" id="reset" translate="no">.<a href="#reset">reset</a><span class="signature">()</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  310. <div class="method">
  311. <div class="description">
  312. <p>Resets the playback of the animation.</p>
  313. </div>
  314. <dl class="details">
  315. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  316. </dl>
  317. </div>
  318. <h3 class="name name-method" id="setDuration" translate="no">.<a href="#setDuration">setDuration</a><span class="signature">( duration : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  319. <div class="method">
  320. <div class="description">
  321. <p>Sets the duration for a single loop of this action.</p>
  322. </div>
  323. <table class="params">
  324. <tbody>
  325. <tr>
  326. <td class="name"><code>duration</code></td>
  327. <td class="description last"><p>The duration to set.</p></td>
  328. </tr>
  329. </tbody>
  330. </table>
  331. <dl class="details">
  332. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  333. </dl>
  334. </div>
  335. <h3 class="name name-method" id="setEffectiveTimeScale" translate="no">.<a href="#setEffectiveTimeScale">setEffectiveTimeScale</a><span class="signature">( timeScale : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  336. <div class="method">
  337. <div class="description">
  338. <p>Sets the effective time scale of this action.</p>
  339. <p>An action has no effect and thus an effective time scale of zero when the
  340. action is paused.</p>
  341. </div>
  342. <table class="params">
  343. <tbody>
  344. <tr>
  345. <td class="name"><code>timeScale</code></td>
  346. <td class="description last"><p>The time scale to set.</p></td>
  347. </tr>
  348. </tbody>
  349. </table>
  350. <dl class="details">
  351. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  352. </dl>
  353. </div>
  354. <h3 class="name name-method" id="setEffectiveWeight" translate="no">.<a href="#setEffectiveWeight">setEffectiveWeight</a><span class="signature">( weight : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  355. <div class="method">
  356. <div class="description">
  357. <p>Sets the effective weight of this action.</p>
  358. <p>An action has no effect and thus an effective weight of zero when the
  359. action is disabled.</p>
  360. </div>
  361. <table class="params">
  362. <tbody>
  363. <tr>
  364. <td class="name"><code>weight</code></td>
  365. <td class="description last"><p>The weight to set.</p></td>
  366. </tr>
  367. </tbody>
  368. </table>
  369. <dl class="details">
  370. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  371. </dl>
  372. </div>
  373. <h3 class="name name-method" id="setLoop" translate="no">.<a href="#setLoop">setLoop</a><span class="signature">( mode : <span class="param-type">LoopRepeat | LoopOnce | LoopPingPong</span>, repetitions : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  374. <div class="method">
  375. <div class="description">
  376. <p>Configures the loop settings for this action.</p>
  377. </div>
  378. <table class="params">
  379. <tbody>
  380. <tr>
  381. <td class="name"><code>mode</code></td>
  382. <td class="description last"><p>The loop mode.</p></td>
  383. </tr>
  384. <tr>
  385. <td class="name"><code>repetitions</code></td>
  386. <td class="description last"><p>The number of repetitions.</p></td>
  387. </tr>
  388. </tbody>
  389. </table>
  390. <dl class="details">
  391. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  392. </dl>
  393. </div>
  394. <h3 class="name name-method" id="startAt" translate="no">.<a href="#startAt">startAt</a><span class="signature">( time : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  395. <div class="method">
  396. <div class="description">
  397. <p>Defines the time when the animation should start.</p>
  398. </div>
  399. <table class="params">
  400. <tbody>
  401. <tr>
  402. <td class="name"><code>time</code></td>
  403. <td class="description last"><p>The start time in seconds.</p></td>
  404. </tr>
  405. </tbody>
  406. </table>
  407. <dl class="details">
  408. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  409. </dl>
  410. </div>
  411. <h3 class="name name-method" id="stop" translate="no">.<a href="#stop">stop</a><span class="signature">()</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  412. <div class="method">
  413. <div class="description">
  414. <p>Stops the playback of the animation.</p>
  415. </div>
  416. <dl class="details">
  417. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  418. </dl>
  419. </div>
  420. <h3 class="name name-method" id="stopFading" translate="no">.<a href="#stopFading">stopFading</a><span class="signature">()</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  421. <div class="method">
  422. <div class="description">
  423. <p>Stops any fading which is applied to this action.</p>
  424. </div>
  425. <dl class="details">
  426. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  427. </dl>
  428. </div>
  429. <h3 class="name name-method" id="stopWarping" translate="no">.<a href="#stopWarping">stopWarping</a><span class="signature">()</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  430. <div class="method">
  431. <div class="description">
  432. <p>Stops any scheduled warping which is applied to this action.</p>
  433. </div>
  434. <dl class="details">
  435. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  436. </dl>
  437. </div>
  438. <h3 class="name name-method" id="syncWith" translate="no">.<a href="#syncWith">syncWith</a><span class="signature">( action : <span class="param-type">AnimationAction</span> )</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  439. <div class="method">
  440. <div class="description">
  441. <p>Synchronizes this action with the passed other action.</p>
  442. </div>
  443. <table class="params">
  444. <tbody>
  445. <tr>
  446. <td class="name"><code>action</code></td>
  447. <td class="description last"><p>The action to sync with.</p></td>
  448. </tr>
  449. </tbody>
  450. </table>
  451. <dl class="details">
  452. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  453. </dl>
  454. </div>
  455. <h3 class="name name-method" id="warp" translate="no">.<a href="#warp">warp</a><span class="signature">( startTimeScale : <span class="param-type">number</span>, endTimeScale : <span class="param-type">number</span>, duration : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AnimationAction.html">AnimationAction</a></span> </h3>
  456. <div class="method">
  457. <div class="description">
  458. <p>Changes the playback speed, within the passed time interval, by modifying
  459. <a href="AnimationAction.html#timeScale">AnimationAction#timeScale</a> gradually from <code>startTimeScale</code> to
  460. <code>endTimeScale</code>.</p>
  461. </div>
  462. <table class="params">
  463. <tbody>
  464. <tr>
  465. <td class="name"><code>startTimeScale</code></td>
  466. <td class="description last"><p>The start time scale.</p></td>
  467. </tr>
  468. <tr>
  469. <td class="name"><code>endTimeScale</code></td>
  470. <td class="description last"><p>The end time scale.</p></td>
  471. </tr>
  472. <tr>
  473. <td class="name"><code>duration</code></td>
  474. <td class="description last"><p>The duration.</p></td>
  475. </tr>
  476. </tbody>
  477. </table>
  478. <dl class="details">
  479. <dt class="tag-returns"><strong>Returns:</strong> A reference to this animation action.</dt>
  480. </dl>
  481. </div>
  482. <h2 class="subsection-title">Source</h2>
  483. <p>
  484. <a href="https://github.com/mrdoob/three.js/blob/master/src/animation/AnimationAction.js" target="_blank" rel="noopener" translate="no">src/animation/AnimationAction.js</a>
  485. </p>
  486. </article>
  487. </section>
  488. <script src="../scripts/linenumber.js"></script>
  489. <script src="../scripts/page.js"></script>
  490. </body>
  491. </html>
粤ICP备19079148号