phaser - v4.0.0-rc.4
    Preparing search index...

    The active game configuration settings, parsed from a Phaser.Types.Core.GameConfig object.

    Index

    Constructors

    Properties

    Constructors

    Properties

    antialias: boolean

    When set to true, WebGL uses linear interpolation to draw scaled or rotated textures, giving a smooth appearance. When set to false, WebGL uses nearest-neighbor interpolation, giving a crisper appearance. false also disables antialiasing of the game canvas itself, if the browser supports it, when the game canvas is scaled.

    antialiasGL: boolean

    Sets the antialias property when the WebGL context is created. Setting this value does not impact any subsequent textures that are created, or the canvas style attributes.

    The Audio Configuration object.

    autoCenter: Scale.Center

    Automatically center the canvas within the parent?

    autoFocus: boolean

    If true the window will automatically be given focus immediately and on any future mousedown event.

    autoMobileTextures: boolean

    If iOS or Android detected, automatically restrict WebGL to use 1 texture per batch. This can help performance on some devices.

    autoRound: boolean

    Automatically round the display and style sizes of the canvas. This can help with performance in lower-powered devices.

    backgroundColor: Display.Color

    The background color of the game canvas. The default is black. This value is ignored if transparent is set to true.

    bannerBackgroundColor: string[]

    The background colors of the banner.

    bannerTextColor: string

    The color of the banner text.

    batchSize: number

    The default WebGL Batch size. Represents the number of quads that can be added to a single batch.

    canvas: HTMLCanvasElement

    Force Phaser to use your own Canvas element instead of creating one.

    canvasStyle: string

    Optional CSS attributes to be set on the canvas object created by the renderer.

    clearBeforeRender: boolean

    Whether the game canvas will be cleared between each rendering frame. You can disable this if you have a full-screen background image or game object.

    context: WebGLRenderingContext | CanvasRenderingContext2D

    Force Phaser to use your own Canvas context instead of creating one.

    customEnvironment: boolean

    Is Phaser running under a custom (non-native web) environment? If so, set this to true to skip internal Feature detection. If true the renderType cannot be left as AUTO.

    defaultImage: string

    A base64 encoded PNG that will be used as the default blank texture.

    defaultPhysicsSystem: string | boolean

    The default physics system. It will be started for each scene. Either 'arcade', 'impact' or 'matter'.

    defaultPlugins: any

    The plugins installed into every Scene (in addition to CoreScene and Global).

    desynchronized: boolean

    When set to true it will create a desynchronized context for both 2D and WebGL. See https://developers.google.com/web/updates/2019/05/desynchronized for details.

    disableContextMenu: boolean

    Set to true to disable the right-click context menu.

    domCreateContainer: boolean

    Should the game create a div element to act as a DOM Container? Only enable if you're using DOM Element objects. You must provide a parent object if you use this feature.

    domPointerEvents: string

    The default pointerEvents attribute set on the DOM Container.

    expandParent: boolean

    Is the Scale Manager allowed to adjust the CSS height property of the parent to be 100%?

    failIfMajorPerformanceCaveat: boolean

    Let the browser abort creating a WebGL context if it judges performance would be unacceptable.

    The Frame Rate Configuration object, as parsed by the Timestep class.

    fullscreenTarget: string | HTMLElement

    The DOM element that will be sent into full screen mode, or its id. If undefined Phaser will create its own div and insert the canvas into it when entering fullscreen mode.

    gameTitle: string

    The title of the game.

    gameURL: string

    The URL of the game.

    gameVersion: string

    The version of the game.

    glowDistance: number

    The distance of the Glow filter (defaults to 10)

    glowQuality: number

    The quality of the Glow filter (defaults to 10)

    height: string | number

    The height of the underlying canvas, in pixels.

    hideBanner: boolean

    Don't write the banner line to the console.log. See Phaser.Types.Core.BannerConfig for details of this object.

    hidePhaser: boolean

    Omit Phaser's name and version from the banner.

    inputActivePointers: number

    The number of Pointer objects created by default. In a mouse-only, or non-multi touch game, you can leave this as 1.

    inputGamepad: boolean

    Enable the Gamepad Plugin. This can be disabled in games that don't need gamepad input.

    inputGamepadEventTarget: any

    The DOM Target to listen for gamepad events on. Defaults to window if not specified.

    inputKeyboard: boolean

    Enable the Keyboard Plugin. This can be disabled in games that don't need keyboard input.

    inputKeyboardCapture: number[]

    preventDefault will be called on every non-modified key which has a key code in this array. By default, it is empty.

    inputKeyboardEventTarget: any

    The DOM Target to listen for keyboard events on. Defaults to window if not specified.

    inputMouse: boolean | object

    Enable the Mouse Plugin. This can be disabled in games that don't need mouse input.

    inputMouseEventTarget: any

    The DOM Target to listen for mouse events on. Defaults to the game canvas if not specified.

    inputMousePreventDefaultDown: boolean

    Should mousedown DOM events have preventDefault called on them?

    inputMousePreventDefaultMove: boolean

    Should mousemove DOM events have preventDefault called on them?

    inputMousePreventDefaultUp: boolean

    Should mouseup DOM events have preventDefault called on them?

    inputMousePreventDefaultWheel: boolean

    Should wheel DOM events have preventDefault called on them?

    inputSmoothFactor: number

    The smoothing factor to apply during Pointer movement. See Phaser.Input.Pointer#smoothFactor.

    inputTouch: boolean

    Enable the Touch Plugin. This can be disabled in games that don't need touch input.

    inputTouchCapture: boolean

    Should touch events be captured? I.e. have prevent default called on them.

    inputTouchEventTarget: any

    The DOM Target to listen for touch events on. Defaults to the game canvas if not specified.

    inputWindowEvents: boolean

    Should Phaser listen for input events on the Window? If you disable this, events like 'POINTER_UP_OUTSIDE' will no longer fire.

    installGlobalPlugins: any

    An array of global plugins to be installed.

    installScenePlugins: any

    An array of Scene level plugins to be installed.

    loaderAsync: boolean

    Should the XHR request use async or not?

    loaderBaseURL: string

    A URL used to resolve paths given to the loader. Example: 'http://labs.phaser.io/assets/'.

    loaderCrossOrigin: string

    'anonymous', 'use-credentials', or undefined. If you're not making cross-origin requests, leave this as undefined. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes.

    loaderImageLoadType: string

    Optional load type for image, XHR is default, or HTMLImageElement for a lightweight way.

    loaderLocalScheme: string[]

    An array of schemes that the Loader considers as being 'local' files. Defaults to: [ 'file://', 'capacitor://' ].

    loaderMaxParallelDownloads: number

    Maximum parallel downloads allowed for resources (Default to 32).

    loaderMaxRetries: number

    The number of times to retry a file load if it fails.

    loaderPassword: string

    Optional password for all XHR requests.

    loaderPath: string

    A URL path used to resolve relative paths given to the loader. Example: 'images/sprites/'.

    loaderResponseType: string

    The response type of the XHR request, e.g. blob, text, etc.

    loaderTimeout: number

    Optional XHR timeout value, in ms.

    loaderUser: string

    Optional username for all XHR requests.

    loaderWithCredentials: boolean

    Optional XHR withCredentials value.

    maxHeight: number

    The maximum height, in pixels, the canvas will scale up to. A value of zero means no maximum.

    maxLights: number

    The maximum number of lights allowed to be visible within range of a single Camera in the LightManager.

    maxTextures: number

    When in WebGL mode, this sets the maximum number of GPU Textures to use. The default, -1, will use all available units. The WebGL1 spec says all browsers should provide a minimum of 8.

    maxWidth: number

    The maximum width, in pixels, the canvas will scale up to. A value of zero means no maximum.

    minHeight: number

    The minimum height, in pixels, the canvas will scale down to. A value of zero means no minimum.

    minWidth: number

    The minimum width, in pixels, the canvas will scale down to. A value of zero means no minimum.

    mipmapFilter: string

    Sets the mipmap magFilter to be used when creating WebGL textures. Don't set unless you wish to create mipmaps. Set to one of the following: 'NEAREST', 'LINEAR', 'NEAREST_MIPMAP_NEAREST', 'LINEAR_MIPMAP_NEAREST', 'NEAREST_MIPMAP_LINEAR' or 'LINEAR_MIPMAP_LINEAR'.

    missingImage: string

    A base64 encoded PNG that will be used as the default texture when a texture is assigned that is missing or not loaded.

    parent: any

    A parent DOM element into which the canvas created by the renderer will be injected.

    pathDetailThreshold: number

    Threshold for combining points into a single path in the WebGL renderer for Graphics objects. This can be overridden at the Graphics object level.

    physics: PhysicsConfig

    The Physics Configuration object.

    pixelArt: boolean

    Prevent pixel art from becoming blurred when scaled. It will remain crisp (tells the WebGL renderer to automatically create textures using a linear filter mode).

    postBoot: BootCallback

    A function to run at the end of the boot sequence. At this point, all the game systems have started and plugins have been loaded.

    powerPreference: string

    "high-performance", "low-power" or "default". A hint to the browser on how much device power the game might use.

    preBoot: BootCallback

    Called before Phaser boots. Useful for initializing anything not related to Phaser that Phaser may require while booting.

    premultipliedAlpha: boolean

    In WebGL mode, sets the drawing buffer to contain colors with pre-multiplied alpha.

    preserveDrawingBuffer: boolean

    If the value is true the WebGL buffers will not be cleared and will preserve their values until cleared or overwritten by the author.

    renderNodes: { [key: string]: RenderNodesConfig }

    A map of custom Render Nodes to be added to the WebGL Renderer. The values will be added to the RenderNodeManager, using the keys as the names.

    renderType: number

    Force Phaser to use a specific renderer. Can be CONST.CANVAS, CONST.WEBGL, CONST.HEADLESS or CONST.AUTO (default)

    resizeInterval: number

    How many ms should elapse before checking if the browser size has changed?

    roundPixels: boolean

    Draw texture-based Game Objects at only whole-integer positions. Game Objects without textures, like Graphics, ignore this property.

    scaleMode: Scale.ScaleModes

    The scale mode as used by the Scale Manager. The default is zero, which is no scaling.

    sceneConfig: object

    The default Scene configuration object.

    seed: string[]

    A seed which the Random Data Generator will use. If not given, a dynamic seed based on the time is used.

    selfShadow: boolean

    On textured objects with lighting, this enables self-shadowing based on the diffuse map.

    skipUnreadyShaders: boolean

    Avert stuttering during shader compilation, by enabling parallel shader compilation, where supported. Objects which request a shader that is not yet ready will not be drawn. This prevents stutter, but may cause "pop-in" of objects unless you use a pre-touch strategy.

    smoothPixelArt: boolean

    WebGL only. Sets antialias to true and pixelArt to false. Texture-based Game Objects use special shader setting that preserve blocky pixels, but smooth the edges between the pixels. This is only visible when objects are scaled up; otherwise, antialias is simpler.

    snapHeight: number

    The vertical amount to snap the canvas by when the Scale Manager is resizing. A value of zero means no snapping.

    snapWidth: number

    The horizontal amount to snap the canvas by when the Scale Manager is resizing. A value of zero means no snapping.

    stableSort: number | boolean

    false or 0 = Use the built-in StableSort (needed for older browsers), true or 1 = Rely on ES2019 Array.sort being stable (modern browsers only), or -1 = Try and determine this automatically based on browser inspection (not guaranteed to work, errs on side of caution).

    transparent: boolean

    Whether the game canvas will have a transparent background.

    whiteImage: string

    A base64 encoded PNG that will be used as the default texture when a texture is assigned that is white or not loaded.

    width: string | number

    The width of the underlying canvas, in pixels.

    zoom: number | Scale.Zoom

    The zoom factor, as used by the Scale Manager.