Namespace: Settings

Phaser.Scenes. Settings

Methods


<static> create(config)

Takes a Scene configuration object and returns a fully formed System Settings object.

Parameters:
Name Type Description
config string | Phaser.Scenes.Settings.Config

The Scene configuration object used to create this Scene Settings.

Since: 3.0.0
Source: src/scene/Settings.js (Line 54)
Returns:

The Scene Settings object created as a result of the config and default settings.

Type
Phaser.Scenes.Settings.Object

Type Definitions


Config

Type:
  • object
Properties:
Name Type Argument Default Description
key string <optional>

The unique key of this Scene. Must be unique within the entire Game instance.

active boolean <optional>
false

Does the Scene start as active or not? An active Scene updates each step.

visible boolean <optional>
true

Does the Scene start as visible or not? A visible Scene renders each step.

pack false | Phaser.Loader.FileTypes.PackFileConfig <optional>
false

An optional Loader Packfile to be loaded before the Scene begins.

cameras InputJSONCameraObject | Array.<InputJSONCameraObject> <optional>
<nullable>
null

An optional Camera configuration object.

map Object.<string, string> <optional>

Overwrites the default injection map for a scene.

mapAdd Object.<string, string> <optional>

Extends the injection map for a scene.

physics object <optional>
{}

The physics configuration object for the Scene.

loader object <optional>
{}

The loader configuration object for the Scene.

plugins false | * <optional>
false

The plugin configuration object for the Scene.

Source: src/scene/Settings.js (Line 16)

Object

Type:
  • object
Properties:
Name Type Argument Description
status number

The current status of the Scene. Maps to the Scene constants.

key string

The unique key of this Scene. Unique within the entire Game instance.

active boolean

The active state of this Scene. An active Scene updates each step.

visible boolean

The visible state of this Scene. A visible Scene renders each step.

isBooted boolean

Has the Scene finished booting?

isTransition boolean

Is the Scene in a state of transition?

transitionFrom Phaser.Scene <nullable>

The Scene this Scene is transitioning from, if set.

transitionDuration integer

The duration of the transition, if set.

transitionAllowInput boolean

Is this Scene allowed to receive input during transitions?

data object

a data bundle passed to this Scene from the Scene Manager.

pack false | Phaser.Loader.FileTypes.PackFileConfig

The Loader Packfile to be loaded before the Scene begins.

cameras InputJSONCameraObject | Array.<InputJSONCameraObject> <nullable>

The Camera configuration object.

map Object.<string, string>

The Scene's Injection Map.

physics object

The physics configuration object for the Scene.

loader object

The loader configuration object for the Scene.

plugins false | *

The plugin configuration object for the Scene.

Source: src/scene/Settings.js (Line 31)