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

sketch plane

parent 06c2fee2
Branches
No related tags found
No related merge requests found
......@@ -128,8 +128,12 @@ OctaBasePlane = BasePlane.extend({
_renderZIndexChange: function(){
var zIndex = this.get("zIndex");
var scale = dmaGlobals.lattice.get("scale");
var xScale = dmaGlobals.lattice.xScale(scale);
var yScale = dmaGlobals.lattice.yScale(scale);
var zScale = dmaGlobals.lattice.zScale(scale);
_.each(this.get("mesh"), function(mesh){
mesh.position.set(0, 0, zIndex*scale*2/Math.sqrt(6));
mesh.position.set(xScale*(zIndex%2)/2, -yScale/3*(zIndex%2), zIndex*zScale);
mesh.rotation.set(Math.PI*(zIndex%2),0,0)
});
dmaGlobals.three.render();
......@@ -220,9 +224,9 @@ SquareBasePlane = BasePlane.extend({
_renderZIndexChange: function(){
var zIndex = this.get("zIndex");
var scale = dmaGlobals.lattice.get("scale");
var zScale = dmaGlobals.lattice.zScale();
_.each(this.get("mesh"), function(mesh){
mesh.position.set(0, 0, zIndex*scale);
mesh.position.set(0, 0, zIndex*zScale);
});
dmaGlobals.three.render();
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment