diff --git a/src/game/layers.tsx b/src/game/layers.tsx index 85b7a17..cb7462a 100644 --- a/src/game/layers.tsx +++ b/src/game/layers.tsx @@ -17,7 +17,7 @@ import { } from "util/computed"; import { createLazyProxy } from "util/proxies"; import { createNanoEvents, Emitter } from "nanoevents"; -import { InjectionKey, Ref, ref, unref } from "vue"; +import { InjectionKey, Ref, ref, shallowReactive, unref } from "vue"; import { globalBus } from "./events"; import { Persistent, persistent } from "./persistence"; import player from "./player"; @@ -44,7 +44,7 @@ export interface LayerEvents { postUpdate: (diff: number) => void; } -export const layers: Record | undefined> = {}; +export const layers: Record | undefined> = shallowReactive({}); window.layers = layers; declare module "@vue/runtime-dom" {