PlaneGeometry.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Geometry] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">A class for generating plane geometries</div>
  14. <h2>Example</h2>
  15. <iframe src='scenes/geometry-browser.html#PlaneGeometry'></iframe>
  16. <code>var geometry = new THREE.PlaneGeometry( 5, 20, 32 );
  17. var material = new THREE.MeshBasicMaterial( {color: 0xffff00, side: THREE.DoubleSide} );
  18. var plane = new THREE.Mesh( geometry, material );
  19. scene.add( plane );
  20. </code>
  21. <h2>Constructor</h2>
  22. <h3>[name]([page:Float width], [page:Float height], [page:Integer widthSegments], [page:Integer heightSegments])</h3>
  23. <div>
  24. width — Width along the X axis.<br />
  25. height — Height along the Y axis.<br />
  26. widthSegments — Optional. Default is 1. <br />
  27. heightSegments — Optional. Default is 1.
  28. </div>
  29. <h2>Properties</h2>
  30. <div>
  31. Each of the contructor parameters is accessible in the parameters property of the object. Any modification of these properties after instantiation does not change the geometry.
  32. </div>
  33. <h2>Source</h2>
  34. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  35. </body>
  36. </html>