From 957686e12eb765a2445afb884a09e99077a48ba0 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 11 Feb 2015 09:04:56 -0800 Subject: [PATCH] Remove upload from file from editEntities.js --- examples/editEntities.js | 75 +--------------------------------------- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/examples/editEntities.js b/examples/editEntities.js index 83550811f1..a9d2b1bc2a 100644 --- a/examples/editEntities.js +++ b/examples/editEntities.js @@ -105,15 +105,7 @@ var toolBar = (function () { newSphereButton, newLightButton, newTextButton, - browseModelsButton, - loadURLMenuItem, - loadFileMenuItem, - menuItemWidth, - menuItemOffset, - menuItemHeight, - menuItemMargin = 5, - menuTextColor = { red: 255, green: 255, blue: 255 }, - menuBackgroundColor = { red: 18, green: 66, blue: 66 }; + browseModelsButton; function initialize() { toolBar = new ToolBar(0, 0, ToolBar.VERTICAL); @@ -145,34 +137,6 @@ var toolBar = (function () { visible: true }); - menuItemOffset = toolBar.height / 3 + 2; - menuItemHeight = Tool.IMAGE_HEIGHT / 2 - 2; - - loadURLMenuItem = Overlays.addOverlay("text", { - height: menuItemHeight, - backgroundColor: menuBackgroundColor, - topMargin: menuItemMargin, - text: "Model URL", - alpha: 0.9, - backgroundAlpha: 0.9, - visible: false - }); - - loadFileMenuItem = Overlays.addOverlay("text", { - height: menuItemHeight, - backgroundColor: menuBackgroundColor, - topMargin: menuItemMargin, - text: "Model File", - alpha: 0.9, - backgroundAlpha: 0.9, - visible: false - }); - - menuItemWidth = Math.max(Overlays.textSize(loadURLMenuItem, "Model URL").width, - Overlays.textSize(loadFileMenuItem, "Model File").width) + 20; - Overlays.editOverlay(loadURLMenuItem, { width: menuItemWidth }); - Overlays.editOverlay(loadFileMenuItem, { width: menuItemWidth }); - newCubeButton = toolBar.addTool({ imageURL: toolIconUrl + "add-cube.svg", subImage: { x: 0, y: Tool.IMAGE_WIDTH, width: Tool.IMAGE_WIDTH, height: Tool.IMAGE_HEIGHT }, @@ -211,17 +175,6 @@ var toolBar = (function () { } - function toggleNewModelButton(active) { - if (active === undefined) { - active = !toolBar.toolSelected(newModelButton); - } - toolBar.selectTool(newModelButton, active); - - Overlays.editOverlay(loadURLMenuItem, { visible: active }); - Overlays.editOverlay(loadFileMenuItem, { visible: active }); - } - - that.setActive = function(active) { if (active != isActive) { isActive = active; @@ -306,9 +259,6 @@ var toolBar = (function () { toolsY = (windowDimensions.y - toolBar.height) / 2; toolBar.move(toolsX, toolsY); - - Overlays.editOverlay(loadURLMenuItem, { x: toolsX - menuItemWidth, y: toolsY + menuItemOffset }); - Overlays.editOverlay(loadFileMenuItem, { x: toolsX - menuItemWidth, y: toolsY + menuItemOffset + menuItemHeight }); }; that.mousePressEvent = function (event) { @@ -324,12 +274,6 @@ var toolBar = (function () { } if (newModelButton === toolBar.clicked(clickedOverlay)) { - toggleNewModelButton(); - return true; - } - - if (clickedOverlay === loadURLMenuItem) { - toggleNewModelButton(false); url = Window.prompt("Model URL", modelURLs[Math.floor(Math.random() * modelURLs.length)]); if (url !== null && url !== "") { addModel(url); @@ -337,22 +281,7 @@ var toolBar = (function () { return true; } - if (clickedOverlay === loadFileMenuItem) { - toggleNewModelButton(false); - - file = Window.browse("Select your model file ...", - Settings.getValue("LastModelUploadLocation").path(), - "Model files (*.fst *.fbx)"); - //"Model files (*.fst *.fbx *.svo)"); - if (file !== null) { - Settings.setValue("LastModelUploadLocation", file); - modelUploader.upload(file, addModel); - } - return true; - } - if (browseModelsButton === toolBar.clicked(clickedOverlay)) { - toggleNewModelButton(false); url = Window.s3Browse(".*(fbx|FBX)"); if (url !== null && url !== "") { addModel(url); @@ -443,8 +372,6 @@ var toolBar = (function () { that.cleanup = function () { toolBar.cleanup(); - Overlays.deleteOverlay(loadURLMenuItem); - Overlays.deleteOverlay(loadFileMenuItem); }; return that;