From a14ca1e7abcdd961e042c9e66d98f4f69079a7b2 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Thu, 12 Oct 2017 00:11:51 +0200 Subject: [PATCH] scale update instance --- src/game-lib-d3-mesh-0.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/game-lib-d3-mesh-0.js b/src/game-lib-d3-mesh-0.js index 06c77f1..af07415 100644 --- a/src/game-lib-d3-mesh-0.js +++ b/src/game-lib-d3-mesh-0.js @@ -1248,6 +1248,23 @@ GameLib.D3.Mesh.prototype.updateInstancePosition = function() { } }; +GameLib.D3.Mesh.prototype.updateInstanceScale = function() { + + this.scale.instance.set( + this.scale.x, + this.scale.y, + this.scale.z + ); + + this.instance.scale.copy(this.scale.instance); + + if (this.helper) { + this.removeHelper(); + this.createHelper(); + } +}; + + /** * Gets all children components of this Mesh (all linked objects only - no object references i.e. string ids)