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

structural material types

parent 0c4e74bf
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,7 @@ require.config({
//materials
materials: 'materials/DMAMaterials',
electronicMaterials: 'materials/ElectronicMaterials',
mechanicalMaterials: 'materials/MechanicalMaterials',
//UI
navbar: 'menus/Navbar',
......
......@@ -6,7 +6,7 @@
define(['underscore', 'three', 'appState', 'plist', 'materials'], function(_, THREE, appState, plist, DMAMaterials){
function ElectronicMaterials(){
DMAMaterials.call(this, plist.allMaterialTypes.cube.gik);
DMAMaterials.call(this, plist.allMaterials.electronic);
}
ElectronicMaterials.prototype = Object.create(DMAMaterials.prototype);
......
/**
* Created by aghassaei on 6/4/15.
*/
define(['underscore', 'three', 'appState', 'plist', 'materials'], function(_, THREE, appState, plist, DMAMaterials){
function MechanicalMaterials(){
DMAMaterials.call(this, plist.allMaterials.mechanical);
}
MechanicalMaterials.prototype = Object.create(DMAMaterials.prototype);
var material = new MechanicalMaterials();
return {
changeMaterials: material.changeMaterials,
materials: material.materials
}
});
\ No newline at end of file
......@@ -34,12 +34,12 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice'], function($, _
<br/><br/>--><br/>\
<% if (allMaterialTypes[cellType][connectionType]){ %> \
Materials:<br/>\
<% _.each(_.keys(allMaterialTypes[cellType][connectionType]), function(key){ %>\
<% _.each(_.keys(allMaterials[allMaterialTypes[cellType][connectionType]]), function(key){ %>\
<label class="radio colorSwatches">\
<input type="radio" <%if (key == materialType){ %>checked<%}%> name="materialType" value="<%= key %>" data-toggle="radio" class="custom-radio lattice"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>\
<div class="materialColorSwatch">\
<div style="background-color:<% if(realisticColorScheme){ %><%= allMaterialTypes[cellType][connectionType][key].color %><% }else{ %><%= allMaterialTypes[cellType][connectionType][key].altColor %><% } %>"></div>\
<span><%= allMaterialTypes[cellType][connectionType][key].name %></span></div>\
<div style="background-color:<% if(realisticColorScheme){ %><%= allMaterials[allMaterialTypes[cellType][connectionType]][key].color %><% }else{ %><%= allMaterials[allMaterialTypes[cellType][connectionType]][key].altColor %><% } %>"></div>\
<span><%= allMaterials[allMaterialTypes[cellType][connectionType]][key].name %></span></div>\
</label>\
<% }); %>\
<br/>\
......
......@@ -29,10 +29,10 @@ define(['three'], function(THREE){
allCellTypes: {
octa:"Octahedron",
tetra: "Tetrahedron (Coming Soon)",
cube:"Cube",
truncatedCube:"Cuboctahedron",
kelvin:"Kelvin"
tetra: "Tetrahedron (Coming Soon)",
cube:"Cube",
truncatedCube:"Cuboctahedron",
kelvin:"Kelvin"
},
allConnectionTypes: {
octa: {face:"Face", edgeRot:"Edge", vertex:"Vertex"},//edge:"Edge", freeformFace:"Freeform Face"
......@@ -74,14 +74,22 @@ define(['three'], function(THREE){
allMaterialTypes:{
octa:{
face: null,
edge: null,
edgeRot: null,
vertex: null
face: 'mechanical',
edge: 'mechanical',
edgeRot: 'mechanical',
vertex: 'mechanical'
},
tetra: {vertex: null},
cube: {face: null,
gik: {
tetra: {vertex: 'mechanical'},
cube: {
face: 'mechanical',
gik: 'electronic'
},
truncatedCube: {face: 'mechanical'},
kelvin: {face: 'mechanical'}
},
allMaterials:{
electronic:{
brass:{
name: "Brass",
color: "#b5a642",
......@@ -121,10 +129,19 @@ define(['three'], function(THREE){
//857B64
//FDE2D9
//D77948
}
},
truncatedCube: {face: null},
kelvin: {face: null}
mechanical:{
rigid:{
name: "Rigid",
color: "#b5a642",
altColor: "#857B64"
},
flexure: {
name: "Flexure",
color: "#fef1b5",
altColor: "#ecf0f1"
}
}
},
allMachineTypes:{
......
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