PlaneGeometry.js 688 B

123456789101112131415161718192021222324
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. * based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Plane.as
  4. */
  5. THREE.PlaneGeometry = function ( width, height, widthSegments, heightSegments ) {
  6. THREE.Geometry.call( this );
  7. this.type = 'PlaneGeometry';
  8. this.parameters = {
  9. width: width,
  10. height: height,
  11. widthSegments: widthSegments,
  12. heightSegments: heightSegments
  13. };
  14. this.fromBufferGeometry( new THREE.PlaneBufferGeometry( width, height, widthSegments, heightSegments ) );
  15. };
  16. THREE.PlaneGeometry.prototype = Object.create( THREE.Geometry.prototype );
  17. THREE.PlaneGeometry.prototype.constructor = THREE.PlaneGeometry;