Commit 65b78eb0 authored by Amanda Ghassaei's avatar Amanda Ghassaei

stopping pt

parent dcea419d
......@@ -29,11 +29,10 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
__initialize: function(){
this.listenTo(this, "change:partType change:latticeType", this._updatePartType);
this.listenTo(this, "change:cellType change:connectionType", function(){
this.listenTo(this, "change:partType", this._updatePartType);
this.listenTo(this, "change:cellType change:connectionType change:latticeType", function(){
this._updateLatticeConfig();//pass no params
});
this.listenTo(this, "change:latticeType", this._updateLatticeType);
this.listenTo(appState, "change:currentNav", this._navChanged);
this.listenTo(this, "change:cellsMin change:cellsMax", function(){
......@@ -54,24 +53,18 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
_setToDefaultsSilently: function(){
var newCellType = this.get("cellType");
var newConnectionType = this.get("connectionType");
var newLatticeType = this.get("latticeType");
if (newConnectionType == this.previous("connectionType")){
if (this.previous("cellType") !== undefined && newCellType != this.previous("cellType")){
newConnectionType = _.keys(plist.allLattices[newCellType].connection)[0];
this.set("connectionType", newConnectionType, {silent:true});
}
var newLatticeType = this.get("latticeType");
if (newLatticeType === this.previous("latticeType")){
if (this.previous("connectionType") !== undefined && newConnectionType != this.previous("connectionType")){
newLatticeType = _.keys(plist.allLattices[newCellType].connection[newConnectionType].type)[0];
this.set("latticeType", newLatticeType, {silent:true});
}
var latticeData = this._getLatticePlistData();
var newPartType = null;
if (latticeData.parts) newPartType = _.keys(latticeData.parts)[0];
this.set("partType", newPartType, {silent:true});
this._updateLatticeType();
},
......@@ -79,6 +72,10 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
var latticeData = this._getLatticePlistData();
this.set("aspectRatio", latticeData.aspectRatio.clone(), {silent:true});
var newPartType = null;
if (latticeData.parts) newPartType = _.keys(latticeData.parts)[0];
this.set("partType", newPartType, {silent:true});
var newMaterialClass = (latticeData.materialClasses || _.keys(plist.allMaterialClasses))[0];
appState.set("materialClass", newMaterialClass);
......
......@@ -56,8 +56,6 @@ define(['jquery', 'underscore', 'plist', 'backbone', 'lattice', 'appState', 'tex
serialComm.openSerialMonitor();
});
}
console.log(e);
},
_updateString: function(e){
......
......@@ -12,7 +12,8 @@ define(['jquery', 'underscore', 'backbone', 'plist', 'lattice', 'text!navViewMen
events: {
"click a": "_makeSelection",
"click #reset3DView": "_reset3DNavigation"
"click #reset3DView": "_reset3DNavigation",
"click #videoRendering": "_videoRenderingSetup"
},
initialize: function(){
......@@ -23,8 +24,9 @@ define(['jquery', 'underscore', 'backbone', 'plist', 'lattice', 'text!navViewMen
_makeSelection: function(e){
e.preventDefault();
var $target = $(e.target);
if ($target.hasClass("customClick")) return;
e.preventDefault();
if ($target.prop("tagName") == "SPAN") $target = $target.parent();
var property = $target.data("property");
var value = $target.data("value");
......@@ -47,6 +49,11 @@ define(['jquery', 'underscore', 'backbone', 'plist', 'lattice', 'text!navViewMen
this.model.reset3DNavigation();
},
_videoRenderingSetup: function(e){
e.preventDefault();
window.resizeTo(1000, 700);
},
render: function(){
this.$el.html(this.template(_.extend(this.model.toJSON(), plist, lattice.toJSON())));
......
......@@ -34,4 +34,10 @@
<% }); %>
</ul>
</li>
<li><a class="" href="#">Keyboard Shortcuts</a></li>
\ No newline at end of file
<li><a class="" href="#">Keyboard Shortcuts</a></li>
<li class="dropdown-submenu">
<a tabindex="-1">Amanda's Stuff<span class="pull-right fui-arrow-right"></span></a>
<ul class="dropdown-menu">
<li><a class="customClick" id="videoRendering" href="#">Video Rendering Setup</a></li>
</ul>
</li>
\ No newline at end of file
......@@ -216,12 +216,26 @@ define(['three'], function(THREE){
name: "Micro LEGO (low res)"
}
},
aspectRatio: new THREE.Vector3(1,1,5),//1.28
aspectRatio: new THREE.Vector3(1,1,1.28),
materialClasses: ['electronic'],
options: {
gikLength: 4
}
},
lego: {
name: "LEGO",
parts: {
lego: {
name: "LEGO Bricks"
}
},
aspectRatio: new THREE.Vector3(1,1,1.17),
materialClasses: ['mechanical'],
options: {
scale: 8.2,
units: "mm"
}
},
dnaBricks: {
name: "DNA Bricks",
parts: {
......
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