| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>DebugEnvironment - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Object3D.html">Object3D</a> → <a href="Scene.html">Scene</a> → </p>
- <h1 translate="no">DebugEnvironment</h1>
- <section>
- <header>
- <div class="class-description"><p>This class represents a scene with a very basic room setup that can be used as
- input for <a href="PMREMGenerator.html#fromScene">PMREMGenerator#fromScene</a>. The resulting PMREM represents the room's
- lighting and can be used for Image Based Lighting by assigning it to <a href="Scene.html#environment">Scene#environment</a>
- or directly as an environment map to PBR materials.</p>
- <p>This class uses a simple room setup and should only be used for development purposes.
- A more appropriate setup for production is <a href="RoomEnvironment.html">RoomEnvironment</a>.</p></div>
- <h2>Code Example</h2>
- <div translate="no"><pre><code class="language-js">const environment = new DebugEnvironment();
- const pmremGenerator = new THREE.PMREMGenerator( renderer );
- const envMap = pmremGenerator.fromScene( environment ).texture;
- scene.environment = envMap;
- </code></pre></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">DebugEnvironment</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
- <pre><code class="language-js">import { DebugEnvironment } from 'three/addons/environments/DebugEnvironment.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="DebugEnvironment" translate="no">new <a href="#DebugEnvironment">DebugEnvironment</a><span class="signature">()</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new debug environment.</p>
- </div>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
- <div class="method">
- <div class="description">
- <p>Frees internal resources. This method should be called
- when the environment is no longer required.</p>
- </div>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/environments/DebugEnvironment.js" translate="no" target="_blank" rel="noopener">examples/jsm/environments/DebugEnvironment.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|