diff --git a/src/game-lib-d3-mesh-0.js b/src/game-lib-d3-mesh-0.js index 8eccf12..5b8ebc0 100644 --- a/src/game-lib-d3-mesh-0.js +++ b/src/game-lib-d3-mesh-0.js @@ -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; } diff --git a/src/game-lib-d3-render-target.js b/src/game-lib-d3-render-target.js index 7c24e94..17c426d 100644 --- a/src/game-lib-d3-render-target.js +++ b/src/game-lib-d3-render-target.js @@ -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); }