Merge remote-tracking branch 'origin/main' into feature/151-broken-zoom
This commit is contained in:
commit
9e96b2b32a
18
Dockerfile
18
Dockerfile
@ -4,6 +4,24 @@ WORKDIR /usr/src/app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
|
||||
# Set environment variables
|
||||
ARG VITE_NAME=${VITE_NAME}
|
||||
ENV VITE_NAME=${VITE_NAME}
|
||||
|
||||
ARG VITE_DEVELOPMENT=${VITE_DEVELOPMENT}
|
||||
ENV VITE_DEVELOPMENT=${VITE_DEVELOPMENT}
|
||||
|
||||
ARG VITE_SERVER_ENDPOINT=${VITE_SERVER_ENDPOINT}
|
||||
ENV VITE_SERVER_ENDPOINT=${VITE_SERVER_ENDPOINT}
|
||||
|
||||
ARG VITE_TILE_SIZE_X=${VITE_TILE_SIZE_X}
|
||||
ENV VITE_TILE_SIZE_X=${VITE_TILE_SIZE_X}
|
||||
|
||||
ARG VITE_TILE_SIZE_Y=${VITE_TILE_SIZE_Y}
|
||||
ENV VITE_TILE_SIZE_Y=${VITE_TILE_SIZE_Y}
|
||||
|
||||
# Build the application
|
||||
RUN npm run build-ntc
|
||||
|
||||
# Production stage
|
||||
|
@ -60,7 +60,7 @@ const gameConfig = {
|
||||
name: 'New Quest',
|
||||
width: window.innerWidth,
|
||||
height: window.innerHeight,
|
||||
type: Phaser.WEBGL, // AUTO, CANVAS, WEBGL, HEADLESS
|
||||
type: Phaser.AUTO, // AUTO, CANVAS, WEBGL, HEADLESS
|
||||
mode: Phaser.Scale.RESIZE,
|
||||
resolution: 3,
|
||||
render: { pixelArt: true, antialias: false }
|
||||
@ -73,6 +73,15 @@ const createGame = (game: Phaser.Game) => {
|
||||
addEventListener('resize', () => {
|
||||
game.scale.resize(window.innerWidth, window.innerHeight)
|
||||
})
|
||||
|
||||
// We don't support canvas mode, only WebGL
|
||||
if (game.renderer.type === Phaser.CANVAS) {
|
||||
gameStore.addNotification({
|
||||
title: 'Warning',
|
||||
message: 'Your browser does not support WebGL. Please use a modern browser like Chrome, Firefox, or Edge.'
|
||||
})
|
||||
gameStore.disconnectSocket()
|
||||
}
|
||||
}
|
||||
|
||||
const preloadScene = async (scene: Phaser.Scene) => {
|
||||
|
@ -1,5 +1,6 @@
|
||||
export type Notification = {
|
||||
id?: string
|
||||
title?: string
|
||||
message?: string
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user