Skip to content
Snippets Groups Projects
Commit 1e00045b authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

cleanup

parent af61f55d
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment