ThreeJS-Webpack-ES6-Boilerp.../src/js/app.js

23 lines
489 B
JavaScript
Raw Normal View History

2016-09-12 19:54:07 +00:00
import Config from './data/config';
import Detector from './utils/detector';
import Main from './app/main';
2016-10-07 08:42:23 +00:00
// Check environment and set the Config helper
2016-09-12 19:54:07 +00:00
if(__ENV__ == 'dev') {
console.log('----- RUNNING IN DEV ENVIRONMENT! -----');
Config.isDev = true;
}
function init() {
2016-10-07 08:42:23 +00:00
// Check for webGL capabilities
2016-09-12 19:54:07 +00:00
if(!Detector.webgl) {
Detector.addGetWebGLMessage();
} else {
const container = document.getElementById('appContainer');
new Main(container);
}
}
2016-10-07 08:42:23 +00:00
init();