From e87f06104e1a2213d0015620d02769def7b21a45 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 27 Oct 2017 11:03:21 +0200 Subject: [PATCH] unneeded 'loaded' --- src/game-lib-d3-mesh-0.js | 4 ++-- src/game-lib-d3-render-target.js | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) 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); }