SkyMesh.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>SkyMesh - 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">SkyMesh</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">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/">http://simonwallner.at/project/atmospheric-scattering/</a></li>
  23. <li><a href="http://blenderartists.org/forum/showthread.php?245954-preethams-sky-impementation-HDR">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 SkyMesh();
  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">SkyMesh</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  34. <pre><code class="language-js">import { SkyMesh } from 'three/addons/objects/SkyMesh.js';</code></pre>
  35. <div class="container-overview">
  36. <h2>Constructor</h2>
  37. <h3 class="name name-method" id="SkyMesh" translate="no">new <a href="#SkyMesh">SkyMesh</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.<br/>Default is <code>true</code>.</p>
  49. </div>
  50. </div>
  51. <div class="member">
  52. <h3 class="name" id="mieCoefficient" translate="no">.<a href="#mieCoefficient">mieCoefficient</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;float></span> </h3>
  53. <div class="description">
  54. <p>The mieCoefficient uniform.</p>
  55. </div>
  56. </div>
  57. <div class="member">
  58. <h3 class="name" id="mieDirectionalG" translate="no">.<a href="#mieDirectionalG">mieDirectionalG</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;float></span> </h3>
  59. <div class="description">
  60. <p>The mieDirectionalG uniform.</p>
  61. </div>
  62. </div>
  63. <div class="member">
  64. <h3 class="name" id="rayleigh" translate="no">.<a href="#rayleigh">rayleigh</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;float></span> </h3>
  65. <div class="description">
  66. <p>The rayleigh uniform.</p>
  67. </div>
  68. </div>
  69. <div class="member">
  70. <h3 class="name" id="sunPosition" translate="no">.<a href="#sunPosition">sunPosition</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;vec3></span> </h3>
  71. <div class="description">
  72. <p>The sun position uniform.</p>
  73. </div>
  74. </div>
  75. <div class="member">
  76. <h3 class="name" id="turbidity" translate="no">.<a href="#turbidity">turbidity</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;float></span> </h3>
  77. <div class="description">
  78. <p>The turbidity uniform.</p>
  79. </div>
  80. </div>
  81. <div class="member">
  82. <h3 class="name" id="upUniform" translate="no">.<a href="#upUniform">upUniform</a><span class="type-signature"> : <a href="UniformNode.html">UniformNode</a>.&lt;vec3></span> </h3>
  83. <div class="description">
  84. <p>The up position.</p>
  85. </div>
  86. </div>
  87. <h2 class="subsection-title">Source</h2>
  88. <p>
  89. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/SkyMesh.js" target="_blank" rel="noopener" translate="no">examples/jsm/objects/SkyMesh.js</a>
  90. </p>
  91. </article>
  92. </section>
  93. <script src="../scripts/linenumber.js"></script>
  94. <script src="../scripts/page.js"></script>
  95. </body>
  96. </html>
粤ICP备19079148号