Profectus-Demo/src/game/state.ts

21 lines
476 B
TypeScript
Raw Normal View History

2022-01-25 04:25:34 +00:00
import { shallowReactive } from "vue";
2022-01-14 04:25:47 +00:00
export interface Transient {
lastTenTicks: number[];
hasNaN: boolean;
NaNPath?: string[];
NaNReceiver?: Record<string, unknown>;
}
2022-07-10 03:09:25 +00:00
declare global {
2022-07-10 05:43:52 +00:00
/** Augment the window object so the transient state can be accessed from the console. */
2022-07-10 03:09:25 +00:00
interface Window {
state: Transient;
}
}
2022-01-25 04:25:34 +00:00
export default window.state = shallowReactive<Transient>({
lastTenTicks: [],
hasNaN: false,
2022-01-14 04:25:47 +00:00
NaNPath: []
});