2021-06-05 15:46:31 +00:00
|
|
|
const app = new PIXI.Application({
|
|
|
|
autoResize: true,
|
|
|
|
resolution: devicePixelRatio,
|
2021-06-08 05:58:46 +00:00
|
|
|
backgroundColor: 0x0073db
|
2021-06-05 15:46:31 +00:00
|
|
|
});
|
|
|
|
document.getElementById('game').appendChild(app.view);
|
|
|
|
|
|
|
|
|
2021-06-08 05:58:46 +00:00
|
|
|
// -------------------------------------- code --------------------------------------
|
2021-06-05 15:46:31 +00:00
|
|
|
|
2021-06-08 05:58:46 +00:00
|
|
|
// ------------------------------------ end code ------------------------------------
|
2021-05-26 17:34:31 +00:00
|
|
|
|
2021-06-05 15:46:31 +00:00
|
|
|
|
2021-06-08 05:58:46 +00:00
|
|
|
// Resize (Do Not modify)
|
2021-06-01 11:24:52 +00:00
|
|
|
window.addEventListener('resize', resize);
|
|
|
|
|
|
|
|
function resize() {
|
2021-06-08 05:58:46 +00:00
|
|
|
let game = document.getElementById('game');
|
|
|
|
app.renderer.resize(game.offsetWidth, game.offsetHeight);
|
2021-06-01 11:24:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resize();
|