2021-05-19 22:21:51 +00:00
|
|
|
<template>
|
First pass at typescript support
Oh man did this end up requiring a *ton* of other work as well.
There's still a few typing issues I still can't quite work out,
and others I'd like to improve when I have time. In fact, this version
doesn't even really work, it has a stack overflow error caused by
a tooltip for some reason have a tree inside it, which in turn has
another tooltip, etc. There's also 17 errors that I *really* feel like
shouldn't be there, but they are, and 113 warnings - mostly using !
to assert that things are non-null. Lots of work left to do, to sum up.
The reason I'm committing this now is because I really need to get to
work on my game jam, and since it won't use a tree or really many of
TMT-X's features, I can get away with using a broken engine :)
2021-08-17 04:30:54 +00:00
|
|
|
<div id="modal-root" :style="theme" />
|
2022-03-27 05:49:04 +00:00
|
|
|
<div class="app" :style="theme" :class="{ useHeader }">
|
First pass at typescript support
Oh man did this end up requiring a *ton* of other work as well.
There's still a few typing issues I still can't quite work out,
and others I'd like to improve when I have time. In fact, this version
doesn't even really work, it has a stack overflow error caused by
a tooltip for some reason have a tree inside it, which in turn has
another tooltip, etc. There's also 17 errors that I *really* feel like
shouldn't be there, but they are, and 113 warnings - mostly using !
to assert that things are non-null. Lots of work left to do, to sum up.
The reason I'm committing this now is because I really need to get to
work on my game jam, and since it won't use a tree or really many of
TMT-X's features, I can get away with using a broken engine :)
2021-08-17 04:30:54 +00:00
|
|
|
<Nav v-if="useHeader" />
|
2022-01-14 04:25:47 +00:00
|
|
|
<Game />
|
2022-02-27 19:49:34 +00:00
|
|
|
<TPS v-if="unref(showTPS)" />
|
First pass at typescript support
Oh man did this end up requiring a *ton* of other work as well.
There's still a few typing issues I still can't quite work out,
and others I'd like to improve when I have time. In fact, this version
doesn't even really work, it has a stack overflow error caused by
a tooltip for some reason have a tree inside it, which in turn has
another tooltip, etc. There's also 17 errors that I *really* feel like
shouldn't be there, but they are, and 113 warnings - mostly using !
to assert that things are non-null. Lots of work left to do, to sum up.
The reason I'm committing this now is because I really need to get to
work on my game jam, and since it won't use a tree or really many of
TMT-X's features, I can get away with using a broken engine :)
2021-08-17 04:30:54 +00:00
|
|
|
<GameOverScreen />
|
|
|
|
<NaNScreen />
|
2022-03-20 04:59:52 +00:00
|
|
|
<component :is="gameComponent" />
|
First pass at typescript support
Oh man did this end up requiring a *ton* of other work as well.
There's still a few typing issues I still can't quite work out,
and others I'd like to improve when I have time. In fact, this version
doesn't even really work, it has a stack overflow error caused by
a tooltip for some reason have a tree inside it, which in turn has
another tooltip, etc. There's also 17 errors that I *really* feel like
shouldn't be there, but they are, and 113 warnings - mostly using !
to assert that things are non-null. Lots of work left to do, to sum up.
The reason I'm committing this now is because I really need to get to
work on my game jam, and since it won't use a tree or really many of
TMT-X's features, I can get away with using a broken engine :)
2021-08-17 04:30:54 +00:00
|
|
|
</div>
|
2021-05-19 22:21:51 +00:00
|
|
|
</template>
|
|
|
|
|
2022-03-20 04:59:52 +00:00
|
|
|
<script setup lang="tsx">
|
|
|
|
import { jsx } from "features/feature";
|
|
|
|
import { coerceComponent, render } from "util/vue";
|
2022-02-27 19:49:34 +00:00
|
|
|
import { computed, toRef, unref } from "vue";
|
2022-02-27 22:04:56 +00:00
|
|
|
import Game from "./components/Game.vue";
|
|
|
|
import GameOverScreen from "./components/GameOverScreen.vue";
|
|
|
|
import NaNScreen from "./components/NaNScreen.vue";
|
|
|
|
import Nav from "./components/Nav.vue";
|
|
|
|
import TPS from "./components/TPS.vue";
|
2022-03-03 02:12:56 +00:00
|
|
|
import projInfo from "./data/projInfo.json";
|
2021-09-05 23:53:04 +00:00
|
|
|
import themes from "./data/themes";
|
2022-03-20 04:59:52 +00:00
|
|
|
import settings, { gameComponents } from "./game/settings";
|
First pass at typescript support
Oh man did this end up requiring a *ton* of other work as well.
There's still a few typing issues I still can't quite work out,
and others I'd like to improve when I have time. In fact, this version
doesn't even really work, it has a stack overflow error caused by
a tooltip for some reason have a tree inside it, which in turn has
another tooltip, etc. There's also 17 errors that I *really* feel like
shouldn't be there, but they are, and 113 warnings - mostly using !
to assert that things are non-null. Lots of work left to do, to sum up.
The reason I'm committing this now is because I really need to get to
work on my game jam, and since it won't use a tree or really many of
TMT-X's features, I can get away with using a broken engine :)
2021-08-17 04:30:54 +00:00
|
|
|
import "./main.css";
|
2022-08-22 13:14:04 +00:00
|
|
|
import "@fontsource/roboto-mono";
|
2022-06-26 03:34:18 +00:00
|
|
|
import type { CSSProperties } from "vue";
|
2021-05-20 04:27:23 +00:00
|
|
|
|
2022-03-03 02:12:56 +00:00
|
|
|
const useHeader = projInfo.useHeader;
|
2022-06-26 03:34:18 +00:00
|
|
|
const theme = computed(() => themes[settings.theme].variables as CSSProperties);
|
2022-01-14 04:25:47 +00:00
|
|
|
const showTPS = toRef(settings, "showTPS");
|
2022-03-20 04:59:52 +00:00
|
|
|
|
|
|
|
const gameComponent = computed(() => {
|
2022-12-21 03:26:25 +00:00
|
|
|
return coerceComponent(jsx(() => (<>{gameComponents.map(render)}</>)));
|
2022-03-20 04:59:52 +00:00
|
|
|
});
|
2021-05-19 22:21:51 +00:00
|
|
|
</script>
|
|
|
|
|
2021-06-12 04:38:16 +00:00
|
|
|
<style scoped>
|
2021-07-24 22:08:52 +00:00
|
|
|
.app {
|
First pass at typescript support
Oh man did this end up requiring a *ton* of other work as well.
There's still a few typing issues I still can't quite work out,
and others I'd like to improve when I have time. In fact, this version
doesn't even really work, it has a stack overflow error caused by
a tooltip for some reason have a tree inside it, which in turn has
another tooltip, etc. There's also 17 errors that I *really* feel like
shouldn't be there, but they are, and 113 warnings - mostly using !
to assert that things are non-null. Lots of work left to do, to sum up.
The reason I'm committing this now is because I really need to get to
work on my game jam, and since it won't use a tree or really many of
TMT-X's features, I can get away with using a broken engine :)
2021-08-17 04:30:54 +00:00
|
|
|
background-color: var(--background);
|
2021-09-04 21:51:41 +00:00
|
|
|
color: var(--foreground);
|
First pass at typescript support
Oh man did this end up requiring a *ton* of other work as well.
There's still a few typing issues I still can't quite work out,
and others I'd like to improve when I have time. In fact, this version
doesn't even really work, it has a stack overflow error caused by
a tooltip for some reason have a tree inside it, which in turn has
another tooltip, etc. There's also 17 errors that I *really* feel like
shouldn't be there, but they are, and 113 warnings - mostly using !
to assert that things are non-null. Lots of work left to do, to sum up.
The reason I'm committing this now is because I really need to get to
work on my game jam, and since it won't use a tree or really many of
TMT-X's features, I can get away with using a broken engine :)
2021-08-17 04:30:54 +00:00
|
|
|
display: flex;
|
|
|
|
flex-flow: column;
|
|
|
|
min-height: 100%;
|
|
|
|
height: 100%;
|
2021-07-24 22:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#modal-root {
|
|
|
|
position: absolute;
|
First pass at typescript support
Oh man did this end up requiring a *ton* of other work as well.
There's still a few typing issues I still can't quite work out,
and others I'd like to improve when I have time. In fact, this version
doesn't even really work, it has a stack overflow error caused by
a tooltip for some reason have a tree inside it, which in turn has
another tooltip, etc. There's also 17 errors that I *really* feel like
shouldn't be there, but they are, and 113 warnings - mostly using !
to assert that things are non-null. Lots of work left to do, to sum up.
The reason I'm committing this now is because I really need to get to
work on my game jam, and since it won't use a tree or really many of
TMT-X's features, I can get away with using a broken engine :)
2021-08-17 04:30:54 +00:00
|
|
|
min-height: 100%;
|
|
|
|
height: 100%;
|
2023-02-21 03:42:18 +00:00
|
|
|
color: var(--foreground);
|
2021-05-20 04:27:23 +00:00
|
|
|
}
|
2021-05-19 22:21:51 +00:00
|
|
|
</style>
|