Commit 4adedfec authored by amandaghassaei's avatar amandaghassaei

only save quaternion when you need it

parent eb98d626
......@@ -328,9 +328,11 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals', '
DMACell.prototype.toJSON = function(){
var data = {
materialID: this.getMaterialID(),
quaternion: this.getOrientation()
materialID: this.getMaterialID()
};
var quaternion = this.getOrientation();
if (quaternion.x == 0 && quaternion.y == 0 && quaternion.z == 0 && quaternion.w == 1) return data;
data.quaternion = quaternion;
return data;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment