TetrahedronGeometry.js 627 字节
Newer Older
1 2 3 4 5 6 7
/**
 * @author timothypratley / https://github.com/timothypratley
 */

THREE.TetrahedronGeometry = function ( radius, detail ) {

	var vertices = [
8
		 1,  1,  1,   - 1, - 1,  1,   - 1,  1, - 1,    1, - 1, - 1
9 10
	];

M
Mr.doob 已提交
11 12
	var indices = [
		 2,  1,  0,    0,  3,  2,    1,  3,  0,    2,  3,  1
13 14
	];

M
Mr.doob 已提交
15
	THREE.PolyhedronGeometry.call( this, vertices, indices, radius, detail );
16

17 18 19 20 21 22 23
	this.type = 'TetrahedronGeometry';

	this.parameters = {
		radius: radius,
		detail: detail
	};

24
};
25 26

THREE.TetrahedronGeometry.prototype = Object.create( THREE.Geometry.prototype );
27
THREE.TetrahedronGeometry.prototype.constructor = THREE.TetrahedronGeometry;