25 lines
799 B
TypeScript
25 lines
799 B
TypeScript
import { writable } from "svelte/store";
|
|
|
|
function updateSize(){
|
|
SizeStore.set({
|
|
w: window.innerWidth,
|
|
h: window.innerHeight
|
|
})
|
|
DynamicGUI.set(window.innerWidth <= 1024)
|
|
}
|
|
|
|
export const SizeStore = writable({
|
|
w: 0,
|
|
h: 0
|
|
})
|
|
export const DynamicGUI = writable(false)
|
|
export const sideBarClosing = writable(false)
|
|
export const sideBarStore = writable(window.innerWidth > 1024)
|
|
export const selectedCharID = writable(-1)
|
|
export const CharEmotion = writable({} as {[key:string]: [string, string, number][]})
|
|
export const ViewBoxsize = writable({ width: 12 * 16, height: 12 * 16 }); // Default width and height in pixels
|
|
export const settingsOpen = writable(false)
|
|
export const botMakerMode = writable(false)
|
|
|
|
updateSize()
|
|
window.addEventListener("resize", updateSize); |