// Initialize gui window.app = {}; app.gui = {}; app.gui.main = document.createElement("div"); app.gui.main.id = "root"; document.body.appendChild(app.gui.main); app.gui.menu = document.createElement("nav"); app.gui.menu.id = "navigation"; app.gui.main.appendChild(app.gui.menu); app.gui.view = document.createElement("div"); app.gui.view.id = "view"; app.gui.main.appendChild(app.gui.view); // Library popup app.gui.library = document.createElement("dev"); // pre-populate grid with emptys for (var x = 0; x < 16; x++) { var name = "pec"+x; var thisPec = app.gui[name] = document.createElement("span"); thisPec.classList.add("pecSlot","empty"); thisPec.innerHTML = "
+
"; app.gui.view.appendChild(thisPec); }