XRHandMeshModel.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>XRHandMeshModel - 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">XRHandMeshModel</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>Represents one of the hand model types <a href="XRHandModelFactory.html">XRHandModelFactory</a> might produce
  16. depending on the selected profile. <code>XRHandMeshModel</code> represents a hand with a
  17. custom asset.</p></div>
  18. </header>
  19. <article>
  20. <h2 class="subsection-title">Import</h2>
  21. <p><span translate="no">XRHandMeshModel</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  22. <pre><code class="language-js">import { XRHandMeshModel } from 'three/addons/webxr/XRHandMeshModel.js';</code></pre>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <h3 class="name name-method" id="XRHandMeshModel" translate="no">new <a href="#XRHandMeshModel">XRHandMeshModel</a><span class="signature">( handModel : <span class="param-type">XRHandModel</span>, controller : <span class="param-type">Group</span>, path : <span class="param-type">string</span>, handedness : <span class="param-type">XRHandedness</span>, loader : <span class="param-type">Loader</span>, onLoad : <span class="param-type">function</span> )</span> </h3>
  26. <div class="method">
  27. <div class="description">
  28. <p>Constructs a new XR hand mesh model.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name"><code>handModel</code></td>
  34. <td class="description last"><p>The hand model.</p></td>
  35. </tr>
  36. <tr>
  37. <td class="name"><code>controller</code></td>
  38. <td class="description last"><p>The WebXR controller.</p></td>
  39. </tr>
  40. <tr>
  41. <td class="name"><code>path</code></td>
  42. <td class="description last"><p>The model path.</p></td>
  43. </tr>
  44. <tr>
  45. <td class="name"><code>handedness</code></td>
  46. <td class="description last"><p>The handedness of the XR input source.</p></td>
  47. </tr>
  48. <tr>
  49. <td class="name"><code>loader</code></td>
  50. <td class="description last"><p>The loader. If not provided, an instance of <code>GLTFLoader</code> will be used to load models.<br/>Default is <code>null</code>.</p></td>
  51. </tr>
  52. <tr>
  53. <td class="name"><code>onLoad</code></td>
  54. <td class="description last"><p>A callback that is executed when a controller model has been loaded.<br/>Default is <code>null</code>.</p></td>
  55. </tr>
  56. </tbody>
  57. </table>
  58. </div>
  59. </div>
  60. <h2 class="subsection-title">Properties</h2>
  61. <div class="member">
  62. <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>
  63. <div class="description">
  64. <p>An array of bones representing the bones
  65. of the hand skeleton.</p>
  66. </div>
  67. </div>
  68. <div class="member">
  69. <h3 class="name" id="controller" translate="no">.<a href="#controller">controller</a><span class="type-signature"> : <a href="Group.html">Group</a></span> </h3>
  70. <div class="description">
  71. <p>The WebXR controller.</p>
  72. </div>
  73. </div>
  74. <div class="member">
  75. <h3 class="name" id="handModel" translate="no">.<a href="#handModel">handModel</a><span class="type-signature"> : <a href="XRHandModel.html">XRHandModel</a></span> </h3>
  76. <div class="description">
  77. <p>The hand model.</p>
  78. </div>
  79. </div>
  80. <h2 class="subsection-title">Methods</h2>
  81. <h3 class="name name-method" id="updateMesh" translate="no">.<a href="#updateMesh">updateMesh</a><span class="signature">()</span> </h3>
  82. <div class="method">
  83. <div class="description">
  84. <p>Updates the mesh based on the tracked XR joints data.</p>
  85. </div>
  86. </div>
  87. <h2 class="subsection-title">Source</h2>
  88. <p>
  89. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/webxr/XRHandMeshModel.js" target="_blank" rel="noopener" translate="no">examples/jsm/webxr/XRHandMeshModel.js</a>
  90. </p>
  91. </article>
  92. </section>
  93. <script src="../scripts/linenumber.js"></script>
  94. <script src="../scripts/page.js"></script>
  95. </body>
  96. </html>
粤ICP备19079148号