33 lines
902 B
JavaScript
33 lines
902 B
JavaScript
|
|
|
|
const platformNames = {
|
|
[System.PLATFORM_LINUX]: 'Linux',
|
|
[System.PLATFORM_KNULLI]: 'Knulli',
|
|
[System.PLATFORM_PSP]: 'PSP',
|
|
[System.PLATFORM_GAMECUBE]: 'GameCube',
|
|
[System.PLATFORM_WII]: 'Wii',
|
|
};
|
|
|
|
Console.print('Platform: ' + (platformNames[System.platform] || 'Unknown'));
|
|
|
|
// Testing async/await
|
|
async function testAsync() {
|
|
Console.print('Testing async/await...');
|
|
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
Console.print('First await done!');
|
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
Console.print('Async/await works!');
|
|
}
|
|
|
|
testAsync();
|
|
|
|
// Scene.set('testscene.js');
|
|
// Console.print('Loading scene...');
|
|
// requireAsync('./testscene.js', function(scene) {
|
|
// throw "test";
|
|
// Console.print('Initializing scene...');
|
|
// var batch = scene.load();
|
|
// batch.lock();
|
|
// batch.requireLoaded();
|
|
// scene.init();
|
|
// });
|