broke out library to its own js file and implimented modules

This commit is contained in:
2025-08-18 16:50:40 -06:00
parent 5de0ea7f8a
commit 7b3aa42ef8
4 changed files with 20 additions and 11 deletions

11
main.js
View File

@@ -1,3 +1,5 @@
import { pecBoard, pec } from './pecslib.js';
// gui object classes?
// Why am I doing this?
class auxillery_dialog {
@@ -132,7 +134,6 @@ function repopBoards (current=0) {
}
}
boardTab.innerText = name;
console.log(boardTab);
}
}
@@ -204,12 +205,8 @@ repopBoards(0);
repopGrid(app.currentBoard);
// Populate Library
app.library = [];
app.library.push(new pec("No","images/cards_conversation_no.svg"));
app.library.push(new pec("Up",""));
app.library.push(new pec("More",""));
app.library.push(new pec("Drink","images/cards_food_thirsty.svg"));
app.library.push(new pec("Food","images/cards_food_hungry.svg"));
import { library as library } from './library.js';
app.library = library;
// add more here
app.library.forEach((p,i)=>{
var newPec = document.createElement("span");