PlaneGeometry.js 796 B

1234567891011121314151617181920212223242526
  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.log( 'THREE.PlaneGeometry: Consider using THREE.PlaneBufferGeometry for lower memory footprint.' );
  7. THREE.Geometry.call( this );
  8. this.type = 'PlaneGeometry';
  9. this.parameters = {
  10. width: width,
  11. height: height,
  12. widthSegments: widthSegments,
  13. heightSegments: heightSegments
  14. };
  15. this.fromBufferGeometry( new THREE.PlaneBufferGeometry( width, height, widthSegments, heightSegments ) );
  16. };
  17. THREE.PlaneGeometry.prototype = Object.create( THREE.Geometry.prototype );
  18. THREE.PlaneGeometry.prototype.constructor = THREE.PlaneGeometry;