Corrected all bugs
This commit is contained in:
parent
f808aebe4f
commit
567fa552d8
|
@ -334,16 +334,13 @@ geo.MeshStreamer.prototype.nextElements = function(_camera) {
|
||||||
var data = [];
|
var data = [];
|
||||||
|
|
||||||
// Sort faces
|
// Sort faces
|
||||||
this.orderedFaces.sort(this.faceComparator(camera));
|
|
||||||
|
|
||||||
var mightBeCompletetlyFinished = true;
|
var mightBeCompletetlyFinished = true;
|
||||||
|
|
||||||
for (var faceIndex = 0; faceIndex < this.orderedFaces.length; faceIndex++) {
|
for (var meshIndex = 0; meshIndex < this.meshes.length; meshIndex++) {
|
||||||
|
|
||||||
var currentFace = this.orderedFaces[faceIndex];
|
var currentMesh = this.meshes[meshIndex];
|
||||||
var currentMesh = this.meshes[currentFace.meshIndex];
|
|
||||||
|
|
||||||
if (currentFace.sent) {
|
if (currentMesh.isFinished()) {
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -353,6 +350,16 @@ geo.MeshStreamer.prototype.nextElements = function(_camera) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (var faceIndex = 0; faceIndex < currentMesh.faces.length; faceIndex++) {
|
||||||
|
|
||||||
|
var currentFace = currentMesh.faces[faceIndex];
|
||||||
|
|
||||||
|
if (currentFace.sent) {
|
||||||
|
|
||||||
|
continue;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
var vertex1 = this.vertices[currentFace.a];
|
var vertex1 = this.vertices[currentFace.a];
|
||||||
var vertex2 = this.vertices[currentFace.b];
|
var vertex2 = this.vertices[currentFace.b];
|
||||||
var vertex3 = this.vertices[currentFace.c];
|
var vertex3 = this.vertices[currentFace.c];
|
||||||
|
@ -481,6 +488,7 @@ geo.MeshStreamer.prototype.nextElements = function(_camera) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {data: data, finished: mightBeCompletetlyFinished};
|
return {data: data, finished: mightBeCompletetlyFinished};
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,9 @@ ProgressiveLoaderGeometry.prototype.load = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ProgressiveLoaderGeometry.prototype.getCamera = function() {
|
ProgressiveLoaderGeometry.prototype.getCamera = function() {
|
||||||
|
if (this.camera === null)
|
||||||
|
return null;
|
||||||
|
|
||||||
return [this.camera.position.x, this.camera.position.y, this.camera.position.z,
|
return [this.camera.position.x, this.camera.position.y, this.camera.position.z,
|
||||||
this.camera.target.x, this.camera.target.y, this.camera.target.z];
|
this.camera.target.x, this.camera.target.y, this.camera.target.z];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue