FogExp2.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <p class="desc">
  12. This class contains the parameters that define exponential squared fog,
  13. which gives a clear view near the camera and a faster than exponentially
  14. densening fog farther from the camera.
  15. </p>
  16. <h2>Code Example</h2>
  17. <code>
  18. const scene = new THREE.Scene();
  19. scene.fog = new THREE.FogExp2( 0xcccccc, 0.002 );
  20. </code>
  21. <h2>Constructor</h2>
  22. <h3>[name]( [param:Integer color], [param:Float density] )</h3>
  23. <p>
  24. The color parameter is passed to the [page:Color] constructor to set the
  25. color property. Color can be a hexadecimal integer or a CSS-style string.
  26. </p>
  27. <h2>Properties</h2>
  28. <h3>[property:Boolean isFogExp2]</h3>
  29. <p>Read-only flag to check if a given object is of type [name].</p>
  30. <h3>[property:String name]</h3>
  31. <p>
  32. Optional name of the object (doesn't need to be unique). Default is an
  33. empty string.
  34. </p>
  35. <h3>[property:Color color]</h3>
  36. <p>
  37. Fog color. Example: If set to black, far away objects will be rendered
  38. black.
  39. </p>
  40. <h3>[property:Float density]</h3>
  41. <p>Defines how fast the fog will grow dense.</p>
  42. <p>Default is `0.00025`.</p>
  43. <h2>Methods</h2>
  44. <h3>[method:FogExp2 clone]()</h3>
  45. <p>Returns a new FogExp2 instance with the same parameters as this one.</p>
  46. <h3>[method:Object toJSON]()</h3>
  47. <p>Return FogExp2 data in JSON format.</p>
  48. <h2>Source</h2>
  49. <p>
  50. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  51. </p>
  52. </body>
  53. </html>