[new feature] camera movement
This commit is contained in:
21
src/App.vue
21
src/App.vue
@ -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>
|
Reference in New Issue
Block a user