| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>MorphBlendMesh - 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>
- <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Object3D.html">Object3D</a> → <a href="Mesh.html">Mesh</a> → </p>
- <h1 translate="no">MorphBlendMesh</h1>
- <section>
- <header>
- <div class="class-description"><p>A special type of an animated mesh with a more advanced interface
- for animation playback. Unlike <a href="MorphAnimMesh.html">MorphAnimMesh</a>. It allows to
- playback more than one morph animation at the same time but without
- fading options.</p></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">MorphBlendMesh</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 { MorphBlendMesh } from 'three/addons/misc/MorphBlendMesh.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="MorphBlendMesh" translate="no">new <a href="#MorphBlendMesh">MorphBlendMesh</a><span class="signature">( geometry : <span class="param-type"><a href="BufferGeometry.html">BufferGeometry</a></span>, material : <span class="param-type"><a href="Material.html">Material</a> | Array.<<a href="Material.html">Material</a>></span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new morph blend mesh.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>geometry</strong>
- </td>
- <td class="description last">
- <p>The mesh geometry.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>material</strong>
- </td>
- <td class="description last">
- <p>The mesh material.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="animationsList" translate="no">.<a href="#animationsList">animationsList</a><span class="type-signature"> : Array.<Object></span> </h3>
- <div class="description">
- <p>A list of animations.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="animationsMap" translate="no">.<a href="#animationsMap">animationsMap</a><span class="type-signature"> : Object.<string, Object></span> </h3>
- <div class="description">
- <p>A dictionary of animations.</p>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <h3 class="name name-method" id="autoCreateAnimations" translate="no">.<a href="#autoCreateAnimations">autoCreateAnimations</a><span class="signature">( fps : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Automatically creates animations based on the values in
- <a href="Mesh.html#morphTargetDictionary">Mesh#morphTargetDictionary</a>.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>fps</strong>
- </td>
- <td class="description last">
- <p>The FPS of all animations.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h3 class="name name-method" id="createAnimation" translate="no">.<a href="#createAnimation">createAnimation</a><span class="signature">( name : <span class="param-type">string</span>, start : <span class="param-type">number</span>, end : <span class="param-type">number</span>, fps : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Creates a new animation.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>name</strong>
- </td>
- <td class="description last">
- <p>The animation name.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>start</strong>
- </td>
- <td class="description last">
- <p>The start time.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>end</strong>
- </td>
- <td class="description last">
- <p>The end time.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>fps</strong>
- </td>
- <td class="description last">
- <p>The FPS.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h3 class="name name-method" id="getAnimationDuration" translate="no">.<a href="#getAnimationDuration">getAnimationDuration</a><span class="signature">( name : <span class="param-type">string</span> )</span><span class="type-signature"> : number</span> </h3>
- <div class="method">
- <div class="description">
- <p>Returns the duration for the defined animation.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>name</strong>
- </td>
- <td class="description last">
- <p>The animation name.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The duration.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id="getAnimationTime" translate="no">.<a href="#getAnimationTime">getAnimationTime</a><span class="signature">( name : <span class="param-type">string</span> )</span><span class="type-signature"> : number</span> </h3>
- <div class="method">
- <div class="description">
- <p>Returns the time for the defined animation.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>name</strong>
- </td>
- <td class="description last">
- <p>The animation name.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> The time.</dt>
- </dl>
- </div>
- <h3 class="name name-method" id="playAnimation" translate="no">.<a href="#playAnimation">playAnimation</a><span class="signature">( name : <span class="param-type">string</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Plays the defined animation.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>name</strong>
- </td>
- <td class="description last">
- <p>The animation name.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h3 class="name name-method" id="setAnimationDirectionBackward" translate="no">.<a href="#setAnimationDirectionBackward">setAnimationDirectionBackward</a><span class="signature">( name : <span class="param-type">string</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Sets the animation playback direction to "backward" for the
- defined animation.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>name</strong>
- </td>
- <td class="description last">
- <p>The animation name.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h3 class="name name-method" id="setAnimationDirectionForward" translate="no">.<a href="#setAnimationDirectionForward">setAnimationDirectionForward</a><span class="signature">( name : <span class="param-type">string</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Sets the animation playback direction to "forward" for the
- defined animation.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>name</strong>
- </td>
- <td class="description last">
- <p>The animation name.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h3 class="name name-method" id="setAnimationDuration" translate="no">.<a href="#setAnimationDuration">setAnimationDuration</a><span class="signature">( name : <span class="param-type">string</span>, duration : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Sets the duration to the given value for the defined animation.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>name</strong>
- </td>
- <td class="description last">
- <p>The animation name.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>duration</strong>
- </td>
- <td class="description last">
- <p>The duration to set.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h3 class="name name-method" id="setAnimationFPS" translate="no">.<a href="#setAnimationFPS">setAnimationFPS</a><span class="signature">( name : <span class="param-type">string</span>, fps : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Sets the FPS to the given value for the defined animation.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>name</strong>
- </td>
- <td class="description last">
- <p>The animation name.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>fps</strong>
- </td>
- <td class="description last">
- <p>The FPS to set.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h3 class="name name-method" id="setAnimationTime" translate="no">.<a href="#setAnimationTime">setAnimationTime</a><span class="signature">( name : <span class="param-type">string</span>, time : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Sets the time to the given value for the defined animation.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>name</strong>
- </td>
- <td class="description last">
- <p>The animation name.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>time</strong>
- </td>
- <td class="description last">
- <p>The time to set.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h3 class="name name-method" id="setAnimationWeight" translate="no">.<a href="#setAnimationWeight">setAnimationWeight</a><span class="signature">( name : <span class="param-type">string</span>, weight : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Sets the weight to the given value for the defined animation.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>name</strong>
- </td>
- <td class="description last">
- <p>The animation name.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>weight</strong>
- </td>
- <td class="description last">
- <p>The weight to set.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h3 class="name name-method" id="stopAnimation" translate="no">.<a href="#stopAnimation">stopAnimation</a><span class="signature">( name : <span class="param-type">string</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Stops the defined animation.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>name</strong>
- </td>
- <td class="description last">
- <p>The animation name.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h3 class="name name-method" id="update" translate="no">.<a href="#update">update</a><span class="signature">( delta : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Updates the animations of the mesh.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>delta</strong>
- </td>
- <td class="description last">
- <p>The delta time in seconds.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/misc/MorphBlendMesh.js" translate="no" target="_blank" rel="noopener">examples/jsm/misc/MorphBlendMesh.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|