Profectus/src/main.js

26 lines
562 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';
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-12 04:38:16 +00:00
// Start game loop
});