Fog.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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>const scene = new THREE.Scene();
  17. scene.fog = new THREE.Fog( 0xcccccc, 10, 15 );
  18. </code>
  19. <h2>Constructor</h2>
  20. <h3>
  21. [name]( [param:Integer color], [param:Float near], [param:Float far] )
  22. </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 isFog]</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 near]</h3>
  41. <p>
  42. The minimum distance to start applying fog. Objects that are less than
  43. 'near' units from the active camera won't be affected by fog.
  44. </p>
  45. <p>Default is 1.</p>
  46. <h3>[property:Float far]</h3>
  47. <p>
  48. The maximum distance at which fog stops being calculated and applied.
  49. Objects that are more than 'far' units away from the active camera won't
  50. be affected by fog.
  51. </p>
  52. <p>Default is 1000.</p>
  53. <h2>Methods</h2>
  54. <h3>[method:Fog clone]()</h3>
  55. <p>Returns a new fog instance with the same parameters as this one.</p>
  56. <h3>[method:Object toJSON]()</h3>
  57. <p>Return fog data in JSON format.</p>
  58. <h2>Source</h2>
  59. <p>
  60. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  61. </p>
  62. </body>
  63. </html>