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

5
THREE.Face3 = function ( a, b, c, normal, material ) {
6

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

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

15
	this.material = material instanceof Array ? material : [ material ];
16

M
Mr.doob 已提交
17 18 19 20 21
};

THREE.Face3.prototype = {

	toString: function () {
22

M
Mr.doob 已提交
23
		return 'THREE.Face3 ( ' + this.a + ', ' + this.b + ', ' + this.c + ' )';
24

M
Mr.doob 已提交
25
	}
26

M
Mr.doob 已提交
27
}