shhhh, Damn Vercel

This commit is contained in:
MeowcaTheoRange 2024-06-10 23:16:13 -05:00
parent 379ce00875
commit 2d6d97b7b6
7 changed files with 19 additions and 11 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@ eventmapper_config.json
data data
files files
assets/styles/.old assets/styles/.old
.vercel

View file

@ -1,6 +1,7 @@
export class GameObjManager { export class GameObjManager {
map; map;
opts = { opts = {
textColor: "FFFFFF",
bgColor: "303030", bgColor: "303030",
bgFocusColor: "505030", bgFocusColor: "505030",
bgHoverColor: "505050", bgHoverColor: "505050",
@ -40,7 +41,7 @@ export class GameObjManager {
this.floorObject = this.map.kp.make([ this.floorObject = this.map.kp.make([
this.map.kp.polygon(polygon.pts), this.map.kp.polygon(polygon.pts),
this.map.kp.color(this.map.kp.Color.fromHex("303030")), this.map.kp.color(this.map.kp.Color.fromHex(this.opts.bgColor)),
this.map.kp.opacity(this.opts.floorOpacity), this.map.kp.opacity(this.opts.floorOpacity),
this.map.kp.pos(), this.map.kp.pos(),
this.map.kp.z(5), this.map.kp.z(5),
@ -67,7 +68,7 @@ export class GameObjManager {
text: currentFloor.name, text: currentFloor.name,
size: 24 * camScale, size: 24 * camScale,
pos: this.map.kp.vec2(-4 * camScale, -8 * camScale), pos: this.map.kp.vec2(-4 * camScale, -8 * camScale),
color: this.map.kp.WHITE, color: this.map.kp.Color.fromHex(this.opts.textColor),
anchor: "botleft", anchor: "botleft",
}); });
}); });
@ -207,7 +208,7 @@ export class GameObjManager {
text: room.shortName + "…", text: room.shortName + "…",
size: this.opts.fontSize * camScale, size: this.opts.fontSize * camScale,
pos: polygon.bbox().center(), pos: polygon.bbox().center(),
color: this.map.kp.WHITE, color: this.map.kp.Color.fromHex(this.opts.textColor),
align: "center", align: "center",
anchor: "center", anchor: "center",
}); });
@ -217,7 +218,7 @@ export class GameObjManager {
width: polygon.bbox().width, width: polygon.bbox().width,
size: this.opts.fontSize * camScale, size: this.opts.fontSize * camScale,
pos: polygon.bbox().center(), pos: polygon.bbox().center(),
color: this.map.kp.WHITE, color: this.map.kp.Color.fromHex(this.opts.textColor),
align: "center", align: "center",
anchor: "center", anchor: "center",
}); });

View file

@ -15,11 +15,13 @@ const kp = kaplay({
global: false, global: false,
maxFPS: 120, maxFPS: 120,
texFilter: "nearest", texFilter: "nearest",
background: "404040", background: window.backgroundBranding ?? "404040",
}); });
const kaplaymap = new KaplayMap(kp, {}); const kaplaymap = new KaplayMap(kp, {});
const eventmappermanager = new EventMapperManager(kaplaymap, mapUi); const eventmappermanager = new EventMapperManager(kaplaymap, mapUi, {
gameobj: window.gameObjBranding,
});
async function main() { async function main() {
const grid = kp.loadSprite(null, "/files/images/grid.png"); const grid = kp.loadSprite(null, "/files/images/grid.png");

View file

@ -27,8 +27,7 @@ hr {
button { button {
background-color: transparent; background-color: transparent;
border: none; color: currentColor;
color: white;
font: inherit; font: inherit;
padding: 4px; padding: 4px;
border-radius: 4px; border-radius: 4px;
@ -42,13 +41,17 @@ button:active {
background-color: #0004; background-color: #0004;
} }
button:disabled {
background-color: #80808040;
}
button.selected { button.selected {
border: 1px solid #fff; border: 1px solid #fff;
} }
input { input {
background-color: #0004; background-color: #0004;
border: none;
color: white; color: white;
font: inherit; font: inherit;
box-sizing: border-box; box-sizing: border-box;

View file

@ -101,7 +101,7 @@
</div> </div>
</div> </div>
</div> </div>
<script src="/assets/scripts/script.js" type="module"></script>
<script src="/files/scripts/script.js" type="module"></script> <script src="/files/scripts/script.js" type="module"></script>
<script src="/assets/scripts/script.js" type="module"></script>
</body> </body>
</html> </html>

1
vercel.json Normal file
View file

@ -0,0 +1 @@
{ "version": 2, "rewrites": [{ "source": "/(.*)", "destination": "/scripts" }] }