CSMHelper.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CSMHelper - 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> → <a href="Group.html">Group</a> → </p>
  13. <h1 translate="no">CSMHelper</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A helper for visualizing the cascades of a CSM instance.</p></div>
  17. </header>
  18. <article>
  19. <h2 class="subsection-title">Import</h2>
  20. <p><span translate="no">CSMHelper</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>
  21. <pre><code class="language-js">import { CSMHelper } from 'three/addons/csm/CSMHelper.js';</code></pre>
  22. <div class="container-overview">
  23. <h2>Constructor</h2>
  24. <h3 class="name name-method" id="CSMHelper" translate="no">new <a href="#CSMHelper">CSMHelper</a><span class="signature">( csm : <span class="param-type"><a href="CSM.html">CSM</a> | <a href="CSMShadowNode.html">CSMShadowNode</a></span> )</span> </h3>
  25. <div class="method">
  26. <div class="description">
  27. <p>Constructs a new CSM helper.</p>
  28. </div>
  29. <table class="params">
  30. <tbody>
  31. <tr>
  32. <td class="name">
  33. <strong>csm</strong>
  34. </td>
  35. <td class="description last">
  36. <p>The CSM instance to visualize.</p>
  37. </td>
  38. </tr>
  39. </tbody>
  40. </table>
  41. </div>
  42. </div>
  43. <h2 class="subsection-title">Properties</h2>
  44. <div class="member">
  45. <h3 class="name" id="csm" translate="no">.<a href="#csm">csm</a><span class="type-signature"> : <a href="CSM.html">CSM</a> | <a href="CSMShadowNode.html">CSMShadowNode</a></span> </h3>
  46. <div class="description">
  47. <p>The CSM instance to visualize.</p>
  48. </div>
  49. </div>
  50. <div class="member">
  51. <h3 class="name" id="displayFrustum" translate="no">.<a href="#displayFrustum">displayFrustum</a><span class="type-signature"> : boolean</span> </h3>
  52. <div class="description">
  53. <p>Whether to display the CSM frustum or not.</p>
  54. <p>Default is <code>true</code>.</p>
  55. </div>
  56. </div>
  57. <div class="member">
  58. <h3 class="name" id="displayPlanes" translate="no">.<a href="#displayPlanes">displayPlanes</a><span class="type-signature"> : boolean</span> </h3>
  59. <div class="description">
  60. <p>Whether to display the cascade planes or not.</p>
  61. <p>Default is <code>true</code>.</p>
  62. </div>
  63. </div>
  64. <div class="member">
  65. <h3 class="name" id="displayShadowBounds" translate="no">.<a href="#displayShadowBounds">displayShadowBounds</a><span class="type-signature"> : boolean</span> </h3>
  66. <div class="description">
  67. <p>Whether to display the shadow bounds or not.</p>
  68. <p>Default is <code>true</code>.</p>
  69. </div>
  70. </div>
  71. <h2 class="subsection-title">Methods</h2>
  72. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  73. <div class="method">
  74. <div class="description">
  75. <p>Frees the GPU-related resources allocated by this instance. Call this
  76. method whenever this instance is no longer used in your app.</p>
  77. </div>
  78. </div>
  79. <h3 class="name name-method" id="update" translate="no">.<a href="#update">update</a><span class="signature">()</span> </h3>
  80. <div class="method">
  81. <div class="description">
  82. <p>Updates the helper. This method should be called in the app's animation loop.</p>
  83. </div>
  84. </div>
  85. <h3 class="name name-method" id="updateVisibility" translate="no">.<a href="#updateVisibility">updateVisibility</a><span class="signature">()</span> </h3>
  86. <div class="method">
  87. <div class="description">
  88. <p>This method must be called if one of the <code>display*</code> properties is changed at runtime.</p>
  89. </div>
  90. </div>
  91. <h2 class="subsection-title">Source</h2>
  92. <p>
  93. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/csm/CSMHelper.js" translate="no" target="_blank" rel="noopener">examples/jsm/csm/CSMHelper.js</a>
  94. </p>
  95. </article>
  96. </section>
  97. <script src="../scripts/linenumber.js"></script>
  98. <script src="../scripts/page.js"></script>
  99. </body>
  100. </html>
粤ICP备19079148号