It seems to work now
This commit is contained in:
14
geo/Mesh.js
14
geo/Mesh.js
@@ -81,19 +81,7 @@ mesh.Mesh.prototype.addNormal = function(normal) {
|
||||
}
|
||||
|
||||
mesh.Mesh.prototype.isFinished = function() {
|
||||
// return this.faceIndex === this.faces.length;
|
||||
|
||||
for (var i = 0; i < this.faces.length; i++) {
|
||||
|
||||
if (!(this.faces[i].sent)) {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
return this.faceIndex === this.faces.length;
|
||||
}
|
||||
|
||||
// Vertex
|
||||
|
||||
@@ -85,13 +85,13 @@ geo.MeshStreamer.prototype.loadFromFile = function(path, callback) {
|
||||
// Create faces (two if Face4)
|
||||
var faces = currentMesh.addFaces(line);
|
||||
|
||||
faces[0].index = currentMesh.faces.length - (faces.length === 2 ? 1 : 2);
|
||||
faces[0].index = self.faces.length;
|
||||
faces[0].meshIndex = self.meshes.length - 1;
|
||||
self.faces.push(faces[0]);
|
||||
|
||||
if (faces.length === 2) {
|
||||
|
||||
faces[1].index = currentMesh.faces.length - 1;
|
||||
faces[1].index = self.faces.length;
|
||||
faces[1].meshIndex = self.meshes.length - 1;
|
||||
self.faces.push(faces[1]);
|
||||
|
||||
@@ -189,9 +189,10 @@ geo.MeshStreamer.prototype.nextElements = function(_camera) {
|
||||
z: camera.target.z - camera.position.z
|
||||
}
|
||||
|
||||
var sent = 0;;
|
||||
var sent = 0;
|
||||
var data = [];
|
||||
|
||||
|
||||
var mightBeCompletetlyFinished = true;
|
||||
|
||||
for (var meshIndex = 0; meshIndex < this.meshes.length; meshIndex++) {
|
||||
|
||||
Reference in New Issue
Block a user