2021-06-08 07:34:55 +00:00
|
|
|
let app;
|
2021-06-05 15:46:31 +00:00
|
|
|
|
2021-06-08 07:34:55 +00:00
|
|
|
window.addEventListener('resize', resize);
|
|
|
|
window.addEventListener('load', function () {
|
|
|
|
app = new PIXI.Application({
|
|
|
|
autoResize: true,
|
|
|
|
resolution: devicePixelRatio,
|
|
|
|
backgroundColor: 0x0073db
|
|
|
|
});
|
|
|
|
document.getElementById('game').appendChild(app.view);
|
2021-06-05 15:46:31 +00:00
|
|
|
|
|
|
|
|
2021-06-08 07:34:55 +00:00
|
|
|
socket.on('dice', function (data) {
|
|
|
|
console.log(data);
|
|
|
|
});
|
2021-05-26 17:34:31 +00:00
|
|
|
|
2021-06-08 07:34:55 +00:00
|
|
|
socket.on('card', function (data) {
|
|
|
|
console.log(data);
|
|
|
|
});
|
2021-06-05 15:46:31 +00:00
|
|
|
|
2021-06-08 07:34:55 +00:00
|
|
|
resize();
|
|
|
|
});
|
2021-06-01 11:24:52 +00:00
|
|
|
|
|
|
|
function resize() {
|
2021-06-08 05:58:46 +00:00
|
|
|
let game = document.getElementById('game');
|
|
|
|
app.renderer.resize(game.offsetWidth, game.offsetHeight);
|
2021-06-08 07:34:55 +00:00
|
|
|
}
|