diff --git a/js/fea/DmaPart.js b/js/fea/DmaPart.js index d0a0fd05e511d69e90353d9096474c8fb14f32e6..b3d52adc164acb644b9d1b1102847288454a5c29 100644 --- a/js/fea/DmaPart.js +++ b/js/fea/DmaPart.js @@ -22,14 +22,21 @@ DMAPart.prototype.updateForScale = function(scale, position){ if (this.mesh) { this.mesh.scale.set(scale, scale, scale); - this._setMeshPosition(scale, position); + this._setMeshPosition(position); } }; + DMAPart.prototype._setMeshPosition = function(position){ + var mesh = this.mesh; + mesh.position.x = position.x; + mesh.position.y = position.y; + mesh.position.z = position.z; + }; + DMAPart.prototype.updateForScale = function(scale, position){ if (this.mesh) { this.mesh.scale.set(scale, scale, scale); - this._setMeshPosition(scale, position); + this._setMeshPosition(position); } }; @@ -118,7 +125,7 @@ } DMATrianglePart.prototype = Object.create(DMAPart.prototype); - DMAPart.prototype._makeMeshForType = function(type){ + DMATrianglePart.prototype._makeMeshForType = function(type){ var mesh; switch(type){ case 0: @@ -138,13 +145,6 @@ return mesh; }; - DMATrianglePart.prototype._setMeshPosition = function(scale, position){ - var mesh = this.mesh; - mesh.position.x = position.x; - mesh.position.y = position.y; - mesh.position.z = position.z; - }; - self.DMATrianglePart = DMATrianglePart; })(); \ No newline at end of file