diff --git a/js/menus/ViewMenuView.js b/js/menus/ViewMenuView.js new file mode 100644 index 0000000000000000000000000000000000000000..0131cb6b185c02b31e7c91b5b7e64dc87abe4888 --- /dev/null +++ b/js/menus/ViewMenuView.js @@ -0,0 +1,24 @@ +/** + * Created by aghassaei on 10/23/15. + */ + + +define(['jquery', 'underscore', 'menuParent', 'lattice', 'materials', 'materialsPlist', 'appState', 'text!menus/templates/ViewMenuView.html'], + function($, _, MenuParentView, lattice, materials, materialsPlist, appState, template){ + + + return MenuParentView.extend({ + + events: { + }, + + __initialize: function(){ + }, + + _makeTemplateJSON: function(){ + return _.extend(appState.toJSON(), materialsPlist, {materials:materials.list, compositeMaterialsKeys:materials.getCompositeKeys()}); + }, + + template: _.template(template) + }); +}); \ No newline at end of file diff --git a/js/menus/templates/ViewMenuView.html b/js/menus/templates/ViewMenuView.html new file mode 100644 index 0000000000000000000000000000000000000000..7c5c3af364337e4b8cc482d787209415baf63ed5 --- /dev/null +++ b/js/menus/templates/ViewMenuView.html @@ -0,0 +1,18 @@ +Set Material Visibility: +<% _.each(_.keys(allMaterials[materialClass]), function(key){ %> + <div class="materialColorSwatch"> + <div style="background-color:<% if(realisticColorScheme){ %><%= materials[key].color %><% }else{ %><%= materials[key].altColor %><% } %>"></div> + <span class="materialListTitle"><%= materials[key].name %></span></div> +<% }); %> +<% _.each(materials, function(material, key){ + if (key.substr(0,5) == "super") return; + if (material.noDelete) return; %> + <div class="materialColorSwatch"> + <div style="background-color:<% if(realisticColorScheme){ %><%= material.color %><% }else{ %><%= material.altColor %><% } %>"></div> + <span class="materialListTitle"><%= material.name %></span></div> +<% }); %> +<% _.each(compositeMaterialsKeys, function(key){ %> + <div class="materialColorSwatch"> + <div style="background-color:<% if(realisticColorScheme){ %><%= materials[key].color %><% }else{ %><%= materials[key].altColor %><% } %>"></div> + <span class="materialListTitle"><%= materials[key].name %></span></div> +<% }); %><br/> \ No newline at end of file diff --git a/js/plists/PList.js b/js/plists/PList.js index cfc71501eba9bef19d7776ca30f6c8199837a8ce..19f4628f4eb59039cb11526cdaf9be5fca310a72 100644 --- a/js/plists/PList.js +++ b/js/plists/PList.js @@ -14,6 +14,7 @@ define(['three'], function(THREE){ material:"Materials", // import:"Import", part:"Part" +// view: "View" //script:"Script" } },