Scene.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Scene - 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> → </p>
  13. <h1 translate="no">Scene</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Scenes allow you to set up what is to be rendered and where by three.js.
  17. This is where you place 3D objects like meshes, lines or lights.</p></div>
  18. </header>
  19. <article>
  20. <div class="container-overview">
  21. <h2>Constructor</h2>
  22. <h3 class="name name-method" id="Scene" translate="no">new <a href="#Scene">Scene</a><span class="signature">()</span> </h3>
  23. <div class="method">
  24. <div class="description">
  25. <p>Constructs a new scene.</p>
  26. </div>
  27. </div>
  28. </div>
  29. <h2 class="subsection-title">Properties</h2>
  30. <div class="member">
  31. <h3 class="name" id="background" translate="no">.<a href="#background">background</a><span class="type-signature"> : <a href="Color.html">Color</a> | <a href="Texture.html">Texture</a></span> </h3>
  32. <div class="description">
  33. <p>Defines the background of the scene. Valid inputs are:</p>
  34. <ul>
  35. <li>A color for defining a uniform colored background.</li>
  36. <li>A texture for defining a (flat) textured background.</li>
  37. <li>Cube textures or equirectangular textures for defining a skybox.</li>
  38. </ul>
  39. <p>Default is <code>null</code>.</p>
  40. </div>
  41. </div>
  42. <div class="member">
  43. <h3 class="name" id="backgroundBlurriness" translate="no">.<a href="#backgroundBlurriness">backgroundBlurriness</a><span class="type-signature"> : number</span> </h3>
  44. <div class="description">
  45. <p>Sets the blurriness of the background. Only influences environment maps
  46. assigned to <a href="Scene.html#background">Scene#background</a>. Valid input is a float between <code>0</code>
  47. and <code>1</code>.</p>
  48. <p>Default is <code>0</code>.</p>
  49. </div>
  50. </div>
  51. <div class="member">
  52. <h3 class="name" id="backgroundIntensity" translate="no">.<a href="#backgroundIntensity">backgroundIntensity</a><span class="type-signature"> : number</span> </h3>
  53. <div class="description">
  54. <p>Attenuates the color of the background. Only applies to background textures.</p>
  55. <p>Default is <code>1</code>.</p>
  56. </div>
  57. </div>
  58. <div class="member">
  59. <h3 class="name" id="backgroundRotation" translate="no">.<a href="#backgroundRotation">backgroundRotation</a><span class="type-signature"> : <a href="Euler.html">Euler</a></span> </h3>
  60. <div class="description">
  61. <p>The rotation of the background in radians. Only influences environment maps
  62. assigned to <a href="Scene.html#background">Scene#background</a>.</p>
  63. <p>Default is <code>(0,0,0)</code>.</p>
  64. </div>
  65. </div>
  66. <div class="member">
  67. <h3 class="name" id="environment" translate="no">.<a href="#environment">environment</a><span class="type-signature"> : <a href="Texture.html">Texture</a></span> </h3>
  68. <div class="description">
  69. <p>Sets the environment map for all physical materials in the scene. However,
  70. it's not possible to overwrite an existing texture assigned to the <code>envMap</code>
  71. material property.</p>
  72. <p>Default is <code>null</code>.</p>
  73. </div>
  74. </div>
  75. <div class="member">
  76. <h3 class="name" id="environmentIntensity" translate="no">.<a href="#environmentIntensity">environmentIntensity</a><span class="type-signature"> : number</span> </h3>
  77. <div class="description">
  78. <p>Attenuates the color of the environment. Only influences environment maps
  79. assigned to <a href="Scene.html#environment">Scene#environment</a>.</p>
  80. <p>Default is <code>1</code>.</p>
  81. </div>
  82. </div>
  83. <div class="member">
  84. <h3 class="name" id="environmentRotation" translate="no">.<a href="#environmentRotation">environmentRotation</a><span class="type-signature"> : <a href="Euler.html">Euler</a></span> </h3>
  85. <div class="description">
  86. <p>The rotation of the environment map in radians. Only influences physical materials
  87. in the scene when <a href="Scene.html#environment">Scene#environment</a> is used.</p>
  88. <p>Default is <code>(0,0,0)</code>.</p>
  89. </div>
  90. </div>
  91. <div class="member">
  92. <h3 class="name" id="fog" translate="no">.<a href="#fog">fog</a><span class="type-signature"> : <a href="Fog.html">Fog</a> | <a href="FogExp2.html">FogExp2</a></span> </h3>
  93. <div class="description">
  94. <p>A fog instance defining the type of fog that affects everything
  95. rendered in the scene.</p>
  96. <p>Default is <code>null</code>.</p>
  97. </div>
  98. </div>
  99. <div class="member">
  100. <h3 class="name" id="isScene" translate="no">.<a href="#isScene">isScene</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  101. <div class="description">
  102. <p>This flag can be used for type testing.</p>
  103. <p>Default is <code>true</code>.</p>
  104. </div>
  105. </div>
  106. <div class="member">
  107. <h3 class="name" id="overrideMaterial" translate="no">.<a href="#overrideMaterial">overrideMaterial</a><span class="type-signature"> : <a href="Material.html">Material</a></span> </h3>
  108. <div class="description">
  109. <p>Forces everything in the scene to be rendered with the defined material. It is possible
  110. to exclude materials from override by setting <a href="Material.html#allowOverride">Material#allowOverride</a> to <code>false</code>.</p>
  111. <p>Default is <code>null</code>.</p>
  112. </div>
  113. </div>
  114. <h2 class="subsection-title">Source</h2>
  115. <p>
  116. <a href="https://github.com/mrdoob/three.js/blob/master/src/scenes/Scene.js" translate="no" target="_blank" rel="noopener">src/scenes/Scene.js</a>
  117. </p>
  118. </article>
  119. </section>
  120. <script src="../scripts/linenumber.js"></script>
  121. <script src="../scripts/page.js"></script>
  122. </body>
  123. </html>
粤ICP备19079148号