/**
 * Created by rockyl on 2018/11/5.
 *
 * 游戏入口
 */

import {modifyEngineConfig} from 'scilla'
import ScillaLauncher from 'launcher'
import './generated/MustCompile'

let launcher: ScillaLauncher;

modifyEngineConfig({
	lineHeightRatio: 1.2,
	entityEnabled: false,
	awakeComponentWhenAdded: false,
	sleepComponentWhenRemoved: false,
	drawRenderRect: false,
});

export async function startup(containerElement, options: any = {}, onProgress: Function) {
	launcher = new ScillaLauncher();
	await launcher.launch(containerElement, options, onProgress);
}
