2020-04-07 21:44:46 +02:00
|
|
|
const shaderHandler = new ShaderHandler(null),
|
|
|
|
audioHandler = new AudioHandler(),
|
|
|
|
gui = new GUI(),
|
2020-08-01 21:51:54 +02:00
|
|
|
visual = new VisualDrawer(),
|
|
|
|
template = new Template(),
|
|
|
|
player = new Player(),
|
2020-08-05 11:24:59 +02:00
|
|
|
vConf = new Config(),
|
|
|
|
pConf = new Config();
|
2020-08-01 21:51:54 +02:00
|
|
|
|
|
|
|
let c = null,
|
|
|
|
gl = null;
|
2020-04-07 21:44:46 +02:00
|
|
|
|
|
|
|
async function startUP() {
|
2020-08-05 11:24:59 +02:00
|
|
|
pConf.loadConfigByName('default');
|
2020-08-01 21:51:54 +02:00
|
|
|
c = document.body.querySelector('#c'),
|
2020-04-07 21:44:46 +02:00
|
|
|
gl = c.getContext("webgl2");
|
|
|
|
if (!gl) {
|
|
|
|
alert("SORRY THE BROWSER DOESN'T SUPPORT WEBGL2");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
shaderHandler.setGL(gl)
|
2020-08-01 21:51:54 +02:00
|
|
|
await shaderHandler.loadArray(["wave", "sphere", "water"], 'shaders/');
|
2020-04-07 21:44:46 +02:00
|
|
|
await audioHandler.init();
|
|
|
|
await player.init();
|
2020-08-01 21:51:54 +02:00
|
|
|
await visual.init();
|
|
|
|
await gui.init();
|
2020-08-05 11:24:59 +02:00
|
|
|
await imageUploader.init();
|
2020-08-01 21:51:54 +02:00
|
|
|
await initHandler();
|
2020-04-07 21:44:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
startUP().then(r => {
|
|
|
|
setTimeout(e => {
|
|
|
|
$('.loading-screen').remove();
|
|
|
|
}, 100)
|
|
|
|
});
|