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

more scaling stuff

parent 7125987a
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,9 @@ LatticeMenuView = Backbone.View.extend({
},
_sliderDidSlide: function(e){
this.model.previewScaleChange($(e.target)[0].value);
var scale = $(e.target)[0].value;
this.model.previewScaleChange(scale);//does not trigger lattice change event - no rerendering of ui
$("#latticeScale").val(scale);
window.three.render();
},
......
......@@ -31,6 +31,7 @@ BasePlane = Backbone.Model.extend({
},
updateScale: function(scale){
//todo this should work by mesh scaling, figure out what's up
var newGeometry = this.get("unitGeometry").clone();
newGeometry.applyMatrix(new THREE.Matrix4().makeScale(scale, scale, scale));
var geometry = this.get("mesh").geometry;
......
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