bg's final

beta.r3js.org
-=yb4f310 2018-02-09 21:19:57 +01:00
parent 78b5732879
commit c0d8a4e8c6
1 changed files with 5 additions and 11 deletions

View File

@ -27,7 +27,6 @@ GameLib.D3.BufferGeometry = function(
apiBufferGeometry.parentEntity,
apiBufferGeometry.faces,
apiBufferGeometry.vertices,
apiBufferGeometry.colors,
apiBufferGeometry.attributes,
apiBufferGeometry.boundingBox,
apiBufferGeometry.boundingSphere,
@ -37,15 +36,6 @@ GameLib.D3.BufferGeometry = function(
apiBufferGeometry.morphAttributes
);
this.colors = this.colors.map(
function(color) {
return new GameLib.Color(
this.graphics,
color
)
}.bind(this)
);
this.faces = this.faces.map(
function(face) {
return new GameLib.D3.Face(
@ -163,7 +153,11 @@ GameLib.D3.BufferGeometry.prototype.createInstance = function() {
)
);
this.instance.addAttribute('uv', new THREE.BufferAttribute(uvs, 2));
/**
* Normals
* @type {Float32Array}
*/
var normals = new Float32Array(
this.faces.reduce(
function(result, face) {