Face4.js 572 字节
Newer Older
M
Mr.doob 已提交
1 2 3 4
/**
 * @author mr.doob / http://mrdoob.com/
 */

M
Mr.doob 已提交
5
THREE.Face4 = function ( a, b, c, d, normal, materials ) {
6

M
Mr.doob 已提交
7 8 9 10
	this.a = a;
	this.b = b;
	this.c = c;
	this.d = d;
11

M
Mr.doob 已提交
12
	this.centroid = new THREE.Vector3();
U
unknown 已提交
13
	this.normal = normal instanceof THREE.Vector3 ? normal : new THREE.Vector3();
M
Mr.doob 已提交
14
	this.vertexNormals = normal instanceof Array ? normal : [];
15

M
Mr.doob 已提交
16
	this.materials = materials instanceof Array ? materials : [ materials ];
17

M
Mr.doob 已提交
18 19
};

U
unknown 已提交
20

M
Mr.doob 已提交
21 22
THREE.Face4.prototype = {

M
Mr.doob 已提交
23 24 25
	toString: function () {

		return 'THREE.Face4 ( ' + this.a + ', ' + this.b + ', ' + this.c + ' ' + this.d + ' )';
B
Ben Nolan 已提交
26

M
Mr.doob 已提交
27
	}
28

M
Mr.doob 已提交
29
};