unneeded 'loaded'

beta.r3js.org
-=yb4f310 2017-10-27 11:03:21 +02:00
parent e2c307ec78
commit e87f06104e
2 changed files with 3 additions and 4 deletions

View File

@ -481,7 +481,7 @@ GameLib.D3.Mesh.prototype.createInstance = function() {
this.instance.name = this.name;
if (this.parentMesh && this.parentMesh.loaded) {
if (this.parentMesh && this.parentMesh.instance) {
this.parentMesh.add(this.instance, this);
}
@ -550,7 +550,7 @@ GameLib.D3.Mesh.prototype.updateInstance = function() {
this.instance.rotation.z = this.rotation.z;
}
if (this.parentMesh && this.parentMesh.loaded) {
if (this.parentMesh && this.parentMesh.instance) {
if (this.instance.parent !== this.parentMesh.instance) {
this.instance.parent = this.parentMesh.instance;
}

View File

@ -77,7 +77,7 @@ GameLib.D3.RenderTarget.prototype.updateInstance = function() {
if (this.instance) {
this.instance.setSize(this.width, this.height);
this.instance.stencilBuffer = this.stencilBuffer;
if (this.texture && this.texture.loaded) {
if (this.texture && this.texture.instance) {
this.instance.texture = this.texture.instance;
this.instance.texture.needsUpdate = true;
} else {
@ -86,7 +86,6 @@ GameLib.D3.RenderTarget.prototype.updateInstance = function() {
} else {
try {
this.createInstance();
this.loaded = true;
} catch (error) {
console.error(error);
}