PlaneGeometry.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. <p class="desc">A class for generating plane geometries</p>
  14. <iframe id="scene" src="scenes/geometry-browser.html#PlaneGeometry"></iframe>
  15. <script>
  16. // iOS iframe auto-resize workaround
  17. if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
  18. var scene = document.getElementById( 'scene' );
  19. scene.style.width = getComputedStyle( scene ).width;
  20. scene.style.height = getComputedStyle( scene ).height;
  21. scene.setAttribute( 'scrolling', 'no' );
  22. }
  23. </script>
  24. <h2>Example</h2>
  25. <code>var geometry = new THREE.PlaneGeometry( 5, 20, 32 );
  26. var material = new THREE.MeshBasicMaterial( {color: 0xffff00, side: THREE.DoubleSide} );
  27. var plane = new THREE.Mesh( geometry, material );
  28. scene.add( plane );
  29. </code>
  30. <h2>Constructor</h2>
  31. <h3>[name]([param:Float width], [param:Float height], [param:Integer widthSegments], [param:Integer heightSegments])</h3>
  32. <p>
  33. width — Width along the X axis. Default is 1.<br />
  34. height — Height along the Y axis. Default is 1.<br />
  35. widthSegments — Optional. Default is 1. <br />
  36. heightSegments — Optional. Default is 1.
  37. </p>
  38. <h2>Properties</h2>
  39. <h3>.parameters</h3>
  40. <p>
  41. An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
  42. </p>
  43. <h2>Source</h2>
  44. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  45. </body>
  46. </html>