SkeletonHelper.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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"><a href="Object3D.html">Object3D</a></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">
  34. <strong>object</strong>
  35. </td>
  36. <td class="description last">
  37. <p>Usually an instance of <a href="SkinnedMesh.html">SkinnedMesh</a>. However, any 3D object
  38. can be used if it represents a hierarchy of bones (see <a href="Bone.html">Bone</a>).</p>
  39. </td>
  40. </tr>
  41. </tbody>
  42. </table>
  43. </div>
  44. </div>
  45. <h2 class="subsection-title">Properties</h2>
  46. <div class="member">
  47. <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>
  48. <div class="description">
  49. <p>The list of bones that the helper visualizes.</p>
  50. </div>
  51. </div>
  52. <div class="member">
  53. <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>
  54. <div class="description">
  55. <p>This flag can be used for type testing.</p>
  56. <p>Default is <code>true</code>.</p>
  57. </div>
  58. </div>
  59. <div class="member">
  60. <h3 class="name" id="root" translate="no">.<a href="#root">root</a><span class="type-signature"> : <a href="Object3D.html">Object3D</a></span> </h3>
  61. <div class="description">
  62. <p>The object being visualized.</p>
  63. </div>
  64. </div>
  65. <h2 class="subsection-title">Methods</h2>
  66. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  67. <div class="method">
  68. <div class="description">
  69. <p>Frees the GPU-related resources allocated by this instance. Call this
  70. method whenever this instance is no longer used in your app.</p>
  71. </div>
  72. </div>
  73. <h3 class="name name-method" id="setColors" translate="no">.<a href="#setColors">setColors</a><span class="signature">( color1 : <span class="param-type"><a href="Color.html">Color</a></span>, color2 : <span class="param-type"><a href="Color.html">Color</a></span> )</span><span class="type-signature"> : <a href="SkeletonHelper.html">SkeletonHelper</a></span> </h3>
  74. <div class="method">
  75. <div class="description">
  76. <p>Defines the colors of the helper.</p>
  77. </div>
  78. <table class="params">
  79. <tbody>
  80. <tr>
  81. <td class="name">
  82. <strong>color1</strong>
  83. </td>
  84. <td class="description last">
  85. <p>The first line color for each bone.</p>
  86. </td>
  87. </tr>
  88. <tr>
  89. <td class="name">
  90. <strong>color2</strong>
  91. </td>
  92. <td class="description last">
  93. <p>The second line color for each bone.</p>
  94. </td>
  95. </tr>
  96. </tbody>
  97. </table>
  98. <dl class="details">
  99. <dt class="tag-returns"><strong>Returns:</strong> A reference to this helper.</dt>
  100. </dl>
  101. </div>
  102. <h2 class="subsection-title">Source</h2>
  103. <p>
  104. <a href="https://github.com/mrdoob/three.js/blob/master/src/helpers/SkeletonHelper.js" translate="no" target="_blank" rel="noopener">src/helpers/SkeletonHelper.js</a>
  105. </p>
  106. </article>
  107. </section>
  108. <script src="../scripts/linenumber.js"></script>
  109. <script src="../scripts/page.js"></script>
  110. </body>
  111. </html>
粤ICP备19079148号