XRHandPrimitiveModel.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>XRHandPrimitiveModel - 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">XRHandPrimitiveModel</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>XRHandPrimitiveModel</code> represents a hand
  17. with sphere or box primitives according to the selected <code>primitive</code> option.</p></div>
  18. </header>
  19. <article>
  20. <h2 class="subsection-title">Import</h2>
  21. <p><span translate="no">XRHandPrimitiveModel</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>
  22. <pre><code class="language-js">import { XRHandPrimitiveModel } from 'three/addons/webxr/XRHandPrimitiveModel.js';</code></pre>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <h3 class="name name-method" id="XRHandPrimitiveModel" translate="no">new <a href="#XRHandPrimitiveModel">XRHandPrimitiveModel</a><span class="signature">( handModel : <span class="param-type"><a href="XRHandModel.html">XRHandModel</a></span>, controller : <span class="param-type"><a href="Group.html">Group</a></span>, path : <span class="param-type">string</span>, handedness : <span class="param-type">XRHandedness</span>, options : <span class="param-type"><a href="XRHandPrimitiveModel.html#~Options">XRHandPrimitiveModel~Options</a></span> )</span> </h3>
  26. <div class="method">
  27. <div class="description">
  28. <p>Constructs a new XR hand primitive model.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name">
  34. <strong>handModel</strong>
  35. </td>
  36. <td class="description last">
  37. <p>The hand model.</p>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td class="name">
  42. <strong>controller</strong>
  43. </td>
  44. <td class="description last">
  45. <p>The WebXR controller.</p>
  46. </td>
  47. </tr>
  48. <tr>
  49. <td class="name">
  50. <strong>path</strong>
  51. </td>
  52. <td class="description last">
  53. <p>The model path.</p>
  54. </td>
  55. </tr>
  56. <tr>
  57. <td class="name">
  58. <strong>handedness</strong>
  59. </td>
  60. <td class="description last">
  61. <p>The handedness of the XR input source.</p>
  62. </td>
  63. </tr>
  64. <tr>
  65. <td class="name">
  66. <strong>options</strong>
  67. </td>
  68. <td class="description last">
  69. <p>The model options.</p>
  70. </td>
  71. </tr>
  72. </tbody>
  73. </table>
  74. </div>
  75. </div>
  76. <h2 class="subsection-title">Properties</h2>
  77. <div class="member">
  78. <h3 class="name" id="controller" translate="no">.<a href="#controller">controller</a><span class="type-signature"> : <a href="Group.html">Group</a></span> </h3>
  79. <div class="description">
  80. <p>The WebXR controller.</p>
  81. </div>
  82. </div>
  83. <div class="member">
  84. <h3 class="name" id="envMap" translate="no">.<a href="#envMap">envMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  85. <div class="description">
  86. <p>The model's environment map.</p>
  87. <p>Default is <code>null</code>.</p>
  88. </div>
  89. </div>
  90. <div class="member">
  91. <h3 class="name" id="handModel" translate="no">.<a href="#handModel">handModel</a><span class="type-signature"> : <a href="XRHandModel.html">XRHandModel</a></span> </h3>
  92. <div class="description">
  93. <p>The hand model.</p>
  94. </div>
  95. </div>
  96. <h2 class="subsection-title">Methods</h2>
  97. <h3 class="name name-method" id="updateMesh" translate="no">.<a href="#updateMesh">updateMesh</a><span class="signature">()</span> </h3>
  98. <div class="method">
  99. <div class="description">
  100. <p>Updates the mesh based on the tracked XR joints data.</p>
  101. </div>
  102. </div>
  103. <h2 class="subsection-title">Type Definitions</h2>
  104. <div class="member">
  105. <h3 class="name" id="~Options" translate="no">.<a href="#~Options">Options</a> </h3>
  106. <div class="description">
  107. <p>Constructor options of <code>XRHandPrimitiveModel</code>.</p>
  108. </div>
  109. <table class="props">
  110. <tbody>
  111. <tr>
  112. <td class="name">
  113. <strong>primitive</strong>
  114. <br>
  115. <span class="param-type">'box'</span>
  116. |
  117. <span class="param-type">'sphere'</span>
  118. </td>
  119. <td class="description last">
  120. <p>The primitive type.</p>
  121. </td>
  122. </tr>
  123. </tbody>
  124. </table>
  125. </div>
  126. <h2 class="subsection-title">Source</h2>
  127. <p>
  128. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/webxr/XRHandPrimitiveModel.js" translate="no" target="_blank" rel="noopener">examples/jsm/webxr/XRHandPrimitiveModel.js</a>
  129. </p>
  130. </article>
  131. </section>
  132. <script src="../scripts/linenumber.js"></script>
  133. <script src="../scripts/page.js"></script>
  134. </body>
  135. </html>
粤ICP备19079148号