input / output | ColorObject | Color† | HSVColorObject | number† | string |
---|---|---|---|---|---|
(h: number, s: number, l: number) | HSLToColor | ||||
(h: number, s: number, v: number) | HSVToRGB | HSVToRGB | |||
(r: number, g: number, b: number, a: number) | GetColor32 | ||||
(r: number, g: number, b: number) | RGBToHSV | RGBToHSV | GetColor | RGBToString | |
ColorObject | ObjectToColor, ValueToColor | ||||
string '#RGB' '#RRGGBB' |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Richard Davey <[email protected]> | |
* @copyright 2016 Photon Storm Ltd. | |
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} | |
* | |
* @overview | |
* | |
* Phaser - http://phaser.io | |
* | |
* v2.11.1 "2018-10-02" - Built: Fri Feb 01 2019 14:02:33 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'phaser'; | |
import GameScalePlugin from 'phaser-plugin-game-scale'; | |
console.assert(GameScalePlugin, 'GameScalePlugin'); | |
var config = { | |
type: Phaser.AUTO, | |
width: 800, | |
height: 600, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Phaser.Game(/* ... */); |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare type CallCallback = (item: Phaser.GameObjects.GameObject)=>void; | |
declare type GridAlignConfig = { | |
/** | |
* The width of the grid in items (not pixels). -1 means lay all items out horizontally, regardless of quantity. | |
* If both this value and height are set to -1 then this value overrides it and the `height` value is ignored. | |
*/ | |
width?: integer; | |
/** | |
* The height of the grid in items (not pixels). -1 means lay all items out vertically, regardless of quantity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Renders the content and empties the current batch. | |
* | |
* Modified for {@link https://github.com/photonstorm/phaser-ce/issues/194 WebGL: INVALID_VALUE: vertexAttribPointer: index out of range (Ubuntu)}. | |
* | |
* @method PIXI.WebGLSpriteBatch#flush | |
*/ | |
PIXI.WebGLSpriteBatch.prototype.flush = function () { | |
// If the batch is length 0 then return as there is nothing to draw | |
if (this.currentBatchSize === 0) { |
Results of collide(sprite1, sprite2)
or overlap(sprite1, sprite2)
.
Body 1 | Body 2 | collide | overlap | embedded | touching.none | overlapX/Y | separation¹ | acceleration¹ |
---|---|---|---|---|---|---|---|---|
sprite.exists=false | false | false | ||||||
enable=false | false | false | ||||||
checkCollision.none=true | false | false | ||||||
immovable=true | true | true | false | ≠ 0 | no | no | ||
moves=false | true | true | false | ≠ 0 | yes | no² | ||
bounce³ is 0 |
The presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value. If the attribute is present, its value must either be the empty string or a value that is an ASCII case-insensitive match for the attribute's canonical name, with no leading or trailing whitespace. The values "true" and "false" are not allowed on boolean attributes. To represent a false value, the attribute has to be omitted altogether.
allowfullscreen
async
autofocus
autoplay
checked
alive | exists | fresh | health | renderable | visible | |
---|---|---|---|---|---|---|
sprite.exists = false | ❌ | ❌ | ||||
sprite.exists = true | ✔️ | ✔️ | ||||
sprite.kill() | ❌ | ❌ | ❌ | |||
sprite.revive(…) | ✔️ | ✔️ | 1* | ✔️ | ||
sprite.reset(…) | ✔️ | ✔️ | ✔️ | 1* | ✔️ | ✔️ |
group.create(…) | ✔️* | ✔️* | ✔️* | |||
group.createMultiple(…) | ❌* | ❌* | ❌* | |||
group.resetChild(…, x, y) | ✔️ | ✔️ | ✔️ | 1 | ✔️ | ✔️ |