| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>AnimationClipCreator - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <h1 translate="no">AnimationClipCreator</h1>
- <section>
- <header>
- <div class="class-description"><p>A utility class with factory methods for creating basic animation clips.</p></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">AnimationClipCreator</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
- <pre><code class="language-js">import { AnimationClipCreator } from 'three/addons/animation/AnimationClipCreator.js';</code></pre>
- <div class="container-overview">
- <div class="method">
- </div>
- </div>
- <h2 class="subsection-title">Static Methods</h2>
- <h3 class="name name-method" id=".CreateMaterialColorAnimation" translate="no">.<a href="#.CreateMaterialColorAnimation">CreateMaterialColorAnimation</a><span class="signature">( duration : <span class="param-type">number</span>, colors : <span class="param-type">Array.<<a href="Color.html">Color</a>></span> )</span><span class="type-signature"> : <a href="AnimationClip.html">AnimationClip</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Creates an animation clip that animates the <code>color</code> property of a 3D object's
- material.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>duration</strong>
- </td>
- <td class="description last">
- <p>The duration of the animation.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>colors</strong>
- </td>
- <td class="description last">
- <p>An array of colors that should be sequentially animated.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The created animation clip.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id=".CreatePulsationAnimation" translate="no">.<a href="#.CreatePulsationAnimation">CreatePulsationAnimation</a><span class="signature">( duration : <span class="param-type">number</span>, pulseScale : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AnimationClip.html">AnimationClip</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Creates an animation clip that scales a 3D object in a pulse pattern
- in the given period.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>duration</strong>
- </td>
- <td class="description last">
- <p>The duration of the animation.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>pulseScale</strong>
- </td>
- <td class="description last">
- <p>The scale of the pulse.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The created animation clip.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id=".CreateRotationAnimation" translate="no">.<a href="#.CreateRotationAnimation">CreateRotationAnimation</a><span class="signature">( period : <span class="param-type">number</span>, axis : <span class="param-type">'x' | 'y' | 'z'</span> )</span><span class="type-signature"> : <a href="AnimationClip.html">AnimationClip</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Creates an animation clip that rotates a 3D object 360 degrees
- in the given period of time around the given axis.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>period</strong>
- </td>
- <td class="description last">
- <p>The duration of the animation.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>axis</strong>
- </td>
- <td class="description last">
- <p>The axis of rotation.</p>
- <p>Default is <code>'x'</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The created animation clip.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id=".CreateScaleAxisAnimation" translate="no">.<a href="#.CreateScaleAxisAnimation">CreateScaleAxisAnimation</a><span class="signature">( period : <span class="param-type">number</span>, axis : <span class="param-type">'x' | 'y' | 'z'</span> )</span><span class="type-signature"> : <a href="AnimationClip.html">AnimationClip</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Creates an animation clip that scales a 3D object from <code>0</code> to <code>1</code>
- in the given period of time along the given axis.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>period</strong>
- </td>
- <td class="description last">
- <p>The duration of the animation.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>axis</strong>
- </td>
- <td class="description last">
- <p>The axis to scale the 3D object along.</p>
- <p>Default is <code>'x'</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The created animation clip.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id=".CreateShakeAnimation" translate="no">.<a href="#.CreateShakeAnimation">CreateShakeAnimation</a><span class="signature">( duration : <span class="param-type">number</span>, shakeScale : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : <a href="AnimationClip.html">AnimationClip</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Creates an animation clip that translates a 3D object in a shake pattern
- in the given period.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>duration</strong>
- </td>
- <td class="description last">
- <p>The duration of the animation.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>shakeScale</strong>
- </td>
- <td class="description last">
- <p>The scale of the shake.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The created animation clip.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id=".CreateVisibilityAnimation" translate="no">.<a href="#.CreateVisibilityAnimation">CreateVisibilityAnimation</a><span class="signature">( duration : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="AnimationClip.html">AnimationClip</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Creates an animation clip that toggles the visibility of a 3D object.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>duration</strong>
- </td>
- <td class="description last">
- <p>The duration of the animation.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The created animation clip.</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/animation/AnimationClipCreator.js" translate="no" target="_blank" rel="noopener">examples/jsm/animation/AnimationClipCreator.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|