Skip to content
Snippets Groups Projects
Commit 3d9878b5 authored by amandaghassaei's avatar amandaghassaei
Browse files

assembler control points scale

parent 00781bf4
No related branches found
No related tags found
No related merge requests found
...@@ -139,12 +139,12 @@ nav .btn { ...@@ -139,12 +139,12 @@ nav .btn {
} }
#menuContent{ #menuContent{
padding: 30px; padding: 30px 30px 100px 30px;
overflow-y: scroll; overflow-y: scroll;
top: 100px; top: 50px;
bottom: 0; bottom: 0;
position: fixed; position: absolute;
width: 400px; width: 100%;
} }
hr { hr {
......
...@@ -47,21 +47,28 @@ Assembler = Backbone.Model.extend({ ...@@ -47,21 +47,28 @@ Assembler = Backbone.Model.extend({
"change:cellType " + "change:cellType " +
"change:connectionType", "change:connectionType",
this._setNeedsPostProcessing); this._setNeedsPostProcessing);
this.listenTo(options.lattice, "change:scale", this._setCAMScale);
//init origin mesh //init origin mesh
var scale = options.lattice.get("scale"); var origin = new THREE.Mesh(new THREE.SphereGeometry(1),
var origin = new THREE.Mesh(new THREE.SphereGeometry(scale/4),
new THREE.MeshBasicMaterial({color:0xff0000})); new THREE.MeshBasicMaterial({color:0xff0000}));
dmaGlobals.three.sceneAdd(origin); dmaGlobals.three.sceneAdd(origin);
this.set("origin", origin); this.set("origin", origin);
//init stock mesh //init stock mesh
var stock = new THREE.Mesh(new THREE.SphereGeometry(scale/4), var stock = new THREE.Mesh(new THREE.SphereGeometry(1),
new THREE.MeshBasicMaterial({color:0xff00ff})); new THREE.MeshBasicMaterial({color:0xff00ff}));
dmaGlobals.three.sceneAdd(stock); dmaGlobals.three.sceneAdd(stock);
this.set("stock", stock); this.set("stock", stock);
this._setCAMScale(options.lattice.get("scale"));
this._setCAMVisibility(); this._setCAMVisibility();
}, },
_setCAMScale: function(scale){
var scale = dmaGlobals.lattice.get("scale")/8;
this.get("origin").scale.set(scale, scale, scale);
this.get("stock").scale.set(scale, scale, scale);
},
_setCAMVisibility: function(){ _setCAMVisibility: function(){
var visible = false; var visible = false;
var currentTab = dmaGlobals.appState.get("currentTab"); var currentTab = dmaGlobals.appState.get("currentTab");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment