XRPlanes.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>XRPlanes - 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> → </p>
  13. <h1 translate="no">XRPlanes</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A utility class for the WebXR Plane Detection Module. If planes
  17. are detected by WebXR, this class will automatically add them
  18. as thin box meshes to the scene when below code snippet is used.</p></div>
  19. <h2>Code Example</h2>
  20. <div translate="no"><pre><code class="language-js">const planes = new XRPlanes( renderer );
  21. scene.add( planes );
  22. </code></pre></div>
  23. </header>
  24. <article>
  25. <h2 class="subsection-title">Import</h2>
  26. <p><span translate="no">XRPlanes</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>
  27. <pre><code class="language-js">import { XRPlanes } from 'three/addons/webxr/XRPlanes.js';</code></pre>
  28. <div class="container-overview">
  29. <h2>Constructor</h2>
  30. <h3 class="name name-method" id="XRPlanes" translate="no">new <a href="#XRPlanes">XRPlanes</a><span class="signature">( renderer : <span class="param-type"><a href="WebGLRenderer.html">WebGLRenderer</a> | <a href="WebGPURenderer.html">WebGPURenderer</a></span> )</span> </h3>
  31. <div class="method">
  32. <div class="description">
  33. <p>Constructs a new XR plane container.</p>
  34. </div>
  35. <table class="params">
  36. <tbody>
  37. <tr>
  38. <td class="name">
  39. <strong>renderer</strong>
  40. </td>
  41. <td class="description last">
  42. <p>The renderer.</p>
  43. </td>
  44. </tr>
  45. </tbody>
  46. </table>
  47. </div>
  48. </div>
  49. <h2 class="subsection-title">Source</h2>
  50. <p>
  51. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/webxr/XRPlanes.js" translate="no" target="_blank" rel="noopener">examples/jsm/webxr/XRPlanes.js</a>
  52. </p>
  53. </article>
  54. </section>
  55. <script src="../scripts/linenumber.js"></script>
  56. <script src="../scripts/page.js"></script>
  57. </body>
  58. </html>
粤ICP备19079148号