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

6
THREE.Face3 = function ( a, b, c, normal, color, materials ) {
7

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

12
	this.normal = normal instanceof THREE.Vector3 ? normal : new THREE.Vector3();
A
alteredq 已提交
13
	this.vertexNormals = normal instanceof Array ? normal : [ ];
14

15 16
	this.color = color instanceof THREE.Color ? color : new THREE.Color();
	this.vertexColors = color instanceof Array ? color : [];
17

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

20
	this.centroid = new THREE.Vector3();
21

M
Mr.doob 已提交
22
};