diff --git a/cave/index.js b/cave/index.js index 74b5940..3878f41 100644 --- a/cave/index.js +++ b/cave/index.js @@ -24,12 +24,7 @@ class Canvas { /* ----------------------------- Rectangle ----------------------------- */ - rect = { - x: -300, - y: -200, - w: 600, - h: 400 - }; + rects = []; resize = () => { // Make Canvas Fill Screen @@ -97,40 +92,50 @@ class Canvas { ctx.clearRect(0, 0, this.c.width, this.c.height); let drawMenus = () => { - - ctx.setTransform(1, 0, 0, 1, 0, 0); // reset transform for UI - ctx.fillStyle = "rgba(30,30,30,0.8)"; - ctx.fillRect(10,10,150,100); - ctx.fillStyle = "#FEB279"; - ctx.fillRect(20,20,120,30); - ctx.fillRect(20,60,120,30); + ctx.strokeRect(20,20,220,100); ctx.fillStyle = "#000"; ctx.font = "60px arial"; - ctx.fillText("Button 1", 20, 40); - ctx.fillText("Button 2", 20, 80); + // ctx.fillText("Button 1", 20, 100); } - let drawSpace = () => { - ctx.translate(this.c.width / 2, this.c.height / 2); - ctx.scale(scale, scale); - ctx.translate(-camera.x, -camera.y); + let drawSpaces = () => { + for(let i=0; i { - let filePath = path.join(util.CAVE_PATH, "index.html"); - res.sendFile(filePath) + getDownloads = async (req, res) => { + let arr = await getAllDownloadsFiles() + console.log(arr) + res.json(arr) } get = async (req, res) => {