Sky.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Sky - 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="Mesh.html">Mesh</a> → </p>
  13. <h1 translate="no">Sky</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Represents a skydome for scene backgrounds. Based on <a href="https://www.researchgate.net/publication/220720443_A_Practical_Analytic_Model_for_Daylight" target="_blank" rel="noopener">A Practical Analytic Model for Daylight</a>
  17. aka The Preetham Model, the de facto standard for analytical skydomes.</p>
  18. <p>Note that this class can only be used with <a href="WebGLRenderer.html">WebGLRenderer</a>.
  19. When using <a href="WebGPURenderer.html">WebGPURenderer</a>, use <a href="SkyMesh.html">SkyMesh</a>.</p>
  20. <p>More references:</p>
  21. <ul>
  22. <li><a href="http://simonwallner.at/project/atmospheric-scattering/" target="_blank" rel="noopener">http://simonwallner.at/project/atmospheric-scattering/</a></li>
  23. <li><a href="http://blenderartists.org/forum/showthread.php?245954-preethams-sky-impementation-HDR" target="_blank" rel="noopener">http://blenderartists.org/forum/showthread.php?245954-preethams-sky-impementation-HDR</a></li>
  24. </ul></div>
  25. <h2>Code Example</h2>
  26. <div translate="no"><pre><code class="language-js">const sky = new Sky();
  27. sky.scale.setScalar( 10000 );
  28. scene.add( sky );
  29. </code></pre></div>
  30. </header>
  31. <article>
  32. <h2 class="subsection-title">Import</h2>
  33. <p><span translate="no">Sky</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>
  34. <pre><code class="language-js">import { Sky } from 'three/addons/objects/Sky.js';</code></pre>
  35. <div class="container-overview">
  36. <h2>Constructor</h2>
  37. <h3 class="name name-method" id="Sky" translate="no">new <a href="#Sky">Sky</a><span class="signature">()</span> </h3>
  38. <div class="method">
  39. <div class="description">
  40. <p>Constructs a new skydome.</p>
  41. </div>
  42. </div>
  43. </div>
  44. <h2 class="subsection-title">Properties</h2>
  45. <div class="member">
  46. <h3 class="name" id="isSky" translate="no">.<a href="#isSky">isSky</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  47. <div class="description">
  48. <p>This flag can be used for type testing.</p>
  49. <p>Default is <code>true</code>.</p>
  50. </div>
  51. </div>
  52. <h2 class="subsection-title">Source</h2>
  53. <p>
  54. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/Sky.js" translate="no" target="_blank" rel="noopener">examples/jsm/objects/Sky.js</a>
  55. </p>
  56. </article>
  57. </section>
  58. <script src="../scripts/linenumber.js"></script>
  59. <script src="../scripts/page.js"></script>
  60. </body>
  61. </html>
粤ICP备19079148号