### POST /instance/install Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/plugins-pluginmanager Installs a new Global Plugin into the Plugin Manager and optionally starts it running. Global plugins belong to the Plugin Manager and can be accessed by all Scenes. ```APIDOC ## POST /instance/install ### Description Installs a new Global Plugin into the Plugin Manager and optionally starts it running. A global plugin belongs to the Plugin Manager, rather than a specific Scene, and can be accessed and used by all Scenes in your game. The `key` property is what you use to access this plugin from the Plugin Manager. This method is called automatically by Phaser if you install your plugins using either the Game Configuration object, or by preloading them via the Loader. The same plugin can be installed multiple times into the Plugin Manager by simply giving each instance its own unique key. ### Method POST ### Endpoint /instance/install ### Parameters #### Query Parameters - **key** (string) - Required - The unique handle given to this plugin within the Plugin Manager. - **plugin** (function) - Required - The plugin code. This should be the non-instantiated version. - **start** (boolean) - Optional - Automatically start the plugin running? This is always `true` if you provide a mapping value. Defaults to false. - **mapping** (string) - Optional - If this plugin is injected into the Phaser.Scene class, this is the property key to use. - **data** (any) - Optional - A value passed to the plugin's `init` method. ### Request Body (No explicit request body, parameters are typically passed as query parameters or form data depending on the context) ### Response #### Success Response (200) - **Phaser.Plugins.BasePlugin** - The plugin that was started, or `null` if `start` was false, or the game isn't yet booted. #### Response Example ```json { "installedPlugin": "" } ``` ``` -------------------------------- ### Install Global Plugin - Phaser Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/plugins-pluginmanager Installs a new Global Plugin into the Plugin Manager, with an option to start it immediately. Global plugins are accessible by all Scenes. The `key` is used for access, and the `plugin` is the code itself. It can also map the plugin to a Scene property and pass initial data. ```javascript /** * Installs a new Global Plugin into the Plugin Manager and optionally starts it running. * A global plugin belongs to the Plugin Manager, rather than a specific Scene, and can be accessed * and used by all Scenes in your game. * The `key` property is what you use to access this plugin from the Plugin Manager. * * Example: * ```javascript * this.plugins.install('powerupsPlugin', pluginCode); * // and from within the scene: * this.plugins.get('powerupsPlugin'); * ``` * * This method is called automatically by Phaser if you install your plugins using either the * Game Configuration object, or by preloading them via the Loader. * The same plugin can be installed multiple times into the Plugin Manager by simply giving each * instance its own unique key. * * @param {string} key The unique handle given to this plugin within the Plugin Manager. * @param {function} plugin The plugin code. This should be the non-instantiated version. * @param {boolean} [start=false] Automatically start the plugin running? This is always `true` if you provide a mapping value. * @param {string} [mapping] If this plugin is injected into the Phaser.Scene class, this is the property key to use. * @param {*} [data] A value passed to the plugin's `init` method. * @returns {Phaser.Plugins.BasePlugin|null} The plugin that was started, or `null` if `start` was false, or game isn't yet booted. */ install(key, plugin, [start], [mapping], [data]) ``` -------------------------------- ### GET /instance/getDefaultScenePlugins Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/plugins-pluginmanager Called by the Scene Systems class to return a list of plugins to be installed. ```APIDOC ## GET /instance/getDefaultScenePlugins ### Description Called by the Scene Systems class. Returns a list of plugins to be installed. ### Method GET ### Endpoint /instance/getDefaultScenePlugins ### Parameters No parameters. ### Response #### Success Response (200) - **Array.** - A list of keys for all the Scene Plugins to install. #### Response Example ```json { "scenePluginKeys": [ "SceneManager", "Loader", "GameObjectFactory", "GameObjectCreator", "SceneManager", "Events" ] } ``` ``` -------------------------------- ### Start Plugin Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/plugins-pluginmanager Starts a global plugin running. If the plugin is new, it will be initialized and started. If it's already running, its start method will be called again. ```APIDOC ## POST /start ### Description Starts a global plugin running. If the plugin was previously active then calling `start` will reset it to an active state and then call its `start` method. If the plugin has never been run before a new instance of it will be created within the Plugin Manager, its active state set and then both of its `init` and `start` methods called, in that order. If the plugin is already running under the given key then nothing happens. ### Method POST ### Endpoint /start ### Parameters #### Path Parameters - None #### Query Parameters - **key** (string) - Required - The key of the plugin to start. - **runAs** (string) - Optional - Run the plugin under a new key. This allows you to run one plugin multiple times. ### Request Example ```json { "key": "myPlugin", "runAs": "myPluginInstance1" } ``` ### Response #### Success Response (200) - **plugin** (Phaser.Plugins.BasePlugin) - The plugin that was started, or `null` if invalid key given or plugin is already stopped. #### Response Example ```json { "plugin": "[Plugin Instance]" } ``` ``` -------------------------------- ### Start Global Plugin - JavaScript Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/plugins-pluginmanager Starts a global plugin. If the plugin has been run before, it resets and calls its `start` method. If it's a new plugin, it initializes and then calls `init` and `start`. If the plugin is already running under the specified key, no action is taken. You can optionally run a plugin under a new key. ```javascript this.plugins.start('myPluginKey'); this.plugins.start('myPluginKey', 'newKeyForPlugin'); ``` -------------------------------- ### LoaderPlugin.start Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/loader-loaderplugin Starts the Loader running, resetting progress and emitting a start event. ```APIDOC ## POST /start ### Description Starts the Loader running. This will reset the progress and totals and then emit a `start` event. If there is nothing in the queue the Loader will immediately complete, otherwise it will start loading the first batch of files. The Loader is started automatically if the queue is populated within your Scenes `preload` method. However, outside of this, you need to call this method to start it. If the Loader is already running this method will simply return. ### Method POST ### Endpoint `/start` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **Phaser.Loader.LoaderPlugin** - The Loader instance. #### Response Example ```json { "message": "Loader started successfully" } ``` ``` -------------------------------- ### Get Default Scene Plugins - Phaser Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/plugins-pluginmanager Called by the Scene Systems class to retrieve a list of plugins that should be installed by default. This method returns an array of strings, where each string is the key of a Scene Plugin to be installed. ```javascript /** * Called by the Scene Systems class. Returns a list of plugins to be installed. * Access: protected * * @returns {Array.} A list keys of all the Scene Plugins to install. */ defaultScenePlugins() ``` -------------------------------- ### Listen for Input Plugin Start Event in Phaser Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/namespace/input-events This internal event is dispatched by the Input Plugin once its setup is complete, signaling all internal systems to begin operation. Use `this.input.on('start', listener)` to listen. ```javascript this.input.on('start', listener); ``` -------------------------------- ### Scene Start API Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/scenes-systems Starts a Scene running and rendering. This method is called automatically by the SceneManager. ```APIDOC ## start ### Description Start this Scene running and rendering. Called automatically by the SceneManager. ### Method POST ### Endpoint /start ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **data** (object) - No - Optional data object that may have been passed to this Scene from another. ### Request Example ```json { "data": {} } ``` ### Response #### Success Response (200) None #### Response Example None ### Fires Phaser.Scenes.Events#event:START, Phaser.Scenes.Events#event:READY ``` -------------------------------- ### Phaser.Scenes.Settings.create Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/function/scenes Takes a Scene configuration object and returns a fully formed System Settings object. ```APIDOC ## POST /Phaser.Scenes.Settings.create ### Description Takes a Scene configuration object and returns a fully formed System Settings object. ### Method POST ### Endpoint /Phaser.Scenes.Settings.create ### Parameters #### Request Body - **config** (Phaser.Types.Scenes.SettingsConfig) - No - The Scene configuration object used to create this Scene Settings. ### Response #### Success Response (200) - **Phaser.Types.Scenes.SettingsObject** - The Scene Settings object created as a result of the config and default settings. #### Response Example ```json { "example": "{ ...SceneSettingsObject... }" } ``` ``` -------------------------------- ### Get First Tick State Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/animations-animation Internal method called when an animation starts playing. Sets the accumulator and nextTick properties. ```APIDOC ## POST /animations/{key}/first-tick ### Description Called internally when this Animation first starts to play. Sets the accumulator and nextTick properties. ### Method POST ### Endpoint `/animations/{key}/first-tick` ### Parameters #### Path Parameters - **key** (string) - Required - The key of the animation. #### Request Body - **state** (Phaser.Animations.AnimationState) - Required - The Animation State belonging to the Game Object invoking this call. ### Response #### Success Response (200) - **status** (string) - Indicates the state has been updated. #### Response Example ```json { "status": "Updated animation state." } ``` ``` -------------------------------- ### getStartPoint Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/curves-ellipse Gets the starting point on the curve. Optionally stores the result in a provided Vector2 object. ```APIDOC ## GET /curves/EllipseCurve/getStartPoint ### Description Gets the starting point on the curve. ### Method GET ### Endpoint /curves/EllipseCurve/getStartPoint ### Parameters #### Query Parameters - **out** (Phaser.Math.Vector2) - Optional - A Vector2 object to store the result in. If not given will be created. ### Response #### Success Response (200) - **Phaser.Math.Vector2** - The coordinates of the point on the curve. If an `out` object was given this will be returned. #### Response Example ```json { "x": 0, "y": 0 } ``` ``` -------------------------------- ### Line Constructor and Parameters Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/gameobjects-line Documentation for the Line constructor and its parameters, including types, optionality, defaults, and descriptions. ```APIDOC ## Line ### Description The Line Shape is a Game Object that can be added to a Scene, Group or Container. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL. This shape supports only stroke colors and cannot be filled. ### Constructor `new Line(scene, [x], [y], [x1], [y1], [x2], [y2], [strokeColor], [strokeAlpha])` ### Parameters #### Path Parameters - **scene** (Phaser.Scene) - No - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. - **x** (number) - Yes - 0 - The horizontal position of this Game Object in the world. - **y** (number) - Yes - 0 - The vertical position of this Game Object in the world. - **x1** (number) - Yes - 0 - The horizontal position of the start of the line. - **y1** (number) - Yes - 0 - The vertical position of the start of the line. - **x2** (number) - Yes - 128 - The horizontal position of the end of the line. - **y2** (number) - Yes - 0 - The vertical position of the end of the line. - **strokeColor** (number) - Yes - - The color the line will be drawn in, i.e. 0xff0000 for red. - **strokeAlpha** (number) - Yes - - The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property. ``` -------------------------------- ### getStartPoint Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/curves-path Returns the starting point of the Path. ```APIDOC ## GET /websites/phaser_io_api-documentation_4_0_0-rc_6/curves/path/Path#getStartPoint ### Description Returns the starting point of the Path. ### Method GET ### Endpoint /websites/phaser_io_api-documentation_4_0_0-rc_6/curves/path/Path#getStartPoint ### Parameters #### Path Parameters None #### Query Parameters - **out** (Phaser.Math.Vector2) - Optional - `Vector2` instance that should be used for storing the result. If `undefined` a new `Vector2` will be created. #### Request Body None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **Phaser.Math.Vector2** - The modified `out` object, or a new Vector2 if none was provided. #### Response Example ```json { "x": 0, "y": 0 } ``` ``` -------------------------------- ### Phaser.Core.Events.SYSTEM_READY Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/event/core-events This event is dispatched when the Scene Manager has created the System Scene, allowing other plugins and systems to initialize. ```APIDOC ## SYSTEM_READY ### Description This event is dispatched when the Scene Manager has created the System Scene, which other plugins and systems may use to initialize themselves. This event is dispatched just once by the Game instance. ### Method EVENT ### Endpoint Phaser.Core.Events.SYSTEM_READY ### Parameters #### Event Parameters - **sys** (Phaser.Scenes.Systems) - No - A reference to the Scene Systems class of the Scene that emitted this event. ### Member of Phaser.Core.Events ### Source src/core/events/SYSTEM_READY_EVENT.js#L7 ### Since 3.70.0 ``` -------------------------------- ### Get Point on LineCurve Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/curves-line Retrieves a point on the LineCurve at a specific relative position (t, where 0 is the start and 1 is the end). An optional Vector2 object can be provided for output. ```javascript const lineCurve = new Phaser.Curves.LineCurve(new Phaser.Math.Vector2(0, 0), new Phaser.Math.Vector2(100, 100)); const point = lineCurve.getPoint(0.5); console.log(point.x, point.y); ``` -------------------------------- ### GET /instance/get Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/plugins-pluginmanager Retrieves a global plugin by its key. If not found actively, it attempts to create a new instance from the cache. ```APIDOC ## GET /instance/get ### Description Gets a global plugin from the Plugin Manager based on the given key and returns it. If it cannot find an active plugin based on the key, but there is one in the Plugin Cache with the same key, then it will create a new instance of the cached plugin and return that. ### Method GET ### Endpoint /instance/get ### Parameters #### Query Parameters - **key** (string) - Required - The key of the plugin to get. - **autoStart** (boolean) - Optional - Automatically start a new instance of the plugin if found in the cache, but not actively running. Defaults to true. ### Response #### Success Response (200) - **Phaser.Plugins.BasePlugin** - The plugin instance, or null if no plugin was found matching the key. #### Response Example ```json { "plugin": "" } ``` ``` -------------------------------- ### VIDEO_PLAYING Event Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/event/gameobjects-events The Video Game Object Playing Event is fired after playback is first started, and whenever it is restarted. For example it is fired when playback resumes after having been paused or delayed due to lack of data. ```APIDOC ## VIDEO_PLAYING Event ### Description The Video Game Object Playing Event. The playing event is fired after playback is first started, and whenever it is restarted. For example it is fired when playback resumes after having been paused or delayed due to lack of data. Listen for it from a Video Game Object instance using `Video.on('playing', listener)`. ### Method Event (Dispatched) ### Endpoint N/A (Event) ### Parameters #### Event Data - **video** (Phaser.GameObjects.Video) - Required - The Video Game Object which started playback. ### Response #### Success Response N/A (Event) #### Response Example N/A (Event) ``` -------------------------------- ### Config Constructor Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/core-config Initializes a new Config object with optional game configuration settings. ```APIDOC ## new Config(GameConfig) ### Description Initializes a new Config object with optional game configuration settings. ### Method `new` ### Endpoint N/A (Constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "GameConfig": { "title": "My Phaser Game", "version": "1.0", "type": 1, "width": 800, "height": 600, "parent": "game-container", "scene": { "preload": "preload.js", "create": "create.js" }, "physics": { "default": "arcade", "arcade": { "gravity": { "y": 200 } } } } } ``` ### Response #### Success Response (200) N/A (Constructor does not return a value in the traditional sense, it initializes an object) #### Response Example N/A ``` -------------------------------- ### Get Tween Start Delay Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/tweens-basetween The `startDelay` property represents the time in milliseconds before the 'onStart' event is triggered. For a Tween, it's the minimum delay among its TweenDatas. For a TweenChain, it's the delay specified in its configuration. ```javascript const delay = tween.startDelay; console.log(`Tween start delay: ${delay}ms`); ``` -------------------------------- ### Listen for Camera Zoom Start Event Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/event/cameras-scene2d-events This code snippet demonstrates how to listen for the beginning of a camera zoom effect in Phaser. It includes examples for using the 'camerazoomstart' event string and the Phaser.Cameras.Scene2D.Events.ZOOM_START constant. ```javascript this.cameras.main.on('camerazoomstart', () => {}); ``` ```javascript this.cameras.main.on(Phaser.Cameras.Scene2D.Events.ZOOM_START, () => {}); ``` -------------------------------- ### BasePlugin Constructor Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/plugins-baseplugin Initializes a new instance of BasePlugin. This is a global plugin installed once into the Game's Plugin Manager. ```APIDOC ## BasePlugin Constructor ### Description A Global Plugin is installed just once into the Game owned Plugin Manager. It can listen for Game events and respond to them. ### Method `new BasePlugin(pluginManager)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters #### Path Parameters None #### Query Parameters None ``` -------------------------------- ### Get Counter-Clockwise Angular Distance - GetCounterClockwiseDistance Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/function/math Calculates the shortest non-positive angular distance from a starting angle to a target angle in a counter-clockwise direction. It takes two angles in radians and returns the distance in radians, within the range (-2pi, 0]. ```javascript Phaser.Math.Angle.GetCounterClockwiseDistance(angle1, angle2) ``` -------------------------------- ### POST /scene/add Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/scenes-sceneplugin Adds a Scene into the Scene Manager and optionally starts it. ```APIDOC ## POST /scene/add ### Description Add the Scene into the Scene Manager and start it if 'autoStart' is true or the Scene config 'active' property is set. ### Method POST ### Endpoint `/scene/add` ### Parameters #### Query Parameters - **key** (string) - Required - A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`. - **sceneConfig** (Phaser.Types.Scenes.SceneType) - Required - The config for the Scene. - **autoStart** (boolean) - Optional - If `true` the Scene will be started immediately after being added. - **data** (object) - Optional - Optional data object. This will be set as `Scene.settings.data` and passed to `Scene.init`, and `Scene.create`. ### Returns Phaser.Scene - The added Scene, if it was added immediately, otherwise `null`. ``` -------------------------------- ### Get Clockwise Angular Distance - GetClockwiseDistance Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/function/math Calculates the shortest non-negative angular distance from a starting angle to a target angle in a clockwise direction. It accepts two angles in radians and returns the distance in radians, within the range [0, 2pi). ```javascript Phaser.Math.Angle.GetClockwiseDistance(angle1, angle2) ``` -------------------------------- ### GLSLFile Constructor and Usage Example Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/loader-filetypes-glslfile Demonstrates how to instantiate the GLSLFile class, which is used internally by the Phaser Loader to load GLSL files. The constructor takes the loader, key, optional URL, and optional XHR settings. It's not typically created directly by the user. ```javascript /** * Creates a new GLSLFile instance. * @param {Phaser.Loader.LoaderPlugin} loader A reference to the Loader that is responsible for this file. * @param {string} key The key to use for this file, or a file configuration object. * @param {string} [url] The absolute or relative URL to load this file from. If undefined or null it will be set to `.glsl`. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] Extra XHR Settings specifically for this file. */ new GLSLFile(loader, key, [url], [xhrSettings]); ``` -------------------------------- ### Get Phaser Timeline Progress (JavaScript) Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/time-timeline Returns a number between 0 and 1 indicating the progress of a Phaser Timeline. A value of 0 is the start, 1 is complete. This is based on completed events, not duration. ```javascript const progress = this.timeline.getProgress(); ``` -------------------------------- ### Get Random Element from Array (Phaser Utils) Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/function/utils Returns a random element from a given array. It supports specifying a start index and a length to define the range from which to pick the random element. Returns null if no element can be found within the specified range. ```javascript Phaser.Utils.Array.GetRandom(array, [startIndex], [length]) ``` -------------------------------- ### Input Plugin Boot Event Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/event/input-events The Input Plugin Boot Event is dispatched by the Input Plugin when it boots, signalling to all of its systems to create themselves. ```APIDOC ## BOOT ### Description The Input Plugin Boot Event. This internal event is dispatched by the Input Plugin when it boots, signalling to all of its systems to create themselves. ### Member of Phaser.Input.Events > Source: src/input/events/BOOT_EVENT.js#L7 > Since: 3.0.0 ``` -------------------------------- ### Load Sprite Sheet with Configuration Object Source: https://docs.phaser.io/api-documentation/4.0.0-rc.6/class/loader-loaderplugin Adds a sprite sheet image to the load queue using a configuration object. This method provides more options, including specifying start and end frames. It's useful for more complex sprite sheet setups. ```javascript this.load.spritesheet({ key: 'bot', url: 'images/robot.png', frameConfig: { frameWidth: 32, frameHeight: 38, startFrame: 0, endFrame: 8 } }); ```