Profectus/src/main.js

27 lines
606 B
JavaScript
Raw Normal View History

2021-05-20 05:11:03 +00:00
import Vue from 'vue';
2021-05-26 01:57:02 +00:00
import App from './App';
2021-05-20 05:11:03 +00:00
import store from './store';
2021-06-12 04:38:16 +00:00
import { addLayer} from './store/layers';
import { setVue } from './util/vue';
2021-06-14 03:16:38 +00:00
import { startGameLoop } from './store/game';
import './components/index';
2021-05-19 22:21:51 +00:00
2021-05-22 20:29:06 +00:00
// Setup
2021-05-20 05:11:03 +00:00
Vue.config.productionTip = false;
2021-05-19 22:21:51 +00:00
2021-06-12 04:38:16 +00:00
requestAnimationFrame(async () => {
// Add layers on second frame so dependencies can resolve
const { initialLayers } = await import('./data/mod');
initialLayers.forEach(addLayer);
2021-05-22 20:29:06 +00:00
2021-06-12 04:38:16 +00:00
// Create Vue
const vue = window.vue = new Vue({
store,
render: h => h(App)
});
setVue(vue);
vue.$mount('#app');
2021-06-14 03:16:38 +00:00
startGameLoop();
2021-06-12 04:38:16 +00:00
});