Options
All
  • Public
  • Public/Protected
  • All
Menu

Module phaser/game

This is the main Phaser file in the project. From here the Phaser engine is started.

Classes

Interfaces

Variables

Functions

Object literals

Variables

Const quality

quality: 1 | 0.5 = localStorage.getItem("lowQuality") ? 0.5 : 1

Function for getting constant, which will then be used for resolution multiplication, based on quality setting in local storage. The two possibilities are full resolution (1) and half resolution (0.5).

Functions

Const CreateGame

  • Parameters

    Returns MyGame

Object literals

Const config

config: object

Main Phaser config

height

height: number = window.innerHeight * window.devicePixelRatio * quality

parent

parent: string = globalConfig.phaser.parent

title

title: string = globalConfig.title

type

type: number = Phaser.AUTO

width

width: number = window.innerWidth * window.devicePixelRatio * quality

audio

audio: object

noAudio

noAudio: true = true

render

render: object

antialias

antialias: true = true

mipmapFilter

mipmapFilter: string = "LINEAR_MIPMAP_LINEAR"

scale

scale: object

autoCenter

autoCenter: Center = Phaser.Scale.Center.CENTER_BOTH

mode

mode: number = Phaser.Scale.ENVELOP

parent

parent: string = globalConfig.phaser.parent

Generated using TypeDoc