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

3
.gitignore vendored
View file

@ -2,4 +2,5 @@ node_modules
eventmapper_config.json
data
files
assets/styles/.old
assets/styles/.old
.vercel

View file

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

View file

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

View file

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

View file

@ -101,7 +101,7 @@
</div>
</div>
</div>
<script src="/assets/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>
</html>

1
vercel.json Normal file
View file

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