SkeletonHelper.html 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>SkeletonHelper - 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. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Object3D.html">Object3D</a> → <a href="Line.html">Line</a> → <a href="LineSegments.html">LineSegments</a> → </p>
  13. <h1 translate="no">SkeletonHelper</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A helper object to assist with visualizing a <a href="Skeleton.html">Skeleton</a>.</p></div>
  17. <h2>Code Example</h2>
  18. <div translate="no"><pre><code class="language-js">const helper = new THREE.SkeletonHelper( skinnedMesh );
  19. scene.add( helper );
  20. </code></pre></div>
  21. </header>
  22. <article>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <h3 class="name name-method" id="SkeletonHelper" translate="no">new <a href="#SkeletonHelper">SkeletonHelper</a><span class="signature">( object : <span class="param-type">Object3D</span> )</span> </h3>
  26. <div class="method">
  27. <div class="description">
  28. <p>Constructs a new skeleton helper.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name"><code>object</code></td>
  34. <td class="description last"><p>Usually an instance of <a href="SkinnedMesh.html">SkinnedMesh</a>. However, any 3D object
  35. can be used if it represents a hierarchy of bones (see <a href="Bone.html">Bone</a>).</p></td>
  36. </tr>
  37. </tbody>
  38. </table>
  39. </div>
  40. </div>
  41. <h2 class="subsection-title">Properties</h2>
  42. <div class="member">
  43. <h3 class="name" id="bones" translate="no">.<a href="#bones">bones</a><span class="type-signature"> : Array.&lt;<a href="Bone.html">Bone</a>></span> </h3>
  44. <div class="description">
  45. <p>The list of bones that the helper visualizes.</p>
  46. </div>
  47. </div>
  48. <div class="member">
  49. <h3 class="name" id="isSkeletonHelper" translate="no">.<a href="#isSkeletonHelper">isSkeletonHelper</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  50. <div class="description">
  51. <p>This flag can be used for type testing.<br/>Default is <code>true</code>.</p>
  52. </div>
  53. </div>
  54. <div class="member">
  55. <h3 class="name" id="root" translate="no">.<a href="#root">root</a><span class="type-signature"> : <a href="Object3D.html">Object3D</a></span> </h3>
  56. <div class="description">
  57. <p>The object being visualized.</p>
  58. </div>
  59. </div>
  60. <h2 class="subsection-title">Methods</h2>
  61. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  62. <div class="method">
  63. <div class="description">
  64. <p>Frees the GPU-related resources allocated by this instance. Call this
  65. method whenever this instance is no longer used in your app.</p>
  66. </div>
  67. </div>
  68. <h3 class="name name-method" id="setColors" translate="no">.<a href="#setColors">setColors</a><span class="signature">( color1 : <span class="param-type">Color</span>, color2 : <span class="param-type">Color</span> )</span><span class="type-signature"> : <a href="SkeletonHelper.html">SkeletonHelper</a></span> </h3>
  69. <div class="method">
  70. <div class="description">
  71. <p>Defines the colors of the helper.</p>
  72. </div>
  73. <table class="params">
  74. <tbody>
  75. <tr>
  76. <td class="name"><code>color1</code></td>
  77. <td class="description last"><p>The first line color for each bone.</p></td>
  78. </tr>
  79. <tr>
  80. <td class="name"><code>color2</code></td>
  81. <td class="description last"><p>The second line color for each bone.</p></td>
  82. </tr>
  83. </tbody>
  84. </table>
  85. <dl class="details">
  86. <dt class="tag-returns"><strong>Returns:</strong> A reference to this helper.</dt>
  87. </dl>
  88. </div>
  89. <h2 class="subsection-title">Source</h2>
  90. <p>
  91. <a href="https://github.com/mrdoob/three.js/blob/master/src/helpers/SkeletonHelper.js" target="_blank" rel="noopener" translate="no">src/helpers/SkeletonHelper.js</a>
  92. </p>
  93. </article>
  94. </section>
  95. <script src="../scripts/linenumber.js"></script>
  96. <script src="../scripts/page.js"></script>
  97. </body>
  98. </html>
粤ICP备19079148号