1
0

XRHandMeshModel.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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" rel="noopener">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"><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>, loader : <span class="param-type"><a href="Loader.html">Loader</a></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">
  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>loader</strong>
  67. </td>
  68. <td class="description last">
  69. <p>The loader. If not provided, an instance of <code>GLTFLoader</code> will be used to load models.</p>
  70. <p>Default is <code>null</code>.</p>
  71. </td>
  72. </tr>
  73. <tr>
  74. <td class="name">
  75. <strong>onLoad</strong>
  76. </td>
  77. <td class="description last">
  78. <p>A callback that is executed when a controller model has been loaded.</p>
  79. <p>Default is <code>null</code>.</p>
  80. </td>
  81. </tr>
  82. </tbody>
  83. </table>
  84. </div>
  85. </div>
  86. <h2 class="subsection-title">Properties</h2>
  87. <div class="member">
  88. <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>
  89. <div class="description">
  90. <p>An array of bones representing the bones
  91. of the hand skeleton.</p>
  92. </div>
  93. </div>
  94. <div class="member">
  95. <h3 class="name" id="controller" translate="no">.<a href="#controller">controller</a><span class="type-signature"> : <a href="Group.html">Group</a></span> </h3>
  96. <div class="description">
  97. <p>The WebXR controller.</p>
  98. </div>
  99. </div>
  100. <div class="member">
  101. <h3 class="name" id="handModel" translate="no">.<a href="#handModel">handModel</a><span class="type-signature"> : <a href="XRHandModel.html">XRHandModel</a></span> </h3>
  102. <div class="description">
  103. <p>The hand model.</p>
  104. </div>
  105. </div>
  106. <h2 class="subsection-title">Methods</h2>
  107. <h3 class="name name-method" id="updateMesh" translate="no">.<a href="#updateMesh">updateMesh</a><span class="signature">()</span> </h3>
  108. <div class="method">
  109. <div class="description">
  110. <p>Updates the mesh based on the tracked XR joints data.</p>
  111. </div>
  112. </div>
  113. <h2 class="subsection-title">Source</h2>
  114. <p>
  115. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/webxr/XRHandMeshModel.js" translate="no" target="_blank" rel="noopener">examples/jsm/webxr/XRHandMeshModel.js</a>
  116. </p>
  117. </article>
  118. </section>
  119. <script src="../scripts/linenumber.js"></script>
  120. <script src="../scripts/page.js"></script>
  121. </body>
  122. </html>
粤ICP备19079148号