module-GroundedSkybox.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>GroundedSkybox - 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">GroundedSkybox</h1>
  13. <section>
  14. <header>
  15. </header>
  16. <article>
  17. <h2 class="subsection-title">Import</h2>
  18. <p><span translate="no">GroundedSkybox</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>
  19. <pre><code class="language-js">import { getGroundProjectedNormal } from 'three/addons/tsl/utils/GroundedSkybox.js';</code></pre>
  20. <div class="container-overview">
  21. </div>
  22. <h2 class="subsection-title">Static Methods</h2>
  23. <h3 class="name name-method" id=".getGroundProjectedNormal" translate="no">.<a href="#.getGroundProjectedNormal">getGroundProjectedNormal</a><span class="signature">( radiusNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, heightNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Projects the world position onto a sphere whose bottom is clipped by a ground disk,
  27. then returns a vector usable for sampling an environment cube map.</p>
  28. </div>
  29. <table class="params">
  30. <tbody>
  31. <tr>
  32. <td class="name">
  33. <strong translate="no">radiusNode</strong>
  34. </td>
  35. <td class="description last">
  36. <p>The radius of the projection sphere. Must be large enough to ensure the scene's camera stays inside.</p>
  37. </td>
  38. </tr>
  39. <tr>
  40. <td class="name">
  41. <strong translate="no">heightNode</strong>
  42. </td>
  43. <td class="description last">
  44. <p>The height is how far the camera that took the photo was above the ground. A larger value will magnify the downward part of the image.</p>
  45. </td>
  46. </tr>
  47. </tbody>
  48. </table>
  49. <dl class="details">
  50. <dt class="tag-returns"><strong>Returns:</strong> A direction vector for sampling the environment cube map.</dt>
  51. </dl>
  52. </div>
  53. <h2 class="subsection-title">Source</h2>
  54. <p>
  55. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/utils/GroundedSkybox.js" translate="no" target="_blank" rel="noopener">examples/jsm/tsl/utils/GroundedSkybox.js</a>
  56. </p>
  57. </article>
  58. </section>
  59. <script src="../scripts/linenumber.js"></script>
  60. <script src="../scripts/page.js"></script>
  61. </body>
  62. </html>
粤ICP备19079148号