1
0
forked from noxious/client

styling fixes

This commit is contained in:
root
2024-05-01 21:06:53 +02:00
parent fd3cf0ef8a
commit a5b544697c
6 changed files with 137 additions and 11 deletions

View File

@ -10,7 +10,7 @@
<script setup lang="ts">
import 'phaser';
import { Game, Scene, useGame } from 'phavuer'
import { Game, Scene, useGame, useScene } from 'phavuer'
import World from '@/components/World.vue'
const gameConfig = {
@ -40,7 +40,12 @@ const create = (scene: Phaser.Scene) => {
cam.scrollY -= (p.y - p.prevPosition.y) / cam.zoom;
});
scene.add.grid(0, 0, window.innerWidth, window.innerHeight, 64, 32, 0, 0, 0xff00ff, 0.5).setOrigin(0, 0);
const grid = scene.add.grid(0, 0, window.innerWidth, window.innerHeight, 64, 32, 0, 0, 0xff00ff, 0.5).setOrigin(0, 0);
// window.addEventListener('resize', () => {
// grid.width = window.innerWidth;
// grid.height = window.innerHeight;
// });
}
</script>
@ -50,10 +55,5 @@ const create = (scene: Phaser.Scene) => {
justify-content: center;
align-items: center;
height: 100vh;
border: 1px solid white;
}
.game {
border: 1px solid red;
}
</style>