forked from noxious/client
Image quality bs
This commit is contained in:
parent
5b31729f64
commit
9cf872b7e2
@ -7,9 +7,6 @@ export function useCameraControls(scene: Phaser.Scene): any {
|
|||||||
const zoneStore = useZoneStore()
|
const zoneStore = useZoneStore()
|
||||||
const camera = scene.cameras.main
|
const camera = scene.cameras.main
|
||||||
|
|
||||||
// Might improve image quality
|
|
||||||
camera.setRoundPixels(true)
|
|
||||||
|
|
||||||
function onPointerDown(pointer: Phaser.Input.Pointer) {
|
function onPointerDown(pointer: Phaser.Input.Pointer) {
|
||||||
gameStore.setPlayerDraggingCamera(true)
|
gameStore.setPlayerDraggingCamera(true)
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<GmPanel v-if="gameStore.character?.role === 'gm'" />
|
<GmPanel v-if="gameStore.character?.role === 'gm'" />
|
||||||
|
|
||||||
<div v-if="!zoneEditorStore.active">
|
<div v-if="!zoneEditorStore.active">
|
||||||
<Game :config="gameConfig" @create="createGame" style="image-rendering: pixelated">
|
<Game :config="gameConfig" @create="createGame">
|
||||||
<Scene name="main" @preload="preloadScene" @create="createScene">
|
<Scene name="main" @preload="preloadScene" @create="createScene">
|
||||||
<div v-if="isLoaded">
|
<div v-if="isLoaded">
|
||||||
<Inventory />
|
<Inventory />
|
||||||
@ -61,10 +61,7 @@ const gameConfig = {
|
|||||||
width: window.innerWidth,
|
width: window.innerWidth,
|
||||||
height: window.innerHeight,
|
height: window.innerHeight,
|
||||||
type: Phaser.AUTO, // AUTO, CANVAS, WEBGL, HEADLESS
|
type: Phaser.AUTO, // AUTO, CANVAS, WEBGL, HEADLESS
|
||||||
resolution: 3,
|
resolution: 5,
|
||||||
scale: { mode: Phaser.Scale.RESIZE },
|
|
||||||
pixelArt: true,
|
|
||||||
roundPixels: true,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const createGame = (game: Phaser.Game) => {
|
const createGame = (game: Phaser.Game) => {
|
||||||
@ -160,3 +157,9 @@ onBeforeUnmount(() => {
|
|||||||
gameStore.disconnectSocket()
|
gameStore.disconnectSocket()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
canvas {
|
||||||
|
image-rendering: pixelated;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
x
Reference in New Issue
Block a user