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" />
|
|
|
|
<div class="app" @mousemove="updateMouse" :style="theme" :class="{ useHeader }">
|
|
|
|
<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";
|
2021-05-20 04:27:23 +00:00
|
|
|
|
2022-01-14 04:25:47 +00:00
|
|
|
function updateMouse(/* event */) {
|
|
|
|
// TODO use event to update mouse position for particles
|
|
|
|
}
|
|
|
|
|
2022-03-03 02:12:56 +00:00
|
|
|
const useHeader = projInfo.useHeader;
|
2022-01-14 04:25:47 +00:00
|
|
|
const theme = computed(() => themes[settings.theme].variables);
|
|
|
|
const showTPS = toRef(settings, "showTPS");
|
2022-03-20 04:59:52 +00:00
|
|
|
|
|
|
|
const gameComponent = computed(() => {
|
|
|
|
return coerceComponent(jsx(() => <>{gameComponents.map(render)}</>));
|
|
|
|
});
|
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%;
|
2021-05-20 04:27:23 +00:00
|
|
|
}
|
2021-05-19 22:21:51 +00:00
|
|
|
</style>
|