XRHandPrimitiveModel.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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">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">XRHandModel</span>, controller : <span class="param-type">Group</span>, path : <span class="param-type">string</span>, handedness : <span class="param-type">XRHandedness</span>, options : <span class="param-type">XRHandPrimitiveModel~Options</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"><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>options</code></td>
  50. <td class="description last"><p>The model options.</p></td>
  51. </tr>
  52. </tbody>
  53. </table>
  54. </div>
  55. </div>
  56. <h2 class="subsection-title">Properties</h2>
  57. <div class="member">
  58. <h3 class="name" id="controller" translate="no">.<a href="#controller">controller</a><span class="type-signature"> : <a href="Group.html">Group</a></span> </h3>
  59. <div class="description">
  60. <p>The WebXR controller.</p>
  61. </div>
  62. </div>
  63. <div class="member">
  64. <h3 class="name" id="envMap" translate="no">.<a href="#envMap">envMap</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  65. <div class="description">
  66. <p>The model's environment map.<br/>Default is <code>null</code>.</p>
  67. </div>
  68. </div>
  69. <div class="member">
  70. <h3 class="name" id="handModel" translate="no">.<a href="#handModel">handModel</a><span class="type-signature"> : <a href="XRHandModel.html">XRHandModel</a></span> </h3>
  71. <div class="description">
  72. <p>The hand model.</p>
  73. </div>
  74. </div>
  75. <h2 class="subsection-title">Methods</h2>
  76. <h3 class="name name-method" id="updateMesh" translate="no">.<a href="#updateMesh">updateMesh</a><span class="signature">()</span> </h3>
  77. <div class="method">
  78. <div class="description">
  79. <p>Updates the mesh based on the tracked XR joints data.</p>
  80. </div>
  81. </div>
  82. <h2 class="subsection-title">Type Definitions</h2>
  83. <div class="member">
  84. <h3 class="name" id="~Options" translate="no">.<a href="#~Options">Options</a> </h3>
  85. <div class="description">
  86. <p>Constructor options of <code>XRHandPrimitiveModel</code>.</p>
  87. </div>
  88. <h5 class="subsection-title">Properties:</h5>
  89. <table class="props">
  90. <thead>
  91. <tr>
  92. <th>Name</th>
  93. <th>Type</th>
  94. <th>Attributes</th>
  95. <th class="last">Description</th>
  96. </tr>
  97. </thead>
  98. <tbody>
  99. <tr>
  100. <td class="name"><code>primitive</code></td>
  101. <td class="type">
  102. <span class="param-type">'box'</span>
  103. |
  104. <span class="param-type">'sphere'</span>
  105. </td>
  106. <td class="attributes">
  107. &lt;optional><br>
  108. </td>
  109. <td class="description last"><p>The primitive type.</p></td>
  110. </tr>
  111. </tbody>
  112. </table>
  113. </div>
  114. <h2 class="subsection-title">Source</h2>
  115. <p>
  116. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/webxr/XRHandPrimitiveModel.js" target="_blank" rel="noopener" translate="no">examples/jsm/webxr/XRHandPrimitiveModel.js</a>
  117. </p>
  118. </article>
  119. </section>
  120. <script src="../scripts/linenumber.js"></script>
  121. <script src="../scripts/page.js"></script>
  122. </body>
  123. </html>
粤ICP备19079148号