PlaneGeometry.js 688 字节
Newer Older
1
/**
M
Mr.doob 已提交
2
 * @author mrdoob / http://mrdoob.com/
M
Mr.doob 已提交
3
 * based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Plane.as
4 5
 */

M
Mr.doob 已提交
6
THREE.PlaneGeometry = function ( width, height, widthSegments, heightSegments ) {
7

8 9
	THREE.Geometry.call( this );

10
	this.type = 'PlaneGeometry';
M
Mr.doob 已提交
11

M
Mr.doob 已提交
12 13 14 15 16 17 18
	this.parameters = {
		width: width,
		height: height,
		widthSegments: widthSegments,
		heightSegments: heightSegments
	};

M
Mr.doob 已提交
19
	this.fromBufferGeometry( new THREE.PlaneBufferGeometry( width, height, widthSegments, heightSegments ) );
M
Mr.doob 已提交
20

21
};
M
Mr.doob 已提交
22

23
THREE.PlaneGeometry.prototype = Object.create( THREE.Geometry.prototype );
24
THREE.PlaneGeometry.prototype.constructor = THREE.PlaneGeometry;