Fog.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 linear fog, i.e., that
  13. grows linearly denser with the distance.
  14. </p>
  15. <h2>Code Example</h2>
  16. <code>
  17. const scene = new THREE.Scene();
  18. scene.fog = new THREE.Fog( 0xcccccc, 10, 15 );
  19. </code>
  20. <h2>Constructor</h2>
  21. <h3>
  22. [name]( [param:Integer color], [param:Float near], [param:Float far] )
  23. </h3>
  24. <p>
  25. The color parameter is passed to the [page:Color] constructor to set the
  26. color property. Color can be a hexadecimal integer or a CSS-style string.
  27. </p>
  28. <h2>Properties</h2>
  29. <h3>[property:Boolean isFog]</h3>
  30. <p>Read-only flag to check if a given object is of type [name].</p>
  31. <h3>[property:String name]</h3>
  32. <p>
  33. Optional name of the object (doesn't need to be unique). Default is an
  34. empty string.
  35. </p>
  36. <h3>[property:Color color]</h3>
  37. <p>
  38. Fog color. Example: If set to black, far away objects will be rendered
  39. black.
  40. </p>
  41. <h3>[property:Float near]</h3>
  42. <p>
  43. The minimum distance to start applying fog. Objects that are less than
  44. 'near' units from the active camera won't be affected by fog.
  45. </p>
  46. <p>Default is `1`.</p>
  47. <h3>[property:Float far]</h3>
  48. <p>
  49. The maximum distance at which fog stops being calculated and applied.
  50. Objects that are more than 'far' units away from the active camera won't
  51. be affected by fog.
  52. </p>
  53. <p>Default is `1000`.</p>
  54. <h2>Methods</h2>
  55. <h3>[method:Fog clone]()</h3>
  56. <p>Returns a new fog instance with the same parameters as this one.</p>
  57. <h3>[method:Object toJSON]()</h3>
  58. <p>Return fog data in JSON format.</p>
  59. <h2>Source</h2>
  60. <p>
  61. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  62. </p>
  63. </body>
  64. </html>