| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>PlaneGeometry - 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="BufferGeometry.html">BufferGeometry</a> → </p>
- <h1 translate="no">PlaneGeometry</h1>
- <section>
- <header>
- <div class="class-description"><p>A geometry class for representing a plane.</p></div>
- <iframe id="viewer" src="../scenes/geometry-browser.html#PlaneGeometry"></iframe>
- <h2>Code Example</h2>
- <div translate="no"><pre><code class="language-js">const geometry = new THREE.PlaneGeometry( 1, 1 );
- const material = new THREE.MeshBasicMaterial( { color: 0xffff00, side: THREE.DoubleSide } );
- const plane = new THREE.Mesh( geometry, material );
- scene.add( plane );
- </code></pre></div>
- </header>
- <article>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="PlaneGeometry" translate="no">new <a href="#PlaneGeometry">PlaneGeometry</a><span class="signature">( width : <span class="param-type">number</span>, height : <span class="param-type">number</span>, widthSegments : <span class="param-type">number</span>, heightSegments : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new plane geometry.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>width</code></td>
- <td class="description last"><p>The width along the X axis.<br/>Default is <code>1</code>.</p></td>
- </tr>
- <tr>
- <td class="name"><code>height</code></td>
- <td class="description last"><p>The height along the Y axis<br/>Default is <code>1</code>.</p></td>
- </tr>
- <tr>
- <td class="name"><code>widthSegments</code></td>
- <td class="description last"><p>The number of segments along the X axis.<br/>Default is <code>1</code>.</p></td>
- </tr>
- <tr>
- <td class="name"><code>heightSegments</code></td>
- <td class="description last"><p>The number of segments along the Y axis.<br/>Default is <code>1</code>.</p></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="parameters" translate="no">.<a href="#parameters">parameters</a><span class="type-signature"> : Object</span> </h3>
- <div class="description">
- <p>Holds the constructor parameters that have been
- used to generate the geometry. Any modification
- after instantiation does not change the geometry.</p>
- </div>
- </div>
- <h2 class="subsection-title">Static Methods</h2>
- <h3 class="name name-method" id=".fromJSON" translate="no">.<a href="#.fromJSON">fromJSON</a><span class="signature">( data : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="PlaneGeometry.html">PlaneGeometry</a></span> </h3>
- <div class="method">
- <div class="description">
- <p>Factory method for creating an instance of this class from the given
- JSON object.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name"><code>data</code></td>
- <td class="description last"><p>A JSON object representing the serialized geometry.</p></td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-returns"><strong>Returns:</strong> A new instance.</dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/src/geometries/PlaneGeometry.js" target="_blank" rel="noopener" translate="no">src/geometries/PlaneGeometry.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|