fixed button styling, dev server, added switches for event handling, global baking, global reset, three BeatUnit states with styles, and mobile long touch to change beatunit type
This commit is contained in:
41
src/main.ts
41
src/main.ts
@@ -1,38 +1,21 @@
|
||||
import BeatGroup from "@/BeatGroup";
|
||||
import RootView from "@/ui/Root/RootView";
|
||||
import "@/ui/global.css";
|
||||
|
||||
const defaultSettings = {
|
||||
barCount: 2,
|
||||
isLooping: false,
|
||||
timeSigUp: 8,
|
||||
};
|
||||
|
||||
const mainBeatGroup = new BeatGroup(defaultSettings);
|
||||
mainBeatGroup.addBeat({
|
||||
name: "LF"
|
||||
});
|
||||
mainBeatGroup.addBeat({
|
||||
name: "LH"
|
||||
});
|
||||
mainBeatGroup.addBeat({
|
||||
name: "RH"
|
||||
});
|
||||
mainBeatGroup.addBeat({
|
||||
name: "RF"
|
||||
});
|
||||
|
||||
const appNode = document.querySelector("#app");
|
||||
|
||||
if (appNode) {
|
||||
const appRoot = new RootView({
|
||||
title: "Drum Slayer",
|
||||
mainBeatGroup: mainBeatGroup,
|
||||
});
|
||||
//@ts-ignore
|
||||
window.appRoot = appRoot;
|
||||
appNode.appendChild(appRoot.render());
|
||||
console.log("OK!");
|
||||
try {
|
||||
const appRoot = new RootView({
|
||||
title: "Drum Slayer",
|
||||
});
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
//@ts-ignore
|
||||
window.appRoot = appRoot;
|
||||
appNode.appendChild(appRoot.render());
|
||||
console.log("OK!");
|
||||
} catch (e) {
|
||||
console.error("FUCK!", e);
|
||||
}
|
||||
} else {
|
||||
console.error("FUCK!");
|
||||
}
|
||||
Reference in New Issue
Block a user