[new feature] camera movement

This commit is contained in:
2024-04-24 01:11:48 +02:00
parent 553792a7c8
commit 890badac15
4 changed files with 22 additions and 8 deletions

View File

@ -1,11 +1,18 @@
<script setup lang="ts">
import Phaser from 'phaser';
import 'phaser';
import { Game, Scene, Rectangle } from 'phavuer'
import Example from './scenes/mapScene'
const gameConfig = {
width: '100%',
height: '99%',
scale: {
mode: Phaser.Scale.FIT,
autoCenter: Phaser.Scale.CENTER_BOTH,
width: 1280,
height: 720,
},
render: {
roundPixels: true,
},
pixelArt: true,
type: Phaser.AUTO,
scene: Example
@ -13,9 +20,7 @@ const gameConfig = {
</script>
<template>
<Game :config="gameConfig" class="game">
<Scene name="MainScene">
<Rectangle :x="100" :y="100" :width="100" :height="100" :fillColor="0xAAAAAA" />
</Scene>
</Game>
<div class="game-container">
<Game :config="gameConfig" class="game" />
</div>
</template>