diff --git a/docs/docs/alphamaskimage.md b/docs/docs/alphamaskimage.md index 257e0dcc1d..a33d64cc02 100644 --- a/docs/docs/alphamaskimage.md +++ b/docs/docs/alphamaskimage.md @@ -208,4 +208,20 @@ image.setTexture(key, frame, { - `undefined` : Expand mask texture size to fit target texture. - A number : Scale mask texture size. - `backgroundColor` : Background color filled with masked area. - - `undefiined` : No background color. \ No newline at end of file + - `undefiined` : No background color. + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = image.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/bbcodetext.md b/docs/docs/bbcodetext.md index 81ed9573f5..70753e0c25 100644 --- a/docs/docs/bbcodetext.md +++ b/docs/docs/bbcodetext.md @@ -745,3 +745,19 @@ txt.setDelimiters(delimiterLeft, delimiterRight); // '<', '>' txt.setRTL(rtl).setText(newContent); ``` - Invoke `setRTL` method before setting new content. + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = txt.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/bitmaptext.md b/docs/docs/bitmaptext.md index 5ae5ae4ecf..7bd8612cde 100644 --- a/docs/docs/bitmaptext.md +++ b/docs/docs/bitmaptext.md @@ -360,10 +360,27 @@ var data = txt.getCharacterAt(x, y); - `r` : The right-most point of this character, including xAdvance. - `line` : The line number the character appears on. + ### Other properties See [game object](gameobject.md) +### Create mask + +```javascript +var mask = txt.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + + ## Appendix ### Default characters set of retro font diff --git a/docs/docs/blitter.md b/docs/docs/blitter.md index 9768d906cd..74cd63d7bf 100644 --- a/docs/docs/blitter.md +++ b/docs/docs/blitter.md @@ -204,3 +204,22 @@ bob.destroy(); ```javascript var data = bob.data; // {} ``` + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = bob.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/canvas-circularprogress.md b/docs/docs/canvas-circularprogress.md index c7bcf05f11..d67c54961a 100644 --- a/docs/docs/canvas-circularprogress.md +++ b/docs/docs/canvas-circularprogress.md @@ -423,6 +423,22 @@ var circularProgress = scene.make.rexCircularProgressCanvas({ }, scope); ``` +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = circularProgress.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) + ### Compare with Circular-progress shape - Circular-progress canvas creates a canvas then draw on that canvas, [circular progress shape](shape-circularprogress.md) draw on GRAPHICS pipeline like Shape or Graphics game object. diff --git a/docs/docs/canvas-lineprogress.md b/docs/docs/canvas-lineprogress.md index 087ca5cd4e..f06d13efa6 100644 --- a/docs/docs/canvas-lineprogress.md +++ b/docs/docs/canvas-lineprogress.md @@ -364,6 +364,22 @@ var lineProgress = scene.make.rexLineProgressCanvas({ // lineProgress.alpha = alpha; ``` +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = lineProgress.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) + ### Compare with Line-progress shape - Line-progress canvas creates a canvas then draw on that canvas, [line progress shape](shape-lineprogress.md) draw on GRAPHICS pipeline like Shape or Graphics game object. diff --git a/docs/docs/canvas-roundrectangle.md b/docs/docs/canvas-roundrectangle.md index 26dc8e88ca..10a12efd39 100644 --- a/docs/docs/canvas-roundrectangle.md +++ b/docs/docs/canvas-roundrectangle.md @@ -342,6 +342,18 @@ Number of interpolation points in each round corner. Default value is `4`. See [game object](gameobject.md) +### Create mask + +```javascript +var mask = rect.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) + ### Compare with [Shape-Roundrectangle](shape-roundrectangle.md) - Gradient diff --git a/docs/docs/canvas.md b/docs/docs/canvas.md index 6bff206a75..77e511821c 100644 --- a/docs/docs/canvas.md +++ b/docs/docs/canvas.md @@ -267,7 +267,23 @@ or canvas.resize(width, height); ``` -## Compare with [Graphics object](graphics.md) +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = canvas.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) + +### Compare with [Graphics object](graphics.md) - Drawing method - This canvas object draws stuff on canvas in WEBGL or CANVAS render mode. diff --git a/docs/docs/canvasinput.md b/docs/docs/canvasinput.md index 0c9d0b0f5b..1b1a899f8a 100644 --- a/docs/docs/canvasinput.md +++ b/docs/docs/canvasinput.md @@ -533,4 +533,16 @@ Set `enableCapture` to `false` to bypass key input to this input-text game objec ### Other properties -See [DynamicText](dynamictext.md). \ No newline at end of file +See [Dynamic text game object](dynamictext.md) [game object](gameobject.md) + +### Create mask + +```javascript +var mask = txt.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/circlemaskimage.md b/docs/docs/circlemaskimage.md index a128762fd3..7c5333f1da 100644 --- a/docs/docs/circlemaskimage.md +++ b/docs/docs/circlemaskimage.md @@ -253,4 +253,20 @@ image.setTexture(key, frame, { bl: {x : radiusX, y: radiusY}, br: {x : radiusX, y: radiusY}, } - ``` \ No newline at end of file + ``` + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = image.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/container.md b/docs/docs/container.md index f3b3795e20..37f873665c 100644 --- a/docs/docs/container.md +++ b/docs/docs/container.md @@ -264,7 +264,26 @@ var scaleX = matrix.scaleX; var scaleY = matrix.scaleY; ``` -## Compare with [group object](group.md) +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = container.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + +### Compare with [group object](group.md) - Container and group objects are all have a children list. - Container has position, angle, alpha, visible, ...etc, but group does not have. diff --git a/docs/docs/containerlite.md b/docs/docs/containerlite.md index f1baadf3ef..774ed726ac 100644 --- a/docs/docs/containerlite.md +++ b/docs/docs/containerlite.md @@ -691,7 +691,12 @@ This method also will reset all local state of children. !!! note `container.add(containerLite)`, or `layer.add(containerLite)` won't add children of containerLite. -## Compare with Official Container + +### Other properties + +See [game object](gameobject.md) + +### Compare with Official Container - Position/anlge/scale of a child object : - [Container](container.md) : Local position/anlge/scale, responding to parent container, not a world position/anlge/scale. diff --git a/docs/docs/dynamicbitmaptext.md b/docs/docs/dynamicbitmaptext.md index 7356fbf4a9..92a664298c 100644 --- a/docs/docs/dynamicbitmaptext.md +++ b/docs/docs/dynamicbitmaptext.md @@ -116,4 +116,19 @@ txt.text = '...'; ### Other properties -This dynamic bitmap text class is extended from [bitmap text](bitmaptext.md) \ No newline at end of file +See [bitmap text](bitmaptext.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = txt.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/dynamictext.md b/docs/docs/dynamictext.md index 6538f6e3c3..70f5061404 100644 --- a/docs/docs/dynamictext.md +++ b/docs/docs/dynamictext.md @@ -927,6 +927,22 @@ txt.setWrapConfig(config); ``` - `child` : Any [Character](dynamictext.md#character) or [Image](dynamictext.md#image) child +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = txt.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) + ### Compare with other kinds of text game object - [Built-in text](text.md): diff --git a/docs/docs/filechooser.md b/docs/docs/filechooser.md index 3d0cc05681..161c3259cc 100644 --- a/docs/docs/filechooser.md +++ b/docs/docs/filechooser.md @@ -298,7 +298,10 @@ scene.plugins.get('rexFileChooser').open({ ``` - Length `files` is 0 : User cancels file chooser dialog. +### Other properties + +See [dom game object](domelement.md), [game object](gameobject.md) ### Interactive with other game objects -See [dom-element's Interactive with other game objects](domelement.md#interactive-with-other-game-objects) \ No newline at end of file +See [dom-element's Interactive with other game objects](domelement.md#interactive-with-other-game-objects) diff --git a/docs/docs/filedropzone.md b/docs/docs/filedropzone.md index d9705590d4..33c0aad920 100644 --- a/docs/docs/filedropzone.md +++ b/docs/docs/filedropzone.md @@ -276,6 +276,10 @@ fileDropZone.loadFilePromise(file, loaderType, key, cahceType) URL.revokeObjectURL(objectURL); ``` +### Other properties + +See [dom game object](domelement.md), [game object](gameobject.md) + ### Interactive with other game objects See [dom-element's Interactive with other game objects](domelement.md#interactive-with-other-game-objects) \ No newline at end of file diff --git a/docs/docs/graphics.md b/docs/docs/graphics.md index 4ee062a2c0..c3654591e0 100644 --- a/docs/docs/graphics.md +++ b/docs/docs/graphics.md @@ -237,10 +237,21 @@ graphics.rotateCanvas(radians); graphics.generateTexture(key, width, height); // key: texture key ``` +### Other properties + +See [game object](gameobject.md) + ### Create mask ```javascript var mask = graphics.createGeometryMask(); ``` -See [mask](mask.md) \ No newline at end of file +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/gridtable.md b/docs/docs/gridtable.md index d51fe53040..e6e6bf815f 100644 --- a/docs/docs/gridtable.md +++ b/docs/docs/gridtable.md @@ -564,4 +564,8 @@ var cell = table.getCell(cellIndex); ```javascript var cellIndex = cell.index; -``` \ No newline at end of file +``` + +### Other properties + +See [game object](gameobject.md) diff --git a/docs/docs/image.md b/docs/docs/image.md index 212f39603e..db9a792b96 100644 --- a/docs/docs/image.md +++ b/docs/docs/image.md @@ -99,4 +99,8 @@ See [game object](gameobject.md) var mask = image.createBitmapMask(); ``` -See [mask](mask.md) \ No newline at end of file +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/imagebox.md b/docs/docs/imagebox.md index 8c1069b51e..963695d180 100644 --- a/docs/docs/imagebox.md +++ b/docs/docs/imagebox.md @@ -1,6 +1,7 @@ ## Introduction -Keep aspect ratio of image game object when scale-down resizing. +Keep aspect ratio of image game object when scale-down resizing. +A [containerLite game object ](containerlite.md) with 1 [image game object](image.md). - Author: Rex - Game object @@ -173,3 +174,21 @@ image.scaleImage(); ```javascript var internalImageGO = image.image; ``` + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +Create mask from internal image game object (`image.image`). + +```javascript +var mask = image.image.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Internal image game object (`image.image`) support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/inputtext.md b/docs/docs/inputtext.md index 0780a7ffad..8a4051f751 100644 --- a/docs/docs/inputtext.md +++ b/docs/docs/inputtext.md @@ -464,6 +464,9 @@ var keyObj = scene.input.keyboard.addKey('W', enableCapture, emitOnRepeat); Set `enableCapture` to `false` to bypass key input to this input-text game objecct. +### Other properties + +See [dom game object](domelement.md), [game object](gameobject.md) ### Interactive with other game objects @@ -485,4 +488,4 @@ See [dom-element's Interactive with other game objects](domelement.md#interactiv } }) ``` - - `inputType` : `'text'`, `'textarea'`, ... \ No newline at end of file + - `inputType` : `'text'`, `'textarea'`, ... diff --git a/docs/docs/layer.md b/docs/docs/layer.md index 81291051cf..7aee55ca26 100644 --- a/docs/docs/layer.md +++ b/docs/docs/layer.md @@ -230,7 +230,14 @@ See [game object](gameobject.md) ### Create mask ```javascript -var mask = image.createBitmapMask(); +var mask = layer.createBitmapMask(); ``` -See [mask](mask.md) \ No newline at end of file +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/line.md b/docs/docs/line.md index 1afca4a5c1..56bc4ba744 100644 --- a/docs/docs/line.md +++ b/docs/docs/line.md @@ -1,6 +1,6 @@ ## Introduction -Draw a line with start/end/body textures. +Draw a line with start/end/body textures, extended from [RenderTexture game object](rendertexture.md). - Author: Rex - Game object @@ -205,4 +205,20 @@ var line = scene.add.rexLine({ - Set line-body width ```javascript line.setLineBodyWidth(width); - ``` \ No newline at end of file + ``` + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = line.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/mesh.md b/docs/docs/mesh.md index 8eb2d49245..e0ac2499ce 100644 --- a/docs/docs/mesh.md +++ b/docs/docs/mesh.md @@ -315,4 +315,23 @@ mesh.setInteractive(); ```javascript debugGraphics.clear(); debugGraphics.lineStyle(1, 0x00ff00); - ``` \ No newline at end of file + ``` + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = mesh.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/ninepatch.md b/docs/docs/ninepatch.md index 4262b660a1..fe66b2b228 100644 --- a/docs/docs/ninepatch.md +++ b/docs/docs/ninepatch.md @@ -1,6 +1,6 @@ ## Introduction -Stretchable image. +Stretchable image, extended from [RenderTexture game object](rendertexture.md). - Author: Rex - Game object @@ -325,6 +325,22 @@ ninePatch.setGetFrameNameCallback(callback); ninePatch.updateTexture(); ``` +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = ninePatch.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) + ### Compare with [nine-slice](nineslice.md) - Nine-slice is a built-in game object. diff --git a/docs/docs/ninepatch2.md b/docs/docs/ninepatch2.md index df86966e9a..c37a539068 100644 --- a/docs/docs/ninepatch2.md +++ b/docs/docs/ninepatch2.md @@ -335,6 +335,25 @@ ninePatch.setGetFrameNameCallback(callback); ninePatch.updateTexture(); ``` +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = ninePatch.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + ### Compare with [nine-patch](ninepatch.md) - Nine-patch2 has better performance. diff --git a/docs/docs/nineslice.md b/docs/docs/nineslice.md index e392bd1c45..0e4479a2a7 100644 --- a/docs/docs/nineslice.md +++ b/docs/docs/nineslice.md @@ -105,6 +105,13 @@ var mask = nineSlice.createBitmapMask(); See [mask](mask.md) +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + ### Compare with [nine-patch](ninepatch.md) - Nine-slice is a built-in game object. diff --git a/docs/docs/particles.md b/docs/docs/particles.md index 8007f0445a..4caca02599 100644 --- a/docs/docs/particles.md +++ b/docs/docs/particles.md @@ -869,3 +869,22 @@ class MyParticle extends Phaser.GameObjects.Particles.Particle { } } ``` + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = emitter.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/perspective-card.md b/docs/docs/perspective-card.md index c2171e8ee8..53f2a0c4c6 100644 --- a/docs/docs/perspective-card.md +++ b/docs/docs/perspective-card.md @@ -314,4 +314,19 @@ card.flip.setEase(ease); ### Other properties -See [container](containerlite.md). +See [container](containerlite.md), [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = card.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/perspective-carousel.md b/docs/docs/perspective-carousel.md index 9da570a97d..327055898f 100644 --- a/docs/docs/perspective-carousel.md +++ b/docs/docs/perspective-carousel.md @@ -279,4 +279,19 @@ carousel.roll.setEase(ease); ### Other properties -See [container](containerlite.md). \ No newline at end of file +See [container](containerlite.md), [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = carousel.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/perspective-image.md b/docs/docs/perspective-image.md index e685738418..d3ec0d5f0d 100644 --- a/docs/docs/perspective-image.md +++ b/docs/docs/perspective-image.md @@ -219,4 +219,19 @@ rt.drawFrame(key, frame); ### Other properties -See [Mesh](mesh.md) game object. \ No newline at end of file +See [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = image.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/perspective-imagecarousel.md b/docs/docs/perspective-imagecarousel.md index 34ec4d6bbd..20b7f6e1e4 100644 --- a/docs/docs/perspective-imagecarousel.md +++ b/docs/docs/perspective-imagecarousel.md @@ -232,3 +232,22 @@ carousel.roll.setEase(ease); ```javascript var isRunning = carousel.roll.isRunning; ``` + +### Other properties + +See [container](containerlite.md), [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = carousel.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/perspective-rendertexture.md b/docs/docs/perspective-rendertexture.md index 1c32ccee8d..d17cbf8a66 100644 --- a/docs/docs/perspective-rendertexture.md +++ b/docs/docs/perspective-rendertexture.md @@ -206,4 +206,19 @@ image.rt.fill(rgb, alpha); ### Other properties -See [Perspective image](perspective-image.md) game object. \ No newline at end of file +See [Perspective image game object](perspective-image.md), [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = image.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/perspective-sprite.md b/docs/docs/perspective-sprite.md index f090ff4aeb..fc47aba6e7 100644 --- a/docs/docs/perspective-sprite.md +++ b/docs/docs/perspective-sprite.md @@ -235,4 +235,19 @@ sprite.anims.restart(); ### Other properties -See [Perspective image](perspective-image.md) game object. \ No newline at end of file +See [Perspective image game object](perspective-image.md), [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = sprite.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/plane.md b/docs/docs/plane.md index 85ed365333..ff5a022b4d 100644 --- a/docs/docs/plane.md +++ b/docs/docs/plane.md @@ -239,3 +239,22 @@ replacing any current texture it may have. ```javascript plane.removeCheckerboard(); ``` + +### Other properties + +See [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = plane.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/quad-image.md b/docs/docs/quad-image.md index f6bd6da37d..1350ea234d 100644 --- a/docs/docs/quad-image.md +++ b/docs/docs/quad-image.md @@ -213,4 +213,19 @@ var quadimage = scene.make.rexQuadImage({ ### Other properties -See [Mesh](mesh.md) game object. \ No newline at end of file +See [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = image.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/quad-rendertexture.md b/docs/docs/quad-rendertexture.md index f68e71c4d6..acc75f027e 100644 --- a/docs/docs/quad-rendertexture.md +++ b/docs/docs/quad-rendertexture.md @@ -207,4 +207,19 @@ image.rt.fill(rgb, alpha); ### Other properties -See [Quad image](quad-image.md) game object. \ No newline at end of file +See [Quad image game object](quad-image.md), [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = image.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/rendertexture.md b/docs/docs/rendertexture.md index 10aad61b93..feb16ecd2b 100644 --- a/docs/docs/rendertexture.md +++ b/docs/docs/rendertexture.md @@ -188,4 +188,8 @@ See [game object](gameobject.md) var mask = rt.createBitmapMask(); ``` -See [mask](mask.md) \ No newline at end of file +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/shader.md b/docs/docs/shader.md index ef67fba85a..4f9a2fd1cc 100644 --- a/docs/docs/shader.md +++ b/docs/docs/shader.md @@ -235,6 +235,14 @@ end See [game object](gameobject.md) +### Create mask + +```javascript +var mask = shader.createBitmapMask(); +``` + +See [mask](mask.md) + ### BaseShader ```javascript diff --git a/docs/docs/shape-arc.md b/docs/docs/shape-arc.md index 2430b7779a..a1f37236f5 100644 --- a/docs/docs/shape-arc.md +++ b/docs/docs/shape-arc.md @@ -165,3 +165,18 @@ var arc = scene.add.arc(x, y, radius, startAngle, endAngle, anticlockwise, fillC ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = arc.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/shape-checkbox.md b/docs/docs/shape-checkbox.md index 6175166887..886558e71b 100644 --- a/docs/docs/shape-checkbox.md +++ b/docs/docs/shape-checkbox.md @@ -372,3 +372,19 @@ var checkbox = scene.add.rexCheckbox({ ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = checkbox.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + diff --git a/docs/docs/shape-circle.md b/docs/docs/shape-circle.md index 33ed8360f2..6bbf72377c 100644 --- a/docs/docs/shape-circle.md +++ b/docs/docs/shape-circle.md @@ -126,3 +126,19 @@ var circle = scene.add.circle(x, y, radius, fillColor); ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = circle.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + diff --git a/docs/docs/shape-circularprogress.md b/docs/docs/shape-circularprogress.md index b388f18439..1afbe61412 100644 --- a/docs/docs/shape-circularprogress.md +++ b/docs/docs/shape-circularprogress.md @@ -371,6 +371,25 @@ var circularProgress = scene.make.rexCircularProgress({ // circularProgress.alpha = alpha; ``` +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = circularProgress.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + ### Compare with Circular-progress canvas - [Circular-progress canvas](canvas-circularprogress.md) creates a canvas then draw on that canvas, circular progress shape draw on GRAPHICS pipeline like Shape or Graphics game object. diff --git a/docs/docs/shape-cover.md b/docs/docs/shape-cover.md index 5667ea46c9..d120159c97 100644 --- a/docs/docs/shape-cover.md +++ b/docs/docs/shape-cover.md @@ -144,3 +144,19 @@ var cover = scene.add.rexCover({ ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = cover.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + diff --git a/docs/docs/shape-curve.md b/docs/docs/shape-curve.md index 1dfe5d9f2a..b2813bf372 100644 --- a/docs/docs/shape-curve.md +++ b/docs/docs/shape-curve.md @@ -115,3 +115,18 @@ curve.smoothness = smoothness; ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = curve.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/shape-custom-progress.md b/docs/docs/shape-custom-progress.md index 1336296370..5fec0c85c9 100644 --- a/docs/docs/shape-custom-progress.md +++ b/docs/docs/shape-custom-progress.md @@ -337,3 +337,22 @@ See [Shape class](shape-custom-shapes.md#shape-class) customProgress.setAlpha(alpha); // customProgress.alpha = alpha; ``` + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = customProgress.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support \ No newline at end of file diff --git a/docs/docs/shape-custom-shapes.md b/docs/docs/shape-custom-shapes.md index 1b6629393c..0ce6023491 100644 --- a/docs/docs/shape-custom-shapes.md +++ b/docs/docs/shape-custom-shapes.md @@ -797,6 +797,25 @@ The same as Circle. // shape.alpha = alpha; ``` +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = shape.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + ### Compare with similar plugins - [Custom Shapes](shape-custom-shapes.md) : Draw shapes. diff --git a/docs/docs/shape-ellipse.md b/docs/docs/shape-ellipse.md index 343f74c232..97c5b7ff8b 100644 --- a/docs/docs/shape-ellipse.md +++ b/docs/docs/shape-ellipse.md @@ -126,3 +126,18 @@ ellipse.smoothness = smoothness; ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = ellipse.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/shape-fullwindowrectangle.md b/docs/docs/shape-fullwindowrectangle.md index 79d9db2d31..1c86331447 100644 --- a/docs/docs/shape-fullwindowrectangle.md +++ b/docs/docs/shape-fullwindowrectangle.md @@ -138,3 +138,19 @@ var rect = scene.add.rexFullWindowRectangle(fillColor, fillAlpha); ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = rect.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + diff --git a/docs/docs/shape-grid.md b/docs/docs/shape-grid.md index 370cadef31..f972651db0 100644 --- a/docs/docs/shape-grid.md +++ b/docs/docs/shape-grid.md @@ -126,3 +126,19 @@ var grid = scene.add.grid(x, y, width, height, cellWidth, cellHeight, fillColor, ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = grid.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + diff --git a/docs/docs/shape-isobox.md b/docs/docs/shape-isobox.md index 106db9729c..4179d5b235 100644 --- a/docs/docs/shape-isobox.md +++ b/docs/docs/shape-isobox.md @@ -97,3 +97,18 @@ var isoBox = scene.add.isobox(x, y, width, height, fillTop, fillLeft, fillRight) ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = isoBox.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/shape-isotriangle.md b/docs/docs/shape-isotriangle.md index 0074e70e49..50a8d42229 100644 --- a/docs/docs/shape-isotriangle.md +++ b/docs/docs/shape-isotriangle.md @@ -113,3 +113,18 @@ var isoTriangle = scene.add.isotriangle(x, y, width, height, reversed, fillTop, ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = isoTriangle.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/shape-line.md b/docs/docs/shape-line.md index 4fd799e118..5d1eb77d1a 100644 --- a/docs/docs/shape-line.md +++ b/docs/docs/shape-line.md @@ -115,3 +115,19 @@ line.setLineWidth(startWidth, endWidth); ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = line.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + diff --git a/docs/docs/shape-lineprogress.md b/docs/docs/shape-lineprogress.md index 1c74114dae..59bffc6296 100644 --- a/docs/docs/shape-lineprogress.md +++ b/docs/docs/shape-lineprogress.md @@ -355,3 +355,22 @@ var lineProgress = scene.make.rexLineProgress({ lineProgress.setAlpha(alpha); // lineProgress.alpha = alpha; ``` + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = lineProgress.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/shape-polygon.md b/docs/docs/shape-polygon.md index c9d432db2e..8aee045b7a 100644 --- a/docs/docs/shape-polygon.md +++ b/docs/docs/shape-polygon.md @@ -130,3 +130,18 @@ polygon.setTo(points); ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = polygon.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/shape-rectangle.md b/docs/docs/shape-rectangle.md index d54b86f7a2..22d116e629 100644 --- a/docs/docs/shape-rectangle.md +++ b/docs/docs/shape-rectangle.md @@ -118,3 +118,18 @@ var rect = scene.add.rectangle(x, y, width, height, fillColor); ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = rect.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support \ No newline at end of file diff --git a/docs/docs/shape-roundrectangle.md b/docs/docs/shape-roundrectangle.md index e8f7f4d040..71496a3175 100644 --- a/docs/docs/shape-roundrectangle.md +++ b/docs/docs/shape-roundrectangle.md @@ -386,3 +386,19 @@ Number of interpolation points in each round corner. Default value is `4`. ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = rect.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + diff --git a/docs/docs/shape-spinner.md b/docs/docs/shape-spinner.md index 17a2b25d9b..b1f1004616 100644 --- a/docs/docs/shape-spinner.md +++ b/docs/docs/shape-spinner.md @@ -326,4 +326,24 @@ var customSpinner = this.rexSpinner.add.custom({ #### Shape class -See [Shape class](shape-custom-shapes.md#shape-class) \ No newline at end of file +See [Shape class](shape-custom-shapes.md#shape-class) + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = customSpinner.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + diff --git a/docs/docs/shape-star.md b/docs/docs/shape-star.md index 85674e3256..39e43e1f5f 100644 --- a/docs/docs/shape-star.md +++ b/docs/docs/shape-star.md @@ -147,3 +147,18 @@ var star = scene.add.star(x, y, points, innerRadius, outerRadius, fillColor); ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = star.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/shape-toggleswitch.md b/docs/docs/shape-toggleswitch.md index 56b38e470d..52009baae4 100644 --- a/docs/docs/shape-toggleswitch.md +++ b/docs/docs/shape-toggleswitch.md @@ -405,3 +405,18 @@ var toggleSwitch = scene.add.rexToggleSwitch({ ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = toggleSwitch.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/shape-triangle.md b/docs/docs/shape-triangle.md index 8fb657b54b..e35ccc9c20 100644 --- a/docs/docs/shape-triangle.md +++ b/docs/docs/shape-triangle.md @@ -115,3 +115,18 @@ triangle.setLineWidth(startWidth, endWidth); ### Other properties See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = triangle.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/shape-triangle2.md b/docs/docs/shape-triangle2.md index 319d4ab3c9..10ac0ddab4 100644 --- a/docs/docs/shape-triangle2.md +++ b/docs/docs/shape-triangle2.md @@ -339,4 +339,23 @@ var triangle = scene.add.rexTriangle({ ```javascript triangle.setArrowOnly(enable); // triangle.arrowOnly = enable; - ``` \ No newline at end of file + ``` + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = triangle.createGeometryMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/shatter-image.md b/docs/docs/shatter-image.md index 4de1973a9a..aebd673b95 100644 --- a/docs/docs/shatter-image.md +++ b/docs/docs/shatter-image.md @@ -338,4 +338,23 @@ image.resetImage(); or ```javascript image.setTint(color); - ``` \ No newline at end of file + ``` + +### Other properties + +See [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = image.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/shatter-rendertexture.md b/docs/docs/shatter-rendertexture.md index e0b86cf78d..a8246a2599 100644 --- a/docs/docs/shatter-rendertexture.md +++ b/docs/docs/shatter-rendertexture.md @@ -198,4 +198,19 @@ image.rt.fill(rgb, alpha); ### Other properties -See [Shatter image](shatter-image.md) game object. \ No newline at end of file +See [Shatter image game object](shatter-image.md), [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = image.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/skew-image.md b/docs/docs/skew-image.md index 1aba283dde..8ba5ed4d2e 100644 --- a/docs/docs/skew-image.md +++ b/docs/docs/skew-image.md @@ -165,4 +165,19 @@ var quadimage = scene.make.rexSkewImage({ ### Other properties -See [Mesh](mesh.md) game object. \ No newline at end of file +See [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = image.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/skew-rendertexture.md b/docs/docs/skew-rendertexture.md index 962b7eaee7..4ca11ba406 100644 --- a/docs/docs/skew-rendertexture.md +++ b/docs/docs/skew-rendertexture.md @@ -186,4 +186,19 @@ image.rt.fill(rgb, alpha); ### Other properties -See [Skew image](skew-image.md) game object. \ No newline at end of file +See [Skew image game object](skew-image.md), [Mesh game object](mesh.md), [game object](gameobject.md) + +### Create mask + +```javascript +var mask = image.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support diff --git a/docs/docs/sprite.md b/docs/docs/sprite.md index f22e945717..31c16b79ae 100644 --- a/docs/docs/sprite.md +++ b/docs/docs/sprite.md @@ -113,6 +113,18 @@ See [game object - texture](gameobject.md#texture) See [game object](gameobject.md) +### Create mask + +```javascript +var mask = sprite.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) + ### Animation #### Create animation diff --git a/docs/docs/tagtext.md b/docs/docs/tagtext.md index 36e67fa057..54ed5e7c97 100644 --- a/docs/docs/tagtext.md +++ b/docs/docs/tagtext.md @@ -673,3 +673,19 @@ txt.generateTexture(key); txt.setRTL(rtl).setText(newContent); ``` - Invoke `setRTL` method before setting new content. + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = txt.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/text.md b/docs/docs/text.md index b685159fc8..7e57bfc037 100644 --- a/docs/docs/text.md +++ b/docs/docs/text.md @@ -333,4 +333,20 @@ Set the test string to use when measuring the font. ```javascript txt.style.setTestString(text); -``` \ No newline at end of file +``` + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = txt.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/textplayer.md b/docs/docs/textplayer.md index 5520f256df..78b0e43c96 100644 --- a/docs/docs/textplayer.md +++ b/docs/docs/textplayer.md @@ -986,7 +986,6 @@ Assume that adding a custom tag : `[custom=10,20][/custom]` ``` - `params` : Parameters passed from `params` in `'parser.-custom'` event. - ### Size - Resize canvas size @@ -1005,3 +1004,19 @@ Assume that adding a custom tag : `[custom=10,20][/custom]` ```javascript txt.setToMinSize(); ``` + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = txt.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/tilemap.md b/docs/docs/tilemap.md index afa54bdc55..c7405d5b8e 100644 --- a/docs/docs/tilemap.md +++ b/docs/docs/tilemap.md @@ -435,6 +435,13 @@ layer.setRenderOrder(renderOrder); layer.shuffle(tileX, tileY, width, height); ``` +### Shader effects + +`layer`` support [postFX effects](shader-builtin.md) + +!!! note + No preFX effect support + ### Tile #### Get tile diff --git a/docs/docs/tilesprite.md b/docs/docs/tilesprite.md index aaf2a6ba43..c7f21f9fa9 100644 --- a/docs/docs/tilesprite.md +++ b/docs/docs/tilesprite.md @@ -98,4 +98,8 @@ See [game object](gameobject.md) var mask = image.createBitmapMask(); ``` -See [mask](mask.md) \ No newline at end of file +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/transitionimage.md b/docs/docs/transitionimage.md index cbb40de349..0c313e5d50 100644 --- a/docs/docs/transitionimage.md +++ b/docs/docs/transitionimage.md @@ -1,6 +1,6 @@ ## Introduction -Transit texture to another one. A [containerLite game object](containerlite.md) with 2 [image](image.md) game objects. +Transit texture to another one. A [containerLite game object](containerlite.md) with 2 [image game objects](image.md). - Author: Rex - Game object @@ -472,4 +472,26 @@ Also will fire `'complete'` event. - [Grid cut](https://github.com/rexrainbow/phaser3-rex-notes/blob/master/examples/transition-image/grid-cut.js) - [Three-columns](https://github.com/rexrainbow/phaser3-rex-notes/blob/master/examples/transition-image/three-columns.js), apply mask to cell images. - Morph custom mask game object - - [Pie-mask](https://github.com/rexrainbow/phaser3-rex-notes/blob/master/examples/transition-image/pie-mask.js), mask current/next image by a [custom-progress game object](shape-custom-progress.md). \ No newline at end of file + - [Pie-mask](https://github.com/rexrainbow/phaser3-rex-notes/blob/master/examples/transition-image/pie-mask.js), mask current/next image by a [custom-progress game object](shape-custom-progress.md). + + +### Internal image game object + +- Current, next image game object + ```javascript + var curentImageGO = image.currentImage; + var nextImageGO = image.nextImage; + ``` +- Front, back image game object + ```javascript + var frontImageGO = image.frontImage; + var backImageGO = image.backImage; + ``` + +### Other properties + +See [game object](gameobject.md) + +### Shader effects + +Internal image game objects (`image.currentImage`, `image.nextImage`) support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/transitionimagepack.md b/docs/docs/transitionimagepack.md index ea3867369e..d35c9da173 100644 --- a/docs/docs/transitionimagepack.md +++ b/docs/docs/transitionimagepack.md @@ -241,3 +241,7 @@ Also will fire `'complete'` event. image.toggleFlipX(); image.toggleFlipY(); ``` + +### Other properties + +See [transition image object](transitionimage.md), [game object](gameobject.md) diff --git a/docs/docs/video.md b/docs/docs/video.md index 69dd890601..4fd6e9e0df 100644 --- a/docs/docs/video.md +++ b/docs/docs/video.md @@ -369,3 +369,19 @@ var texture = video.saveTexture(key); }, scope); ``` + +### Other properties + +See [game object](gameobject.md) + +### Create mask + +```javascript +var mask = video.createBitmapMask(); +``` + +See [mask](mask.md) + +### Shader effects + +Support [preFX and postFX effects](shader-builtin.md) diff --git a/docs/docs/youtubeplayer.md b/docs/docs/youtubeplayer.md index 42eb0a0d0e..2731a9aa75 100644 --- a/docs/docs/youtubeplayer.md +++ b/docs/docs/youtubeplayer.md @@ -349,6 +349,9 @@ player.resize(width, height); !!! warning "No `Playback time changed` event" Get playback time every tick might cause playing video lagging. +### Other properties + +See [dom game object](domelement.md), [game object](gameobject.md) ### Interactive with other game objects diff --git a/docs/docs/zone.md b/docs/docs/zone.md index 45529d9adb..8586c72b12 100644 --- a/docs/docs/zone.md +++ b/docs/docs/zone.md @@ -47,10 +47,6 @@ var zone = scene.make.zone({ var zone = new MyZone(x, y, width, height); ``` -### Other properties - -See [game object](gameobject.md) - ### Input hit zone ```javascript @@ -84,4 +80,8 @@ See [touch events](touchevents.md#register-interactive) } ``` -See [drop zone](touchevents.md#drop-zone) \ No newline at end of file +See [drop zone](touchevents.md#drop-zone) + +### Other properties + +See [game object](gameobject.md) diff --git a/docs/site/alphamaskimage/index.html b/docs/site/alphamaskimage/index.html index 526b6b6dd0..35e7dd3e7a 100644 --- a/docs/site/alphamaskimage/index.html +++ b/docs/site/alphamaskimage/index.html @@ -935,6 +935,27 @@ Set texture + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9505,6 +9526,27 @@ Set texture + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9728,6 +9770,14 @@

    Set texture +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = image.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    diff --git a/docs/site/bbcodetext/index.html b/docs/site/bbcodetext/index.html index edeee08483..4019d6d49b 100644 --- a/docs/site/bbcodetext/index.html +++ b/docs/site/bbcodetext/index.html @@ -1820,6 +1820,27 @@ RTL + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9783,6 +9804,27 @@ RTL + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -10553,6 +10595,14 @@

    RTL¶< +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = txt.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    diff --git a/docs/site/bitmaptext/index.html b/docs/site/bitmaptext/index.html index bb1008888b..0ce73b54e2 100644 --- a/docs/site/bitmaptext/index.html +++ b/docs/site/bitmaptext/index.html @@ -1834,6 +1834,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9623,6 +9637,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -10013,6 +10041,16 @@

    Get information of characterOther properties

    See game object

    +

    Create mask

    +
    var mask = txt.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +

    Appendix

    Default characters set of retro font

    + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9629,6 +9650,27 @@ + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9821,6 +9863,18 @@

    DestroyData

    var data = bob.data;  // {}
     
    +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = bob.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/canvas-circularprogress/index.html b/docs/site/canvas-circularprogress/index.html index 792e027436..a62415ca19 100644 --- a/docs/site/canvas-circularprogress/index.html +++ b/docs/site/canvas-circularprogress/index.html @@ -2460,6 +2460,27 @@ Events + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9610,6 +9631,27 @@ Events +
  • + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -10035,6 +10077,14 @@

    Events}, scope);

  • +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = circularProgress.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    Compare with Circular-progress shape

    +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = lineProgress.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    Compare with Line-progress shape

    @@ -9612,16 +9633,37 @@ - - +
  • + + Other properties +
  • - -
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + + +
  • + +
  • Compare with Graphics object +
  • + + + + @@ -9880,7 +9922,15 @@

    Size&par

    or

    canvas.resize(width, height);
     
    -

    Compare with Graphics object

    +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = canvas.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    +

    Compare with Graphics object

    @@ -10206,7 +10234,13 @@

    Bypass key inputOther properties

    -

    See DynamicText.

    +

    See Dynamic text game object game object

    +

    Create mask

    +
    var mask = txt.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    diff --git a/docs/site/circlemaskimage/index.html b/docs/site/circlemaskimage/index.html index 8b7b6c8570..add9986210 100644 --- a/docs/site/circlemaskimage/index.html +++ b/docs/site/circlemaskimage/index.html @@ -921,6 +921,27 @@ Set texture + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9505,6 +9526,27 @@ Set texture + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9771,6 +9813,14 @@

    Set texture +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = image.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    diff --git a/docs/site/container/index.html b/docs/site/container/index.html index 4666cd02fd..97343ee31b 100644 --- a/docs/site/container/index.html +++ b/docs/site/container/index.html @@ -2617,16 +2617,37 @@ - - +
  • + + Other properties +
  • - -
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + + +
  • + +
  • Compare with group object +
  • + + + + @@ -9690,16 +9711,37 @@ - - +
  • + + Other properties +
  • - -
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + + +
  • + +
  • Compare with group object +
  • + + + + @@ -9894,7 +9936,19 @@

    Get world position, rotation, scalevar scaleX = matrix.scaleX; var scaleY = matrix.scaleY; -

    Compare with group object

    +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = container.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    +

    Compare with group object

    - +
  • + + Other properties +
  • - -
  • + +
  • Compare with Official Container +
  • + + + + @@ -9970,16 +9977,23 @@ - - +
  • + + Other properties +
  • - -
  • + +
  • Compare with Official Container +
  • + + + + @@ -10597,7 +10611,9 @@

    Add to containerNote

    container.add(containerLite), or layer.add(containerLite) won't add children of containerLite.

    -

    Compare with Official Container

    +

    Other properties

    +

    See game object

    +

    Compare with Official Container

    @@ -9591,7 +9619,17 @@

    Crop&par

    Other properties

    -

    This dynamic bitmap text class is extended from bitmap text

    +

    See bitmap text, game object

    +

    Create mask

    +
    var mask = txt.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/dynamictext/index.html b/docs/site/dynamictext/index.html index 26cf96e732..f574c4e8fb 100644 --- a/docs/site/dynamictext/index.html +++ b/docs/site/dynamictext/index.html @@ -1947,6 +1947,27 @@ Input events of child + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9988,6 +10009,27 @@ Input events of child +
  • + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -10922,6 +10964,14 @@

    Input events of childOther properties

    +

    See game object

    +

    Create mask

    +
    var mask = txt.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    Compare with other kinds of text game object

    @@ -9662,6 +9676,13 @@ Generate texture +
  • + +
  • + + Other properties + +
  • @@ -9669,6 +9690,13 @@ Create mask +
  • + +
  • + + Shader effects + +
  • @@ -9880,10 +9908,18 @@

    TransferGenerate texture

    graphics.generateTexture(key, width, height);  // key: texture key
     
    +

    Other properties

    +

    See game object

    Create mask

    var mask = graphics.createGeometryMask();
     

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/gridtable/index.html b/docs/site/gridtable/index.html index 590b6c90e5..8036e5e80c 100644 --- a/docs/site/gridtable/index.html +++ b/docs/site/gridtable/index.html @@ -2767,6 +2767,13 @@ + + +
  • + + Other properties + +
  • @@ -9805,6 +9812,13 @@ + + +
  • + + Other properties + +
  • @@ -10338,6 +10352,8 @@

    ContainerProperties

    var cellIndex = cell.index;
     
    +

    Other properties

    +

    See game object

    diff --git a/docs/site/image/index.html b/docs/site/image/index.html index a6408bd0da..3ae44fd1f6 100644 --- a/docs/site/image/index.html +++ b/docs/site/image/index.html @@ -838,6 +838,13 @@ Create mask + + +
  • + + Shader effects + +
  • @@ -9451,6 +9458,13 @@ Create mask + + +
  • + + Shader effects + +
  • @@ -9565,6 +9579,8 @@

    Create mask
    var mask = image.createBitmapMask();
     

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    diff --git a/docs/site/imagebox/index.html b/docs/site/imagebox/index.html index 89856f3f32..068fa30b8c 100644 --- a/docs/site/imagebox/index.html +++ b/docs/site/imagebox/index.html @@ -983,6 +983,27 @@ Internal image game object + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9573,6 +9594,27 @@ Internal image game object + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9601,7 +9643,8 @@

    Image box

    Introduction

    -

    Keep aspect ratio of image game object when scale-down resizing.

    +

    Keep aspect ratio of image game object when scale-down resizing. +A containerLite game object with 1 image game object.

    @@ -9531,6 +9538,13 @@ Create mask + + +
  • + + Shader effects + +
  • @@ -9748,9 +9762,15 @@

    Set propertyOther properties

    See game object

    Create mask

    -
    var mask = image.createBitmapMask();
    +
    var mask = layer.createBitmapMask();
     

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/line/index.html b/docs/site/line/index.html index 16d6a2cb25..0cfa0fa3bb 100644 --- a/docs/site/line/index.html +++ b/docs/site/line/index.html @@ -1191,6 +1191,27 @@ Set textures + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9505,6 +9526,27 @@ Set textures + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9533,7 +9575,7 @@

    Line

    Introduction

    -

    Draw a line with start/end/body textures.

    +

    Draw a line with start/end/body textures, extended from RenderTexture game object.

    • Author: Rex
    • Game object
    • @@ -9742,6 +9784,14 @@

      Set textures

    +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = line.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    diff --git a/docs/site/mesh/index.html b/docs/site/mesh/index.html index ca3913099f..e790ad5120 100644 --- a/docs/site/mesh/index.html +++ b/docs/site/mesh/index.html @@ -1318,6 +1318,27 @@ Debug + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9623,6 +9644,27 @@ Debug + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9963,6 +10005,18 @@

    Debug& debugGraphics.lineStyle(1, 0x00ff00);

    +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = mesh.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/ninepatch/index.html b/docs/site/ninepatch/index.html index 7207042be0..d73e047de6 100644 --- a/docs/site/ninepatch/index.html +++ b/docs/site/ninepatch/index.html @@ -1191,6 +1191,27 @@ Update texture + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9568,6 +9589,27 @@ Update texture +
  • + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9603,7 +9645,7 @@

    Nine patch

    Introduction

    -

    Stretchable image.

    +

    Stretchable image, extended from RenderTexture game object.

    @@ -9655,6 +9669,20 @@ Other properties +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9949,7 +9977,17 @@

    RotationOther properties

    -

    See container.

    +

    See container, Mesh game object, game object

    +

    Create mask

    +
    var mask = carousel.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/perspective-image/index.html b/docs/site/perspective-image/index.html index c4c4ae66ed..c02c712f0a 100644 --- a/docs/site/perspective-image/index.html +++ b/docs/site/perspective-image/index.html @@ -1349,6 +1349,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9573,6 +9587,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9787,7 +9815,17 @@

    Change frame
    rt.drawFrame(key, frame);
     

    Other properties

    -

    See Mesh game object.

    +

    See Mesh game object, game object

    +

    Create mask

    +
    var mask = image.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/perspective-imagecarousel/index.html b/docs/site/perspective-imagecarousel/index.html index 9953018300..73a88bf1c5 100644 --- a/docs/site/perspective-imagecarousel/index.html +++ b/docs/site/perspective-imagecarousel/index.html @@ -1425,6 +1425,27 @@ + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9585,6 +9606,27 @@ + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9839,6 +9881,18 @@

    Status
    var isRunning = carousel.roll.isRunning;
     
    +

    Other properties

    +

    See container, Mesh game object, game object

    +

    Create mask

    +
    var mask = carousel.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/perspective-rendertexture/index.html b/docs/site/perspective-rendertexture/index.html index 959159e88d..c4f22b0fdc 100644 --- a/docs/site/perspective-rendertexture/index.html +++ b/docs/site/perspective-rendertexture/index.html @@ -1363,6 +1363,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9573,6 +9587,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9777,7 +9805,17 @@

    Fill&par // image.rt.fill(rgb, alpha, x, y, width, height);

    Other properties

    -

    See Perspective image game object.

    +

    See Perspective image game object, Mesh game object, game object

    +

    Create mask

    +
    var mask = image.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/perspective-sprite/index.html b/docs/site/perspective-sprite/index.html index 92dfd7204f..2144321483 100644 --- a/docs/site/perspective-sprite/index.html +++ b/docs/site/perspective-sprite/index.html @@ -1370,6 +1370,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9559,6 +9573,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9805,7 +9833,17 @@

    Restart// sprite.anims.restart(includeDelay, resetRepeats);

    Other properties

    -

    See Perspective image game object.

    +

    See Perspective image game object, Mesh game object, game object

    +

    Create mask

    +
    var mask = sprite.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/plane/index.html b/docs/site/plane/index.html index ffdfd792af..418b82d413 100644 --- a/docs/site/plane/index.html +++ b/docs/site/plane/index.html @@ -1286,6 +1286,27 @@ Checkerboard + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9531,6 +9552,27 @@ Checkerboard + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9773,6 +9815,18 @@

    Checkerboard
    plane.removeCheckerboard();
     
    +

    Other properties

    +

    See Mesh game object, game object

    +

    Create mask

    +
    var mask = plane.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/quad-image/index.html b/docs/site/quad-image/index.html index c352be95ee..1efc290e0c 100644 --- a/docs/site/quad-image/index.html +++ b/docs/site/quad-image/index.html @@ -1453,6 +1453,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9545,6 +9559,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9765,7 +9793,17 @@

    Tint colorOther properties

    -

    See Mesh game object.

    +

    See Mesh game object, game object

    +

    Create mask

    +
    var mask = image.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/quad-rendertexture/index.html b/docs/site/quad-rendertexture/index.html index 431cc8c2bc..26e6b2afc6 100644 --- a/docs/site/quad-rendertexture/index.html +++ b/docs/site/quad-rendertexture/index.html @@ -1481,6 +1481,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9573,6 +9587,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9781,7 +9809,17 @@

    Fill&par // image.rt.fill(rgb, alpha, x, y, width, height);

    Other properties

    -

    See Quad image game object.

    +

    See Quad image game object, Mesh game object, game object

    +

    Create mask

    +
    var mask = image.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/rendertexture/index.html b/docs/site/rendertexture/index.html index fa4344cb1a..d2475c97a4 100644 --- a/docs/site/rendertexture/index.html +++ b/docs/site/rendertexture/index.html @@ -2019,6 +2019,13 @@ Create mask + + +
  • + + Shader effects + +
  • @@ -9573,6 +9580,13 @@ Create mask + + +
  • + + Shader effects + +
  • @@ -9751,6 +9765,8 @@

    Create mask
    var mask = rt.createBitmapMask();
     

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    diff --git a/docs/site/search/search_index.json b/docs/site/search/search_index.json index ebba46ba41..46bda5a4f5 100644 --- a/docs/site/search/search_index.json +++ b/docs/site/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Home","text":""},{"location":"#phaser","title":"Phaser","text":"

    Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.

    "},{"location":"#links","title":"Links","text":""},{"location":"#phaser3","title":"Phaser3","text":""},{"location":"#rex-plugins","title":"Rex plugins","text":""},{"location":"achievements/","title":"CSV Achievements","text":""},{"location":"achievements/#introduction","title":"Introduction","text":"

    Achievements in a csv table.

    "},{"location":"achievements/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"achievements/#install-plugin","title":"Install plugin","text":""},{"location":"achievements/#load-minify-file","title":"Load minify file","text":""},{"location":"achievements/#import-plugin","title":"Import plugin","text":""},{"location":"achievements/#import-class","title":"Import class","text":""},{"location":"achievements/#create-instance","title":"Create instance","text":"
    var achievements = scene.plugins.get('rexAchievements').add();\n
    "},{"location":"achievements/#load-table-from-csv-string","title":"Load table from csv string","text":"
    achievements.loadCSV(csvString, {\n// delimiter: ','\n});\n

    For exameple, csv string

    A A Lv1 Ach1 >= 10 < 20 Lv1 Ach2 >= 20 < 50 Lv1 Ach3 >= 50
    ,A,A\nLv1,Ach1,>= 10,<= 20,\nLv1,Ach2,>= 20,< 50,\nLv1,Ach3,>= 50,,\n

    means that:

    Lv1, Ach1: (A>=10) && (A<20)\nLv1, Ach2: (A>=20) && (A<50)\nLv1, Ach3: (A>=50)\n
    "},{"location":"achievements/#test","title":"Test","text":"
    1. Run test
      var achievements.runTest(levelName, values);\n
    2. Get obtained states
      var states = achievements.getObtainedState(levelName);\n

    or

    var states = achievements.getTestResults(levelName, values);\n
    "},{"location":"achievements/#get-obtained-states","title":"Get obtained states","text":""},{"location":"achievements/#get-name","title":"Get name","text":""},{"location":"achievements/#save-load-obtained-states","title":"Save & load obtained states","text":""},{"location":"achievements/#set-obtained-state","title":"Set obtained state","text":""},{"location":"alphamaskimage/","title":"Alpha mask image","text":""},{"location":"alphamaskimage/#introduction","title":"Introduction","text":"

    Load a texture, then apply an alpha mask from another texture. Extended from canvas plugin.

    "},{"location":"alphamaskimage/#live-demos","title":"Live demos","text":""},{"location":"alphamaskimage/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"alphamaskimage/#install-plugin","title":"Install plugin","text":""},{"location":"alphamaskimage/#load-minify-file","title":"Load minify file","text":""},{"location":"alphamaskimage/#import-plugin","title":"Import plugin","text":""},{"location":"alphamaskimage/#import-class","title":"Import class","text":""},{"location":"alphamaskimage/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexAlphaMaskImagePlugin',\nplugin: AlphaMaskImagePlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"alphamaskimage/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexAlphaMaskImage(x, y, key, frame, {\nmask: {\nkey: textureKey,\n// frame: frameName,\n// invertAlpha: false,\n// scale: undefined,\n}\n\n// backgroundColor: undefined,\n});\n

    or

    var image = scene.add.rexAlphaMaskImage(x, y, key, {\nmask: {\nkey: textureKey,\n// frame: frameName,\n// invertAlpha: false,\n// scale: undefined,\n}\n\n// backgroundColor: undefined,\n});\n

    Add image from JSON

    var image = scene.make.rexAlphaMaskImage({\nx: 0,\ny: 0,\nkey: key,\nframe: name,\nmask: {\nkey: textureKey,\n// frame: frameName,\n// invertAlpha: false,\n// scale: undefined,\n}\n\n// backgroundColor: undefined,\n\nadd: true\n});\n
    "},{"location":"alphamaskimage/#custom-class","title":"Custom class","text":""},{"location":"alphamaskimage/#set-texture","title":"Set texture","text":"
    image.setTexture(key, frame);\n// image.setTexture(key, frame, mask);\n

    or

    image.setTexture(key, frame, {\nmask: {\nkey: textureKey,\n// frame: frameName,\n// invertAlpha: false,\n// scale: undefined,\n}\n\n// backgroundColor: undefined,\n});\n
    "},{"location":"anchor/","title":"Anchor","text":""},{"location":"anchor/#introduction","title":"Introduction","text":"

    Set size and position based on visible window.

    Note

    Visible window will be changed when scale mode is ENVELOP, WIDTH_CONTROLS_HEIGHT, or HEIGHT_CONTROLS_WIDTH.

    "},{"location":"anchor/#live-demos","title":"Live demos","text":""},{"location":"anchor/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"anchor/#install-plugin","title":"Install plugin","text":""},{"location":"anchor/#load-minify-file","title":"Load minify file","text":""},{"location":"anchor/#import-plugin","title":"Import plugin","text":""},{"location":"anchor/#import-class","title":"Import class","text":""},{"location":"anchor/#create-instance","title":"Create instance","text":"
    var anchor = scene.plugins.get('rexAnchor').add(gameObject, {\n// left: '0%+0',\n// right: '0%+0',\n// centerX: '0%+0',\n// x: '0%+0',\n\n// top: '0%+0',\n// bottom: '0%+0',\n// centerY: '0%+0',\n// y: '0%+0',\n\n// width: '100%+0',\n// height: '100%+0',\n// onResizeCallback: function(width, height, gameObject, anchor) {},\n// onResizeCallbackScope: undefined,\n\n// onUpdateViewportCallback: function(viewport, gameObject, anchor) {},\n// onUpdateViewportCallbackScope: undefined,\n\n// enable: true\n});\n

    For example, anchor game object's left bound to viewport's left+10, centerY to viewport's center

    {\nleft: 'left+10',\ncenterY: 'center'\n}\n
    "},{"location":"anchor/#reset-config","title":"Reset config","text":"
    anchor.resetFromJSON({\n// left: '0%+0',\n// right: '0%+0',\n// centerX: '0%+0',\n// x: '0%+0',\n\n// top: '0%+0',\n// bottom: '0%+0',\n// centerY: '0%+0',\n// y: '0%+0',\n\n// width: '100%+0',\n// height: '100%+0',    \n\n// onUpdateViewportCallback: function(viewport, gameObject, anchor) {}\n// onUpdateViewportCallbackScope: undefined,\n})\n
    "},{"location":"anchor/#set-onupdateviewport-callback","title":"Set OnUpdateViewport callback","text":"
    anchor.setUpdateViewportCallback(callback, scope);\n
    "},{"location":"anchor/#manual-anchor","title":"Manual anchor","text":"
    anchor.anchor();\n
    "},{"location":"anchor/#auto-anchor","title":"Auto anchor","text":""},{"location":"angle/","title":"Angle","text":""},{"location":"angle/#introduction","title":"Introduction","text":"

    Convert angle value, built-in methods of phaser.

    "},{"location":"angle/#usage","title":"Usage","text":""},{"location":"angle/#degree-radians","title":"Degree <-> Radians","text":""},{"location":"angle/#wrap","title":"Wrap","text":""},{"location":"angle/#angle-between-points","title":"Angle between points","text":""},{"location":"angle/#angle-between-angles","title":"Angle between angles","text":""},{"location":"angle/#rotate-around-position","title":"Rotate around position","text":""},{"location":"angle/#rotate-to-angle","title":"Rotate to angle","text":"
    var rad = Phaser.Math.Angle.RotateTo(currentAngle, targetAngle, lerp)\n
    "},{"location":"angle/#random-angle","title":"Random angle","text":""},{"location":"animation/","title":"Animation","text":""},{"location":"animation/#introduction","title":"Introduction","text":"

    Animation and animations manager.

    "},{"location":"animation/#usage","title":"Usage","text":""},{"location":"animation/#animation-manager","title":"Animation manager","text":""},{"location":"animation/#add-animation","title":"Add animation","text":"
    scene.anims.create({\nkey: '',\n\nframes: [],\n\nsortFrames: true,\ndefaultTextureKey: null,\nskipMissedFrames: true,\n\n\n// time\ndelay: 0,\nduration: null,\nframeRate: null,\n\n// repeat\nrepeat: 0,              // set to (-1) to repeat forever\nrepeatDelay: 0,\nyoyo: false,\n\n// visible\nshowBeforeDelay: false,\nshowOnStart: false,\nhideOnComplete: false\n});\n
    "},{"location":"animation/#add-from-aseprite","title":"Add from Aseprite","text":"

    Aseprite

    scene.anims.createFromAseprite(key);\n// scene.anims.createFromAseprite(key, tags, target);\n
    "},{"location":"animation/#remove-animation","title":"Remove animation","text":"
    scene.anims.remove(key);\n
    "},{"location":"animation/#delay-between-two-animations","title":"Delay between two animations","text":""},{"location":"animation/#play-animation","title":"Play animation","text":""},{"location":"animation/#pause-all-animations","title":"Pause all animations","text":"
    scene.anims.pauseAll();\n
    "},{"location":"animation/#resume-all-animations","title":"Resume all animations","text":"
    scene.anims.resumeAll();\n
    "},{"location":"animation/#has-animation","title":"Has animation","text":"
    var hasAnim = scene.anims.exists(key);\n
    "},{"location":"animation/#exportload","title":"Export/load","text":""},{"location":"animation/#events","title":"Events","text":""},{"location":"animation/#animation-object","title":"Animation object","text":"
    var anim = scene.anims.get(key);\n
    "},{"location":"animation/#add-frame","title":"Add frame","text":""},{"location":"animation/#remove-frame","title":"Remove frame","text":""},{"location":"animation/#get-frame","title":"Get frame","text":""},{"location":"animation/#export","title":"Export","text":""},{"location":"arcade-body/","title":"Body","text":""},{"location":"arcade-body/#introduction","title":"Introduction","text":"

    Arcade physics body.

    "},{"location":"arcade-body/#usage","title":"Usage","text":""},{"location":"arcade-body/#get-physics-body","title":"Get physics body","text":"
    1. Enable physics world
    2. Add existing game object(s) to physics world
    3. Get physics body
      var body = gameObject.body;\n
    "},{"location":"arcade-body/#enable","title":"Enable","text":"

    Whether this Body is updated by the physics simulation.

    "},{"location":"arcade-body/#immovable","title":"Immovable","text":"

    Whether this Body can be moved by collisions with another Body.

    "},{"location":"arcade-body/#pushable","title":"Pushable","text":"

    Sets if this Body can be pushed by another Body.

    "},{"location":"arcade-body/#moveable","title":"Moveable","text":"

    Whether the Body's position and rotation are affected by its velocity, acceleration, drag, and gravity.

    Use case

    Set body.moves to false when game object is controlled by tween or dragging.

    "},{"location":"arcade-body/#destroy","title":"Destroy","text":"

    Physics body will be destroyed automatically when game object is destroyed.

    "},{"location":"arcade-body/#movement","title":"Movement","text":""},{"location":"arcade-body/#velocity","title":"Velocity","text":""},{"location":"arcade-body/#max-speed","title":"Max speed","text":""},{"location":"arcade-body/#max-velocity","title":"Max velocity","text":""},{"location":"arcade-body/#acceleration","title":"Acceleration","text":""},{"location":"arcade-body/#gravity","title":"Gravity","text":""},{"location":"arcade-body/#drag","title":"Drag","text":"

    Reduces speed per second.

    "},{"location":"arcade-body/#reset-position","title":"Reset position","text":"
    body.reset(x, y);\n
    "},{"location":"arcade-body/#stop","title":"Stop","text":"

    Sets acceleration, velocity, and speed to zero.

    body.stop();\n
    "},{"location":"arcade-body/#friction","title":"Friction","text":"

    If this Body is immovable and in motion, this the proportion of this Body's movement received by the riding body on each axis.

    "},{"location":"arcade-body/#speed","title":"Speed","text":""},{"location":"arcade-body/#rotation","title":"Rotation","text":""},{"location":"arcade-body/#allow-rotation","title":"Allow rotation","text":"

    Whether this Body's rotation is affected by its angular acceleration and velocity.

    "},{"location":"arcade-body/#angular-velocity","title":"Angular velocity","text":""},{"location":"arcade-body/#angular-acceleration","title":"Angular acceleration","text":""},{"location":"arcade-body/#angular-drag","title":"Angular drag","text":"

    Reduces angular speed per second.

    "},{"location":"arcade-body/#collision","title":"Collision","text":""},{"location":"arcade-body/#collision-bound","title":"Collision bound","text":""},{"location":"arcade-body/#offset","title":"Offset","text":"
    body.setOffset(x, y);\n
    "},{"location":"arcade-body/#push-out","title":"Push out","text":"
    scene.physics.add.collider(objectsA, objectsB);\n
    "},{"location":"arcade-body/#callbacks","title":"Callbacks","text":"

    Add collider

    "},{"location":"arcade-body/#point-inside","title":"Point inside","text":"
    var hit = body.hitTest(x, y);\n
    "},{"location":"arcade-body/#is-colliding","title":"Is colliding","text":""},{"location":"arcade-body/#bounce","title":"Bounce","text":""},{"location":"arcade-body/#world-bounds","title":"World bounds","text":""},{"location":"arcade-body/#blocked","title":"Blocked","text":"

    Whether this Body is colliding with a tile or the world boundary.

    "},{"location":"arcade-body/#mass","title":"Mass","text":""},{"location":"arcade-body/#static-body","title":"Static body","text":""},{"location":"arcade-body/#sync","title":"Sync","text":"

    Syncs the Bodies position and size with its parent Game Object.

    body.updateFromGameObject();\n
    "},{"location":"arcade-body/#debug","title":"Debug","text":""},{"location":"arcade-gameobject/","title":"Game object","text":""},{"location":"arcade-gameobject/#introduction","title":"Introduction","text":"

    Arcade physics Image/Sprite/Group object.

    "},{"location":"arcade-gameobject/#usage","title":"Usage","text":""},{"location":"arcade-gameobject/#add-physics-object","title":"Add physics object","text":"

    Enable physics world

    "},{"location":"arcade-gameobject/#image-object","title":"Image object","text":""},{"location":"arcade-gameobject/#sprite-object","title":"Sprite object","text":""},{"location":"arcade-gameobject/#group","title":"Group","text":""},{"location":"arcade-gameobject/#enable","title":"Enable","text":""},{"location":"arcade-gameobject/#movement","title":"Movement","text":""},{"location":"arcade-gameobject/#velocity","title":"Velocity","text":""},{"location":"arcade-gameobject/#max-velocity","title":"Max velocity","text":""},{"location":"arcade-gameobject/#acceleration","title":"Acceleration","text":""},{"location":"arcade-gameobject/#gravity","title":"Gravity","text":""},{"location":"arcade-gameobject/#drag","title":"Drag","text":""},{"location":"arcade-gameobject/#immovable","title":"Immovable","text":""},{"location":"arcade-gameobject/#pushable","title":"Pushable","text":""},{"location":"arcade-gameobject/#friction","title":"Friction","text":"

    If this Body is immovable and in motion, this the proportion of this Body's movement received by the riding body on each axis.

    "},{"location":"arcade-gameobject/#rotation","title":"Rotation","text":""},{"location":"arcade-gameobject/#allow-rotation","title":"Allow rotation","text":"

    Whether this Body's rotation is affected by its angular acceleration and velocity.

    "},{"location":"arcade-gameobject/#angular-velocity","title":"Angular velocity","text":""},{"location":"arcade-gameobject/#angular-acceleration","title":"Angular acceleration","text":"

    -Set

    gameObject.setAngularAcceleration(v);\n
    - Get
    var aa = gameObject.body.angularAcceleration;\n

    "},{"location":"arcade-gameobject/#angular-drag","title":"Angular drag","text":""},{"location":"arcade-gameobject/#collision","title":"Collision","text":""},{"location":"arcade-gameobject/#collision-bound","title":"Collision bound","text":""},{"location":"arcade-gameobject/#offset","title":"Offset","text":"
    gameObject.setOffset(x, y);\n
    "},{"location":"arcade-gameobject/#push-out","title":"Push out","text":"
    scene.physics.add.collider(objectsA, objectsB);\n
    "},{"location":"arcade-gameobject/#callbacks","title":"Callbacks","text":"

    Add collider

    "},{"location":"arcade-gameobject/#point-inside","title":"Point inside","text":"
    var hit = gameObject.hitTest(x, y);\n
    "},{"location":"arcade-gameobject/#bounce","title":"Bounce","text":""},{"location":"arcade-gameobject/#mass","title":"Mass","text":""},{"location":"arcade-gameobject/#static-game-object","title":"Static game object","text":""},{"location":"arcade-gameobject/#sync","title":"Sync","text":"

    Syncs the Bodies position and size in static game object.

    gameObject.refreshBody();\n
    "},{"location":"arcade-gameobject/#methods-of-group","title":"Methods of group","text":"
    group.setVelocity(x, y, step);\n
    group.setVelocityX(value, step);\n
    group.setVelocityY(value, step);\n
    group.refresh();  // call this method when position of game objects were changed in static object group\n
    "},{"location":"arcade-gameobject/#debug","title":"Debug","text":"
    gameObject.setDebug(showBody, showVelocity, bodyColor);\n
    gameObject.setDebugBodyColor(bodyColor);\n
    "},{"location":"arcade-tcrp-player/","title":"Player","text":""},{"location":"arcade-tcrp-player/#introduction","title":"Introduction","text":"

    Player of T ime-C ommand-R ecorder-P layer with Arcade physics engine, to run commands on time.

    Arcade physics engine is fixed-step based, not tick time based.

    This Arcade-TCRP has better result of replaying, which store step count via WORLD_STEP(worldstep) event.

    "},{"location":"arcade-tcrp-player/#live-demos","title":"Live demos","text":""},{"location":"arcade-tcrp-player/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"arcade-tcrp-player/#install-plugin","title":"Install plugin","text":""},{"location":"arcade-tcrp-player/#load-minify-file","title":"Load minify file","text":""},{"location":"arcade-tcrp-player/#import-plugin","title":"Import plugin","text":""},{"location":"arcade-tcrp-player/#import-class","title":"Import class","text":""},{"location":"arcade-tcrp-player/#create-instance","title":"Create instance","text":"
    var player = scene.plugins.get('rexTCRP').addPlayer(scene, {\n// commands: [],       // [[time, command], [time, command], ...]\n// timeScale: 1,\n// scope: undefined\n});\n
    "},{"location":"arcade-tcrp-player/#load-commands","title":"Load commands","text":"
    player.load(commands, scope);\n
    "},{"location":"arcade-tcrp-player/#start-playing","title":"Start playing","text":"
    player.start();\n// player.start(startAt);  // Start-at time in step-count\n
    "},{"location":"arcade-tcrp-player/#events","title":"Events","text":""},{"location":"arcade-tcrp-player/#pause-resume-stop-playing","title":"Pause, Resume, stop playing","text":"
    player.pause();\nplayer.resume();\nplayer.stop();\n
    "},{"location":"arcade-tcrp-player/#seek-elapsed-time","title":"Seek elapsed time","text":"
    player.seek(time);   // Elapsed time in step-count\n
    "},{"location":"arcade-tcrp-player/#state-of-player","title":"State of player","text":"
    var isPlaying = player.isPlaying;\nvar completed = player.completed;\nvar now = player.now;\n
    "},{"location":"arcade-tcrp-player/#time-scale","title":"Time-scale","text":""},{"location":"arcade-tcrp-recorder/","title":"Recoder","text":""},{"location":"arcade-tcrp-recorder/#introduction","title":"Introduction","text":"

    Recorder of T ime-C ommand-R ecorder-P layer with Arcade physics engine, to store commands with time.

    Arcade physics engine is fixed-step based, not tick time based.

    This Arcade-TCRP has better result of replaying, which store step count via WORLD_STEP(worldstep) event.

    "},{"location":"arcade-tcrp-recorder/#live-demos","title":"Live demos","text":""},{"location":"arcade-tcrp-recorder/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"arcade-tcrp-recorder/#install-plugin","title":"Install plugin","text":""},{"location":"arcade-tcrp-recorder/#load-minify-file","title":"Load minify file","text":""},{"location":"arcade-tcrp-recorder/#import-plugin","title":"Import plugin","text":""},{"location":"arcade-tcrp-recorder/#import-class","title":"Import class","text":""},{"location":"arcade-tcrp-recorder/#create-instance","title":"Create instance","text":"
    var recorder = scene.plugins.get('rexTCRP').addRecorder(scene);\n
    "},{"location":"arcade-tcrp-recorder/#start-recording","title":"Start recording","text":"
    recorder.start();\n// recorder.start(startAt);  // start-at in step-count\n
    "},{"location":"arcade-tcrp-recorder/#push-commands","title":"Push commands","text":"
    recorder.addCommand([fnName, param0, param1, ...]);\n// recorder.addCommand([command0, command1, ...]);\n// recorder.addCommand([fnName, param0, param1, ...], offset);  // time-offset in step-count\n

    See also Run commands

    "},{"location":"arcade-tcrp-recorder/#get-commands","title":"Get commands","text":"
    var commands = recorder.getCommands();        // Get a shallow copy of commands\n// var commands = recorder.getCommands(true); // Get reference of commands\n

    Format of return commands:

    [\n[time, [command]],\n[time, [command0,command1]],\n...\n]\n
    "},{"location":"arcade-tcrp-recorder/#pause-resume-stop-recording","title":"Pause, Resume, stop recording","text":"
    recorder.pause();\nrecorder.resume();\nrecorder.stop();\n
    "},{"location":"arcade-tcrp-recorder/#seek-elapsed-time","title":"Seek elapsed time","text":"
    recorder.seek(time);   // elapsed time in step-count\n
    "},{"location":"arcade-tcrp-recorder/#state-of-recorder","title":"State of recorder","text":"
    var isRecording = recorder.isRecording;\nvar now = recorder.now;\n
    "},{"location":"arcade-tcrp-recorder/#time-scale","title":"Time-scale","text":""},{"location":"arcade-tcrp-step-runner/","title":"Step runner","text":""},{"location":"arcade-tcrp-step-runner/#introduction","title":"Introduction","text":"

    Execute command in next WORLD_STEP(worldstep) event, to synchronize command execution with step-counter of Recorder of Arcade-TCRP.

    Command might be executed before or after WORLD_STEP(worldstep) event, which is emitted in scene's update event.

    "},{"location":"arcade-tcrp-step-runner/#live-demos","title":"Live demos","text":""},{"location":"arcade-tcrp-step-runner/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"arcade-tcrp-step-runner/#install-plugin","title":"Install plugin","text":""},{"location":"arcade-tcrp-step-runner/#load-minify-file","title":"Load minify file","text":""},{"location":"arcade-tcrp-step-runner/#import-plugin","title":"Import plugin","text":""},{"location":"arcade-tcrp-step-runner/#import-class","title":"Import class","text":""},{"location":"arcade-tcrp-step-runner/#create-instance","title":"Create instance","text":"
    var stepRunner = scene.plugins.get('rexTCRP').addStepRunner(scene);\n
    "},{"location":"arcade-tcrp-step-runner/#push-commands","title":"Push commands","text":"
    stepRunner.add(commands, scope);\n

    See also Run commands

    "},{"location":"arcade-tcrp-step-runner/#offset-recorder","title":"Offset recorder","text":"

    Since commands will be executed in next WORLD_STEP(worldstep) event, recorder have to add 1 step-count offset.

    "},{"location":"arcade-world/","title":"World","text":""},{"location":"arcade-world/#introduction","title":"Introduction","text":"

    World of Arcade physics engine in phaser.

    "},{"location":"arcade-world/#usage","title":"Usage","text":""},{"location":"arcade-world/#configuration","title":"Configuration","text":"
    var config = {\n// ...\nphysics: {\ndefault: 'arcade',\narcade: {\n//    x: 0,\n//    y: 0,\n//    width: scene.sys.scale.width,\n//    height: scene.sys.scale.height,\n//    gravity: {\n//        x: 0,\n//        y: 0\n//    },\n//    checkCollision: {\n//        up: true,\n//        down: true,\n//        left: true,\n//        right: true\n//    },\n//    customUpdate: false,\n//    fixedStep: true,\n//    fps: 60,\n//    timeScale: 1,     // 2.0 = half speed, 0.5 = double speed\n//    customUpdate: false,\n//    overlapBias: 4,\n//    tileBias: 16,\n//    forceX: false,\n//    isPaused: false,\n//    debug: false,\n//    debugShowBody: true,\n//    debugShowStaticBody: true,\n//    debugShowVelocity: true,\n//    debugBodyColor: 0xff00ff,\n//    debugStaticBodyColor: 0x0000ff,\n//    debugVelocityColor: 0x00ff00,\n//    maxEntries: 16,\n//    useTree: true   // set false if amount of dynamic bodies > 5000\n}\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"arcade-world/#update","title":"Update","text":""},{"location":"arcade-world/#step","title":"Step","text":"

    Advances the simulation by one step.

    scene.physics.world.step(delta);\n
    "},{"location":"arcade-world/#events","title":"Events","text":""},{"location":"arcade-world/#control","title":"Control","text":""},{"location":"arcade-world/#pause","title":"Pause","text":"
    scene.physics.pause();\n
    "},{"location":"arcade-world/#resume","title":"Resume","text":"
    scene.physics.resume();\n
    "},{"location":"arcade-world/#events_1","title":"Events","text":""},{"location":"arcade-world/#duration-per-frame","title":"Duration per frame","text":""},{"location":"arcade-world/#tile-filter-options","title":"Tile filter options","text":"
    var option = scene.physics.world.tileFilterOptions;\n
    "},{"location":"arcade-world/#body","title":"Body","text":""},{"location":"arcade-world/#enable","title":"Enable","text":"
    scene.physics.world.enable(gameObject);\n// scene.physics.world.enable(gameObject, bodyType);\n

    Or

    scene.physics.add.existing(gameObject, bodyType);\n

    See arcade-body

    "},{"location":"arcade-world/#disable","title":"Disable","text":"
    scene.physics.world.disable(gameObject);\n
    "},{"location":"arcade-world/#addremove-body","title":"Add/remove body","text":""},{"location":"arcade-world/#collision","title":"Collision","text":""},{"location":"arcade-world/#set-bound","title":"Set bound","text":"

    See bound in body object, or game object.

    "},{"location":"arcade-world/#collider-callback","title":"Collider & callback","text":""},{"location":"arcade-world/#testing-wo-collider","title":"Testing wo collider","text":""},{"location":"arcade-world/#events_2","title":"Events","text":""},{"location":"arcade-world/#world-bounds","title":"World bounds","text":""},{"location":"arcade-world/#enable_1","title":"Enable","text":""},{"location":"arcade-world/#bodies-inside-an-area","title":"Bodies inside an area","text":""},{"location":"arcade-world/#events_3","title":"Events","text":""},{"location":"arcade-world/#wrap","title":"Wrap","text":"
    scene.physics.world.wrap(gameObject, padding);\n
    "},{"location":"arcade-world/#move-to","title":"Move to","text":""},{"location":"arcade-world/#accelerate-to","title":"Accelerate to","text":""},{"location":"arcade-world/#gravity","title":"Gravity","text":"

    Total Gravity = world.gravity + body.gravity

    "},{"location":"arcade-world/#bodies","title":"Bodies","text":""},{"location":"arcade-world/#closestfurthest","title":"Closest/furthest","text":""},{"location":"arcade-world/#debug","title":"Debug","text":""},{"location":"arcade-world/#draw-body-velocity","title":"Draw body & velocity","text":""},{"location":"arcade-world/#graphics","title":"Graphics","text":"

    Draw debug body & velocity on a Graphics object.

    var graphics = scene.physics.world.debugGraphic;\n
    "},{"location":"arcade-world/#update-loop","title":"Update loop","text":"
    1. scene.sys.events: update
      1. Update position & angle of each body
      2. Process each collider
      3. Update final position of each body
      4. Emit worldstep event
    2. scene.sys.events: postupdate
      1. Draw debug graphics
    graph TB\n\nSceneEventUpdate>\"scene.sys.events: update<br><br>Update arcade world<br>gameObject.preUpdate()\"]\nSceneUpdate[\"scene.update()\"]\nSceneEventPostUpdate>\"scene.sys.events: postupdate<br><br>Post update arcade world\"]\nRender\n\nSceneEventUpdate --> SceneUpdate\nSceneUpdate --> SceneEventPostUpdate\nSceneEventPostUpdate --> Render
    "},{"location":"array-addremove/","title":"Add/remove","text":""},{"location":"array-addremove/#introduction","title":"Introduction","text":"

    Add/insert/remove item(s) of an array, built-in methods of phaser.

    "},{"location":"array-addremove/#usage","title":"Usage","text":""},{"location":"array-addremove/#add-item","title":"Add item","text":"
    Phaser.Utils.Array.Add(arr, item);\n// Phaser.Utils.Array.Add(arr, item, limit, callback, context);\n
    "},{"location":"array-addremove/#insert-item-at","title":"Insert item at","text":"
    Phaser.Utils.Array.AddAt(arr, item, index);\n// Phaser.Utils.Array.AddAt(arr, item, index, limit, callback, context);\n
    "},{"location":"array-addremove/#remove-item","title":"Remove item","text":"
    Phaser.Utils.Array.Remove(arr, item);\n// Phaser.Utils.Array.Remove(arr, item, callback, context);\n
    "},{"location":"array-addremove/#remove-item-at","title":"Remove item at","text":"
    var removed = Phaser.Utils.Array.RemoveAt(arr, index);\n// var removed = Phaser.Utils.Array.RemoveAt(arr, index, callback, context);\n
    "},{"location":"array-addremove/#remove-items-between","title":"Remove items between","text":"
    var removed = Phaser.Utils.Array.RemoveBetween(arr, startIndex, endIndex);\n// var removed = Phaser.Utils.Array.RemoveBetween(arr, startIndex, endIndex, callback, context);\n
    "},{"location":"array-addremove/#remove-random-item","title":"Remove random item","text":"
    var item = Phaser.Utils.Array.RemoveRandomElement(arr);\n
    "},{"location":"array-addremove/#replace-item","title":"Replace item","text":"

    Replaces an element of the array with the new element. The new element cannot already be a member of the array.

    Phaser.Utils.Array.Replace(arr, oldItem, newItem);\n
    "},{"location":"array-filter/","title":"Filter/Map","text":""},{"location":"array-filter/#introduction","title":"Introduction","text":"

    Built-in javascript object.

    "},{"location":"array-filter/#usage","title":"Usage","text":""},{"location":"array-filter/#run-function-for-each-element","title":"Run function for each element","text":"
    arr.forEach(function(element, index, arr) {\n//\n}, scope);\n
    "},{"location":"array-filter/#filter-elements","title":"Filter elements","text":"

    Creates a new array with all elements that pass the test function.

    var result = arr.filter(function(element, index, arr) {\nreturn true; // false\n}, scope);\n
    "},{"location":"array-filter/#find-one-element","title":"Find one element","text":"
    var element = arr.find(function(element, index, arr) {\nreturn true; // false\n}, scope);\n
    "},{"location":"array-filter/#map-elements-to-a-new-array","title":"Map elements to a new array","text":"
    var newArray = arr.map(function(element, index, arr) {\nreturn newElement;\n}, scope);\n
    "},{"location":"array-random/","title":"Random","text":""},{"location":"array-random/#introduction","title":"Introduction","text":"

    Random operation of an array, built-in methods of phaser.

    "},{"location":"array-random/#usage","title":"Usage","text":""},{"location":"array-random/#get-random-item","title":"Get random item","text":"
    var item = Phaser.Utils.Array.GetRandom(arr);\n// var item = Phaser.Utils.Array.GetRandom(arr, startIndex, length);\n
    "},{"location":"array-random/#remove-random-item","title":"Remove random item","text":"
    var item = Phaser.Utils.Array.RemoveRandomElement(arr);\n// var item = Phaser.Utils.Array.RemoveRandomElement(arr, startIndex, length);\n
    "},{"location":"array-random/#shuffle","title":"Shuffle","text":"
    var arr = Phaser.Utils.Array.Shuffle(arr);\n
    "},{"location":"array-sort/","title":"Sort","text":""},{"location":"array-sort/#introduction","title":"Introduction","text":"

    Array sorting, built-in methods of phaser.

    "},{"location":"array-sort/#usage","title":"Usage","text":""},{"location":"array-sort/#built-in-array-sort","title":"Built-in array sort","text":"
    var out = arr.sort(compareFunction);\n
    "},{"location":"array-sort/#stable-array-sort","title":"Stable array sort","text":"
    var out = Phaser.Utils.Array.StableSort(arr, compareFunction);\n
    "},{"location":"array-sort/#shuffle","title":"Shuffle","text":"
    var arr = Phaser.Utils.Array.Shuffle(arr);\n
    "},{"location":"array-sort/#move-item","title":"Move item","text":""},{"location":"audio/","title":"Audio","text":""},{"location":"audio/#introduction","title":"Introduction","text":"

    Play sounds, built-in object of phaser.

    "},{"location":"audio/#usage","title":"Usage","text":""},{"location":"audio/#configuration","title":"Configuration","text":""},{"location":"audio/#web-audio","title":"Web audio","text":"

    Web audio is the default audio context.

    "},{"location":"audio/#html5-audio","title":"Html5 audio","text":"
    var config = {\n// ....\naudio: {\ndisableWebAudio: true\n}\n// ....\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"audio/#no-audio","title":"No audio","text":"
    var config = {\n// ....\naudio: {\nnoAudio: true\n}\n// ....\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"audio/#load-audio-file","title":"Load audio file","text":"
    scene.load.audio(key, urls);  // urls: an array of file url\n// scene.load.audio(key, urls, {instances: 1}, xhrSettings);\n

    See loader

    "},{"location":"audio/#decode-audio","title":"Decode audio","text":"
    scene.sound.decodeAudio(key, audioData);\n

    Or

    scene.sound.decodeAudio(audioFiles);\n
    "},{"location":"audio/#decoded-events","title":"Decoded events","text":""},{"location":"audio/#unlock-audio","title":"Unlock audio","text":"

    Unlocks Web Audio API/HTML5 Audio loading on the initial input event.

    scene.sound.unlock();\n
    "},{"location":"audio/#play-sound","title":"Play sound","text":"

    Sound instance will be destroyed when playback ends.

    scene.sound.play(key);\n

    or

    scene.sound.play(key, config);\n/*\nvar sound = scene.sound.add(key);\nsound.play(config);\n*/\n
    "},{"location":"audio/#position-of-the-spatial-audio-listener","title":"Position of the Spatial Audio listener","text":"
    scene.sound.setListenerPosition(x, y)\n

    Note

    Web audio only

    "},{"location":"audio/#sound-instance","title":"Sound instance","text":""},{"location":"audio/#create-sound-instance","title":"Create sound instance","text":"
    var music = scene.sound.add(key);\n
    var music = scene.sound.add(key, config);\n
    "},{"location":"audio/#configuration_1","title":"Configuration","text":"
    {\nmute: false,\nvolume: 1,\nrate: 1,\ndetune: 0,\nseek: 0,\nloop: false,\ndelay: 0,\n\n// source of the spatial sound\nsource: {\nx: 0,\ny: 0,\nz: 0,\npanningModel: 'equalpower',\ndistanceModel: 'inverse',\norientationX: 0,\norientationY: 0,\norientationZ: -1,\nrefDistance: 1,\nmaxDistance: 10000,\nrolloffFactor: 1,\nconeInnerAngle: 360,\nconeOuterAngle: 0,\nconeOuterGain: 0,\nfollow: undefined\n}\n}\n
    "},{"location":"audio/#play-sound-instance","title":"Play sound instance","text":""},{"location":"audio/#methods","title":"Methods","text":""},{"location":"audio/#mute","title":"Mute","text":""},{"location":"audio/#volume","title":"Volume","text":""},{"location":"audio/#detune","title":"Detune","text":""},{"location":"audio/#play-rate","title":"Play-rate","text":""},{"location":"audio/#seek-to","title":"Seek to","text":""},{"location":"audio/#loop","title":"Loop","text":""},{"location":"audio/#properties","title":"Properties","text":""},{"location":"audio/#events","title":"Events","text":""},{"location":"audio/#play-marked-sound","title":"Play marked sound","text":"

    Sound instance will be destroyed when playback ends.

    scene.sound.play(key, marker);\n
    "},{"location":"audio/#marker","title":"Marker","text":"
    {\nname: '',\nstart: 0,\nduration: music.duration,\nconfig: {\nmute: false,\nvolume: 1,\nrate: 1,\ndetune: 0,\nseek: 0,\nloop: false,\ndelay: 0\n}\n}\n
    "},{"location":"audio/#markers-in-sound-instance","title":"Markers in sound instance","text":""},{"location":"audio/#add-marker","title":"Add marker","text":"
    music.addMarker(marker);\n

    Marker

    "},{"location":"audio/#play-marked-sound_1","title":"Play marked sound","text":"
    music.play(markerName);\n
    music.play(markerName, config);\n

    config

    "},{"location":"audio/#audio-sprite","title":"Audio sprite","text":""},{"location":"audio/#load-audio-sprite","title":"Load audio sprite","text":"
    scene.load.audioSprite(key, urls, markersConfig, config);\n

    See loader

    Format of markersConfig

    {\nresources: urls, // an array of audio files\nspritemap: {\nmarkerName0: {\nstart: 0,\nend: 0\n},\nmarkerName1: {\nstart: 0,\nend: 0\n}\n// ...\n}\n}\n

    "},{"location":"audio/#play-sound_1","title":"Play sound","text":"

    Create a sound instance then play the marked section, this sound instance will be destroyed when playback ends.

    scene.sound.playAudioSprite(key, markerName, config);\n

    config

    "},{"location":"audio/#sound-instance_1","title":"Sound instance","text":"

    Create a sound instance with markers.

    var music = scene.sound.addAudioSprite(key, config);\n

    config

    "},{"location":"audio/#play-sound-instance_1","title":"Play sound instance","text":"
    music.play(markerName);\n
    music.play(markerName, config);\n

    config

    "},{"location":"audio/#sound-manager","title":"Sound manager","text":""},{"location":"audio/#mute_1","title":"Mute","text":""},{"location":"audio/#volume_1","title":"Volume","text":""},{"location":"audio/#detune_1","title":"Detune","text":""},{"location":"audio/#play-rate_1","title":"Play-rate","text":""},{"location":"audio/#get-music-instance","title":"Get music instance","text":""},{"location":"audio/#remove-music-instance","title":"Remove music instance","text":""},{"location":"audio/#stop-music-instance","title":"Stop music instance","text":""},{"location":"audio/#analyser","title":"Analyser","text":"

    Analyser node is only available in Web audio mode.

    1. Create analyser node
      var analyser = scene.sound.context.createAnalyser();\n
    2. Configure analyser node
      analyser.smoothingTimeConstant = 1;\nanalyser.fftSize = 8192;\nanalyser.minDecibels = -90;\nanalyser.maxDecibels = -10;\n
    3. Set source of analyser node
    4. Ouput analyser node to audio context
      analyser.connect(scene.sound.context.destination);\n
    5. Create output data array
      var dataArrayLength = analyser.frequencyBinCount;\nvar dataArray = new Uint8Array(dataArrayLength);\n
    6. Get output data
      analyser.getByteTimeDomainData(dataArray);\n
    "},{"location":"awaitloader/","title":"Await loader","text":""},{"location":"awaitloader/#introduction","title":"Introduction","text":"

    Await custom task in preload stage.

    "},{"location":"awaitloader/#live-demos","title":"Live demos","text":""},{"location":"awaitloader/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"awaitloader/#install-plugin","title":"Install plugin","text":""},{"location":"awaitloader/#load-minify-file","title":"Load minify file","text":""},{"location":"awaitloader/#import-plugin","title":"Import plugin","text":""},{"location":"awaitloader/#import-class","title":"Import class","text":""},{"location":"awaitloader/#start-loading-task","title":"Start loading task","text":"

    In preload stage:

    scene.load.rexAwait(function(successCallback, failureCallback) {\n// successCallback();\n}, scope);\n

    or

    var callback = function(successCallback, failureCallback) {\n// successCallback();\n};\nscene.load.rexAwait(key, {\ncallback: callback,\n// scope: scope\n});\n
    1. This plugin runs callback to start custom task.
    2. Calls successCallback when custom task completed, or failureCallback if error.
    "},{"location":"awaytime/","title":"Away time","text":""},{"location":"awaytime/#introduction","title":"Introduction","text":"

    Get time from previous closing application to now.

    "},{"location":"awaytime/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"awaytime/#install-plugin","title":"Install plugin","text":""},{"location":"awaytime/#load-minify-file","title":"Load minify file","text":""},{"location":"awaytime/#import-plugin","title":"Import plugin","text":""},{"location":"awaytime/#import-class","title":"Import class","text":""},{"location":"awaytime/#default-away-timer","title":"Default away-timer","text":""},{"location":"awaytime/#get-away-time","title":"Get away-time","text":"
    var awayTime = scene.plugins.get('rexAwayTime').awayTime;\n// var awayTime = scene.plugins.get('rexAwayTime').setKey(key).setPeriod(time).awayTime;\n

    Note

    This action also starts saving current time-stamp periodically into localstorage.

    "},{"location":"awaytime/#set-key","title":"Set key","text":"
    scene.plugins.get('rexAwayTime').setKey(key);\n
    "},{"location":"awaytime/#set-period","title":"Set period","text":"
    scene.plugins.get('rexAwayTime').setPeriod(time);\n
    "},{"location":"awaytime/#add-away-timer-object","title":"Add away timer object","text":"
    var awayTimer = scene.plugins.get('rexAwayTime').add({\nkey: 'away',\nperiod: 1000\n})\n
    "},{"location":"awaytime/#get-away-time_1","title":"Get away-time","text":"
    var awayTime = awayTimer.awayTime;\n

    Will also start timer.

    "},{"location":"awaytime/#stop-timer","title":"Stop timer","text":"
    awayTimer.stop();\n
    "},{"location":"base64/","title":"Base64","text":""},{"location":"base64/#introduction","title":"Introduction","text":"

    Decode a base64 string to an array buffer, or create a base64 string from an array buffer, built-in method of phaser.

    "},{"location":"base64/#usage","title":"Usage","text":""},{"location":"base64/#base64-array-buffer","title":"Base64 -> Array buffer","text":"
    var arrayBuffer = Phaser.Utils.Base64.Base64ToArrayBuffer(base64);\n
    "},{"location":"base64/#array-buffer-base64","title":"Array buffer -> Base64","text":"
    var base64 = Phaser.Utils.Base64.ArrayBufferToBase64(arrayBuffer, mediaType);\n
    "},{"location":"bbcodetext/","title":"BBCode Text","text":""},{"location":"bbcodetext/#introduction","title":"Introduction","text":"

    Drawing text with BBCode protocol.

    "},{"location":"bbcodetext/#live-demos","title":"Live demos","text":""},{"location":"bbcodetext/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"bbcodetext/#install-plugin","title":"Install plugin","text":""},{"location":"bbcodetext/#load-minify-file","title":"Load minify file","text":""},{"location":"bbcodetext/#import-plugin","title":"Import plugin","text":""},{"location":"bbcodetext/#import-class","title":"Import class","text":""},{"location":"bbcodetext/#bbcode","title":"BBCode","text":"

    Note

    Can set delimiter [] to another custom value in style of constructor.

    "},{"location":"bbcodetext/#add-text-object","title":"Add text object","text":"
    var txt = scene.add.rexBBCodeText(x, y, '[b]h[/b]ello');\n// var txt = scene.add.rexBBCodeText(x, y, '[b]h[/b]ello', { fontFamily: 'Arial', fontSize: 64, color: '#00ff00' });\n

    Default style

    {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,  // null, css string, or number\nbackgroundColor2: null,  // null, css string, or number\nbackgroundHorizontalGradient: true,\nbackgroundStrokeColor: null,  // null, css string, or number\nbackgroundStrokeLineWidth: 2,\n\nbackgroundCornerRadius: 0,  // 0   : no round corner, \n// > 0 : convex round corner\n// < 0 : concave round corner\n\nbackgroundCornerIteration: null,    color: '#fff',  // null, css string, or number\nstroke: '#fff',  // null, css string, or number\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',  // css string, or number\nblur: 0,\nstroke: false,\nfill: false\n},\nunderline: {\ncolor: '#000',  // css string, or number\nthickness: 0,\noffset: 0\n},\nstrikethrough: {\ncolor: '#000',  // css string, or number\nthickness: 0,\noffset: 0\n},\n// align: 'left',  // Equal to halign\nhalign: 'left', // 'left'|'center'|'right'\nvalign: 'top',  // 'top'|'center'|'bottom'\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\nmaxLines: 0,\nlineSpacing: 0,\nfixedWidth: 0,\nfixedHeight: 0,\ntestString: '|M\u00c9qgy',\nwrap: {\nmode: 'none'     // 0|'none'|1|'word'|2|'char'|'character'\nwidth: null\n},\n// rtl: false,\nmetrics: false,\n// metrics: {\n//     ascent: 0,\n//     descent: 0,\n//     fontSize: 0\n// },\n\n// images: {\n//     imgKey: {y: -8}\n// },\n\n// delimiters: '[]',\n\n// sharedPool: true,\n\n// urlTagCursorStyle: 'pointer',\n// interactive: false\n}\n

    or

    var txt = scene.add.rexBBCodeText({\nx: 0,\ny: 0,\ntext: '',\nstyle: {\nfontSize: '64px',\nfontFamily: 'Arial',\ncolor: '#ffffff',\nalign: 'center',\nbackgroundColor: '#ff00ff',\n// ...\n},\n})\n

    or

    var txt = scene.make.rexBBCodeText({\nx: 0,\ny: 0,\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0\n//x: 32,    // 32px padding on the left/right\n//y: 16     // 16px padding on the top/bottom\n},\ntext: 'Text\\nGame Object\\nCreated from config',\nstyle: {\nfontSize: '64px',\nfontFamily: 'Arial',\ncolor: '#ffffff',\nalign: 'center',\nbackgroundColor: '#ff00ff',\n// ...\n},\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"bbcodetext/#custom-class","title":"Custom class","text":""},{"location":"bbcodetext/#wrap","title":"Wrap","text":""},{"location":"bbcodetext/#content","title":"Content","text":""},{"location":"bbcodetext/#set-style","title":"Set style","text":"
    txt.setStyle(style);\ntxt.setFont(font);  // font: {fontFamily, fontSize, fontStyle}\ntxt.setFontFamily(family);\ntxt.setFontSize(size);\ntxt.setFontStyle(style);\n
    "},{"location":"bbcodetext/#color","title":"Color","text":""},{"location":"bbcodetext/#align","title":"Align","text":""},{"location":"bbcodetext/#image","title":"Image","text":""},{"location":"bbcodetext/#hit-area-of-words","title":"Hit area of words","text":"

    Size of hit-area is word-width x line-height, or image-width x line-height.

    "},{"location":"bbcodetext/#hitting-events","title":"Hitting events","text":""},{"location":"bbcodetext/#draw-hit-areas","title":"Draw hit-areas","text":"
    txt.drawAreaBounds(graphics, color);\n
    "},{"location":"bbcodetext/#line-spacing","title":"Line spacing","text":"

    This value is added to the height of the font when calculating the overall line height.

    "},{"location":"bbcodetext/#padding","title":"Padding","text":""},{"location":"bbcodetext/#max-lines","title":"Max lines","text":""},{"location":"bbcodetext/#fixed-size","title":"Fixed size","text":""},{"location":"bbcodetext/#margin-of-text","title":"Margin of text","text":"
    var leftMargin = txt.measureTextMargins(testString).left;\n
    "},{"location":"bbcodetext/#shift-start-position-of-text","title":"Shift start position of text","text":"
    txt.setXOffset(value);\n
    "},{"location":"bbcodetext/#resolution","title":"Resolution","text":""},{"location":"bbcodetext/#test-string","title":"Test string","text":"

    Set the test string to use when measuring the font.

    txt.setTestString(text);\n
    "},{"location":"bbcodetext/#save-texture","title":"Save texture","text":"
    txt.generateTexture(key);\n// txt.generateTexture(key, x, y, width, height);\n
    "},{"location":"bbcodetext/#delimiters","title":"Delimiters","text":"
    txt.setDelimiters(delimiters);  // '<>', or ['<', '>']\n

    or

    txt.setDelimiters(delimiterLeft, delimiterRight); // '<', '>'\n
    "},{"location":"bbcodetext/#rtl","title":"RTL","text":""},{"location":"bitmaptext/","title":"Static bitmap text","text":""},{"location":"bitmaptext/#introduction","title":"Introduction","text":"

    Drawing text by texture, built-in game object of phaser.

    "},{"location":"bitmaptext/#usage","title":"Usage","text":""},{"location":"bitmaptext/#load-bitmap-font","title":"Load bitmap font","text":""},{"location":"bitmaptext/#add-bitmap-text-object","title":"Add bitmap text object","text":"
    var txt = scene.add.bitmapText(x, y, key, text);\n// var txt = scene.add.bitmapText(x, y, key, text, size, align);\n

    Add text from JSON

    var txt = scene.make.bitmapText({\nx: 0,\ny: 0,\ntext: 'Text\\nGame Object\\nCreated from config',\nfont: '',\nsize: false,\nalign: 0,\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"bitmaptext/#custom-class","title":"Custom class","text":""},{"location":"bitmaptext/#set-text","title":"Set text","text":"
    txt.setText('...');\n

    or

    txt.text = '...';\n
    "},{"location":"bitmaptext/#set-align","title":"Set align","text":"

    or

    txt.align = align;\n
    "},{"location":"bitmaptext/#set-letter-spacing","title":"Set letter spacing","text":"
    txt.setLetterSpacing(spacing);\n

    or

    txt.letterSpacing = spacing;\n

    Can be a positive value to increase the space, or negative to reduce it.

    "},{"location":"bitmaptext/#set-line-spacing","title":"Set line spacing","text":"
    txt.setLineSpacing(spacing);\n

    or

    txt.lineSpacing = spacing;\n

    Can be a positive value to increase the space, or negative to reduce it.

    "},{"location":"bitmaptext/#set-font-size","title":"Set font size","text":"
    txt.setFontSize(size);\n

    or

    txt.fontSize = size;\n
    "},{"location":"bitmaptext/#set-font","title":"Set font","text":"
    txt.setFont(key);\n// txt.setFont(key, size, align);\n
    "},{"location":"bitmaptext/#tint","title":"Tint","text":"

    See Tint.

    "},{"location":"bitmaptext/#color-of-characters","title":"Color of characters","text":""},{"location":"bitmaptext/#drop-shadow-effect","title":"Drop shadow effect","text":"
    txt.setDropShadow(x, y, color, alpha);\n

    or

    txt.dropShadowX = x;\ntxt.dropShadowY = y;\ntxt.dropShadowColor = color;\ntxt.dropShadowAlpha = alpha;\n

    Note

    WebGL only

    "},{"location":"bitmaptext/#wrap","title":"Wrap","text":""},{"location":"bitmaptext/#get-bounds","title":"Get bounds","text":"
    var width = txt.width;\nvar height = txt.height;\n

    or

    var bounds = txt.getTextBounds(round);\n// bounds = {\n//     local: {\n//         x: 0,\n//         y: 0,\n//         width: 0,\n//         height: 0\n//     },\n//     global: {\n//         x: 0,\n//         y: 0,\n//         width: 0,\n//         height: 0\n//     },\n//     lines: {\n//         shortest: 0,\n//         longest: 0,\n//         lengths: null,\n//         height: 0\n//     },\n//     wrappedText: '',\n//     words: [],\n//     characters: [],\n//     scaleX: 0,\n//     scaleY: 0\n// };\n
    "},{"location":"bitmaptext/#get-information-of-character","title":"Get information of character","text":"
    var data = txt.getCharacterAt(x, y);\n// var data = txt.getCharacterAt(x, y, camera);\n
    "},{"location":"bitmaptext/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"bitmaptext/#appendix","title":"Appendix","text":""},{"location":"bitmaptext/#default-characters-set-of-retro-font","title":"Default characters set of retro font","text":""},{"location":"bitmapzone/","title":"Bitmap zone","text":""},{"location":"bitmapzone/#introduction","title":"Introduction","text":"

    Particles' emitter zone from canvas bitmap of text/canvas game object.

    "},{"location":"bitmapzone/#live-demo","title":"Live demo","text":""},{"location":"bitmapzone/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"bitmapzone/#install-plugin","title":"Install plugin","text":""},{"location":"bitmapzone/#load-minify-file","title":"Load minify file","text":""},{"location":"bitmapzone/#import-plugin","title":"Import plugin","text":""},{"location":"bitmapzone/#import-class","title":"Import class","text":""},{"location":"bitmapzone/#create-shape","title":"Create shape","text":"
    var bitmapZone = scene.plugins.get('rexBitmapZone').add(gameObject);\n
    "},{"location":"bitmapzone/#emit-zone","title":"Emit zone","text":"
    var particles = scene.add.particles(key,\n[\n// emitter config\n{\n// blendMode:\n// scale:\n// speed:\n// garvityY:\nemitZone: {\ntype: 'random',\nsource: bitmapZone\n}\n}\n]);\n

    bitmapZone provides getRandomPoint method.

    "},{"location":"bitmapzone/#update-content","title":"Update content","text":"
    bitmapZone.setSource(gameObject);\n
    "},{"location":"blendmode/","title":"Blend mode","text":""},{"location":"blendmode/#introduction","title":"Introduction","text":"

    Constant value of blend modes.

    "},{"location":"blendmode/#usage","title":"Usage","text":""},{"location":"blendmode/#webgl-and-canvas","title":"WebGL and Canvas","text":""},{"location":"blendmode/#canvas-only","title":"Canvas only","text":"

    Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these reasons try to be careful about the construction of your Scene and the frequency in which blend modes are used.

    "},{"location":"blitter/","title":"Blitter","text":""},{"location":"blitter/#introduction","title":"Introduction","text":"

    Display of static images, built-in game object of phaser.

    "},{"location":"blitter/#usage","title":"Usage","text":""},{"location":"blitter/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"blitter/#add-blitter-container","title":"Add blitter container","text":"

    Add blitter container

    var blitter = scene.add.blitter(x, y, key);\n

    Add blitter container from JSON

    var blitter = scene.make.blitter({\nx: 0,\ny: 0,\nkey: '',\n\n// angle: 0,\n// alpha: 1\n// flipX: true,\n// flipY: true,\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"blitter/#custom-class","title":"Custom class","text":""},{"location":"blitter/#add-bob-object","title":"Add bob object","text":"
    var bob = blitter.create(x, y);\n// var bob = blitter.create(x, y, frame, visible, index);\n
    "},{"location":"blitter/#add-mutiple-bob-objects","title":"Add mutiple bob objects","text":"
    var bobs = blitter.createMultiple(quantity, frame, visible);\n
    "},{"location":"blitter/#add-bob-object-from-callback","title":"Add bob object from callback","text":"
    var bobs = blitter.createFromCallback(callback, quantity, frame, visible)\n// var callback = function(bob, i){};\n
    "},{"location":"blitter/#get-bob-objects","title":"Get bob objects","text":"
    var bobs = blitter.children.list;\n
    "},{"location":"blitter/#clear-all-bob-objects","title":"Clear all bob objects","text":"
    blitter.clear();\n
    "},{"location":"blitter/#bob-object","title":"Bob object","text":"

    A Bob has a position, alpha value and a frame from a texture that it uses to render with. You can also toggle the flipped and visible state of the Bob.

    "},{"location":"blitter/#position","title":"Position","text":""},{"location":"blitter/#frame","title":"Frame","text":""},{"location":"blitter/#flip","title":"Flip","text":""},{"location":"blitter/#visible","title":"Visible","text":""},{"location":"blitter/#alpha","title":"Alpha","text":""},{"location":"blitter/#tint","title":"Tint","text":""},{"location":"blitter/#destroy","title":"Destroy","text":"
    bob.destroy();\n
    "},{"location":"blitter/#data","title":"Data","text":"
    var data = bob.data;  // {}\n
    "},{"location":"board-bejeweled/","title":"Bejeweled","text":""},{"location":"board-bejeweled/#introduction","title":"Introduction","text":"

    Match3-like gameplay template.

    "},{"location":"board-bejeweled/#live-demos","title":"Live demos","text":""},{"location":"board-bejeweled/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-bejeweled/#install-plugin","title":"Install plugin","text":""},{"location":"board-bejeweled/#load-minify-file","title":"Load minify file","text":""},{"location":"board-bejeweled/#import-template","title":"Import template","text":""},{"location":"board-bejeweled/#create-bejeweled-object","title":"Create bejeweled object","text":"
    var bejeweled = new Bejeweled(scene, {\n// rexBoard: 'rexBoard',\n\nboard: {\ngrid: {\ngridType: 'quadGrid',\nx: 30,\ny: 30 - 600,\ncellWidth: 60,\ncellHeight: 60,\n},\nwidth: 10,\nheight: 20 // Prepared rows: upper 10 rows\n},\nmatch: {\n// wildcard: undefined\n// dirMask: undefined\n},\nchess: {\n// pick random symbol from array, or a callback to return symbol\nsymbols: [0, 1, 2, 3, 4, 5],\n// symbols: function(board, tileX, tileY, excluded) { return symbol; }\n\n// User-defined chess game object\ncreate: function (board) {\n// Create Game object (Shape, Image, or Sprite)\nvar scene = board.scene;\nvar gameObject = scene.add.sprite(0, 0, textureKey, frame);\n// Initial 'symbol' value\ngameObject.setData('symbol', undefined);\n// Add data changed event of 'symbol` key\ngameObject.data.events.on('changedata_symbol', function (gameObject, value, previousValue) {\n// Change the appearance of game object via new symbol value\ngameObject.setFrame(newFrame);\n});\nreturn gameObject;\n},\n\n// scope for callbacks\nscope: undefined,\n\n// moveTo behavior\nmoveTo: {\nspeed: 400\n},\n// tileZ: 1,\n},\n// mask: false,\n\nselect1Action: undefined,\nselect2Action: undefined,\nswapAction: undefined,\nundoSwapAction: undefined,\neliminatingAction: undefined,\nfallingAction: undefined,\n\n// input: true\n})\n

    Configurations

    "},{"location":"board-bejeweled/#board-height","title":"Board height","text":"

    Board is separated into two parts: upper and bottom

    For example, if amount of visible rows is 10, board.height should set to 20.

    "},{"location":"board-bejeweled/#generate-symbol","title":"Generate symbol","text":"

    Symbols are declared in property chess.symbols in a symbol array like [0, 1, 2, 3, 4, 5], or a callback to return a symbol. The callback also use chess.scope as the scope.

    function(board, tileX, tileY, excluded) {\nreturn symbol\n}\n
    "},{"location":"board-bejeweled/#create-chess-object","title":"Create chess object","text":"

    Return a game object from a callback.

    function(board) {\n// Create Game object (Image, Sprite, or Shape)\nvar scene = board.scene;\nvar gameObject = scene.add.sprite(0, 0, textureKey, frame);\n// Initial 'symbol' value\ngameObject.setData('symbol', undefined);\n// Add data changed event of 'symbol` key\ngameObject.data.events.on('changedata_symbol', function (gameObject, value, previousValue) {\n// Change the appearance of game object via new symbol value\ngameObject.setFrame(newFrame);\n});\nreturn gameObject;\n}\n

    Each chess has a symbol value stored in 'symbol' key in private data. Add data changed event of 'symbol' key to change the appearance of game object via new symbol value.

    "},{"location":"board-bejeweled/#states","title":"States","text":"
    graph TD\n\nStart((Start)) --> Select1Start[select1-start]\n\nsubgraph Select 1 states\n  Select1Start --> |Input| Select1[select1]\nend\n\nSelect1 --> select2Start[select2-start]\n\nsubgraph Select 2 states\n  select2Start --> |Input| select2[select2]\nend\n\nselect2Start --> Select1Start\nselect2 --> Swap[swap]\nSwap --> MatchStart[match-start]\n\nsubgraph Match states\n  MatchStart --> Match[match]\n  Match --> Eliminate[eliminate]\n  Match --> MatchEnd[match-end]\n  Eliminate --> Fall[fall]\n  Fall --> Fill[fill]\n  Fill --> Match\nend\n\nMatchEnd --> UndoSwap[undo-swap]\nUndoSwap --> Select1Start\nMatchEnd --> Select1Start
    "},{"location":"board-bejeweled/#select-first-chess","title":"Select first chess","text":"

    Fire 'select1' event

    bejeweled.on('select1', function(board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#custom-select-first-chess-action","title":"Custom Select first chess Action","text":"

    Default select action:

    function (chess, board, bejeweled) {\n// Do nothing\n}\n
    "},{"location":"board-bejeweled/#select-second-chess","title":"Select second chess","text":"

    Fire 'select2' event

    bejeweled.on('select2', function(board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#custom-select-second-chess-action","title":"Custom Select second chess Action","text":"

    Default select action: The same as Select first chess Action

    "},{"location":"board-bejeweled/#swap-selected-chess","title":"Swap selected chess","text":"

    Fire 'swap' event

    bejeweled.on('swap', function(selectedChess1, selectedChess2, board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#custom-swap-action","title":"Custom Swap Action","text":"

    Default swap action:

    function (chess1, chess2, board, bejeweled) {\nvar tileXYZ1 = board.chessToTileXYZ(chess1);\nvar tileXYZ2 = board.chessToTileXYZ(chess2);\nvar tileX1 = tileXYZ1.x,\ntileY1 = tileXYZ1.y,\ntileX2 = tileXYZ2.x,\ntileY2 = tileXYZ2.y,\ntileZ = tileXYZ1.z;\n\n// TileZ of chess1 and chess2 are the same, change tileZ of chess2 to a different value\nboard.moveChess(chess2, tileX2, tileY2, `#${tileZ}`, false);\n\n// Move chess1 to tileXYZ2, chess2 to tileXYZ1\nvar moveTo1 = bejeweled.getChessMoveTo(chess1);\nvar moveTo2 = bejeweled.getChessMoveTo(chess2);\nmoveTo1.moveTo(tileX2, tileY2);\nmoveTo2.moveTo(tileX1, tileY1);\n\n// Change tileZ of chess2 back\nboard.moveChess(chess2, tileX1, tileY1, tileZ, false);\n\nif (moveTo1.isRunning) {\nbejeweled.waitEvent(moveTo1, 'complete');\n}\nif (moveTo2.isRunning) {\nbejeweled.waitEvent(moveTo2, 'complete');\n}\n};\n
    "},{"location":"board-bejeweled/#match-start","title":"Match start","text":"

    Fire 'match-start' event

    bejeweled.on('match-start', function(board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#match-lines","title":"Match lines","text":"

    Fire 'match' event

    bejeweled.on('match', function(lines, board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#eliminating-chess","title":"Eliminating chess","text":"

    Fire 'eliminate' event

    bejeweled.on('eliminate', function(chessArray, board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#custom-eliminating-action","title":"Custom Eliminating Action","text":"

    Default fliminating action:

    function (chessArray, board, bejeweled) {\nconst duration = 500; //ms\nfor (var i = 0, cnt = chessArray.length; i < cnt; i++) {\nvar fade = FadeOutDestroy(chessArray[i], duration);\nbejeweled.waitEvent(fade, 'complete');\n}\n}\n
    "},{"location":"board-bejeweled/#falling-chess","title":"Falling chess","text":"

    Fire 'fall' event

    bejeweled.on('fall', function(board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#custom-falling-action","title":"Custom Falling Action","text":"

    Default falling action:

    function (board, bejeweled) {\nvar tileZ = bejeweled.chessTileZ,\nchess, moveTo;\n\nfor (var tileY = (board.height - 1); tileY >= 0; tileY--) { // bottom to top\nfor (var tileX = 0, cnt = board.width; tileX < cnt; tileX++) { // left to right\nchess = board.tileXYZToChess(tileX, tileY, tileZ);\nif (chess === null) {\ncontinue;\n}\nmoveTo = bejeweled.getChessMoveTo(chess);\ndo {\nmoveTo.moveToward(1);\n} while (moveTo.lastMoveResult)\nif (moveTo.isRunning) {\nbejeweled.waitEvent(moveTo, 'complete');\n}\n}\n}\n}\n
    "},{"location":"board-bejeweled/#fill-chess","title":"Fill chess","text":"

    Fire 'fill' event

    bejeweled.on('fill', function(board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#match-end","title":"Match end","text":"

    Fire 'match-end' event

    bejeweled.on('match-end', function(board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#undo-swap-selected-chess","title":"Undo-swap selected chess","text":"

    Fire 'undo-swap' event

    bejeweled.on('undo-swap', function(selectedChess1, selectedChess2, board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#custom-undo-swap-action","title":"Custom Undo-Swap Action","text":"

    Default undo-swap action : Equal to Swap action

    "},{"location":"board-bejeweled/#start-gameplay","title":"Start gameplay","text":"
    bejeweled.start();\n
    "},{"location":"board-bejeweled/#input-control","title":"Input control","text":""},{"location":"board-bejeweled/#default-input","title":"Default input","text":"
    1. Enable default input control
      var bejeweled = new Bejeweled(scene, {\n// ...\ninput: true\n});\n
    2. Enable/disable temporarily.
    "},{"location":"board-bejeweled/#custom-input","title":"Custom input","text":"
    1. Discard default input control
      var bejeweled = new Bejeweled(scene, {\n// ...\ninput: false\n});\n
    2. Add custom input logic like
      scene.input\n.on('pointerdown', function (pointer) {\nvar chess = bejeweled.worldXYToChess(pointer.worldX, pointer.worldY);\nif (chess) {\nbejeweled.selectChess1(chess);\n}\n}, scene)\n.on('pointermove', function (pointer) {\nif (!pointer.isDown) {\nreturn;\n}\nvar chess = bejeweled.worldXYToChess(pointer.worldX, pointer.worldY);\nif (chess && (chess !== this.bejeweled.getSelectedChess1())) {\nbejeweled.selectChess2(chess);\n}\n}, scene);\n

    Helper methods

    "},{"location":"board-bejeweled/#data","title":"Data","text":"

    See data manager

    Note

    Ensure data manager is created before binding any data-changed events.

    "},{"location":"board-bejeweled/#misc","title":"Misc","text":""},{"location":"board-chessdata/","title":"Chess data","text":""},{"location":"board-chessdata/#introduction","title":"Introduction","text":"

    Properties of chess, chess behavior of Board system.

    "},{"location":"board-chessdata/#usage","title":"Usage","text":""},{"location":"board-chessdata/#add-chess-data-object","title":"Add chess data object","text":"

    Chess data will be added to game object via gameObject.rexChess once adding this game object to board, or attach any chess behavior.

    "},{"location":"board-chessdata/#get-chess-data","title":"Get chess data","text":"
    var chessData = gameObject.rexChess;\n
    "},{"location":"board-chessdata/#set-tile-z","title":"Set tile Z","text":"
    gameObject.rexChess.setTileZ(tileZ);\n

    (tileX, tileY) won't be changed.

    "},{"location":"board-chessdata/#get-tile-position","title":"Get tile position","text":"
    var tileXYZ = gameObject.rexChess.tileXYZ;\n
    "},{"location":"board-chessdata/#get-board","title":"Get board","text":"
    var board = gameObject.rexChess.board;\n

    See also

    "},{"location":"board-chessdata/#blocker","title":"Blocker","text":""},{"location":"board-fieldofview/","title":"Field of view","text":""},{"location":"board-fieldofview/#introduction","title":"Introduction","text":"

    Visible testing, to find field of view, chess behavior of Board system.

    "},{"location":"board-fieldofview/#live-demos","title":"Live demos","text":""},{"location":"board-fieldofview/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-fieldofview/#install-plugin","title":"Install plugin","text":""},{"location":"board-fieldofview/#load-minify-file","title":"Load minify file","text":""},{"location":"board-fieldofview/#import-plugin","title":"Import plugin","text":""},{"location":"board-fieldofview/#import-class","title":"Import class","text":""},{"location":"board-fieldofview/#create-instance","title":"Create instance","text":"
    var fieldOfView = scene.rexBoard.add.fieldOfView(chess, {\n// face: 0,\n// cone: undefined,\n// coneMode: 0,\n// perspective: false,\n\n// ** pre-test **\n// occupiedTest: false,\n// blockerTest: false,\n// preTestCallback: undefined,\n// preTestCallbackScope: undefined,\n\n// ** cost **\n// costCallback: undefined,\n// costCallbackScope: undefined,\n// cost: undefined,   // constant cost\n\n// debug: {\n//     graphics: undefined,\n//     visibleLineColor: 0x00ff00,\n//     invisibleLineColor: 0xff0000,\n//     log: false,\n// }\n})\n

    Note

    Blocker is visible, but tiles behind blocker are invisible.

    "},{"location":"board-fieldofview/#set-pre-test-function","title":"Set pre-test function","text":"
    fieldOfView.setPreTestFunction(callback, scope);\n
    "},{"location":"board-fieldofview/#set-cost-function","title":"Set cost function","text":""},{"location":"board-fieldofview/#is-tilexychess-visible","title":"Is tileXY/chess visible","text":"
    var isVisible = fieldOfView.isInLOS(chess);\n// var isVisible = fieldOfView.isInLOS(chess, visiblePoints);\n// var isVisible = fieldOfView.isInLOS(chess, visiblePoints, originTileXY);\n
    "},{"location":"board-fieldofview/#get-tilexy-array-in-field-of-view","title":"Get tileXY array in field of view","text":"
    var tileXYArray = fieldOfView.findFOV();\n// var tileXYArray = fieldOfView.findFOV(visiblePoints);\n// var tileXYArray = fieldOfView.findFOV(visiblePoints, originTileXY);\n// var out = fieldOfView.findFOV(visiblePoints, out);\n// var out = fieldOfView.findFOV(visiblePoints, originTileXY, out);\n
    "},{"location":"board-fieldofview/#filter-visible-tilexy-array","title":"Filter visible tileXY array","text":""},{"location":"board-fieldofview/#face","title":"Face","text":"

    Face direction

    "},{"location":"board-fieldofview/#debug","title":"Debug","text":""},{"location":"board-hexagongrid/","title":"Hexagon","text":""},{"location":"board-hexagongrid/#introduction","title":"Introduction","text":"

    Hexagon grid object of Board system.

    "},{"location":"board-hexagongrid/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-hexagongrid/#create-instance","title":"Create instance","text":"
    var grid = scene.rexBoard.add.hexagonGrid({\nx: 0,\ny: 0,\ncellWidth: 0,\ncellHeight: 0,\n// size: undefined,\nstaggeraxis: 1,\nstaggerindex: 1\n});\n

    or

    // import { HexagonGrid } from 'phaser3-rex-plugins/plugins/board-components.js';\nvar grid = new HexagonGrid(config);\n
    "},{"location":"board-hexagongrid/#world-position-of-tile-0-0","title":"World position of tile (0, 0)","text":""},{"location":"board-hexagongrid/#cell-size","title":"Cell size","text":""},{"location":"board-hexagongrid/#grid-type","title":"Grid type","text":""},{"location":"board-hexagongrid/#get-world-position","title":"Get world position","text":"
    var worldXY = grid.getWorldXY(tileX, tileY);  // worldXY: {x, y}\n// var out = grid.getWorldXY(tileX, tileY, out);\n
    "},{"location":"board-hexagongrid/#get-tile-position","title":"Get tile position","text":"
    var tileXY = grid.getTileXY(worldX, worldY);  // tileXY: {x, y}\n// var out = grid.getTileXY(worldX, worldY, out);\n
    "},{"location":"board-hexagongrid/#directions","title":"Directions","text":""},{"location":"board-hexagonmap/","title":"Hexagon map","text":""},{"location":"board-hexagonmap/#introduction","title":"Introduction","text":"

    Create tile positions in hexagon/triangle/parallelogram geometry in hexagon grid.

    "},{"location":"board-hexagonmap/#live-demos","title":"Live demos","text":""},{"location":"board-hexagonmap/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-hexagonmap/#install-plugin","title":"Install plugin","text":""},{"location":"board-hexagonmap/#load-minify-file","title":"Load minify file","text":""},{"location":"board-hexagonmap/#import-plugin","title":"Import plugin","text":""},{"location":"board-hexagonmap/#import-class","title":"Import class","text":""},{"location":"board-hexagonmap/#create-tile-positions","title":"Create tile positions","text":""},{"location":"board-hexagonmap/#hexagon","title":"Hexagon","text":"
    var tileXYArray = scene.rexBoard.hexagonMap.hexagon(board, radius);\n// var out = scene.rexBoard.hexagonMap.hexagon(board, radius, out);\n
    staggeraxis y x"},{"location":"board-hexagonmap/#parallelogram","title":"Parallelogram","text":"
    var tileXYArray = scene.rexBoard.hexagonMap.parallelogram(board, type, width, height);\n// var out = scene.rexBoard.hexagonMap.parallelogram(board, type, width, height, out);\n
    type\\staggeraxis y x 0 1 2"},{"location":"board-hexagonmap/#triangle","title":"Triangle","text":"
    var tileXYArray = scene.rexBoard.hexagonMap.triangle(board, type, height);\n// var out = scene.rexBoard.hexagonMap.triangle(board, type, height, out);\n
    type\\staggeraxis y x 0 1"},{"location":"board-hexagonmap/#retrieve-tile-positions","title":"Retrieve tile positions","text":"
    1. Offset all of tile positions to (0, 0), and set board size to fit these tile positions.
      var tileXYArray = board.fit(tileXYArray);\n
    2. Retrieve tile positions
      var tileXY;\nfor(var i = 0, cnt = tileXYArray.length; i < cnt; i++) {\ntileXY = tileXYArray[i];\n// ...\n}\n
    "},{"location":"board-match/","title":"Match","text":""},{"location":"board-match/#introduction","title":"Introduction","text":"

    Get matched chess in lines, or neighbors grouping.

    "},{"location":"board-match/#live-demos","title":"Live demos","text":""},{"location":"board-match/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-match/#install-plugin","title":"Install plugin","text":""},{"location":"board-match/#load-minify-file","title":"Load minify file","text":""},{"location":"board-match/#import-plugin","title":"Import plugin","text":""},{"location":"board-match/#import-class","title":"Import class","text":""},{"location":"board-match/#add-match-object","title":"Add match object","text":"
    var match = scene.rexBoard.add.match({\nboard: board,\n// wildcard: undefined\n// dirMask: undefined\n});\n
    "},{"location":"board-match/#custom-class","title":"Custom class","text":""},{"location":"board-match/#set-board","title":"Set board","text":"

    Board object could be assigned later.

    match.setBoard(board);\n
    "},{"location":"board-match/#update-symbols","title":"Update symbols","text":"

    Each tile position (tileX, tileY) has a symbol.

    "},{"location":"board-match/#update-all-symbols-in-board","title":"Update all symbols in board","text":"
    match.refreshSymbols(function(tileXY, board) {\n// var chess = board.tileXYZToChess(tileXY.x, tileXY.y, 0);\n// if (chess == null) { return null; }\nreturn symbol;\n}, scope);\n
    "},{"location":"board-match/#updata-a-symbol","title":"Updata a symbol","text":"
    match.setSymbol(tileX, tileY, symbol);\n
    "},{"location":"board-match/#get-symbol","title":"Get symbol","text":"
    var symbol = match.getSymbol(tileX, tileY);\n
    "},{"location":"board-match/#for-each-symbol-cahce","title":"For each symbol cahce","text":"
    match.forEach(function(tileXY, symbol, board) {\n// return true; // Break for each loop\n}, scope)\n
    "},{"location":"board-match/#wildcard-symbol","title":"Wildcard symbol","text":""},{"location":"board-match/#directions-mask","title":"Directions mask","text":"

    Enable/Disable matching at directions, all directions are enbale by default.

    match.setDirMask(dir, value);\n
    "},{"location":"board-match/#line-grouping","title":"Line grouping","text":""},{"location":"board-match/#match-n","title":"Match-N","text":"
    match.match(n, function (result, board) {\n// var chess = board.tileXYArrayToChess(result.tileXY, 0);\n// GroupCall(chess, function (chess) { chess.setScale(0.8); });\n\n// return true; // Break for each loop\n}, scope);\n
    "},{"location":"board-match/#any-match-n","title":"Any match-N","text":"
    var hasAnyMatchN = match.anyMatch(n);\n
    "},{"location":"board-match/#match-pattern","title":"Match pattern","text":"
    match.match(pattern, function (result, board) {\n// var chess = board.tileXYArrayToChess(result.tileXY, 0);\n// GroupCall(chess, function (chess) { chess.setScale(0.8); });\n}, scope);\n
    "},{"location":"board-match/#any-match-pattern","title":"Any match pattern","text":"
    var hasAnyMatchN = match.anyMatch(pattern);\n
    "},{"location":"board-match/#neighbors-grouping","title":"Neighbors grouping","text":""},{"location":"board-miniboard/","title":"Mini board","text":""},{"location":"board-miniboard/#introduction","title":"Introduction","text":"

    Chess Container, to rotate/mirror/drag chess together.

    "},{"location":"board-miniboard/#live-demos","title":"Live demos","text":""},{"location":"board-miniboard/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-miniboard/#install-plugin","title":"Install plugin","text":""},{"location":"board-miniboard/#load-minify-file","title":"Load minify file","text":""},{"location":"board-miniboard/#import-plugin","title":"Import plugin","text":""},{"location":"board-miniboard/#import-class","title":"Import class","text":""},{"location":"board-miniboard/#add-container","title":"Add Container","text":"
    var miniBoard = scene.rexBoard.add.miniBoard(x, y, {\ngrid: grid,\ndraggable: undefined,\n});\n
    "},{"location":"board-miniboard/#add-chess","title":"Add chess","text":"
    miniBoard.addChess(gameObject, tileX, tileY, tileZ);\n

    Chess and tile position

    These world properties of chess will be changed with container.

    "},{"location":"board-miniboard/#remove-chess","title":"Remove chess","text":""},{"location":"board-miniboard/#set-origin","title":"Set origin","text":""},{"location":"board-miniboard/#main-board","title":"Main board","text":"

    Put chess to a main-board (Board object) with the same tile position in mini-board, or pull chess out from main-board.

    "},{"location":"board-miniboard/#put-on-main-board","title":"Put on main-board","text":"
    miniBoard.putOnMainBoard(mainBoard, tileX, tileY);\n// miniBoard.putOnMainBoard(mainBoard, tileX, tileY, align);\n

    or

    miniBoard.putOnMainBoard(mainBoard);\n

    To put this mini-board to nearest grid of main-board.

    "},{"location":"board-miniboard/#pull-out-from-main-board","title":"Pull out from main-board","text":"
    miniBoard.pullOutFromMainBoard();\n

    Remove all chess from main-board.

    "},{"location":"board-miniboard/#put-back-to-previous-main-board","title":"Put back to previous main-board","text":"
    miniBoard.putBack();\n

    Previous main-board and tile position will be remembered for putting back.

    "},{"location":"board-miniboard/#is-overlapping-to-main-board","title":"Is overlapping to main-board","text":"

    Return true if any chess is overlapping to main-board.

    miniBoard.isOverlapping(mainBoard);\n

    or

    miniBoard.isOverlapping(mainBoard, tileZ);\n
    "},{"location":"board-miniboard/#align-world-position-to-grid-of-main-board","title":"Align world position to grid of main-board","text":"
    miniBoard.alignToMainBoard(mainBoard, tileX, tileY);\n

    or

    miniBoard.alignToMainBoard(mainBoard);\n

    to align this mini-board to nearest grid of main-board.

    "},{"location":"board-miniboard/#get-current-main-board","title":"Get current main-board","text":"
    var board = miniBoard.mainBoard;\n

    Return null if this mini-board is not at any main-board.

    "},{"location":"board-miniboard/#rotate","title":"Rotate","text":""},{"location":"board-miniboard/#can-rotate","title":"Can rotate","text":"
    miniBoard.canRotate(n);\n

    or

    miniBoard.canRotateTo(direction);\n

    Always return true if this mini-board is not on a main-board.

    "},{"location":"board-miniboard/#rotate_1","title":"Rotate","text":"
    miniBoard.rotate(n);\n

    or

    miniBoard.rotateTo(direction);\n

    Return true if this rotating request is accepted.

    var isSuccess = miniBoard.lastTransferResult;\n
    "},{"location":"board-miniboard/#mirror","title":"Mirror","text":""},{"location":"board-miniboard/#can-mirror","title":"Can mirror","text":"
    miniBoard.canMirror(mode);\n

    Always return true if this mini-board is not on a main-board.

    "},{"location":"board-miniboard/#mirror_1","title":"Mirror","text":"
    miniBoard.mirror(mode);\n

    Return true if this mirroring request is accepted.

    var isSuccess = miniBoard.lastTransferResult;\n
    "},{"location":"board-miniboard/#touch-events","title":"Touch events","text":""},{"location":"board-miniboard/#set-interactive","title":"Set interactive","text":""},{"location":"board-miniboard/#set-drag-able","title":"Set drag-able","text":""},{"location":"board-miniboard/#touch-event","title":"Touch event","text":""},{"location":"board-miniboard/#pointer-down","title":"Pointer down","text":""},{"location":"board-miniboard/#pointer-up","title":"Pointer up","text":""},{"location":"board-miniboard/#pointer-move","title":"Pointer move","text":""},{"location":"board-miniboard/#drag-events","title":"Drag events","text":""},{"location":"board-monopoly/","title":"Monopoly","text":""},{"location":"board-monopoly/#introduction","title":"Introduction","text":"

    Move through path tiles, used in monopoly-like application, chess behavior of Board system.

    "},{"location":"board-monopoly/#live-demos","title":"Live demos","text":""},{"location":"board-monopoly/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-monopoly/#install-plugin","title":"Install plugin","text":""},{"location":"board-monopoly/#load-minify-file","title":"Load minify file","text":""},{"location":"board-monopoly/#import-plugin","title":"Import plugin","text":""},{"location":"board-monopoly/#import-class","title":"Import class","text":""},{"location":"board-monopoly/#create-instance","title":"Create instance","text":"
    var monopoly = scene.rexBoard.add.monopoly(chess, {\nface: 0,\n\n// ** cost **\n// pathTileZ: 0,\n// cost: 1,   // constant cost\n// costCallback: undefined,\n// costCallbackScope: undefined\n})\n
    "},{"location":"board-monopoly/#cost-function","title":"Cost function","text":"
    var callback = function(curTileXY, preTileXY, monopoly) {\nreturn cost;\n}\n
    "},{"location":"board-monopoly/#set-cost-function","title":"Set cost function","text":""},{"location":"board-monopoly/#set-face-direction","title":"Set face direction","text":"
    monopoly.setFace(direction);\n

    Moving direction

    Get path toward this face direction.

    "},{"location":"board-monopoly/#get-path","title":"Get path","text":"
    var tileXYArray = monopoly.getPath(movingPoints);\n// var out = monopoly.getPath(movingPoints, out);\n
    "},{"location":"board-moveto/","title":"Move to","text":""},{"location":"board-moveto/#introduction","title":"Introduction","text":"

    Move chess towards target position with a steady speed, chess behavior of Board system.

    "},{"location":"board-moveto/#live-demos","title":"Live demos","text":""},{"location":"board-moveto/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-moveto/#install-plugin","title":"Install plugin","text":""},{"location":"board-moveto/#load-minify-file","title":"Load minify file","text":""},{"location":"board-moveto/#import-plugin","title":"Import plugin","text":""},{"location":"board-moveto/#import-class","title":"Import class","text":""},{"location":"board-moveto/#create-instance","title":"Create instance","text":"
    var moveTo = scene.rexBoard.add.moveTo(chess, {\n// speed: 400,\n\n// rotateToTarget: false,\n\n// occupiedTest: false,\n// blockerTest: false,\n// moveableTest: undefined,\n// moveableTestScope: undefined,\n\n// sneak: false,\n})\n
    "},{"location":"board-moveto/#move-to-destination-tile","title":"Move to destination tile","text":"
    moveTo.moveTo(tileX, tileY);\n// moveTo.moveTo(tileXY);\n
    "},{"location":"board-moveto/#move-to-neighbor-tile","title":"Move to neighbor tile","text":"
    moveTo.moveToward(direction);\n
    "},{"location":"board-moveto/#move-to-random-neighbor-tile","title":"Move to random neighbor tile","text":"
    moveTo.moveToRandomNeighbor();\n
    "},{"location":"board-moveto/#move-away-or-move-closer","title":"Move away or move closer","text":""},{"location":"board-moveto/#can-move-to-tile","title":"Can move to tile","text":"
    var canMoveTo = moveTo.canMoveTo(tileX, tileY);\n

    Return true if chess can move to (tileX, tileY)

    "},{"location":"board-moveto/#last-move-result","title":"Last move result","text":"
    var lastMoveResult = moveTo.lastMoveResult;\n

    Return true if chess is moved by moveTo.moveTo(), moveTo.moveToward(), or moveTo.moveToRandomNeighbor()

    "},{"location":"board-moveto/#destination","title":"Destination","text":"
    var destinationTileX = moveTo.destinationTileX;\nvar destinationTileY = moveTo.destinationTileY;\nvar destinationDirection = moveTo.destinationDirection;\n
    "},{"location":"board-moveto/#pause-resume-stop-moving","title":"Pause, Resume, stop moving","text":"
    moveTo.pause();\nmoveTo.resume();\nmoveTo.stop();\n
    "},{"location":"board-moveto/#enable","title":"Enable","text":""},{"location":"board-moveto/#set-speed","title":"Set speed","text":"
    moveTo.setSpeed(speed);\n// moveTo.speed = speed;\n
    "},{"location":"board-moveto/#set-rotate-to-target","title":"Set rotate-to-target","text":"
    moveTo.setRotateToTarget(rotateToTarget);\n
    "},{"location":"board-moveto/#events","title":"Events","text":""},{"location":"board-moveto/#status","title":"Status","text":""},{"location":"board-overview/","title":"Overview","text":""},{"location":"board-overview/#install-plugin","title":"Install plugin","text":""},{"location":"board-overview/#load-minify-file","title":"Load minify file","text":""},{"location":"board-overview/#import-plugin","title":"Import plugin","text":""},{"location":"board-overview/#using-typescript-declaration-file","title":"Using typescript declaration file","text":"
    import BoardPlugin from 'phaser3-rex-plugins/plugins/board-plugin.js';\n\nclass Game extends Phaser.Scene {\nrexBoard: BoardPlugin;  // Declare scene property 'rexBoard' as BoardPlugin type\n\ncreate() {\nvar board = this.rexBoard.add.board({\n// ...\n})\n}\n}\n\nvar game = new Phaser.Game({\nscene: Game,\n// ...\nplugins: {\nscene: [{\nkey: 'rexBoard',\nplugin: BoardPlugin,\nmapping: 'rexBoard'\n},\n// ...\n]\n}\n// ...\n});\n

    See this example

    "},{"location":"board-overview/#list-of-board-plugins","title":"List of board plugins","text":""},{"location":"board-overview/#board","title":"Board","text":""},{"location":"board-overview/#shapes","title":"Shapes","text":""},{"location":"board-overview/#behaviors","title":"Behaviors","text":""},{"location":"board-overview/#applications","title":"Applications","text":""},{"location":"board-overview/#mini-board","title":"Mini-board","text":""},{"location":"board-overview/#templates","title":"Templates","text":""},{"location":"board-pathfinder/","title":"Path finder","text":""},{"location":"board-pathfinder/#introduction","title":"Introduction","text":"

    Find moveable area or moving path, chess behavior of Board system.

    "},{"location":"board-pathfinder/#live-demos","title":"Live demos","text":""},{"location":"board-pathfinder/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-pathfinder/#install-plugin","title":"Install plugin","text":""},{"location":"board-pathfinder/#load-minify-file","title":"Load minify file","text":""},{"location":"board-pathfinder/#import-plugin","title":"Import plugin","text":""},{"location":"board-pathfinder/#import-class","title":"Import class","text":""},{"location":"board-pathfinder/#create-instance","title":"Create instance","text":"
    var pathFinder = scene.rexBoard.add.pathFinder({\n// occupiedTest: false,\n// blockerTest: false,\n\n// ** cost **\n// cost: 1,   // constant cost\n// costCallback: undefined,\n// costCallbackScope: undefined,\n// cacheCost: true,\n\n// pathMode: 10,  // A*\n// weight: 10,   // weight for A* searching mode\n// shuffleNeighbors: false,\n})\n
    "},{"location":"board-pathfinder/#create-behavior","title":"Create behavior","text":"
    var pathFinder = scene.rexBoard.add.pathFinder(chess, config);\n
    "},{"location":"board-pathfinder/#set-chess","title":"Set chess","text":"
    pathFinder.setChess(chess);\n

    Note

    Don't use this method if pathFinder is a behavior of Chess

    "},{"location":"board-pathfinder/#cost-function","title":"Cost function","text":"
    var callback = function(curTileXY, preTileXY, pathFinder) {\nreturn cost;\n}\n
    "},{"location":"board-pathfinder/#set-cost-function","title":"Set cost function","text":""},{"location":"board-pathfinder/#set-path-mode","title":"Set path mode","text":"
    pathFinder.setPathMode(pathMode)\n
    "},{"location":"board-pathfinder/#find-moveable-area","title":"Find moveable area","text":"
    var tileXYArray = pathFinder.findArea(movingPoints);\n// var out = pathFinder.findArea(movingPoints, out);\n
    "},{"location":"board-pathfinder/#get-shortest-path-to-a-moveable-tile","title":"Get shortest path to a moveable tile","text":"
    var tileXYArray = pathFinder.getPath(endTileXY);\n

    Path mode

    "},{"location":"board-pathfinder/#find-moving-path","title":"Find moving path","text":"
    var tileXYArray = pathFinder.findPath(endTileXY);\n// var tileXYArray = pathFinder.findPath(endTileXY, movingPoints, isClosest, out);\n

    Path mode

    "},{"location":"board-pathfinder/#cost-of-tile","title":"Cost of tile","text":"

    During or after finding moveable area...

    "},{"location":"board-quadgrid/","title":"Quad","text":""},{"location":"board-quadgrid/#introduction","title":"Introduction","text":"

    Quad grid object of Board system.

    "},{"location":"board-quadgrid/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-quadgrid/#create-instance","title":"Create instance","text":"
    var grid = scene.rexBoard.add.quadGrid({\nx: 0,\ny: 0,\ncellWidth: 0,\ncellHeight: 0,\ntype: 0,\n// dir: 4\n});\n

    or

    // import { QuadGrid } from 'phaser3-rex-plugins/plugins/board-components.js';\nvar grid = new QuadGrid(config);\n
    "},{"location":"board-quadgrid/#world-position-of-tile-0-0","title":"World position of tile (0, 0)","text":""},{"location":"board-quadgrid/#cell-size","title":"Cell size","text":""},{"location":"board-quadgrid/#grid-type","title":"Grid type","text":""},{"location":"board-quadgrid/#get-world-position","title":"Get world position","text":"
    var worldXY = grid.getWorldXY(tileX, tileY);  // worldXY: {x, y}\n// var out = grid.getWorldXY(tileX, tileY, out);\n
    "},{"location":"board-quadgrid/#get-tile-position","title":"Get tile position","text":"
    var tileXY = grid.getTileXY(worldX, worldY);  // tileXY: {x, y}\n// var out = grid.getTileXY(worldX, worldY, out);\n
    "},{"location":"board-quadgrid/#directions","title":"Directions","text":"
    6|3|7\n-+-+-\n2|A|0\n-+-+-\n5|1|4\n
    "},{"location":"board-shape/","title":"Shape","text":""},{"location":"board-shape/#introduction","title":"Introduction","text":"

    Grid (polygon) shape object.

    "},{"location":"board-shape/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-shape/#install-plugin","title":"Install plugin","text":""},{"location":"board-shape/#load-minify-file","title":"Load minify file","text":""},{"location":"board-shape/#import-plugin","title":"Import plugin","text":""},{"location":"board-shape/#import-class","title":"Import class","text":""},{"location":"board-shape/#add-shape-object","title":"Add shape object","text":""},{"location":"board-shape/#set-color","title":"Set color","text":"

    No tint methods

    Uses shape.setFillStyle(color, alpha) to change color.

    "},{"location":"board-shape/#other-properties","title":"Other properties","text":"

    See polygon shape game object, game object

    "},{"location":"board-texture/","title":"Tile texture","text":""},{"location":"board-texture/#introduction","title":"Introduction","text":"

    Create canvas-texture of tile.

    "},{"location":"board-texture/#live-demos","title":"Live demos","text":""},{"location":"board-texture/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-texture/#install-plugin","title":"Install plugin","text":""},{"location":"board-texture/#load-minify-file","title":"Load minify file","text":""},{"location":"board-texture/#import-plugin","title":"Import plugin","text":""},{"location":"board-texture/#import-class","title":"Import class","text":""},{"location":"board-texture/#create-tile-texture","title":"Create tile texture","text":""},{"location":"board-texture/#hexagon","title":"Hexagon","text":"
    CreateTileTexture(board, key, fillStyle, strokeStyle, lineWidth);\n// CreateTileTexture(board, key, fillStyle, strokeStyle, lineWidth, overlapGrid, lineJoin);\n
    "},{"location":"board-tilemap/","title":"Tilemap","text":""},{"location":"board-tilemap/#introduction","title":"Introduction","text":"

    Create board from tilemap

    "},{"location":"board-tilemap/#live-demos","title":"Live demos","text":""},{"location":"board-tilemap/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-tilemap/#install-plugin","title":"Install plugin","text":""},{"location":"board-tilemap/#load-minify-file","title":"Load minify file","text":""},{"location":"board-tilemap/#import-plugin","title":"Import plugin","text":""},{"location":"board-tilemap/#import-class","title":"Import class","text":""},{"location":"board-tilemap/#create-board-from-tilemap","title":"Create board from tilemap","text":"
    var board = CreateBoardFromTilemap(tilemap, layers);\n
    "},{"location":"board/","title":"Board","text":""},{"location":"board/#introduction","title":"Introduction","text":"

    Core object of Board system.

    "},{"location":"board/#live-demos","title":"Live demos","text":""},{"location":"board/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board/#install-plugin","title":"Install plugin","text":""},{"location":"board/#load-minify-file","title":"Load minify file","text":""},{"location":"board/#import-plugin","title":"Import plugin","text":""},{"location":"board/#import-class","title":"Import class","text":""},{"location":"board/#add-board-object","title":"Add board object","text":"

    Configuration

    "},{"location":"board/#custom-class","title":"Custom class","text":""},{"location":"board/#board-size","title":"Board size","text":""},{"location":"board/#add-chess","title":"Add chess","text":"
    board.addChess(chess, tileX, tileY, tileZ, align);\n

    Chess and tile position

    "},{"location":"board/#kick-out-event","title":"Kick-out event","text":"

    Board will fire kickout event when adding chess to an occupied grid.

    board.on('kickout', function(chessToAdd, occupiedChess, tileXYZ){\n})\n

    chessToAdd kicks out occupiedChess at tile position tileXYZ({x,y,z}).

    "},{"location":"board/#remove-chess","title":"Remove chess","text":""},{"location":"board/#move-chess","title":"Move chess","text":"
    board.moveChess(chess, toTileX, toTileY, toTileZ, align);\n

    Do nothing if chess is not at this board.

    "},{"location":"board/#set-tilez-of-chess","title":"Set tileZ of chess","text":"
    board.setChessTileZ(chess, toTileZ, align);\n
    "},{"location":"board/#swap-chess","title":"Swap chess","text":"
    board.swapChess(chessA, chessB, align);\n
    "},{"location":"board/#chess-tile-position","title":"Chess -> tile position","text":"
    var tileXYZ = board.chessToTileXYZ(chess);\n
    "},{"location":"board/#tile-position-chess","title":"Tile position -> chess","text":""},{"location":"board/#world-position-chess","title":"World position -> chess","text":""},{"location":"board/#contains","title":"Contains","text":""},{"location":"board/#for-each-tile","title":"For each tile","text":"
    board.forEachTileXY(function(tileXY, board) {\n// var tileX = tileXY.x;\n// var tileY = tileXY.y;\n}, scope);\n

    Iteration order :

    board.forEachTileXY(function(tileXY, board) {\n// var tileX = tileXY.x;\n// var tileY = tileXY.y;\n\n// return isBreak;\n}, scope, order);\n

    Or using for-loop

    for (var tileY = 0; tileY < board.height; tileY++) {\nfor (var tileX = 0; tileX < board.width; tileX++) {\n// ...\n}\n}\n
    "},{"location":"board/#for-each-tile-in-viewport-of-a-camera","title":"For each tile in viewport of a camera","text":"
    board.forEachCullTileXY(function(tileXY, board) {\n// var tileX = tileXY.x;\n// var tileY = tileXY.y;\n}, scope);\n
    board.forEachCullTileXY(function(tileXY, board) {\n// var tileX = tileXY.x;\n// var tileY = tileXY.y;\n}, scope, {\ncamera: board.scene.cameras.main,\npaddingX: 1,\npaddingY: 1,\norder: 0,\n});\n
    "},{"location":"board/#tile-position-world-position","title":"Tile position -> world position","text":"
    var worldXY = board.tileXYToWorldXY(tileX, tileY);  // worldXY: {x, y}\n// var out = board.tileXYToWorldXY(tileX, tileY, out);\n
    "},{"location":"board/#world-position-tile-position","title":"World position -> tile position","text":"
    var tileXY = board.worldXYToTileXY(worldX, worldY);  // tileXY: {x, y}\n// var out = board.worldXYToTileXY(worldX, worldY, out);\n
    "},{"location":"board/#world-position-grid-world-position","title":"World position -> Grid world position","text":"
    var gridWorldXY = board.worldXYSnapToGrid(worldX, worldY);\n// var out = board.worldXYSnapToGrid(worldX, worldY, out);\n
    "},{"location":"board/#grid-distance","title":"Grid distance","text":"
    var distance = board.getDistance(tileA, tileB);\n
    "},{"location":"board/#ring-tile-position","title":"Ring -> tile position","text":""},{"location":"board/#ring-chess","title":"Ring -> chess","text":""},{"location":"board/#shape-tile-position","title":"Shape -> tile position","text":""},{"location":"board/#line-tile-position","title":"Line -> tile position","text":"

    Get array of tile position along a line defined via (startWorldX, startWorldY) to (endWorldX, endWorldY)

    var out = board.lineToTileXYArray(startWorldX, startWorldY, endWorldX, endWorldY);\n// var out = board.lineToTileXYArray(startWorldX, startWorldY, endWorldX, endWorldY, out);\n

    or

    var out = board.lineToTileXYArray(line);\n// var out = board.lineToTileXYArray(line, out);\n
    "},{"location":"board/#circle-tile-position","title":"Circle -> tile position","text":"

    Get array of tile position inside a circle shape

    var out = board.circleToTileXYArray(circle);\n// var out = board.circleToTileXYArray(circle, out);\n// var out = board.circleToTileXYArray(circle, testMode, out);\n
    "},{"location":"board/#rectangle-tile-position","title":"Rectangle -> tile position","text":"

    Get array of tile position inside a rectangle shape

    var out = board.rectangleToTileXYArray(rectangle);\n// var out = board.rectangleToTileXYArray(rectangle, out);\n// var out = board.rectangleToTileXYArray(rectangle, testMode, out);\n
    "},{"location":"board/#ellipse-tile-position","title":"Ellipse -> tile position","text":"

    Get array of tile position inside a ellipse shape

    var out = board.ellipseToTileXYArray(ellipse);\n// var out = board.ellipseToTileXYArray(ellipse, out);\n// var out = board.ellipseToTileXYArray(ellipse, testMode, out);\n
    "},{"location":"board/#triangle-tile-position","title":"Triangle -> tile position","text":"

    Get array of tile position inside a triangle shape

    var out = board.triangleToTileXYArray(triangle);\n// var out = board.triangleToTileXYArray(triangle, out);\n// var out = board.triangleToTileXYArray(triangle, testMode, out);\n
    "},{"location":"board/#polygon-tile-position","title":"Polygon -> tile position","text":"

    Get array of tile position inside a polygon shape

    var out = board.polygonToTileXYArray(polygon);\n// var out = board.polygonToTileXYArray(polygon, out);\n// var out = board.polygonToTileXYArray(polygon, testMode, out);\n
    "},{"location":"board/#angle-between-world-position-of-2-tiles","title":"Angle between world position of 2 tiles","text":"
    var radian = board.angleBetween(tileA, tileB);\n
    "},{"location":"board/#is-angle-in-cone","title":"Is angle in cone","text":"
    var isInCone = board.isAngleInCone(chessA, chessB, face, cone);\n
    "},{"location":"board/#direction-between-2-tiles","title":"Direction between 2 tiles","text":"
    var direction = board.directionBetween(chessA, chessB);\n
    var direction = board.directionBetween(chessA, chessB, false);\n
    "},{"location":"board/#is-direction-in-cone","title":"Is direction in cone","text":"
    var isInCone = board.isDirectionInCone(chessA, chessB, face, cone);\n
    "},{"location":"board/#opposite-direction","title":"Opposite direction","text":"
    var direction = board.getOppositeDirection(tileX, tileY, direction);\n

    or

    var direction = board.getOppositeDirection(tileXY, direction);\n
    "},{"location":"board/#angle-snap-to-direction","title":"Angle snap to direction","text":"
    var direction = board.angleSnapToDirection(tileXY, angle);\n
    "},{"location":"board/#align-world-position-to-grid","title":"Align world position to grid","text":""},{"location":"board/#is-overlapping-with-world-position","title":"Is overlapping with world position","text":"
    var isOverlapping = board.isOverlappingPoint(worldX, worldY);\n

    or

    var isOverlapping = board.isOverlappingPoint(worldX, worldY, tileZ);\n
    "},{"location":"board/#neighbors","title":"Neighbors","text":""},{"location":"board/#neighbor-tile-position","title":"Neighbor tile position","text":""},{"location":"board/#neighbor-chess","title":"Neighbor chess","text":""},{"location":"board/#map-neighbor-tile-position","title":"Map neighbor tile position","text":"
    var newArray = board.mapNeighbors(chess, function(neighborTileXY, index, neighborTileXYArray){\nreturn {};\n}, scope);\n

    or

    var newArray = board.mapNeighbors(chess, distance, function(neighborTileXY, index, neighborTileXYArray){\nreturn {};\n}, scope);\n
    "},{"location":"board/#tile-at-direction","title":"Tile at direction","text":""},{"location":"board/#empty-tile-position","title":"Empty tile position","text":""},{"location":"board/#get-all-chess","title":"Get all chess","text":"
    var chessArray = board.getAllChess();\n
    "},{"location":"board/#fit","title":"Fit","text":"
    var out = board.fit(tileXYArray);\n

    Offset all of tile positions to (0, 0), and set board size to fit these tile positions.

    "},{"location":"board/#blocker","title":"Blocker","text":""},{"location":"board/#touch-events","title":"Touch events","text":""},{"location":"board/#set-interactive","title":"Set interactive","text":""},{"location":"board/#touch-zone","title":"Touch Zone","text":""},{"location":"board/#pointer-down","title":"Pointer down","text":""},{"location":"board/#pointer-up","title":"Pointer up","text":""},{"location":"board/#pointer-move","title":"Pointer move","text":""},{"location":"board/#pointer-over","title":"Pointer over","text":""},{"location":"board/#pointer-out","title":"Pointer out","text":""},{"location":"board/#tap","title":"Tap","text":""},{"location":"board/#press","title":"Press","text":""},{"location":"board/#swipe","title":"Swipe","text":""},{"location":"board/#grid-points","title":"Grid points","text":""},{"location":"board/#bounds","title":"Bounds","text":""},{"location":"board/#board-bounds","title":"Board bounds","text":""},{"location":"board/#grid-bounds","title":"Grid bounds","text":""},{"location":"board/#get-board","title":"Get Board","text":""},{"location":"board/#other-properties","title":"Other properties","text":""},{"location":"bounds/","title":"Bounds","text":""},{"location":"bounds/#introduction","title":"Introduction","text":"

    Clamp game object inside target bounds.

    "},{"location":"bounds/#live-demos","title":"Live demos","text":""},{"location":"bounds/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"bounds/#install-plugin","title":"Install plugin","text":""},{"location":"bounds/#load-minify-file","title":"Load minify file","text":""},{"location":"bounds/#import-plugin","title":"Import plugin","text":""},{"location":"bounds/#import-class","title":"Import class","text":""},{"location":"bounds/#create-instance","title":"Create instance","text":"
    var bounds = scene.plugins.get('rexBounds').add(gameObject, {\n// target: undefined,\n// bounds: undefined,\n// enable: true,\n// alignMode: 0\n});\n
    "},{"location":"bounds/#target-game-object","title":"Target game object","text":""},{"location":"bounds/#target-bounds","title":"Target bounds","text":""},{"location":"bounds/#enable","title":"Enable","text":""},{"location":"bounds/#align-mond","title":"Align mond","text":""},{"location":"bounds/#hit-result","title":"Hit result","text":""},{"location":"bounds/#event","title":"Event","text":""},{"location":"bracketparser/","title":"Bracket parser","text":""},{"location":"bracketparser/#introduction","title":"Introduction","text":"

    A lite-weight delimiter parser.

    "},{"location":"bracketparser/#live-demoes","title":"Live demoes","text":""},{"location":"bracketparser/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"bracketparser/#install-plugin","title":"Install plugin","text":""},{"location":"bracketparser/#load-minify-file","title":"Load minify file","text":""},{"location":"bracketparser/#import-plugin","title":"Import plugin","text":""},{"location":"bracketparser/#import-class","title":"Import class","text":""},{"location":"bracketparser/#create-instance","title":"Create instance","text":"
    var parser = scene.plugins.get('rexBracketParser').add({\n// delimiters: '<>', // or ['<', '>']\n// valueConvert: true,\n// translateTagNameCallback: undefined,\n});\n
    "},{"location":"bracketparser/#tag-and-content","title":"Tag and content","text":"

    Assume that left-delimiter and right-delimiter is '<>'

    "},{"location":"bracketparser/#start-parsing","title":"Start parsing","text":"
    parser.start(text);\n

    These events will be emitted under this method.

    "},{"location":"bracketparser/#pause","title":"Pause","text":"

    Invoke this method during tag-start,tag-end, or content events to suspend parsing.

    "},{"location":"bracketparser/#resume","title":"Resume","text":"
    parser.next();\n
    "},{"location":"bracketparser/#skip-any-tag-startany-tag-end-event","title":"Skip any-tag-start/any-tag-end event","text":"
    parser.skipEvent();\n

    When getting a tag-start, or a tag-end event, parser will emitts

    Invoke this medthod under '+TAG', or '-TAG' event to skip '+', or '-' event.

    "},{"location":"bracketparser/#status","title":"Status","text":""},{"location":"bracketparser/#events","title":"Events","text":""},{"location":"bracketparser/#tagscontent","title":"Tags/Content","text":""},{"location":"bracketparser/#control-flow","title":"Control flow","text":""},{"location":"bracketparser2/","title":"Bracket parser 2","text":""},{"location":"bracketparser2/#introduction","title":"Introduction","text":"

    A lite-weight delimiter parser.

    "},{"location":"bracketparser2/#live-demoes","title":"Live demoes","text":""},{"location":"bracketparser2/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"bracketparser2/#install-plugin","title":"Install plugin","text":""},{"location":"bracketparser2/#load-minify-file","title":"Load minify file","text":""},{"location":"bracketparser2/#import-plugin","title":"Import plugin","text":""},{"location":"bracketparser2/#import-class","title":"Import class","text":""},{"location":"bracketparser2/#create-instance","title":"Create instance","text":"
    var parser = scene.plugins.get('rexBracketParser').add({\n// delimiters: '<>', // or ['<', '>']\n// valueConvert: true,\n// translateTagNameCallback: undefined,\n});\n
    "},{"location":"bracketparser2/#tag-and-content","title":"Tag and content","text":"

    Assume that left-delimiter and right-delimiter is '<>'

    "},{"location":"bracketparser2/#start-parsing","title":"Start parsing","text":"
    parser.start(text);\n

    These events will be emitted under this method.

    "},{"location":"bracketparser2/#pause","title":"Pause","text":"

    Invoke this method during tag-start,tag-end, or content events to suspend parsing.

    "},{"location":"bracketparser2/#resume","title":"Resume","text":"
    parser.next();\n
    "},{"location":"bracketparser2/#skip-any-tag-startany-tag-end-event","title":"Skip any-tag-start/any-tag-end event","text":"
    parser.skipEvent();\n

    When getting a tag-start, or a tag-end event, parser will emitts

    Invoke this medthod under '+TAG', or '-TAG' event to skip '+', or '-' event.

    "},{"location":"bracketparser2/#status","title":"Status","text":""},{"location":"bracketparser2/#events","title":"Events","text":""},{"location":"bracketparser2/#tagscontent","title":"Tags/Content","text":""},{"location":"bracketparser2/#control-flow","title":"Control flow","text":""},{"location":"bracketparser2/#compare-with-bracket-parser","title":"Compare with bracket-parser","text":"

    Tag format in

    "},{"location":"buffdata/","title":"Buff data","text":""},{"location":"buffdata/#introduction","title":"Introduction","text":"

    Data manager with buffs, extends from built-in data manager.

    "},{"location":"buffdata/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"buffdata/#install-plugin","title":"Install plugin","text":""},{"location":"buffdata/#load-minify-file","title":"Load minify file","text":""},{"location":"buffdata/#import-plugin","title":"Import plugin","text":""},{"location":"buffdata/#import-class","title":"Import class","text":""},{"location":"buffdata/#create-instance","title":"Create instance","text":"
    var data = scene.plugins.get('rexBuffData').add(parent);\n// var data = scene.plugins.get('rexBuffData').add(parent, eventEmitter);\n
    "},{"location":"buffdata/#extend-existing-data-manager","title":"Extend existing data manager","text":"
    var data = scene.plugins.get('rexBuffData').extend(data);\n
    "},{"location":"buffdata/#buff","title":"Buff","text":"

    A value is composed of baseValue, and some buffs, clamped by min, max values.

    "},{"location":"buildarcadeobject/","title":"Build arcade object","text":""},{"location":"buildarcadeobject/#introduction","title":"Introduction","text":"

    Create arcade body, and inject arcade object methods.

    "},{"location":"buildarcadeobject/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"buildarcadeobject/#install-plugin","title":"Install plugin","text":""},{"location":"buildarcadeobject/#load-minify-file","title":"Load minify file","text":""},{"location":"buildarcadeobject/#import-plugin","title":"Import plugin","text":""},{"location":"buildarcadeobject/#import-class","title":"Import class","text":""},{"location":"buildarcadeobject/#inject-arcade-object-methods","title":"Inject arcade object methods","text":""},{"location":"bullet/","title":"Bullet","text":""},{"location":"bullet/#introduction","title":"Introduction","text":"

    Move game object toward current angle of game object, with a constant speed.

    "},{"location":"bullet/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"bullet/#install-plugin","title":"Install plugin","text":""},{"location":"bullet/#load-minify-file","title":"Load minify file","text":""},{"location":"bullet/#import-plugin","title":"Import plugin","text":""},{"location":"bullet/#import-class","title":"Import class","text":""},{"location":"bullet/#create-instance","title":"Create instance","text":"
    var bullet = scene.plugins.get('rexBullet').add(gameObject, {\nspeed: 200,\n// wrap: false,\n// padding: 0,\n// enable: true,\n\n// angle: undefined,\n// rotation: undefined\n});\n
    "},{"location":"bullet/#speed","title":"Speed","text":""},{"location":"bullet/#set-wrap-mode","title":"Set wrap mode","text":"
    bullet.setWrapMode(wrap, padding);\n
    "},{"location":"bullet/#angle","title":"Angle","text":""},{"location":"button/","title":"Button","text":""},{"location":"button/#introduction","title":"Introduction","text":"

    Fires 'click' event when touch releasd after pressed.

    "},{"location":"button/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"button/#install-plugin","title":"Install plugin","text":""},{"location":"button/#load-minify-file","title":"Load minify file","text":""},{"location":"button/#import-plugin","title":"Import plugin","text":""},{"location":"button/#import-class","title":"Import class","text":""},{"location":"button/#create-instance","title":"Create instance","text":"
    var button = scene.plugins.get('rexButton').add(gameObject, {\n// enable: true,\n// mode: 1,              // 0|'press'|1|'release'\n// clickInterval: 100    // ms\n// threshold: undefined\n});\n
    "},{"location":"button/#events","title":"Events","text":""},{"location":"button/#enable","title":"Enable","text":""},{"location":"button/#set-mode","title":"Set mode","text":"
    button.setMode(mode);\n
    "},{"location":"button/#set-click-interval","title":"Set click interval","text":"
    button.setClickInterval(interval);  // interval in ms\n
    "},{"location":"button/#set-dragging-threshold","title":"Set dragging threshold","text":"
    button.setDragThreshold(distance);  // distance in pixels\n
    "},{"location":"camera-controllor/","title":"Controllor","text":""},{"location":"camera-controllor/#introduction","title":"Introduction","text":"

    Scroll/zoom camera.

    "},{"location":"camera-controllor/#usage","title":"Usage","text":""},{"location":"camera-controllor/#setup","title":"Setup","text":"
    1. Create controllor
      // var cursors = scene.input.keyboard.createCursorKeys();\nvar controls = new Phaser.Cameras.Controls.SmoothedKeyControl({\ncamera: camera,\n\nleft: cursors.left,    // { isDown, isUp }\nright: cursors.right,  // { isDown, isUp }\nup: cursors.up,        // { isDown, isUp }\ndown: cursors.down,    // { isDown, isUp }\nzoomIn: null,          // { isDown, isUp }\nzoomOut: null,         // { isDown, isUp }\n\nzoomSpeed: 0.01,\nminZoom: 0.001,\nmaxZoom: 1000,\n\nacceleration: null,\n// acceleration: {\n//    x: 0,\n//    y: 0\n// }\n\ndrag: null,\n// drag: {\n//    x: 0,\n//    y: 0\n// }\n\nmaxSpeed: null\n// maxSpeed: {\n//    x: 0,\n//    y: 0\n// }\n});\n
      or
      var controls = new Phaser.Cameras.Controls.FixedKeyControl(config);\n
    2. Update
      scene.update = function (time, delta) {\ncontrols.update(delta);\n}\n
    "},{"location":"camera-controllor/#other-methods","title":"Other methods","text":""},{"location":"camera-effects/","title":"Effects","text":""},{"location":"camera-effects/#introduction","title":"Introduction","text":"

    Effects of camera.

    "},{"location":"camera-effects/#usage","title":"Usage","text":""},{"location":"camera-effects/#fade","title":"Fade","text":""},{"location":"camera-effects/#events","title":"Events","text":"
    camera.on('camerafadeincomplete', camera, fade);\n
    camera.on('camerafadeoutcomplete', camera, fade);\n
    "},{"location":"camera-effects/#flash","title":"Flash","text":"
    camera.flash(duration);   // duration in ms\n// camera.flash(duration, red, green, blue, force, callback, context);\n
    "},{"location":"camera-effects/#events_1","title":"Events","text":"
    camera.on('cameraflashstart', camera, flash, duration, red, green, blue);\n
    camera.on('cameraflashcomplete', camera, flash);\n
    "},{"location":"camera-effects/#shake","title":"Shake","text":"
    camera.shake(duration);   // duration in ms\n// camera.shake(duration, intensity, force, callback, context);  // callback: invoked when completed\n
    "},{"location":"camera-effects/#events_2","title":"Events","text":"
    camera.on('camerashakestart', camera, shake, duration, intensity);\n
    camera.on('camerashakecomplete', camera, shake);\n
    "},{"location":"camera-effects/#pan","title":"Pan","text":"
    camera.pan(x, y, duration);   // duration in ms\n// camera.pan(x, y, duration, ease, force, callback, context);\n
    "},{"location":"camera-effects/#events_3","title":"Events","text":"
    camera.on('camerapanstart', camera, pan, duration, x, y);\n
    camera.on('camerapancomplete', camera, pan);\n
    "},{"location":"camera-effects/#zoom","title":"Zoom","text":"
    camera.zoomTo(zoomValue, duration);   // duration in ms\n// camera.zoomTo(zoomValue, duration, ease, force, callback, context);\n
    "},{"location":"camera-effects/#events_4","title":"Events","text":"
    camera.on('camerazoomstart', camera, zoom, duration, zoomValue);\n
    camera.on('camerazoomcomplete', camera, zoom);\n
    "},{"location":"camera-effects/#rotate-to","title":"Rotate to","text":"
    camera.rotateTo(radians, shortestPath, duration);   // duration in ms\n// camera.rotateTo(radians, shortestPath, duration, ease, force, callback, context);\n
    "},{"location":"camera-effects/#events_5","title":"Events","text":"
    camera.on('camerarotatestart', camera, rotateTo, duration, angle);\n
    camera.on('camerarotatecomplete', camera, rorotateTotate);\n
    "},{"location":"camera-effects/#mask","title":"Mask","text":"

    More detail about mask

    "},{"location":"camera-shader-effect/","title":"Shader effect","text":""},{"location":"camera-shader-effect/#introduction","title":"Introduction","text":"

    Shader effect of camera.

    "},{"location":"camera-shader-effect/#usage","title":"Usage","text":""},{"location":"camera-shader-effect/#register-post-fx-pipeline","title":"Register post-fx pipeline","text":"

    Some post-fx pipelines:

    "},{"location":"camera-shader-effect/#add-post-fx-pipeline","title":"Add post-fx pipeline","text":"
    camera.setPostPipeline(PostFxClass);\n
    "},{"location":"camera-shader-effect/#remove-post-fx-pipeline","title":"Remove post-fx pipeline","text":""},{"location":"camera-shader-effect/#get-post-fx-pipeline","title":"Get post-fx pipeline","text":"
    var pipelineInstance = camera.getPostPipeline(PostFxClass);\n
    "},{"location":"camera-shader-effect/#add-effect-properties","title":"Add effect properties","text":"

    See Add effect properties behavior

    "},{"location":"camera/","title":"Camera","text":""},{"location":"camera/#introduction","title":"Introduction","text":"

    Camera to display game objects, built-in object of phaser.

    "},{"location":"camera/#usage","title":"Usage","text":""},{"location":"camera/#get-camera","title":"Get camera","text":"

    Each scene has one or more cameras.

    "},{"location":"camera/#create-cameras-from-json","title":"Create cameras from JSON","text":"
    scene.cameras.fromJSON(config);\n// scene.cameras.fromJSON(configArray);\n
    "},{"location":"camera/#remove-camera","title":"Remove camera","text":"
    scene.cameras.remove(camera);\n
    "},{"location":"camera/#destroy-camera","title":"Destroy camera","text":"
    camera.destroy();\n
    "},{"location":"camera/#view-port","title":"View port","text":""},{"location":"camera/#zoom","title":"Zoom","text":""},{"location":"camera/#rotation","title":"Rotation","text":""},{"location":"camera/#origin","title":"Origin","text":""},{"location":"camera/#visible","title":"Visible","text":"

    A visible camera will render and perform input tests. An invisible camera will not render anything and will skip input tests.

    camera.setVisible(value);\n// camera.visible = value\n
    var visible = camera.visible;\n
    "},{"location":"camera/#alpha","title":"Alpha","text":"
    camera.setAlpha(value);\n// camera.alpha = value;\n
    var alpha = camera.alpha;\n
    "},{"location":"camera/#scroll","title":"Scroll","text":"
    camera.setScroll(x, y)\n
    camera.scrollX = scrollX;\ncamera.scrollY = scrollY;\n
    camera.centerToBounds();\n
    camera.centerOn(x, y);  // centered on the given coordinates\n
    camera.centerOnX(x);\ncamera.centerOnY(y);\n
    camera.centerToSize();\n
    "},{"location":"camera/#follow-game-object","title":"Follow game object","text":""},{"location":"camera/#events","title":"Events","text":""},{"location":"camera/#scroll-factor","title":"Scroll factor","text":"

    See Scroll factor in game object.

    "},{"location":"camera/#bounds","title":"Bounds","text":""},{"location":"camera/#world-coordinates","title":"World coordinates","text":""},{"location":"camera/#set-background-color","title":"Set background color","text":"
    camera.setBackgroundColor(color);\n
    "},{"location":"camera/#ignore-game-object","title":"Ignore game object","text":"

    Ignored game objects won't show at that camera.

    camera.ignore(gameObject);\n
    "},{"location":"camera/#get-cameras-below-pointer","title":"Get cameras below pointer","text":"
    var cameras = scene.cameras.getCamerasBelowPointer(pointer);\n
    "},{"location":"camera/#pause-resume","title":"Pause, resume","text":""},{"location":"camera/#clear","title":"Clear","text":"
    camera.clearRenderToTexture();\n
    "},{"location":"camera/#children","title":"Children","text":""},{"location":"camera/#visible-children","title":"Visible children","text":"

    See also: gameObject.willRender(camera)

    "},{"location":"camera/#render-children","title":"Render children","text":"
    var children = camera.renderList;\n

    Read only.

    "},{"location":"canvas-circularprogress/","title":"Circular progres","text":""},{"location":"canvas-circularprogress/#introduction","title":"Introduction","text":"

    Circular progress bar on canvas.

    "},{"location":"canvas-circularprogress/#live-demos","title":"Live demos","text":""},{"location":"canvas-circularprogress/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvas-circularprogress/#install-plugin","title":"Install plugin","text":""},{"location":"canvas-circularprogress/#load-minify-file","title":"Load minify file","text":""},{"location":"canvas-circularprogress/#import-plugin","title":"Import plugin","text":""},{"location":"canvas-circularprogress/#import-class","title":"Import class","text":""},{"location":"canvas-circularprogress/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexCircularProgressCanvasPlugin',\nplugin: CircularProgressCanvasPlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"canvas-circularprogress/#create-instance","title":"Create instance","text":"
    var circularProgress = scene.add.rexCircularProgressCanvas(x, y, radius, barColor, value, {\ntrackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\n\ntextColor: undefined,\ntextStrokeColor: undefined,\ntextStrokeThickness: undefined,\n// textFont: ,\ntextSize: '16px',\ntextFamily: 'Courier',\ntextStyle: '',\ntextFormatCallback: undefined,\ntextFormatCallbackScope: undefined,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},\n});\n

    or

    var circularProgress = scene.add.rexCircularProgressCanvas({\nx: 0,\ny: 0,\nradius: 1,\n\nbarColor: undefined,\ntrackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\n\ntextColor: undefined,\ntextStrokeColor: undefined,\ntextStrokeThickness: undefined,\n// textFont: ,\ntextSize: '16px',\ntextFamily: 'Courier',\ntextStyle: '',\ntextFormatCallback: undefined,\ntextFormatCallbackScope: undefined,\n\nvalue: 0,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},\n});\n

    Add circular-progress from JSON

    var circularProgress = scene.make.rexCircularProgressCanvas({\nx: 0,\ny: 0,\nradius: 1,\n\nbarColor: undefined,\ntrackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\n\ntextColor: undefined,\ntextStrokeColor: undefined,\ntextStrokeThickness: undefined,\ntextSize: '16px',\ntextFamily: 'Courier',\ntextStyle: '',\ntextFormatCallback: undefined,\ntextFormatCallbackScope: undefined,\n\nvalue: 0,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},\n\nadd: true\n});\n
    "},{"location":"canvas-circularprogress/#custom-class","title":"Custom class","text":""},{"location":"canvas-circularprogress/#progress-value","title":"Progress value","text":""},{"location":"canvas-circularprogress/#ease-progress-value","title":"Ease progress value","text":""},{"location":"canvas-circularprogress/#radius","title":"Radius","text":""},{"location":"canvas-circularprogress/#circular-track","title":"Circular track","text":""},{"location":"canvas-circularprogress/#circular-bar","title":"Circular bar","text":""},{"location":"canvas-circularprogress/#center-circle","title":"Center circle","text":""},{"location":"canvas-circularprogress/#display-text","title":"Display text","text":""},{"location":"canvas-circularprogress/#events","title":"Events","text":""},{"location":"canvas-circularprogress/#compare-with-circular-progress-shape","title":"Compare with Circular-progress shape","text":""},{"location":"canvas-data/","title":"Canvas image data","text":""},{"location":"canvas-data/#introduction","title":"Introduction","text":"

    Get image data from texture, or text object.

    "},{"location":"canvas-data/#live-demos","title":"Live demos","text":""},{"location":"canvas-data/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvas-data/#install-plugin","title":"Install plugin","text":""},{"location":"canvas-data/#load-minify-file","title":"Load minify file","text":""},{"location":"canvas-data/#import-plugin","title":"Import plugin","text":""},{"location":"canvas-data/#import-class","title":"Import class","text":""},{"location":"canvas-data/#textcanvas-object-bitmap","title":"Text/canvas object -> Bitmap","text":"
    var canvasData = scene.plugins.get('rexCanvasData').canvasObjectToBitmap(gameObject);\n// var out = scene.plugins.get('rexCanvasData').canvasObjectToBitmap(gameObject, out);\n
    "},{"location":"canvas-data/#texture-color-map","title":"Texture -> Color map","text":""},{"location":"canvas-data/#canvas-data","title":"Canvas data","text":""},{"location":"canvas-data/#for-each-pixel","title":"For each pixel","text":""},{"location":"canvas-data/#get-pixel-data","title":"Get pixel data","text":"
    var data = canvasData.get(x, y);\n
    "},{"location":"canvas-data/#size","title":"Size","text":"
    var width = canvasData.width;\nvar height = canvasData.height;\n
    "},{"location":"canvas-lineprogress/","title":"Line progres","text":""},{"location":"canvas-lineprogress/#introduction","title":"Introduction","text":"

    Horizontal line progress bar filled with gradient color on canvas.

    "},{"location":"canvas-lineprogress/#live-demos","title":"Live demos","text":""},{"location":"canvas-lineprogress/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvas-lineprogress/#install-plugin","title":"Install plugin","text":""},{"location":"canvas-lineprogress/#load-minify-file","title":"Load minify file","text":""},{"location":"canvas-lineprogress/#import-plugin","title":"Import plugin","text":""},{"location":"canvas-lineprogress/#import-class","title":"Import class","text":""},{"location":"canvas-lineprogress/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexLineProgressCanvasPlugin',\nplugin: LineProgressCanvasPlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"canvas-lineprogress/#create-instance","title":"Create instance","text":"
    var lineProgress = scene.add.rexLineProgressCanvas(x, y, width, height, barColor, value, {    barColor2: undefined,\nisHorizontalGradient: true,\ntrackColor: undefined,\ntrackStrokeColor: undefined,\ntrackStrokeThickness: 2,\n\nskewX:0,\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, lineProgress) {\n},\n});\n

    or

    var lineProgress = scene.add.rexLineProgressCanvas({\nx: 0,\ny: 0,\nwidth: 2,\nheight: 2,\n\nbarColor: undefined,\nbarColor2: undefined,\nisHorizontalGradient: true,\ntrackColor: undefined,\ntrackStrokeColor: undefined,\ntrackStrokeThickness: 2,\n\nskewX:0,\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvalue: 0,\nvaluechangeCallback: function(newValue, oldValue, lineProgress) {\n},\n});\n

    Add line-progress from JSON

    var lineProgress = scene.make.rexLineProgressCanvas({\nx: 0,\ny: 0,\nwidth: 2,\nheight: 2,\n\nbarColor: undefined,\nbarColor2: undefined,\nisHorizontalGradient: true,\ntrackColor: undefined,\ntrackStrokeColor: undefined,\ntrackStrokeThickness: 2,\n\nskewX:0,\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvalue: 0,\nvaluechangeCallback: function(newValue, oldValue, lineProgress) {\n},\n\nadd: true\n});\n
    "},{"location":"canvas-lineprogress/#custom-class","title":"Custom class","text":""},{"location":"canvas-lineprogress/#progress-value","title":"Progress value","text":""},{"location":"canvas-lineprogress/#ease-progress-value","title":"Ease progress value","text":""},{"location":"canvas-lineprogress/#line-track","title":"Line track","text":""},{"location":"canvas-lineprogress/#line-bar","title":"Line bar","text":""},{"location":"canvas-lineprogress/#horizontal-skew","title":"Horizontal skew","text":""},{"location":"canvas-lineprogress/#right-to-left","title":"Right-to-left","text":""},{"location":"canvas-lineprogress/#events","title":"Events","text":""},{"location":"canvas-lineprogress/#alpha","title":"Alpha","text":""},{"location":"canvas-lineprogress/#compare-with-line-progress-shape","title":"Compare with Line-progress shape","text":""},{"location":"canvas-roundrectangle/","title":"Round rectangle","text":""},{"location":"canvas-roundrectangle/#introduction","title":"Introduction","text":"

    Round rectangle on canvas.

    "},{"location":"canvas-roundrectangle/#live-demos","title":"Live demos","text":""},{"location":"canvas-roundrectangle/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvas-roundrectangle/#install-plugin","title":"Install plugin","text":""},{"location":"canvas-roundrectangle/#load-minify-file","title":"Load minify file","text":""},{"location":"canvas-roundrectangle/#import-plugin","title":"Import plugin","text":""},{"location":"canvas-roundrectangle/#import-class","title":"Import class","text":""},{"location":"canvas-roundrectangle/#create-shape-object","title":"Create shape object","text":"
    var rect = scene.add.rexRoundRectangleCanvas(x, y, width, height, radiusConfig, fillStyle, strokeStyle, lineWidth, fillColor2, isHorizontalGradient);\n

    Note

    If radius >= 0, draw convex corner, else draw concave corner

    "},{"location":"canvas-roundrectangle/#deform","title":"Deform","text":""},{"location":"canvas-roundrectangle/#custom-class","title":"Custom class","text":""},{"location":"canvas-roundrectangle/#color","title":"Color","text":""},{"location":"canvas-roundrectangle/#size","title":"Size","text":""},{"location":"canvas-roundrectangle/#radius","title":"Radius","text":""},{"location":"canvas-roundrectangle/#iteration","title":"Iteration","text":"

    Number of interpolation points in each round corner. Default value is 4.

    "},{"location":"canvas-roundrectangle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"canvas-roundrectangle/#compare-with-shape-roundrectangle","title":"Compare with Shape-Roundrectangle","text":""},{"location":"canvas-texture/","title":"Canvas texture","text":""},{"location":"canvas-texture/#introduction","title":"Introduction","text":"

    Canvas Canvas Texture stored in texture cache, built-in object of phaser.

    "},{"location":"canvas-texture/#usage","title":"Usage","text":""},{"location":"canvas-texture/#create-canvas-texture","title":"Create canvas texture","text":"
    var texture = scene.textures.createCanvas(key, width, height);\n
    "},{"location":"canvas-texture/#get-canvas-element","title":"Get canvas element","text":"
    var canvas = texture.getCanvas();\nvar context = texture.getContext();\n

    Canvas api

    "},{"location":"canvas-texture/#draw-frame","title":"Draw frame","text":"
    texture.drawFrame(key, frame, x, y);\n// texture.drawFrame(key, frame, x, y, update);\n
    "},{"location":"canvas-texture/#draw-image","title":"Draw image","text":"
    texture.draw(x, y, source);\n// texture.draw(x, y, source, update);\n
    "},{"location":"canvas-texture/#clear","title":"Clear","text":"
    texture.clear();\n
    texture.clear(x, y, width, height);\n// // texture.clear(x, y, width, height, update);\n
    "},{"location":"canvas-texture/#refresh-texture","title":"Refresh texture","text":"
    texture.refresh();\n
    "},{"location":"canvas-texture/#color","title":"Color","text":""},{"location":"canvas-texture/#image-data","title":"Image data","text":""},{"location":"canvas-texture/#add-frame","title":"Add frame","text":"
    texture.add(name, sourceIndex, x, y, width, height);\n
    "},{"location":"canvas/","title":"Canvas","text":""},{"location":"canvas/#introduction","title":"Introduction","text":"

    Drawing on canvas.

    "},{"location":"canvas/#live-demos","title":"Live demos","text":""},{"location":"canvas/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvas/#install-plugin","title":"Install plugin","text":""},{"location":"canvas/#load-minify-file","title":"Load minify file","text":""},{"location":"canvas/#import-plugin","title":"Import plugin","text":""},{"location":"canvas/#import-class","title":"Import class","text":""},{"location":"canvas/#create-instance","title":"Create instance","text":"
    var canvas = scene.add.rexCanvas(x, y, width, height);\n

    Add canvas from JSON

    var canvas = scene.make.rexCanvas({\nx: 0,\ny: 0,\nwidth: 256,\nheight: 256,\n\n// origin: {x: 0.5, y: 0.5},\n// fill: null,\n\nadd: true\n});\n
    "},{"location":"canvas/#custom-class","title":"Custom class","text":""},{"location":"canvas/#clear-or-fill-canvas","title":"Clear or fill canvas","text":""},{"location":"canvas/#update-canvas","title":"Update canvas","text":"
    1. Get canvas elemet
      var canvasElem = canvas.getCanvas();\nvar context = canvas.getContext();\n
      or
      var canvaesElem = canvas.canvas;\nvar context = canvas.context;\n
    2. Draw on context
    "},{"location":"canvas/#update-display-texture","title":"Update display texture","text":""},{"location":"canvas/#load-or-save-texture","title":"Load or save texture","text":""},{"location":"canvas/#paste-frame","title":"Paste frame","text":"
    canvas.drawFrame(key, frame);\n// canvas.drawFrame(key, frame, dx, dy, dWidth, dHeight);\n// canvas.drawFrame(key, frame, dx, dy, dWidth, dHeight, sxOffset, syOffset, sWidth, sHeight);\n
    "},{"location":"canvas/#data-url","title":"Data URL","text":""},{"location":"canvas/#file","title":"File","text":""},{"location":"canvas/#pixel-color","title":"Pixel color","text":""},{"location":"canvas/#size","title":"Size","text":"
    canvas.setCanvasSize(width, height);\n

    or

    canvas.setSize(width, height);\n

    or

    canvas.resize(width, height);\n
    "},{"location":"canvas/#compare-with-graphics-object","title":"Compare with Graphics object","text":""},{"location":"canvasframemanager/","title":"Canvas frame manager","text":""},{"location":"canvasframemanager/#introduction","title":"Introduction","text":"

    Generate bitmapfont from text game object, or bbcode text game object.

    "},{"location":"canvasframemanager/#live-demos","title":"Live demos","text":""},{"location":"canvasframemanager/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvasframemanager/#install-plugin","title":"Install plugin","text":""},{"location":"canvasframemanager/#load-minify-file","title":"Load minify file","text":""},{"location":"canvasframemanager/#import-plugin","title":"Import plugin","text":""},{"location":"canvasframemanager/#import-class","title":"Import class","text":""},{"location":"canvasframemanager/#create-instance","title":"Create instance","text":"
    var canvasFrames = scene.plugins.get('rexCanvasFrameManager').add(scene, {\nkey: '',\nwidth: 4096,\nheight: 4096,\ncellWidth: 64,\ncellHeight: 64,\nfillColor: undefined\n});\n

    or

    var canvasFrames = scene.plugins.get('rexCanvasFrameManager').add(scene, key, width, height, cellWidth, cellHeight, fillColor);\n

    Steps of generating bitmapfont :

    1. Add frames :
      canvasFrames.paste(frameName, gameObject);\n
    2. Update texture
      canvasFrames.updateTexture();\n
    3. Export frame data to bitmapfont
      canvasFrames.addToBitmapFont();\n
    "},{"location":"canvasframemanager/#add-frame","title":"Add frame","text":""},{"location":"canvasframemanager/#from-game-object","title":"From game object","text":"

    After rendering content on text, bbcode text, canvas

    canvasFrames.paste(frameName, gameObject);\n
    "},{"location":"canvasframemanager/#custom-drawing","title":"Custom drawing","text":"
    canvasFrames.draw(frameName, callback, scope)\n
    "},{"location":"canvasframemanager/#empty-frame","title":"Empty frame","text":"
    canvasFrames.addEmptyFrame(frameName);\n// canvasFrames.addEmptyFrame(frameName, width, height);\n
    "},{"location":"canvasframemanager/#update-texture","title":"Update texture","text":"

    Update texture after adding frames.

    canvasFrames.updateTexture();\n
    "},{"location":"canvasframemanager/#remove-frame","title":"Remove frame","text":"
    canvasFrames.remove(frameName);\n
    "},{"location":"canvasframemanager/#export-to-bitmapfont","title":"Export to bitmapfont","text":"
    canvasFrames.addToBitmapFont();\n
    "},{"location":"canvasframemanager/#destroy-instance","title":"Destroy instance","text":"
    canvasFrames.destroy();\n
    "},{"location":"canvasinput/","title":"Canvas input","text":""},{"location":"canvasinput/#introduction","title":"Introduction","text":"

    An invisible Input DOM element to receive character input and display on DynamicText.

    Inspirited from CanvasInput.

    "},{"location":"canvasinput/#live-demos","title":"Live demos","text":""},{"location":"canvasinput/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvasinput/#install-plugin","title":"Install plugin","text":""},{"location":"canvasinput/#load-minify-file","title":"Load minify file","text":""},{"location":"canvasinput/#import-plugin","title":"Import plugin","text":""},{"location":"canvasinput/#import-class","title":"Import class","text":""},{"location":"canvasinput/#create-instance","title":"Create instance","text":"
    var txt = scene.add.rexCanvasInput({\n// Parameters of DynamicText\nx: 0, y: 0,\nwidth: undefined, height: undefined,\n\npadding: 0,  // {left: 0, right: 0, top: 0, bottom: 0}\n\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null,\n\n// Style when focus\n// 'focus.color': ...\n// 'focus.color2': ...\n// 'focus.stroke': ...\n},\nfocusStyle: undefined,\n\ninnerBounds: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBY: undefined,\noffsetX: 0,\noffsetY: 0,\n\n// Style when cursor move on\n// 'cursor.color': ...\n// 'cursor.backgroundColor': ...\n// 'cursor.xxx': ...\n},\ncursorStyle: undefined,\n\nchildrenInteractive: false,\n\ntext: '',\n\nwrap: {\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0\n},\nlineHeight: undefined,\nuseDefaultLineHeight: true,\nmaxLines: 1,\nwrapWidth: undefined,\nletterSpacing: 0,\nhAlign: 0,\nvAlign: 'center',  // For single line text input\ncharWrap: true,    // For single line text input\n},\n\ntextArea: false,\n\n// Parameters of hidden-text-editor   \n// inputType: 'text',  // 'text'|'password'|'textarea'|...                \n\n// readOnly: false,\n// maxLength: undefined,\n// minLength: undefined,\n// selectAll: false,\n\n// enterClose: true,\n\n// Callbacks\n// onOpen: function (textObject, hiddenInputText) {\n// },\n\n// onClose: function (textObject, hiddenInputText) {\n// },\n\n// onUpdate: function (text, textObject, hiddenInputText) {\n//     return text;\n// },   \n\n// onAddChar: function(child, index, canvasInput) {\n//    child.modifyStyle({...})\n// },\n\n// onCursorOut: function(child, cursorIndex, canvasInput) {\n//     child.modifyStyle({\n//         \n//     });\n// },\n\n// onCursorIn: function(child, cursorIndex, canvasInput) {\n//     child.modifyStyle({\n//         \n//     });\n// },\n\n// parseTextCallback: function(text) {\n//     return text;\n// }.\n\n});\n
    "},{"location":"canvasinput/#number-input","title":"Number input","text":"
    txt.setNumberInput();\n
    "},{"location":"canvasinput/#custom-class","title":"Custom class","text":""},{"location":"canvasinput/#open-editor","title":"Open editor","text":"
    txt.open();\n

    or

    txt.open(onCloseCallback);\n
    "},{"location":"canvasinput/#close-editor","title":"Close editor","text":"
    txt.close();\n
    "},{"location":"canvasinput/#is-opened","title":"Is opened","text":"
    var isOpened = txt.isOpened;\n
    "},{"location":"canvasinput/#read-only","title":"Read only","text":""},{"location":"canvasinput/#text","title":"Text","text":""},{"location":"canvasinput/#value","title":"Value","text":""},{"location":"canvasinput/#size","title":"Size","text":""},{"location":"canvasinput/#events","title":"Events","text":""},{"location":"canvasinput/#select-text","title":"Select text","text":"

    This feature does not support.

    "},{"location":"canvasinput/#bypass-key-input","title":"Bypass key input","text":"

    Registered keyboard events might capture key input.

    var keyObj = scene.input.keyboard.addKey('W', enableCapture, emitOnRepeat);\n

    Set enableCapture to false to bypass key input to this input-text game objecct.

    "},{"location":"canvasinput/#other-properties","title":"Other properties","text":"

    See DynamicText.

    "},{"location":"capitalizes-first/","title":"Capitalizes first","text":""},{"location":"capitalizes-first/#introduction","title":"Introduction","text":"

    Capitalizes the first letter of a string, built-in method of phaser.

    "},{"location":"capitalizes-first/#usage","title":"Usage","text":"
    var result = Phaser.Utils.String.UppercaseFirst(str);\n
    "},{"location":"charactercache/","title":"Character cache","text":""},{"location":"charactercache/#introduction","title":"Introduction","text":"

    Generate bitmapfont from text game object, or bbcode text game object.

    "},{"location":"charactercache/#live-demos","title":"Live demos","text":""},{"location":"charactercache/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"charactercache/#install-plugin","title":"Install plugin","text":""},{"location":"charactercache/#load-minify-file","title":"Load minify file","text":""},{"location":"charactercache/#import-plugin","title":"Import plugin","text":""},{"location":"charactercache/#import-class","title":"Import class","text":""},{"location":"charactercache/#create-instance","title":"Create instance","text":"
    var characterCache = scene.plugins.get('rexCharacterCache').add(scene, {\nkey: '',  cellWidth: 32,\ncellHeight: 32,\nmaxCharacterCount: 4096,\nfreqMode: true,\n\ntextObject: textGameOject,\n\ncontent: '',\n});\n
    "},{"location":"charactercache/#load-characters","title":"Load characters","text":"

    Load characters into bitmap font, replace unused characters if no free character space.

    characterCache.load(content);\n// characterCache.load(content, lock);\n

    Warning

    Console.warn messages if no unused character is found.

    "},{"location":"charactercache/#events","title":"Events","text":""},{"location":"charactercache/#override-bitmaptext","title":"Override bitmaptext","text":"

    Inject characterCache.load(text) into bitmapText.setText(text) method.

    characterCache.overrideBitmapText(bitmapText);\n// var bitmapText = characterCache.overrideBitmapText(bitmapText);\n

    Now setText method has lock parameter : bitmapText.setText(text, lock).

    Or user can override bitmapText.setText by extending Phaser.GameObjects.BitmapText class.

    "},{"location":"charactercache/#unlock-all-characters","title":"Unlock all characters","text":"
    characterCache.unlock();\n
    "},{"location":"charactercache/#get-all-cache-data","title":"Get all cache data","text":"
    var cacheData = characterCache.getAllData();\n
    "},{"location":"charactercache/#destroy-instance","title":"Destroy instance","text":"
    characterCache.destroy();\n
    "},{"location":"charactercache/#properties","title":"Properties","text":""},{"location":"circlemaskimage/","title":"Circle mask image","text":""},{"location":"circlemaskimage/#introduction","title":"Introduction","text":"

    Load a texture, then apply a circle mask. Extended from canvas plugin.

    "},{"location":"circlemaskimage/#live-demos","title":"Live demos","text":""},{"location":"circlemaskimage/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"circlemaskimage/#install-plugin","title":"Install plugin","text":""},{"location":"circlemaskimage/#load-minify-file","title":"Load minify file","text":""},{"location":"circlemaskimage/#import-plugin","title":"Import plugin","text":""},{"location":"circlemaskimage/#import-class","title":"Import class","text":""},{"location":"circlemaskimage/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexCircleMaskImagePlugin',\nplugin: CircleMaskImagePlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"circlemaskimage/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexCircleMaskImage(x, y, key, frame, {\nmaskType: 0,\n// radius: undefined,\n\n// backgroundColor: undefined,\n\n// strokeColor: undefined,\n// strokeWidth: 0,\n});\n

    or

    var image = scene.add.rexCircleMaskImage(x, y, key, {\nmaskType: 0,\n// radius: undefined,\n\n// backgroundColor: undefined,\n\n// strokeColor: undefined,\n// strokeWidth: 0,\n});\n

    Add image from JSON

    var image = scene.make.rexCircleMaskImage({\nx: 0,\ny: 0,\nkey: key,\nframe: name,\nmaskType: 0,\n// radius: undefined\n// origin: {x: 0.5, y: 0.5},\n\n// backgroundColor: undefined,\n\n// strokeColor: undefined,\n// strokeWidth: 0,\n\nadd: true\n});\n
    "},{"location":"circlemaskimage/#custom-class","title":"Custom class","text":""},{"location":"circlemaskimage/#set-texture","title":"Set texture","text":"
    image.setTexture(key, frame);\n// image.setTexture(key, frame, maskType);\n

    or

    image.setTexture(key, frame, {\nmaskType: 0,\n// radius: undefined\n});\n
    "},{"location":"clamp/","title":"Clamp","text":""},{"location":"clamp/#introduction","title":"Introduction","text":"

    Force a value within the boundaries by clamping it to the range min, max, built-in method of phaser.

    "},{"location":"clamp/#usage","title":"Usage","text":"
    var result = Phaser.Math.Clamp(value, min, max);\n
    "},{"location":"clickoutside/","title":"Click outside","text":""},{"location":"clickoutside/#introduction","title":"Introduction","text":"

    Fires 'clickoutside' event when pointer-down or pointer-up outside of game object.

    "},{"location":"clickoutside/#live-demos","title":"Live demos","text":""},{"location":"clickoutside/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"clickoutside/#install-plugin","title":"Install plugin","text":""},{"location":"clickoutside/#load-minify-file","title":"Load minify file","text":""},{"location":"clickoutside/#import-plugin","title":"Import plugin","text":""},{"location":"clickoutside/#import-class","title":"Import class","text":""},{"location":"clickoutside/#create-instance","title":"Create instance","text":"
    var clickOutside = scene.plugins.get('rexClickOutside').add(gameObject, {\n// enable: true,\n// mode: 1,              // 0|'press'|1|'release'\n// clickInterval: 100,   // ms\n// threshold: undefined\n});\n
    "},{"location":"clickoutside/#events","title":"Events","text":""},{"location":"clickoutside/#enable","title":"Enable","text":""},{"location":"clickoutside/#set-mode","title":"Set mode","text":"
    clickOutside.setMode(mode);\n
    "},{"location":"clickoutside/#set-click-interval","title":"Set click interval","text":"
    clickOutside.setClickInterval(interval);  // interval in ms\n
    "},{"location":"clickoutside/#set-dragging-threshold","title":"Set dragging threshold","text":"
    clickOutside.setDragThreshold(distance);  // distance in pixels\n
    "},{"location":"clock/","title":"Clock","text":""},{"location":"clock/#introduction","title":"Introduction","text":"

    A clock to count elapsed time.

    "},{"location":"clock/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"clock/#install-plugin","title":"Install plugin","text":""},{"location":"clock/#load-minify-file","title":"Load minify file","text":""},{"location":"clock/#import-plugin","title":"Import plugin","text":""},{"location":"clock/#import-class","title":"Import class","text":""},{"location":"clock/#create-instance","title":"Create instance","text":"
    var clock = scene.plugins.get('rexClock').add(scene, {\n// timeScale: 1\n});\n
    "},{"location":"clock/#start-counting","title":"Start counting","text":"
    clock.start();\n// clock.start(startAt);  // start-at time in ms\n
    "},{"location":"clock/#force-ticking","title":"Force ticking","text":"
    clock.tick(0);\n// clock.tick(delta);\n
    "},{"location":"clock/#get-elapsed-time","title":"Get elapsed time","text":"
    var now = clock.now;  // Elapsed time in ms\n
    "},{"location":"clock/#pause-resume-stop-counting","title":"Pause, Resume, stop counting","text":"
    clock.pause();\nclock.resume();\nclock.stop();\n
    "},{"location":"clock/#seek-elapsed-time","title":"Seek elapsed time","text":"
    clock.seek(time);   // elapsed time in ms\n
    "},{"location":"clock/#state-of-counting","title":"State of counting","text":"
    var isRunning = clock.isRunning;\n
    "},{"location":"clock/#time-scale","title":"Time-scale","text":""},{"location":"clock/#events","title":"Events","text":""},{"location":"color/","title":"Color","text":""},{"location":"color/#introduction","title":"Introduction","text":"

    Get color value, built-in methods of phaser.

    "},{"location":"color/#usage","title":"Usage","text":""},{"location":"color/#get-color-integer","title":"Get color integer","text":""},{"location":"color/#color-integer-to-rgb","title":"Color integer to RGB","text":"
    var rgb = Phaser.Display.Color.IntegerToRGB(color);\n
    "},{"location":"color/#hsv-color-wheel","title":"HSV color wheel","text":"
    1. Create color array
      var colorArray = Phaser.Display.Color.HSVColorWheel(s, v);\n
    2. Get color
      var color = colorArray[i].color;  // i : 0 ~ 359\n
    "},{"location":"color/#color-object","title":"Color object","text":""},{"location":"color/#create-color-object","title":"Create color object","text":""},{"location":"color/#set-color","title":"Set color","text":""},{"location":"color/#properties","title":"Properties","text":""},{"location":"color/#clone","title":"Clone","text":"
    var newColor = color.clone();\n
    "},{"location":"color/#to-hex-string","title":"To hex string","text":"
    var hexString = Phaser.Display.Color.RGBToString(color.r, color.g, color.b, color.a);\n// var hexString = Phaser.Display.Color.RGBToString(color.r, color.g, color.b, color.a, prefix);\n
    "},{"location":"color/#interpolation","title":"Interpolation","text":"

    Interpolate between 2 colors.

    var colorOut = Phaser.Display.Color.Interpolate.RGBWithRGB(r1, g1, b1, r2, g2, b2, length, index);\nvar colorOut = Phaser.Display.Color.Interpolate.ColorWithColor(color1, color2, length, index);\nvar colorOut = Phaser.Display.Color.Interpolate.ColorWithRGB(color, r, g, b, length, index);\n
    "},{"location":"conditionstable/","title":"CSV Conditions table","text":""},{"location":"conditionstable/#introduction","title":"Introduction","text":"

    Check conditions to find passed tests listed in a csv table.

    "},{"location":"conditionstable/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"conditionstable/#install-plugin","title":"Install plugin","text":""},{"location":"conditionstable/#load-minify-file","title":"Load minify file","text":""},{"location":"conditionstable/#import-plugin","title":"Import plugin","text":""},{"location":"conditionstable/#import-class","title":"Import class","text":""},{"location":"conditionstable/#create-instance","title":"Create instance","text":"
    var table = scene.plugins.get('rexConditionsTable').add();\n
    "},{"location":"conditionstable/#load-table-from-csv-string","title":"Load table from csv string","text":"
    table.loadCSV(csvString, {\n// delimiter: ','\n});\n

    For exameple, csv string

    name A A B Test1 >= 10 <= 20 Test2 3
    ,A,A,B\nTest1,>= 10,<= 20,\nTest2,,,3\n

    means that:

    Test1: (A>=10) && (A<=20)\nTest2: (B==3)\n

    Equations will be evaled by new Function.

    "},{"location":"conditionstable/#test","title":"Test","text":""},{"location":"conditionstable/#get-test-results","title":"Get test results","text":"
    var results = table.getTestResults(context);\n
    "},{"location":"conditionstable/#get-first-pass-test-name","title":"Get first pass test name","text":"
    var testName = table.anyPassTest(context);\n
    "},{"location":"config-data/","title":"Configuration data","text":""},{"location":"config-data/#introduction","title":"Introduction","text":"

    Get parameters from configuration object.

    "},{"location":"config-data/#usage","title":"Usage","text":""},{"location":"config-data/#quick-start","title":"Quick start","text":"
    const GetValue = Phaser.Utils.Objects.GetValue;\nvar myMethod = function(config) {\nvar x = GetValue(config, 'x', 0);\nvar y = GetValue(config, 'y', 0);\nvar width = GetValue(config, 'width', 0);\nvar height = GetValue(config, 'height', 0);\n// ...\n}\n
    "},{"location":"config-data/#get-value","title":"Get value","text":""},{"location":"config-data/#is-plain-object","title":"Is plain object","text":"
    var isPlainObject = Phaser.Utils.Objects.IsPlainObject(object);\n

    Plain object:

    "},{"location":"config-data/#merge-configuration","title":"Merge configuration","text":"
    var configOut = Phaser.Utils.Objects.Merge(configIn, defaultConfig);\n
    "},{"location":"container/","title":"Container","text":""},{"location":"container/#introduction","title":"Introduction","text":"

    Control the position and angle of children game objects, built-in game object of phaser.

    "},{"location":"container/#usage","title":"Usage","text":""},{"location":"container/#container","title":"Container","text":""},{"location":"container/#add-container-object","title":"Add container object","text":"
    var container = scene.add.container(x, y);\n// var container = scene.add.container(x, y, children); // children: an array of game object\n
    "},{"location":"container/#custom-class","title":"Custom class","text":""},{"location":"container/#destroy","title":"Destroy","text":"
    container.destroy();\n

    Also destroy all children game objects.

    "},{"location":"container/#set-properties","title":"Set properties","text":"

    Reference game object, to set position, angle, visible, alpha, etc...

    "},{"location":"container/#set-size","title":"Set size","text":"
    container.setSize(width, height);\n

    Default size is 0x0.

    "},{"location":"container/#set-scroll-factor","title":"Set scroll factor","text":"
    container.setScrollFactor(x, y);\n

    Apply this scrollFactor to all Container children.

    container.setScrollFactor(x, y, true);\n
    "},{"location":"container/#hit-area","title":"Hit area","text":"
    container.setInteractive(new Phaser.Geom.Circle(0, 0, radius), Phaser.Geom.Circle.Contains);\n// container.setInteractive(false); // disable\n

    Assign hit area with a circle shape.

    "},{"location":"container/#non-exclusive","title":"Non-exclusive","text":"
    container.setExclusive(false);\n

    Allows a game object added to container many times.

    "},{"location":"container/#children","title":"Children","text":""},{"location":"container/#add-child","title":"Add child","text":"
    container.add(child);  // child: a game object or an array of game objects\n
    container.addAt(child, index);\n
    "},{"location":"container/#exist","title":"Exist","text":"
    var hasChild = container.exists(child);\n
    "},{"location":"container/#get-child","title":"Get child","text":"
    var firstChild = container.first;\nvar nextChild = container.next;\nvar prevChild = container.previous;\nvar lastChild = container.last;\n
    var child = container.getByName(name);\n
    var child = container.getRandom(startIndex, length);\n
    var child = container.getFirst(property, value, startIndex, endIndex);\n// value: the value to test the property against. Must pass a strict (`===`) comparison check.\n
    var children = container.getAll(property, value, startIndex, endIndex);\n// value: the value to test the property against. Must pass a strict (`===`) comparison check.\n
    var amount = container.count(property, value, startIndex, endIndex);\n// value: the value to test the property against. Must pass a strict (`===`) comparison check.\n
    "},{"location":"container/#sort-children","title":"Sort children","text":"
    container.sort(property);\n
    container.sort(property, function(childA, childB){\nreturn 0; // 0, 1, -1\n});\n
    "},{"location":"container/#remove-child","title":"Remove child","text":"
    container.remove(child);\n// container.remove(child, true);  // remove child object and destroy it\n
    container.removeAt(index);\n// container.removeAt(index, true);  // remove child object and destroy it\n
    container.removeBetween(startIndex, endIndex);\n// container.removeBetween(startIndex, endIndex, true);  // remove children objects and destroy them\n
    container.removeAll();\n// container.removeAll(true);  // remove all children objects and destroy them\n
    "},{"location":"container/#order-of-child","title":"Order of child","text":"
    container.moveTo(child, index);\n
    container.bringToTop(child);\n
    container.sendToBack(child);\n
    container.moveUp(child);\n
    container.moveDown(child);\n
    container.moveAbove(child1, child2);  // Move child1 above child2\n
    container.moveBelow(child1, child2);  // Move child1 below child2\n
    container.swap(child1, child2);\n
    container.reverse();\n
    container.shuffle();\n
    "},{"location":"container/#replace-child","title":"Replace child","text":"
    container.replace(oldChild, newChild);\n// container.replace(oldChild, newChild, true);  // destroy oldChild\n
    "},{"location":"container/#set-properties_1","title":"Set properties","text":"
    container.setAll(property, value, startIndex, endIndex);\n
    "},{"location":"container/#for-each-child","title":"For each child","text":""},{"location":"container/#get-world-position-rotation-scale","title":"Get world position, rotation, scale","text":"
    var matrix = child.getWorldTransformMatrix();\nvar x = matrix.tx;\nvar y = matrix.ty;\nvar rotation = matrix.rotation;\nvar scaleX = matrix.scaleX;\nvar scaleY = matrix.scaleY;\n
    "},{"location":"container/#compare-with-group-object","title":"Compare with group object","text":""},{"location":"containerlite-perspective/","title":"Perspective","text":""},{"location":"containerlite-perspective/#introduction","title":"Introduction","text":"

    Snapshot children of containerlite, to a perspective render texture.

    "},{"location":"containerlite-perspective/#live-demos","title":"Live demos","text":""},{"location":"containerlite-perspective/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"containerlite-perspective/#install-plugin","title":"Install plugin","text":""},{"location":"containerlite-perspective/#load-minify-file","title":"Load minify file","text":""},{"location":"containerlite-perspective/#import-plugin","title":"Import plugin","text":""},{"location":"containerlite-perspective/#import-class","title":"Import class","text":""},{"location":"containerlite-perspective/#create-instance","title":"Create instance","text":"
    var perspective = scene.plugins.get('rexPerspectiveImagePlugin').addContainerPerspective(container, {\nuseParentBounds: false,\n// hideCCW: true,\n});\n
    "},{"location":"containerlite-perspective/#perspective-mode","title":"Perspective mode","text":""},{"location":"containerlite-perspective/#enter","title":"Enter","text":"
    perspective.enter();\n
    1. Snapshot current visible children into perspective render texture
    2. Set current visible children to invisible
    3. Set this perspective render texture to visible
    "},{"location":"containerlite-perspective/#exit","title":"Exit","text":"
    perspective.exit();\n
    1. Inverse visible of children and perspective render texture
    "},{"location":"containerlite-perspective/#is-in-perspective-mode","title":"Is in perspective mode","text":"
    var isInPerspectiveMode = perspective.perspectiveState;\n
    "},{"location":"containerlite-perspective/#rotation","title":"Rotation","text":""},{"location":"containerlite-perspective/#flip","title":"Flip","text":"
    scene.tweens.add({\ntargets: perspective,\nangleY: { start: 0, to: -180}\n})\n
    "},{"location":"containerlite-perspective/#other-properties","title":"Other properties","text":"

    See Perspective rendertexture game object.

    "},{"location":"containerlite-skew/","title":"Skew","text":""},{"location":"containerlite-skew/#introduction","title":"Introduction","text":"

    Snapshot children of containerlite, to a skew render texture.

    "},{"location":"containerlite-skew/#live-demos","title":"Live demos","text":""},{"location":"containerlite-skew/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"containerlite-skew/#install-plugin","title":"Install plugin","text":""},{"location":"containerlite-skew/#load-minify-file","title":"Load minify file","text":""},{"location":"containerlite-skew/#import-plugin","title":"Import plugin","text":""},{"location":"containerlite-skew/#import-class","title":"Import class","text":""},{"location":"containerlite-skew/#create-instance","title":"Create instance","text":"
    var quad = scene.plugins.get('rexQuadImagePlugin').addContainerSkew(container, {\nuseParentBounds: false\n});\n
    "},{"location":"containerlite-skew/#skew-mode","title":"Skew mode","text":""},{"location":"containerlite-skew/#enter","title":"Enter","text":"
    skew.enter();\n
    1. Snapshot current visible children into skew render texture
    2. Set current visible children to invisible
    3. Set this skew render texture to visible
    "},{"location":"containerlite-skew/#exit","title":"Exit","text":"
    skew.exit();\n
    1. Inverse visible of children and skew render texture
    "},{"location":"containerlite-skew/#is-in-skew-mode","title":"Is in skew mode","text":"
    var isInSkewMode = skew.skewState;\n
    "},{"location":"containerlite-skew/#skew","title":"Skew","text":""},{"location":"containerlite-skew/#other-properties","title":"Other properties","text":"

    See Skew rendertexture game object.

    "},{"location":"containerlite/","title":"Container Lite","text":""},{"location":"containerlite/#introduction","title":"Introduction","text":"

    Control the position and angle of children game objects.

    It is inspired from Ziao/phaser3-interim-containers.

    "},{"location":"containerlite/#live-demos","title":"Live demos","text":""},{"location":"containerlite/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"containerlite/#install-plugin","title":"Install plugin","text":""},{"location":"containerlite/#load-minify-file","title":"Load minify file","text":""},{"location":"containerlite/#import-plugin","title":"Import plugin","text":""},{"location":"containerlite/#import-class","title":"Import class","text":""},{"location":"containerlite/#add-container-object","title":"Add container object","text":"
    var container = scene.add.rexContainerLite(x, y);  // width = 1, height = 1\n// var container = scene.add.rexContainerLite(x, y, width, height);\n

    or

    var container = scene.add.rexContainerLite(x, y, children);  // width = 1, height = 1\n// var container = scene.add.rexContainerLite(x, y, width, height, children);\n

    Add container from JSON

    var container = scene.make.rexContainerLite({\nx: 0,\ny: 0,\nwidth: 1,\nheight: 1,\n\n// angle: 0,\n// alpha: 1,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n});\n
    "},{"location":"containerlite/#custom-class","title":"Custom class","text":""},{"location":"containerlite/#destroy","title":"Destroy","text":"
    container.destroy();\n

    Also destroy all children.

    "},{"location":"containerlite/#other-properties","title":"Other properties","text":"

    This container game object inherits from Zone.

    "},{"location":"containerlite/#add-child","title":"Add child","text":""},{"location":"containerlite/#pin","title":"Pin","text":"

    Add(pin) a game obejct to container

    container.add(child);  // child: a game object\n// container.pin(child);\n

    or

    container.pin(child, {\n// syncPosition: true,\n// syncRotation: true,\n// syncScale : true,\n// syncAlpha: true,\n// syncScrollFactor: true,\n});\n

    Or add(pin) children

    container.addMultiple(children);\n// container.add(children);\n

    These world properties of children will be changed with container.

    Note

    "},{"location":"containerlite/#add-local","title":"Add local","text":"
    container.addLocal(child);\n

    or

    container.addLocalMultiple(children);\n

    or

    container.pinLocal(child, {\n// syncPosition: true,\n// syncRotation: true,\n// syncScale : true,\n// syncAlpha: true,\n});\n

    Add child to container with related properties, like official container. For example, container-lite is at (100, 100), and child is at (10, 10), then child will be placed at (110, 110) after adding to container-lite.

    "},{"location":"containerlite/#remove-child","title":"Remove child","text":""},{"location":"containerlite/#get-child","title":"Get child","text":""},{"location":"containerlite/#traversal","title":"Traversal","text":""},{"location":"containerlite/#exist","title":"Exist","text":"

    Return true if child is under this container-lite (nested).

    var hasChild = container.contains(child);\n
    "},{"location":"containerlite/#children","title":"Children","text":"
    var children = container.children;\n
    "},{"location":"containerlite/#get-parent","title":"Get parent","text":"
    var parentContainer = scene.plugins.get('rexContainerLitePlugin').getParent(child);\n

    or

    var parentContainer = Container.GetParent(child); // Static method\n
    "},{"location":"containerlite/#set-properties-of-child","title":"Set properties of child","text":""},{"location":"containerlite/#position","title":"Position","text":"
    container.setChildPosition(child, x, y);\n
    "},{"location":"containerlite/#rotation","title":"Rotation","text":"
    container.setChildRotation(child, rotation);\n
    "},{"location":"containerlite/#scale","title":"Scale","text":"
    container.setChildScale(child, scaleX, scaleY);\n

    or

    container.setChildDisplaySize(child, width, height);\n
    "},{"location":"containerlite/#visible","title":"Visible","text":"
    container.setChildVisible(child, visible);\n
    "},{"location":"containerlite/#alpha","title":"Alpha","text":"
    container.setChildAlpha(child, alpha);\n
    "},{"location":"containerlite/#local-state-of-child","title":"Local state of child","text":"

    Get local state

    var localState = container.getLocalState(child);\n

    or

    var localState = child.rexContainer;\n
    "},{"location":"containerlite/#change-local-state-of-child","title":"Change local state of child","text":""},{"location":"containerlite/#reset-local-state-of-child","title":"Reset local state of child","text":"

    Reset local state of child according to current properties of children

    "},{"location":"containerlite/#tween-local-state","title":"Tween local state","text":"
    var tweenObj = container.tweenChild({\ntargets: child,\n// x: '+=100',\n// y: '+=100',\n// repeat: -1,\n// yoyo: true\n})\n

    Paramters of configuration is the same as tween task.

    Supported properties :

    "},{"location":"containerlite/#tween-local-state-of-a-containerlite-child","title":"Tween local state of a containerlite child","text":"
    var tweenObj = containerLiteChild.tweenSelf({    // x: '+=100',\n// y: '+=100',\n// repeat: -1,\n// yoyo: true\n})\n

    Equal to

    containerLiteChild.tweenChild({\ntargets: containerLiteChild,\n// x: '+=100',\n// y: '+=100',\n// repeat: -1,\n// yoyo: true\n})\n
    "},{"location":"containerlite/#create-tween-config","title":"Create tween config","text":"
    var tweenConfig = container.createTweenChildConfig({\ntargets: child,\n// x: '+=100',\n// y: '+=100',\n// repeat: -1,\n// yoyo: true\n});\nscene.tweens.add(tweenConfig);\n
    "},{"location":"containerlite/#depth","title":"Depth","text":""},{"location":"containerlite/#layer","title":"Layer","text":"

    A containerLite can have a layer. Current children and new children will draw on this layer, instead of display list of scene.

    "},{"location":"containerlite/#mask","title":"Mask","text":""},{"location":"containerlite/#shader-effects","title":"Shader effects","text":"

    Apply post-fx pipeline on layer of containerLite.

    "},{"location":"containerlite/#snapshot","title":"Snapshot","text":""},{"location":"containerlite/#draw-bounds","title":"Draw bounds","text":""},{"location":"containerlite/#scroll-factor","title":"Scroll factor","text":""},{"location":"containerlite/#change-origin","title":"Change origin","text":"
    container.changeOrigin(originX, originY);\n

    This method also will reset all local state of children.

    "},{"location":"containerlite/#add-to-container","title":"Add to container","text":"

    Note

    container.add(containerLite), or layer.add(containerLite) won't add children of containerLite.

    "},{"location":"containerlite/#compare-with-official-container","title":"Compare with Official Container","text":""},{"location":"create-number-array/","title":"Number array","text":""},{"location":"create-number-array/#introduction","title":"Introduction","text":"

    Create an array representing the range of numbers, built-in method of phaser.

    "},{"location":"create-number-array/#usage","title":"Usage","text":""},{"location":"create-number-array/#create-number-array","title":"Create number array","text":"

    Create an array representing the range of numbers (usually integers), between, and inclusive of, the given start and end arguments.

    var arr = Phaser.Utils.Array.NumberArray(start, end);\n

    For example,

    var arr = Phaser.Utils.Array.NumberArray(2, 4);\n// arr = [2, 3, 4]\n

    "},{"location":"create-number-array/#create-number-array-with-step","title":"Create number array with step","text":"

    Create an array of numbers (positive and/or negative) progressing from start up to but not including end by advancing by step.

    var arr = Phaser.Utils.Array.NumberArray(start, end, step);\n

    For example,

    var arr = Phaser.Utils.Array.NumberArrayStep(0, 20, 5);\n// arr =  [0, 5, 10, 15]\n

    "},{"location":"create-number-array/#create-prefix-number-suffix-string-array","title":"Create prefix-number-suffix string array","text":"
    var arr = Phaser.Utils.Array.NumberArray(start, end, prefix, suffix);\n

    For example,

    var arr = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png');\n// arr = ['HD-5.png', 'HD-6.png', 'HD-7.png']\n

    "},{"location":"csvscenario/","title":"CSV scenario","text":""},{"location":"csvscenario/#introduction","title":"Introduction","text":"

    Run script in csv format. Csv could be edited by excel or google document.

    "},{"location":"csvscenario/#live-demos","title":"Live demos","text":""},{"location":"csvscenario/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"csvscenario/#install-plugin","title":"Install plugin","text":""},{"location":"csvscenario/#load-minify-file","title":"Load minify file","text":""},{"location":"csvscenario/#import-plugin","title":"Import plugin","text":""},{"location":"csvscenario/#import-class","title":"Import class","text":""},{"location":"csvscenario/#create-instance","title":"Create instance","text":"
    var scenario = scene.plugins.get('rexCSVScenario').add(scene, {\n// timeUnit: 0,        // 'ms'|0|'s'|'sec'|1\n// prefix: /^#([a-zA-Z]+)/\n// argsConvert: true,\n// argsConvertScope: undefined,\n// delimiter: ','\n// translateCommandNameCallback: undefined,\n});\n
    "},{"location":"csvscenario/#load-csv-script","title":"Load csv script","text":"
    scenario.load(csvString, scope, {\n// timeUnit: 0,        // 'ms'|0|'s'|'sec'|1\n// prefix: /^#([a-zA-Z]+)/\n// argsConvert: true,\n// argsConvertScope: undefined,\n// delimiter: ',',\n// translateCommandNameCallback: undefined,\n})\n
    "},{"location":"csvscenario/#append-csv-script","title":"Append csv script","text":"
    scenario.append(csvString);\n
    "},{"location":"csvscenario/#start-running-instructions","title":"Start running instructions","text":"

    scenario.start({\n// label: '',\n// offset: 0\n})\n
    scenario.play({\n// label: '',\n// offset: 0\n})\n

    or

    scenario.playPromise({\n// label: '',\n// offset: 0\n})\n.then(function(){\n// On complete\n})\n
    "},{"location":"csvscenario/#events","title":"Events","text":""},{"location":"csvscenario/#types-of-instructions","title":"Types of instructions","text":"

    Each row in csv table is an instruction.

    "},{"location":"csvscenario/#run-custom-function","title":"Run custom function","text":"

    Run custom function of scope, which passed from scenario.load(...)

    Format:

    -,fnName,param0,param1,...\n
    "},{"location":"csvscenario/#delay-execution","title":"Delay execution","text":"

    Run custom function after a delay.

    Format:

    time,fnName,param0,param1,...\n
    "},{"location":"csvscenario/#wait-then-execution","title":"Wait then execution","text":"

    Run custom function until scenario.continue(eventName)

    Format:

    eventName,fnName,param0,param1,...\n
    "},{"location":"csvscenario/#skip-waiting","title":"Skip waiting","text":"
    scenario.continue(true);\n
    "},{"location":"csvscenario/#task","title":"Task","text":"

    Sample code

    Scenario will be paused if custom function return an event emitter, resumed when that evnt emitter fires complete event.

    See also: Sequence

    "},{"location":"csvscenario/#label","title":"Label","text":"

    Sample code

    A label for #GOTO or #IF instructions.

    Format:

    #LABEL,label\n

    Example: A label named 'AA'

    #LABEL,AA\n
    "},{"location":"csvscenario/#exit","title":"Exit","text":"

    Exit current execution.

    Format:

    #EXIT\n
    "},{"location":"csvscenario/#goto","title":"Goto","text":"

    Sample code

    Go to label and execute.

    Format:

    #GOTO,label\n

    Example: Goto label 'AA'

    #GOTO,AA\n
    "},{"location":"csvscenario/#if-goto","title":"If-goto","text":"

    Sample code

    Go to trueLabel if condition is true, otherwise go to falseLabel.

    Format:

    #IF,condition,trueLabel,falseLabel\n

    Example: Goto label 'AA' if (this.coin > 100), else run next instruction

    #IF,this.coin > 100,AA\n
    "},{"location":"csvscenario/#wait","title":"Wait","text":"

    Run next instruction after a delay time, or scenario.continue(eventName).

    Format:

    #WAIT,time\n
    #WAIT,eventName\n

    Example:

    "},{"location":"csvscenario/#pause","title":"Pause","text":"
    scenario.pause();\n
    "},{"location":"csvscenario/#resume","title":"Resume","text":"
    scenario.resume();\n
    "},{"location":"csvscenario/#time-scale","title":"Time-scale","text":""},{"location":"csvscenario/#clear","title":"Clear","text":"

    Stop running and clear instructions.

    scenario.clear();\n
    "},{"location":"csvscenario/#states","title":"States","text":""},{"location":"csvtoarray/","title":"CSV to array","text":""},{"location":"csvtoarray/#introduction","title":"Introduction","text":"

    Generate array from csv string.

    "},{"location":"csvtoarray/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"csvtoarray/#import-class","title":"Import class","text":"
    import rexCSVToArray from './plugins/csvtoarray.js';\n
    "},{"location":"csvtoarray/#import-plugin","title":"Import plugin","text":""},{"location":"csvtoarray/#convert-csv","title":"Convert csv","text":"
    var arr = scene.plugins.get('rexCSVToArray').convert(csvString, {\n// delimiter: ',',\n// convert: true\n});\n

    Values will be converted to number (include hex number string like '0xFF'), boolean, null, or string, if convert is true.

    "},{"location":"csvtohashtable/","title":"CSV to hash table","text":""},{"location":"csvtohashtable/#introduction","title":"Introduction","text":"

    Hash table indexed by (col-key, row-key) from csv string.

    "},{"location":"csvtohashtable/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"csvtohashtable/#install-plugin","title":"Install plugin","text":""},{"location":"csvtohashtable/#load-minify-file","title":"Load minify file","text":""},{"location":"csvtohashtable/#import-plugin","title":"Import plugin","text":""},{"location":"csvtohashtable/#import-class","title":"Import class","text":""},{"location":"csvtohashtable/#create-instance","title":"Create instance","text":"
    var table = scene.plugins.get('rexCsvToHashTable').add();\n
    "},{"location":"csvtohashtable/#append-rows-from-csv-string","title":"Append rows from csv string","text":"
    table.loadCSV(csvString, {\n// delimiter: ',',\n// convert: true\n// convertScope: undefined\n});\n

    For exameple, csv string

    name hp mp Rex 100 20 Alice 300 40
    name,hp,mp\nRex,100,20\nAlice,300,40\n

    will be converted to

    {\n\"Alice\": {\n\"name\": \"Alice\",\n\"hp\": 300,\n\"mp\": 40\n},\n\"Rex\": {\n\"name\": \"Rex\",\n\"hp\": 100,\n\"mp\": 20\n}\n}\n

    Then get value by

    var value = table.get('Rex', 'hp');\n
    "},{"location":"csvtohashtable/#convert-value-type","title":"Convert value type","text":"

    Values will be converted to number (include hex number string like '0xFF'), boolean, null, or string, if convert is true, or assign your convert function by convert and convertScope when loading table (table.loadCSV(...)).

    var convertCallback = function(table, rowKey, colKey, value) {\n// value = ...\nreturn value;\n};\n

    Or uses these metheds to convert columns or rows.

    "},{"location":"csvtohashtable/#get-value","title":"Get value","text":"
    var val = table.get(rowKey, colKey);\n
    "},{"location":"csvtohashtable/#set-value","title":"Set value","text":"
    table.set(rowKey, colKey, value);\n
    table.add(rowKey, colKey, value);\n// equal to table.set(rowKey, colKey, table.get(rowKey, colKey) + value);\n
    "},{"location":"csvtohashtable/#has-columnrow-key","title":"Has column/row key","text":"
    var hasRow = table.hasRowKey(rowKey);\n
    var hasCol = table.hasColKey(colKey);\n
    var hasCell = table.hasKey(rowKey, colKey);\n
    "},{"location":"csvtohashtable/#value-in-column-or-row","title":"Value in column or row","text":"
    var existed = table.isValueInRol(rowKey, value);\n
    var existed = table.isValueInCol(colKey, value);\n
    "},{"location":"csvtohashtable/#create-table","title":"Create table","text":""},{"location":"csvtohashtable/#clear-table","title":"Clear table","text":"
    table.clear();\n
    "},{"location":"csvtohashtable/#append-a-column","title":"Append a column","text":"
    table.appendCol(colKey, initValue);\n// table.appendCol(colKey, callback, scope);  // get initValue from callback\n

    Callback

    var callback = function (table, rowKey, colKey) { // value = ...\nreturn value;\n};\n
    "},{"location":"csvtohashtable/#append-a-row","title":"Append a row","text":"
    table.appendRow(rowKey, initValue);\n// table.appendRow(rowKey, callback, scope);  // get initValue from callback\n

    Callback

    var callback = function (table, rowKey, colKey) { // value = ...\nreturn value;\n};\n
    "},{"location":"csvtohashtable/#remove-a-column","title":"Remove a column","text":"
    table.removeCol(colKey);\n
    "},{"location":"csvtohashtable/#remove-a-row","title":"Remove a row","text":"
    table.removeRol(rowKey);\n
    "},{"location":"csvtohashtable/#sort-column-or-row","title":"Sort column or row","text":"
    table.sortCol(colKey, mode);\n// table.sortCol(callback, scope);  // sort columns by callback\n
    table.sortRow(rowKey, mode);\n// table.sortRow(callback, scope);  // sort rows by callback\n

    Mode:

    Sorting callback

    var callback = function(rowKeyA, rowKeyB) {\nreturn result; // 1, -1, or 0\n};\n
    "},{"location":"csvtohashtable/#retrieve-columns-or-rows","title":"Retrieve columns or rows","text":"
    table.eachCol(rowKey, callback, scope);\n
    table.eachRow(colKey, callback, scope);\n

    Callback

    var callback = function(table, rowKey, colKey, value) {\n// ...\n};\n
    "},{"location":"csvtohashtable/#json","title":"JSON","text":""},{"location":"cursor/","title":"Cursor","text":""},{"location":"cursor/#introduction","title":"Introduction","text":"

    Custom cursor, built-in feature of phaser.

    "},{"location":"cursor/#usage","title":"Usage","text":"

    References:

    "},{"location":"cursor/#set-default-cursor","title":"Set default cursor","text":"
    scene.input.setDefaultCursor(CSSString);\n// CSSString: 'url(assets/input/cursors/sword.cur), pointer'\n
    "},{"location":"cursor/#set-cursor-of-a-game-object","title":"Set cursor of a Game Object","text":"

    Change cursor image when cursor is over that Game Object.

    gameObject.setInteractive({\ncursor: CSSString\n});\n// CSSString: 'url(assets/input/cursors/sword.cur), pointer'\n

    Set cursor image directly after gameObject.setInteractive().

    gameObject.input.cursor = CSSString;\n// CSSString: 'url(assets/input/cursors/sword.cur), pointer'\n

    Use pointer (hand cursor).

    gameObject.setInteractive({\nuseHandCursor: true\n});\n
    "},{"location":"cursor/#change-current-cursor","title":"Change current cursor","text":"
    scene.input.manager.canvas.style.cursor = cursor;\n
    "},{"location":"cursoratbound/","title":"Cursor at bound","text":""},{"location":"cursoratbound/#introduction","title":"Introduction","text":"

    Map cursor-at-(left/right/top/botttom-)bound to (left/right/up/down) cursor key state.

    "},{"location":"cursoratbound/#live-demos","title":"Live demos","text":""},{"location":"cursoratbound/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"cursoratbound/#install-plugin","title":"Install plugin","text":""},{"location":"cursoratbound/#load-minify-file","title":"Load minify file","text":""},{"location":"cursoratbound/#import-plugin","title":"Import plugin","text":""},{"location":"cursoratbound/#import-class","title":"Import class","text":""},{"location":"cursoratbound/#create-instance","title":"Create instance","text":"
    var cursorAtBound = scene.plugins.get('rexCursorAtBound').add(scene, {\n// bounds: undefined,\n// sensitiveDistance: 20,\n});\n

    Map position of cursor to state of cursor key

    "},{"location":"cursoratbound/#state-of-cursor-keys","title":"State of cursor keys","text":"
    var cursorKeys = cursorAtBound.createCursorKeys();\n\nvar leftKeyDown = cursorKeys.left.isDown;\nvar rightKeyDown = cursorKeys.right.isDown;\nvar upKeyDown = cursorKeys.up.isDown;\nvar downKeyDown = cursorKeys.down.isDown;\n

    Or

    var leftKeyDown = cursorAtBound.left;\nvar rightKeyDown = cursorAtBound.right;\nvar upKeyDown = cursorAtBound.up;\nvar downKeyDown = cursorAtBound.down;\nvar noKeyDown = cursorAtBound.noKey;\n
    "},{"location":"cursoratbound/#destroy","title":"Destroy","text":"
    cursorAtBound.destroy();\n
    "},{"location":"curve-spiral/","title":"Spiral curve","text":""},{"location":"curve-spiral/#introduction","title":"Introduction","text":"

    Spiral curve.

    "},{"location":"curve-spiral/#live-demos","title":"Live demos","text":""},{"location":"curve-spiral/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"curve-spiral/#install-plugin","title":"Install plugin","text":""},{"location":"curve-spiral/#load-minify-file","title":"Load minify file","text":""},{"location":"curve-spiral/#import-plugin","title":"Import plugin","text":""},{"location":"curve-spiral/#import-class","title":"Import class","text":""},{"location":"curve-spiral/#create-shape","title":"Create shape","text":""},{"location":"curve-spiral/#properties","title":"Properties","text":""},{"location":"curve-spiral/#other-methods","title":"Other methods","text":"

    See path

    "},{"location":"datamanager/","title":"Built-in data","text":""},{"location":"datamanager/#introduction","title":"Introduction","text":"

    Store data in key-value pairs, built-in object of phaser.

    "},{"location":"datamanager/#usage","title":"Usage","text":""},{"location":"datamanager/#write","title":"Write","text":""},{"location":"datamanager/#set-value","title":"Set value","text":""},{"location":"datamanager/#set-values","title":"Set values","text":"
    parent.data.set(data);    // data: {key:value, ...}\n
    "},{"location":"datamanager/#merge-values","title":"Merge values","text":"
    parent.data.merge(data);  // data: {key:value, ...}\nparent.data.merge(data, false);  // won't overwrite existed keys\n
    "},{"location":"datamanager/#events","title":"Events","text":"

    Fires setdata event when a value is first set.

    parent.data.events.on('setdata', function(parent, key, value){ /* ... */ });\n

    Fires changedata, and changedata- + key events when a value is set that already exists.

    parent.data.events.on('changedata', function(parent, key, value, previousValue){ /* ... */ });\n
    parent.data.events.on('changedata-' + key, function(parent, value, previousValue){ /* ... */ });\n
    "},{"location":"datamanager/#read","title":"Read","text":""},{"location":"datamanager/#get-value","title":"Get value","text":"

    var value = parent.data.get(key);\n
    or
    var value = parent.data.values[key];\n

    "},{"location":"datamanager/#get-values","title":"Get values","text":"
    var values = parent.data.get(keys); // values: [value, value, ...], keys: [key, key, ...]\n
    "},{"location":"datamanager/#get-all-values","title":"Get all values","text":"
    var allValues = parent.data.getAll();  // return a copy of data\n
    "},{"location":"datamanager/#query","title":"Query","text":"

    Using string.match() to pick matched keys.

    var result = parent.data.query(rgExp);\n
    "},{"location":"datamanager/#remove","title":"Remove","text":""},{"location":"datamanager/#remove-key","title":"Remove key","text":"
    parent.data.remove(key);\n
    "},{"location":"datamanager/#remove-keys","title":"Remove keys","text":"
    parent.data.remove(keys);  // keys: [key, key, ...]\n
    "},{"location":"datamanager/#pop-key","title":"Pop key","text":"
    var value = parent.data.pop(key);\n

    Get and remove that key.

    "},{"location":"datamanager/#delet-all-keys","title":"Delet all keys","text":"

    Delete all data in this Data Manager and unfreeze it.

    parent.data.reset();\n
    "},{"location":"datamanager/#events_1","title":"Events","text":"

    Fires removedata event when a key is removed.

    parent.data.events.on('removedata', function(parent, key, value){ /* ... */ });\n
    "},{"location":"datamanager/#freeze","title":"Freeze","text":"
    var isFrozen = parent.data.freeze;\nparent.data.freeze = true;\n

    No changes can be written to it.

    "},{"location":"datamanager/#has-key","title":"Has key","text":"
    var hasKey = parent.data.has(key);\n
    "},{"location":"datamanager/#for-each-key","title":"For each key","text":"
    parent.data.each(function(parent, key, value){\n/* ... */\n}, scope);\n
    "},{"location":"datamanager/#count-of-data","title":"Count of data","text":"
    var cnt = parent.data.count;\n
    "},{"location":"datamanager/#reset","title":"Reset","text":"

    Reset status and clear all keys.

    parent.data.reset()\n
    "},{"location":"date/","title":"Date","text":""},{"location":"date/#introduction","title":"Introduction","text":"

    Get current date or unix-timestamp.

    "},{"location":"date/#usage","title":"Usage","text":"

    Reference

    "},{"location":"date/#create-instance","title":"Create instance","text":"
    var d = new Date();\nvar d = new Date(timestamp);\nvar d = new Date(dateString);\nvar d = new Date(year, month, day, hours, minutes, seconds, milliseconds);\n
    "},{"location":"date/#get-date","title":"Get date","text":"
    var year = d.getFullYear();    // returns the year\nvar month = d.getMonth();      // returns the month (0-11)\nvar date = d.getDate();        // returns the day of the month (1-31)\nvar day = d.getDay();          // returns the day of the week\nvar hour = d.getHours();       // returns the hour (0-23)\nvar min = d.getMinutes();      // returns the minutes (0-59)\nvar sec = d.getSeconds();      // returns the seconds (0-59)\nvar ms = d.getMilliseconds();  // returns the milliseconds (0-999)\n
    "},{"location":"date/#get-unix-timestamp","title":"Get unix-timestamp","text":"
    var timestamp = d.getTime();;   // unix-timestamp in milliseconds\n

    or

    var timestamp = Date.now();;    // unix-timestamp in milliseconds\n
    "},{"location":"date/#to-string","title":"To string","text":"
    var s = d.toLocaleString();   // locale conventions\nvar iso = d.toISOString();    // ISO standard\n
    "},{"location":"device/","title":"Device","text":""},{"location":"device/#introduction","title":"Introduction","text":"

    Get information of device, built-in properties of phaser.

    "},{"location":"device/#usage","title":"Usage","text":""},{"location":"device/#os","title":"OS","text":""},{"location":"device/#browser","title":"Browser","text":""},{"location":"device/#audio","title":"Audio","text":"
    var flac = scene.sys.game.device.audio.flac;\nvar aac = scene.sys.game.device.audio.aac;\nvar dolby = scene.sys.game.device.audio.dolby;\nvar m4a = scene.sys.game.device.audio.m4a;\nvar mp3 = scene.sys.game.device.audio.mp3;\nvar ogg = scene.sys.game.device.audio.ogg;\nvar opus = scene.sys.game.device.audio.opus;\nvar wav = scene.sys.game.device.audio.wav;\nvar webm = scene.sys.game.device.audio.webm;\nvar webAudio = scene.sys.game.device.audio.webAudio;\nvar audioData = scene.sys.game.device.audio.audioData;\n
    "},{"location":"device/#video","title":"Video","text":"
    var h264Video = scene.sys.game.device.video.h264;  // Can this device play h264 mp4 video files?\nvar hlsVideo = scene.sys.game.device.video.hls;    // Can this device play hls video files?\nvar mp4Video = scene.sys.game.device.video.mp4;    // Can this device play h264 mp4 video files?\nvar m4vVideo = scene.sys.game.device.video.m4v;    // Can this device play m4v (typically mp4) video files?\nvar oggVideo = scene.sys.game.device.video.ogg;    // Can this device play ogg video files?\nvar vp9Video = scene.sys.game.device.video.vp9;    // Can this device play vp9 video files?\nvar webmVideo = scene.sys.game.device.video.webm;  // Can this device play webm video files?\n
    "},{"location":"dialog-quest/","title":"Dialog-quest","text":""},{"location":"dialog-quest/#introduction","title":"Introduction","text":"

    Flow control of question manager with a dialog.

    "},{"location":"dialog-quest/#live-demos","title":"Live demos","text":""},{"location":"dialog-quest/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"dialog-quest/#install-plugin","title":"Install plugin","text":""},{"location":"dialog-quest/#load-minify-file","title":"Load minify file","text":""},{"location":"dialog-quest/#import-plugin","title":"Import plugin","text":""},{"location":"dialog-quest/#import-class","title":"Import class","text":""},{"location":"dialog-quest/#create-dialog-quest-object","title":"Create dialog-quest object","text":"
    var quest = new DialogQuest({\ndialog: dialog,\n\nquestions: undefined,\n// format: undefined,\n// delimiter: ',',\n// types: {\n//     question: 'q',\n//     option: '',\n// },\n// convert: true,\n\nquest: true,\n// quest: {\n//     shuffleQuestions: false,\n//     shuffleOptions: false,\n// }\n});\n
    "},{"location":"dialog-quest/#flow-chart","title":"Flow chart","text":"
    graph TB\n\nStart[\"quest.start()\"] --> EventUpdateChoice[\"quest.emit('update-choice', choice, option, quest)<br>----<br>Update each choice button via question.option[i]\"]\n\nEventUpdateChoice --> EventUpdateDialog[\"quest.emit('update-dialog', dialog, question, quest)<br>----<br>Update dialog, action button via question\"]\n\nEventUpdateDialog --> EventClickChoice[\"quest.emit('click-choice', choice, dialog, quest)<br>----<br>Click any choice button\"]\n\nEventClickChoice --> EventClickAction[\"quest.emit('click-action', action, dialog, quest)<br>----<br>Click any action button\"]\n\nEventClickAction --> IsLast{\"quest.isLast()\"}\nEventClickChoice --> IsLast\n\nIsLast --> |No| Next[\"quest.next()\"]\nIsLast --> |Yes| Complete(\"Complete\")\n\nNext --> EventUpdateChoice
    "},{"location":"dialog-quest/#events","title":"Events","text":""},{"location":"dialog-quest/#quest-methods","title":"Quest methods","text":""},{"location":"dialog-quest/#private-data-methods","title":"Private data methods","text":""},{"location":"distance/","title":"Distance","text":""},{"location":"distance/#introduction","title":"Introduction","text":"

    Get distance, built-in methods of phaser.

    "},{"location":"distance/#usage","title":"Usage","text":""},{"location":"distance/#distance","title":"Distance","text":""},{"location":"distance/#speed","title":"Speed","text":""},{"location":"domelement/","title":"DOM element","text":""},{"location":"domelement/#introduction","title":"Introduction","text":"

    Carry DOM element, built-in game object of phaser.

    Limitations

    Dom elements appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have a DOM Element, then a Sprite, then another DOM Element behind it.

    "},{"location":"domelement/#usage","title":"Usage","text":""},{"location":"domelement/#configuration","title":"Configuration","text":"
    var config = {\n// ...\nparent: divId,\n// fullscreenTarget: divId, // For fullscreen\ndom: {\ncreateContainer: true\n},\ninput: {\nmouse: {\ntarget: divId\n},\ntouch: {\ntarget: divId\n},\n},\n// ...\n}\nvar game = new Phaser.Game(config);\n
    "},{"location":"domelement/#add-dom-element-object","title":"Add DOM element object","text":""},{"location":"domelement/#add-html-string","title":"Add html string","text":"
    1. Load html string in preload stage
      scene.load.html(key, url);\n
      Reference: load html
    2. Add DOM element object with html string from cache
      var domElement = scene.add.dom(x, y).createFromCache(key);  // elementType = 'div'\n// var domElement = scene.add.dom(x, y).createFromCache(key, elementType);\n
    "},{"location":"domelement/#create-element","title":"Create element","text":"
    scene.add.dom(x, y).createElement(tagName);\n// scene.add.dom(x, y).createElement(tagName, style, innerText);\n
    "},{"location":"domelement/#add-existing-dom","title":"Add existing DOM","text":"
    1. Create DOM element
      var el = document.createElement('div');\n// el.style = '...';\n// el.innerText = '...';\n
    2. Add to scene
      var domElement = scene.add.dom(x, y, el);\n// var domElement = scene.add.dom(x, y, el, style, innerText);\n
    "},{"location":"domelement/#custom-class","title":"Custom class","text":""},{"location":"domelement/#event-of-dom-element","title":"Event of DOM element","text":""},{"location":"domelement/#get-child","title":"Get child","text":""},{"location":"domelement/#set-inner-html-string","title":"Set inner html string","text":"
    scene.setHTML(html);\n

    or

    scene.setText(html);\n
    "},{"location":"domelement/#dom-element","title":"DOM Element","text":"

    Each DOM element object has 1 DOM element.

    "},{"location":"domelement/#depth","title":"Depth","text":"
    domElement.setDepth(value);\n
    "},{"location":"domelement/#set-size","title":"Set size","text":"
    var style = domElement.node.style;\nstyle.width = width + 'px';\nstyle.height = height + 'px';\ndomElement.updateSize();\n
    "},{"location":"domelement/#skew","title":"Skew","text":"
    domElement.setSkew(x, y);\n

    or

    domElement.skewX = x;\ndomElement.skewY = y;\n
    "},{"location":"domelement/#rotate-3d","title":"Rotate 3d","text":"

    The rotate3d() CSS function defines a transformation that rotates an element around a fixed axis in 3D space, without deforming it.

    domElement.rotate3d.set(x, y, z, a);\n

    or

    domElement.rotate3d.x = x;\ndomElement.rotate3d.y = y;\ndomElement.rotate3d.z = z;\ndomElement.rotate3d.w = a;\n

    Reference

    "},{"location":"domelement/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"
    1. DOM game object always put above game canvas, i.e. DOM game object will render above any other kind of game object.
    2. DOM game object will receive touch event even if it is not the first touched game object.
    3. P3's 'pointerdown', 'pointerup' events will be fired above/under DOM game object.
    4. P3's 'pointermove' event won't be fired above/under DOM game object, except
    "},{"location":"domelement/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"drag/","title":"Drag","text":""},{"location":"drag/#introduction","title":"Introduction","text":"

    Drag game object.

    "},{"location":"drag/#live-demos","title":"Live demos","text":""},{"location":"drag/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"drag/#install-plugin","title":"Install plugin","text":""},{"location":"drag/#load-minify-file","title":"Load minify file","text":""},{"location":"drag/#import-plugin","title":"Import plugin","text":""},{"location":"drag/#import-class","title":"Import class","text":""},{"location":"drag/#create-instance","title":"Create instance","text":"
    var drag = scene.plugins.get('rexDrag').add(gameObject, {\n// enable: true,\n// axis: 0,      //0|'both'|'h&v'|1|'horizontal'|'h'|2|'vertical'|'v'\n// rotation: Phaser.Math.DegToRad(45)  // axis rotation in rad\n});\n
    "},{"location":"drag/#events","title":"Events","text":"

    Built-in dragging events

    gameObject.on('dragstart', function(pointer, dragX, dragY){ /*...*/ });\ngameObject.on('drag', function(pointer, dragX, dragY){ /*...*/ });\ngameObject.on('dragend', function(pointer, dragX, dragY, dropped){ /*...*/ });\n
    "},{"location":"drag/#enable","title":"Enable","text":""},{"location":"drag/#get-dragging-state","title":"Get dragging state","text":"
    var isDragging = drag.isDragging;\n
    "},{"location":"drag/#set-rotation-of-axis","title":"Set rotation of axis","text":"
    drag.setAxisRotation(rad);\n// drag.axisRotation = rad;\n
    "},{"location":"drag/#set-axis-mode","title":"Set axis mode","text":"
    drag.setAxisMode(axis);\n
    "},{"location":"drag/#try-drag","title":"Try drag","text":"

    Game object will be dragged if there is any point above it.

    drag.drag();\n
    "},{"location":"drag/#drop","title":"Drop","text":"

    Game object will be dropped(dragend) manually.

    drag.dragend();\n
    "},{"location":"dragrotate/","title":"Drag rotate","text":""},{"location":"dragrotate/#introduction","title":"Introduction","text":"

    Get dragging angle around a specific point.

    "},{"location":"dragrotate/#live-demos","title":"Live demos","text":""},{"location":"dragrotate/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"dragrotate/#install-plugin","title":"Install plugin","text":""},{"location":"dragrotate/#load-minify-file","title":"Load minify file","text":""},{"location":"dragrotate/#import-plugin","title":"Import plugin","text":""},{"location":"dragrotate/#import-class","title":"Import class","text":""},{"location":"dragrotate/#create-instance","title":"Create instance","text":"
    var dragRotate = scene.plugins.get('rexDragRotate').add(scene, {\nx: 0,\ny: 0,\nmaxRadius: 100\nminRadius: 0,\n// enable: true,\n});\n
    "},{"location":"dragrotate/#enable","title":"Enable","text":""},{"location":"dragrotate/#origin-point","title":"Origin point","text":"

    Note

    Parameter (x,y) is world position, not camera position.

    "},{"location":"dragrotate/#radius","title":"Radius","text":""},{"location":"dragrotate/#get-dragging-state","title":"Get dragging state","text":"
    var state = dragRotate.state;\n
    "},{"location":"dragrotate/#is-drag","title":"Is drag","text":"
    var isDrag = dragRotate.isDrag;\n

    Return true if (dragRotate.state === 1) and catched touch pointer just moved.

    "},{"location":"dragrotate/#drag-cancel","title":"Drag cancel","text":"
    dragRotate.dragCancel();\n
    "},{"location":"dragrotate/#events","title":"Events","text":""},{"location":"dragrotate/#on-dragging","title":"On dragging","text":""},{"location":"dragrotate/#on-drag-start-on-drag-end","title":"On drag start, on drag end","text":""},{"location":"dragrotate/#catched-touch-pointer","title":"Catched touch pointer","text":""},{"location":"dropdown/","title":"Drop down","text":""},{"location":"dropdown/#introduction","title":"Introduction","text":"

    Drop down game object below another target game object.

    "},{"location":"dropdown/#live-demos","title":"Live demos","text":""},{"location":"dropdown/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"dropdown/#install-plugin","title":"Install plugin","text":""},{"location":"dropdown/#load-minify-file","title":"Load minify file","text":""},{"location":"dropdown/#import-plugin","title":"Import plugin","text":""},{"location":"dropdown/#import-class","title":"Import class","text":""},{"location":"dropdown/#create-instance","title":"Create instance","text":"
    var dropDown = scene.plugins.get('rexDropDown').add(gameObject, {        // expandDirection: 0,\n// alignTargetX: \n// alignTargetY: \n// alignOffsetX: \n// alignOffsetY: \n// bounds:\n\n// When to close dropdown dialog?\n// touchOutsideClose: false,\n// anyTouchClose: false,\n\n// duration: {\n//     in: 200,\n//     out: 200\n// }\n\n// transitIn: undefined,\n// transitOut: undefined,\n\n// destroy: true\n});\n
    "},{"location":"dropdown/#close","title":"Close","text":"
    dropDown.requestClose();\n// dropDown.requestClose();\n
    "},{"location":"dropdown/#events","title":"Events","text":""},{"location":"dynamic-texture/","title":"Dynamic texture","text":""},{"location":"dynamic-texture/#introduction","title":"Introduction","text":"

    Canvas Dynamic Texture stored in texture cache, built-in object of phaser.

    "},{"location":"dynamic-texture/#usage","title":"Usage","text":""},{"location":"dynamic-texture/#create-dynamic-texture","title":"Create dynamic texture","text":"
    var texture = scene.textures.addDynamicTexture(key, width, height);\n

    Disable texture.isSpriteTexture if this texture is not a base texture for Sprite Game Objects.

    texture.setIsSpriteTexture(false);\n// texture.isSpriteTexture = false;\n
    "},{"location":"dynamic-texture/#set-size","title":"Set size","text":"
    texture.setSize(width, height);\n
    "},{"location":"dynamic-texture/#fill-color","title":"Fill color","text":"
    texture.fill(rgb);\n// texture.fill(rgb, alpha, x, y, width, height);\n
    "},{"location":"dynamic-texture/#clear","title":"Clear","text":"
    texture.clear();\n
    texture.clear(x, y, width, height);\n
    "},{"location":"dynamic-texture/#draw-game-object","title":"Draw game object","text":"
    texture.draw(entries);\n// texture.draw(entries,x, y);\n// texture.draw(entries, x, y, alpha, tint);\n
    "},{"location":"dynamic-texture/#erase-game-object","title":"Erase game object","text":"
    texture.erase(entries);\n// texture.erase(entries, x, y);\n
    "},{"location":"dynamic-texture/#draw-frame","title":"Draw frame","text":"
    texture.drawFrame(key, frame, x, y);\n// texture.drawFrame(key, frame, x, y, alpha, tint);\n

    or

    texture.stamp(key, frame, x, y, {\nalpha: 1,\ntint: 0xffffff,\nangle: 0,\nrotation: 0,\nscale: 1,\nscaleX: 1,\nscaleY: 1,\noriginX: 0.5,\noriginY: 0.5,\nblendMode: 0,\nerase: false,\nskipBatch: false\n})\n
    "},{"location":"dynamic-texture/#draw-repeat-frames","title":"Draw repeat frames","text":""},{"location":"dynamic-texture/#draw-frame_1","title":"Draw frame","text":"
    texture.add(name, sourceIndex, x, y, width, height);\n
    "},{"location":"dynamic-texture/#batch-draw","title":"Batch draw","text":"
    1. Begin
      texture.beginDraw();\n
    2. Draw
    3. End
      texture.endDraw();\n
    "},{"location":"dynamic-texture/#snapshot","title":"Snapshot","text":""},{"location":"dynamic-texture/#snapshot-area","title":"Snapshot area","text":"
    texture.snapshot(callback);\n// texture.snapshot(callback, type, encoderOptions);\n

    or

    texture.snapshotArea(x, y, width, height, callback, type, encoderOptions);\n
    "},{"location":"dynamic-texture/#get-color-of-a-pixel","title":"Get color of a pixel","text":"
    texture.snapshotPixel(x, y, callback);\n
    "},{"location":"dynamicbitmaptext/","title":"Dynamic bitmap text","text":""},{"location":"dynamicbitmaptext/#introduction","title":"Introduction","text":"

    Drawing text by texture with a callback for each character triggered at every tick, built-in game object of phaser.

    "},{"location":"dynamicbitmaptext/#usage","title":"Usage","text":""},{"location":"dynamicbitmaptext/#load-bitmap-font","title":"Load bitmap font","text":"

    Reference: load bitmap font

    "},{"location":"dynamicbitmaptext/#add-bitmap-text-object","title":"Add bitmap text object","text":"
    var txt = scene.add.dynamicBitmapText(x, y, key, text);\n// var txt = scene.add.dynamicBitmapText(x, y, key, text, size, align);\n

    Add text from JSON

    var txt = scene.make.dynamicBitmapText({\nx: 0,\ny: 0,\ntext: 'Text\\nGame Object\\nCreated from config',\nfont: '',\nsize: false,\nalign: 0,\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"dynamicbitmaptext/#custom-class","title":"Custom class","text":""},{"location":"dynamicbitmaptext/#set-callback","title":"Set callback","text":"
    var callback = function(data) {\n// input\n// data.index, data.charCode\n// data.x, data.y, data.scale, data.rotation\n// data.data\n// data.tint.topLeft, data.tint.topRight, data.tint.bottomLeft, data.tint.bottomRight    \n\n// modify input `data` then return it\n// ...\n// offset: data.y += 2\n// set tint: data.color = tint\nreturn data;\n}\ntxt.setDisplayCallback(callback);\n
    "},{"location":"dynamicbitmaptext/#set-text","title":"Set text","text":"
    txt.setText('...');\n

    or

    txt.text = '...';\n
    "},{"location":"dynamicbitmaptext/#crop","title":"Crop","text":""},{"location":"dynamicbitmaptext/#other-properties","title":"Other properties","text":"

    This dynamic bitmap text class is extended from bitmap text

    "},{"location":"dynamictext/","title":"Dynamic text","text":""},{"location":"dynamictext/#introduction","title":"Introduction","text":"

    Control position, angle of each character drawn on a canvas.

    "},{"location":"dynamictext/#live-demos","title":"Live demos","text":""},{"location":"dynamictext/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"dynamictext/#install-plugin","title":"Install plugin","text":""},{"location":"dynamictext/#load-minify-file","title":"Load minify file","text":""},{"location":"dynamictext/#import-plugin","title":"Import plugin","text":""},{"location":"dynamictext/#import-class","title":"Import class","text":""},{"location":"dynamictext/#create-instance","title":"Create instance","text":"
    var txt = scene.add.rexDynamicText({\nx: 0, y: 0,\nwidth: undefined, height: undefined,\n\npadding: 0,  // {left: 0, right: 0, top: 0, bottom: 0}\n\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null\n},\n\ninnerBounds: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBottomY: undefined,\noffsetX: 0,\noffsetY: 0\n},\n\nchildrenInteractive: false,\n\ntext: '',\n\nwrap: undefined,\n\ntestString: '|M\u00c9qgy',\n});\n

    or

    var txt = scene.add.rexDynamicText(x, y, width, height, config);\n

    or

    var txt = scene.add.rexDynamicText(x, y, config);\n

    Add dynamictext from JSON

    var txt = scene.make.rexDynamicText({\nx: 0,\ny: 0,\n\n// origin: {x: 0.5, y: 0.5},\n// fill: null,\n\nadd: true\n});\n
    "},{"location":"dynamictext/#custom-class","title":"Custom class","text":""},{"location":"dynamictext/#clear-content","title":"Clear content","text":"
    txt.clearContent();\n
    "},{"location":"dynamictext/#text","title":"Text","text":""},{"location":"dynamictext/#append-text","title":"Append text","text":"
    txt.appendText(text);\n

    or

    txt.appendText(text, {\n// bold: false,\n// italic: false,\n// fontSize: '16px',\n// fontFamily: 'Courier',\n// color: '#fff',\n// stroke: '#fff',\n// strokeThickness: 0,\n// shadowColor: null,\n// shadowOffsetX: 0,\n// shadowOffsetY: 0,\n// shadowBlur: 0,\n// backgroundColor: null,\n// backgroundHeight: undefined,\n// backgroundBottomY: undefined,\n// offsetY: 0,\n// offsetY: 0,\n// align: undefined\n}\n);\n

    To overwrite some properties of text-style.

    Each character will be placed at position (0,0), without rotation. Uses word-wrap method to rearrange position of characters.

    "},{"location":"dynamictext/#set-text","title":"Set text","text":"
    txt.setText(text);\n

    or

    txt.setText(text, {\n// bold: false,\n// italic: false,\n// fontSize: '16px',\n// fontFamily: 'Courier',\n// color: '#fff',\n// stroke: '#fff',\n// strokeThickness: 0,\n// shadowColor: null,\n// shadowOffsetX: 0,\n// shadowOffsetY: 0,\n// shadowBlur: 0,\n// backgroundColor: null,\n// backgroundHeight: undefined,\n// backgroundBottomY: undefined,\n// offsetY: 0,\n// offsetY: 0,\n// align: undefined\n}\n);\n
    "},{"location":"dynamictext/#insert-text","title":"Insert text","text":"

    txt.insertText(index, text);\n
    or

    txt.insertText(index, text, {\n// bold: false,\n// italic: false,\n// fontSize: '16px',\n// fontFamily: 'Courier',\n// color: '#fff',\n// stroke: '#fff',\n// strokeThickness: 0,\n// shadowColor: null,\n// shadowOffsetX: 0,\n// shadowOffsetY: 0,\n// shadowBlur: 0,\n// backgroundColor: null,\n// backgroundHeight: undefined,\n// backgroundBottomY: undefined,\n// offsetY: 0,\n// offsetY: 0,\n// align: undefined\n}\n);\n
    "},{"location":"dynamictext/#remove-text","title":"Remove text","text":"
    txt.removeText(index);\n
    "},{"location":"dynamictext/#get-text","title":"Get text","text":""},{"location":"dynamictext/#image","title":"Image","text":""},{"location":"dynamictext/#append-image","title":"Append image","text":"
    txt.appendImage(key, frame, {\n// width\n// height\n// scaleX\n// scaleY\n})\n
    "},{"location":"dynamictext/#background","title":"Background","text":""},{"location":"dynamictext/#inner-bounds","title":"Inner bounds","text":""},{"location":"dynamictext/#wrap","title":"Wrap","text":"

    Control characters :

    "},{"location":"dynamictext/#horizontal-wrap","title":"Horizontal wrap","text":"
    var result = txt.runWordWrap({\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0\n},\nascent: undefined,\nlineHeight: undefined,\nuseDefaultTextHeight: false,\nmaxLines: undefined,\nwrapWidth: undefined,\nletterSpacing: 0,\nhAlign: 0,\nvAlign: 0,\ncharWrap: false\n});\n
    "},{"location":"dynamictext/#align","title":"Align","text":""},{"location":"dynamictext/#test-string","title":"Test string","text":"
    txt.setTestString(text);\n
    "},{"location":"dynamictext/#vertical-wrap","title":"Vertical wrap","text":"
    var result = txt.runVerticalWrap({\npadding: {\ntop: 0,\nleft: 0,\nright: 0,\nbottom: 0\n},\nlineWidth: undefined,\nmaxLines: undefined,\nfixedChildHeight: undefined,\ncharPerLine: undefined,\nwrapHeight: undefined,\nletterSpacing: 0,\nrtl: true,\nhAlign: 0,\nvAlign: 0,\n});\n
    "},{"location":"dynamictext/#result","title":"Result","text":"
    {\nchildren: [],\nlines: [],\nisLastPage: false\n}\n
    "},{"location":"dynamictext/#wrap-next-page","title":"Wrap next page","text":"
    var result = txt.runWordWrap(prevResult);\n
    "},{"location":"dynamictext/#default-configuration-of-wrapping","title":"Default configuration of wrapping","text":"
    txt.setWrapConfig(config);\n
    "},{"location":"dynamictext/#child","title":"Child","text":""},{"location":"dynamictext/#general-properties","title":"General properties","text":""},{"location":"dynamictext/#character","title":"Character","text":""},{"location":"dynamictext/#text-style","title":"Text-style","text":""},{"location":"dynamictext/#image_1","title":"Image","text":""},{"location":"dynamictext/#for-each-child","title":"For each child","text":""},{"location":"dynamictext/#get-children","title":"Get children","text":""},{"location":"dynamictext/#get-character-children","title":"Get character children","text":""},{"location":"dynamictext/#move-child","title":"Move child","text":""},{"location":"dynamictext/#size","title":"Size","text":""},{"location":"dynamictext/#input-events-of-child","title":"Input events of child","text":""},{"location":"dynamictext/#compare-with-other-kinds-of-text-game-object","title":"Compare with other kinds of text game object","text":""},{"location":"ease-function/","title":"Ease","text":""},{"location":"ease-function/#introduction","title":"Introduction","text":"

    Ease functions, built-in method of phaser.

    "},{"location":"ease-function/#usage","title":"Usage","text":""},{"location":"ease-function/#ease-functions","title":"Ease functions","text":""},{"location":"ease-function/#get-ease-function-via-string","title":"Get ease function via string","text":"
    var easeFunction = Phaser.Tweens.Builders.GetEaseFunction(ease);\n// var easeFunction = Phaser.Tweens.Builders.GetEaseFunction(ease, easeParams);\n
    "},{"location":"ease-function/#get-result","title":"Get result","text":"
    var result = easeFunction(t);\n
    "},{"location":"easedata/","title":"Ease-data","text":""},{"location":"easedata/#introduction","title":"Introduction","text":"

    Easing data value of game object's data-manager.

    "},{"location":"easedata/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"easedata/#install-plugin","title":"Install plugin","text":""},{"location":"easedata/#load-minify-file","title":"Load minify file","text":""},{"location":"easedata/#import-plugin","title":"Import plugin","text":""},{"location":"easedata/#import-method","title":"Import method","text":""},{"location":"easedata/#create-instance","title":"Create instance","text":"
    var easedata = scene.plugins.get('rexEaseData').add(gameObject);\n
    "},{"location":"easedata/#ease-data","title":"Ease data","text":""},{"location":"easedata/#events","title":"Events","text":""},{"location":"easemove/","title":"Ease-move","text":""},{"location":"easemove/#introduction","title":"Introduction","text":"

    Ease-move game object.

    "},{"location":"easemove/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"easemove/#install-plugin","title":"Install plugin","text":""},{"location":"easemove/#load-minify-file","title":"Load minify file","text":""},{"location":"easemove/#import-plugin","title":"Import plugin","text":""},{"location":"easemove/#import-method","title":"Import method","text":""},{"location":"easemove/#move-to","title":"Move to","text":"
    var easemove = scene.plugins.get('rexEaseMove').moveTo(gameObject, duration, x, y);\n// var easemove = scene.plugins.get('rexEaseMove').moveTo(gameObject, duration, x, y, ease);\n// easemove = scene.plugins.get('rexEaseMove').moveTo(gameObject, duration, x, y, ease, easemove);\n
    "},{"location":"easemove/#move-from","title":"Move from","text":"
    var easemove = scene.plugins.get('rexEaseMove').moveFrom(gameObject, duration, x, y);\n// var easemove = scene.plugins.get('rexEaseMove').moveFrom(gameObject, duration, x, y, ease);\n// easemove = scene.plugins.get('rexEaseMove').moveFrom(gameObject, duration, x, y, ease, easemove);\n
    "},{"location":"easemove/#events","title":"Events","text":"

    See Events of tween task

    "},{"location":"effect-properties/","title":"Effect properties","text":""},{"location":"effect-properties/#introduction","title":"Introduction","text":"

    Attach properties to a game object or camera, to add/remove/control builtin preFX or postFX effects.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"effect-properties/#live-demos","title":"Live demos","text":""},{"location":"effect-properties/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"effect-properties/#install-plugin","title":"Install plugin","text":""},{"location":"effect-properties/#load-minify-file","title":"Load minify file","text":""},{"location":"effect-properties/#import-plugin","title":"Import plugin","text":""},{"location":"effect-properties/#import-method","title":"Import method","text":""},{"location":"effect-properties/#attach-properties","title":"Attach properties","text":"

    Supported effects are barrel, blackWhite, bloom, blur, bokeh, brightness, brown, circle, contrast, desaturate, desaturateLuminance, displacement, glow, gradient, grayscale, hue, kodachrome, lsd, negative, pixelate, polaroid, reveal, saturate, sepia, shadow, shiftToBGR, shine, technicolor, tiltShift, vignette, vintagePinhole, wipe.

    "},{"location":"effect-properties/#effect-properties","title":"Effect properties","text":"

    Will try to create preFX effect if gameObject has preFX, otherwise, try to create postFX effect.

    "},{"location":"effect-properties/#barrel","title":"Barrel","text":""},{"location":"effect-properties/#blackwhite","title":"BlackWhite","text":""},{"location":"effect-properties/#bloom","title":"Bloom","text":""},{"location":"effect-properties/#blur","title":"Blur","text":""},{"location":"effect-properties/#bokeh","title":"Bokeh","text":""},{"location":"effect-properties/#brightness","title":"Brightness","text":""},{"location":"effect-properties/#brown","title":"Brown","text":""},{"location":"effect-properties/#circle","title":"Circle","text":""},{"location":"effect-properties/#contrast","title":"Contrast","text":""},{"location":"effect-properties/#desaturate","title":"Desaturate","text":""},{"location":"effect-properties/#desaturateluminance","title":"DesaturateLuminance","text":""},{"location":"effect-properties/#displacement","title":"Displacement","text":""},{"location":"effect-properties/#glow","title":"Glow","text":""},{"location":"effect-properties/#gradient","title":"Gradient","text":""},{"location":"effect-properties/#grayscale","title":"Grayscale","text":""},{"location":"effect-properties/#hue","title":"Hue","text":""},{"location":"effect-properties/#kodachrome","title":"Kodachrome","text":""},{"location":"effect-properties/#lsd","title":"Lsd","text":""},{"location":"effect-properties/#negative","title":"Negative","text":""},{"location":"effect-properties/#pixelate","title":"Pixelate","text":""},{"location":"effect-properties/#polaroid","title":"Polaroid","text":""},{"location":"effect-properties/#reveal","title":"Reveal","text":""},{"location":"effect-properties/#saturate","title":"Saturate","text":""},{"location":"effect-properties/#sepia","title":"Sepia","text":""},{"location":"effect-properties/#shadow","title":"Shadow","text":""},{"location":"effect-properties/#shifttobgr","title":"ShiftToBGR","text":""},{"location":"effect-properties/#shine","title":"Shine","text":""},{"location":"effect-properties/#technicolor","title":"Technicolor","text":""},{"location":"effect-properties/#tiltshift","title":"TiltShift","text":""},{"location":"effect-properties/#vignette","title":"Vignette","text":""},{"location":"effect-properties/#vintagepinhole","title":"VintagePinhole","text":""},{"location":"effect-properties/#wipe","title":"Wipe","text":""},{"location":"effect-properties/#clear-all-effects","title":"Clear all effects","text":"
    gameObject.clearAllEffects();\n
    "},{"location":"effectlayer-outline/","title":"Effectlayer outline","text":""},{"location":"effectlayer-outline/#introduction","title":"Introduction","text":"

    Draw outline of target game objects.

    "},{"location":"effectlayer-outline/#live-demos","title":"Live demos","text":""},{"location":"effectlayer-outline/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"effectlayer-outline/#install-plugin","title":"Install plugin","text":""},{"location":"effectlayer-outline/#load-minify-file","title":"Load minify file","text":""},{"location":"effectlayer-outline/#import-plugin","title":"Import plugin","text":""},{"location":"effectlayer-outline/#import-class","title":"Import class","text":""},{"location":"effectlayer-outline/#create-instance","title":"Create instance","text":"
    var effectLayer = scene.add.rexOutlineEffectLayer({\n// knockout: false,\n// thickness: 3,\n// outlineColor: 0x000000\n});\n
    "},{"location":"effectlayer-outline/#custom-class","title":"Custom class","text":""},{"location":"effectlayer-outline/#thickness","title":"Thickness","text":""},{"location":"effectlayer-outline/#outline-color","title":"Outline color","text":""},{"location":"effectlayer-outline/#target-game-objects","title":"Target game objects","text":"

    Draw outline of added target game objects.

    "},{"location":"effectlayer-outline/#limitation","title":"Limitation","text":""},{"location":"eightdirection/","title":"8 direction","text":""},{"location":"eightdirection/#introduction","title":"Introduction","text":"

    Move game object by cursor keys, with a constant speed.

    "},{"location":"eightdirection/#live-demos","title":"Live demos","text":""},{"location":"eightdirection/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"eightdirection/#install-plugin","title":"Install plugin","text":""},{"location":"eightdirection/#load-minify-file","title":"Load minify file","text":""},{"location":"eightdirection/#import-plugin","title":"Import plugin","text":""},{"location":"eightdirection/#import-class","title":"Import class","text":""},{"location":"eightdirection/#create-instance","title":"Create instance","text":"
    var eightDirection = scene.plugins.get('rexEightDirection').add(gameObject, {\nspeed: 200,\n// dir: '8dir',     // 0|'up&down'|1|'left&right'|2|'4dir'|3|'8dir'\n// rotateToDirection: false,\n// wrap: false,\n// padding: 0,\n// enable: true,\n// cursorKeys: scene.input.keyboard.createCursorKeys()\n});\n
    "},{"location":"eightdirection/#set-speed","title":"Set speed","text":"
    eightDirection.setSpeed(speed);\n// eightDirection.speed = speed;\n
    "},{"location":"eightdirection/#set-rotate-to-direction","title":"Set rotate-to-direction","text":"
    eightDirection.setRotateToDirection(rotateToDirection);\n
    "},{"location":"eightdirection/#set-direction-mode","title":"Set direction mode","text":"
    eightDirection.setDirMode(dir);\n
    "},{"location":"eightdirection/#set-wrap-mode","title":"Set wrap mode","text":"
    ship.setWrapMode(wrap, padding);\n
    "},{"location":"eventemitter3/","title":"Event emitter","text":""},{"location":"eventemitter3/#introduction","title":"Introduction","text":"

    Event emitter.

    "},{"location":"eventemitter3/#usage","title":"Usage","text":""},{"location":"eventemitter3/#get-event-emitter","title":"Get event emitter","text":""},{"location":"eventemitter3/#attach-listener","title":"Attach listener","text":"
    ee.on(eventName, callback, scope);\nee.once(eventName, callback, scope);  // only fire listeners one time\n

    Alias

    ee.addListener(eventName, callback, scope);\nee.addListener(eventName, callback, scope, true);  // only fire listeners one time\n
    "},{"location":"eventemitter3/#fire-event","title":"Fire event","text":"
    ee.emit(eventName, parameter0, ...);\n
    "},{"location":"eventemitter3/#remove-listeners","title":"Remove listeners","text":""},{"location":"eventemitter3/#get-listeners-count","title":"Get listeners count","text":"
    var count = ee.listenerCount(eventName);\n//var noListener = (ee.listenerCount(eventName) === 0);\n
    "},{"location":"eventemitter3/#get-listeners","title":"Get listeners","text":"
    var listeners = ee.listeners(eventName);\n
    "},{"location":"eventemitter3/#get-event-names","title":"Get event names","text":"
    var names = ee.eventNames();\n
    "},{"location":"eventemitter3/#listener","title":"Listener","text":"
    {\nfn: callback,\ncontext: scope,\nonce: once\n}\n
    "},{"location":"eventemitter3/#custom-event-emitter-class","title":"Custom event emitter class","text":"
    class MyEventEmitter extends Phaser.Events.EventEmitter {\n// construct() {\n//     super();\n// }\n\n// destroy() {\n//     super.destroy();\n// }\n}\n
    "},{"location":"eventpromise/","title":"Event promise","text":""},{"location":"eventpromise/#introduction","title":"Introduction","text":"

    Return a promise of an event.

    "},{"location":"eventpromise/#live-demos","title":"Live demos","text":""},{"location":"eventpromise/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"eventpromise/#install-plugin","title":"Install plugin","text":""},{"location":"eventpromise/#load-minify-file","title":"Load minify file","text":""},{"location":"eventpromise/#import-plugin","title":"Import plugin","text":""},{"location":"eventpromise/#import-class","title":"Import class","text":""},{"location":"eventpromise/#get-event-promise","title":"Get event promise","text":"
    var promoise = scene.plugins.get('rexEventPromise').waitEvent(eventEmitter, eventName)\n.then(function() {\n\n})\n
    "},{"location":"eventpromise/#get-complete-event-promise","title":"Get complete event promise","text":"
    var promoise = scene.plugins.get('rexEventPromise').waitComplete(eventEmitter)\n.then(function() {\n\n})\n
    "},{"location":"expression-parser/","title":"Expression parser","text":""},{"location":"expression-parser/#introduction","title":"Introduction","text":"

    Parse expression string into function. Parser is generated from jison

    "},{"location":"expression-parser/#live-demos","title":"Live demos","text":""},{"location":"expression-parser/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"expression-parser/#install-plugin","title":"Install plugin","text":""},{"location":"expression-parser/#load-minify-file","title":"Load minify file","text":""},{"location":"expression-parser/#import-plugin","title":"Import plugin","text":""},{"location":"expression-parser/#import-class","title":"Import class","text":""},{"location":"expression-parser/#create-instance","title":"Create instance","text":"
    var parser = scene.plugins.get('rexExpressionParserPlugin').add();\n
    "},{"location":"expression-parser/#execute","title":"Execute","text":""},{"location":"expression-parser/#compile-then-execute","title":"Compile then execute","text":"
    1. Compile expression string into function
      var f = parser.compile(expressionString);\n
      or
      var f = scene.plugins.get('rexExpressionParserPlugin').compile(expressionString);\n
    2. Invoke function
      var value = f(context);\n
    "},{"location":"expression-parser/#execute-directly","title":"Execute directly","text":"
    var value = parser.exec(expressionString, context);\n

    or

    var value = parser.exec(f, context);\n
    "},{"location":"expression-parser/#custom-method","title":"Custom method","text":""},{"location":"expression-parser/#proxy-as-context","title":"Proxy as context","text":"

    Proxy with has and get handlers could be a context.

    For example, proxy scene data :

    var context = new Proxy({}, {\nhas(target, key) {\nreturn scene.data.has(key);\n},\nget(target, prop) {\nreturn scene.data.get(prop);\n}\n})\n

    or

    var context = scene.plugins.get('rexExpressionParserPlugin').createProxyContext({\nhas(target, key) {\n// return boolean\n},\nget(target, prop) {\n// return any;\n}\n})\n
    "},{"location":"fadeoutdestroy/","title":"Fade out destroy","text":""},{"location":"fadeoutdestroy/#introduction","title":"Introduction","text":"

    Fade out game object then destroy it.

    "},{"location":"fadeoutdestroy/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"fadeoutdestroy/#install-plugin","title":"Install plugin","text":""},{"location":"fadeoutdestroy/#load-minify-file","title":"Load minify file","text":""},{"location":"fadeoutdestroy/#import-plugin","title":"Import plugin","text":""},{"location":"fadeoutdestroy/#import-method","title":"Import method","text":""},{"location":"fadeoutdestroy/#fade-out-destroy","title":"Fade-out-destroy","text":"
    var fade = scene.plugins.get('rexFade').fadeOutDestroy(gameObject, duration);\n
    "},{"location":"fadeoutdestroy/#events","title":"Events","text":"

    See Events of tween task

    "},{"location":"fadevolume/","title":"Volume fading","text":""},{"location":"fadevolume/#introduction","title":"Introduction","text":"

    Fade-in/fade-out volume of sound.

    "},{"location":"fadevolume/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"fadevolume/#install-plugin","title":"Install plugin","text":""},{"location":"fadevolume/#load-minify-file","title":"Load minify file","text":""},{"location":"fadevolume/#import-plugin","title":"Import plugin","text":""},{"location":"fadevolume/#import-method","title":"Import method","text":""},{"location":"fadevolume/#fade-in","title":"Fade in","text":""},{"location":"fadevolume/#fade-out","title":"Fade out","text":""},{"location":"filechooser/","title":"File chooser","text":""},{"location":"filechooser/#introduction","title":"Introduction","text":"

    Create a transparent file chooser button (<input type=\"file\">).

    "},{"location":"filechooser/#live-demos","title":"Live demos","text":""},{"location":"filechooser/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"filechooser/#install-plugin","title":"Install plugin","text":""},{"location":"filechooser/#load-minify-file","title":"Load minify file","text":""},{"location":"filechooser/#import-plugin","title":"Import plugin","text":""},{"location":"filechooser/#import-class","title":"Import class","text":""},{"location":"filechooser/#add-file-chooser-object","title":"Add file chooser object","text":"
    var fileChooser = scene.add.rexFileChooser({\naccept: '',\nmultiple: false\n});\n// var fileChooser = scene.add.rexFileChooser(x, y, width, height, config);\n
    "},{"location":"filechooser/#custom-class","title":"Custom class","text":""},{"location":"filechooser/#sync","title":"Sync","text":"

    Sync position, size and origin to another game object.

    fileChooser.syncTo(gameObject);\n
    "},{"location":"filechooser/#selected-files","title":"Selected files","text":"
    var files = fileChooser.files;\n
    "},{"location":"filechooser/#set-accept-filter","title":"Set accept filter","text":"
    fileChooser.setAccept(accept);\n
    "},{"location":"filechooser/#multiple-files","title":"Multiple files","text":""},{"location":"filechooser/#events","title":"Events","text":""},{"location":"filechooser/#load-file-to-cache","title":"Load file to cache","text":"
    fileChooser.loadFile(file, loaderType, key);\n// fileChooser.loadFile(file, loaderType, key, cahceType);\n

    or

    fileChooser.loadFilePromise(file, loaderType, key, cahceType)\n.then(function(content) {\n\n})\n
    "},{"location":"filechooser/#create-object-url","title":"Create object URL","text":""},{"location":"filechooser/#open-file-chooser","title":"Open file chooser","text":"

    Failure

    This method can't run at ipad.

    Note

    Open a file chooser dialog under any touch event. i.e. User can't open file chooser dialog directly.

    scene.plugins.get('rexFileChooser').open({\n// accept: '',\n// multiple: false,\n// closeDelay: 200\n})\n.then(function(result) {\n// var files = result.files;\n})\n
    "},{"location":"filechooser/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"

    See dom-element's Interactive with other game objects

    "},{"location":"filedropzone/","title":"File drop zone","text":""},{"location":"filedropzone/#introduction","title":"Introduction","text":"

    Create a div element for dropping file(s).

    "},{"location":"filedropzone/#live-demos","title":"Live demos","text":""},{"location":"filedropzone/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"filedropzone/#install-plugin","title":"Install plugin","text":""},{"location":"filedropzone/#load-minify-file","title":"Load minify file","text":""},{"location":"filedropzone/#import-plugin","title":"Import plugin","text":""},{"location":"filedropzone/#import-class","title":"Import class","text":""},{"location":"filedropzone/#add-file-drop-zone-object","title":"Add file-drop-zone object","text":"
    var fileDropZone = scene.add.rexFileDropZone({\n// style: { },\n\n// dropEnable: true,\n// filters: { filterType: (file, files) => boolean }\n});\n// var fileDropZone = scene.add.rexFileDropZone(x, y, width, height, config);\n
    "},{"location":"filedropzone/#custom-class","title":"Custom class","text":""},{"location":"filedropzone/#sync","title":"Sync","text":"

    Sync position, size and origin to another game object.

    fileDropZone.syncTo(gameObject);\n
    "},{"location":"filedropzone/#dropped-files","title":"Dropped files","text":"
    var files = fileDropZone.files;\n
    "},{"location":"filedropzone/#events","title":"Events","text":"

    Warning

    Game objects under this file drop zone can't receive touch input events.

    "},{"location":"filedropzone/#enable-drop-events","title":"Enable drop events","text":""},{"location":"filedropzone/#load-file-to-cache","title":"Load file to cache","text":"
    fileDropZone.loadFile(file, loaderType, key);\n// fileDropZone.loadFile(file, loaderType, key, cahceType, onComplete);\n

    or

    fileDropZone.loadFilePromise(file, loaderType, key, cahceType)\n.then(function(content) {\n\n})\n
    "},{"location":"filedropzone/#create-object-url","title":"Create object URL","text":""},{"location":"filedropzone/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"

    See dom-element's Interactive with other game objects

    "},{"location":"firebase-auth/","title":"Authentication","text":""},{"location":"firebase-auth/#introduction","title":"Introduction","text":"

    It supports authentication using passwords, phone numbers, popular federated identity providers like Google, Facebook and Twitter, and more.

    "},{"location":"firebase-auth/#usage","title":"Usage","text":"

    Official document

    Sample code

    "},{"location":"firebase-auth/#setup","title":"Setup","text":"
    1. Import firestore
      import firebase from 'firebase/app';\nimport 'firebase/auth';\n
      Firebase has been included in package.json.
    2. Initialize
      var firebaseApp = firebase.initializeApp({\napiKey: '...',\nauthDomain: '...',\ndatabaseURL: '...',\nprojectId: '...',\nstorageBucket: '...',\nmessagingSenderId: '...'\n});\n
    "},{"location":"firebase-auth/#on-sign-insign-out","title":"On sign-in/sign-out","text":"
    firebaseApp.auth().onAuthStateChanged(function (user) {\nif (user) {\n// User is signed in.\nvar displayName = user.displayName;\nvar email = user.email;\nvar emailVerified = user.emailVerified;\nvar photoURL = user.photoURL;\nvar isAnonymous = user.isAnonymous;\nvar uid = user.uid;\nvar providerData = user.providerData;\n// ...\n} else {\n// User is signed out.\n// ...\n}\n});\n
    "},{"location":"firebase-auth/#sign-in-with-facebook","title":"Sign-in with facebook","text":"
    var provider = new firebase.auth.FacebookAuthProvider();\nfirebaseApp.auth().signInWithPopup(provider).then(function (result) {\n// This gives you a Facebook Access Token. You can use it to access the Facebook API.\nvar token = result.credential.accessToken;\n// The signed-in user info.\nvar user = result.user;\n// ...\n}).catch(function (error) {\n// Handle Errors here.\nvar errorCode = error.code;\nvar errorMessage = error.message;\n// The email of the user's account used.\nvar email = error.email;\n// The firebase.auth.AuthCredential type that was used.\nvar credential = error.credential;\n// ...\n});\n
    "},{"location":"firebase-auth/#sign-in-with-google","title":"Sign-in with Google","text":"
    var provider = new firebase.auth.GoogleAuthProvider();\nfirebaseApp.auth().signInWithPopup(provider).then(function (result) {\n// This gives you a Google Access Token. You can use it to access the Google API.\nvar token = result.credential.accessToken;\n// The signed-in user info.\nvar user = result.user;\n// ...\nconsole.log(user);\n}).catch(function (error) {\n// Handle Errors here.\nvar errorCode = error.code;\nvar errorMessage = error.message;\n// The email of the user's account used.\nvar email = error.email;\n// The firebase.auth.AuthCredential type that was used.\nvar credential = error.credential;\n// ...\n});\n
    "},{"location":"firebase-auth/#sign-in-with-password","title":"Sign-in with password","text":""},{"location":"firebase-auth/#sign-out","title":"Sign-out","text":"
    firebaseApp.auth().signOut();\n
    "},{"location":"firebase-auth/#current-sign-in-user","title":"Current sign-in user","text":"
    var user = firebaseApp.auth().currentUser;\nif (user != null) {\nvar name = user.displayName;\nvar email = user.email;\nvar photoUrl = user.photoURL;\nvar emailVerified = user.emailVerified;\nvar uid = user.uid;\n}\n
    "},{"location":"firebase-auth/#update-email","title":"Update email","text":"
    user.updateEmail('...').then(function() {\n// Update successful.\n}).catch(function(error) {\n// An error happened.\n});\n
    "},{"location":"firebase-auth/#update-profile","title":"Update profile","text":"
    user.updateProfile({\ndisplayName: '...',\nphotoURL: '...'\n}).then(function() {\n// Update successful.\n}).catch(function(error) {\n// An error happened.\n});\n
    "},{"location":"firebase-auth/#send-a-verification-email","title":"Send a verification email","text":"
    user.sendEmailVerification().then(function() {\n// Email sent.\n}).catch(function(error) {\n// An error happened.\n});\n
    "},{"location":"firebase-broadcast/","title":"Broadcast","text":""},{"location":"firebase-broadcast/#introduction","title":"Introduction","text":"

    Broadcast real-time messages, using firebase-database.

    "},{"location":"firebase-broadcast/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-broadcast/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-broadcast/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-broadcast/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-broadcast/#import-class","title":"Import class","text":""},{"location":"firebase-broadcast/#create-instance","title":"Create instance","text":"
    var messager = scene.plugins.get('rexFirebase').add.broadcast({\nroot: '',\n// senderID: '',\n// senderName: '',\n// receiverID: '',\n// history: 0\n});\n
    "},{"location":"firebase-broadcast/#send-message","title":"Send message","text":"
    1. Set sender in config, or setSender method.
      messager.setSender(userID, userName);\n
      or
      messager.setSender({\nuserID: userID,\nuserName: userName\n});\n
    2. Set receiver in config, or setReceiver method.
      messager.setReceiver(receiverID);\n
    3. Send message to receiverID.
      messager.send(message)\n// .then(function() { })\n// .catch(function() { })\n
    "},{"location":"firebase-broadcast/#receive-messages","title":"Receive messages","text":"
    1. Register receive event
      messager.on('receive', function(data){\n// var senderID = data.senderID;\n// var senderName = data.senderName;\n// var message = data.message;\n})\n
    2. Set receiver in config, or setReceiver method
      messager.setReceiver(receiverID);\n
    3. Start receiving
      messager.startReceiving();\n
    4. Stop receive
      messager.stopReceiving();\n

    Only receive messages after invoking startReceiving method. Previous messages won't be got anymore.

    "},{"location":"firebase-broadcast/#received-messages","title":"Received messages","text":"

    Received messages will be saved in client side.

    "},{"location":"firebase-files/","title":"Files","text":""},{"location":"firebase-files/#introduction","title":"Introduction","text":"

    Save JSON data, using firebase-firestore.

    Each owner has several files, each file contains header and content indexed by fileID.

    "},{"location":"firebase-files/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-files/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-files/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-files/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-files/#import-class","title":"Import class","text":""},{"location":"firebase-files/#create-instance","title":"Create instance","text":"
    var fileManager = scene.plugins.get('rexFirebase').add.files({\nroot: ''\n});\n
    "},{"location":"firebase-files/#save-file","title":"Save file","text":"
    1. Set file owner.
      fileManager.setOwner(userID);\n
      or
      fileManager.setOwner({\nuserID: userID\n});\n
    2. Save header and content data.
    "},{"location":"firebase-files/#load-headers","title":"Load headers","text":"
    1. Set file owner.
      fileManager.setOwner(userID);\n
    2. Load all headers of this file owner.
      fileManager.loadHeaders()\n.then(function(result) { // var headers = result.headers;\n// var userID = result.userID;\n})\n.catch(function(result) {\n// var error = result.error;\n// var userID = result.userID;\n})\n
    "},{"location":"firebase-files/#load-file","title":"Load file","text":"
    1. Set file owner.
      fileManager.setOwner(userID);\n
    2. Load file.
      fileManager.load(fileID)\n.then(function(result) { // var header = result.header;\n// var content = result.content;\n// var fileID = result.fileID;\n// var userID = result.userID;\n})\n.catch(function(result) {\n// var error = result.error;\n// var fileID = result.fileID;\n// var userID = result.userID;\n})\n
    "},{"location":"firebase-firestore/","title":"Firestore","text":""},{"location":"firebase-firestore/#introduction","title":"Introduction","text":"

    Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud Platform.

    "},{"location":"firebase-firestore/#usage","title":"Usage","text":"

    Official document

    Sample code

    "},{"location":"firebase-firestore/#setup","title":"Setup","text":"
    1. Import firestore
      import firebase from 'firebase/app';\nimport 'firebase/firestore';\n
      Firebase has been included in package.json.
    2. Initialize
      var firebaseApp = firebase.initializeApp({\napiKey: '...',\nauthDomain: '...',\ndatabaseURL: '...',\nprojectId: '...',\nstorageBucket: '...',\nmessagingSenderId: '...'\n});\nvar db = firebaseApp.firestore();\ndb.settings({\ntimestampsInSnapshots: true\n})\n
    "},{"location":"firebase-firestore/#references","title":"References","text":""},{"location":"firebase-firestore/#save","title":"Save","text":"

    Limitation: Writes and transactions section

    "},{"location":"firebase-firestore/#server-timestamp","title":"Server timestamp","text":"
    firebase.firestore.FieldValue.serverTimestamp()\n
    "},{"location":"firebase-firestore/#load","title":"Load","text":""},{"location":"firebase-firestore/#paginate","title":"Paginate","text":""},{"location":"firebase-firestore/#get-realtime-updates","title":"Get realtime updates","text":""},{"location":"firebase-firestore/#indexing","title":"Indexing","text":"

    Reference

    "},{"location":"firebase-idalias/","title":"ID-alias","text":""},{"location":"firebase-idalias/#introduction","title":"Introduction","text":"

    Map an unique ID to another unique ID (alias), using firebase-firestore.

    Each owner has several files, each file contains header and content indexed by fileID.

    "},{"location":"firebase-idalias/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-idalias/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-idalias/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-idalias/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-idalias/#import-class","title":"Import class","text":""},{"location":"firebase-idalias/#create-instance","title":"Create instance","text":"
    var idAlias = scene.plugins.get('rexFirebase').add.idAlias({\nroot: ''\n});\n
    "},{"location":"firebase-idalias/#random-alias","title":"Random alias","text":"

    Get alias of an id, or register an alias from a random word.

    idAlias.getRandomAlias(id, {\ndigits: 10,\ncandidates: '0123456789',\nretry: 1000\n})\n.then(function(result) { // var alias = result.alias;\n// var id = result.id;\n})\n.catch(function(error) { })\n
    "},{"location":"firebase-idalias/#specific-alias","title":"Specific alias","text":""},{"location":"firebase-itemtable/","title":"Item table","text":""},{"location":"firebase-itemtable/#introduction","title":"Introduction","text":"

    1d/2d/3d table, using firebase-database.

    "},{"location":"firebase-itemtable/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-itemtable/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-itemtable/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-itemtable/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-itemtable/#import-class","title":"Import class","text":""},{"location":"firebase-itemtable/#create-instance","title":"Create instance","text":"
    var table = scene.plugins.get('rexFirebase').add.itemTable({\nroot: '',\ntype: 3\n});\n
    "},{"location":"firebase-itemtable/#write","title":"Write","text":""},{"location":"firebase-itemtable/#read","title":"Read","text":""},{"location":"firebase-itemtable/#events","title":"Events","text":""},{"location":"firebase-itemtable/#1d-table","title":"1d table","text":"

    1d table, indexing by (key0)

    "},{"location":"firebase-itemtable/#2d-table","title":"2d table","text":"

    2d table, indexing by (key0, key1)

    "},{"location":"firebase-itemtable/#3d-table","title":"3d table","text":"

    3d table, indexing by (key0, key1, key2)

    "},{"location":"firebase-leaderboard/","title":"Leaderboard","text":""},{"location":"firebase-leaderboard/#introduction","title":"Introduction","text":"

    Descending sort scores, using firebase-firestore.

    "},{"location":"firebase-leaderboard/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-leaderboard/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-leaderboard/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-leaderboard/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-leaderboard/#import-class","title":"Import class","text":""},{"location":"firebase-leaderboard/#create-instance","title":"Create instance","text":"
    var leaderBoard = scene.plugins.get('rexFirebase').add.leaderBoard({\nroot: '',\n// timeFilters: false,\n// timeFilterType: 'year',\n// pageItemCount: 100,\n// userID: '',\n// userName: '',\n// boardID: undefined,\n// tag: undefined\n});\n

    Time filter enabled

    Add indexes if time filter is enabled. - tagD(ascending), scoreD(descending), boardID(ascending), tag(ascending) - tagW(ascending), scoreW(descending), boardID(ascending), tag(ascending) - tagM(ascending), scoreM(descending), boardID(ascending), tag(ascending) - tagY(ascending), scoreY(descending), boardID(ascending), tag(ascending) - tagA(ascending), scoreA(descending), boardID(ascending), tag(ascending)

    "},{"location":"firebase-leaderboard/#post-score","title":"Post score","text":"
    1. Set user.
      leaderBoard.setUser(userID, userName);\n
      or
      leaderBoard.setUser({\nuserID: userID,\nuserName: userName\n});\n
    2. Set board property, optional.
    3. Post score
      leaderBoard.post(score)\n// leaderBoard.post(score, extraData)\n// leaderBoard.post(score, extraData, timestamp)\n.then(function(record) { })\n.catch(function(error) { })\n
    "},{"location":"firebase-leaderboard/#get-my-score","title":"Get my score","text":"
    leaderBoard.getScore()\n// leaderBoard.getScore(userID)\n.then(function(score) { })\n.catch(function(error) { })\n
    "},{"location":"firebase-leaderboard/#get-my-rank","title":"Get my rank","text":"
    leaderBoard.getRank()\n// leaderBoard.getRank(userID)\n.then(function(rank) { })\n.catch(function(error) { })\n
    "},{"location":"firebase-leaderboard/#get-scores","title":"Get scores","text":"
    1. Set board property, optional.
    2. Set time filter, optional.
      leaderBoard.setTimeFilterType(type);\n
    3. Load scores page by page.
    "},{"location":"firebase-leaderboard/#page-index","title":"Page index","text":""},{"location":"firebase-leaderboard/#delete","title":"Delete","text":""},{"location":"firebase-messages/","title":"Messages","text":""},{"location":"firebase-messages/#introduction","title":"Introduction","text":"

    Store messages in firebase-firestore.

    "},{"location":"firebase-messages/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-messages/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-messages/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-messages/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-messages/#import-class","title":"Import class","text":""},{"location":"firebase-messages/#create-instance","title":"Create instance","text":"
    var messages = scene.plugins.get('rexFirebase').add.messages({\nroot: '',\n// pageItemCount: 100,\n\n// senderID: '',\n// senderName: '',\n// receiverID: undefined,\n});\n
    "},{"location":"firebase-messages/#send-message","title":"Send message","text":"
    1. Set sender.
      messages.setSender(userID, userName);\n
      or
      messages.setSender({\nuserID: userID,\nuserName: userName\n});\n
    2. Set receiver, optional.
      messages.setReceiver(userID);\n
    3. Send message
      messages.send(message)    .then(function() { })\n.catch(function(error) { })\n
    "},{"location":"firebase-messages/#receive-messages","title":"Receive messages","text":"
    1. Set receiverID, optional.
      messages.setReceiver(userID)\n
    2. Load previous messages, optional.
      messages.loadPreviousMessages()\n.then(function(messageObjs) { })\n.catch(function(error) { })    
    3. Add 'receiver' event.
      messages.on('receive', function(messageObj) {\n// var senderID = messageObj.senderID;\n// var senderName = messageObj.senderName;\n// var receiverID = messageObj.receiverID;\n// var message = messageObj.message;\n// var timestamp = messageObj.timestamp;\n})\n
    4. Start receiving
      messages.startReceiving();\n
    5. Stop receiving
      messages.stopReceiving();\n

    Received messages will be stored in messages.cacheMessages

    "},{"location":"firebase-onlineuserlist/","title":"Online user list","text":""},{"location":"firebase-onlineuserlist/#introduction","title":"Introduction","text":"

    Online user list, using firebase-database.

    "},{"location":"firebase-onlineuserlist/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-onlineuserlist/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-onlineuserlist/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-onlineuserlist/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-onlineuserlist/#import-class","title":"Import class","text":""},{"location":"firebase-onlineuserlist/#create-instance","title":"Create instance","text":"
    var userList = scene.plugins.get('rexFirebase').add.onlineUserList({\nroot: '',\n// maxUsers: 0,\n\n// userID: '',\n// userName: '',\n});\n
    "},{"location":"firebase-onlineuserlist/#join","title":"Join","text":"
    1. Set userID and user name.
      userList.setUser(userID, userName);\n
      or
      userList.setUser({\nuserID: userID,\nuserName: userName\n});\n
    2. Join list.
      userList.join()\n// .then(function() { })\n// .catch(function() { })\n
    "},{"location":"firebase-onlineuserlist/#leave","title":"Leave","text":"
    userList.leave()\n// .then(function() { })\n// .catch(function() { })\n
    "},{"location":"firebase-onlineuserlist/#kick-user","title":"Kick user","text":"
    userList.leave(userID)\n// .then(function() { })\n// .catch(function() { })\n
    "},{"location":"firebase-onlineuserlist/#change-user-name","title":"Change user name","text":"
    userList.changeUserName(newUserName)\n// .then(function() { })\n// .catch(function() { })\n
    "},{"location":"firebase-onlineuserlist/#user-list","title":"User list","text":""},{"location":"firebase-onlineuserlist/#events","title":"Events","text":""},{"location":"firebase-overview/","title":"Firebase overview","text":""},{"location":"firebase-overview/#introduction","title":"Introduction","text":""},{"location":"firebase-overview/#usage","title":"Usage","text":""},{"location":"firebase-overview/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-overview/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-overview/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-singleroom/","title":"Single room","text":""},{"location":"firebase-singleroom/#introduction","title":"Introduction","text":"

    Chat room, using firebase-database.

    "},{"location":"firebase-singleroom/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-singleroom/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-singleroom/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-singleroom/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-singleroom/#import-class","title":"Import class","text":""},{"location":"firebase-singleroom/#create-instance","title":"Create instance","text":"
    var room = scene.plugins.get('rexFirebase').add.singleRoom({\nroot: '',\n// maxUsers: 0,\n// userID: '',\n// userName: '',\n// broadcast: true,\n// tables: undefined,\n\n});\n
    "},{"location":"firebase-singleroom/#join-room","title":"Join room","text":"
    1. Set userID and user name.
      room.setUser(userID, userName);\n
    2. Join room.
      room.joinRoom();\n
    "},{"location":"firebase-singleroom/#leave-room","title":"Leave room","text":"
    room.leaveRoom();\n
    "},{"location":"firebase-singleroom/#kick-user","title":"Kick user","text":"
    room.kickUser(userID);\n
    "},{"location":"firebase-singleroom/#user-list","title":"User list","text":""},{"location":"firebase-singleroom/#send-message","title":"Send message","text":"
    room.broadcast.send(message);\n
    "},{"location":"firebase-singleroom/#receive-messages","title":"Receive messages","text":"
    1. Register receive event
      room.on('broadcast.receive', function(data){\n// var senderID = data.senderID;\n// var senderName = data.senderName;\n// var message = data.message;\n})\n

    Only receive messages after joined room. Previous messages won't be got anymore.

    "},{"location":"firebase-singleroom/#received-messages","title":"Received messages","text":"

    Received messages will be saved in client side.

    "},{"location":"firebase-singleroom/#change-user-name","title":"Change user name","text":"
    room.changeUserName(newUserName);\n
    "},{"location":"firebase-singleroom/#tables","title":"Tables","text":""},{"location":"firebase-singleroom/#write","title":"Write","text":"

    See here

    "},{"location":"firebase-singleroom/#read","title":"Read","text":"

    See here

    "},{"location":"firebase-singleroom/#events","title":"Events","text":""},{"location":"firebase-singleroom/#user-list-events","title":"User list events","text":""},{"location":"firebase-singleroom/#broadcast-events","title":"Broadcast events","text":""},{"location":"firebase-singleroom/#table-events","title":"Table events","text":"

    Event names of each table indexed by key

    "},{"location":"firebase-storage/","title":"Storage","text":""},{"location":"firebase-storage/#introduction","title":"Introduction","text":"

    It supports authentication using passwords, phone numbers, popular federated identity providers like Google, Facebook and Twitter, and more.

    "},{"location":"firebase-storage/#usage","title":"Usage","text":"

    Official document

    Sample code

    "},{"location":"firebase-storage/#setup","title":"Setup","text":"
    1. Import firestore
      import firebase from 'firebase/app';\nimport 'firebase/storage';\n
      Firebase has been included in package.json.
    2. Initialize
      var firebaseApp = firebase.initializeApp({\napiKey: '...',\nauthDomain: '...',\ndatabaseURL: '...',\nprojectId: '...',\nstorageBucket: '...',\nmessagingSenderId: '...'\n});\nvar storageRef = firebaseApp.storage().ref();\n
    "},{"location":"firebase-storage/#upload-string","title":"Upload string","text":""},{"location":"firebase-storage/#upload-image","title":"Upload image","text":"
    1. Get image from image texture
      var image = scene.textures.get(key).getSourceImage();\n
    2. Copy image to canvas
      var canvas = CanvasPool.create(scene, image.width, image.height);\nvar ctx = canvas.getContext('2d');\nctx.drawImage(image, 0, 0, image.width, image.height);\n
    3. Get blob from canvas, then upload this blob.
      var uploadTask;\ncanvasToBlob(canvas)\n.then(function(blob) {\nvar metadata = {\ncontentType: 'image/jpeg',\n};        var fileRef = storageRef.child('path/to/filename');\nuploadTask = fileRef.put(blob, metadata);\nreturn uploadTask;\n})\n.then(function (snapshot) {})\n.catch(function (error) {});\n
      Reference: canvasToBlob
    4. Free canvas
      CanvasPool.remove(canvas);\n
    "},{"location":"firebase-storage/#upload-task","title":"Upload task","text":""},{"location":"firebase-storage/#download-file","title":"Download file","text":"
    1. Get download url
      var fileRef = storageRef.child('path/to/filename');\nfileRef.getDownloadURL()\n.then(function(url) {})\n.catch(function (error) {});\n
    2. Download file by loader
    "},{"location":"firebase-storage/#delete-file","title":"Delete file","text":"
    var fileRef = storageRef.child('path/to/filename');\nfileRef.delete()\n.then(function() {})\n.catch(function(error) {});\n
    "},{"location":"flash/","title":"Flash","text":""},{"location":"flash/#introduction","title":"Introduction","text":"

    Flashing (set invisible then visible) game object.

    "},{"location":"flash/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"flash/#install-plugin","title":"Install plugin","text":""},{"location":"flash/#load-minify-file","title":"Load minify file","text":""},{"location":"flash/#import-plugin","title":"Import plugin","text":""},{"location":"flash/#import-class","title":"Import class","text":""},{"location":"flash/#create-instance","title":"Create instance","text":"
    var flash = scene.plugins.get('rexFlash').add(gameObject, {\n// duration: 500,\n// repeat: 2\n});\n
    "},{"location":"flash/#start-flashing","title":"Start flashing","text":"
    flash.flash();\n// flash.flash(duration, repeat);\n

    or

    flash.flash({\nduration: 500,\nrepeat: 2\n});\n
    "},{"location":"flash/#stop-flashing","title":"Stop flashing","text":"
    flash.stop();\n
    "},{"location":"flash/#enable","title":"Enable","text":""},{"location":"flash/#set-duration","title":"Set duration","text":"
    flash.setDuration(duration);\n// flash.duration = duration;\n
    "},{"location":"flash/#set-repeat","title":"Set repeat","text":"
    flash.setRepeat(repeat);\n// flash.repeat = repeat;\n
    "},{"location":"flash/#events","title":"Events","text":""},{"location":"flash/#status","title":"Status","text":""},{"location":"flip/","title":"Flip","text":""},{"location":"flip/#introduction","title":"Introduction","text":"

    Flipping game object to another face by scaling width/height.

    "},{"location":"flip/#live-demos","title":"Live demos","text":""},{"location":"flip/#usage","title":"Usage","text":"

    Sample code, Sample code-2

    "},{"location":"flip/#install-plugin","title":"Install plugin","text":""},{"location":"flip/#load-minify-file","title":"Load minify file","text":""},{"location":"flip/#import-plugin","title":"Import plugin","text":""},{"location":"flip/#import-class","title":"Import class","text":""},{"location":"flip/#create-instance","title":"Create instance","text":"
    var flip = scene.plugins.get('rexFlip').add(gameObject, {\nface: 'back',\nfront: { key, frame }, // key, or callback\nback: { key, frame },  // key, or callback\n\n// orientation: 0, // 0|'x'|1|'y'\n// duration: 500,\n// delay: 0,\n// ease: 'Sine',\n});\n
    "},{"location":"flip/#start-flipping","title":"Start flipping","text":"
    flip.flip();\n// flip.flip(duration);\n
    "},{"location":"flip/#stop-flipping","title":"Stop flipping","text":"
    flip.stop();\n
    "},{"location":"flip/#set-duration","title":"Set duration","text":"
    flip.setDuration(duration);\n// flip.duration = duration;\n
    "},{"location":"flip/#set-ease","title":"Set ease","text":"
    flip.setEase(ease);\n// flip.ease = ease;\n
    "},{"location":"flip/#faces","title":"Faces","text":""},{"location":"flip/#current-face","title":"Current face","text":""},{"location":"flip/#set-texture-of-face","title":"Set texture of face","text":""},{"location":"flip/#events","title":"Events","text":""},{"location":"flip/#status","title":"Status","text":""},{"location":"format/","title":"Format","text":""},{"location":"format/#introduction","title":"Introduction","text":"

    Format string with variables, built-in method of phaser.

    "},{"location":"format/#usage","title":"Usage","text":"

    Replace %x from an array. x starts from 1.

    // const Format = Phaser.Utils.String.Format;\nvar template = 'hello, %1';\nvar view = ['rex'];\nvar result = Format(template, view);\n
    "},{"location":"fsm/","title":"FSM","text":""},{"location":"fsm/#introduction","title":"Introduction","text":"

    Finite state machine.

    "},{"location":"fsm/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"fsm/#install-plugin","title":"Install plugin","text":""},{"location":"fsm/#load-minify-file","title":"Load minify file","text":""},{"location":"fsm/#import-plugin","title":"Import plugin","text":""},{"location":"fsm/#import-class","title":"Import class","text":""},{"location":"fsm/#create-instance","title":"Create instance","text":""},{"location":"fsm/#create-by-config","title":"Create by config","text":"
    var states = scene.plugins.get('rexFSM').add({\nstart: 'A',   // default: undefined\nstates: {\nA: {\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {},\nupdate: function(time, delta) {},\npreupdate: function(time, delta) {},\npostupdate: function(time, delta) {},\n},\n// ...\n},\ninit: function() {},\nextend: {\ni: 0,\nname: 'abc'\n// ...\n},\nenable: true,\nscene: undefined,\neventEmitter: undefined\n});\n
    "},{"location":"fsm/#inheritance","title":"Inheritance","text":"
    1. Create new class
      class State extends FSM {\nconstructor() {\nsuper();\n}\n\nnext_A() { return 'B' }\n\nenter_A() { /* ... */ }\n\nexit_A() { /* ... */ }\n}\n
      Members: - next_ + stateName: Callback to get next state. - enter_ + stateName: Callback when enter state. - exit_ + stateName: Callback when exit state.
    2. Create instance
      var states = new State();\n
    "},{"location":"fsm/#read-state","title":"Read state","text":""},{"location":"fsm/#start-at-state","title":"Start at state","text":"
    states.start(newState);\n

    Note

    Set new state without triggering any state-changing callbacks or events.

    "},{"location":"fsm/#next-state","title":"Next state","text":"
    graph TB\n\nnext[\"states.next()\"] --> next_A[\"states.next_A()<br>return 'B'\"]\n\nnext_A --> eventStateChange[\"states.emit('statechange', states)<br>states.prevState -> states.state\"]\n\nsubgraph State changing\n\neventStateChange --> exit_A[\"states.exit_A()\"]\nexit_A --> eventExitA[\"states.emit('exit_A', states)\"]\n\neventExitA --> enter_B[\"states.enter_B()\"]\nenter_B --> eventEnterB[\"states.emit('enter_B', states)\"]\n\nsubgraph Exit\nexit_A\neventExitA\nend\n\nsubgraph Enter\nenter_B\neventEnterB\nend\n\nend\n\ngoto[\"states.goto('B')\"] --> eventStateChange\n\nsubgraph Request\n\nsubgraph Next\nnext\nnext_A\nend\n\nsubgraph Goto\ngoto\nend\n\nend
    "},{"location":"fsm/#request","title":"Request","text":""},{"location":"fsm/#state-changing","title":"State-changing","text":"

    These callbacks or events will be triggered if state is changing.

    For example, state is changing from 'A' to 'B'.

    1. event statechange
      states.on('statechange', function(states) {\nconsole.log( states.prevState + '->' + states.state );\n});\n
    2. callback states.exit_A
    3. event exit_A
      states.on('exit_A', function(states) {\n/*...*/\n});\n
    4. callback states.enter_B
    5. event enter_B
      states.on('enter_B', function(states) {\n/*...*/\n});\n
    "},{"location":"fsm/#enable","title":"Enable","text":"
    states.setEnable();\n// states.setEnable(false); // disable\n

    or

    states.toggleEnable();\n

    states.next() and states.goto() will be ignored if disabled.

    "},{"location":"fsm/#update","title":"Update","text":""},{"location":"fsm/#add-new-state","title":"Add new state","text":"

    states.addState(name, {\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {},\nupdate: function(time, delta) {},\npreupdate: function(time, delta) {},\npostupdate: function(time, delta) {},\n})\n
    states.addState({\nname: 'A',\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {},\nupdate: function(time, delta) {},\npreupdate: function(time, delta) {},\npostupdate: function(time, delta) {},\n})\n

    or

    states.addStates({\n'A' : {\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {},\nupdate: function(time, delta) {},\npreupdate: function(time, delta) {},\npostupdate: function(time, delta) {},\n},\n// ...\n})\n
    states.addStates([\n{\nname: 'A',\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {},\nupdate: function(time, delta) {},\npreupdate: function(time, delta) {},\npostupdate: function(time, delta) {},\n},\n// ...\n]);\n

    "},{"location":"fullscreen/","title":"Full screen","text":""},{"location":"fullscreen/#introduction","title":"Introduction","text":"

    Enable or disable full screen mode, built-in method of phaser.

    "},{"location":"fullscreen/#usage","title":"Usage","text":""},{"location":"fullscreen/#enabledisable","title":"Enable/disable","text":"

    Under any input event (touch or keyboard)

    gameObject.setInteractive().on('pointerdown', function() {\nif (scene.scale.isFullscreen) {\nscene.scale.stopFullscreen();\n// On stop fulll screen\n} else {\nscene.scale.startFullscreen();\n// On start fulll screen\n}\n});\n

    Fire one of these events

    "},{"location":"fullscreen/#toggle","title":"Toggle","text":"

    Under any input event (touch or keyboard)

    gameObject.setInteractive().on('pointerdown', function() {\nscene.scale.toggleFullscreen();\nif (scene.scale.isFullscreen) {\n// On start fulll screen\n} else {\n// On stop fulll screen\n}\n});\n
    "},{"location":"fullscreen/#state","title":"State","text":""},{"location":"fullscreen/#events","title":"Events","text":""},{"location":"fullscreen/#with-dom-game-object","title":"With DOM game object","text":"

    Set gameConfig.fullscreenTarget to parent id.

    var config = {\nparent: parentDivID,\nfullscreenTarget: parentDivID\n};\n\nvar game = new Phaser.Game(config);\n
    "},{"location":"fuzzy/","title":"Fuzzy","text":""},{"location":"fuzzy/#introduction","title":"Introduction","text":"

    A wrap of fuzzy logic (MIT license).

    "},{"location":"fuzzy/#live-demos","title":"Live demos","text":""},{"location":"fuzzy/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"fuzzy/#install-plugin","title":"Install plugin","text":""},{"location":"fuzzy/#load-minify-file","title":"Load minify file","text":""},{"location":"fuzzy/#import-plugin","title":"Import plugin","text":""},{"location":"fuzzy/#import-class","title":"Import class","text":""},{"location":"fuzzy/#create-instance","title":"Create instance","text":"
    var fuzzyModule = scene.plugins.get('rexFuzzy').add(`\n// Declare fuzzy sets\nFuzzySetName : left, middle, right, setType\nFuzzySetName : left, middle, right\nFuzzySetName : left, right\n\n// Declare rules\nFuzzySetNameA => FuzzySetNameT\nFuzzySetNameA and FuzzySetNameB => FuzzySetNameT\nFuzzySetNameA or FuzzySetNameB => FuzzySetNameT\nFuzzySetNameA or (FuzzySetNameA and FuzzySetNameB) => FuzzySetNameT\n\n// More comment lines...\n`);\n
    "},{"location":"fuzzy/#set-input","title":"Set input","text":"
    fuzzyModule.fuzzify(variableName, value);\n

    or

    fuzzyModule.fuzzify({\nvarName: value,\n});\n
    "},{"location":"fuzzy/#get-result","title":"Get result","text":"
    var result = fuzzyModule.defuzzify(variableName);\n

    or

    var result = fuzzyModule.defuzzify([varName0, varName1, ...]);\n

    or

    var result = fuzzyModule.defuzzify();\n
    "},{"location":"game/","title":"Game","text":""},{"location":"game/#boot","title":"Boot","text":"
    var config = {\ntype: Phaser.AUTO,\nparent: null,\nwidth: 1024,\nheight: 768,\nscale: {\nmode: Phaser.Scale.FIT,\nautoCenter: Phaser.Scale.CENTER_BOTH\n},\n\nscene: null\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"game/#configuration","title":"Configuration","text":"

    Reference

    {\ntype: Phaser.AUTO,\nparent: 'phaser-example',\nwidth: 800,\nheight: 600,\nscale: {\nmode: Phaser.Scale.FIT,\nautoCenter: Phaser.Scale.CENTER_BOTH\n},\ndom: {\ncreateContainer: false,\n},\nscene: null,\nbackgroundColor: 0x333333\n}\n

    or

    {\ntype: Phaser.AUTO,\nparent: null,\nwidth: 800,\nheight: 600,\nscale: {\nmode: Phaser.Scale.NONE,\nautoCenter: Phaser.Scale.NO_CENTER\n},\nautoRound: false,\ncanvas: null,\ncanvasStyle: null,\n\nscene: null,\n\ncallbacks: {\npreBoot: NOOP,\npostBoot: NOOP\n},\n\nseed: [ (Date.now() * Math.random()).toString() ],\n\ntitle: '',\nurl: 'https://phaser.io',\nversion: '',\n\ninput: {\nkeyboard: {\ntarget: window\n},\nmouse: {\ntarget: null,\ncapture: true\n},\nactivePointers: 1,\ntouch: {\ntarget: null,\ncapture: true\n},\nsmoothFactor: 0,\ngamepad: false,\nwindowEvents: true,\n},\ndisableContextMenu: false,\n\nbackgroundColor: 0,\n\nrender: {\nantialias: true,\nantialiasGL: true,\ndesynchronized: false,\npixelArt: false,\nroundPixels: false,\ntransparent: false,\nclearBeforeRender: true,\npreserveDrawingBuffer: false,\npremultipliedAlpha: true,\nfailIfMajorPerformanceCaveat: false,\npowerPreference: 'default', // 'high-performance', 'low-power' or 'default'\nbatchSize: 4096,\nmaxLights: 10,\nmaxTextures: -1,\nmipmapFilter: 'LINEAR', // 'NEAREST', 'LINEAR', 'NEAREST_MIPMAP_NEAREST', 'LINEAR_MIPMAP_NEAREST', 'NEAREST_MIPMAP_LINEAR', 'LINEAR_MIPMAP_LINEAR'\nautoMobilePipeline: true,\ndefaultPipeline: 'MultiPipeline',\npipeline:[]\n},\n\nphysics: {\ndefault: false  // no physics system enabled\n},\n\nloader:{\nbaseURL: '',\npath: '',\nenableParallel: true,\nmaxParallelDownloads: 4,\ncrossOrigin: undefined,\nresponseType: '',\nasync: true,\nuser: '',\npassword: '',\ntimeout: 0,\nwithCredentials: false,\nimageLoadType: 'XHR',    // 'HTMLImageElement' \nlocalScheme: [ 'file://', 'capacitor://' ]\n},\n\nimages: {\ndefault: 'data:image/png;base64....',\nmissing: 'data:image/png;base64....'\n},\n\ndom: {\ncreateContainer: false,\nbehindCanvas: false,\n},\n\nplugins: {\nglobal: [\n//{key, plugin, start}\n],\nscene: [\n// ...\n]\n},\n\npipeline: { key:PipelineClass },\n\nfps: {\nmin: 10,\ntarget: 60,\nforceSetTimeOut: false,\ndeltaHistory: 10\n},\n\ndisableContextMenu: false,\nbanner: {\nhidePhaser: false,\ntext: '#ffffff',\nbackground: [\n'#ff0000',\n'#ffff00',\n'#00ff00',\n'#00ffff',\n'#000000'\n]\n},\n\nstableSort: -1\n}\n
    "},{"location":"game/#destroy","title":"Destroy","text":"
    game.destroy();\n// game.destroy(removeCanvas, noReturn);\n
    "},{"location":"game/#global-members","title":"Global members","text":""},{"location":"game/#scene-manager","title":"Scene manager","text":"

    Global scene manager in game.scene, or scene.scene in each scene.

    "},{"location":"game/#global-data","title":"Global data","text":"

    Instance of data manager in game.registry, or scene.registry in each scene.

    "},{"location":"game/#game-time","title":"Game time","text":""},{"location":"game/#game-config","title":"Game config","text":"
    var config = game.config;\n// var config = scene.game.config;\n
    "},{"location":"game/#window-size","title":"Window size","text":""},{"location":"game/#pause-resume","title":"Pause / Resume","text":""},{"location":"game/#events","title":"Events","text":""},{"location":"gameobject/","title":"Game object","text":""},{"location":"gameobject/#introduction","title":"Introduction","text":"

    Base class of all game object in phaser.

    "},{"location":"gameobject/#usage","title":"Usage","text":""},{"location":"gameobject/#destroy","title":"Destroy","text":""},{"location":"gameobject/#position","title":"Position","text":""},{"location":"gameobject/#local-point","title":"Local point","text":"

    Transfer world point to local point

    var point = gameObject.getLocalPoint(x, y);  // point : {x, y}\n// var out = gameObject.getLocalPoint(x, y, out);\n
    or
    var out = gameObject.getLocalPoint(x, y, out, camera);\n

    "},{"location":"gameobject/#angle","title":"Angle","text":""},{"location":"gameobject/#visible","title":"Visible","text":""},{"location":"gameobject/#alpha","title":"Alpha","text":""},{"location":"gameobject/#flipx-flipy","title":"FlipX, FlipY","text":""},{"location":"gameobject/#order-of-rendering","title":"Order of rendering","text":""},{"location":"gameobject/#depth-z-index","title":"Depth (z-index)","text":"

    The depth starts from zero (the default value) and increases from that point. A game object with a higher depth value will always render in front of one with a lower value.

    "},{"location":"gameobject/#display-list","title":"Display list","text":"
    scene.children.bringToTop(child);\nscene.children.sendToBack(child);\nscene.children.moveUp(child);\nscene.children.moveDown(child);\nscene.children.moveAbove(child1, child2);  // Move child1 above child2\nscene.children.moveBelow(child1, child2);  // Move child1 below child2\nscene.children.moveTo(child, index);\nscene.children.swap(child1, child2);\n
    "},{"location":"gameobject/#layer-game-object","title":"Layer game object","text":"

    Place game object into Layer game object

    "},{"location":"gameobject/#scroll-factor","title":"Scroll factor","text":"

    Scroll factor: 0~1

    "},{"location":"gameobject/#bounds","title":"Bounds","text":"
    var output = gameObject.getTopLeft(output);     // output: {x, y}\nvar output = gameObject.getTopCenter(output);     // output: {x, y}\nvar output = gameObject.getTopRight(output);    // output: {x, y}\nvar output = gameObject.getLeftCenter(output);    // output: {x, y}\nvar output = gameObject.getRightCenter(output);    // output: {x, y}\nvar output = gameObject.getBottomLeft(output);  // output: {x, y}\nvar output = gameObject.getBottomCenter(output);     // output: {x, y}\nvar output = gameObject.getBottomRight(output); // output: {x, y}\nvar output = gameObject.getCenter(output);      // output: {x, y}\nvar output = gameObject.getBounds(output);      // output: {x, y, width, height}\n
    "},{"location":"gameobject/#origin","title":"Origin","text":""},{"location":"gameobject/#tint","title":"Tint","text":""},{"location":"gameobject/#blend-mode","title":"Blend mode","text":""},{"location":"gameobject/#mask","title":"Mask","text":"

    See Mask.

    "},{"location":"gameobject/#built-in-shader-effects","title":"Built-in shader effects","text":"

    See built-in shader effects

    "},{"location":"gameobject/#post-fx-pipeline","title":"Post-fx pipeline","text":""},{"location":"gameobject/#register-post-fx-pipeline","title":"Register post-fx pipeline","text":"

    Some post-fx pipelines:

    "},{"location":"gameobject/#add-post-fx-pipeline","title":"Add post-fx pipeline","text":"
    gameObject.setPostPipeline(PostFxClass);\n
    "},{"location":"gameobject/#remove-post-fx-pipeline","title":"Remove post-fx pipeline","text":""},{"location":"gameobject/#get-post-fx-pipeline","title":"Get post-fx pipeline","text":"
    var pipelineInstance = gameObject.getPostPipeline(PostFxClass);\n
    "},{"location":"gameobject/#size","title":"Size","text":""},{"location":"gameobject/#click","title":"Click","text":"
    gameObject.setInteractive().on('pointerdown', function(pointer, localX, localY, event){\n// ...\n});\n

    See touch event

    "},{"location":"gameobject/#state","title":"State","text":""},{"location":"gameobject/#data","title":"Data","text":"

    See data manager

    Note

    Ensure data manager is created before binding any data-changed events.

    "},{"location":"gameobject/#texture","title":"Texture","text":""},{"location":"gameobject/#name","title":"Name","text":""},{"location":"gameobject/#will-render","title":"Will render","text":""},{"location":"gameobject/#add-to-scenecontainer","title":"Add to scene/container","text":""},{"location":"gameobject/#add","title":"Add","text":"

    Trigger 'addedtoscene' event, which invoke gameObject.addedToScene()

    "},{"location":"gameobject/#remove","title":"Remove","text":"

    Trigger 'removedfromscene' event, which invoke gameObject.removedFromScene()

    "},{"location":"gameobject/#custom-class","title":"Custom class","text":""},{"location":"gamepad/","title":"Gamepad","text":""},{"location":"gamepad/#introduction","title":"Introduction","text":"

    Gamepad's state of buttons, or axis.

    "},{"location":"gamepad/#usage","title":"Usage","text":""},{"location":"gamepad/#get-gamepad","title":"Get gamepad","text":""},{"location":"gamepad/#events","title":"Events","text":""},{"location":"gamepad/#gamepad","title":"Gamepad","text":""},{"location":"gamepad/#buttons","title":"Buttons","text":""},{"location":"gamepad/#axis-sticks","title":"Axis sticks","text":""},{"location":"gamepad/#properties","title":"Properties","text":""},{"location":"gashapon/","title":"Gashapon","text":""},{"location":"gashapon/#introduction","title":"Introduction","text":"

    Pick random item from box.

    "},{"location":"gashapon/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gashapon/#install-plugin","title":"Install plugin","text":""},{"location":"gashapon/#load-minify-file","title":"Load minify file","text":""},{"location":"gashapon/#import-plugin","title":"Import plugin","text":""},{"location":"gashapon/#import-class","title":"Import class","text":""},{"location":"gashapon/#create-instance","title":"Create instance","text":"
    var gashapon = scene.plugins.get('rexGashapon').add({\nmode: 'shuffle',  // 0|'shuffle'|1|'random\nitems: {  // name:count\na:1, b:2, c:3 },\nreload: true,     // true|false\nrnd: undefined,\n});\n
    "},{"location":"gashapon/#pick-item","title":"Pick item","text":""},{"location":"gashapon/#set-item","title":"Set item","text":""},{"location":"gashapon/#remove-item","title":"Remove item","text":""},{"location":"gashapon/#current-status","title":"Current status","text":""},{"location":"gashapon/#get-items","title":"Get items","text":""},{"location":"gashapon/#set-random-generator","title":"Set random generator","text":"
    gashapon.setRND(rnd);\n
    "},{"location":"geom-circle/","title":"Circle","text":""},{"location":"geom-circle/#introduction","title":"Introduction","text":"

    Circle shape and methods, built-in methods of phaser.

    "},{"location":"geom-circle/#usage","title":"Usage","text":""},{"location":"geom-circle/#create-shape","title":"Create shape","text":"
    var circle = new Phaser.Geom.Circle(x, y, radius);\n
    "},{"location":"geom-circle/#clone-shape","title":"Clone shape","text":"
    var circle1 = Phaser.Geom.Circle.Clone(circle0);\n
    "},{"location":"geom-circle/#draw-on-graphics","title":"Draw on graphics","text":"

    Note

    Negative radius will be treated as positive radius. i.e. Math.abs(radius)

    "},{"location":"geom-circle/#set-properties","title":"Set properties","text":""},{"location":"geom-circle/#get-properties","title":"Get properties","text":""},{"location":"geom-circle/#points-shape","title":"Point(s) & shape","text":""},{"location":"geom-circle/#empty","title":"Empty","text":""},{"location":"geom-circle/#equal","title":"Equal","text":"
    var isEqual = Phaser.Geom.Circle.Equals(circle0, circle1);\n

    Position and radius are equal.

    "},{"location":"geom-circle/#intersection","title":"Intersection","text":""},{"location":"geom-circle/#circle-to-circle","title":"Circle to circle","text":""},{"location":"geom-circle/#circle-to-rectangle","title":"Circle to rectangle","text":""},{"location":"geom-circle/#circle-to-triangle","title":"Circle to triangle","text":""},{"location":"geom-circle/#circle-to-line","title":"Circle to line","text":""},{"location":"geom-ellipse/","title":"Ellipse","text":""},{"location":"geom-ellipse/#introduction","title":"Introduction","text":"

    Ellipse shape and methods, built-in methods of phaser.

    "},{"location":"geom-ellipse/#usage","title":"Usage","text":""},{"location":"geom-ellipse/#create-shape","title":"Create shape","text":"
    var ellipse = new Phaser.Geom.Ellipse(x, y, width, height);\n
    "},{"location":"geom-ellipse/#clone-shape","title":"Clone shape","text":"
    var ellipse1 = Phaser.Geom.Ellipse.Clone(ellipse0);\n
    "},{"location":"geom-ellipse/#draw-on-graphics","title":"Draw on graphics","text":"

    Note

    Negative width, height will be treated as positive width, height. i.e. Math.abs(width), Math.abs(height)

    "},{"location":"geom-ellipse/#set-properties","title":"Set properties","text":""},{"location":"geom-ellipse/#get-properties","title":"Get properties","text":""},{"location":"geom-ellipse/#points-shape","title":"Point(s) & shape","text":""},{"location":"geom-ellipse/#empty","title":"Empty","text":""},{"location":"geom-ellipse/#equal","title":"Equal","text":"
    var isEqual = Phaser.Geom.Ellipse.Equals(ellipse0, ellipse1);\n

    Position and width, height are equal.

    "},{"location":"geom-hexagon/","title":"Hexagon","text":""},{"location":"geom-hexagon/#introduction","title":"Introduction","text":"

    Hexagon shape and methods, extends from Polygon geometry object.

    "},{"location":"geom-hexagon/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"geom-hexagon/#install-plugin","title":"Install plugin","text":""},{"location":"geom-hexagon/#load-minify-file","title":"Load minify file","text":""},{"location":"geom-hexagon/#import-plugin","title":"Import plugin","text":""},{"location":"geom-hexagon/#import-class","title":"Import class","text":""},{"location":"geom-hexagon/#create-shape","title":"Create shape","text":"

    var hexagon = scene.plugins.get('rexHexagon').add(x, y, size, orientationType);\n
    or
    var hexagon = scene.plugins.get('rexHexagon').add({\nx: 0,\ny: 0,\nsize: 20,\norientationType: 0     // 0|'flat'|'vertical'|1|'pointy'|'horizontal'\n});\n
    or
    var hexagon = new Phaser.Geom.rexHexagon(x, y, size, orientationType);\n

    "},{"location":"geom-hexagon/#draw-on-graphics","title":"Draw on graphics","text":"

    See Polygon shape.

    "},{"location":"geom-hexagon/#set-properties","title":"Set properties","text":""},{"location":"geom-hexagon/#get-properties","title":"Get properties","text":"

    See Polygon shape.

    "},{"location":"geom-hexagon/#points-shape","title":"Point(s) & shape","text":"

    See Polygon shape.

    "},{"location":"geom-line/","title":"Line","text":""},{"location":"geom-line/#introduction","title":"Introduction","text":"

    Line shape and methods, built-in methods of phaser.

    "},{"location":"geom-line/#usage","title":"Usage","text":""},{"location":"geom-line/#create-shape","title":"Create shape","text":"
    var line = new Phaser.Geom.Line(x1, y1, x2, y2);\n
    "},{"location":"geom-line/#clone-shape","title":"Clone shape","text":"
    var line1 = Phaser.Geom.Line.Clone(line0);\n
    "},{"location":"geom-line/#draw-on-graphics","title":"Draw on graphics","text":"
    // graphics.lineStyle(lineWidth, color, alpha);   // color: 0xRRGGBB\ngraphics.strokeLineShape(line);\n
    "},{"location":"geom-line/#set-properties","title":"Set properties","text":""},{"location":"geom-line/#get-properties","title":"Get properties","text":""},{"location":"geom-line/#points-shape","title":"Point(s) & shape","text":""},{"location":"geom-line/#equal","title":"Equal","text":"
    var isEqual = Phaser.Geom.Line.Equals(line0, line1);\n

    x1, y2, x2, y2 are equal.

    "},{"location":"geom-line/#intersection","title":"Intersection","text":""},{"location":"geom-line/#line-to-circle","title":"Line to circle","text":""},{"location":"geom-line/#line-to-rectangle","title":"Line to rectangle","text":""},{"location":"geom-line/#line-to-triangle","title":"Line to triangle","text":""},{"location":"geom-line/#line-to-line","title":"Line to line","text":""},{"location":"geom-point/","title":"Point","text":""},{"location":"geom-point/#introduction","title":"Introduction","text":"

    Point shape and methods, built-in methods of phaser.

    "},{"location":"geom-point/#usage","title":"Usage","text":""},{"location":"geom-point/#create-shape","title":"Create shape","text":"
    var point = new Phaser.Geom.Point(x, y);\n
    "},{"location":"geom-point/#clone-shape","title":"Clone shape","text":"
    var point1 = Phaser.Geom.Point.Clone(point0);\n
    "},{"location":"geom-point/#draw-on-graphics","title":"Draw on graphics","text":"
    // graphics.fillStyle(color, alpha);   // color: 0xRRGGBB\ngraphics.fillPointShape(point, size);\n
    "},{"location":"geom-point/#set-properties","title":"Set properties","text":""},{"location":"geom-point/#symmetry","title":"Symmetry","text":""},{"location":"geom-point/#get-properties","title":"Get properties","text":""},{"location":"geom-point/#equal","title":"Equal","text":"
    var isEqual = Phaser.Geom.Point.Equals(point0, point1);\n

    x, y are equal.

    "},{"location":"geom-point/#points","title":"Points","text":""},{"location":"geom-point/#intersection","title":"Intersection","text":""},{"location":"geom-point/#point-as-vector","title":"Point as Vector","text":"

    Vector starting at (0,0)

    "},{"location":"geom-polygon/","title":"Polygon","text":""},{"location":"geom-polygon/#introduction","title":"Introduction","text":"

    Polygon shape and methods, built-in methods of phaser.

    "},{"location":"geom-polygon/#usage","title":"Usage","text":""},{"location":"geom-polygon/#create-shape","title":"Create shape","text":"
    var polygon = new Phaser.Geom.Polygon(points);\n
    "},{"location":"geom-polygon/#clone-shape","title":"Clone shape","text":"
    var polygon1 = Phaser.Geom.Polygon.Clone(polygon0);\n
    "},{"location":"geom-polygon/#draw-on-graphics","title":"Draw on graphics","text":""},{"location":"geom-polygon/#set-properties","title":"Set properties","text":"
    polygon.setTo(points);\n// points = [x0, y0, x1, y1, x2, y2, ...] , or [{x,y}, {x,y}, {x,y}, ...]\n
    "},{"location":"geom-polygon/#get-properties","title":"Get properties","text":""},{"location":"geom-polygon/#points-shape","title":"Point(s) & shape","text":""},{"location":"geom-polygon/#vector-to-polygon","title":"Vector to polygon","text":""},{"location":"geom-rectangle/","title":"Rectangle","text":""},{"location":"geom-rectangle/#introduction","title":"Introduction","text":"

    Rectangle shape and methods, built-in methods of phaser.

    "},{"location":"geom-rectangle/#usage","title":"Usage","text":""},{"location":"geom-rectangle/#create-shape","title":"Create shape","text":"
    var rect = new Phaser.Geom.Rectangle(x, y, width, height);\n
    "},{"location":"geom-rectangle/#create-from-points","title":"Create from points","text":"

    All of the given points are on or within its bounds.

    var rect = Phaser.Geom.Rectangle.FromPoints(points);\n// var rect = Phaser.Geom.Rectangle.FromPoints(points, rect);  // push rect\n

    or

    var rect = Phaser.Geom.Rectangle.FromXY(x1, y1, x2, y2);\n// var rect = Phaser.Geom.Rectangle.FromXY(x1, y1, x2, y2, rect);  // push rect\n
    "},{"location":"geom-rectangle/#clone-shape","title":"Clone shape","text":"
    var rect1 = Phaser.Geom.Rectangle.Clone(rect0);\n
    "},{"location":"geom-rectangle/#draw-on-graphics","title":"Draw on graphics","text":"

    Note

    x with positive/negative width is left/right bound y with positive/negative height is top/bottom bound

    "},{"location":"geom-rectangle/#set-properties","title":"Set properties","text":""},{"location":"geom-rectangle/#get-properties","title":"Get properties","text":""},{"location":"geom-rectangle/#points-shape","title":"Point(s) & shape","text":""},{"location":"geom-rectangle/#rectangles","title":"Rectangles","text":""},{"location":"geom-rectangle/#empty","title":"Empty","text":""},{"location":"geom-rectangle/#equal","title":"Equal","text":""},{"location":"geom-rectangle/#intersection","title":"Intersection","text":""},{"location":"geom-rectangle/#rectangle-to-circle","title":"Rectangle to circle","text":""},{"location":"geom-rectangle/#rectangle-to-rectangle","title":"Rectangle to rectangle","text":""},{"location":"geom-rectangle/#rectangle-to-triangle","title":"Rectangle to triangle","text":""},{"location":"geom-rectangle/#rectangle-to-line","title":"Rectangle to line","text":""},{"location":"geom-rhombus/","title":"Rhombus","text":""},{"location":"geom-rhombus/#introduction","title":"Introduction","text":"

    Rhombus shape and methods, extends from Polygon geometry object.

    "},{"location":"geom-rhombus/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"geom-rhombus/#install-plugin","title":"Install plugin","text":""},{"location":"geom-rhombus/#load-minify-file","title":"Load minify file","text":""},{"location":"geom-rhombus/#import-plugin","title":"Import plugin","text":""},{"location":"geom-rhombus/#import-class","title":"Import class","text":""},{"location":"geom-rhombus/#create-shape","title":"Create shape","text":"

    var rhombus = scene.plugins.get('rexRhombus').add(x, y, width, height);\n
    or
    var rhombus = scene.plugins.get('rexRhombus').add({\nx: 0,\ny: 0,\nwidth: 40,\nheight: 20\n});\n
    or
    var rhombus = new rexRhombus(x, y, width, height);\n// var rhombus = new Phaser.Geom.rexRhombus(x, y, width, height);\n

    "},{"location":"geom-rhombus/#draw-on-graphics","title":"Draw on graphics","text":"

    See Polygon shape.

    "},{"location":"geom-rhombus/#set-properties","title":"Set properties","text":""},{"location":"geom-rhombus/#get-properties","title":"Get properties","text":"

    See Polygon shape.

    "},{"location":"geom-rhombus/#points-shape","title":"Point(s) & shape","text":"

    See Polygon shape.

    "},{"location":"geom-triangle/","title":"Triangle","text":""},{"location":"geom-triangle/#introduction","title":"Introduction","text":"

    Triangle shape and methods, built-in methods of phaser.

    "},{"location":"geom-triangle/#usage","title":"Usage","text":""},{"location":"geom-triangle/#create-shape","title":"Create shape","text":"
    var triangle = new Phaser.Geom.Triangle(x1, y1, x2, y2, x3, y3);\n
    "},{"location":"geom-triangle/#clone-shape","title":"Clone shape","text":"
    var triangle1 = Phaser.Geom.Triangle.Clone(triangle0);\n
    "},{"location":"geom-triangle/#equilateral-triangle","title":"Equilateral triangle","text":"
    var triangle = Phaser.Geom.Triangle.BuildEquilateral(x1, y1, length);\n
    "},{"location":"geom-triangle/#right-triangle","title":"Right triangle","text":"
    var triangle = Phaser.Geom.Triangle.BuildRight(x1, y1, width, height);\n
    "},{"location":"geom-triangle/#polygon-to-triangles","title":"Polygon to triangles","text":"
    var out = Phaser.Geom.Triangle.BuildFromPolygon(data);\n// var out = Phaser.Geom.Triangle.BuildFromPolygon(data, holes, scaleX, scaleY);\n// out = Phaser.Geom.Triangle.BuildFromPolygon(data, holes, scaleX, scaleY, out);\n
    "},{"location":"geom-triangle/#draw-on-graphics","title":"Draw on graphics","text":""},{"location":"geom-triangle/#set-properties","title":"Set properties","text":""},{"location":"geom-triangle/#get-properties","title":"Get properties","text":""},{"location":"geom-triangle/#points-shape","title":"Point(s) & shape","text":""},{"location":"geom-triangle/#equal","title":"Equal","text":"
    var isEqual = Phaser.Geom.Triangle.Equals(triangle0, triangle1);\n

    Position and radius are equal.

    "},{"location":"geom-triangle/#intersection","title":"Intersection","text":""},{"location":"geom-triangle/#triangle-to-circle","title":"Triangle to circle","text":""},{"location":"geom-triangle/#triangle-to-rectangle","title":"Triangle to rectangle","text":""},{"location":"geom-triangle/#triangle-to-triangle","title":"Triangle to triangle","text":""},{"location":"geom-triangle/#triangle-to-line","title":"Triangle to line","text":""},{"location":"gesture-overview/","title":"Overview","text":""},{"location":"gesture-overview/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-overview/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-overview/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-overview/#list-of-gesture-plugins","title":"List of gesture plugins","text":""},{"location":"gesture-overview/#one-pointer-gesture","title":"One pointer gesture","text":""},{"location":"gesture-overview/#two-pointers-gesture","title":"Two pointers gesture","text":""},{"location":"gesture-pan/","title":"Pan","text":""},{"location":"gesture-pan/#introduction","title":"Introduction","text":"

    Get pan events of a game object.

    "},{"location":"gesture-pan/#live-demos","title":"Live demos","text":""},{"location":"gesture-pan/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gesture-pan/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-pan/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-pan/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-pan/#import-class","title":"Import class","text":""},{"location":"gesture-pan/#create-instance","title":"Create instance","text":""},{"location":"gesture-pan/#enable","title":"Enable","text":""},{"location":"gesture-pan/#events","title":"Events","text":""},{"location":"gesture-pan/#pan","title":"Pan","text":"
    pan.on('pan', function(pan, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-pan/#pan-start","title":"Pan start","text":"
    pan.on('panstart', function(pan, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-pan/#pan-end","title":"Pan end","text":"
    pan.on('panend', function(pan, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-pan/#is-panned","title":"Is panned","text":"
    var isPanned = pan.isPanned;\n

    Return true if panned.

    "},{"location":"gesture-pan/#other-properties","title":"Other properties","text":""},{"location":"gesture-pinch/","title":"Pinch","text":""},{"location":"gesture-pinch/#introduction","title":"Introduction","text":"

    Get scale factor from 2 dragging touch pointers.

    "},{"location":"gesture-pinch/#live-demos","title":"Live demos","text":"

    Pinch-zoom

    "},{"location":"gesture-pinch/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gesture-pinch/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-pinch/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-pinch/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-pinch/#import-class","title":"Import class","text":""},{"location":"gesture-pinch/#create-instance","title":"Create instance","text":"
    var pinch = scene.rexGestures.add.pinch({\n// enable: true,\n// bounds: undefined,\n\n// threshold: 0,\n});\n
    "},{"location":"gesture-pinch/#enable","title":"Enable","text":""},{"location":"gesture-pinch/#events","title":"Events","text":""},{"location":"gesture-pinch/#on-dragging","title":"On dragging","text":""},{"location":"gesture-pinch/#on-drag-start-on-drag-end","title":"On drag start, on drag end","text":""},{"location":"gesture-pinch/#scale-factor","title":"Scale factor","text":"
    var scaleFactor = pinch.scaleFactor;\n

    Rate of distance change between 2 catched touch pointers. (i.e current distance between 2 catched touch pointers / previous distance ).

    "},{"location":"gesture-pinch/#drag-vector-of-1st-touch-pointer","title":"Drag vector of 1st touch pointer","text":"
    var drag1Vector = pinch.drag1Vector; // {x, y}\n
    "},{"location":"gesture-pinch/#catched-touch-pointers","title":"Catched touch pointers","text":""},{"location":"gesture-pinch/#is-pinched","title":"Is pinched","text":"
    var isPinched = pinch.isPinched;\n

    Return true if pinched.

    "},{"location":"gesture-pinch/#other-properties","title":"Other properties","text":""},{"location":"gesture-press/","title":"Press","text":""},{"location":"gesture-press/#introduction","title":"Introduction","text":"

    Get press events of a game object.

    "},{"location":"gesture-press/#live-demos","title":"Live demos","text":""},{"location":"gesture-press/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gesture-press/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-press/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-press/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-press/#import-class","title":"Import class","text":""},{"location":"gesture-press/#create-instance","title":"Create instance","text":""},{"location":"gesture-press/#enable","title":"Enable","text":""},{"location":"gesture-press/#events","title":"Events","text":""},{"location":"gesture-press/#pressing-start","title":"Pressing start","text":"
    press.on('pressstart', function(press, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-press/#pressing-end","title":"Pressing end","text":"
    press.on('pressend', function(press, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-press/#is-pressed","title":"Is pressed","text":"
    var isPressed = press.isPressed;\n

    Return true if pressed.

    "},{"location":"gesture-press/#other-properties","title":"Other properties","text":""},{"location":"gesture-rotate/","title":"Rotate","text":""},{"location":"gesture-rotate/#introduction","title":"Introduction","text":"

    Get spin angle from 2 dragging touch pointers.

    "},{"location":"gesture-rotate/#live-demos","title":"Live demos","text":""},{"location":"gesture-rotate/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gesture-rotate/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-rotate/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-rotate/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-rotate/#import-class","title":"Import class","text":""},{"location":"gesture-rotate/#create-instance","title":"Create instance","text":"
    var rotate = scene.rexGestures.add.rotate({\n// enable: true,\n// bounds: undefined,\n\n// threshold: 0,\n});\n
    "},{"location":"gesture-rotate/#enable","title":"Enable","text":""},{"location":"gesture-rotate/#events","title":"Events","text":""},{"location":"gesture-rotate/#on-dragging","title":"On dragging","text":""},{"location":"gesture-rotate/#on-drag-start-on-drag-end","title":"On drag start, on drag end","text":""},{"location":"gesture-rotate/#spin-game-object","title":"Spin game object","text":"
    rotate.spinObject(gameObejects);\n

    Drag and spin game objects around current center of 2 dragging pointers. Uses this function under 'rotate' event.

    "},{"location":"gesture-rotate/#spin-angle","title":"Spin angle","text":"
    var angle = rotate.rotation;\n

    Spin angle of 2 dragging pointers, in radius.

    "},{"location":"gesture-rotate/#drag-vector-of-1st-touch-pointer","title":"Drag vector of 1st touch pointer","text":"
    var drag1Vector = rotate.drag1Vector; // {x, y}\n
    "},{"location":"gesture-rotate/#catched-touch-pointers","title":"Catched touch pointers","text":""},{"location":"gesture-rotate/#is-rotated","title":"Is rotated","text":"
    var isRotated = rotate.isRotated;\n

    Return true if pinched.

    "},{"location":"gesture-rotate/#other-properties","title":"Other properties","text":""},{"location":"gesture-swipe/","title":"Swipe","text":""},{"location":"gesture-swipe/#introduction","title":"Introduction","text":"

    Get swipe events of a game object.

    "},{"location":"gesture-swipe/#live-demos","title":"Live demos","text":""},{"location":"gesture-swipe/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gesture-swipe/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-swipe/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-swipe/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-swipe/#import-class","title":"Import class","text":""},{"location":"gesture-swipe/#create-instance","title":"Create instance","text":""},{"location":"gesture-swipe/#enable","title":"Enable","text":""},{"location":"gesture-swipe/#events","title":"Events","text":""},{"location":"gesture-swipe/#swipe","title":"Swipe","text":"
    swipe.on('swipe', function(swipe, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-swipe/#is-swiped","title":"Is swiped","text":"
    var isSwiped = swipe.isSwiped;\n

    Return true if panning.

    "},{"location":"gesture-swipe/#other-properties","title":"Other properties","text":""},{"location":"gesture-tap/","title":"Tap","text":""},{"location":"gesture-tap/#introduction","title":"Introduction","text":"

    Get tap/multi-taps events of a game object.

    "},{"location":"gesture-tap/#live-demos","title":"Live demos","text":""},{"location":"gesture-tap/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gesture-tap/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-tap/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-tap/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-tap/#import-class","title":"Import class","text":""},{"location":"gesture-tap/#create-instance","title":"Create instance","text":""},{"location":"gesture-tap/#enable","title":"Enable","text":""},{"location":"gesture-tap/#events","title":"Events","text":""},{"location":"gesture-tap/#tap","title":"Tap","text":"
    tap.on('tap', function(tap, gameObject, lastPointer){\n}, scope);\n
    tap.on(tapsCount + 'tap', function(tap, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-tap/#tapping-start","title":"Tapping start","text":"

    Each pointer-down will increase taps count and fire tappingstart event.

    tap.on('tappingstart', function(tap, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-tap/#is-tapped","title":"Is tapped","text":"
    var isTapped = tap.isTapped;\n

    Return true if tapped end.

    "},{"location":"gesture-tap/#other-properties","title":"Other properties","text":""},{"location":"graphics/","title":"Graphics","text":""},{"location":"graphics/#introduction","title":"Introduction","text":"

    Drawing on webgl or canvas, built-in game object of phaser.

    "},{"location":"graphics/#usage","title":"Usage","text":""},{"location":"graphics/#add-graphics-object","title":"Add graphics object","text":"
    var graphics = scene.add.graphics();\n

    or

    var graphics = scene.add.graphics({\nx: 0,\ny: 0,\n\n// lineStyle: {\n//     width: 1,\n//     color: 0xffffff,\n//     alpha: 1\n// },\n// fillStyle: {\n//     color: 0xffffff,\n//     alpha: 1\n// },\n\nadd: true\n});\n
    "},{"location":"graphics/#custom-class","title":"Custom class","text":""},{"location":"graphics/#drawing-commands","title":"Drawing commands","text":""},{"location":"graphics/#set-style","title":"Set style","text":""},{"location":"graphics/#clear","title":"Clear","text":"
    graphics.clear();\n
    "},{"location":"graphics/#path","title":"Path","text":"
    graphics.beginPath();\ngraphics.closePath();\ngraphics.fillPath(); // = graphics.fill()\ngraphics.strokePath(); // = graphics.stroke()\n
    "},{"location":"graphics/#rectangle","title":"Rectangle","text":"
    graphics.fillRectShape(rect); // rect: {x, y, width, height}\ngraphics.fillRect(x, y, width, height);\ngraphics.strokeRectShape(rect);  // rect: {x, y, width, height}\ngraphics.strokeRect(x, y, width, height);\n
    "},{"location":"graphics/#rounded-rectangle","title":"Rounded rectangle","text":"
    graphics.fillRoundedRect(x, y, width, height, radius);\ngraphics.strokeRoundedRect(x, y, width, height, radius);\n
    "},{"location":"graphics/#triangle","title":"Triangle","text":"
    graphics.fillTriangleShape(triangle); // triangle: {x1, y1, x2, y2, x3, y3}\ngraphics.fillTriangle(x1, y1, x2, y2, x3, y3);\ngraphics.strokeTriangleShape(triangle); // triangle: {x1, y1, x2, y2, x3, y3}\ngraphics.strokeTriangle(x1, y1, x2, y2, x3, y3);\n
    "},{"location":"graphics/#point","title":"Point","text":"
    graphics.fillPointShape(point, size); // point: {x, y}\ngraphics.fillPoint(x, y, size);\n
    "},{"location":"graphics/#line","title":"Line","text":"
    graphics.strokeLineShape(line); // line: {x1, y1, x2, y2}\ngraphics.lineBetween(x1, y1, x2, y2);\ngraphics.lineTo(x, y);\ngraphics.moveTo(x, y);\n
    "},{"location":"graphics/#lines","title":"Lines","text":"
    graphics.strokePoints(points, closeShape, closePath, endIndex);  // points: [{x, y}, ...]\ngraphics.fillPoints(points, closeShape, closePath, endIndex);  // points: [{x, y}, ...]\n
    "},{"location":"graphics/#circle","title":"Circle","text":"
    graphics.fillCircleShape(circle); // circle: {x, y, radius}\ngraphics.fillCircle(x, y, radius);\ngraphics.strokeCircleShape(circle);  // circle: {x, y, radius}\ngraphics.strokeCircle(x, y, radius);\n

    Draw or fill circle shape by points.

    "},{"location":"graphics/#ellipse","title":"Ellipse","text":"
    graphics.strokeEllipseShape(ellipse, smoothness);   // ellipse: Phaser.Geom.Ellipse\ngraphics.strokeEllipse(x, y, width, height, smoothness);\ngraphics.fillEllipseShape(ellipse, smoothness);    // ellipse: Phaser.Geom.Ellipse\ngraphics.fillEllipse(x, y, width, height, smoothness);\n

    Draw or fill ellipse shape by points.

    "},{"location":"graphics/#arc","title":"Arc","text":"
    graphics.arc(x, y, radius, startAngle, endAngle, anticlockwise);\ngraphics.arc(x, y, radius, startAngle, endAngle, anticlockwise, overshoot);\n

    Draw arc curve by points.

    "},{"location":"graphics/#pie-chart-slice","title":"Pie-chart slice","text":"
    graphics.slice(x, y, radius, startAngle, endAngle, anticlockwise);\ngraphics.slice(x, y, radius, startAngle, endAngle, anticlockwise, overshoot);\n

    Draw pie-chart slice shape by points.

    Fill this shape

    graphics.fillPath();\n
    "},{"location":"graphics/#clear-pattern","title":"Clear pattern","text":"
    graphics.setTexture();\n
    "},{"location":"graphics/#transfer","title":"Transfer","text":"
    graphics.save();\ngraphics.restore();\ngraphics.translateCanvas(x, y);\ngraphics.scaleCanvas(x, y);\ngraphics.rotateCanvas(radians);\n
    "},{"location":"graphics/#generate-texture","title":"Generate texture","text":"
    graphics.generateTexture(key, width, height);  // key: texture key\n
    "},{"location":"graphics/#create-mask","title":"Create mask","text":"
    var mask = graphics.createGeometryMask();\n

    See mask

    "},{"location":"gridalign/","title":"Quad/Hexagon grid align","text":""},{"location":"gridalign/#introduction","title":"Introduction","text":"

    Align objects on quadrilateral or hexagon grid.

    See also built-in grid-align.

    "},{"location":"gridalign/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gridalign/#install-plugin","title":"Install plugin","text":""},{"location":"gridalign/#load-minify-file","title":"Load minify file","text":""},{"location":"gridalign/#import-plugin","title":"Import plugin","text":""},{"location":"gridalign/#import-class","title":"Import class","text":""},{"location":"gridalign/#quadrilateral-grid","title":"Quadrilateral grid","text":"
    scene.plugins.get('rexGridAlign').quad(gameObjects, {\nwidth: -1,\nheight: -1,\ncellWidth: 1,\ncellHeight: 1,\ntype: 0,\nposition: Phaser.Display.Align.CENTER,\nx: 0,\ny: 0\n});\n
    "},{"location":"gridalign/#hexagon-grid","title":"Hexagon grid","text":"
    scene.plugins.get('rexGridAlign').hexagon(gameObjects, {\nwidth: -1,\nheight: -1,\ncellWidth: 1,\ncellHeight: 1,\nstaggeraxis: 'x',\nstaggerindex: 'odd',\nposition: Phaser.Display.Align.CENTER,\nx: 0,\ny: 0\n});\n
    "},{"location":"gridalign/#types-of-hexagon-grid","title":"Types of hexagon grid","text":"

    Reference

    "},{"location":"gridcutimage/","title":"Grid cut image","text":""},{"location":"gridcutimage/#introduction","title":"Introduction","text":"

    Create image game objects in grids, to assemble target texture.

    "},{"location":"gridcutimage/#live-demos","title":"Live demos","text":""},{"location":"gridcutimage/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gridcutimage/#install-plugin","title":"Install plugin","text":""},{"location":"gridcutimage/#load-minify-file","title":"Load minify file","text":""},{"location":"gridcutimage/#import-plugin","title":"Import plugin","text":""},{"location":"gridcutimage/#import-class","title":"Import class","text":""},{"location":"gridcutimage/#grid-cut","title":"Grid cut","text":"
    scene.plugins.get('rexGridCutImage').gridCut(gameObjects, columns, rows, {\n// onCreateImage: undefined,\n// ImageClass: Phaser.GameObjects.Image,\n\n// originX: 0.5,\n// originY: 0.5,\n// add: true,\n// align: true,\n// objectPool: undefined\n})\n
    "},{"location":"gridtable/","title":"Grid table","text":""},{"location":"gridtable/#introduction","title":"Introduction","text":"

    Viewer of grid table, to manipulate game object of each visible cell.

    "},{"location":"gridtable/#live-demos","title":"Live demos","text":""},{"location":"gridtable/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gridtable/#install-plugin","title":"Install plugin","text":""},{"location":"gridtable/#load-minify-file","title":"Load minify file","text":""},{"location":"gridtable/#import-plugin","title":"Import plugin","text":""},{"location":"gridtable/#import-class","title":"Import class","text":""},{"location":"gridtable/#create-instance","title":"Create instance","text":"
    var table = scene.add.rexGridTable(x, y, width, height, {\nscrollMode: 0,        // 0|'v'|'vertical'|1|'h'|'horizontal'\ncellsCount: 0,\ncolumns: 1,\n// rows: 1,\ncellHeight: 30,\ncellWidth: 30,\n\ncellVisibleCallback: null,\n// cellVisibleCallback: function (cell, cellContainer, table) {},\ncellVisibleCallbackScope: undefined,\nreuseCellContainer: false,\n\ncellInvisibleCallback: null,\n// cellInvisibleCallback: function(cell) {},\ncellInvisibleCallbackScope: undefined,\nclamplTableOXY: true,\n\nmask: {\npadding: 0,\n// updateMode: 0,\n// layer: undefined,\n},\n// enableLayer: false\n});\n

    Add grid table from JSON

    var table = scene.make.rexGridTable({\nx: 0,\ny: 0,\nwidth: 256,\nheight: 256,\n\n// cellsCount: 0,   // total cells count\n// ...\n// origin: {x: 0.5, y: 0.5},\n});\n
    "},{"location":"gridtable/#custom-class","title":"Custom class","text":""},{"location":"gridtable/#cell-begins-visible","title":"Cell begins visible","text":"

    Add container of cell when it begins visible in event cellvisible.

    table.on('cellvisible', function(cell, cellContainer, table){\nif (cellContainer === null) { // No reusable cell container, create a new one\nvar scene = cell.scene;\n// cellContainer = scene.add.container();\n}\n// Set child properties of cell container ...\ncell.setContainer(cellContainer); // Assign cell container\n})\n

    It is equal to cellVisibleCallback in configuration.

    {\n// ...\ncellVisibleCallback: function(cell, cellContainer, table) {\ncell.setContainer(cellContainer); // Assign cell container\n},\n// ...\n}\n

    Each cell only has one container gameObject, old container will be destroyed when assigning a new container.

    "},{"location":"gridtable/#cell-begins-invisible","title":"Cell begins invisible","text":"

    Container of an invisible cell will be destroyed automatically.

    To resue container gameObject

    table.on('cellinvisible', function(cell){\n// var container = cell.popContainer();\n})\n

    It is equal to cellInvisibleCallback in configuration.

    {\n// ...\ncellInvisibleCallback: function(cell) {\n// var container = cell.popContainer();\n},\n// ...\n}\n
    "},{"location":"gridtable/#scroll-table-content","title":"Scroll table content","text":"

    Use case

    Scroll table by scroller behavior.

    "},{"location":"gridtable/#scroll-by-percentage","title":"Scroll by percentage","text":"

    Use case

    Scroll table by slider behavior.

    "},{"location":"gridtable/#scroll-to-bottom","title":"Scroll to bottom","text":"
    table.scrollToBottom();\n
    "},{"location":"gridtable/#scroll-to-row","title":"Scroll to row","text":""},{"location":"gridtable/#refresh-table-content","title":"Refresh table content","text":""},{"location":"gridtable/#table-size-in-cells","title":"Table size in cells","text":""},{"location":"gridtable/#total-cells-count","title":"Total cells count","text":""},{"location":"gridtable/#columns-count","title":"Columns count","text":""},{"location":"gridtable/#table-size-in-pixels","title":"Table size in pixels","text":""},{"location":"gridtable/#bounds-of-tableox-tableoy","title":"Bounds of tableOX, tableOY","text":"

    Use case

    Set bounds of scroller

    "},{"location":"gridtable/#resize-table","title":"Resize table","text":"
    table.resize(width, height);\n
    "},{"location":"gridtable/#cell","title":"Cell","text":""},{"location":"gridtable/#get-cell","title":"Get cell","text":"
    var cell = table.getCell(cellIndex);\n
    "},{"location":"gridtable/#get-cell-from-position","title":"Get cell from position","text":"
    var cellIndex = table.pointToCellIndex(x, y);\nvar cell = table.getCell(cellIndex);\n
    "},{"location":"gridtable/#cell-height","title":"Cell height","text":""},{"location":"gridtable/#cell-width","title":"Cell width","text":""},{"location":"gridtable/#fore-each-visible-cell","title":"Fore each visible cell","text":""},{"location":"gridtable/#container","title":"Container","text":""},{"location":"gridtable/#properties","title":"Properties","text":"
    var cellIndex = cell.index;\n
    "},{"location":"group/","title":"Group","text":""},{"location":"group/#introduction","title":"Introduction","text":"

    Objects pool, built-in game object of phaser.

    "},{"location":"group/#usage","title":"Usage","text":""},{"location":"group/#add-group-object","title":"Add group object","text":"
    var group = scene.add.group(config);\n// var group = scene.add.group(gameObjects, config);  // Add game objects into group\n
    "},{"location":"group/#add-game-object","title":"Add game object","text":"
    group.add(gameObject);\n// group.add(gameObject, true);  // add this game object to display and update list of scene\n
    group.addMultiple(gameObjects);   // array of game objects\n// group.addMultiple(gameObjects, true);\n
    "},{"location":"group/#remove-game-object","title":"Remove game object","text":"
    group.remove(gameObject);\n// group.remove(gameObject, true);  // also remove this game object from display and update list of scene\n

    Remove all game objects

    group.clear();\n// group.clear(removeFromScene, destroyChild);\n
    "},{"location":"group/#get-game-objects","title":"Get game objects","text":""},{"location":"group/#group-actions","title":"Group actions","text":""},{"location":"group/#property","title":"Property","text":""},{"location":"group/#position","title":"Position","text":""},{"location":"group/#angle","title":"Angle","text":""},{"location":"group/#visible","title":"Visible","text":""},{"location":"group/#alpha","title":"Alpha","text":""},{"location":"group/#tint","title":"Tint","text":""},{"location":"group/#blend-mode","title":"Blend mode","text":""},{"location":"group/#scale","title":"Scale","text":""},{"location":"group/#origin","title":"Origin","text":""},{"location":"group/#depth","title":"Depth","text":""},{"location":"group/#animation","title":"Animation","text":""},{"location":"group/#hit-area","title":"Hit area","text":""},{"location":"group/#shuffle","title":"Shuffle","text":""},{"location":"group/#activeinactive-game-objects","title":"Active/inactive game objects","text":""},{"location":"group/#create-game-objects","title":"Create game objects","text":"
    var gameObjects = group.createFromConfig(config);\nvar gameObjects = group.createMultiple(config);    // config in array\n
    "},{"location":"group/#destroy","title":"Destroy","text":""},{"location":"groupactions/","title":"Group actions","text":""},{"location":"groupactions/#introduction","title":"Introduction","text":"

    Set properties of game objects, built-in methods of phaser.

    "},{"location":"groupactions/#usage","title":"Usage","text":""},{"location":"groupactions/#call-function","title":"Call function","text":"
    Phaser.Actions.Call(gameObjects, function(gameObject) {\n\n}, scope);\n
    "},{"location":"groupactions/#set-any-property","title":"Set any property","text":"
    Phaser.Actions.PropertyValueSet(gameObjects, key, value, step, index, direction);\n
    Phaser.Actions.PropertyValueInc(gameObjects, key, value, step, index, direction);\n
    Phaser.Actions.SmootherStep(gameObjects, key, min, max, inc));\n
    Phaser.Actions.SmoothStep(gameObjects, key, min, max, inc));\n
    Phaser.Actions.Spread(gameObjects, key, min, max, inc));\n
    "},{"location":"groupactions/#position","title":"Position","text":"
    Phaser.Actions.SetX(gameObjects, value, step, index, direction);\n
    Phaser.Actions.IncX(gameObjects, value, step, index, direction);\n
    Phaser.Actions.SetY(gameObjects, value, step, index, direction);\n
    Phaser.Actions.IncY(gameObjects, value, step, index, direction);\n
    Phaser.Actions.SetXY(gameObjects, x, y, stepX, stepY, index, direction);\n
    Phaser.Actions.IncXY(gameObjects, x, y, stepX, stepY, index, direction);\n
    "},{"location":"groupactions/#shift-position","title":"Shift position","text":"

    Set the position of first game object to (x, y), others to the position of previous game object.

    Phaser.Actions.ShiftPosition(gameObjects, x, y, direction, output);\n
    "},{"location":"groupactions/#position-on-shape","title":"Position on shape","text":""},{"location":"groupactions/#grid-align","title":"Grid align","text":"
    Phaser.Actions.GridAlign(gameObjects, {\nwidth: -1,\nheight: -1,\ncellWidth: 1,\ncellHeight: 1,\nposition: Phaser.Display.Align.TOP_LEFT,\nx: 0,\ny: 0\n});\n
    "},{"location":"groupactions/#line","title":"Line","text":"

    Line :

    var line = new Phaser.Geom.Line(x1, y1, x2, y2);\n
    Phaser.Actions.PlaceOnLine(gameObjects, line);\n
    Phaser.Actions.RandomLine(gameObjects, line);\n
    "},{"location":"groupactions/#circle","title":"Circle","text":"

    Circle :

    var circle = new Phaser.Geom.Circle(x, y, radius);\n
    Phaser.Actions.PlaceOnCircle(gameObjects, circle, startAngle, endAngle);\n
    Phaser.Actions.RandomCircle(gameObjects, circle);\n
    "},{"location":"groupactions/#ellipse","title":"Ellipse","text":"

    Ellipse :

    var ellipse = new Phaser.Geom.Ellipse(x, y, width, height);\n
    Phaser.Actions.PlaceOnEllipse(gameObjects, ellipse, startAngle, endAngle);\n
    "},{"location":"groupactions/#triangle","title":"Triangle","text":"

    Triangle :

    var triangle = new Phaser.Geom.Triangle(x1, y1, x2, y2, x3, y3);\n
    Phaser.Actions.PlaceOnTriangle(gameObjects, triangle, stepRate);\n
    Phaser.Actions.RandomTriangle(gameObjects, triangle);\n
    "},{"location":"groupactions/#rectangle","title":"Rectangle","text":"

    Rectangle :

    var rect = new Phaser.Geom.Rectangle(x, y, width, height);\n
    Phaser.Actions.PlaceOnRectangle(gameObjects, rect, shift;\n
    Phaser.Actions.RandomRectangle(gameObjects, rect);\n
    Phaser.Actions.WrapInRectangle(gameObjects, rect, padding);\n
    "},{"location":"groupactions/#angle","title":"Angle","text":"
    Phaser.Actions.Angle(gameObjects, value, step, index, direction);\n// value: angle in radians\n
    Phaser.Actions.Rotate(gameObjects, value, step, index, direction);\n// value: angle in degree\n
    Phaser.Actions.RotateAround(gameObjects, point, angle);\n// point: {x, y}, angle: angle in radians\n
    Phaser.Actions.RotateAroundDistance(gameObjects, point, angle, distance);\n// point: {x, y}, angle: angle in radians\n
    "},{"location":"groupactions/#visible","title":"Visible","text":"
    Phaser.Actions.SetVisible(gameObjects, value, index, direction);\n
    Phaser.Actions.ToggleVisible(gameObjects);\n
    "},{"location":"groupactions/#alpha","title":"Alpha","text":"
    Phaser.Actions.SetAlpha(gameObjects, value, step, index, direction);\n
    "},{"location":"groupactions/#tint","title":"Tint","text":"
    Phaser.Actions.setTint(gameObjects, value);\n//Phaser.Actions.setTint(gameObjects, topLeft, topRight, bottomLeft, bottomRight);\n
    "},{"location":"groupactions/#origin","title":"Origin","text":"
    Phaser.Actions.SetOrigin(gameObjects, originX, originY, stepX, stepY, index, direction);\n
    "},{"location":"groupactions/#scale","title":"Scale","text":"
    Phaser.Actions.ScaleX(gameObjects, value, step, index, direction);\n
    Phaser.Actions.ScaleY(gameObjects, value, step, index, direction);\n
    Phaser.Actions.ScaleXY(gameObjects, x, y, stepX, stepY, index, direction);\n
    "},{"location":"groupactions/#scroll-factor","title":"Scroll factor","text":"
    Phaser.Actions.SetScrollFactorX(gameObjects, value, step, index, direction);\n
    Phaser.Actions.SetScrollFactorY(gameObjects, value, step, index, direction);\n
    Phaser.Actions.SetScrollFactor(gameObjects, x, y, stepX, stepY, index, direction);\n
    "},{"location":"groupactions/#depth","title":"Depth","text":"
    Phaser.Actions.SetDepth(gameObjects, value, step, index, direction);\n
    "},{"location":"groupactions/#hit-area","title":"Hit area","text":"
    Phaser.Actions.SetHitArea(gameObjects, hitArea, hitAreaCallback);\n
    "},{"location":"groupactions/#blend-mode","title":"Blend mode","text":"
    Phaser.Actions.SetBlendMode(gameObjects, blendMode, index, direction);\n
    "},{"location":"groupactions/#play-animation","title":"Play animation","text":"
    Phaser.Actions.PlayAnimation(gameObjects, key, ignoreIfPlaying);\n
    "},{"location":"groupactions/#shuffle","title":"Shuffle","text":"
    Phaser.Actions.Shuffle(gameObjects);\n
    "},{"location":"handlebars/","title":"Handlebars","text":""},{"location":"handlebars/#introduction","title":"Introduction","text":"

    Format string with variables, largely compatible with Mustache templates. Reference

    "},{"location":"handlebars/#usage","title":"Usage","text":"
    var template = 'hello, {{name}}';\nvar view = {\nname: 'rex'\n};\nvar result = Mustache.render(template, view);\n
    "},{"location":"handlebars/#pre-compile","title":"Pre-compile","text":"
    const template = Handlebars.compile(\"{{foo}}\");\ntemplate({}, {\n// allowProtoPropertiesByDefault: false,\n// allowProtoMethodsByDefault: false\n});\n
    "},{"location":"hiddeninputtext/","title":"Hidden edit","text":""},{"location":"hiddeninputtext/#introduction","title":"Introduction","text":"

    An invisible Input DOM element to receive character input and display on text, bbocodetext, or tagtext.

    Inspirited from CanvasInput.

    "},{"location":"hiddeninputtext/#live-demos","title":"Live demos","text":""},{"location":"hiddeninputtext/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"hiddeninputtext/#install-plugin","title":"Install plugin","text":""},{"location":"hiddeninputtext/#load-minify-file","title":"Load minify file","text":""},{"location":"hiddeninputtext/#import-plugin","title":"Import plugin","text":""},{"location":"hiddeninputtext/#import-class","title":"Import class","text":""},{"location":"hiddeninputtext/#add-input-text-object","title":"Add input text object","text":"
    var hiddenInputText = scene.plugins.get('rexHiddenInputTextPlugin').add(textGameObject, {\n// inputType: 'text',    // 'text'|'password'|'textarea'|...\n// type: 'text',    // 'text'|'password'|'textarea'|...\n\ncursor: '|',\ncursorFlashDuration: 1000,\n\n// enterClose: true,\n\n// onOpen: function (textObject, hiddenInputText) {   // Or onFocus:\n// },\n// onClose: function (textObject, hiddenInputText) {  // Or onBlur:\n// },\n// onUpdate: function (text, textObject, hiddenInputText) {\n//     return text;\n// },\n});\n

    Note

    This hiddenInputText will be destroyed when textGameObject is destroyed.

    "},{"location":"hiddeninputtext/#custom-class","title":"Custom class","text":""},{"location":"hiddeninputtext/#cursor","title":"Cursor","text":""},{"location":"hiddeninputtext/#open-editor","title":"Open editor","text":"
    hiddenInputText.open();\n
    "},{"location":"hiddeninputtext/#close-editor","title":"Close editor","text":"
    hiddenInputText.close();\n
    "},{"location":"hiddeninputtext/#is-opened","title":"Is opened","text":"
    var isOpened = hiddenInputText.isOpened;\n
    "},{"location":"hiddeninputtext/#select-text","title":"Select text","text":"

    This feature does not support.

    "},{"location":"hiddeninputtext/#bypass-key-input","title":"Bypass key input","text":"

    Registered keyboard events might capture key input.

    var keyObj = scene.input.keyboard.addKey('W', enableCapture, emitOnRepeat);\n

    Set enableCapture to false to bypass key input to this input-text game objecct.

    "},{"location":"hiddeninputtext/#event","title":"Event","text":""},{"location":"i18next/","title":"i18next","text":""},{"location":"i18next/#introduction","title":"Introduction","text":"

    i18next is a very popular internationalization framework for browser or any other javascript environment.

    "},{"location":"i18next/#usage","title":"Usage","text":""},{"location":"i18next/#import-class","title":"Import class","text":""},{"location":"i18next/#initialize","title":"Initialize","text":"
    i18next\n.use(Backend)\n.init({\nlng: 'dev',\nns: 'translation',\n\n// resources: {\n//     'dev': {\n//         'translation': {\n//             key: value,  \n//         }\n//     }\n// }\n\n// debug: true,\n})\n

    See also Configuration Options, and Backend Options

    "},{"location":"i18next/#change-language","title":"Change language","text":"
    i18next.changeLanguage(\"en\");\n

    Fire event 'languageChanged'.

    "},{"location":"i18next/#set-default-namespace","title":"Set default namespace","text":"
    i18next.setDefaultNamespace(namespace);\n
    "},{"location":"i18next/#translate","title":"Translate","text":"
    var result = i18next.t(key);\n// var result = i18next.t(key, interpolation);\n
    "},{"location":"i18next/#events","title":"Events","text":""},{"location":"image/","title":"Image","text":""},{"location":"image/#introduction","title":"Introduction","text":"

    Display of static images, built-in game object of phaser.

    "},{"location":"image/#usage","title":"Usage","text":""},{"location":"image/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"image/#add-image-object","title":"Add image object","text":"
    var image = scene.add.image(x, y, key);\n// var image = scene.add.image(x, y, key, frame);\n

    Add image from JSON

    var image = scene.make.image({\nx: 0,\ny: 0,\nkey: '',\n// frame: '',\n\n// angle: 0,\n// alpha: 1,\n// flipX: true,\n// flipY: true,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"image/#custom-class","title":"Custom class","text":""},{"location":"image/#texture","title":"Texture","text":"

    See game object - texture

    "},{"location":"image/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"image/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"imagebox/","title":"Image box","text":""},{"location":"imagebox/#introduction","title":"Introduction","text":"

    Keep aspect ratio of image game object when scale-down resizing.

    "},{"location":"imagebox/#live-demos","title":"Live demos","text":""},{"location":"imagebox/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"imagebox/#install-plugin","title":"Install plugin","text":""},{"location":"imagebox/#load-minify-file","title":"Load minify file","text":""},{"location":"imagebox/#import-plugin","title":"Import plugin","text":""},{"location":"imagebox/#import-class","title":"Import class","text":""},{"location":"imagebox/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexImageBox(x, y, texture, frame, {\n// width: undefined,\n// height: undefined,\n\n// image: undefined\n});\n

    Add imagebox from JSON

    var image = scene.make.rexImageBox({\nx: 0,\ny: 0,\nkey: null,\nframe: null,\n\n// width: undefined,\n// height: undefined,\n\n// image: undefined\n\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"imagebox/#custom-class","title":"Custom class","text":""},{"location":"imagebox/#resize","title":"Resize","text":"
    image.resize(width, height);\n

    Note

    "},{"location":"imagebox/#set-texture","title":"Set texture","text":"
    image.setTexture(key, frame);\n
    "},{"location":"imagebox/#current-texture","title":"Current texture","text":"
    var textureKey = image.texture.key;\nvar frameName = image.frame.name;\n
    "},{"location":"imagebox/#clear-texture","title":"Clear texture","text":"
    image.setTexture();\n

    Will set internal image game object to invisible.

    "},{"location":"imagebox/#scale-image","title":"Scale image","text":"
    image.scaleImage();\n

    image.resize(width, height), or image.setTexture(key, frame) will invoke this method internally.

    "},{"location":"imagebox/#internal-image-game-object","title":"Internal image game object","text":"
    var internalImageGO = image.image;\n
    "},{"location":"imageuriloader/","title":"Image URI loader","text":""},{"location":"imageuriloader/#introduction","title":"Introduction","text":"

    Load image by uri (base64 string) in preload stage.

    Built-in image loader dosen't support loading local image uri.

    "},{"location":"imageuriloader/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"imageuriloader/#install-plugin","title":"Install plugin","text":""},{"location":"imageuriloader/#load-minify-file","title":"Load minify file","text":""},{"location":"imageuriloader/#import-plugin","title":"Import plugin","text":""},{"location":"imageuriloader/#import-class","title":"Import class","text":""},{"location":"imageuriloader/#load-image","title":"Load image","text":"

    In preload stage:

    this.load.rexImageURI(key, uri);\n
    "},{"location":"imageuriloader/#load-sprite-sheet","title":"Load sprite sheet","text":"

    In preload stage:

    this.load.rexImageURI(key, uri, frameConfig);\n
    "},{"location":"input/","title":"Input","text":""},{"location":"input/#introduction","title":"Introduction","text":"

    Input system of each scene, built-in object of phaser.

    "},{"location":"input/#usage","title":"Usage","text":""},{"location":"input/#enabledisable","title":"Enable/disable","text":"
    scene.input.enabled = enabled; // enabled: true/false\n
    "},{"location":"inputtext/","title":"Input text","text":""},{"location":"inputtext/#introduction","title":"Introduction","text":"

    Input DOM element.

    "},{"location":"inputtext/#live-demos","title":"Live demos","text":""},{"location":"inputtext/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"inputtext/#install-plugin","title":"Install plugin","text":""},{"location":"inputtext/#load-minify-file","title":"Load minify file","text":""},{"location":"inputtext/#import-plugin","title":"Import plugin","text":""},{"location":"inputtext/#import-class","title":"Import class","text":""},{"location":"inputtext/#add-input-text-object","title":"Add input text object","text":"
    var inputText = scene.add.rexInputText(x, y, width, height, config);\n// var inputText = scene.add.rexInputText(x, y, config);\n// var inputText = scene.add.rexInputText(config);\n

    Default configuration

    {\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\n\ntype: 'text',    // 'text'|'password'|'textarea'|'number'|'color'|...\n\n// Element properties\nid: undefined,\ntext: undefined,\nmaxLength: undefined,\nminLength: undefined,    placeholder: undefined,\ntooltip: undefined,\nreadOnly: false,\nspellCheck: false,\nautoComplete: 'off',\n\n// Style properties\nalign: undefined,\npaddingLeft: undefined,\npaddingRight: undefined,\npaddingTop: undefined,\npaddingBottom: undefined,\nfontFamily: undefined,\nfontSize: undefined,\ncolor: '#ffffff',\nborder: 0,\nbackgroundColor: 'transparent',\nborderColor: 'transparent',\noutline: 'none',\ndirection: 'ltr',\n\nselectAll: false\n}\n
    "},{"location":"inputtext/#custom-class","title":"Custom class","text":""},{"location":"inputtext/#text","title":"Text","text":""},{"location":"inputtext/#style","title":"Style","text":""},{"location":"inputtext/#focus","title":"Focus","text":""},{"location":"inputtext/#font-color","title":"Font color","text":""},{"location":"inputtext/#max-length","title":"Max length","text":""},{"location":"inputtext/#min-length","title":"Min length","text":""},{"location":"inputtext/#placeholder","title":"Placeholder","text":""},{"location":"inputtext/#tooltip","title":"Tooltip","text":""},{"location":"inputtext/#readonly","title":"Readonly","text":""},{"location":"inputtext/#resize","title":"Resize","text":"
    inputText.resize(width, height);\n
    "},{"location":"inputtext/#select-text","title":"Select text","text":""},{"location":"inputtext/#cursor-position","title":"Cursor position","text":""},{"location":"inputtext/#events","title":"Events","text":""},{"location":"inputtext/#bypass-key-input","title":"Bypass key input","text":"

    Registered keyboard events might capture key input.

    var keyObj = scene.input.keyboard.addKey('W', enableCapture, emitOnRepeat);\n

    Set enableCapture to false to bypass key input to this input-text game objecct.

    "},{"location":"inputtext/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"

    See dom-element's Interactive with other game objects

    "},{"location":"inputtext/#close-editing","title":"Close editing","text":""},{"location":"interception/","title":"Interception","text":""},{"location":"interception/#introduction","title":"Introduction","text":"

    Predict the intersection position of two game objects with constant moving speed.

    "},{"location":"interception/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"interception/#install-plugin","title":"Install plugin","text":""},{"location":"interception/#load-minify-file","title":"Load minify file","text":""},{"location":"interception/#import-plugin","title":"Import plugin","text":""},{"location":"interception/#import-class","title":"Import class","text":""},{"location":"interception/#create-instance","title":"Create instance","text":"
    var interception = scene.plugins.get('rexInterception').add(gameObject, {\n// target: undefined,\n// enable: true\n});\n
    "},{"location":"interception/#target","title":"Target","text":""},{"location":"interception/#enable-predicting","title":"Enable predicting","text":""},{"location":"interception/#predicted-result","title":"Predicted result","text":""},{"location":"interpolation/","title":"Interpolation","text":""},{"location":"interpolation/#introduction","title":"Introduction","text":"

    Calculates interpolation value over t (0~1), built-in method of phaser.

    "},{"location":"interpolation/#usage","title":"Usage","text":""},{"location":"intouching/","title":"In touching","text":""},{"location":"intouching/#introduction","title":"Introduction","text":"

    Fires 'intouch' event every tick when pressing on a game object.

    "},{"location":"intouching/#live-demos","title":"Live demos","text":""},{"location":"intouching/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"intouching/#install-plugin","title":"Install plugin","text":""},{"location":"intouching/#load-minify-file","title":"Load minify file","text":""},{"location":"intouching/#import-plugin","title":"Import plugin","text":""},{"location":"intouching/#import-class","title":"Import class","text":""},{"location":"intouching/#create-instance","title":"Create instance","text":"
    var intouching = scene.plugins.get('rexInTouching').add(gameObject, {\n// enable: true,\n// cooldown: undefined\n});\n
    "},{"location":"intouching/#events","title":"Events","text":""},{"location":"intouching/#in-touching","title":"In touching","text":"
    var isInTouching = intouching.isInTouching;\n
    "},{"location":"intouching/#enable","title":"Enable","text":""},{"location":"intouching/#cooldown","title":"Cooldown","text":""},{"location":"keyboardcombo/","title":"Combo events","text":""},{"location":"keyboardcombo/#introduction","title":"Introduction","text":"

    Combo-keys events.

    "},{"location":"keyboardcombo/#usage","title":"Usage","text":"
    1. Create combo
      var keyCombo = scene.input.keyboard.createCombo(keys, {\n// resetOnWrongKey: true,\n// maxKeyDelay: 0,\n// resetOnMatch: false,\n// deleteOnMatch: false,\n});\n
    2. Listen combo matching event
      scene.input.keyboard.on('keycombomatch', function (keyCombo, keyboardEvent) { /* ... */ });\n
    "},{"location":"keyboardevents/","title":"Keyboard events","text":""},{"location":"keyboardevents/#introduction","title":"Introduction","text":"

    Built-in keyboard events of phaser.

    "},{"location":"keyboardevents/#usage","title":"Usage","text":""},{"location":"keyboardevents/#quick-start","title":"Quick start","text":""},{"location":"keyboardevents/#key-object","title":"Key object","text":""},{"location":"keyboardevents/#key-object-of-cursorkeys","title":"Key object of cursorkeys","text":"
    1. Get key state object
      var cursorKeys = scene.input.keyboard.createCursorKeys();\n
    2. Get key state
      var isUpDown = cursorKeys.up.isDown;\nvar isDownDown = cursorKeys.down.isDown;\nvar isLeftDown = cursorKeys.left.isDown;\nvar isRightDown = cursorKeys.right.isDown;\nvar isSpaceDown = cursorKeys.space.isDown;\nvar isShiftDown = cursorKeys.shift.isDown;\n
    "},{"location":"keyboardevents/#order-of-key-downkey-up-events","title":"Order of key-down/key-up events","text":"
    1. Key-down/key-up events of key object
      var keyObj = scene.input.keyboard.addKey('W');  // Get key object\nkeyObj.on('down', function(event) { /* ... */ });\nkeyObj.on('up', function(event) { /* ... */ });\n
    2. On key-down/on key-up
      scene.input.keyboard.on('keydown-' + 'W', function (event) { /* ... */ });\nscene.input.keyboard.on('keyup-' + 'W', function (event) { /* ... */ });\n
    3. Any key-down/on key-up
      scene.input.keyboard.on('keydown', function (event) { /* ... */ });\nscene.input.keyboard.on('keyup', function (event) { /* ... */ });\n
    "},{"location":"keyboardevents/#destroy-key-object","title":"Destroy key object","text":"
    keyObj.destroy();\n
    "},{"location":"keyboardevents/#key-map","title":"Key map","text":""},{"location":"layer/","title":"Layer","text":""},{"location":"layer/#introduction","title":"Introduction","text":"

    A local display list, built-in game object of phaser.

    Layers have no position or size

    Layers have no position or size within the Scene

    Layers cannot be added to Containers

    Containers can be added to Layers, but Layers cannot be added to Containers.

    "},{"location":"layer/#usage","title":"Usage","text":""},{"location":"layer/#add-layer","title":"Add layer","text":"
    var layer = scene.add.layer();\n// var layer = scene.add.layer(children);\n
    "},{"location":"layer/#custom-class","title":"Custom class","text":""},{"location":"layer/#add-child","title":"Add child","text":""},{"location":"layer/#remove-child","title":"Remove child","text":"

    Removed game object won't be added to display list of scene, use

    scene.add.existing(gameObject);\n

    to add it back.

    "},{"location":"layer/#get-child","title":"Get child","text":""},{"location":"layer/#iterate","title":"Iterate","text":""},{"location":"layer/#move-child","title":"Move child","text":"

    Note

    Children game objects also sort by depth.

    "},{"location":"layer/#for-each-child","title":"For each child","text":"
    layer.each(function(gameObject) {\n\n}, scope);\n
    "},{"location":"layer/#set-property","title":"Set property","text":"
    layer.setAll(property, value);\n// layer.setAll(property, value, startIndex, endIndex);\n
    "},{"location":"layer/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"layer/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"layermanager/","title":"Layer manager","text":""},{"location":"layermanager/#introduction","title":"Introduction","text":"

    A dictionary to store Layer game objects.

    "},{"location":"layermanager/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"layermanager/#install-plugin","title":"Install plugin","text":""},{"location":"layermanager/#load-minify-file","title":"Load minify file","text":""},{"location":"layermanager/#import-plugin","title":"Import plugin","text":""},{"location":"layermanager/#import-class","title":"Import class","text":""},{"location":"layermanager/#create-instance","title":"Create instance","text":"
    var layerManager = scene.plugins.get('rexLayerManager').add(scene, {\n// layerManager: ['layer0', 'layer1', ...]\n});\n

    or

    var layerManager = scene.plugins.get('rexLayerManager').add(scene, ['layer0', 'layer1', ...]\n);\n
    "},{"location":"layermanager/#destroy","title":"Destroy","text":"
    layerManager.destroy()\n

    Also destroy all layers in this layer manager.

    "},{"location":"layermanager/#add-layer","title":"Add layer","text":"
    layerManager.add(name);\n// layerManager.add(name, depth);\n
    "},{"location":"layermanager/#add-game-object-to-layer","title":"Add game object to layer","text":"
    layerManager.addToLayer(name, gameObject);\n

    Note

    Print a warn message if specific layer is not existed.

    "},{"location":"layermanager/#get-layer","title":"Get layer","text":""},{"location":"layermanager/#has-layer","title":"Has layer","text":"
    var hasLayer = layerManager.has(name);\n// var hasLayer = layerManager.exists(name);\n
    "},{"location":"lifetime/","title":"Life time","text":""},{"location":"lifetime/#introduction","title":"Introduction","text":"

    Destroy game object when time-out.

    "},{"location":"lifetime/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"lifetime/#install-plugin","title":"Install plugin","text":""},{"location":"lifetime/#load-minify-file","title":"Load minify file","text":""},{"location":"lifetime/#import-plugin","title":"Import plugin","text":""},{"location":"lifetime/#import-class","title":"Import class","text":""},{"location":"lifetime/#create-instance","title":"Create instance","text":"
    var lifeTime = scene.plugins.get('rexLifeTime').add(gameObject, {\nlifeTime: 1000,\n// destroy: true,\n// start: true\n});\n
    "},{"location":"lifetime/#events","title":"Events","text":""},{"location":"lifetime/#life-time","title":"Life-time","text":""},{"location":"lifetime/#startstoppauseresume","title":"Start/Stop/Pause/Resume","text":""},{"location":"light/","title":"Light","text":""},{"location":"light/#introduction","title":"Introduction","text":"

    lighting system from normal map.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"light/#usage","title":"Usage","text":""},{"location":"light/#light-system","title":"Light system","text":""},{"location":"light/#enable","title":"Enable","text":""},{"location":"light/#ambient-color","title":"Ambient color","text":"
    scene.lights.setAmbientColor(color);\n
    "},{"location":"light/#light","title":"Light","text":""},{"location":"light/#position","title":"Position","text":""},{"location":"light/#color","title":"Color","text":""},{"location":"light/#size","title":"Size","text":""},{"location":"light/#intensity","title":"Intensity","text":""},{"location":"light/#game-object","title":"Game object","text":""},{"location":"light/#load-texture-with-normal-map","title":"Load texture with normal map","text":"
    scene.load.image(key, [url, normalMapUrl]);\n
    "},{"location":"light/#apply-light-pipeline","title":"Apply light pipeline","text":"
    gameObject.setPipeline('Light2D');\n
    "},{"location":"line/","title":"Line","text":""},{"location":"line/#introduction","title":"Introduction","text":"

    Draw a line with start/end/body textures.

    "},{"location":"line/#live-demos","title":"Live demos","text":""},{"location":"line/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"line/#install-plugin","title":"Install plugin","text":""},{"location":"line/#load-minify-file","title":"Load minify file","text":""},{"location":"line/#import-plugin","title":"Import plugin","text":""},{"location":"line/#import-class","title":"Import class","text":""},{"location":"line/#create-instance","title":"Create instance","text":"
    var line = scene.add.rexLine({\nstart: {\nx: 0, y: 0,\nkey: undefined, frame: undefined, origin: 0.5,\n},\n// start: key,\n// start: undefined,\n\nend: {\nx: 0, y: 0,\nkey: undefined, frame: undefined, origin: 1,\n},\n// end: key,\n// end: undefined,\n\nbody: {\nkey: undefined, frame: undefined, extendMode: 1,\nwidth: undefined,\n},\n// body: key,\n});\n
    "},{"location":"line/#custom-class","title":"Custom class","text":""},{"location":"line/#position-of-line-startline-end","title":"Position of line-start/line-end","text":""},{"location":"line/#set-textures","title":"Set textures","text":""},{"location":"list-inputtext/","title":"Input text","text":"

    Solutions of single or multiple line(s) input text.

    "},{"location":"live2d/","title":"Live2d","text":""},{"location":"live2d/#introduction","title":"Introduction","text":"

    Display live2d model.

    "},{"location":"live2d/#live-demos","title":"Live demos","text":"

    The example Live2D models, Haru and Hiyori, are redistributed under Live2D's Free Material License.

    "},{"location":"live2d/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"live2d/#install-plugin","title":"Install plugin","text":""},{"location":"live2d/#load-minify-file","title":"Load minify file","text":""},{"location":"live2d/#import-plugin","title":"Import plugin","text":""},{"location":"live2d/#import-class","title":"Import class","text":""},{"location":"live2d/#create-instance","title":"Create instance","text":"
    var live2dGameObject = scene.add.rexLive2d(x, y, key, {\n// autoPlayIdleMotion: motionGroupName\n});\n

    Add live2d from JSON

    var live2d = scene.make.rexLive2d({\nx: 0,\ny: 0,\nkey: 256,\n// autoPlayIdleMotion: motionGroupName,\n\nadd: true\n});\n
    "},{"location":"live2d/#custom-class","title":"Custom class","text":""},{"location":"live2d/#change-model","title":"Change model","text":"
    live2dGameObject.setModel(key);\n

    or

    live2dGameObject.setModel(key, {\n// autoPlayIdleMotion: motionGroupName\n})\n
    "},{"location":"live2d/#expression","title":"Expression","text":""},{"location":"live2d/#motion","title":"Motion","text":""},{"location":"live2d/#look-at","title":"Look at","text":""},{"location":"live2d/#lip-sync","title":"Lip sync","text":""},{"location":"live2d/#hit-test","title":"Hit test","text":""},{"location":"live2d/#touch-events","title":"Touch events","text":"
    1. Set interactive
      live2dGameObject.setInteractive();\n
    2. Register touch events of hit area
    "},{"location":"live2d/#is-hit","title":"Is hit","text":"
    var isHit = live2dGameObject.hitTest(hitAreaName, x, y);\n// var isHit = live2dGameObject.hitTest(hitAreaName, x, y, camera);\n
    "},{"location":"live2d/#parameter","title":"Parameter","text":"
    1. Register parameter
      live2dGameObject.registerParameter(name);\n
    2. Reset and add value
      live2dGameObject\n.resetParameterValue(name)\n.addParameterValue(name, value);\n
      or
      var parameters = live2dGameObject.getParameters();  // {name: value}\nparameters[name] = value;\n
    "},{"location":"loader/","title":"Loader","text":""},{"location":"loader/#introduction","title":"Introduction","text":"

    Load assets, built-in object of phaser.

    "},{"location":"loader/#usage","title":"Usage","text":""},{"location":"loader/#loading-in-preload-stage","title":"Loading in preload stage","text":"
    scene.load.image(key, url);\n// scene.load.image(config); // config: {key, url}\n

    Loader in preload stage will start loading automatically by scene.

    "},{"location":"loader/#loading-after-preload-stage","title":"Loading after preload stage","text":"
    scene.load.image(key, url);   // add task\n// scene.load.image(config); // config: {key, url}\nscene.load.once('complete', callback, scope);  // add callback of 'complete' event\nscene.load.start();                     // start loading\n
    "},{"location":"loader/#set-path","title":"Set path","text":"
    scene.load.setPath(path)\n
    "},{"location":"loader/#more-configurations","title":"More configurations","text":"

    More configurations in game config

    loader:{\nbaseURL: '',\npath: '',\nenableParallel: true,\nmaxParallelDownloads: 4,\ncrossOrigin: undefined,\nresponseType: '',\nasync: true,\nuser: '',\npassword: '',\ntimeout: 0,\nwithCredentials: false,\nimageLoadType: 'XHR',    // 'HTMLImageElement' \nlocalScheme: [ 'file://', 'capacitor://' ]\n},\n
    "},{"location":"loader/#events","title":"Events","text":""},{"location":"loader/#status-of-loader","title":"Status of loader","text":""},{"location":"loader/#file-types","title":"File types","text":""},{"location":"loader/#image","title":"Image","text":"

    Get data from texture cache

    var cache = scene.textures;\nvar data = cache.get(key);\n
    "},{"location":"loader/#sprite-sheet","title":"Sprite sheet","text":"
    scene.load.spritesheet(key, url, {\n// frameWidth: frameWidth,\n// frameHeight: frameHeight,\n// startFrame: startFrame,\n// endFrame: endFrame,\n// margin: margin,\n// spacing: spacing\n});\n// scene.load.spritesheet(key, url, frameConfig, xhrSettings);\n

    Get data from texture cache

    var cache = scene.textures;\nvar data = cache.get(key);\n
    "},{"location":"loader/#texture-atlas","title":"Texture atlas","text":"
    scene.load.atlas(key, textureURL, atlasURL);\n// scene.load.atlas(key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\n

    Get data from texture cache

    var cache = scene.textures;\nvar data = cache.get(key);\n
    "},{"location":"loader/#multi-file-texture-atlas","title":"Multi file texture atlas","text":"
    scene.load.multiatlas(key, atlasURL);\n// scene.load.multiatlas(key, atlasURL, path, baseURL, atlasXhrSettings);\n
    "},{"location":"loader/#unity-texture-atlas","title":"Unity texture atlas","text":"
    scene.load.unityAtlas(key, textureURL, atlasURL);\n// scene.load.unityAtlas(key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\n
    "},{"location":"loader/#animation","title":"Animation","text":"
    scene.load.animation(key, url);\n// scene.load.animation(key, url, dataKey, xhrSettings);\n

    Get data from json cache

    var cache = scene.json;\nvar data = cache.get(key);\n
    "},{"location":"loader/#audio","title":"Audio","text":"
    scene.load.audio(key, urls);\n// scene.load.audio(key, urls, {instances: 1}, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.audio;\nvar data = cache.get(key);\n
    "},{"location":"loader/#audio-sprite","title":"Audio sprite","text":"
    scene.load.audioSprite(key, jsonURL, audioURL, audioConfig);\n// scene.load.audioSprite(key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings);\n
    "},{"location":"loader/#video","title":"Video","text":"
    scene.load.video(key, url, noAudio);\n// scene.load.video(key, url, noAudio, xhrSettings);\n

    Get data from video cache

    var cache = scene.video;\nvar data = cache.get(key);\n
    "},{"location":"loader/#bitmap-font","title":"Bitmap font","text":"
    scene.load.bitmapFont(key, textureURL, fontDataURL);\n// scene.load.bitmapFont(key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings);\n

    Get data from cache

    var cache = scene.cache.bitmapFont;\nvar data = cache.get(key);\n
    "},{"location":"loader/#tile-map","title":"Tile map","text":"

    Get data from cache

    var cache = scene.cache.tilemap;\nvar data = cache.get(key);\n
    "},{"location":"loader/#text","title":"Text","text":"
    scene.load.text(key, url);\n// scene.load.text(key, url, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.text;\nvar data = cache.get(key);\n
    "},{"location":"loader/#json","title":"JSON","text":"
    scene.load.json(key, url);\n// scene.load.json(key, url, dataKey, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.json;\nvar data = cache.get(key);\n
    "},{"location":"loader/#xml","title":"XML","text":"
    scene.load.xml(key, url);\n// scene.load.xml(key, url, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.xml;\nvar data = cache.get(key);\n
    "},{"location":"loader/#html","title":"HTML","text":"
    scene.load.html(key, url);\n// scene.load.html(key, url, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.html;\nvar data = cache.get(key);\n
    "},{"location":"loader/#css","title":"CSS","text":"
    scene.load.css(key, url);\n// scene.load.css(key, url, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.css;\nvar data = cache.get(key);\n
    "},{"location":"loader/#scene","title":"Scene","text":"
    scene.load.sceneFile(key, url);\n// scene.load.sceneFile(key, url, xhrSettings);\n

    The key matches the class name in the JavaScript file.

    "},{"location":"loader/#script","title":"Script","text":"
    scene.load.script(key, url);\n// scene.load.script(key, url, type, xhrSettings);\n
    "},{"location":"loader/#scripts","title":"Scripts","text":"
    scene.load.scripts(key, urlArray);\n// scene.load.scripts(key, urlArray, xhrSettings);\n

    Add scripts in the exact order of urlArray.

    "},{"location":"loader/#glsl","title":"GLSL","text":"
    scene.load.glsl(key, url);\n// scene.load.glsl(key, url, shaderType, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.shader;\nvar data = cache.get(key);\n

    A glsl file can contain multiple shaders, all separated by a frontmatter block.

    ---\nname: type: ---\n\nvoid main(void)\n{\n}\n
    "},{"location":"loader/#binary","title":"Binary","text":"
    scene.load.binary(key, url, dataType);  // dataType: Uint8Array\n// scene.load.binary(key, url, dataType, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.binary;\nvar data = cache.get(key);\n
    "},{"location":"loader/#plugin","title":"Plugin","text":"
    scene.load.plugin(key, url, true); // start plugin when loaded\n// scene.load.plugin(key, url, true, undefined, xhrSettings);\n
    "},{"location":"loader/#scene-plugin","title":"Scene plugin","text":"
    scene.load.scenePlugin(key, url, systemKey, sceneKey);\n// scene.load.scenePlugin(key, url, systemKey, sceneKey, xhrSettings);\n
    "},{"location":"loader/#file-pack","title":"File pack","text":"

    Load files in JSON format.

    scene.load.pack(key, url);\n// scene.load.pack(key, url, dataKey, xhrSettings);\n

    or

    scene.load.pack(key, json);\n// scene.load.pack(key, json, dataKey);\n

    JSON pack file:

    {\n'dataKey': {\n// \"prefix\": \"...\",          // optional, extend key by prefix\n// \"path\": \"...\",            // optional, extend url by path\n// \"defaultType\": \"image\",   // optional, default file type\n'files': [\n{\n'type': 'image',\n'key': '...',\n'url': '...'\n},\n{\n'type': 'image',\n'key': '...',\n'url': '...'\n}\n// ...\n]\n},\n\n'node0': {\n'node1': {\n'node2': {\n'files': [\n// ....\n]\n}\n}\n}\n// dataKey: 'node0.node1.node2'\n}\n

    File type:

    Get pack json data from cache

    var cache = scene.cache.json;  // pack json is stored in json cache\nvar data = cache.get(key);\n

    Event name in 'filecomplete' event : 'filecomplete-packfile-' + key

    "},{"location":"loader/#release-data","title":"Release data","text":"
    var cache = scene.cache.text;\ncache.remove(key);\n
    "},{"location":"loader/#data-in-cache","title":"Data in cache","text":"
    var cache = scene.cache.text;\nvar hasData = cache.exists(key);\n// var hasData = cache.has(key);\n
    "},{"location":"loader/#cache-events","title":"Cache events","text":""},{"location":"loader/#replace","title":"Replace","text":"
    1. Remove key.
    2. Load file again.
    "},{"location":"loader/#xhr-settings-object","title":"XHR Settings Object","text":"

    Parameter xhrSettings

    {\nasync: true,\nuser: '',\npassword: '',\ntimeout: 0,\nheaders: undefined,\nheader: undefined,\nheaderValue: undefined,\nrequestedWith: undefined,\noverrideMimeType: undefined,\nwithCredentials: false\n}\n
    "},{"location":"loadingprogress/","title":"Loading progress","text":""},{"location":"loadingprogress/#introduction","title":"Introduction","text":"

    Pop-up dialog for loading-progress, then scale-down this dialog.

    "},{"location":"loadingprogress/#live-demos","title":"Live demos","text":""},{"location":"loadingprogress/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"loadingprogress/#install-plugin","title":"Install plugin","text":""},{"location":"loadingprogress/#load-minify-file","title":"Load minify file","text":""},{"location":"loadingprogress/#import-plugin","title":"Import plugin","text":""},{"location":"loadingprogress/#import-class","title":"Import class","text":""},{"location":"loadingprogress/#create-instance","title":"Create instance","text":"
    var loadingProgress = scene.plugins.get('rexLoadingProgress').add(gameObject, {\n// duration: {\n//     in: 200,\n//     out: 200\n// }\n\n// progress: function(gameObject, progress) {},\n// transitIn: function(gameObject, duration) {},\n// transitOut: function(gameObject, duration) {},\n});\n
    "},{"location":"loadingprogress/#events","title":"Events","text":""},{"location":"localforage-files/","title":"Files","text":""},{"location":"localforage-files/#introduction","title":"Introduction","text":"

    Save JSON data, using localforage.

    Each file contains header and content indexed by fileID.

    "},{"location":"localforage-files/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"localforage-files/#install-plugin","title":"Install plugin","text":""},{"location":"localforage-files/#load-minify-file","title":"Load minify file","text":""},{"location":"localforage-files/#import-plugin","title":"Import plugin","text":""},{"location":"localforage-files/#import-class","title":"Import class","text":""},{"location":"localforage-files/#create-instance","title":"Create instance","text":"
    var fileManager = scene.plugins.get('rexFiles').add.files({\n// name: 'files',\n// zip: true\n});\n
    "},{"location":"localforage-files/#save-file","title":"Save file","text":""},{"location":"localforage-files/#load-headers","title":"Load headers","text":"
    fileManager.loadHeaders()\n.then(function(result) { // var headers = result.headers;\n})\n.catch(function(result) {\n// var error = result.error;\n})\n
    "},{"location":"localforage-files/#load-file","title":"Load file","text":"
    fileManager.load(fileID)\n.then(function(result) { // var header = result.header;\n// var content = result.content;\n// var fileID = result.fileID;\n})\n.catch(function(result) {\n// var error = result.error;\n// var fileID = result.fileID;\n})\n
    "},{"location":"localforage/","title":"LocalForage","text":""},{"location":"localforage/#introduction","title":"Introduction","text":"

    Offline storage, improved.

    "},{"location":"localforage/#usage","title":"Usage","text":"

    Official document

    Sample code

    By default, LocalForage selects backend drivers for the datastore in this order:

    1. IndexedDB
    2. WebSQL
    3. localStorage
    "},{"location":"localforage/#save-data","title":"Save data","text":""},{"location":"localforage/#read-data","title":"Read data","text":""},{"location":"localforage/#remove-data","title":"Remove data","text":""},{"location":"localstorage-data/","title":"Data manager","text":""},{"location":"localstorage-data/#introduction","title":"Introduction","text":"

    Sync data from data manager to local-storage.

    Max Size

    5MB per app per browser.

    "},{"location":"localstorage-data/#live-demos","title":"Live demos","text":""},{"location":"localstorage-data/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"localstorage-data/#install-plugin","title":"Install plugin","text":""},{"location":"localstorage-data/#load-minify-file","title":"Load minify file","text":""},{"location":"localstorage-data/#import-plugin","title":"Import plugin","text":""},{"location":"localstorage-data/#import-class","title":"Import class","text":""},{"location":"localstorage-data/#create-instance","title":"Create instance","text":"
    var data = scene.plugins.get('rexLocalStorageData').add({\n// name: '',\n// load: true,\n// default: undefined,\n// reset: false\n});\n// var data = scene.plugins.get('rexLocalStorageData').add(parent, config);\n// var data = scene.plugins.get('rexRData').add(parent, eventEmitter, config);\n
    "},{"location":"localstorage-data/#load","title":"Load","text":"
    data.load(defaultData);\n// data.load(defaultData, reset);\n

    Note

    Data loaded from local storage already, if load is true.

    "},{"location":"localstorage-data/#getsetremove-value","title":"Get/set/remove value","text":"

    See built-in data manager.

    "},{"location":"localstorage-data/#reserved-keys","title":"Reserved keys","text":"

    '__keys__' is used internally by this plugin.

    "},{"location":"localstorage-data/#get-default-value","title":"Get default value","text":"
    var value = data.getDefaultValue(key);\n
    "},{"location":"localstorage/","title":"LocalStorage","text":""},{"location":"localstorage/#introduction","title":"Introduction","text":"

    Store small data in key-value pairs locally within the user's browser.

    Max Size

    5MB per app per browser.

    "},{"location":"localstorage/#usage","title":"Usage","text":"

    Reference

    Sample code

    "},{"location":"localstorage/#save-data","title":"Save data","text":"
    localStorage.setItem(key, value);\n
    "},{"location":"localstorage/#read-data","title":"Read data","text":"
    var value = localStorage.getItem(key);\n

    Note

    The keys and the values are always strings. Objects, integer keys will be automatically converted to strings.

    "},{"location":"localstorage/#remove-data","title":"Remove data","text":"
    localStorage.removeItem(key);\n
    "},{"location":"lokijs/","title":"LokiJs","text":""},{"location":"lokijs/#introduction","title":"Introduction","text":"

    In-memory JavaScript Datastore with Persistence.

    "},{"location":"lokijs/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"lokijs/#create-database","title":"Create database","text":"
    var db = new loki();\n// var db = new loki('loki.json', config);  // load database from file\n
    "},{"location":"lokijs/#create-collection","title":"Create collection","text":"
    var collection = db.addCollection(name);\n// var collection = db.addCollection(name, config);\n
    "},{"location":"lokijs/#get-collection","title":"Get collection","text":"
    var collection = db.getCollection(name);\n
    "},{"location":"lokijs/#insert-document","title":"Insert document","text":"
    var docInColl = collection.insert(doc);  // doc: an object\n

    Get Id

    var id = docInColl.$loki;\n
    "},{"location":"lokijs/#insert-documents","title":"Insert documents","text":"
    collection.insert(docArray);  // documents in array\n
    "},{"location":"lokijs/#query","title":"Query","text":""},{"location":"lokijs/#get-document-by-id","title":"Get document by id","text":"
    var doc = collection.get(id);  // id: `$loki`\n
    "},{"location":"lokijs/#get-doc-by-unique-index","title":"Get doc by unique index","text":"
    var doc = collection.by(key, value);\n
    "},{"location":"lokijs/#filter-documents","title":"Filter documents","text":""},{"location":"lokijs/#find-one-document","title":"Find one document","text":"
    var doc = collection.findOne({});\n
    "},{"location":"lokijs/#filter-by-function","title":"Filter by function","text":"
    var docArray = collection.where(function(doc){\n// ...\nreturn isPicked;  // true to pick this document\n})\n
    "},{"location":"lokijs/#sort","title":"Sort","text":""},{"location":"lokijs/#pagination","title":"Pagination","text":"

    Get documents from start to start+count-1.

    var docArray = collection.chain().find({}).offset(start).limit(count).data();\n
    "},{"location":"lokijs/#update","title":"Update","text":"

    Update each filtered documents.

    var docArray = collection.chain().find({}).update(\nfunction(doc) { //\nreturn doc;\n});\n
    "},{"location":"lokijs/#remove","title":"Remove","text":"

    Remove filtered documents.

    collection.chain().find({}).remove();\n
    "},{"location":"lokijs/#map","title":"Map","text":"

    Map document into a new anonymous collection, won't affect original collection.

    var docArray = collection.chain().find({}).map(\nfunction(doc) {\n// ...\nreturn doc\n})\n.data();\n
    "},{"location":"lokijs/#map-reduce","title":"Map-reduce","text":"
    1. Map document into a new anonymous collection
    2. Run reduceFn to get final result value from result set of step 1.
    var mapFn = function(doc) {\n// ...\nreturn doc\n};\nvar reduceFn = function(docArray) {\n// ...\nreturn result;\n}\nvar result = collection.chain().find({}).mapReduce(mapFn, reduceFn);\n
    "},{"location":"lokijs/#clone-result-set","title":"Clone result set","text":"
    var resultSet = collection.chain().find({});\nvar resultSetClone = resultSet.branch();\n\n// resultSetClone.find({}).data();\n
    "},{"location":"lokijs/#dynamic-view","title":"Dynamic view","text":"
    1. Create dynamic view
      var view = children.addDynamicView(name);\n
    2. Add filters
    3. Get result data
      var docArray = view.data();\n

    Add new filters

    var docArray = view.branchResultset().find({}).data();\n

    "},{"location":"lokijs/#speed-up-quering","title":"Speed-up quering","text":""},{"location":"lokijs/#custom-unique-index","title":"Custom unique index","text":"
    1. Define custom unique index
      var collection = db.addCollection(name, {\nunique: [key0]\n});\n
    2. Get document by custom unique index
      var doc = collection.by(key0, value);\n
    "},{"location":"lokijs/#binary-indices","title":"Binary indices","text":"
    1. Define binary index
      var collection = db.addCollection(name, {\nindices: [key0]\n});\n
      Or
      collection.ensureIndex(key);\n
    2. Get documents by normal filters
      var docArray = collection.find({key0: {'$gt': value}});\n
    "},{"location":"lokijs/#methods-of-collection","title":"Methods of collection","text":""},{"location":"lokijs/#serialize-deserialize","title":"Serialize & Deserialize","text":""},{"location":"luxon/","title":"Luxon","text":""},{"location":"luxon/#introduction","title":"Introduction","text":"

    Parse, validate, manipulate, and display dates and times. Reference

    "},{"location":"luxon/#usage","title":"Usage","text":""},{"location":"luxon/#creating-a-datetime","title":"Creating a DateTime","text":"
    const dt = DateTime.local(2017, 5, 15, 8, 30);\n

    or

    var dt = DateTime.fromISO('2017-05-15');\n// var dt = DateTime.fromISO('2017-05-15T17:36');\n// var dt = DateTime.fromISO('2017-W33-4');\n// var dt = DateTime.fromISO('2017-W33-4T04:45:32.343');\n
    "},{"location":"luxon/#current-date-and-time","title":"Current date and time","text":"
    const now = DateTime.now();\n// const now = DateTime.local();\n
    "},{"location":"luxon/#json","title":"JSON","text":""},{"location":"luxon/#math","title":"Math","text":"
    var dt1 = dt0.plus({ hours: 3, minutes: 2 });\nvar dt1 = dt0.minus({ days: 7 });\nvar dt1 = dt0.startOf('day');\nvar dt1 = dt0.endOf('hour');\n
    "},{"location":"luxon/#difference","title":"Difference","text":"
    var i1 = DateTime.fromISO('1982-05-25T09:45'),\ni2 = DateTime.fromISO('1983-10-14T10:30');\ni2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\ni2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\ni2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\ni2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n
    "},{"location":"luxon/#durations","title":"Durations","text":"
    var dur = Duration.fromObject({ hours: 2, minutes: 7 });\n// dt.plus(dur);\n\ndur.as('seconds') //=> 7620\ndur.toObject()    //=> { hours: 2, minutes: 7 }\ndur.toISO()       //=> 'PT2H7M'\n
    "},{"location":"luxon/#parseformat","title":"Parse/Format","text":""},{"location":"luxon/#relative-time","title":"Relative time","text":"

    Returns a string representation of this date relative to today.

    var s = dt.toRelativeCalendar();\n
    var s = dt.toRelativeCalendar({\nbase: dt0,\nlocale: string,\nunit: string\n});\n
    "},{"location":"lzstring/","title":"LZ string","text":""},{"location":"lzstring/#introduction","title":"Introduction","text":"

    Compress string using LZ-based compression algorithm. Reference

    "},{"location":"lzstring/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"lzstring/#install-plugin","title":"Install plugin","text":""},{"location":"lzstring/#load-minify-file","title":"Load minify file","text":""},{"location":"lzstring/#import-plugin","title":"Import plugin","text":""},{"location":"lzstring/#import-class","title":"Import class","text":""},{"location":"lzstring/#create-instance","title":"Create instance","text":"
    var lzstring = scene.plugins.get('rexLZString').add({\n// encoding: 'none'     // 'none'|0, 'base64'|1, 'utf16'|2, 'uri'|3\n});\n
    "},{"location":"lzstring/#compression","title":"Compression","text":"
    var compressionResult = lzstring.compress(src);\n
    "},{"location":"lzstring/#decompression","title":"Decompression","text":"
    var decompressionResult = lzstring.decompress(compressionResult);\n
    "},{"location":"lzstring/#set-encoding","title":"Set encoding","text":"
    lzstring.setEncoding(m);  // 0|'none'|1|'base64'|2|'utf16'|3|'uri'\n
    "},{"location":"mainloop/","title":"Main loop","text":"
    1. game.events prestep event. Global Managers like Input and Sound update.
      1. trigger game.sound.update()
    2. game.events step event. User-land code and plugins
    3. Update the Scene Manager and all active Scenes
      1. scene.events preupdate event
        • Register event
          scene.events.on('preupdate', function(time, delta){\n//\n}, scope);\n
        • InputPlugin.preUpdate()
        • TweenManager.preUpdate() to arrange active targets
        • UpdateList.preUpdate(), to arrange game objects in UpdateList
      2. scene.events update event
        • Register event
          scene.events.on('update', function(time, delta){\n//\n}, scope);\n
        • TweenManager.update(), to run active tweens
        • UpdateList.update
          • gameObject.preUpdate
        • Update arcade world
      3. scene.update()
      4. scene.events postupdate event
        • Register event
          scene.events.on('postupdate', function(time, delta){\n//\n}, scope);\n
    4. game.events poststep event. Final event before rendering starts.
    5. game.renderer.preRender()
    6. game.events prerender event
    7. SceneManager.render()
      1. Sort display list
      2. scene.events prerender event
        • Register event
          scene.events.on('prerender', function(renderer){\n//\n}, scope);\n
      3. Render cameras
      4. scene.events render event
        • Register event
          scene.events.on('render', function(renderer){\n//\n}, scope);\n
    8. game.renderer.postRender()
    9. game.events postrender event. Final event before the step repeats.

    Note

    Each scene is a standalone system.

    "},{"location":"mainloop/#flow-chart","title":"Flow chart","text":""},{"location":"mainloop/#game-loop","title":"Game loop","text":"
    graph TB\n\nsubgraph Render\nGameRenderPreRender[\"game.renderer.preRender()\"]\nGameEventPreRender>\"game.events: prerender\"]\nSceneManagerRender[\"SceneManager.render()<br>...See 'Scene steps'...\"]\nGameRenderPostRender[\"game.renderer.postRender()\"]\nGameEventPostRender>\"game.events: postrender\"]\nend\n\nsubgraph Step\nGameEventPreStep>\"game.events: prestep<br><br>sound.update()\"]\nGameEventStep>\"game.events: step\"]\nSceneManagerUpdate[\"SceneManager.update()<br>...See 'Scene steps'...\"]\nGameEventPostStep>\"game.events: poststep\"]\nend\n\n\nGameEventPreStep --> GameEventStep\nGameEventStep --> SceneManagerUpdate\nSceneManagerUpdate --> GameEventPostStep\nGameEventPostStep --> GameRenderPreRender\nGameRenderPreRender --> GameEventPreRender\nGameEventPreRender --> SceneManagerRender\nSceneManagerRender --> GameRenderPostRender\nGameRenderPostRender --> GameEventPostRender\nGameEventPostRender --> GameEventPreStep
    "},{"location":"mainloop/#scene-steps","title":"Scene steps","text":"
    graph TB\n\nsubgraph Render\nSceneEventPreRender>\"scene.events: prerender\"]\nSceneCameraRender[\"scene.cameras.render()\"]\nSceneEventRender>\"scene.events: render\"]\nend\n\nsubgraph Update\nSceneEventPreUpdate>\"scene.events: preupdate<br><br>InputPlugin.preUpdate()<br>TweenManager.preUpdate()<br>UpdateList.preUpdate()\"]\nSceneEventUpdate>\"scene.events: update<br><br>TweenManager.update()<br>UpdateList.update()<br>gameObject.preUpdate()\"]\nSceneUpdate[\"scene.update()\"]\nSceneEventPostUpdate>\"scene.events: postupdate\"]\nend\n\n\nSceneEventPreUpdate --> SceneEventUpdate\nSceneEventUpdate --> SceneUpdate\nSceneUpdate --> SceneEventPostUpdate\n\nSceneEventPostUpdate -.-> SceneEventPreRender\nSceneEventPreRender --> SceneCameraRender\nSceneCameraRender --> SceneEventRender
    "},{"location":"markedeventsheet/","title":"Markdown event sheets","text":""},{"location":"markedeventsheet/#introduction","title":"Introduction","text":"

    Event sheets contains main condition(s) and actions, in simple markdown format (headings, code block).

    "},{"location":"markedeventsheet/#live-demos","title":"Live demos","text":""},{"location":"markedeventsheet/#usage","title":"Usage","text":""},{"location":"markedeventsheet/#install-plugin","title":"Install plugin","text":""},{"location":"markedeventsheet/#load-minify-file","title":"Load minify file","text":""},{"location":"markedeventsheet/#import-plugin","title":"Import plugin","text":""},{"location":"markedeventsheet/#import-class","title":"Import class","text":""},{"location":"markedeventsheet/#create-instance","title":"Create instance","text":"
    var eventSheetManager = scene.plugins.get('rexMarkedEventSheets').add({\ncommandExecutor: Object,\nparallel: false\n});\n
    "},{"location":"markedeventsheet/#add-event-sheet","title":"Add event sheet","text":"
    eventSheetManager.addEventSheet(content, {\ncommentLineStart: '\\/\\/',\nlineBreak: '\\\\',\nparallel: undefined\n})\n

    or

    eventSheetManager.addEventSheet(content, groupName, {\ncommentLineStart: '\\/\\/',\nlineBreak: '\\\\',\nparallel: undefined\n})\n
    "},{"location":"markedeventsheet/#remove-event-sheet","title":"Remove event sheet","text":""},{"location":"markedeventsheet/#start-running","title":"Start running","text":""},{"location":"markedeventsheet/#stop-running","title":"Stop running","text":""},{"location":"markedeventsheet/#local-memory","title":"Local memory","text":"

    Local memory is shared for all event sheets.

    "},{"location":"markedeventsheet/#states","title":"States","text":""},{"location":"markedeventsheet/#events","title":"Events","text":""},{"location":"markedeventsheet/#structure-of-event-sheet","title":"Structure of event sheet","text":"

    Sample

    "},{"location":"markedeventsheet/#main-headings","title":"Main headings","text":"
    # Title\n\n## [Condition]\n\ncoin > 5\n\n## Script\n\n## [Catch]\n
    "},{"location":"markedeventsheet/#flow-control-instructions","title":"Flow control instructions","text":""},{"location":"markedeventsheet/#simple-branch","title":"Simple branch","text":"
    ## [If]\n\ncoin > 5\n\n### Label\n
    "},{"location":"markedeventsheet/#complex-branch","title":"Complex branch","text":"

    Does not support complex branch (if... else if ... else) inside an event sheet. User can build complex branch by mutiple event sheets with main condition ([Condition] H2 heading). Example

    "},{"location":"markedeventsheet/#while-loop","title":"While loop","text":"
    ## [While]\n\nloopCount > 0\n\n### Label\n
    "},{"location":"markedeventsheet/#break","title":"Break","text":"
    [break]\n
    "},{"location":"markedeventsheet/#exit","title":"Exit","text":"
    [exit]\n
    "},{"location":"markedeventsheet/#custom-command","title":"Custom command","text":"
    commandName\n  param0=value\n  param1=value\n

    For multiple lines parameter :

    ```commandName,param0=value,param1=value\nline0\nline1\nline2\n```\n

    So it will be equal to

    commandName\n  text=...\n  param0=value\n  param1=value\n
    "},{"location":"markedeventsheet/#command-executor","title":"Command executor","text":"

    A command executor for phaser3 engine.

    "},{"location":"markedeventsheet/#create-command-executor-instance","title":"Create command executor instance","text":"
    var commandExecutor = scene.plugins.get('rexMarkedEventSheets').addCommandExecutor(scene, {\nlayers: []\n});\n\n// Add to event sheet manager\n// var eventSheetManager = scene.plugins.get('rexMarkedEventSheets').add({\n//     commandExecutor: commandExecutor\n// });\n
    "},{"location":"markedeventsheet/#game-object","title":"Game object","text":""},{"location":"markedeventsheet/#register-custom-game-object","title":"Register custom game object","text":"
    commandExecutor.addGameObjectManager({\nname: GOTYPE,\n\nviewportCoordinate: false,\n// viewportCoordinate: { viewport: new Phaser.Geom.Rectangle() },\n\nfade: 500,\n// fade: {mode: 'tint', time: 500},\n\ndefaultLayer: layerName,\n\ncommands: {\ncommandName(config, eventSheetManager) {\n// commandExecutor.waitEvent(eventEmitter, eventName);\n}\n}\n})\n
    "},{"location":"markedeventsheet/#create-custom-game-object","title":"Create custom game object","text":"
    GOTYPE\n  id=NAME\n  param0=value\n  param1=value\n
    "},{"location":"markedeventsheet/#set-properties-of-custom-game-object","title":"Set properties of custom game object","text":"
    NAME\n  x=\n  vpx=\n  y=\n  vpy=\n  alpha=\n
    "},{"location":"markedeventsheet/#ease-properties-of-custom-game-object","title":"Ease properties of custom game object","text":"
    NAME.to\n  x=\n  vpx=\n  y=\n  vpy=\n  alpha=\n  duration=1000\n  ease=Linear\n  repeat=0\n  wait=\n
    NAME.yoyo\n  x=\n  vpx=\n  y=\n  vpy=\n  alpha=\n  duration=1000\n  ease=Linear\n  repeat=0\n  wait=\n
    "},{"location":"markedeventsheet/#invoke-custom-command","title":"Invoke custom command","text":"
    NAME.commandName\n  param0=value\n  param1=value\n

    Do nothing if gameObject or commandName is not found.

    "},{"location":"markedeventsheet/#destroy-custom-game-object","title":"Destroy custom game object","text":"
    NAME.destroy\n
    "},{"location":"markedeventsheet/#wait","title":"Wait","text":""},{"location":"markedeventsheet/#wait-click","title":"Wait click","text":"
    click\n
    "},{"location":"markedeventsheet/#wait-any","title":"Wait any","text":"
    wait\n  click\n  key=keyName\n  time=\n

    Emit these events from eventSheetManager

    "},{"location":"markedeventsheet/#sound","title":"Sound","text":"

    This command executor provides

    "},{"location":"markedeventsheet/#sound-properties","title":"Sound properties","text":"
    bgm\n  volume\n  mute\n  unmute\n
    "},{"location":"markedeventsheet/#play-sound","title":"Play sound","text":"
    bgm.play\n  key=\n  // volume\n  // detune\n  // rate\n  fadeIn=0\n  // loop\n  wait=false\n
    "},{"location":"markedeventsheet/#cross-fade-in-sound","title":"Cross fade in sound","text":"
    bgm.cross\n  key=\n  duration=500\n  wait=false\n
    "},{"location":"markedeventsheet/#stop-sound","title":"Stop sound","text":"
    bgm.stop\n
    "},{"location":"markedeventsheet/#fade-out-sound","title":"Fade out sound","text":"
    bgm.fadeOut\n  duration=500\n  stop=true\n  wait=false\n
    "},{"location":"markedeventsheet/#fade-in-sound","title":"Fade in sound","text":"
    bgm.fadeIn\n  duration=500\n
    "},{"location":"markedeventsheet/#pause-sound","title":"Pause sound","text":"
    bgm.pause\n
    "},{"location":"markedeventsheet/#resume-sound","title":"Resume sound","text":"
    bgm.resume\n
    "},{"location":"markedeventsheet/#mute-sound","title":"Mute sound","text":"
    bgm.mute\n
    "},{"location":"markedeventsheet/#unmute-sound","title":"Unmute sound","text":"
    bgm.unmute\n
    "},{"location":"markedeventsheet/#camera","title":"Camera","text":""},{"location":"markedeventsheet/#camera-properties","title":"Camera properties","text":"
    camera\n  x=\n  y=\n  rotate=\n  zoom=\n

    Run next command immediately.

    "},{"location":"markedeventsheet/#fade-in","title":"Fade in","text":"
    camera.fadeIn\n  duration=1000\n  red\n  green\n  blue\n  wait=false\n
    "},{"location":"markedeventsheet/#fade-out","title":"Fade out","text":"
    camera.fadeOut\n  duration=1000\n  red\n  green\n  blue\n  wait=false\n
    "},{"location":"markedeventsheet/#flash","title":"Flash","text":"
    camera.flash\n  duration=1000\n  red\n  green\n  blue\n  wait=false\n
    "},{"location":"markedeventsheet/#shake","title":"Shake","text":"
    camera.shake\n  duration=1000\n  intensity\n  wait=false\n
    "},{"location":"markedeventsheet/#zoom","title":"Zoom","text":"
    camera.zoomTo\n  duration=1000\n  zoom\n  wait=false\n
    "},{"location":"markedeventsheet/#rotate-to","title":"Rotate to","text":"
    camera.rotateTo\n  duration=1000\n  rotate\n  ease\n  wait=false\n
    "},{"location":"markedeventsheet/#scroll-to","title":"Scroll to","text":"
    camera.scrollTo\n  duration=1000\n  x\n  y\n  ease\n  wait=false\n
    "},{"location":"markedeventsheet/#add-custom-command","title":"Add custom command","text":"
    commandExecutor.addCommand(commandName, function(config, eventSheetManager){\n// return eventEmitter;\n}, scope);\n
    "},{"location":"mask/","title":"Mask","text":""},{"location":"mask/#introduction","title":"Introduction","text":"

    Apply mask on game object. Built-in render of phaser.

    "},{"location":"mask/#usage","title":"Usage","text":""},{"location":"mask/#add-mask","title":"Add mask","text":""},{"location":"mask/#create-mask-object","title":"Create mask object","text":""},{"location":"mask/#bitmap-mask","title":"Bitmap mask","text":"
    1. Create image (image, sprite, bitmap text, particles, text),or shader
      var shape = scene.add.image(x, y, key).setVisible(false);\n
    2. Create mask
      var mask = shape.createBitmapMask();\n
      or
      var mask = scene.add.bitmapMask(shape);\n

    or

    var mask =  scene.add.bitmapMask(undefined, x, y, key, frame);\n
    "},{"location":"mask/#geometry-mask","title":"Geometry mask","text":"

    The mask is essentially a clipping path which can only make a masked pixel fully visible or fully invisible without changing its alpha (opacity).

    1. Create graphics
      var shape = scene.make.graphics();\n
    2. Create mask
      var mask = shape.createGeometryMask();\n
    "},{"location":"mask/#apply-mask-object","title":"Apply mask object","text":"
    gameObject.setMask(mask); // image.mask = mask;\n

    A mask object could be added to many game objects.

    Error

    Don't put game object and its mask into a container together. See this testing, enable line 22-24.

    Note

    Bitmap Mask is WebGL only.

    Note

    Can combine Geometry Masks and Blend Modes on the same Game Object, but Bitmap Masks can't.

    "},{"location":"mask/#clear-mask","title":"Clear mask","text":""},{"location":"mask/#invert-alpha","title":"Invert alpha","text":"

    Only GeometryMask has inverse alpha feature.

    "},{"location":"mask/#get-shape-game-object","title":"Get shape game object","text":""},{"location":"matterjs-attractor/","title":"Attractor","text":""},{"location":"matterjs-attractor/#introduction","title":"Introduction","text":"

    Apply continual forces on bodies.

    "},{"location":"matterjs-attractor/#usage","title":"Usage","text":""},{"location":"matterjs-attractor/#system-configuration","title":"System configuration","text":""},{"location":"matterjs-attractor/#matter-object-configuration","title":"Matter object configuration","text":"
    var options = {\n// ...\nplugin: {\nattractors: [\ncallback,\n// ...\n]\n},\n// ...\n}\n
    "},{"location":"matterjs-gameobject/","title":"Game object","text":""},{"location":"matterjs-gameobject/#introduction","title":"Introduction","text":"

    Matterjs physics Image/Sprite/Group object.

    "},{"location":"matterjs-gameobject/#usage","title":"Usage","text":""},{"location":"matterjs-gameobject/#add-physics-object","title":"Add physics object","text":"

    Enable physics world

    "},{"location":"matterjs-gameobject/#image-object","title":"Image object","text":"
    var image = scene.matter.add.image(x, y, key, frame);\n// var image = scene.matter.add.image(x, y, key, frame, config);\n
    "},{"location":"matterjs-gameobject/#sprite-object","title":"Sprite object","text":"
    var image = scene.matter.add.sprite(x, y, key, frame);\n// var image = scene.matter.add.sprite(x, y, key, frame, config);\n
    "},{"location":"matterjs-gameobject/#any-game-object","title":"Any game object","text":"
    var gameObject = scene.matter.add.gameObject(gameObject);\n// var gameObject = scene.matter.add.gameObject(gameObject, config);\n
    "},{"location":"matterjs-gameobject/#image-composite","title":"Image composite","text":"

    Create a new composite containing Matter Image objects created in a grid arrangement.

    var composite = scene.matter.add.imageStack(key, frame, x, y, columns, rows);\n// var composite = scene.matter.add.imageStack(key, frame, x, y, columns, rows, columnGap, rowGap, options);\n
    "},{"location":"matterjs-gameobject/#config","title":"Config","text":"
    {\nlabel: 'Body',\nshape: 'rectangle',\nchamfer: null,\n\nisStatic: false,\nisSensor: false,\nisSleeping: false,\nignoreGravity: false,\nignorePointer: false,\n\nsleepThreshold: 60,\ndensity: 0.001,\nrestitution: 0,\nfriction: 0.1,\nfrictionStatic: 0.5,\nfrictionAir: 0.01,\n\nforce: { x: 0, y: 0 },\nangle: 0,\ntorque: 0,\n\ncollisionFilter: {\ngroup: 0,\ncategory: 0x0001,\nmask: 0xFFFFFFFF,\n},\n\n// parts: [],\n\n// plugin: {\n//     attractors: [\n//         (function(bodyA, bodyB) { return {x, y}}),\n//     ]\n// },\n\nslop: 0.05,\n\ntimeScale: 1,\n}\n
    "},{"location":"matterjs-gameobject/#collision","title":"Collision","text":"

    Collisions between two bodies will obey the following rules:

    "},{"location":"matterjs-gameobject/#movement","title":"Movement","text":""},{"location":"matterjs-gameobject/#velocity","title":"Velocity","text":"
    gameObject.setVelocity(x, y);\n
    gameObject.setVelocityX(x);\n
    gameObject.setVelocityY(x);\n
    "},{"location":"matterjs-gameobject/#acceleration","title":"Acceleration","text":""},{"location":"matterjs-gameobject/#force","title":"Force","text":""},{"location":"matterjs-gameobject/#gravity","title":"Gravity","text":""},{"location":"matterjs-gameobject/#friction","title":"Friction","text":"
    gameObject.setFriction(value, air, fstatic);\n
    gameObject.setFrictionAir(v);\n
    gameObject.setFrictionStatic(v);\n
    "},{"location":"matterjs-gameobject/#rotation","title":"Rotation","text":""},{"location":"matterjs-gameobject/#fixed-rotation","title":"Fixed rotation","text":"
    gameObject.setFixedRotation();\n
    "},{"location":"matterjs-gameobject/#angular-velocity","title":"Angular velocity","text":"
    gameObject.setAngularVelocity(v);\n
    "},{"location":"matterjs-gameobject/#collision_1","title":"Collision","text":""},{"location":"matterjs-gameobject/#enable","title":"Enable","text":""},{"location":"matterjs-gameobject/#collision-group","title":"Collision group","text":""},{"location":"matterjs-gameobject/#collision-event","title":"Collision event","text":"
    scene.matter.world.on('collisionstart', function (event, bodyA, bodyB) {\n// var pairs = event.pairs;\n});\n
    "},{"location":"matterjs-gameobject/#collision-bound","title":"Collision bound","text":""},{"location":"matterjs-gameobject/#bounce","title":"Bounce","text":"
    gameObject.setBounce(v);\n
    "},{"location":"matterjs-gameobject/#mass","title":"Mass","text":"
    gameObject.setMass(v);\n
    gameObject.setDensity(v);\n
    "},{"location":"matterjs-gameobject/#sleep","title":"Sleep","text":""},{"location":"matterjs-gameobject/#enable_1","title":"Enable","text":"
    var config = {\n// ...\nphysics: {\nmatter: {\n// ...\nenableSleeping: true\n// ...\n}\n}\n\n}\n
    "},{"location":"matterjs-gameobject/#sleep-threshold","title":"Sleep threshold","text":"
    gameObject.setSleepThreshold(value);\n
    "},{"location":"matterjs-gameobject/#sleep-events","title":"Sleep events","text":""},{"location":"matterjs-world/","title":"World","text":""},{"location":"matterjs-world/#introduction","title":"Introduction","text":"

    Matter physics engine in phaser.

    "},{"location":"matterjs-world/#usage","title":"Usage","text":""},{"location":"matterjs-world/#configuration","title":"Configuration","text":"
    var config = {\n// ...\nphysics: {\ndefault: 'matter',\nmatter: {\n//    enabled: true,\n//    positionIterations: 6,\n//    velocityIterations: 4,\n//    constraintIterations: 2,\n//    enableSleeping: false,\n//    plugins: {\n//        attractors: false,\n//        wrap: false,\n//    },\n//    gravity: {\n//        x: 0,\n//        y: 0,\n//    }\n//    setBounds: {\n//        x: 0,\n//        y: 0,\n//        width: scene.sys.scale.width,\n//        height: scene.sys.scale.height,\n//        thickness: 64,\n//        left: true,\n//        right: true,\n//        top: true,\n//        bottom: true,\n//    },\n//    timing: {\n//        timestamp: 0,\n//        timeScale: 1,\n//    },\n//    correction: 1,\n//    getDelta: (function() { return 1000 / 60; }),\n//    autoUpdate: true,\n//    debug: false,\n//    debug: {\n//        showAxes: false,\n//        showAngleIndicator: false,\n//        angleColor: 0xe81153,\n//        showBroadphase: false,\n//        broadphaseColor: 0xffb400,\n//        showBounds: false,\n//        boundsColor: 0xffffff,\n//        showVelocity: false,\n//        velocityColor: 0x00aeef,\n//        showCollisions: false,\n//        collisionColor: 0xf5950c,\n//        showSeparations: false,\n//        separationColor: 0xffa500,\n//        showBody: true,\n//        showStaticBody: true,\n//        showInternalEdges: false,\n//        renderFill: false,\n//        renderLine: true,\n//        fillColor: 0x106909,\n//        fillOpacity: 1,\n//        lineColor: 0x28de19,\n//        lineOpacity: 1,\n//        lineThickness: 1,\n//        staticFillColor: 0x0d177b,\n//        staticLineColor: 0x1327e4,\n//        showSleeping: false,\n//        staticBodySleepOpacity: 0.7,\n//        sleepFillColor: 0x464646,\n//        sleepLineColor: 0x999a99,\n//        showSensors: true,\n//        sensorFillColor: 0x0d177b,\n//        sensorLineColor: 0x1327e4,\n//        showPositions: true,\n//        positionSize: 4,\n//        positionColor: 0xe042da,\n//        showJoint: true,\n//        jointColor: 0xe0e042,\n//        jointLineOpacity: 1,\n//        jointLineThickness: 2,\n//        pinSize: 4,\n//        pinColor: 0x42e0e0,\n//        springColor: 0xe042e0,\n//        anchorColor: 0xefefef,\n//        anchorSize: 4,\n//        showConvexHulls: false,\n//        hullColor: 0xd703d0\n//    }\n}\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"matterjs-world/#control","title":"Control","text":""},{"location":"matterjs-world/#pause","title":"Pause","text":"
    scene.matter.world.pause();\n
    "},{"location":"matterjs-world/#resume","title":"Resume","text":"
    scene.matter.world.resume();\n
    "},{"location":"matterjs-world/#drag-object","title":"Drag object","text":"
    scene.matter.add.mouseSpring();\n// scene.matter.add.mouseSpring(options);\n
    "},{"location":"matterjs-world/#world-bounds","title":"World bounds","text":""},{"location":"matterjs-world/#enable","title":"Enable","text":""},{"location":"matterjs-world/#gravity","title":"Gravity","text":""},{"location":"matterjs-world/#constraint","title":"Constraint","text":""},{"location":"matterjs-world/#constraint-of-2-game-objects","title":"Constraint of 2 game objects","text":"
    var constraint = scene.matter.add.constraint(gameObjectA, gameObjectB);\n// var constraint = scene.matter.add.constraint(gameObjectA, gameObjectB, length, stiffness, options);\n

    Alias:

    var constraint = scene.matter.add.spring(gameObjectA, gameObjectB, length, stiffness, options);\nvar constraint = scene.matter.add.joint(gameObjectA, gameObjectB, length, stiffness, options);\n
    "},{"location":"matterjs-world/#constraint-to-world-position","title":"Constraint to world position","text":"
    var constraint = scene.matter.add.worldConstraint(gameObjectB, length, stiffness, options);\n
    "},{"location":"matterjs-world/#chain-game-objects","title":"Chain game objects","text":"
    var composite = scene.matter.add.chain(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options);\n
    "},{"location":"matterjs-world/#remove-constraint","title":"Remove constraint","text":"
    scene.matter.world.removeConstraint(constraint);\n
    "},{"location":"matterjs-wrap/","title":"Wrap","text":""},{"location":"matterjs-wrap/#introduction","title":"Introduction","text":"

    Automatically wrap the position of bodies and composites such that they always stay within the given bounds.

    "},{"location":"matterjs-wrap/#usage","title":"Usage","text":""},{"location":"matterjs-wrap/#system-configuration","title":"System configuration","text":""},{"location":"matterjs-wrap/#matter-object-configuration","title":"Matter object configuration","text":"
    var options = {\n// ...\nplugin: {\nwrap: {\nmin: {\nx: 0,\ny: 0\n},\nmax: {\nx: 1024,\ny: 1024\n}\n}\n},\n// ...\n}\n
    "},{"location":"mesh/","title":"Mesh","text":""},{"location":"mesh/#introduction","title":"Introduction","text":"

    Render a group of textured vertices and manipulate the view of those vertices, such as rotation, translation or scaling.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"mesh/#usage","title":"Usage","text":""},{"location":"mesh/#quad","title":"Quad","text":"

    Note

    See also Plane

    1. Load texture
      scene.load.image(key, url);\n
    2. Add mesh object
      var mesh = scene.add.mesh(x, y, texture, frame);\n
      or
      var mesh = scene.make.mesh({\nx: 0,\ny: 0,\nadd: true,\n\nkey: null,\nframe: null\n});\n
    3. Set perspective or orthographic projection
    4. Creates a grid of vertices
      Phaser.Geom.Mesh.GenerateGridVerts({\nmesh: mesh,\ntexture: textureKey,\nframe: frameName,\nwidth: 1,\nheight: 1,\nwidthSegments: 1,\nheightSegments: 1,\n\n// x: 0,\n// y: 0,\n// colors: 0xffffff,\n// alphas: 1,\n// tile: false,\n// isOrtho: false\n})\n
    "},{"location":"mesh/#model","title":"Model","text":"
    1. Load model
      scene.load.obj(key, url, objURL, matURL);\n
    2. Add mesh object
      var mesh = scene.add.mesh(x, y);\n
      or
      var mesh = scene.make.mesh({\nx: 0,\ny: 0,\nadd: true\n});\n
    3. Add model
      mesh.addVerticesFromObj(key, scale, x, y, z, rotateX, rotateY, rotateZ, zIsUp);\n
    "},{"location":"mesh/#custom-mesh-class","title":"Custom mesh class","text":""},{"location":"mesh/#control","title":"Control","text":""},{"location":"mesh/#view","title":"View","text":""},{"location":"mesh/#model_1","title":"Model","text":""},{"location":"mesh/#backward-facing-faces","title":"Backward facing Faces","text":""},{"location":"mesh/#faces","title":"Faces","text":"

    Mesh is composed of triangle faces.

    var faces = mesh.faces;\n
    "},{"location":"mesh/#contains","title":"Contains","text":""},{"location":"mesh/#properties","title":"Properties","text":""},{"location":"mesh/#vertices","title":"Vertices","text":"

    Each face has 3 vertices.

    var vertices = mesh.vertices;\n
    "},{"location":"mesh/#properties_1","title":"Properties","text":""},{"location":"mesh/#update-properties","title":"Update properties","text":""},{"location":"mesh/#interactive","title":"Interactive","text":"

    To test if pointer is at any face of this mesh game object.

    mesh.setInteractive();\n
    "},{"location":"mesh/#debug","title":"Debug","text":"
    1. Set debug Graphics
      var debugGraphics = scene.add.graphics();\nmesh.setDebug(debugGraphics);\n
    2. Update Graphics in scene.update() method.
      debugGraphics.clear();\ndebugGraphics.lineStyle(1, 0x00ff00);\n
    "},{"location":"modal-promise/","title":"Modal promise","text":""},{"location":"modal-promise/#introduction","title":"Introduction","text":"

    Modal behavior wrapped into promise.

    "},{"location":"modal-promise/#live-demos","title":"Live demos","text":""},{"location":"modal-promise/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"modal-promise/#install-plugin","title":"Install plugin","text":""},{"location":"modal-promise/#load-minify-file","title":"Load minify file","text":""},{"location":"modal-promise/#import-plugin","title":"Import plugin","text":""},{"location":"modal-promise/#import-class","title":"Import class","text":""},{"location":"modal-promise/#promise","title":"Promise","text":"
    scene.plugins.get('rexModal').promise(gameObject, config)\n.then(function(closeEventData) {\n})\n
    "},{"location":"modal-promise/#close","title":"Close","text":"

    scene.plugins.get('rexModal').close(gameObject);\n// scene.plugins.get('rexModal').close(gameObject, closeEventData);\n
    or
    gameObject.emit('modal.requestClose');\n// gameObject.emit('modal.requestClose', closeEventData);\n

    graph TB\n\nPromise[\"promose('gameObject, config)\"]\nOnOpen[\"gameObject.on('modal.open')\"]\nRequestCloseEvent[\"gameObject.emit('modal.requestClose', closeEventData)\"]\nTimeOut[\"Timeout<br>Any touch\"]\nOnClose[\"gameObject.on('modal.close')\"]\nResolve[\"then(function(closeEventData) { })\"]\n\nPromise --> |Transition-in| OnOpen\nOnOpen --> |manualClose| RequestCloseEvent\nOnOpen --> |Not manualClose| TimeOut\nRequestCloseEvent --> |Transition-out| OnClose\nTimeOut --> |Transition-out| OnClose\nOnClose --> Resolve
    "},{"location":"modal-promise/#events","title":"Events","text":""},{"location":"modal/","title":"Modal behavior","text":""},{"location":"modal/#introduction","title":"Introduction","text":"

    Pop-up modal dialog, then scale-down this dialog.

    "},{"location":"modal/#live-demos","title":"Live demos","text":""},{"location":"modal/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"modal/#install-plugin","title":"Install plugin","text":""},{"location":"modal/#load-minify-file","title":"Load minify file","text":""},{"location":"modal/#import-plugin","title":"Import plugin","text":""},{"location":"modal/#import-class","title":"Import class","text":""},{"location":"modal/#create-instance","title":"Create instance","text":"
    var modal = scene.plugins.get('rexModal').add(gameObject, {\n// cover: {\n//     color: 0x0,\n//     alpha: 0.8,\n//     transitIn: function(gameObject, duration) { },\n//     transitOut: function(gameObject, duration) { },\n// },\n// cover: false, \n\n// When to close modal dialog?\n// touchOutsideClose: false,\n// anyTouchClose: false,\n// timeOutClose: false,\n// manualClose: false,\n\n// duration: {\n//     in: 200,\n//     hold: 2000,\n//     out: 200\n// }\n\n// transitIn: 0,\n// transitOut: 0,\n\n// destroy: true,\n// openOnStart: true\n});\n
    "},{"location":"modal/#open","title":"Open","text":""},{"location":"modal/#close","title":"Close","text":"
    modal.requestClose();\n// modal.requestClose(closeEventData);\n
    "},{"location":"modal/#events","title":"Events","text":""},{"location":"mousewheel/","title":"Mouse wheel","text":""},{"location":"mousewheel/#introduction","title":"Introduction","text":"

    Mouse wheel events of phaser.

    "},{"location":"mousewheel/#usage","title":"Usage","text":""},{"location":"mousewheel/#mouse-wheel-events","title":"Mouse wheel events","text":"
    1. Events on touched Game object
      gameObject.on('wheel', function(pointer, dx, dy, dz, event){ /* ... */ });\n
    2. Event on input plugin for each touched Game object
      scene.input.on('gameobjectwheel', function(pointer, gameObject, dx, dy, dz, event){ /* ... */ });\n
    3. Events to get all touched Game Objects
      scene.input.on('wheel', function(pointer, currentlyOver, dx, dy, dz, event){ /* ... */ });\n
    "},{"location":"mousewheel/#mouse-wheel-properties","title":"Mouse wheel properties","text":""},{"location":"mousewheelscroller/","title":"Mouse wheel scroller","text":""},{"location":"mousewheelscroller/#introduction","title":"Introduction","text":"

    Emit scroll event when mouse-wheeling.

    "},{"location":"mousewheelscroller/#live-demos","title":"Live demos","text":""},{"location":"mousewheelscroller/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"mousewheelscroller/#install-plugin","title":"Install plugin","text":""},{"location":"mousewheelscroller/#load-minify-file","title":"Load minify file","text":""},{"location":"mousewheelscroller/#import-plugin","title":"Import plugin","text":""},{"location":"mousewheelscroller/#import-class","title":"Import class","text":""},{"location":"mousewheelscroller/#create-instance","title":"Create instance","text":"
    var scroller = scene.plugins.get('rexMouseWheelScroller').add(gameObject, {\n// focus: false,\n// speed: 0.1,\n// enable: true,\n});\n
    "},{"location":"mousewheelscroller/#event","title":"Event","text":""},{"location":"mousewheelscroller/#speed","title":"Speed","text":""},{"location":"mousewheelscroller/#enable","title":"Enable","text":""},{"location":"mousewheeltoupdown/","title":"Mouse-wheel to up/down","text":""},{"location":"mousewheeltoupdown/#introduction","title":"Introduction","text":"

    Map mouse-wheeling to (up/down) cursor key state.

    "},{"location":"mousewheeltoupdown/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"mousewheeltoupdown/#install-plugin","title":"Install plugin","text":""},{"location":"mousewheeltoupdown/#load-minify-file","title":"Load minify file","text":""},{"location":"mousewheeltoupdown/#import-plugin","title":"Import plugin","text":""},{"location":"mousewheeltoupdown/#import-class","title":"Import class","text":""},{"location":"mousewheeltoupdown/#create-instance","title":"Create instance","text":"
    var mouseWheelToUpDown = scene.plugins.get('rexMouseWheelToUpDown').add(scene);\n
    "},{"location":"mousewheeltoupdown/#state-of-cursor-keys","title":"State of cursor keys","text":"
    var cursorKeys = mouseWheelToUpDown.createCursorKeys();\n\nvar upKeyDown = cursorKeys.up.isDown;\nvar downKeyDown = cursorKeys.down.isDown;\n

    Or

    var upKeyDown = mouseWheelToUpDown.up;\nvar downKeyDown = mouseWheelToUpDown.down;\nvar noKeyDown = mouseWheelToUpDown.noKey;\n
    "},{"location":"mousewheeltoupdown/#destroy","title":"Destroy","text":"
    mouseWheelToUpDown.destroy();\n
    "},{"location":"moveto/","title":"Move to","text":""},{"location":"moveto/#introduction","title":"Introduction","text":"

    Move game object towards target position with a steady speed.

    "},{"location":"moveto/#live-demos","title":"Live demos","text":""},{"location":"moveto/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"moveto/#install-plugin","title":"Install plugin","text":""},{"location":"moveto/#load-minify-file","title":"Load minify file","text":""},{"location":"moveto/#import-plugin","title":"Import plugin","text":""},{"location":"moveto/#import-class","title":"Import class","text":""},{"location":"moveto/#create-instance","title":"Create instance","text":"
    var moveTo = scene.plugins.get('rexMoveTo').add(gameObject, {\n// speed: 400,\n// rotateToTarget: false\n});\n
    "},{"location":"moveto/#start-moving","title":"Start moving","text":""},{"location":"moveto/#target-position","title":"Target position","text":"
    var targetX = moveTo.targetX;\nvar targetY = moveTo.targetY;\n
    "},{"location":"moveto/#enable","title":"Enable","text":""},{"location":"moveto/#pause-resume-stop-moving","title":"Pause, Resume, stop moving","text":"
    moveTo.pause();\nmoveTo.resume();\nmoveTo.stop();\n
    "},{"location":"moveto/#set-speed","title":"Set speed","text":"
    moveTo.setSpeed(speed);\n// moveTo.speed = speed;\n
    "},{"location":"moveto/#set-rotate-to-target","title":"Set rotate-to-target","text":"
    moveTo.setRotateToTarget(rotateToTarget);\n
    "},{"location":"moveto/#events","title":"Events","text":""},{"location":"moveto/#status","title":"Status","text":""},{"location":"mustache/","title":"Mustache","text":""},{"location":"mustache/#introduction","title":"Introduction","text":"

    Format string with variables. Reference

    "},{"location":"mustache/#usage","title":"Usage","text":"
    var template = 'hello, {{name}}';\nvar view = {\nname: 'rex'\n};\nvar result = Mustache.render(template, view);\n
    "},{"location":"ninepatch/","title":"Nine patch","text":""},{"location":"ninepatch/#introduction","title":"Introduction","text":"

    Stretchable image.

    "},{"location":"ninepatch/#live-demos","title":"Live demos","text":""},{"location":"ninepatch/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ninepatch/#install-plugin","title":"Install plugin","text":""},{"location":"ninepatch/#load-minify-file","title":"Load minify file","text":""},{"location":"ninepatch/#import-plugin","title":"Import plugin","text":""},{"location":"ninepatch/#import-class","title":"Import class","text":""},{"location":"ninepatch/#create-instance","title":"Create instance","text":"
    var ninePatch = scene.add.rexNinePatch(x, y, width, height, key, baseFrame, columns, rows, {\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch(x, y, width, height, key, columns, rows, {\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch(x, y, width, height, key, {\ncolumns: undefined, // leftWidth: undefined, right: undefined,\nrows: undefined,    // topHeight: undefined, bottomHeight: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch(x, y, width, height, {\nkey: undefined,\ncolumns: undefined, // leftWidth: undefined, right: undefined,\nrows: undefined,    // topHeight: undefined, bottomHeight: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch(x, y, {\nwidth: 1, height: 1,\nkey: undefined,\ncolumns: undefined, // leftWidth: undefined, right: undefined,\nrows: undefined,    // topHeight: undefined, bottomHeight: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch({\nx: 0, y: 0,\nwidth: 1, height: 1,\nkey: undefined,\ncolumns: undefined, // leftWidth: undefined, rightWidth: undefined,\nrows: undefined,    // topHeight: undefined, bottomHeight: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n
    "},{"location":"ninepatch/#custom-class","title":"Custom class","text":""},{"location":"ninepatch/#resize","title":"Resize","text":"
    ninePatch.resize(width, height);\n

    Will update texture

    "},{"location":"ninepatch/#set-base-texture-of-source-image","title":"Set base texture of source image","text":"
    ninePatch.setBaseTexture(key, baseFrame, columns, rows);\n

    or

    ninePatch.setBaseTexture(key, baseFrame, leftWidth, rightWidth, topHeight, bottomHeight);\n

    Will update texture

    "},{"location":"ninepatch/#set-stretch-mode","title":"Set stretch mode","text":"
    ninePatch.setStretchMode(mode);\n
    "},{"location":"ninepatch/#set-get-frame-name-callback","title":"Set get-frame-name callback","text":"
    ninePatch.setGetFrameNameCallback(callback);\n
    "},{"location":"ninepatch/#fixed-part-scale","title":"Fixed-part scale","text":""},{"location":"ninepatch/#update-texture","title":"Update texture","text":"
    ninePatch.updateTexture();\n
    "},{"location":"ninepatch/#compare-with-nine-slice","title":"Compare with nine-slice","text":""},{"location":"ninepatch2/","title":"Nine patch2","text":""},{"location":"ninepatch2/#introduction","title":"Introduction","text":"

    Stretchable image. Has better performance than nine-patch.

    "},{"location":"ninepatch2/#live-demos","title":"Live demos","text":""},{"location":"ninepatch2/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ninepatch2/#install-plugin","title":"Install plugin","text":""},{"location":"ninepatch2/#load-minify-file","title":"Load minify file","text":""},{"location":"ninepatch2/#import-plugin","title":"Import plugin","text":""},{"location":"ninepatch2/#import-class","title":"Import class","text":""},{"location":"ninepatch2/#create-instance","title":"Create instance","text":"
    var ninePatch = scene.add.rexNinePatch2(x, y, width, height, key, baseFrame, columns, rows, {\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch2(x, y, width, height, key, columns, rows, {\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch2(x, y, width, height, key, {\ncolumns: undefined,\nrows: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch2(x, y, width, height, {\nkey: undefined,\ncolumns: undefined,\nrows: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch2(x, y, {\nwidth: 1, height: 1,\nkey: undefined,\ncolumns: undefined,\nrows: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch2({\nx: 0, y: 0,\nwidth: 1, height: 1,\nkey: undefined,\ncolumns: undefined,\nrows: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n
    "},{"location":"ninepatch2/#custom-class","title":"Custom class","text":""},{"location":"ninepatch2/#resize","title":"Resize","text":"
    ninePatch.resize(width, height);\n

    Will update texture

    "},{"location":"ninepatch2/#tint","title":"Tint","text":""},{"location":"ninepatch2/#set-texture-of-source-image","title":"Set texture of source image","text":"
    ninePatch.setBaseTexture(key, baseFrame, columns, rows);\n// ninePatch.setBaseTexture(key, columns, rows);\n

    Will update texture

    "},{"location":"ninepatch2/#set-stretch-mode","title":"Set stretch mode","text":"
    ninePatch.setStretchMode(mode);\n
    "},{"location":"ninepatch2/#set-get-frame-name-callback","title":"Set get-frame-name callback","text":"
    ninePatch.setGetFrameNameCallback(callback);\n
    "},{"location":"ninepatch2/#fixed-part-scale","title":"Fixed-part scale","text":""},{"location":"ninepatch2/#update-texture","title":"Update texture","text":"
    ninePatch.updateTexture();\n
    "},{"location":"ninepatch2/#compare-with-nine-patch","title":"Compare with nine-patch","text":""},{"location":"nineslice/","title":"Nine slice","text":""},{"location":"nineslice/#introduction","title":"Introduction","text":"

    Display a texture-based object that can be stretched both horizontally and vertically, but that retains fixed-sized corners, built-in game object of phaser.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"nineslice/#usage","title":"Usage","text":""},{"location":"nineslice/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"nineslice/#add-nine-slice-object","title":"Add nine slice object","text":"
    var nineSlice = scene.add.nineslice(x, y, texture, frame, width, height, leftWidth, rightWidth, topHeight, bottomHeight);\n

    Add nine slice from JSON

    var nineSlice = scene.make.nineslice({\nx: 0,\ny: 0,\nkey: '',\n// frame: '',\n\n// width: 256,\n// height: 256,\n// leftWidth: 10,\n// rightWidth: 10,\n// topHeight: 0,\n// bottomHeight: 0,\n\n// angle: 0,\n// alpha: 1,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"nineslice/#custom-class","title":"Custom class","text":""},{"location":"nineslice/#resize","title":"Resize","text":"
    nineSlice.setSize(width, height);\n
    "},{"location":"nineslice/#set-texture-of-source-image","title":"Set texture of source image","text":"
    nineSlice.setTexture(texture, frame);\nnineSlice.setSlices(width, height, leftWidth, rightWidth, topHeight, bottomHeight);\n
    "},{"location":"nineslice/#texture","title":"Texture","text":"

    See game object - texture

    "},{"location":"nineslice/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"nineslice/#create-mask","title":"Create mask","text":"
    var mask = nineSlice.createBitmapMask();\n

    See mask

    "},{"location":"nineslice/#compare-with-nine-patch","title":"Compare with nine-patch","text":""},{"location":"orientation/","title":"Orientation","text":""},{"location":"orientation/#introduction","title":"Introduction","text":"

    Get oriention, built-in method of phaser.

    "},{"location":"orientation/#usage","title":"Usage","text":""},{"location":"orientation/#orientation","title":"Orientation","text":"
    var orientation = scene.scale.orientation;\n
    "},{"location":"orientation/#events","title":"Events","text":""},{"location":"orientation/#lock-orientation","title":"Lock orientation","text":"
    scene.scale.lockOrientation(orientation)\n
    "},{"location":"pad/","title":"Pad","text":""},{"location":"pad/#introduction","title":"Introduction","text":"

    Takes the given string and pads it out, to the length required, built-in method of phaser.

    "},{"location":"pad/#usage","title":"Usage","text":"
    var result = Phaser.Utils.String.Pad(str, len, pad, dir);\n
    "},{"location":"particles-along-bounds/","title":"Particles along bounds","text":""},{"location":"particles-along-bounds/#introduction","title":"Introduction","text":"

    Emit particles along bounds of game object.

    "},{"location":"particles-along-bounds/#live-demos","title":"Live demos","text":""},{"location":"particles-along-bounds/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"particles-along-bounds/#install-plugin","title":"Install plugin","text":""},{"location":"particles-along-bounds/#load-minify-file","title":"Load minify file","text":""},{"location":"particles-along-bounds/#import-plugin","title":"Import plugin","text":""},{"location":"particles-along-bounds/#import-class","title":"Import class","text":""},{"location":"particles-along-bounds/#create-instance","title":"Create instance","text":"
    var particles = scene.plugins.get('rexParticlesAlongBounds').startEffect(gameObject, {\ntextureKey: key,\n// textureFrames: undefined,\n// padding: 0,\n// blendMode: 'ADD',\n// lifespan: 1000,\n// stepRate: 10,\n// spread: 10,\n\n// scale: undefined,\n// alpha: undefined,\n// tint: undefined,\n\n// repeat: 0,\n// gravityX: 0,\n// gravityY: 0,\n// duration: undefined\n});\n

    Format of spread, scale, alpha, tint parameters :

    "},{"location":"particles-along-bounds/#is-running","title":"Is running","text":"
    var isRunning = particles.isRunning;\n
    "},{"location":"particles-along-bounds/#events","title":"Events","text":""},{"location":"particles/","title":"Particles","text":""},{"location":"particles/#introduction","title":"Introduction","text":"

    Particles uses its own lightweight physics system, and can interact only with its Emitter's bounds and zones. Built-in game object of phaser.

    Note

    API is not compatible with 3.55.x

    "},{"location":"particles/#usage","title":"Usage","text":""},{"location":"particles/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"particles/#add-particle","title":"Add particle","text":"
    var particles = scene.add.particles(x, y, texture, {\n\n// EmitterOp\naccelerationX: 0,\naccelerationY: 0,\nalpha: 1,\nangle: { min: 0, max: 360 },\nbounce: 0,\ncolor: undefined,\ndelay: 0,\nhold: 0,\nlifespan: 1000,\nmaxVelocityX: 10000,\nmaxVelocityY: 10000,\nmoveToX: 0,\nmoveToY: 0,\nquantity: 1,\nrotate: 0,\nscaleX: 1,\nscaleY: 1,\n// scale:\nspeedX: 0,\nspeedY: 0,\nspeed: tint: 0xffffff,\nx: 0,\ny: 0,\n\n// Emitter properties\nactive:\nadvance:\nblendMode:\ncolorEase:\ndeathCallback:\ndeathCallbackScope:\nduration:\nemitCallback:\nemitCallbackScope:\n// callbackScope    \nfrequency:\ngravityX:\ngravityY:\nmaxAliveParticles:\nmaxParticles:\nname:\nemitting:\nparticleBringToTop:\nparticleClass:\nradial:\nsortCallback:\nsortOrderAsc:\nsortProperty:\nstopAfter:\ntintFill:\ntimeScale:\ntrackVisible:\nvisible:\n\n// Position\n// emitZone : random-zone, edge-zone\n// random-zone\nemitZone: {\ntype: 'random',\nsource: geom,\n},\n\n// edge-zone\nemitZone:{\ntype: 'edge',\nsource: geom,\nquantity: 1,\nstepRate: 0,\ntotal: -1,\nyoyo: false,\nseamless: true\n},\n\ndeathZone: {\ntype: 'onEnter', // 'onEnter', or 'onLeave'\nsource: geom,\n},\n\nbounds:               // {x, y, w, h}, or {x, y, width, height}, or Phaser.Geom.Rectangle\ncollideLeft: true,\ncollideRight: true,\ncollideTop: true,\ncollideBottom: true,\n\nfollow:\nfollowOffset:{\nx: 0,\ny: 0\n},\n\n// Texture\ntexture:\nframe:\nanim: [],  // string, or array of string\n\nreserve: 0,\nadvance: 0\n});\n
    "},{"location":"particles/#control","title":"Control","text":""},{"location":"particles/#follow-target","title":"Follow target","text":""},{"location":"particles/#frame","title":"Frame","text":"

    emitter.setEmitterFrame(frames);\n// emitter.setEmitterFrame(frames, pickRandom, quantity);\n
    - frames : One or more texture frames, or a configuration object. - String or number value - Array of string or number value - Configuration object :
    {\nframes: [],\ncycle: false,\nquantity: 1\n}\n
    - pickRandom : - true : Whether frames should be assigned at random from frames. Default behavior. - quantity : The number of consecutive particles that will receive each frame. Default value is 1.

    "},{"location":"particles/#animation","title":"Animation","text":"

    emitter.setAnim(anims);\n// emitter.setAnim(anims, pickRandom, quantity);\n
    - anims : One or more animations, or a configuration object. - String or number value - Array of string or number value - Configuration object :
    {\nanims: [],\ncycle: false,\nquantity: 1\n}\n
    - pickRandom : - true : Whether frames should be assigned at random from frames. Default behavior. - quantity : The number of consecutive particles that will receive each frame. Default value is 1.

    "},{"location":"particles/#particle","title":"Particle","text":""},{"location":"particles/#render-order","title":"Render order","text":""},{"location":"particles/#emitter","title":"Emitter","text":""},{"location":"particles/#zone","title":"Zone","text":""},{"location":"particles/#emit-zone","title":"Emit zone","text":""},{"location":"particles/#add-emit-zone","title":"Add emit zone","text":"
    var zone = emitter.addEmitZone({\ntype: 'random',\nsource: geom,\n});\n
    "},{"location":"particles/#add-emit-edge","title":"Add emit edge","text":"
    var zone = emitter.addEmitZone({\ntype: 'edge',\nsource: curve,\n\nquantity: 1,\nstepRate: 0,\nyoyo: false,\nseamless: true,\ntotal: -1\n});\n

    quantity or stepRate

    "},{"location":"particles/#set-emit-zone","title":"Set emit zone","text":"
    emitter.setEmitZone(zone);\n
    "},{"location":"particles/#zone-source","title":"Zone source","text":""},{"location":"particles/#remove-emit-zone","title":"Remove emit zone","text":"
    emitter.removeEmitZone(zone)\n
    "},{"location":"particles/#clear-emit-zone","title":"Clear emit zone","text":"
    emitter.emitZones.length = 0;\nemitter.zoneIndex = 0;\n
    "},{"location":"particles/#death-zone","title":"Death zone","text":"
    var zone = emitter.addDeathZone({\ntype: 'onEnter',\nsource: geom\n});\n
    "},{"location":"particles/#remove-death-zone","title":"Remove death zone","text":"
    emitter.removeDeathZone(zone)\n
    "},{"location":"particles/#clear-death-zone","title":"Clear death zone","text":"
    emitter.deathZones.length = 0;\n
    "},{"location":"particles/#events","title":"Events","text":""},{"location":"particles/#bounds","title":"Bounds","text":""},{"location":"particles/#gravity-well","title":"Gravity well","text":""},{"location":"particles/#custom-particle-processor","title":"Custom Particle Processor","text":""},{"location":"particles/#custom-particle-class","title":"Custom particle class","text":"
    class MyParticle extends Phaser.GameObjects.Particles.Particle {\nconstructor (emitter) {\nsuper(emitter);\n/* ... */\n}\n\nupdate (delta, step, processors) {\nsuper.update(delta, step, processors);\n/* ... */\n}\n}\n
    "},{"location":"path/","title":"Path","text":""},{"location":"path/#introduction","title":"Introduction","text":"

    Path in curves, built-in object of phaser.

    "},{"location":"path/#usage","title":"Usage","text":""},{"location":"path/#add-path-object","title":"Add path object","text":"
    var path = scene.add.path();\n// var path = scene.add.path(x, y);  // curve start from (x, y)\n

    or

    var path = new Phaser.Curves.Path();\n// var path = new Phaser.Curves.Path(x, y);  // curve start from (x, y)\n
    "},{"location":"path/#add-path-object-with-curves","title":"Add path object with curves","text":"

    Curves in JSON

    var path = scene.add.path(json);\n
    or
    var path = new Phaser.Curves.Path(json);\n

    "},{"location":"path/#add-curve","title":"Add curve","text":""},{"location":"path/#line","title":"Line","text":"

    Properties:

    "},{"location":"path/#circleellipsearc","title":"Circle/ellipse/arc","text":"

    Properties:

    "},{"location":"path/#spline","title":"Spline","text":""},{"location":"path/#append-point","title":"Append point","text":"
    var point = curve.addPoint(x, y);\n
    "},{"location":"path/#quadratic-bezier-curve","title":"Quadratic bezier curve","text":"
    1. Create quadratic bezier curve object
      var curve = new Phaser.Curves.QuadraticBezier(startPoint, controlPoint, endPoint); // point: {x, y}\n
      or
      var points = [\nx0, y0,     // start point\nx1, y1,     // control point\nx2, y2      // end point\n];\nvar curve = new Phaser.Curves.QuadraticBezier(points);\n
    2. Add to path
      path.add(curve);\n

    Add quadratic bezier curve started from previous end point to next point

    path.quadraticBezierTo(endX, endY, controlX, controlY);\n
    or
    path.quadraticBezierTo(endPoint, controlPoint);  // point : Phaser.Math.Vector2\n

    "},{"location":"path/#cubic-bezier-curve","title":"Cubic bezier curve","text":"
    1. Create quadratic bezier curve object
      var curve = new Phaser.Curves.CubicBezier(startPoint, controlPoint1, controlPoint2, endPoint); // point: {x, y}\n
      or
      var points = [\nx0, y0,     // start point\nx1, y1,     // control point1\nx2, y2,     // control point2\nx3, y3      // end point\n];\nvar curve = new Phaser.Curves.CubicBezier(points);\n
    2. Add to path
      path.add(curve);\n

    Add cubic bezier curve started from previous end point to next point

    path.cubicBezierTo(endX, endY, control1X, control1Y, control2X, control2Y);\n
    or
    path.cubicBezierTo(endPoint, controlPoint1, controlPoint2);  // point : Phaser.Math.Vector2\n

    "},{"location":"path/#move-to-point","title":"Move to point","text":"
    path.moveTo(x, y);\n
    "},{"location":"path/#add-curves-from-json","title":"Add curves from JSON","text":"
    path.fromJSON(json);\n
    "},{"location":"path/#get-curves","title":"Get curves","text":"
    var curves = path.curves;\n
    "},{"location":"path/#get-curve-at-t","title":"Get curve at t","text":"
    var curve = path.getCurveAt(t);\n
    "},{"location":"path/#draw-on-graphics","title":"Draw on graphics","text":"
    path.draw(graphics);\n// path.draw(graphics, pointsTotal);\n

    or

    curve.draw(graphics);\n// curve.draw(graphics, pointsTotal);\n
    "},{"location":"path/#point","title":"Point","text":""},{"location":"path/#length-of-path","title":"Length of path","text":"

    var l = path.getLength();\n
    or
    var l = curve.getLength();\n

    Length of path/curve will be cached.

    "},{"location":"path/#update-length","title":"Update length","text":"

    path.updateArcLengths();\n
    or
    curve.updateArcLengths();\n

    "},{"location":"path/#curves-to-json","title":"Curves to JSON","text":"

    var json = path.toJSON();\n
    or
    var json = curve.toJSON();\n

    "},{"location":"path/#bounds","title":"Bounds","text":"

    Get bounds

    var out = path.getBounds();    // accuracy = 16\n// var out = path.getBounds(out);\n// var out = path.getBounds(out, accuracy);\n
    or
    var out = curve.getBounds();    // accuracy = 16\n// var out = curve.getBounds(out);\n// var out = curve.getBounds(out, accuracy);\n

    "},{"location":"path/#destroy","title":"Destroy","text":"
    path.destroy();\n
    "},{"location":"pathfollower/","title":"Path follower","text":""},{"location":"pathfollower/#introduction","title":"Introduction","text":"

    Set position of game object on a path.

    "},{"location":"pathfollower/#live-demos","title":"Live demos","text":""},{"location":"pathfollower/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"pathfollower/#install-plugin","title":"Install plugin","text":""},{"location":"pathfollower/#load-minify-file","title":"Load minify file","text":""},{"location":"pathfollower/#import-plugin","title":"Import plugin","text":""},{"location":"pathfollower/#import-class","title":"Import class","text":""},{"location":"pathfollower/#create-instance","title":"Create instance","text":"
    // var path = scene.add.path();\nvar pathFollower = scene.plugins.get('rexPathFollower').add(gameObject, {\n// path: path,          // path object\n// t: 0,                // t: 0~1\n// rotateToPath: false,\n// rotationOffset: 0,\n// angleOffset: 0,\n\n// spacedPoints: false,\n// spacedPoints: {\n//     divisions: undefined,\n//     stepRate: 10,\n// }\n\n});\n
    "},{"location":"pathfollower/#move-along-path","title":"Move along path","text":"

    Set pathFollower.t (0~1) to move along path

    pathFollower.t = t;  // t: 0~1\n// pathFollower.setT(t);\n

    or tween pathFollower.t

    var tween = scene.tweens.add({\ntargets: pathFollower,\nt: 1,\nease: 'Linear', // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\nrepeat: 0,\nyoyo: false\n});\n
    "},{"location":"pathfollower/#set-path","title":"Set path","text":"
    pathFollower.setPath(path);\n
    "},{"location":"pathfollower/#set-rotate-to-path","title":"Set rotate-to-path","text":"
    pathFollower.setRotateToPath(rotateToPath, rotationOffset);\n
    "},{"location":"percentage/","title":"Percentage","text":""},{"location":"percentage/#introduction","title":"Introduction","text":"

    Work out what percentage value is of the range between min and max, built-in method of phaser.

    "},{"location":"percentage/#usage","title":"Usage","text":"
    var result = Phaser.Math.Percent(value, min, max);\n
    "},{"location":"perlin/","title":"Perlin","text":""},{"location":"perlin/#introduction","title":"Introduction","text":"

    Perlin2/Perlin3 noise and simplex2/simplex3 noise. (Reference)

    "},{"location":"perlin/#live-demos","title":"Live demos","text":""},{"location":"perlin/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perlin/#install-plugin","title":"Install plugin","text":""},{"location":"perlin/#load-minify-file","title":"Load minify file","text":""},{"location":"perlin/#import-plugin","title":"Import plugin","text":""},{"location":"perlin/#import-class","title":"Import class","text":""},{"location":"perlin/#create-noise-instance","title":"Create noise instance","text":"
    var noise = scene.plugins.get('rexPerlin').add(seed);\n
    "},{"location":"perlin/#perlin","title":"Perlin","text":""},{"location":"perlin/#simplex","title":"Simplex","text":""},{"location":"perlin/#set-seed","title":"Set seed","text":"
    noise.setSeed(seed);\n
    "},{"location":"perspective-card/","title":"Card","text":""},{"location":"perspective-card/#introduction","title":"Introduction","text":"

    A container with two perspective-images.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"perspective-card/#live-demos","title":"Live demos","text":""},{"location":"perspective-card/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perspective-card/#install-plugin","title":"Install plugin","text":""},{"location":"perspective-card/#load-minify-file","title":"Load minify file","text":""},{"location":"perspective-card/#import-plugin","title":"Import plugin","text":""},{"location":"perspective-card/#import-class","title":"Import class","text":""},{"location":"perspective-card/#create-instance","title":"Create instance","text":"
    var card = scene.add.rexPerspectiveCard({\nx: 0, y: 0,\n\nback: {key, frame},\nfront: {key, frame},\nface: 0,\n\norientation: 0,\n\n// width,\n// height,\n\n// flip : {\n//     frontToBack: 0,\n//     backToFront: 1,\n//     duration: 1000,\n//     ease: 'Cubic',\n//     delay: 0,\n// }\n// flip: false\n});\n

    Add card from JSON

    var card = scene.make.rexPerspectiveCard({\nx: 0,\ny: 0,\n\nfront,\nback,\nface: 0,\n\norientation: 0,\n\nwidth,\nheight,\n\nflip,\n\nadd: true\n});\n
    "},{"location":"perspective-card/#custom-class","title":"Custom class","text":""},{"location":"perspective-card/#face","title":"Face","text":""},{"location":"perspective-card/#face-instances","title":"Face instances","text":""},{"location":"perspective-card/#flip-behavior","title":"Flip behavior","text":""},{"location":"perspective-card/#start-flipping","title":"Start flipping","text":"
    card.flip.flip();\n// card.flip.flip(duration, repeat);\n

    or

    "},{"location":"perspective-card/#stop-flipping","title":"Stop flipping","text":"
    card.flip.stop();\n
    "},{"location":"perspective-card/#set-duration","title":"Set duration","text":"
    card.flip.setDuration(duration);\n// card.flip.duration = duration;\n
    "},{"location":"perspective-card/#set-ease","title":"Set ease","text":"
    card.flip.setEase(ease);\n// card.flip.ease = ease;\n
    "},{"location":"perspective-card/#events","title":"Events","text":""},{"location":"perspective-card/#status","title":"Status","text":""},{"location":"perspective-card/#rotation","title":"Rotation","text":""},{"location":"perspective-card/#debug","title":"Debug","text":"
    1. Set debug Graphics
      var debugGraphics = scene.add.graphics();\ncard.setDebug(debugGraphics);\n
    2. Update Graphics in scene.update() method.
      debugGraphics.clear();\ndebugGraphics.lineStyle(1, 0x00ff00);\n
    "},{"location":"perspective-card/#other-properties","title":"Other properties","text":"

    See container.

    "},{"location":"perspective-carousel/","title":"Carousel","text":""},{"location":"perspective-carousel/#introduction","title":"Introduction","text":"

    A container with cards.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"perspective-carousel/#live-demos","title":"Live demos","text":""},{"location":"perspective-carousel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perspective-carousel/#install-plugin","title":"Install plugin","text":""},{"location":"perspective-carousel/#load-minify-file","title":"Load minify file","text":""},{"location":"perspective-carousel/#import-plugin","title":"Import plugin","text":""},{"location":"perspective-carousel/#import-class","title":"Import class","text":""},{"location":"perspective-carousel/#create-instance","title":"Create instance","text":"
    var carousel = scene.add.rexPerspectiveCarousel({\nx: 0, y: 0,\n\nfaces: [],\n// face: 0,\n// rtl: false,\n\n// width,\n// height,\n\n// faceWidth,\n// faceSpace: 0,\n\n// z: 1,\n// zEnd: 0,\n\n// roll : {\n//     duration: 1000,\n//     ease: 'Cubic',\n//     delay: 0,\n// }\n});\n

    Add carousel from JSON

    var carousel = scene.make.rexPerspectiveCarousel({\nx: 0,\ny: 0,\n\nfaces: [],\n\n// width,\n// height,\n\n// faceWidth,\n// faceSpace: 0,\n\n// z: 1,\n// zEnd: 0,\n\nadd: true\n});\n
    "},{"location":"perspective-carousel/#custom-class","title":"Custom class","text":""},{"location":"perspective-carousel/#face-instances","title":"Face instances","text":"
    var faces = carousel.faces;\n
    "},{"location":"perspective-carousel/#face","title":"Face","text":""},{"location":"perspective-carousel/#roll-behavior","title":"Roll behavior","text":""},{"location":"perspective-carousel/#start-rolling","title":"Start rolling","text":""},{"location":"perspective-carousel/#stop-flipping","title":"Stop flipping","text":"
    carousel.roll.stop();\n
    "},{"location":"perspective-carousel/#set-duration","title":"Set duration","text":"
    carousel.roll.setDuration(duration);\n// carousel.roll.duration = duration;\n
    "},{"location":"perspective-carousel/#set-ease","title":"Set ease","text":"
    carousel.roll.setEase(ease);\n// carousel.roll.ease = ease;\n
    "},{"location":"perspective-carousel/#events","title":"Events","text":""},{"location":"perspective-carousel/#status","title":"Status","text":""},{"location":"perspective-carousel/#rotation","title":"Rotation","text":""},{"location":"perspective-carousel/#other-properties","title":"Other properties","text":"

    See container.

    "},{"location":"perspective-image/","title":"Image","text":""},{"location":"perspective-image/#introduction","title":"Introduction","text":"

    Image with perspective rotation.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"perspective-image/#live-demos","title":"Live demos","text":""},{"location":"perspective-image/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perspective-image/#install-plugin","title":"Install plugin","text":""},{"location":"perspective-image/#load-minify-file","title":"Load minify file","text":""},{"location":"perspective-image/#import-plugin","title":"Import plugin","text":""},{"location":"perspective-image/#import-class","title":"Import class","text":""},{"location":"perspective-image/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexPerspectiveImage(x, y, texture, frame, {\n// hideCCW: true,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    or

    var image = scene.add.rexPerspectiveImage({\n// x: 0,\n// y: 0,\nkey,\n// frame: null,\n// hideCCW: true,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    Add perspectiveimage from JSON

    var perspectiveimage = scene.make.rexPerspectiveImage({\nx: 0,\ny: 0,\n\nkey: null,\nframe: null,\n\n// hideCCW: false,\n// gridWidth: 32,\n// girdHeight: 32,\n\nadd: true\n});\n
    "},{"location":"perspective-image/#custom-class","title":"Custom class","text":""},{"location":"perspective-image/#transform-vertices","title":"Transform vertices","text":"

    Offset then rotate all vertices.

    image.transformVerts(x, y, z, rotateX, rotateY, rotateZ);\n
    "},{"location":"perspective-image/#rotation","title":"Rotation","text":""},{"location":"perspective-image/#flip","title":"Flip","text":"
    scene.tweens.add({\ntargets: image,\nangleY: { start: 0, to: -180}\n})\n
    "},{"location":"perspective-image/#tint-color","title":"Tint color","text":""},{"location":"perspective-image/#change-frame","title":"Change frame","text":"

    Frame is bound with vertices. Use perspective renderTexture to change frame without recreate vertices again (assume that size of frame won't changed).

    rt.drawFrame(key, frame);\n
    "},{"location":"perspective-image/#other-properties","title":"Other properties","text":"

    See Mesh game object.

    "},{"location":"perspective-imagecarousel/","title":"Image carousel","text":""},{"location":"perspective-imagecarousel/#introduction","title":"Introduction","text":"

    Display list of images.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"perspective-imagecarousel/#live-demos","title":"Live demos","text":""},{"location":"perspective-imagecarousel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perspective-imagecarousel/#install-plugin","title":"Install plugin","text":""},{"location":"perspective-imagecarousel/#load-minify-file","title":"Load minify file","text":""},{"location":"perspective-imagecarousel/#import-plugin","title":"Import plugin","text":""},{"location":"perspective-imagecarousel/#import-class","title":"Import class","text":""},{"location":"perspective-imagecarousel/#create-instance","title":"Create instance","text":"
    var carousel = scene.add.rexPerspectiveImageCarousel({\nx: 0, y: 0,\n\nimages: [],  // Array of {key, frame}\n// index: 0,\n// rtl: false,\n// repeat: true,\n\n// width,\n// height,\n// faceCount: 4,\n\n// z: 1,\n// zEnd: 0,\n\n// roll : {\n//     duration: 1000,\n//     ease: 'Cubic',\n//     delay: 0,\n// }\n});\n

    Add perspectiveimage from JSON

    var perspectiveimage = scene.make.rexPerspectiveImageCarousel({\nx: 0,\ny: 0,\n\nimages: [],  // Array of {key, frame}\n// index: 0,\n// rtl: false,\n// repeat: true,\n\n// width,\n// height,\n// faceCount: 4,\n\n// z: 1,\n// zEnd: 0,\n\n// roll : {\n//     duration: 1000,\n//     ease: 'Cubic',\n//     delay: 0,\n// }\n\nadd: true\n});\n
    "},{"location":"perspective-imagecarousel/#custom-class","title":"Custom class","text":""},{"location":"perspective-imagecarousel/#roll-behavior","title":"Roll behavior","text":""},{"location":"perspective-imagecarousel/#start-rolling","title":"Start rolling","text":""},{"location":"perspective-imagecarousel/#set-duration","title":"Set duration","text":"
    carousel.roll.setDuration(duration);\n// carousel.roll.duration = duration;\n
    "},{"location":"perspective-imagecarousel/#set-ease","title":"Set ease","text":"
    carousel.roll.setEase(ease);\n// carousel.roll.ease = ease;\n
    "},{"location":"perspective-imagecarousel/#events","title":"Events","text":""},{"location":"perspective-imagecarousel/#status","title":"Status","text":""},{"location":"perspective-rendertexture/","title":"Render texture","text":""},{"location":"perspective-rendertexture/#introduction","title":"Introduction","text":"

    Render texture with perspective rotation.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"perspective-rendertexture/#live-demos","title":"Live demos","text":""},{"location":"perspective-rendertexture/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perspective-rendertexture/#install-plugin","title":"Install plugin","text":""},{"location":"perspective-rendertexture/#load-minify-file","title":"Load minify file","text":""},{"location":"perspective-rendertexture/#import-plugin","title":"Import plugin","text":""},{"location":"perspective-rendertexture/#import-class","title":"Import class","text":""},{"location":"perspective-rendertexture/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexPerspectiveRenderTexturege(x, y, width, height, {\n// hideCCW: true,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    or

    var image = scene.add.rexPerspectiveRenderTexturege({\n// x: 0,\n// y: 0,\n// width: 32,\n// height: 32,\n// hideCCW: true,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    Add prespective render texture from JSON

    var image = scene.make.rexPerspectiveRenderTexturege({\nx: 0,\ny: 0,    width: 32,\nheight: 32,\n\n// hideCCW: false,\n// gridWidth: 32,\n// girdHeight: 32,\n\nadd: true\n});\n
    "},{"location":"perspective-rendertexture/#custom-class","title":"Custom class","text":""},{"location":"perspective-rendertexture/#internal-render-texture","title":"Internal render texture","text":"
    var rt = image.rt;\n
    "},{"location":"perspective-rendertexture/#paste-texture","title":"Paste texture","text":""},{"location":"perspective-rendertexture/#erase","title":"Erase","text":"
    image.rt.erase(gameObject, x, y);\n
    "},{"location":"perspective-rendertexture/#clear","title":"Clear","text":"
    image.rt.clear();\n
    "},{"location":"perspective-rendertexture/#fill","title":"Fill","text":"
    image.rt.fill(rgb, alpha);\n// image.rt.fill(rgb, alpha, x, y, width, height);\n
    "},{"location":"perspective-rendertexture/#other-properties","title":"Other properties","text":"

    See Perspective image game object.

    "},{"location":"perspective-sprite/","title":"Sprite","text":""},{"location":"perspective-sprite/#introduction","title":"Introduction","text":"

    Play animation on perspective-image.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"perspective-sprite/#live-demos","title":"Live demos","text":""},{"location":"perspective-sprite/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perspective-sprite/#install-plugin","title":"Install plugin","text":""},{"location":"perspective-sprite/#load-minify-file","title":"Load minify file","text":""},{"location":"perspective-sprite/#import-plugin","title":"Import plugin","text":""},{"location":"perspective-sprite/#import-class","title":"Import class","text":""},{"location":"perspective-sprite/#create-instance","title":"Create instance","text":"
    var sprite = scene.add.rexPerspectiveSprite(x, y, texture, frame, {\n// width: undefined,\n// height: undefined,\n// hideCCW: true,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    or

    var sprite = scene.add.rexPerspectiveImage({\n// x: 0,\n// y: 0,\nkey,\n// frame: null,\n// width: undefined,\n// height: undefined,\n// hideCCW: true,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    Add perspectiveimage from JSON

    var perspectiveimage = scene.make.rexPerspectiveImage({\nx: 0,\ny: 0,\n\nkey: null,\nframe: null,\n\n// width: undefined,\n// height: undefined,\n// hideCCW: false,\n// gridWidth: 32,\n// girdHeight: 32,\n\nadd: true\n});\n
    "},{"location":"perspective-sprite/#custom-class","title":"Custom class","text":""},{"location":"perspective-sprite/#play-animation","title":"Play animation","text":""},{"location":"perspective-sprite/#chain","title":"Chain","text":""},{"location":"perspective-sprite/#stop","title":"Stop","text":""},{"location":"perspective-sprite/#restart","title":"Restart","text":"
    sprite.anims.restart();\n// sprite.anims.restart(includeDelay, resetRepeats);\n
    "},{"location":"perspective-sprite/#other-properties","title":"Other properties","text":"

    See Perspective image game object.

    "},{"location":"plane/","title":"Plane","text":""},{"location":"plane/#introduction","title":"Introduction","text":"

    A Plane is a kind of Mesh game object with one-sided grid of cells. which can have a texture that is either repeated (tiled) across each cell, or applied to the full Plane.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"plane/#usage","title":"Usage","text":""},{"location":"plane/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"plane/#add-plane-object","title":"Add plane object","text":"
    var plane = scene.add.plane(x, y, key);\n// var plane = scene.add.plane(x, y, key, frame);\n// var plane = scene.add.plane(x, y, texture, frame, width, height, tile);\n

    Add plane from JSON

    var plane = scene.make.plane({\nx: 0,\ny: 0,\nkey: '',\n// frame: '',\n// width: 8,\n// height: 8,\n// tile: false,\n// checkerboard: null,\n// checkerboard: { color1, color2, alpha1, alpha2, height }\n\n// angle: 0,\n// alpha: 1,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"plane/#custom-class","title":"Custom class","text":""},{"location":"plane/#texture","title":"Texture","text":"

    See game object - texture

    "},{"location":"plane/#animation","title":"Animation","text":"

    See Sprite's animation section.

    "},{"location":"plane/#play-animation","title":"Play animation","text":""},{"location":"plane/#stop","title":"Stop","text":""},{"location":"plane/#properties","title":"Properties","text":""},{"location":"plane/#interactive","title":"Interactive","text":"

    To test if pointer is at any face of this mesh game object.

    plane.setInteractive();\n
    "},{"location":"plane/#other-properties","title":"Other properties","text":"

    See Mesh game object, game object

    "},{"location":"plane/#checkerboard","title":"Checkerboard","text":"

    Creates a checkerboard style texture, based on the given colors and alpha values and applies it to this Plane, replacing any current texture it may have.

    "},{"location":"plugin-list/","title":"Plugin list","text":""},{"location":"plugin-list/#list-of-my-plugins","title":"List of my plugins","text":"

    Version of phaser3

    Please upgrade your phaser3 to version >= 3.60.0.

    1. Achievements: Achievements in a csv table.
    2. Alpha mask image: Load a texture, then apply an alpha mask from another texture.
    3. Anchor: Set size and position based on visible window.
    4. Arcade-TCRP/Player: Run commands on step of Arcade.
    5. Arcade-TCRP/Recorder: Store commands with step of Arcade.
    6. AwaitLoader: Await custom task in preload stage.
    7. Away time: Get time from previous closing application to now.
    8. BBCode-text: Drawing text with BBCode protocol.
    9. Board: Core object of Board system.
    10. Board/Field of view: Visible testing, to find field of view.
    11. Board/Hexagon map: Create tile positions in hexagon/triangle/parallelogram geometry in hexagon grid.
    12. Board/Match: Get matched chess.
    13. Board/Mini board: Chess Container, to rotate/mirror/drag chess together.
    14. Board/Monopoly: Move through path tiles.
    15. Board/Move To: Move chess towards target position with a steady speed.
    16. Board/Path finder: Find moveable area or moving path.
    17. Board/Shape: Grid (polygon) shape object.
    18. Board/Tilemap: Create board from tilemap.
    19. Board/Tile texture: Create canvas-texture of tile.
    20. Bounds: Clamp game object inside target bounds.
    21. Bracket parser: A lite-weight bracket parser.
    22. Bracket parser2: A lite-weight bracket parser.
    23. Buff data: Data manager with buffs.
    24. Build arcade object: Create arcade body, and inject arcade object methods.
    25. Bullet: Move game object toward current angle of game object, with a constant speed.
    26. Button: Fires 'click' event when touch releasd after pressed.
    27. Canvas: Drawing on canvas.
    28. CanvasInput: An invisible Input DOM element to receive character input and display on DynamicText.
    29. Canvas/Circular progress: Circular progress bar on canvas.
    30. Canvas/Line progress: Horizontal line progress bar filled with gradient color on canvas.
    31. Canvas/Round rectangle: Round rectangle on canvas.
    32. Canvas image data: Get image data from texture, or text object.
    33. Canvas frame manager: Generate bitmapfont from text game object, or bbcode text game object.
    34. Circle mask image: Load a texture, then apply a circle mask.
    35. Click outside: Fires 'clickoutside' event when pointer-down or pointer-up outside of game object.
    36. Clock: A clock to count elapsed time.
    37. Character cache: Generate bitmapfont from text game object, or bbcode text game object.
    38. Color/TintRGB: Attach tintR, tintG, tintB, and tintGray properties to a game object.
    39. Conditions table: Check conditions to find passed tests listed in a csv table.
    40. ContainerLite: Control the position and angle of children game objects.
    41. Containerlite-perspective: Snapshot children of containerlite, to a perspective render texture.
    42. Containerlite-skew: Snapshot children of containerlite, to a skew render texture.
    43. CSV-scenario: Run script in csv format.
    44. CSV-to-hash-table: Hash table indexed by (col-key, row-key) from csv string.
    45. Cursor at bound: Map position pf cursor to cursor key state.
    46. Curve/Spiral: Spiral curve.
    47. Drag: Drag game object.
    48. Drag-rotate: Get dragging angle around a specific point.
    49. Drop down: Drop down game object below another target game object.
    50. Dynamic text: Control position, angle of each character drawn on a canvas.
    51. Ease-data: Easing data value of game object's data-manager.
    52. Ease-move: Ease-move game object.
    53. Effect properties: Attach properties to a game object or camera, to add/remove/control builtin preFX or postFX effects.
    54. Eight direction: Move game object by cursor keys, with a constant speed.
    55. Event promise: Return a promise of an event.
    56. Expression parser: Parse expression string into function.
    57. Fade-out-destroy: Fade out game object then destroy it.
    58. Fade-volume: Fade-in/fade-out volume of sound.
    59. File chooser: Create a transparent file chooser button.
    60. File drop zone: Create a div element for dropping file(s).
    61. Firebase/Broadcast: Broadcast real-time messages, using firebase-database.
    62. Firebase/Files: Save JSON data, using firebase-firestore.
    63. Firebase/ID-alias: Map an unique ID to another unique ID, using firebase-firestore.
    64. Firebase/Item-table: 1d/2d/3d table, using firebase-database.
    65. Firebase/Leaderboard: Descending sort scores, using firebase-firestore.
    66. Firebase/Messages: Store messages in firebase-firestore.
    67. Firebase/Online-user-list: Online user list, using firebase-database.
    68. Firebase/Single-room: Chat room, using firebase-database.
    69. Flash: Flashing (set invisible then visible) game object.
    70. Flip: Flipping game object to another face by scaling width/height.
    71. FSM: Finite state machine.
    72. Fuzzy: A wrap of fuzzy logic.
    73. Gashapon: Pick random item from box.
    74. Geom/Hexagon: Hexagon geometry object.
    75. Geom/Rhombus: Rhombus shape and methods.
    76. Gesture/Pan: Get pan events of a game object.
    77. Gesture/Pinch: Get scale factor from 2 dragging touch pointers.
    78. Gesture/Press: Get press events of a game object.
    79. Gesture/Rotate: Get spin angle from 2 dragging touch pointers.
    80. Gesture/Swipe: Get swipe events of a game object.
    81. Gesture/Tap: Get tap/multi-taps events of a game object.
    82. Grid align: Align objects on quadrilateral or hexagon grid.
    83. Grid cut image: Create image game objects in grids, to assemble target texture.
    84. Grid table: Viewer of grid table, to manipulate game object of each visible cell.
    85. Hidden input text: An invisible Input DOM element to receive character input and display on text game object.
    86. Image box: Keep aspect ratio of image game object after scale-down resizing.
    87. Image URI loader: Load image by uri in preload stage.
    88. Input text: Input DOM element.
    89. Interception: Predict the intersection position of two game objects with constant moving speed.
    90. In touching: Fires 'intouch' event every tick when pressing on a game object.
    91. Layer manager: A container of Layer game objects.
    92. Life time: Destroy game object when time-out.
    93. Line: Draw a line with start/end/body textures.
    94. Live2d: Display live2d model.
    95. Loading-progress: Pop-up dialog for loading-progress, then scale-down this dialog.
    96. LocalForage/Files: Save JSON data, using localforage.
    97. LocalStorage/Data: Sync data from data manager to local-storage.
    98. LZ-string: Compress string using LZ-based compression algorithm.
    99. Markdown event sheets: Event sheets contains main condition(s) and actions, in simple markdown format (headings, code block).
    100. Modal promise: Modal behavior wrapped into promise.
    101. Mouse-wheel to up/down: Map mouse-wheeling to (up/down) cursor key state.
    102. Mouse-wheel scroller: Emit scroll event when mouse-wheeling.
    103. Move to: Move game object towards target position with a steady speed.
    104. Nine patch: Stretchable image.
    105. Nine patch2: Stretchable image. Has better performance than nine-patch.
    106. Particles-along-bounds: Emit particles along bounds of game object.
    107. Particles/Bitmap-zone: Particles' emitter zone from canvas bitmap of text/canvas game object.
    108. Path follower: Set position of game object on a path.
    109. Perlin: Perlin2/Perlin3 noise and simplex2/simplex3 noise.
    110. Perspective/Card: A container with two perspective-images.
    111. Perspective/Carousel: A container with cards.
    112. Perspective/Image: Image with perspective rotation.
    113. Perspective/ImageCarousel: Display list of images.
    114. Perspective/Render texture: Render texture with perspective rotation.
    115. Perspective/Sprite: Play animation on perspective-image..
    116. PNG appender: Append user data below tail of PNG data, or extract this user data from PNG data.
    117. polar-coordinate: Attach polarOX, polarOY, polarRotation, polarAngle, and polarRadius properties to a game object.
    118. Pop up: Scale up game object.
    119. Quad/Image: Image with 4 or 9 vertex control points.
    120. Quad/Render texture: Render texture with 4 or 9 vertex control points.
    121. Quest: Question manager.
    122. Raycaster: Raycaster between obstacles.
    123. Random place: Place objects randomly inside an area without overlapping.
    124. Real-time timers: Start and counting timer by real-time timestamp.
    125. Restorable data: Restorable data manager.
    126. RotateTo: Rotate game object towards target position with a steady speed.
    127. Rotate: Rotate game object continually with a steady speed.
    128. Run-commands: Run commands in array.
    129. Scale-down-destroy: Scale down game object then destroy it.
    130. Scale outer: Scroll and zoom camera to make default game window fit the display area, in RESIZE scale mode.
    131. Script-tag loader: Load script tag in preload stage.
    132. Scroller: Drag content. Slow down when dragging released, pull back when out of bounds.
    133. Sequence: Run sequence commands in array.
    134. Shader/Barrel: Barrel post processing filter.
    135. Shader/Color-replace: Replace color post processing filter.
    136. Shader/Cross-stitching: Cross-stitching post processing filter.
    137. Shader/Dissolve: Dissolve transition post processing filter.
    138. Shader/Drop-shadow: Drop-shadow post processing filter.
    139. Shader/Fish-eye: Fish-eye post processing filter.
    140. Shader/Glow-filter: Glow post processing filter.
    141. Shader/Glow-filter: Glow post processing filter, ported from pixi.
    142. Shader/Gray-scale: Gray scale post processing filter.
    143. Shader/Horri-fi: 6-in-1 post processing filter.
    144. Shader/Hsl-adjust: Adjust color in HSL domain, post processing filter.
    145. Shader/Inverse: Inverse color post processing filter.
    146. Shader/Kawaseblur: Kawase-blur post processing filter.
    147. Shader/Outline: Outline post processing filter, ported from pixi.
    148. Shader/Pixelation: Pixelation post processing filter.
    149. Shader/Shockwave: Shockwave post processing filter.
    150. Shader/Split: Split image into 4 parts.
    151. Shader/Swirl: Swirl post processing filter.
    152. Shader/Toonify: Draw outlines and quantize color in HSV domain, post processing filter.
    153. Shader/Warp: Warp post processing filter.
    154. Shake-position: Shake position of game object.
    155. Shape/Checkbox: Checkbox input with drawing checker path animation.
    156. Shape/Circular progress: Circular progress bar shape.
    157. Shape/Cover: Rectangle shape covered full window, and block all touch events.
    158. Shape/Custom progress: Custom progress bar shape.
    159. Shape/Custom shapes: Custom shapes on shape.
    160. Shape/Full window rectangle: Rectangle shape covered full window.
    161. Shape/Line progress: Horizontal line progress bar shape.
    162. Shape/Round-Rectangle: Round rectangle shape.
    163. Shape/Spinner: Loading animations on shape.
    164. Shape/Toggle-switch: Toggle-switch input.
    165. Shape/Triangle: Trangle shape inside a rectangle bounds.
    166. Shatter/Image: Shatter image to triangle faces.
    167. Shatter/Render texture: Shatter render texture to triangle faces.
    168. Ship: Move game object as a space ship by cursor keys.
    169. Skew/Image: Skewable Image.
    170. Skew/RenderTexture: Skewable render texture.
    171. Slider: Drag thumb on a slider bar.
    172. State manager: Another version of Finite state machine.
    173. Step: Interpolate points between previous position and current position with fixed step length.
    174. Tag-player: Text commands to control sprites, texts, sound effect or backgroun music.
    175. Tag-text: Displays text with multi-color, font face, or font size with tags.
    176. TCRP/Player: Run commands on time.
    177. TCRP/Recorder: Store commands with time.
    178. Text/Edit: Create an input text object above a text object to edit string content.
    179. Text/Typing: Typing text on text object.
    180. Text/Page: Display text page by page on text object.
    181. Text/Translation: Apply translated string (i18next) to text object.
    182. Text player: Typing characters on dynamic text, waiting click or key enter, play sound effect or backgroun music.
    183. Touch event stop: Stop touch events propagation.
    184. Touch state: Store current touch input properties.
    185. Transition image: Transit texture to another one.
    186. Transition image pack: Transit texture to another one, with some pre-build effects.
    187. UI/Badge label: A container with badges above a main item.
    188. UI/Buttons: A container with a group of buttons.
    189. UI/Chart: Draw chart on canvas.
    190. UI/Color components: Edit color value by RGB, or HSV input fields.
    191. UI/Color input: Color value input field.
    192. UI/Color picker: Pick color value from H and SV palettes.
    193. UI/Confrim dialog: Using json style to create confirm dialog.
    194. UI/Dialog: A container with a title, content, buttons and backgrounds.
    195. UI/Drop down list: A label can open a drop-down list panel.
    196. UI/File selector button: A transparent file chooser button above a Label.
    197. UI/Fixwidthbuttons: A container with a group of fix-width buttons.
    198. UI/Fixwidthsizer: Layout children game objects into lines.
    199. UI/Folder: A container with a title, foldable child, and background.
    200. UI/Grid buttons: A container with a group of buttons in grids.
    201. UI/Grid sizer: Layout children game objects in grids.
    202. UI/Gird table: A container with a grid table, slider, and scroller.
    203. UI/Holy grail: Layout elements in Holy grail style.
    204. UI/Knob: A knob button based on circular progress.
    205. UI/Label: A game object container with an icon, text, and background.
    206. UI/Menu: A container with buttons and sub-menu.
    207. UI/Name-value label: A container with name text, value text in a row, with a horizontal line progress bar, 1d an icon, background.
    208. UI/Number bar: A container with an icon, slider, text, and background.
    209. UI/Overlap sizer: Layout children game objects overlapped.
    210. UI/Pages: A container with pages, only current page is visible.
    211. UI/Perspective card: A container with front and back faces.
    212. UI/Scroll-able panel: A container with a panel, slider, and scroller.
    213. UI/Scroll bar: A container with slider, two buttons, and background.
    214. UI/Simple drop down list: Using plain object to create drop down list.
    215. UI/Simple label: Using json style to create label.
    216. UI/Sizer: Layout children game objects.
    217. UI/Slider: A container with a track, indicator, thumb and background.
    218. UI/States image: Using plain object to create image game object, with active, hover, disable styles.
    219. UI/States round-rectangle: Using plain object to create round rectangle game object, with active, hover, disable styles.
    220. UI/States text: Using plain object to create text game object, with active, hover, disable styles.
    221. UI/Tab-pages: A container with tabs and pages, only current page is visible.
    222. UI/Tabs: A container with 4 groups of buttons around a center panel.
    223. UI/Text area: A container with a text, slider, and scroller.
    224. UI/Text box: A container with an icon, (typing and paging) text, and background.
    225. UI/Title label: A container with title, text in two rows, and an icon, background.
    226. UI/Toast: Show text message for a short while.
    227. UI/Tweaker: Fine-tuning properties of target object.
    228. Unique item list: List of unique items. Support array and set methods.
    229. Viewport-coordinate: Attach vpx, vpy properties to a game object, to set position according to proportion of viewport.
    230. Virtual joystick: Simulate cursor keys according to touch events.
    231. Wait events: Wait fired events or callbacks.
    232. Webfont-loader: Load web font by google webfont loader in preload stage.
    233. XOR: Encrypt or decrypt string by XOR algorithm.
    234. YML-Achievements: Achievements in a YAML table.
    235. YML-Conditions table: Check conditions to find passed tests listed in a YAML table.
    236. Youtube player: Play youtube video on iframe.
    "},{"location":"pluginsystem/","title":"Plugin system","text":""},{"location":"pluginsystem/#introduction","title":"Introduction","text":"

    Plugin system, built-in system of phaser.

    "},{"location":"pluginsystem/#usage","title":"Usage","text":""},{"location":"pluginsystem/#global-plugin","title":"Global plugin","text":""},{"location":"pluginsystem/#load-plugin","title":"Load plugin","text":""},{"location":"pluginsystem/#get-instance","title":"Get instance","text":"
    var pluginInst = scene.plugins.get(key);\n
    "},{"location":"pluginsystem/#scene-plugin","title":"Scene plugin","text":""},{"location":"pluginsystem/#load-plugin_1","title":"Load plugin","text":""},{"location":"pluginsystem/#get-instance_1","title":"Get instance","text":"
    var pluginInst = scene[sceneKey];\n
    "},{"location":"pluginsystem/#plugin-cache","title":"Plugin cache","text":""},{"location":"png-appender/","title":"PNG Appender","text":""},{"location":"png-appender/#introduction","title":"Introduction","text":"

    Append user data below tail of PNG data, or extract this user data from PNG data.

    "},{"location":"png-appender/#live-demos","title":"Live demos","text":""},{"location":"png-appender/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"png-appender/#install-plugin","title":"Install plugin","text":""},{"location":"png-appender/#load-minify-file","title":"Load minify file","text":""},{"location":"png-appender/#import-plugin","title":"Import plugin","text":""},{"location":"png-appender/#import-class","title":"Import class","text":""},{"location":"png-appender/#append-data","title":"Append data","text":"
    var resultBuffer = scene.plugins.get('rexPNGAppender').append(pngBuffer, data);\n
    "},{"location":"png-appender/#extract-data","title":"Extract data","text":"
    var data = scene.plugins.get('rexPNGAppender').extract(pngBuffer);\n
    "},{"location":"point-light/","title":"Point light","text":""},{"location":"point-light/#introduction","title":"Introduction","text":"

    A point light with gradient color in a circle.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"point-light/#usage","title":"Usage","text":""},{"location":"point-light/#add-point-light","title":"Add point light","text":"
    var pointLight = scene.add.pointlight(x, y, color, radius, intensity, attenuation);\n
    "},{"location":"point-light/#position","title":"Position","text":""},{"location":"point-light/#color","title":"Color","text":""},{"location":"point-light/#radius","title":"Radius","text":""},{"location":"point-light/#intensity","title":"Intensity","text":""},{"location":"point-light/#attenuation","title":"Attenuation","text":""},{"location":"polar-coordinate/","title":"Polar-coordinate","text":""},{"location":"polar-coordinate/#introduction","title":"Introduction","text":"

    Attach polarOX, polarOY, polarRotation, polarAngle, and polarRadius properties to a game object.

    "},{"location":"polar-coordinate/#live-demos","title":"Live demos","text":""},{"location":"polar-coordinate/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"polar-coordinate/#install-plugin","title":"Install plugin","text":""},{"location":"polar-coordinate/#load-minify-file","title":"Load minify file","text":""},{"location":"polar-coordinate/#import-plugin","title":"Import plugin","text":""},{"location":"polar-coordinate/#import-method","title":"Import method","text":""},{"location":"polar-coordinate/#attach-properties","title":"Attach properties","text":"
    scene.plugins.get('rexPolarCoordinate').add(gameObject, ox, oy, rotation, radius);\ngameObject.polarOX = 400;\ngameObject.polarOY = 300;\ngameObject.polarRadius = 200;\ngameObject.polarAngle = -45;\n
    x = ( polarRadius * cos(polarRotation) ) + polarOX\ny = ( polarRadius * sin(polarRotation) ) + polarOY\n
    "},{"location":"polar-coordinate/#circle","title":"Circle","text":"
    scene.tweens.add({\ntargets: gameObject,\npolarAngle: 360,\nduration: 3000\n})\n
    "},{"location":"popup/","title":"Pop up","text":""},{"location":"popup/#introduction","title":"Introduction","text":"

    Scale up from 0 to current scale of game object.

    "},{"location":"popup/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"popup/#install-plugin","title":"Install plugin","text":""},{"location":"popup/#load-minify-file","title":"Load minify file","text":""},{"location":"popup/#import-plugin","title":"Import plugin","text":""},{"location":"popup/#import-class","title":"Import class","text":""},{"location":"popup/#pop-up","title":"Pop up","text":""},{"location":"popup/#events","title":"Events","text":"

    See Events of tween task

    "},{"location":"postfx-pipeline/","title":"Post fx pipeline","text":""},{"location":"postfx-pipeline/#introduction","title":"Introduction","text":"

    Post fx pipelines for game objects or camera.

    WebGL only

    All kinds of post fx pipelines only work in WebGL render mode.

    "},{"location":"postfx-pipeline/#usage","title":"Usage","text":""},{"location":"postfx-pipeline/#post-fx-pipeline-class","title":"Post fx pipeline class","text":"
    class MyPostFxClass extends Phaser.Renderer.WebGL.Pipelines.PostFXPipeline {\nconstructor(game) {\nsuper({\ngame: game,\nrenderTarget: true,\nfragShader: '...',  // GLSL shader\nuniforms: []\n});\n}\n\nonPreRender() {\nthis.set1f('intensity', this._intensity);\n}\n\nonDraw(renderTarget) {\n}\n}\n
    "},{"location":"postfx-pipeline/#set-uniform-values","title":"Set uniform values","text":""},{"location":"postfx-pipeline/#onprerender","title":"onPreRender","text":""},{"location":"postfx-pipeline/#ondraw","title":"onDraw","text":""},{"location":"postfx-pipeline/#register-post-fx-pipeline","title":"Register post-fx pipeline","text":""},{"location":"postfx-pipeline/#apply-effect","title":"Apply effect","text":""},{"location":"postfx-pipeline/#get-post-fx-pipeline","title":"Get post-fx pipeline","text":""},{"location":"postfx-pipeline/#remove-post-fx-pipeline","title":"Remove post-fx pipeline","text":"
    gameObject.removePostPipeline(MyPostFxClass);\n
    "},{"location":"postfx-pipeline/#unregister-post-fx-pipeline","title":"Unregister post-fx pipeline","text":"
    var pipelineManager = scene.sys.renderer.pipelines;\npipelineManager.remove(PostFxName);\n
    "},{"location":"postfx-pipeline/#color-matrix","title":"Color matrix","text":"

    Use color martix to change RGB render result, and more...

    class MyPostFxClass extends Phaser.Renderer.WebGL.Pipelines.PostFXPipeline {\nconstructor(game) {\nsuper({\ngame: game,\nrenderTarget: true,\nfragShader: '...',  // GLSL shader\nuniforms: []\n});\n}\n\nonPreRender() {\n// this.set1f('intensity', this._intensity);\nthis.colorMatrix.grayscale(this._intensity);\n}\n\nonDraw(renderTarget) {\nthis.colorMatrix.grayscale(this._intensity);\nthis.drawFrame(renderTarget, this.fullFrame1);\nthis.bindAndDraw(this.fullFrame1);\n}\n}\n
    "},{"location":"postfx-pipeline/#color-adjusting","title":"Color adjusting","text":"

    Invoke before drawFrame().

    "},{"location":"postfx-pipeline/#draw","title":"Draw","text":"

    Invoke under onDraw(renderTarget).

    this.drawFrame(renderTarget, this.fullFrame1);\nthis.bindAndDraw(this.fullFrame1);\n
    "},{"location":"quad-image/","title":"Image","text":""},{"location":"quad-image/#introduction","title":"Introduction","text":"

    Image with 4 or 9 vertex control points.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"quad-image/#live-demos","title":"Live demos","text":""},{"location":"quad-image/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"quad-image/#install-plugin","title":"Install plugin","text":""},{"location":"quad-image/#load-minify-file","title":"Load minify file","text":""},{"location":"quad-image/#import-plugin","title":"Import plugin","text":""},{"location":"quad-image/#import-class","title":"Import class","text":""},{"location":"quad-image/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexQuadImage(x, y, texture, frame, {\n// ninePointMode: false,\n});\n

    or

    var image = scene.add.rexQuadImage({\n// x: 0,\n// y: 0,\nkey,\n// frame: null,\n// ninePointMode: false,\n// rtl: false\n});\n

    Add quadimage from JSON

    var quadimage = scene.make.rexQuadImage({\nx: 0,\ny: 0,\n\nkey: null,\nframe: null,\n\n// ninePointMode: false,\n// rtl: false\n\nadd: true\n});\n
    "},{"location":"quad-image/#custom-class","title":"Custom class","text":""},{"location":"quad-image/#vertex-control-points","title":"Vertex control points","text":""},{"location":"quad-image/#position","title":"Position","text":""},{"location":"quad-image/#tint-color","title":"Tint color","text":""},{"location":"quad-image/#other-properties","title":"Other properties","text":"

    See Mesh game object.

    "},{"location":"quad-rendertexture/","title":"Render texture","text":""},{"location":"quad-rendertexture/#introduction","title":"Introduction","text":"

    Render texture with 4 or 9 vertex control points.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"quad-rendertexture/#live-demos","title":"Live demos","text":""},{"location":"quad-rendertexture/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"quad-rendertexture/#install-plugin","title":"Install plugin","text":""},{"location":"quad-rendertexture/#load-minify-file","title":"Load minify file","text":""},{"location":"quad-rendertexture/#import-plugin","title":"Import plugin","text":""},{"location":"quad-rendertexture/#import-class","title":"Import class","text":""},{"location":"quad-rendertexture/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexQuadRenderTexturege(x, y, width, height, {\n// hideCCW: true,\n// ninePointMode: false,\n});\n

    or

    var image = scene.add.rexQuadRenderTexturege({\n// x: 0,\n// y: 0,\n// width: 32,\n// height: 32,\n// hideCCW: true,\n// ninePointMode: false,\n});\n

    Add prespective render texture from JSON

    var image = scene.make.rexQuadRenderTexturege({\nx: 0,\ny: 0,    width: 32,\nheight: 32,\n\n// hideCCW: false,\n// ninePointMode: false,\n\nadd: true\n});\n
    "},{"location":"quad-rendertexture/#custom-class","title":"Custom class","text":""},{"location":"quad-rendertexture/#internal-render-texture","title":"Internal render texture","text":"
    var rt = image.rt;\n
    "},{"location":"quad-rendertexture/#paste-texture","title":"Paste texture","text":""},{"location":"quad-rendertexture/#erase","title":"Erase","text":"
    image.rt.erase(gameObject, x, y);\n
    "},{"location":"quad-rendertexture/#clear","title":"Clear","text":"
    image.rt.clear();\n
    "},{"location":"quad-rendertexture/#fill","title":"Fill","text":"
    image.rt.fill(rgb, alpha);\n// image.rt.fill(rgb, alpha, x, y, width, height);\n
    "},{"location":"quad-rendertexture/#other-properties","title":"Other properties","text":"

    See Quad image game object.

    "},{"location":"quest/","title":"Quest","text":""},{"location":"quest/#introduction","title":"Introduction","text":"

    Question manager.

    "},{"location":"quest/#live-demos","title":"Live demos","text":""},{"location":"quest/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"quest/#install-plugin","title":"Install plugin","text":""},{"location":"quest/#load-minify-file","title":"Load minify file","text":""},{"location":"quest/#import-plugin","title":"Import plugin","text":""},{"location":"quest/#import-class","title":"Import class","text":""},{"location":"quest/#question-manager","title":"Question manager","text":""},{"location":"quest/#create-question-manager-instance","title":"Create question manager instance","text":"
    var questionManager = scene.plugins.get('rexQuest').add({\nquestions: undefined,\n// format: undefined,\n// delimiter: ',',\n// types: {\n//     question: 'q',\n//     option: '',\n// },\n// convert: true,\n\nquest: undefined,\n// quest: {\n//     shuffleQuestions: false,\n//     shuffleOptions: false,\n// }\n});\n
    "},{"location":"quest/#add-questions","title":"Add questions","text":"
    questionManager.add(questions, config);\n
    "},{"location":"quest/#remove-question","title":"Remove question","text":""},{"location":"quest/#get-question","title":"Get question","text":""},{"location":"quest/#question-is-existed","title":"Question is existed","text":"
    var isExisted = questionManager.has(key);\n
    "},{"location":"quest/#array-of-questions","title":"Array of questions","text":"
    var questions = questionManager.questions;\n

    Rearrange items of this questions array to reorder questions in quest task.

    "},{"location":"quest/#get-option","title":"Get option","text":"
    var option = questionManager.getOption(question, optionKey);\n
    "},{"location":"quest/#private-quest-task","title":"Private quest task","text":""},{"location":"quest/#create-private-quest-task","title":"Create private quest task","text":"

    Each question manager can hava a private quest task object, created when creating question manager, or

    questionManager.startQuest(config);\n
    "},{"location":"quest/#get-next-question-object","title":"Get next question object","text":""},{"location":"quest/#event","title":"Event","text":""},{"location":"quest/#is-last-question","title":"Is last question","text":"
    var isLast = questionManager.isLastQuestion();\n
    "},{"location":"quest/#restart-quest-task","title":"Restart quest task","text":"
    questionManager.restartQuest();\n
    "},{"location":"quest/#private-data","title":"Private data","text":""},{"location":"quest/#quest-task","title":"Quest task","text":"

    Create new quest task if user needs more then 1 quest task.

    "},{"location":"quest/#create-quest-task","title":"Create quest task","text":"
    var quest = questionManager.newQuest(config);\n
    "},{"location":"quest/#get-next-question-object_1","title":"Get next question object","text":""},{"location":"quest/#event_1","title":"Event","text":""},{"location":"quest/#is-last-question_1","title":"Is last question","text":"
    var isLast = quest.isLastQuestion();\n
    "},{"location":"quest/#restart-quest-task_1","title":"Restart quest task","text":"
    quest.start();\n
    "},{"location":"quest/#private-data_1","title":"Private data","text":""},{"location":"quest/#get-option_1","title":"Get option","text":"
    var option = quest.getOption(question, optionKey);\n
    "},{"location":"random-data-generator/","title":"Random data generator","text":""},{"location":"random-data-generator/#introduction","title":"Introduction","text":"

    Get random value from a random generator, built-in methods of phaser.

    "},{"location":"random-data-generator/#usage","title":"Usage","text":""},{"location":"random-data-generator/#random-data-generator","title":"Random data generator","text":""},{"location":"random-data-generator/#set-seed","title":"Set seed","text":""},{"location":"random-data-generator/#get-random-value","title":"Get random value","text":""},{"location":"random-data-generator/#get-random-item","title":"Get random item","text":""},{"location":"random-data-generator/#shuffle-array","title":"Shuffle array","text":"
    var arr = rnd.shuffle(arr);\n
    "},{"location":"random/","title":"Random number","text":""},{"location":"random/#introduction","title":"Introduction","text":"

    Get random value, built-in methods of phaser.

    "},{"location":"random/#usage","title":"Usage","text":""},{"location":"random/#get-random-value-between-min-max","title":"Get random value between (min, max)","text":""},{"location":"random/#get-random-vector","title":"Get random vector","text":""},{"location":"randomplace/","title":"Random place","text":""},{"location":"randomplace/#introduction","title":"Introduction","text":"

    Place objects randomly inside an area without overlapping.

    "},{"location":"randomplace/#live-demos","title":"Live demos","text":""},{"location":"randomplace/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"randomplace/#install-plugin","title":"Install plugin","text":""},{"location":"randomplace/#load-minify-file","title":"Load minify file","text":""},{"location":"randomplace/#import-plugin","title":"Import plugin","text":""},{"location":"randomplace/#import-class","title":"Import class","text":""},{"location":"randomplace/#random-place","title":"Random place","text":"
    scene.plugins.get('rexRandomPlace').randomPlace(gameObjects, {\nradius: radius,\n\ngetPositionCallback: undefined,\narea: areaGeomObject,\n});\n
    "},{"location":"raycaster/","title":"Raycaster","text":""},{"location":"raycaster/#introduction","title":"Introduction","text":"

    Raycaster between obstacles.

    "},{"location":"raycaster/#live-demos","title":"Live demos","text":""},{"location":"raycaster/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"raycaster/#install-plugin","title":"Install plugin","text":""},{"location":"raycaster/#load-minify-file","title":"Load minify file","text":""},{"location":"raycaster/#import-plugin","title":"Import plugin","text":""},{"location":"raycaster/#import-class","title":"Import class","text":""},{"location":"raycaster/#create-instance","title":"Create instance","text":"
    var raycaster = scene.plugins.get('rexRaycaster').add({\n// maxRayLength: 10000\n});\n
    "},{"location":"raycaster/#obstacle","title":"Obstacle","text":""},{"location":"raycaster/#add","title":"Add","text":"
    raycaster.addObstacle(gameObject);\n// raycaster.addObstacle(gameObject, polygon);\n

    or

    raycaster.addObstacle(gameObjects);\n
    "},{"location":"raycaster/#remove","title":"Remove","text":"
    raycaster.removeObstacle(gameObject);\n
    "},{"location":"raycaster/#clear","title":"Clear","text":"
    raycaster.clearObstacle();\n
    "},{"location":"raycaster/#update-shape","title":"Update shape","text":"
    raycaster.updateObstacle(gameObject);\n// raycaster.updateObstacle(gameObject, polygon);\n
    "},{"location":"raycaster/#raycaster","title":"Raycaster","text":"
    var result = raycaster.rayToward(x, y, angle);\n

    Reflection

    Use result.x, result.y, result.reflectAngle for next reflection ray.

    raycaster.rayToward(result.x, result.y, result.reflectAngle)\n

    "},{"location":"realtimetimers/","title":"Real time timers","text":""},{"location":"realtimetimers/#introduction","title":"Introduction","text":"

    Start and counting timer by real-time timestamp.

    Note

    Not support pause, or timescale features.

    "},{"location":"realtimetimers/#live-demos","title":"Live demos","text":""},{"location":"realtimetimers/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"realtimetimers/#install-plugin","title":"Install plugin","text":""},{"location":"realtimetimers/#load-minify-file","title":"Load minify file","text":""},{"location":"realtimetimers/#import-plugin","title":"Import plugin","text":""},{"location":"realtimetimers/#import-class","title":"Import class","text":""},{"location":"realtimetimers/#create-instance","title":"Create instance","text":"
    var realTimeTimers = scene.plugins.get('rexRealTimeTimers').add({\n// startTimestamp: new Date().getTime(),\n// getTimestampCallback: functio() { return timestamp; }\n});\n
    "},{"location":"realtimetimers/#set-start-timestamp","title":"Set start timestamp","text":"

    Start-timestamp is set when creating this real-time timers object.

    User still can change Start-timestamp by

    realTimeTimers.setStartTimestamp(timestamp);\n

    This changing won't affect existed timers.

    "},{"location":"realtimetimers/#add-a-timer","title":"Add a timer","text":"
    realTimeTimers.addTimer(name, period);\n// realTimeTimers.addTimer(name, period, data);\n// realTimeTimers.addTimer(name, period, data, currentTimestamp);\n

    or

    realTimeTimers.addTimer(name, {\nday: dayCount,        // d: dayCount,\nhour: hourCount,      // h: hourCount,\nminute: minuteCount,  // m: minuteCount,\nsecond: secondCount,  // s: secondCount,\n}, data, currentTimestamp);\n
    "},{"location":"realtimetimers/#increase-period","title":"Increase period","text":"
    realTimeTimers.incTimerPeriod(name, period);\n

    or

    realTimeTimers.incTimerPeriod(name, {\nday: dayCount,        // d: dayCount,\nhour: hourCount,      // h: hourCount,\nminute: minuteCount,  // m: minuteCount,\nsecond: secondCount,  // s: secondCount,\n});\n

    Will trigger 'update' event.

    "},{"location":"realtimetimers/#expire-timers","title":"Expire timers","text":""},{"location":"realtimetimers/#get-timers","title":"Get timers","text":""},{"location":"realtimetimers/#remove-timers","title":"Remove timers","text":""},{"location":"realtimetimers/#states","title":"States","text":""},{"location":"realtimetimers/#events","title":"Events","text":""},{"location":"rendertexture/","title":"Render texture","text":""},{"location":"rendertexture/#introduction","title":"Introduction","text":"

    Paste game objects or textures on dynaimc texture, built-in game object of phaser.

    "},{"location":"rendertexture/#usage","title":"Usage","text":""},{"location":"rendertexture/#add-render-texture-object","title":"Add render texture object","text":"

    Add render texture from JSON

    var rt = scene.make.renderTexture({\nx: 0,\ny: 0,\nwidth: 32,\nheight: 32,\n\n// angle: 0,\n// alpha: 1\n// flipX: true,\n// flipY: true,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n

    Origin position

    Origin position of this render texture is (0,0) (top-left)

    "},{"location":"rendertexture/#custom-class","title":"Custom class","text":""},{"location":"rendertexture/#paste-texture","title":"Paste texture","text":""},{"location":"rendertexture/#global-alpha","title":"Global alpha","text":"
    rt.setGlobalAlpha(alpha);\n// rt.globalAlpha = alpha;\n
    "},{"location":"rendertexture/#global-tint","title":"Global tint","text":"
    rt.setGlobalTint(tint);\n// rt.globalTint = tint;\n
    "},{"location":"rendertexture/#erase","title":"Erase","text":"
    rt.erase(gameObject, x, y);\n
    "},{"location":"rendertexture/#clear","title":"Clear","text":"
    rt.clear();\n
    "},{"location":"rendertexture/#fill","title":"Fill","text":"
    rt.fill(rgb, alpha);\n// rt.fill(rgb, alpha, x, y, width, height);\n
    "},{"location":"rendertexture/#set-size","title":"Set size","text":"
    rt.setSize(width, height);\n// rt.resize(width, height);\n
    "},{"location":"rendertexture/#save-texture","title":"Save texture","text":"

    Stores a copy of this Render Texture in the Texture Manager using the given key.

    rt.saveTexture(key);\n

    Calling saveTexture again will not save another copy of the same texture, it will just rename the key of the existing copy.

    "},{"location":"rendertexture/#internal-camera","title":"Internal camera","text":"

    Internal camera rt.camera

    "},{"location":"rendertexture/#snapshot","title":"Snapshot","text":""},{"location":"rendertexture/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"rendertexture/#create-mask","title":"Create mask","text":"
    var mask = rt.createBitmapMask();\n

    See mask

    "},{"location":"restorabledata/","title":"Restorable data","text":""},{"location":"restorabledata/#introduction","title":"Introduction","text":"

    Restorable data manager, extends from built-in data manager.

    "},{"location":"restorabledata/#live-demos","title":"Live demos","text":""},{"location":"restorabledata/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"restorabledata/#install-plugin","title":"Install plugin","text":""},{"location":"restorabledata/#load-minify-file","title":"Load minify file","text":""},{"location":"restorabledata/#import-plugin","title":"Import plugin","text":""},{"location":"restorabledata/#import-class","title":"Import class","text":""},{"location":"restorabledata/#create-instance","title":"Create instance","text":"
    var data = scene.plugins.get('rexRData').add(parent);\n// var data = scene.plugins.get('rexRData').add(parent, eventEmitter);\n
    "},{"location":"restorabledata/#getsetremove-value","title":"Get/set/remove value","text":"

    See built-in data manager.

    "},{"location":"restorabledata/#commit","title":"Commit","text":"

    Commit current data status into repository, and increase current version number.

    data.commit();\n

    or

    data.commit(alias);\n
    "},{"location":"restorabledata/#restore","title":"Restore","text":""},{"location":"restorabledata/#version","title":"Version","text":"

    Version starts from 0 which has no data. Each data.commit() will increase this version number.

    "},{"location":"restorabledata/#saveload-status","title":"Save/load status","text":"

    or

    "},{"location":"reverse-string/","title":"Reverse","text":""},{"location":"reverse-string/#introduction","title":"Introduction","text":"

    Reverses string, built-in method of phaser.

    "},{"location":"reverse-string/#usage","title":"Usage","text":"
    var result = Phaser.Utils.String.ReverseString(str);\n
    "},{"location":"rexvideo/","title":"Rexvideo","text":""},{"location":"rexvideo/#introduction","title":"Introduction","text":"

    Play video on DOM, or on canvas.

    "},{"location":"rexvideo/#live-demos","title":"Live demos","text":""},{"location":"rexvideo/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"rexvideo/#install-plugin","title":"Install plugin","text":""},{"location":"rexvideo/#load-minify-file","title":"Load minify file","text":""},{"location":"rexvideo/#import-plugin","title":"Import plugin","text":""},{"location":"rexvideo/#import-class","title":"Import class","text":""},{"location":"rexvideo/#add-video-object","title":"Add video object","text":"

    Default configuration

    {\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\n\n// Element properties\nsrc: url,\n// src: {\n//     webm: webmFileURL,\n//     ogg: oggFileURL,\n//     mp4: mp4FileURL,\n//     h264: h264FileURL,\n// }\nid: undefined,\nautoPlay: true,\ncontrols: false,\nloop: false,\nmuted: false,\nplaysInline: true,\ncrossOrigin: 'anonymous',\nplaybackTimeChangeEventEnable: true,\n}\n
    "},{"location":"rexvideo/#different-between-rexvideo-and-rexvideocanvas","title":"Different between rexVideo and rexVideoCanvas","text":""},{"location":"rexvideo/#custom-class","title":"Custom class","text":""},{"location":"rexvideo/#load","title":"Load","text":"
    video.load(src);\n
    "},{"location":"rexvideo/#play","title":"Play","text":"
    video.play();\n
    "},{"location":"rexvideo/#pause","title":"Pause","text":"
    video.pause();\n
    "},{"location":"rexvideo/#playback-time","title":"Playback time","text":""},{"location":"rexvideo/#duration","title":"Duration","text":"
    var duration = video.duration;  // time in seconds\n
    "},{"location":"rexvideo/#volume","title":"Volume","text":""},{"location":"rexvideo/#mute","title":"Mute","text":""},{"location":"rexvideo/#loop","title":"Loop","text":""},{"location":"rexvideo/#resize","title":"Resize","text":"
    video.resize(width, height);\n
    "},{"location":"rexvideo/#status","title":"Status","text":""},{"location":"rexvideo/#events","title":"Events","text":""},{"location":"rope/","title":"Rope","text":""},{"location":"rope/#introduction","title":"Introduction","text":"

    Manipulate the vertices of images, built-in game object of phaser.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"rope/#usage","title":"Usage","text":""},{"location":"rope/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"rope/#add-object","title":"Add object","text":"
    var rope = scene.add.rope(x, y, texture, frame, points, horizontal);\n// var rope = scene.add.rope(x, y, texture, frame, points, horizontal, colors, alphas);\n

    Add rope from JSON

    var rope = scene.make.rope({\nx: 0,\ny: 0,\nkey: '',\nframe: null,\nhorizontal: true,\npoints: undefined,\ncolors: undefined,\nalphas: undefined,\n\n// angle: 0,\n// alpha: 1\n// flipX: true,\n// flipY: true,\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"rope/#custom-rope-class","title":"Custom rope class","text":""},{"location":"rope/#origin","title":"Origin","text":"

    A Ropes origin is always 0.5 x 0.5 and cannot be changed.

    "},{"location":"rope/#set-vertices","title":"Set vertices","text":"

    Set vertices via

    rope.setPoints(points);\n// rope.setPoints(points, colors, alphas);\n

    Also change horizontal mode :

    Or set rope.points directly :

    1. Change rope.points
    2. Call rope.setDirty(), or rope.updateVertices()

    Each point is relative to position of rope object, get points of world via

    var worldX = rope.points[i].x + rope.x;\nvar worldY = rope.points[i].y + rope.y;\n
    "},{"location":"rope/#play-animation","title":"Play animation","text":"
    rope.play(key);\n// rope.play(key, ignoreIfPlaying, startFrame);\n
    "},{"location":"rope/#alpha","title":"Alpha","text":""},{"location":"rope/#color-tint","title":"Color tint","text":""},{"location":"rope/#tint-fill-mode","title":"Tint fill mode","text":"

    Sets the tint fill mode.

    rope.setTintFill(mode);\n
    "},{"location":"rope/#flip","title":"Flip","text":"
    rope.flipX = flip;\nrope.flipY = flip;\n

    If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.

    "},{"location":"rope/#debug","title":"Debug","text":"

    Draw debug mesh each render tick.

    rope.setDebug(graphic);\n// rope.setDebug(graphic, callback);\n

    Note

    Clear Debug graphics (rope.debugGraphic.clear()) during scene's update stage (scene.update() { })

    "},{"location":"rotate/","title":"Rotate","text":""},{"location":"rotate/#introduction","title":"Introduction","text":"

    Rotate game object continually with a steady speed.

    "},{"location":"rotate/#live-demos","title":"Live demos","text":""},{"location":"rotate/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"rotate/#install-plugin","title":"Install plugin","text":""},{"location":"rotate/#load-minify-file","title":"Load minify file","text":""},{"location":"rotate/#import-plugin","title":"Import plugin","text":""},{"location":"rotate/#import-class","title":"Import class","text":""},{"location":"rotate/#create-instance","title":"Create instance","text":"
    var rotate = scene.plugins.get('rexRotate').add(gameObject, {\n// speed: 180,\n// enable: true,\n// timeScale: 1,\n});\n
    "},{"location":"rotate/#enable","title":"Enable","text":""},{"location":"rotate/#set-speed","title":"Set speed","text":"
    rotate.setSpeed(speed);\n// rotate.speed = speed;\n
    "},{"location":"rotate/#status","title":"Status","text":""},{"location":"rotateto/","title":"Rotate to","text":""},{"location":"rotateto/#introduction","title":"Introduction","text":"

    Rotate game object towards target position with a steady speed.

    "},{"location":"rotateto/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"rotateto/#install-plugin","title":"Install plugin","text":""},{"location":"rotateto/#load-minify-file","title":"Load minify file","text":""},{"location":"rotateto/#import-plugin","title":"Import plugin","text":""},{"location":"rotateto/#import-class","title":"Import class","text":""},{"location":"rotateto/#create-instance","title":"Create instance","text":"
    var rotateTo = scene.plugins.get('rexRotateTo').add(gameObject, {\n// speed: 180,\n// enable: true,\n// timeScale: 1,\n});\n
    "},{"location":"rotateto/#start-moving","title":"Start moving","text":""},{"location":"rotateto/#rotate-game-object-towards-position","title":"Rotate game object towards position","text":""},{"location":"rotateto/#rotate-game-object-to-angle","title":"Rotate game object to angle","text":""},{"location":"rotateto/#enable","title":"Enable","text":""},{"location":"rotateto/#pause-resume-stop-rotating","title":"Pause, Resume, stop rotating","text":"
    rotateTo.pause();\nrotateTo.resume();\nrotateTo.stop();\n
    "},{"location":"rotateto/#set-speed","title":"Set speed","text":"
    rotateTo.setSpeed(speed);\n// rotateTo.speed = speed;\n
    "},{"location":"rotateto/#events","title":"Events","text":""},{"location":"rotateto/#status","title":"Status","text":""},{"location":"round-to/","title":"Round to","text":""},{"location":"round-to/#introduction","title":"Introduction","text":"

    Round/ceil/floor to the given precision, built-in method of phaser.

    "},{"location":"round-to/#usage","title":"Usage","text":""},{"location":"round-to/#round-to","title":"Round to","text":"

    var result = Phaser.Math.RoundTo(value);\n
    or
    var result = Phaser.Math.RoundTo(value, place, base);\n

    Examples

    RoundTo(123.456789, 0) = 123\nRoundTo(123.456789, -1) = 123.5\nRoundTo(123.456789, -2) = 123.46\nRoundTo(123.456789, -3) = 123.457\n
    "},{"location":"round-to/#ceil-to","title":"Ceil to","text":"

    var result = Phaser.Math.CeilTo(value);\n
    or
    var result = Phaser.Math.CeilTo(value, place, base);\n

    "},{"location":"round-to/#floor-to","title":"Floor to","text":"

    var result = Phaser.Math.floorTo(value);\n
    or
    var result = Phaser.Math.floorTo(value, place, base);\n

    "},{"location":"runcommands/","title":"Run commands","text":""},{"location":"runcommands/#introduction","title":"Introduction","text":"

    Run commands in array.

    "},{"location":"runcommands/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"runcommands/#install-plugin","title":"Install plugin","text":""},{"location":"runcommands/#load-minify-file","title":"Load minify file","text":""},{"location":"runcommands/#import-plugin","title":"Import plugin","text":""},{"location":"runcommands/#import-class","title":"Import class","text":""},{"location":"runcommands/#run-commands","title":"Run commands","text":"
    scene.plugins.get('rexRunCommands').run(commands, scope);\n
    "},{"location":"scaledowndestroy/","title":"Scale down destroy","text":""},{"location":"scaledowndestroy/#introduction","title":"Introduction","text":"

    Scale down (i.e. ease scaleX, scaleY to 0) game object then destroy it.

    "},{"location":"scaledowndestroy/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"scaledowndestroy/#install-plugin","title":"Install plugin","text":""},{"location":"scaledowndestroy/#load-minify-file","title":"Load minify file","text":""},{"location":"scaledowndestroy/#import-plugin","title":"Import plugin","text":""},{"location":"scaledowndestroy/#import-class","title":"Import class","text":""},{"location":"scaledowndestroy/#scale-down","title":"Scale down","text":""},{"location":"scaledowndestroy/#events","title":"Events","text":"

    See Events of tween task

    "},{"location":"scalemanager/","title":"Scale manager","text":""},{"location":"scalemanager/#introduction","title":"Introduction","text":"

    Scale game window, built-in method of phaser.

    "},{"location":"scalemanager/#usage","title":"Usage","text":""},{"location":"scalemanager/#setup","title":"Setup","text":"

    Setup scale mode in game configuration.

    var config = {\n// ...\nparent: divId,\n\n// Game size\nwidth: 1024,\nheight: 768,\n\nscale: {\n// Or set parent divId here\nparent: divId,\n\nmode: Phaser.Scale.FIT,\nautoCenter: Phaser.Scale.CENTER_BOTH,\n\n// Or put game size here\n// width: 1024,\n// height: 768,\n\n// Minimum size\nmin: {\nwidth: 800,\nheight: 600\n},\n// Or set minimum size like these\n// minWidth: 800,\n// minHeight: 600,\n\n// Maximum size\nmax: {\nwidth: 1600,\nheight: 1200\n},\n// Or set maximum size like these\n// maxWidth: 1600,\n// maxHeight: 1200,\n\nzoom: 1,  // Size of game canvas = game size * zoom\n},\nautoRound: false\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"scalemanager/#resize-canvas-element","title":"Resize canvas element","text":"
    scene.scale.resize(width, height);\n

    Modify the size of the Phaser canvas element directly. You should only use this if you are using the NO_SCALE scale mode,

    "},{"location":"scalemanager/#set-game-size","title":"Set game size","text":"
    scene.scale.setGameSize(width, height);\n

    It should only be used if you're looking to change the base size of your game and are using one of the Scale Manager scaling modes, i.e. FIT. If you're using NO_SCALE and wish to change the game and canvas size directly, then please use the resize method instead.

    "},{"location":"scalemanager/#get-view-port","title":"Get view port","text":"
    var viewport = scene.scale.getViewPort();\n// var viewport = scene.scale.getViewPort(camera, out);\n
    "},{"location":"scalemanager/#members","title":"Members","text":""},{"location":"scalemanager/#events","title":"Events","text":"
    scene.scale.on('resize', function(gameSize, baseSize, displaySize, previousWidth, previousHeight) {});\n
    "},{"location":"scalemanager/#update-bounds","title":"Update bounds","text":"

    This method dose not have to be invoked, unless the canvas position, or visibility is changed via any other method (i.e. via an Angular route).

    scene.scale.updateBounds();\n
    "},{"location":"scalemanager/#full-screen","title":"Full screen","text":"

    Under 'pointerup' touch event :

    Games within an iframe will also be blocked from fullscreen unless the iframe has the allowfullscreen attribute.

    Performing an action that navigates to another page, or opens another tab, will automatically cancel fullscreen mode, as will the user pressing the ESC key.

    "},{"location":"scalemanager/#events_1","title":"Events","text":""},{"location":"scalemanager/#orientation","title":"Orientation","text":"
    scene.scale.on('orientationchange', function(orientation) {\nif (orientation === Phaser.Scale.PORTRAIT) {\n\n} else if (orientation === Phaser.Scale.LANDSCAPE) {\n\n}\n}, scope);\n
    "},{"location":"scaleouter/","title":"Scale outer","text":""},{"location":"scaleouter/#introduction","title":"Introduction","text":"

    Scroll and zoom camera to make default game window fit the display area, in RESIZE scale mode.

    "},{"location":"scaleouter/#live-demos","title":"Live demos","text":""},{"location":"scaleouter/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"scaleouter/#install-plugin","title":"Install plugin","text":""},{"location":"scaleouter/#set-scale-mode-to-resize","title":"Set scale mode to RESIZE","text":"
    var config = {\n// ...\nscale: {\nparent: divId,\nmode: Phaser.Scale.RESIZE,\nwidth: 1024,    // Default game window width\nheight: 768,    // Default game window height\n// ...\n}\n}\nvar game = new Phaser.Game(config);\n
    "},{"location":"scaleouter/#load-minify-file","title":"Load minify file","text":""},{"location":"scaleouter/#import-plugin","title":"Import plugin","text":""},{"location":"scaleouter/#import-class","title":"Import class","text":""},{"location":"scaleouter/#create-instance","title":"Create instance","text":"

    ScaleOuter plugin is a scene plugin, which created as a member of scene (scene.rexScaleOuter) for each scene. It does not have to create other scale outer instance.

    "},{"location":"scaleouter/#remove-instance","title":"Remove instance","text":"

    Invoke scene.rexScaleOuter.destroy() under scene.create() { ... }.

    "},{"location":"scaleouter/#add-camera","title":"Add camera","text":""},{"location":"scaleouter/#viewport","title":"Viewport","text":""},{"location":"scaleouter/#manual-scale","title":"Manual scale","text":"
    1. Stop resize callback
      scene.rexScaleOuter.stop()\n
    2. Manual scale
      scene.rexScaleOuter.scale();\n
    "},{"location":"scene/","title":"Scene","text":""},{"location":"scene/#define-a-scene","title":"Define a scene","text":""},{"location":"scene/#configuration-of-scene","title":"Configuration of scene","text":"
    var config = {\nkey: \"\",\n// active: false,\n// visible: true,\n// pack: false,\n// cameras: null,\n// map: {},\n// physics: {},\n// loader: {},\n// plugins: false,\n// input: {}\n};\n
    "},{"location":"scene/#es6-class","title":"ES6 class","text":"
    class MyScene extends Phaser.Scene {\nconstructor(config) {\nsuper(config);\n}\n\ninit(data) {}\npreload() {}\ncreate(data) {}\nupdate(time, delta) {}\n}\n
    "},{"location":"scene/#class","title":"Class","text":"
    var MyScene = new Phaser.Class({\nExtends: Phaser.Scene,\n\ninitialize: function MyScene(config) {\nPhaser.Scene.call(this, config);\n},\n\ninit: function (data) {},\npreload: function () {},\ncreate: function (data) {},\nupdate: function (time, delta) {},\n});\n
    var MyGame = {};\n\nMyGame.Boot = function () {};\n\nMyGame.Boot.prototype.constructor = MyGame.Boot;\n\nMyGame.Boot.prototype = {\ninit: function (data) {},\npreload: function () {},\ncreate: function (data) {},\nupdate: function (time, delta) {},\n};\n
    "},{"location":"scene/#override","title":"Override","text":"
    var demo = new Phaser.Scene(\"Demo\");\n\ndemo.init = function (data) {};\ndemo.preload = function () {};\ndemo.create = function (data) {};\ndemo.update = function (time, delta) {};\n
    "},{"location":"scene/#flow-chart","title":"Flow chart","text":"
    graph TB\n\nsubgraph Stop\nSceneEventDestroy>\"scene.events: destroy\"]\nStop[\"Shutdown<br>Free game objects\"]\nend\n\nsubgraph Update\nSceneUpdate[\"Run: Every tick<br>scene.update()\"]\nSceneEventPauseSleep>\"scene.events: pause<br>scene.events: sleep\"]\nPause[\"Pause: render but no update<br>Sleep: no update, no render\"]\nSceneEventResumeWake>\"scene.events: resume<br>scene.events: wake\"]\nend\n\nsubgraph Create\nSceneEventStart>\"scene.events: start\"]\nSceneEventReady>\"scene.events: ready\"]\nSceneInit[\"scene.init()\"]\nScenePreLoad[\"Load assets<br>scene.preload()\"]\nSceneCreate[\"Create game objects<br>scene.create()\"]\nend\n\nStart((Start)) --> SceneEventStart\nSceneEventStart --> SceneEventReady\nSceneEventReady --> SceneInit\nSceneInit --> ScenePreLoad\nScenePreLoad --> SceneCreate\nSceneCreate --> SceneUpdate\nSceneUpdate --> SceneUpdate\nSceneUpdate --> |\"scene.scene.pause()<br>scene.scene.sleep()\"|SceneEventPauseSleep\nSceneEventPauseSleep --> Pause\nPause --> |\"scene.scene.resume()<br>scene.scene.wake()\"|SceneEventResumeWake\nSceneEventResumeWake --> SceneUpdate\n\nSceneUpdate --> |\"scene.scene.stop()<br>scene.scene.restart()\"|Stop\nPause --> |\"scene.scene.stop()<br>scene.scene.restart()\"|SceneEventDestroy\nSceneEventDestroy --> Stop\n\nStop --> |\"scene.scene.start()<br>scene.scene.launch()<br>scene.scene.restart()\"|SceneEventStart

    See also

    "},{"location":"scene/#start","title":"Start","text":"
    1. Invoke scene.preload()
    2. Invoke scene.create()

    scene.scene.restart() is equal to

    scene.scene.stop();\nscene.scene.start();\n
    "},{"location":"scene/#stop","title":"Stop","text":""},{"location":"scene/#members","title":"Members","text":"

    Preserve word in a scene.

    "},{"location":"scene/#events","title":"Events","text":""},{"location":"scenemanager/","title":"Scene manager","text":"

    Scene manager plugin:

    "},{"location":"scenemanager/#add-new-scene","title":"Add new scene","text":"
    var newScene = scene.scene.add(key, sceneConfig, autoStart, data);\n// var newScene = game.scene.add(key, sceneConfig, autoStart, data);\n
    "},{"location":"scenemanager/#load-scene-from-external-files","title":"Load scene from external files","text":"
    1. load script
      scene.load.script(key, url);\n
    2. add new scene
      scene.scene.add(key, sceneConfig, autoStart);\n// game.scene.add(key, sceneConfig, autoStart);\n
    "},{"location":"scenemanager/#destroy-scene","title":"Destroy scene","text":"
    scene.scene.remove(key);\n
    "},{"location":"scenemanager/#start-scene","title":"Start scene","text":""},{"location":"scenemanager/#pauseresume-scene","title":"Pause/Resume scene","text":""},{"location":"scenemanager/#run-scene","title":"Run scene","text":"

    Runs the given Scene, but does not change the state of this Scene.

    If the given Scene is paused, it will resume it. If sleeping, it will wake it. If not running at all, it will be started.

    scene.scene.run(key, data);\n
    "},{"location":"scenemanager/#stop-scene","title":"Stop scene","text":"

    Shutdown the Scene, clearing display list, timers, etc.

    scene.scene.stop(key);\n// scene.scene.stop();  // stop myself\n
    "},{"location":"scenemanager/#set-visible","title":"Set visible","text":"
    scene.scene.setVisible(value, key);  // value: true/false\n// scene.scene.setVisible(value);    // set visible to myself\n
    "},{"location":"scenemanager/#read-status","title":"Read status","text":"
    var isSleep = scene.scene.isSleeping(key);\n// var isSleep = scene.scene.isSleeping();\n
    var isPaused = scene.scene.isPaused(key);\n// var isPaused = scene.scene.isPaused();\n
    var isActive = scene.scene.isActive(key);\n// var isActive = scene.scene.isActive();\n
    var isVisible = scene.scene.isVisible(key);\n// var isVisible = scene.scene.isVisible();\n
    Update/isActive Render/isVisible Run Pause Sleep

    Pause/Sleep/Stop

    var status = scene.scene.getStatus(key);\n// var status = scene.scene.getStatus();\n
    "},{"location":"scenemanager/#get-scene","title":"Get scene","text":"
    var scene = scene.scene.get(key);\n
    "},{"location":"scenemanager/#order-of-scenes","title":"Order of scenes","text":"

    Swaps the position of two scenes in the Scenes list.

    scene.scene.swapPosition(keyA, keyB);\n// scene.scene.stop(keyA);\n
    scene.scene.moveAbove(keyA, keyB);\n// scene.scene.moveAbove(keyA);\n

    Scene B is directly above Scene A.

    scene.scene.moveBelow(keyA, keyB);\n// scene.scene.moveBelow(keyA);\n

    Scene B is directly below Scene A.

    scene.scene.moveUp(keyA);\n// scene.scene.moveBelow();\n
    scene.scene.moveDown(keyA);\n// scene.scene.moveDown();\n
    scene.scene.bringToTop(keyA);\n// scene.scene.bringToTop();\n
    scene.scene.sendToBack(keyA);\n// scene.scene.sendToBack();\n
    "},{"location":"scenemanager/#transition","title":"Transition","text":"
    scene.scene.transition({\ntarget: key,\n// data: null,\n// moveAbove: false,\n// moveBelow: false,\n\nduration: 1000,\n\n// remove: false,\n// sleep: false,\n// allowInput: false,\n\n// onStart: null,\n// onStartScope: scene,\n\n// onUpdate: null,\n// onUpdateScope: scene,\n})\n
    "},{"location":"scenemanager/#execution-flow","title":"Execution flow","text":"
    1. Invoke scene.scene.transition method.
    2. When transition completed.
    "},{"location":"scenemanager/#events","title":"Events","text":""},{"location":"scenemanager/#system-scene","title":"System scene","text":"

    A default empty Scene that lives outside of the Scene list, but can be used by plugins and managers that need access to a live Scene, without being tied to one.

    var scene = scene.scene.get('__SYSTEM');\n

    or

    var scene = scene.scene.systemScene;\n
    "},{"location":"scripttagloader/","title":"Script tag loader","text":""},{"location":"scripttagloader/#introduction","title":"Introduction","text":"

    Load script tag in preload stage.

    "},{"location":"scripttagloader/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"scripttagloader/#install-plugin","title":"Install plugin","text":""},{"location":"scripttagloader/#load-minify-file","title":"Load minify file","text":""},{"location":"scripttagloader/#import-plugin","title":"Import plugin","text":""},{"location":"scripttagloader/#import-class","title":"Import class","text":""},{"location":"scripttagloader/#load-script-tag","title":"Load script tag","text":"

    In preload stage:

    this.load.rexScriptTag(url);\n// this.load.rexScriptTag(url, availableTest);\n

    or

    this.load.rexScriptTag({\nurl: url,\navailableTest: undefined\n});\n
    "},{"location":"scripttagloader/#compare-with-script-loader","title":"Compare with script loader","text":""},{"location":"scroller/","title":"Scroller","text":""},{"location":"scroller/#introduction","title":"Introduction","text":"

    Drag content. Slow down when dragging released, pull back when out of bounds.

    "},{"location":"scroller/#live-demos","title":"Live demos","text":""},{"location":"scroller/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"scroller/#install-plugin","title":"Install plugin","text":""},{"location":"scroller/#load-minify-file","title":"Load minify file","text":""},{"location":"scroller/#import-plugin","title":"Import plugin","text":""},{"location":"scroller/#import-class","title":"Import class","text":""},{"location":"scroller/#create-instance","title":"Create instance","text":"
    var scroller = scene.plugins.get('rexScroller').add(gameObject, {\nbounds: [\nbottomBound,\ntopBound\n],\nvalue: topBound,    // threshold: 10,\n// slidingDeceleration: 5000,\n// backDeceleration: 2000,\n\n// dragReverse: false,\n// dragRate: 1,\n\n// enable: true,\n// orientation: 'vertical',\n// pointerOutRelease: true,\n\n// valuechangeCallback: null,\n// valuechangeCallbackScope: null,\n\n// overmaxCallback: null,\n// overmaxCallbackScope: null,\n\n// overminCallback: null,\n// overminCallbackScope: null,\n});\n
    "},{"location":"scroller/#set-bounds","title":"Set bounds","text":"
    this.setBounds(bounds);  // bounds: [bound0, bound1]\n// this.setBounds(bound0, bound1);\n
    "},{"location":"scroller/#set-deceleration","title":"Set deceleration","text":""},{"location":"scroller/#get-value","title":"Get value","text":"
    var value = scroller.value;\n
    "},{"location":"scroller/#set-value","title":"Set value","text":"

    Fires valuechange event if new value is not equal to current value.

    "},{"location":"scroller/#events","title":"Events","text":""},{"location":"scroller/#drag","title":"Drag","text":""},{"location":"scroller/#drag-enable","title":"Drag enable","text":""},{"location":"scroller/#is-dragging","title":"Is dragging","text":"
    var isDragging = scroller.isDragging;\n
    "},{"location":"scroller/#state-machine","title":"State machine","text":"
    graph TB\n\nIDLE[\"Idle\"] --> |Drag| DRAG[\"Dragging<br>event 'valuechange'\"]\nDRAG --> |Release| OnRelease{\"Under bounds?\"}\n\nOnRelease --> |Yes| SLIDE[\"Sliding<br>Sliding-deceleration\"]\nSLIDE --> |Stop| IDLE\nSLIDE --> |Drag| DRAG\n\nOnRelease --> |No| BACK[\"Pull back to bounds<br>Back-deceleration\"]\nBACK --> |Stop| IDLE\nBACK --> |Drag| DRAG
    "},{"location":"sequence/","title":"Sequence","text":""},{"location":"sequence/#introduction","title":"Introduction","text":"

    Run sequence commands in array.

    "},{"location":"sequence/#live-demos","title":"Live demos","text":""},{"location":"sequence/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"sequence/#install-plugin","title":"Install plugin","text":""},{"location":"sequence/#load-minify-file","title":"Load minify file","text":""},{"location":"sequence/#import-plugin","title":"Import plugin","text":""},{"location":"sequence/#import-class","title":"Import class","text":""},{"location":"sequence/#create-sequence-instance","title":"Create sequence instance","text":"
    var seq = this.plugins.get('rexSequence').add({\n// yoyo: false  // reverse sequence when it reaches the end\n// repeat: 0,   // repeat count\n// loop: false  // repeat forever\n});\n
    "},{"location":"sequence/#load-commands","title":"Load commands","text":"
    seq.load(commands, actionScope);\n

    Format of command is the same as run-command.

    "},{"location":"sequence/#run-commands","title":"Run commands","text":"
    seq.start();\n
    "},{"location":"sequence/#stop","title":"Stop","text":"
    seq.stop();\n
    "},{"location":"sequence/#events","title":"Events","text":"
    seq.on('complete', function(actionScope, seq){ });\n
    "},{"location":"sequence/#action-of-commands","title":"Action of commands","text":"

    Action of commands, extended from Phaser.Events.EventEmitter.

    class ActionKlass extends Phaser.Events.EventEmitter {\nconstructor(scene) {\nsuper();\n\nthis.scene = scene;\nthis.myConsole = scene.add.text(100, 100, '');\n\nthis['wait-click'] = this.waitClick;\nthis['wait-time'] = this.waitTime;\n}\n\n// callbacks\nprint(msg) {\nthis.myConsole.setText(msg);\n// return undefined to run next command\n}\n\nwaitClick() {\nthis.scene.input.once('pointerup', this.complete, this);\nreturn this;  // return eventEmitter to pause the sequence\n}\n\nwaitTime(delay) {\nthis.scene.time.delayedCall(delay * 1000, this.complete, [], this);\nreturn this;  // return eventEmitter to pause the sequence\n}\n\ncomplete() {\nthis.emit('complete');  // resume sequence\n}\n}\nvar actionScope = new ActionKlass(scene);\n

    Now this scope supports 3 commands

    "},{"location":"sequence/#state","title":"State","text":"
    var state = seq.state;\n
    var completed = seq.completed; // seq.state === 3\n
    "},{"location":"sequence/#other-properties","title":"Other properties","text":""},{"location":"shader-barrel/","title":"Barrel","text":"

    Note

    Phaser3.60 has a built-in barrel effect.

    "},{"location":"shader-barrel/#introduction","title":"Introduction","text":"

    Barrel post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-barrel/#live-demos","title":"Live demos","text":""},{"location":"shader-barrel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-barrel/#install-plugin","title":"Install plugin","text":""},{"location":"shader-barrel/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-barrel/#import-plugin","title":"Import plugin","text":""},{"location":"shader-barrel/#import-class","title":"Import class","text":""},{"location":"shader-barrel/#apply-effect","title":"Apply effect","text":""},{"location":"shader-barrel/#remove-effect","title":"Remove effect","text":""},{"location":"shader-barrel/#get-effect","title":"Get effect","text":""},{"location":"shader-barrel/#shrink-mode","title":"Shrink mode","text":""},{"location":"shader-barrel/#radius","title":"Radius","text":""},{"location":"shader-barrel/#power","title":"Power","text":""},{"location":"shader-barrel/#intensity","title":"Intensity","text":""},{"location":"shader-barrel/#center-position","title":"Center position","text":"

    Default value is center of window.

    "},{"location":"shader-builtin/","title":"Effects","text":""},{"location":"shader-builtin/#introduction","title":"Introduction","text":"

    Built-in pre-fx, and post-fx shader effects.

    Texture-based Game Objects also support Pre FX, including: Image, Sprite, TileSprite, Text, RenderTexture, Video.

    All Game Objects and camera support Post FX. These are effects applied after the Game Object has been rendered.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-builtin/#live-demos","title":"Live demos","text":""},{"location":"shader-builtin/#usage","title":"Usage","text":""},{"location":"shader-builtin/#barrel","title":"Barrel","text":""},{"location":"shader-builtin/#bloom","title":"Bloom","text":""},{"location":"shader-builtin/#blur","title":"Blur","text":""},{"location":"shader-builtin/#bokeh","title":"Bokeh","text":""},{"location":"shader-builtin/#tilt-shift","title":"Tilt Shift","text":""},{"location":"shader-builtin/#circle-outline","title":"Circle Outline","text":""},{"location":"shader-builtin/#colormatrix","title":"ColorMatrix","text":""},{"location":"shader-builtin/#displacement","title":"Displacement","text":""},{"location":"shader-builtin/#glow","title":"Glow","text":""},{"location":"shader-builtin/#gradient","title":"Gradient","text":""},{"location":"shader-builtin/#pixelate","title":"Pixelate","text":""},{"location":"shader-builtin/#shadow","title":"Shadow","text":""},{"location":"shader-builtin/#shine","title":"Shine","text":""},{"location":"shader-builtin/#vignette","title":"Vignette","text":""},{"location":"shader-builtin/#wipe","title":"Wipe","text":""},{"location":"shader-builtin/#reveal","title":"Reveal","text":""},{"location":"shader-builtin/#remove-all-effects","title":"Remove all effects","text":"

    gameObject.preFX.clear();\n
    gameObject.postFX.clear();\n
    camera.postFX.clear();\n

    "},{"location":"shader-builtin/#disable-all-effects","title":"Disable all effects","text":"

    gameObject.preFX.disable();\n// gameObject.preFX.disable(true);  // Also remove all effects\n
    gameObject.postFX.disable();\n// gameObject.postFX.disable(true);  // Also remove all effects\n
    camera.postFX.disable();\n// camera.postFX.disable(true);  // Also remove all effects\n

    "},{"location":"shader-colorreplace/","title":"Color replace","text":""},{"location":"shader-colorreplace/#introduction","title":"Introduction","text":"

    Replace color post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-colorreplace/#live-demos","title":"Live demos","text":""},{"location":"shader-colorreplace/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-colorreplace/#install-plugin","title":"Install plugin","text":""},{"location":"shader-colorreplace/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-colorreplace/#import-plugin","title":"Import plugin","text":""},{"location":"shader-colorreplace/#import-class","title":"Import class","text":""},{"location":"shader-colorreplace/#apply-effect","title":"Apply effect","text":""},{"location":"shader-colorreplace/#remove-effect","title":"Remove effect","text":""},{"location":"shader-colorreplace/#get-effect","title":"Get effect","text":""},{"location":"shader-colorreplace/#original-color","title":"Original color","text":""},{"location":"shader-colorreplace/#new-color","title":"New color","text":""},{"location":"shader-colorreplace/#epsilon","title":"Epsilon","text":""},{"location":"shader-crossstitching/","title":"Cross-stitching","text":""},{"location":"shader-crossstitching/#introduction","title":"Introduction","text":"

    Cross-stitching post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-crossstitching/#live-demos","title":"Live demos","text":""},{"location":"shader-crossstitching/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-crossstitching/#install-plugin","title":"Install plugin","text":""},{"location":"shader-crossstitching/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-crossstitching/#import-plugin","title":"Import plugin","text":""},{"location":"shader-crossstitching/#import-class","title":"Import class","text":""},{"location":"shader-crossstitching/#apply-effect","title":"Apply effect","text":""},{"location":"shader-crossstitching/#remove-effect","title":"Remove effect","text":""},{"location":"shader-crossstitching/#get-effect","title":"Get effect","text":""},{"location":"shader-crossstitching/#stitching-size","title":"Stitching size","text":""},{"location":"shader-crossstitching/#brightness","title":"Brightness","text":""},{"location":"shader-dissolve/","title":"Dissolve","text":""},{"location":"shader-dissolve/#introduction","title":"Introduction","text":"

    Dissolve transition post processing filter. (Reference)

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-dissolve/#live-demos","title":"Live demos","text":""},{"location":"shader-dissolve/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-dissolve/#install-plugin","title":"Install plugin","text":""},{"location":"shader-dissolve/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-dissolve/#import-plugin","title":"Import plugin","text":""},{"location":"shader-dissolve/#import-class","title":"Import class","text":""},{"location":"shader-dissolve/#apply-effect","title":"Apply effect","text":""},{"location":"shader-dissolve/#remove-effect","title":"Remove effect","text":""},{"location":"shader-dissolve/#get-effect","title":"Get effect","text":""},{"location":"shader-dissolve/#transition-target-texture","title":"Transition target texture","text":""},{"location":"shader-dissolve/#progress","title":"Progress","text":""},{"location":"shader-dissolve/#resize-mode","title":"Resize mode","text":""},{"location":"shader-dissolve/#noise","title":"Noise","text":""},{"location":"shader-dissolve/#edge","title":"Edge","text":""},{"location":"shader-dropshadow/","title":"Drop shadow","text":""},{"location":"shader-dropshadow/#introduction","title":"Introduction","text":"

    Drop-shadow post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-dropshadow/#live-demos","title":"Live demos","text":""},{"location":"shader-dropshadow/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-dropshadow/#install-plugin","title":"Install plugin","text":""},{"location":"shader-dropshadow/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-dropshadow/#import-plugin","title":"Import plugin","text":""},{"location":"shader-dropshadow/#import-class","title":"Import class","text":""},{"location":"shader-dropshadow/#apply-effect","title":"Apply effect","text":""},{"location":"shader-dropshadow/#remove-effect","title":"Remove effect","text":""},{"location":"shader-dropshadow/#get-effect","title":"Get effect","text":""},{"location":"shader-dropshadow/#rotation","title":"Rotation","text":""},{"location":"shader-dropshadow/#distance","title":"Distance","text":""},{"location":"shader-dropshadow/#shadow-color","title":"Shadow color","text":""},{"location":"shader-dropshadow/#alpha","title":"Alpha","text":""},{"location":"shader-dropshadow/#shadow-only","title":"Shadow-only","text":""},{"location":"shader-dropshadow/#blur","title":"Blur","text":""},{"location":"shader-dropshadow/#quality","title":"Quality","text":""},{"location":"shader-dropshadow/#pixel-size","title":"Pixel size","text":""},{"location":"shader-fisheye/","title":"Fisheye","text":""},{"location":"shader-fisheye/#introduction","title":"Introduction","text":"

    Fish-eye post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-fisheye/#live-demos","title":"Live demos","text":""},{"location":"shader-fisheye/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-fisheye/#install-plugin","title":"Install plugin","text":""},{"location":"shader-fisheye/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-fisheye/#import-plugin","title":"Import plugin","text":""},{"location":"shader-fisheye/#import-class","title":"Import class","text":""},{"location":"shader-fisheye/#apply-effect","title":"Apply effect","text":""},{"location":"shader-fisheye/#remove-effect","title":"Remove effect","text":""},{"location":"shader-fisheye/#get-effect","title":"Get effect","text":""},{"location":"shader-fisheye/#radius","title":"Radius","text":""},{"location":"shader-fisheye/#intensity","title":"Intensity","text":""},{"location":"shader-fisheye/#center-position","title":"Center position","text":"

    Default value is center of window.

    "},{"location":"shader-fisheye/#mode","title":"Mode","text":""},{"location":"shader-glowfilter/","title":"Glow","text":"

    Note

    Phaser3.60 has a built-in Glow effect.

    "},{"location":"shader-glowfilter/#introduction","title":"Introduction","text":"

    Glow post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-glowfilter/#live-demos","title":"Live demos","text":""},{"location":"shader-glowfilter/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-glowfilter/#install-plugin","title":"Install plugin","text":""},{"location":"shader-glowfilter/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-glowfilter/#import-plugin","title":"Import plugin","text":""},{"location":"shader-glowfilter/#import-class","title":"Import class","text":""},{"location":"shader-glowfilter/#apply-effect","title":"Apply effect","text":""},{"location":"shader-glowfilter/#remove-effect","title":"Remove effect","text":""},{"location":"shader-glowfilter/#get-effect","title":"Get effect","text":""},{"location":"shader-glowfilter/#intensity","title":"Intensity","text":""},{"location":"shader-glowfilter2/","title":"Glow","text":"

    Note

    Phaser3.60 has a built-in Glow effect.

    "},{"location":"shader-glowfilter2/#introduction","title":"Introduction","text":"

    Glow post processing filter, port from pixi. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-glowfilter2/#live-demos","title":"Live demos","text":""},{"location":"shader-glowfilter2/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-glowfilter2/#install-plugin","title":"Install plugin","text":""},{"location":"shader-glowfilter2/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-glowfilter2/#import-plugin","title":"Import plugin","text":""},{"location":"shader-glowfilter2/#import-class","title":"Import class","text":""},{"location":"shader-glowfilter2/#apply-effect","title":"Apply effect","text":""},{"location":"shader-glowfilter2/#remove-effect","title":"Remove effect","text":""},{"location":"shader-glowfilter2/#get-effect","title":"Get effect","text":""},{"location":"shader-glowfilter2/#outer-strength","title":"Outer strength","text":""},{"location":"shader-glowfilter2/#inner-strength","title":"Inner strength","text":""},{"location":"shader-glowfilter2/#glow-color","title":"Glow color","text":""},{"location":"shader-glowfilter2/#distance","title":"Distance","text":"

    The distance of the glow. Make it 2 times more for resolution=2. It can't be changed after filter creation.

    "},{"location":"shader-glowfilter2/#quality","title":"Quality","text":"

    A number between 0 and 1 that describes the quality of the glow. The higher the number the less performant.

    "},{"location":"shader-grayscale/","title":"Gray scale","text":"

    Note

    Phaser3.60 has a built-in Color Matrix effects.

    "},{"location":"shader-grayscale/#introduction","title":"Introduction","text":"

    Gray scale post processing filter.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-grayscale/#live-demos","title":"Live demos","text":""},{"location":"shader-grayscale/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-grayscale/#install-plugin","title":"Install plugin","text":""},{"location":"shader-grayscale/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-grayscale/#import-plugin","title":"Import plugin","text":""},{"location":"shader-grayscale/#import-class","title":"Import class","text":""},{"location":"shader-grayscale/#apply-effect","title":"Apply effect","text":""},{"location":"shader-grayscale/#remove-effect","title":"Remove effect","text":""},{"location":"shader-grayscale/#get-effect","title":"Get effect","text":""},{"location":"shader-grayscale/#intensity","title":"Intensity","text":""},{"location":"shader-horrifi/","title":"Horri-fi","text":""},{"location":"shader-horrifi/#introduction","title":"Introduction","text":"

    6-in-1 post processing filter

    Reference : Horri-fi shader effect

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-horrifi/#live-demos","title":"Live demos","text":""},{"location":"shader-horrifi/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-horrifi/#install-plugin","title":"Install plugin","text":""},{"location":"shader-horrifi/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-horrifi/#import-plugin","title":"Import plugin","text":""},{"location":"shader-horrifi/#import-class","title":"Import class","text":""},{"location":"shader-horrifi/#apply-effect","title":"Apply effect","text":""},{"location":"shader-horrifi/#remove-effect","title":"Remove effect","text":""},{"location":"shader-horrifi/#get-effect","title":"Get effect","text":""},{"location":"shader-horrifi/#bloom","title":"Bloom","text":""},{"location":"shader-horrifi/#enable","title":"Enable","text":""},{"location":"shader-horrifi/#parameters","title":"Parameters","text":""},{"location":"shader-horrifi/#chromatic-abberation","title":"Chromatic abberation","text":""},{"location":"shader-horrifi/#enable_1","title":"Enable","text":""},{"location":"shader-horrifi/#parameters_1","title":"Parameters","text":""},{"location":"shader-horrifi/#vignette","title":"Vignette","text":""},{"location":"shader-horrifi/#enable_2","title":"Enable","text":""},{"location":"shader-horrifi/#parameters_2","title":"Parameters","text":""},{"location":"shader-horrifi/#noise","title":"Noise","text":""},{"location":"shader-horrifi/#enable_3","title":"Enable","text":""},{"location":"shader-horrifi/#parameters_3","title":"Parameters","text":""},{"location":"shader-horrifi/#vhs","title":"VHS","text":""},{"location":"shader-horrifi/#enable_4","title":"Enable","text":""},{"location":"shader-horrifi/#parameters_4","title":"Parameters","text":""},{"location":"shader-horrifi/#scanlines","title":"Scanlines","text":""},{"location":"shader-horrifi/#enable_5","title":"Enable","text":""},{"location":"shader-horrifi/#parameters_5","title":"Parameters","text":""},{"location":"shader-horrifi/#crt","title":"CRT","text":""},{"location":"shader-horrifi/#enable_6","title":"Enable","text":""},{"location":"shader-horrifi/#parameters_6","title":"Parameters","text":""},{"location":"shader-horrifi/#enable-all-effects","title":"Enable all effects","text":""},{"location":"shader-hsladjust/","title":"HSL adjust","text":"

    Note

    Phaser3.60 has a built-in Color Matrix effects.

    "},{"location":"shader-hsladjust/#introduction","title":"Introduction","text":"

    Adjust color in HSL domain, post processing filter.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-hsladjust/#live-demos","title":"Live demos","text":""},{"location":"shader-hsladjust/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-hsladjust/#install-plugin","title":"Install plugin","text":""},{"location":"shader-hsladjust/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-hsladjust/#import-plugin","title":"Import plugin","text":""},{"location":"shader-hsladjust/#import-class","title":"Import class","text":""},{"location":"shader-hsladjust/#apply-effect","title":"Apply effect","text":""},{"location":"shader-hsladjust/#remove-effect","title":"Remove effect","text":""},{"location":"shader-hsladjust/#get-effect","title":"Get effect","text":""},{"location":"shader-hsladjust/#hue-rotation","title":"Hue rotation","text":""},{"location":"shader-hsladjust/#saturation-adjustment","title":"Saturation adjustment","text":""},{"location":"shader-hsladjust/#lumen-adjustment","title":"Lumen adjustment","text":""},{"location":"shader-inverse/","title":"Inverse","text":"

    Note

    Phaser3.60 has a built-in Color Matrix effects.

    "},{"location":"shader-inverse/#introduction","title":"Introduction","text":"

    Inverse color post processing filter.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-inverse/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-inverse/#install-plugin","title":"Install plugin","text":""},{"location":"shader-inverse/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-inverse/#import-plugin","title":"Import plugin","text":""},{"location":"shader-inverse/#import-class","title":"Import class","text":""},{"location":"shader-inverse/#apply-effect","title":"Apply effect","text":""},{"location":"shader-inverse/#remove-effect","title":"Remove effect","text":""},{"location":"shader-inverse/#get-effect","title":"Get effect","text":""},{"location":"shader-inverse/#intensity","title":"Intensity","text":""},{"location":"shader-kawaseblur/","title":"Kawase blur","text":"

    Note

    Phaser3.60 has a built-in blur effect.

    "},{"location":"shader-kawaseblur/#introduction","title":"Introduction","text":"

    Kawase-blur post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-kawaseblur/#live-demos","title":"Live demos","text":""},{"location":"shader-kawaseblur/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-kawaseblur/#install-plugin","title":"Install plugin","text":""},{"location":"shader-kawaseblur/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-kawaseblur/#import-plugin","title":"Import plugin","text":""},{"location":"shader-kawaseblur/#import-class","title":"Import class","text":""},{"location":"shader-kawaseblur/#apply-effect","title":"Apply effect","text":""},{"location":"shader-kawaseblur/#remove-effect","title":"Remove effect","text":""},{"location":"shader-kawaseblur/#get-effect","title":"Get effect","text":""},{"location":"shader-kawaseblur/#blur","title":"Blur","text":""},{"location":"shader-kawaseblur/#quality","title":"Quality","text":""},{"location":"shader-kawaseblur/#pixel-size","title":"Pixel size","text":""},{"location":"shader-outline/","title":"Outline","text":""},{"location":"shader-outline/#introduction","title":"Introduction","text":"

    Outline post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-outline/#live-demos","title":"Live demos","text":""},{"location":"shader-outline/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-outline/#install-plugin","title":"Install plugin","text":""},{"location":"shader-outline/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-outline/#import-plugin","title":"Import plugin","text":""},{"location":"shader-outline/#import-class","title":"Import class","text":""},{"location":"shader-outline/#apply-effect","title":"Apply effect","text":""},{"location":"shader-outline/#remove-effect","title":"Remove effect","text":""},{"location":"shader-outline/#get-effect","title":"Get effect","text":""},{"location":"shader-outline/#thickness","title":"Thickness","text":""},{"location":"shader-outline/#outline-color","title":"Outline color","text":""},{"location":"shader-outline/#quality","title":"Quality","text":"

    The quality of the outline from 0 to 1, using a higher quality setting will result in slower performance and more accuracy.

    "},{"location":"shader-pixelation/","title":"Pixelation","text":"

    Note

    Phaser3.60 has a built-in pixelate effect.

    "},{"location":"shader-pixelation/#introduction","title":"Introduction","text":"

    Pixelation post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-pixelation/#live-demos","title":"Live demos","text":""},{"location":"shader-pixelation/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-pixelation/#install-plugin","title":"Install plugin","text":""},{"location":"shader-pixelation/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-pixelation/#import-plugin","title":"Import plugin","text":""},{"location":"shader-pixelation/#import-class","title":"Import class","text":""},{"location":"shader-pixelation/#apply-effect","title":"Apply effect","text":""},{"location":"shader-pixelation/#remove-effect","title":"Remove effect","text":""},{"location":"shader-pixelation/#get-effect","title":"Get effect","text":""},{"location":"shader-pixelation/#pixel-size","title":"Pixel size","text":""},{"location":"shader-shockwave/","title":"Shockwave","text":""},{"location":"shader-shockwave/#introduction","title":"Introduction","text":"

    Shockwave post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-shockwave/#live-demos","title":"Live demos","text":""},{"location":"shader-shockwave/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-shockwave/#install-plugin","title":"Install plugin","text":""},{"location":"shader-shockwave/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-shockwave/#import-plugin","title":"Import plugin","text":""},{"location":"shader-shockwave/#import-class","title":"Import class","text":""},{"location":"shader-shockwave/#apply-effect","title":"Apply effect","text":""},{"location":"shader-shockwave/#remove-effect","title":"Remove effect","text":""},{"location":"shader-shockwave/#get-effect","title":"Get effect","text":""},{"location":"shader-shockwave/#wave-radius","title":"Wave radius","text":""},{"location":"shader-shockwave/#wave-width","title":"Wave width","text":""},{"location":"shader-split/","title":"Split","text":""},{"location":"shader-split/#introduction","title":"Introduction","text":"

    Split image into 4 parts.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-split/#live-demos","title":"Live demos","text":""},{"location":"shader-split/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-split/#install-plugin","title":"Install plugin","text":""},{"location":"shader-split/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-split/#import-plugin","title":"Import plugin","text":""},{"location":"shader-split/#import-class","title":"Import class","text":""},{"location":"shader-split/#apply-effect","title":"Apply effect","text":""},{"location":"shader-split/#remove-effect","title":"Remove effect","text":""},{"location":"shader-split/#get-effect","title":"Get effect","text":""},{"location":"shader-split/#split-position","title":"Split position","text":""},{"location":"shader-split/#split-at-center-of-render","title":"Split at center of render","text":"
    pipelineInstance.splitAtCenter();\n// pipelineInstance.splitAtCenter(width, height);\n
    "},{"location":"shader-split/#split-length","title":"Split length","text":"

    or specify left/right/top/bottom of split length

    "},{"location":"shader-split/#rotation-axis-of-split-edge","title":"Rotation Axis of Split edge","text":""},{"location":"shader-split/#shift-enable","title":"Shift enable","text":""},{"location":"shader-swirl/","title":"Swirl","text":""},{"location":"shader-swirl/#introduction","title":"Introduction","text":"

    Swirl post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-swirl/#live-demos","title":"Live demos","text":""},{"location":"shader-swirl/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-swirl/#install-plugin","title":"Install plugin","text":""},{"location":"shader-swirl/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-swirl/#import-plugin","title":"Import plugin","text":""},{"location":"shader-swirl/#import-class","title":"Import class","text":""},{"location":"shader-swirl/#apply-effect","title":"Apply effect","text":""},{"location":"shader-swirl/#remove-effect","title":"Remove effect","text":""},{"location":"shader-swirl/#get-effect","title":"Get effect","text":""},{"location":"shader-swirl/#radius","title":"Radius","text":""},{"location":"shader-swirl/#rotation","title":"Rotation","text":""},{"location":"shader-swirl/#center-position","title":"Center position","text":"

    Default value is center of window.

    "},{"location":"shader-toonify/","title":"Toonify","text":""},{"location":"shader-toonify/#introduction","title":"Introduction","text":"

    Draw outlines and quantize color in HSV domain, post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-toonify/#live-demos","title":"Live demos","text":""},{"location":"shader-toonify/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-toonify/#install-plugin","title":"Install plugin","text":""},{"location":"shader-toonify/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-toonify/#import-plugin","title":"Import plugin","text":""},{"location":"shader-toonify/#import-class","title":"Import class","text":""},{"location":"shader-toonify/#apply-effect","title":"Apply effect","text":""},{"location":"shader-toonify/#remove-effect","title":"Remove effect","text":""},{"location":"shader-toonify/#get-effect","title":"Get effect","text":""},{"location":"shader-toonify/#edge-threshold","title":"Edge threshold","text":""},{"location":"shader-toonify/#hue-levels","title":"Hue levels","text":""},{"location":"shader-toonify/#saturation-levels","title":"Saturation levels","text":""},{"location":"shader-toonify/#value-levels","title":"Value levels","text":""},{"location":"shader-toonify/#edge-color","title":"Edge color","text":""},{"location":"shader-warp-transition/","title":"Warp","text":""},{"location":"shader-warp-transition/#introduction","title":"Introduction","text":"

    Warp transition post processing filter.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-warp-transition/#usage","title":"Usage","text":"

    Reference

    "},{"location":"shader-warp-transition/#install-plugin","title":"Install plugin","text":""},{"location":"shader-warp-transition/#import-class","title":"Import class","text":""},{"location":"shader-warp-transition/#remove-effect","title":"Remove effect","text":"
    gameObject.removePostPipeline(WarpPostFX); // WarpPostFX class\n
    "},{"location":"shader-warp-transition/#get-effect","title":"Get effect","text":""},{"location":"shader-warp-transition/#set-texture","title":"Set texture","text":"
    pipelineInstance.setTexture(textureKey, resizeMode);\n
    "},{"location":"shader-warp-transition/#progress","title":"Progress","text":""},{"location":"shader-warp-transition/#direction","title":"Direction","text":""},{"location":"shader-warp-transition/#smoothness","title":"Smoothness","text":""},{"location":"shader-warp-transition/#resize-mode","title":"Resize mode","text":""},{"location":"shader-warp/","title":"Warp","text":""},{"location":"shader-warp/#introduction","title":"Introduction","text":"

    Warp post processing filter.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-warp/#live-demos","title":"Live demos","text":""},{"location":"shader-warp/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-warp/#install-plugin","title":"Install plugin","text":""},{"location":"shader-warp/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-warp/#import-plugin","title":"Import plugin","text":""},{"location":"shader-warp/#import-class","title":"Import class","text":""},{"location":"shader-warp/#apply-effect","title":"Apply effect","text":""},{"location":"shader-warp/#remove-effect","title":"Remove effect","text":""},{"location":"shader-warp/#get-effect","title":"Get effect","text":""},{"location":"shader-warp/#frequency","title":"Frequency","text":"

    Horizontal/vertical frequency, in pixel.

    "},{"location":"shader-warp/#amplitude","title":"Amplitude","text":"

    Horizontal/vertical amplitude, in pixel.

    "},{"location":"shader-warp/#speed","title":"Speed","text":"

    Horizontal/vertical speed.

    "},{"location":"shader/","title":"Shader","text":""},{"location":"shader/#introduction","title":"Introduction","text":"

    A quad with its own shader, built-in game object of phaser.

    "},{"location":"shader/#usage","title":"Usage","text":""},{"location":"shader/#load-glsl","title":"Load GLSL","text":"
    scene.load.glsl(key, url);\n

    Reference: load glsl

    "},{"location":"shader/#add-shader-object","title":"Add shader object","text":"
    var shader = scene.add.shader(key, x, y, width, height, textures);\n

    Note

    Lots of shaders expect textures to be power-of-two sized.

    Add shader object from JSON

    var shader = scene.make.shader({\nx: 0,\ny: 0,\nkey: '',\n\n// angle: 0,\n// alpha: 1\n// flipX: true,\n// flipY: true,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"shader/#custom-class","title":"Custom class","text":""},{"location":"shader/#sampler2d-uniform","title":"Sampler2D uniform","text":""},{"location":"shader/#other-uniforms","title":"Other uniforms","text":""},{"location":"shader/#output","title":"Output","text":""},{"location":"shader/#texture-routing","title":"Texture routing","text":"
    graph TB\n\nTextureManagerIn[\"Texture manager\"] --> |\"shader.setSampler2D()\"| Sampler2D[\"Samplers:<br>iChannel0<br>iChannel1<br>iChannel2<br>iChannel3\"]\nSampler2D--> Shader[\"shader<br>Shader game object\"]\nShader --> DisplayList[\"Display list\"]\nShader --> |\"shader.setRenderToTexture()\"| InternalTexture[\"shader.glTexture\"]\nInternalTexture -.-> |\"Texture key\"| TextureManagerOut[\"Texture manager\"]\nTextureManagerOut -.-> GameObject[\"Image game object\"]\nGameObject -.-> DisplayList\n\nWebGLTexture[\"WebGl texture<br>gameObject.glTexture\"] --> |\"shader.setSampler2DBuffer()\"| Sampler2D\nInternalTexture --> WebGLTexture\n\nsubgraph Output\nDisplayList\nGameObject\nTextureManagerOut\nend\n\nsubgraph Input\nTextureManagerIn\nWebGLTexture\nend
    "},{"location":"shader/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shader/#baseshader","title":"BaseShader","text":"
    var baseShader = new Phaser.Display.BaseShader(key, fragmentSrc, vertexSrc, uniforms);\n
    "},{"location":"shake-position/","title":"Shake position","text":""},{"location":"shake-position/#introduction","title":"Introduction","text":"

    Shake position of game object.

    "},{"location":"shake-position/#live-demos","title":"Live demos","text":""},{"location":"shake-position/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shake-position/#install-plugin","title":"Install plugin","text":""},{"location":"shake-position/#load-minify-file","title":"Load minify file","text":""},{"location":"shake-position/#import-plugin","title":"Import plugin","text":""},{"location":"shake-position/#import-class","title":"Import class","text":""},{"location":"shake-position/#create-instance","title":"Create instance","text":"
    var shake = scene.plugins.get('rexShake').add(gameObject, {\n// mode: 1, // 0|'effect'|1|'behavior'\n// duration: 500,\n// magnitude: 10,\n// magnitudeMode: 1, // 0|'constant'|1|'decay'\n// axis: 0,      //0|'both'|'h&v'|1|'horizontal'|'h'|2|'vertical'|'v'\n});\n
    "},{"location":"shake-position/#start-shaking","title":"Start shaking","text":"
    shake.shake();\n// shake.shake(duration, magnitude);\n

    or

    shake.shake({\nduration: 500,\nmagnitude: 10\n});\n
    "},{"location":"shake-position/#stop-shakeing","title":"Stop shakeing","text":"
    shake.stop();\n
    "},{"location":"shake-position/#enable","title":"Enable","text":""},{"location":"shake-position/#set-updating-mode","title":"Set updating mode","text":"
    shake.setMode(mode);\n
    "},{"location":"shake-position/#set-duration","title":"Set duration","text":"
    shake.setDuration(duration);\n// shake.duration = duration;\n
    "},{"location":"shake-position/#set-magnitude","title":"Set magnitude","text":"
    shake.setMagnitude(magnitude);\nshake.magnitude = magnitude;\n
    "},{"location":"shake-position/#set-magnitude-mode","title":"Set magnitude mode","text":"
    shake.setMagnitudeMode(magnitudeMode);\n// shake.magnitudeMode = magnitudeMode;\n
    "},{"location":"shake-position/#set-axis-mode","title":"Set axis mode","text":"
    shake.setAxisMode(axis);\n
    "},{"location":"shake-position/#events","title":"Events","text":""},{"location":"shake-position/#status","title":"Status","text":""},{"location":"shape-arc/","title":"Arc","text":""},{"location":"shape-arc/#introduction","title":"Introduction","text":"

    Arc shape, built-in game object of phaser.

    "},{"location":"shape-arc/#usage","title":"Usage","text":""},{"location":"shape-arc/#create-shape","title":"Create shape","text":"
    var arc = scene.add.arc(x, y, radius, startAngle, endAngle, anticlockwise, fillColor);\n// var arc = scene.add.arc(x, y, radius, startAngle, endAngle, anticlockwise, fillColor, fillAlpha);\n
    "},{"location":"shape-arc/#custom-class","title":"Custom class","text":""},{"location":"shape-arc/#color","title":"Color","text":"

    No tint methods

    Uses arc.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-arc/#alpha","title":"Alpha","text":""},{"location":"shape-arc/#angle","title":"Angle","text":""},{"location":"shape-arc/#radius","title":"Radius","text":""},{"location":"shape-arc/#display-size","title":"Display size","text":""},{"location":"shape-arc/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-checkbox/","title":"Checkbox","text":""},{"location":"shape-checkbox/#introduction","title":"Introduction","text":"

    Checkbox input with drawing checker path animation.

    "},{"location":"shape-checkbox/#live-demos","title":"Live demos","text":""},{"location":"shape-checkbox/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-checkbox/#install-plugin","title":"Install plugin","text":""},{"location":"shape-checkbox/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-checkbox/#import-plugin","title":"Import plugin","text":""},{"location":"shape-checkbox/#import-class","title":"Import class","text":""},{"location":"shape-checkbox/#create-checkbox-input","title":"Create checkbox input","text":"
    var checkbox = scene.add.rexCheckbox(x, y, width, height, color, config);\n

    or

    var checkbox = scene.add.rexCheckbox({\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\n\ncolor: 0x005cb2,\nboxFillAlpha: 1,\nuncheckedColor: null,\nuncheckedBoxFillAlpha: 1,\n\nboxLineWidth: 4,\nboxStrokeColor: 0x005cb2,\nboxStrokeAlpha: 1,\nuncheckedBoxStrokeColor: 0x005cb2,\nuncheckedBoxStrokeAlpha: 1,\n\ncheckerColor: 0xffffff,\ncheckerAlpha: 1,\n\n// boxSize: 1,\n// checkerSize: 1,\n\ncircleBox: false,\n\nanimationDuration: 150,\n\nchecked: false, // or value: false,\n\nclick: undefined,\n// click: {\n//     mode: 1,            // 0|'press'|1|'release'\n//     clickInterval: 100  // ms\n//     threshold: undefined\n// },\nreadOnly: false,\n});\n
    "},{"location":"shape-checkbox/#custom-class","title":"Custom class","text":""},{"location":"shape-checkbox/#check","title":"Check","text":""},{"location":"shape-checkbox/#read-only","title":"Read only","text":""},{"location":"shape-checkbox/#box-fill-style","title":"Box fill style","text":""},{"location":"shape-checkbox/#box-stroke-style","title":"Box stroke style","text":""},{"location":"shape-checkbox/#checker-style","title":"Checker style","text":""},{"location":"shape-checkbox/#checker-animation","title":"Checker animation","text":""},{"location":"shape-checkbox/#size","title":"Size","text":""},{"location":"shape-checkbox/#display-size","title":"Display size","text":""},{"location":"shape-checkbox/#size-ratio","title":"Size ratio","text":""},{"location":"shape-checkbox/#events","title":"Events","text":""},{"location":"shape-checkbox/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-circle/","title":"Circle","text":""},{"location":"shape-circle/#introduction","title":"Introduction","text":"

    Circle shape, built-in game object of phaser.

    "},{"location":"shape-circle/#usage","title":"Usage","text":""},{"location":"shape-circle/#create-shape-object","title":"Create shape object","text":"
    var circle = scene.add.circle(x, y, radius, fillColor);\n// var circle = scene.add.circle(x, y, radius, fillColor, fillAlpha);\n
    "},{"location":"shape-circle/#custom-class","title":"Custom class","text":""},{"location":"shape-circle/#color","title":"Color","text":"

    No tint methods

    Uses circle.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-circle/#alpha","title":"Alpha","text":""},{"location":"shape-circle/#radius","title":"Radius","text":""},{"location":"shape-circle/#display-size","title":"Display size","text":""},{"location":"shape-circle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-circularprogress/","title":"Circular progres","text":""},{"location":"shape-circularprogress/#introduction","title":"Introduction","text":"

    Circular progress bar shape.

    "},{"location":"shape-circularprogress/#live-demos","title":"Live demos","text":""},{"location":"shape-circularprogress/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-circularprogress/#install-plugin","title":"Install plugin","text":""},{"location":"shape-circularprogress/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-circularprogress/#import-plugin","title":"Import plugin","text":""},{"location":"shape-circularprogress/#import-class","title":"Import class","text":""},{"location":"shape-circularprogress/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexCircularProgressPlugin',\nplugin: CircularProgressPlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"shape-circularprogress/#create-instance","title":"Create instance","text":"
    var circularProgress = scene.add.rexCircularProgress(x, y, radius, barColor, value, {    trackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},\n});\n

    or

    var circularProgress = scene.add.rexCircularProgress({\nx: 0,\ny: 0,\nradius: 1,\n\nbarColor: undefined,\ntrackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\n\nvalue: 0,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},  });\n

    Add circular-progress from JSON

    var circularProgress = scene.make.rexCircularProgress({\nx: 0,\ny: 0,\nradius: 1,\n\nbarColor: undefined,\ntrackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\n\nvalue: 0,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},  add: true\n});\n
    "},{"location":"shape-circularprogress/#custom-class","title":"Custom class","text":""},{"location":"shape-circularprogress/#progress-value","title":"Progress value","text":""},{"location":"shape-circularprogress/#ease-progress-value","title":"Ease progress value","text":""},{"location":"shape-circularprogress/#radius","title":"Radius","text":""},{"location":"shape-circularprogress/#circular-track","title":"Circular track","text":""},{"location":"shape-circularprogress/#circular-bar","title":"Circular bar","text":""},{"location":"shape-circularprogress/#center-circle","title":"Center circle","text":""},{"location":"shape-circularprogress/#events","title":"Events","text":""},{"location":"shape-circularprogress/#alpha","title":"Alpha","text":""},{"location":"shape-circularprogress/#compare-with-circular-progress-canvas","title":"Compare with Circular-progress canvas","text":""},{"location":"shape-cover/","title":"Cover","text":""},{"location":"shape-cover/#introduction","title":"Introduction","text":"

    Rectangle shape covered full window, and block all touch events.

    "},{"location":"shape-cover/#live-demos","title":"Live demos","text":""},{"location":"shape-cover/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-cover/#install-plugin","title":"Install plugin","text":""},{"location":"shape-cover/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-cover/#import-plugin","title":"Import plugin","text":""},{"location":"shape-cover/#import-class","title":"Import class","text":""},{"location":"shape-cover/#create-cover-object","title":"Create cover object","text":"
    var cover = scene.add.rexCover({\n// color: 0x0,\n// alpha: 0.8\n});\n
    "},{"location":"shape-cover/#custom-class","title":"Custom class","text":""},{"location":"shape-cover/#color","title":"Color","text":""},{"location":"shape-cover/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-curve/","title":"Curve","text":""},{"location":"shape-curve/#introduction","title":"Introduction","text":"

    Curve shape, built-in game object of phaser.

    "},{"location":"shape-curve/#usage","title":"Usage","text":""},{"location":"shape-curve/#create-shape-object","title":"Create shape object","text":"
    var curve = scene.add.curve(x, y, path, fillColor);\n// var curve = scene.add.curve(x, y, path, fillColor, fillAlpha);\n
    "},{"location":"shape-curve/#custom-class","title":"Custom class","text":""},{"location":"shape-curve/#color","title":"Color","text":"

    No tint methods

    Uses curve.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-curve/#alpha","title":"Alpha","text":""},{"location":"shape-curve/#smoothness","title":"Smoothness","text":"

    The number of points used when rendering it. Increase this value for smoother curves, at the cost of more polygons being rendered.

    curve.setSmoothness(smoothness);\n
    or
    curve.smoothness = smoothness;\n

    "},{"location":"shape-curve/#display-size","title":"Display size","text":""},{"location":"shape-curve/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-custom-progress/","title":"Custom progress","text":""},{"location":"shape-custom-progress/#introduction","title":"Introduction","text":"

    Custom progress bar based on custom-shapes.

    "},{"location":"shape-custom-progress/#live-demos","title":"Live demos","text":""},{"location":"shape-custom-progress/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-custom-progress/#install-plugin","title":"Install plugin","text":""},{"location":"shape-custom-progress/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-custom-progress/#import-plugin","title":"Import plugin","text":""},{"location":"shape-custom-progress/#import-class","title":"Import class","text":""},{"location":"shape-custom-progress/#add-custom-shapes-object","title":"Add custom shapes object","text":"
    var customProgress = scene.add.rexCustomProgress(x, y, width, height, {\n// type: 'rexCustomProgress',\n\ncreate: [\n{ name: name0, type: shapeType},\n{ name: name1, type: shapeType},\n...\n],\n\n// create: {\n//     shapeType: [name0, name1, ...],\n//     shapeType: number,\n//     shapeType: name,\n// },\n\n// create: function() {\n// \n// },\n\nupdate: function() {\n\n},\n\nvalue: 0,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},\n});\n

    or

    var customProgress = scene.add.rexCustomProgress({\n// x: 0,\n// y: 0,\n// width: 64,\n// height: 64,\n// type: 'rexCustomProgress',\n\ncreate: [\n{ name: name0, type: shapeType},\n{ name: name1, type: shapeType},\n...\n],\n\n// create: {\n//     shapeType: [name0, name1, ...],\n//     shapeType: number,\n//     shapeType: name,\n// },\n\n// create: function() {\n// \n// },\n\nupdate: function() {\n\n},\n\nvalue: 0,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\n\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},\n});\n
    "},{"location":"shape-custom-progress/#set-update-shape-callback","title":"Set update shape callback","text":"

    See Shape class

    "},{"location":"shape-custom-progress/#size","title":"Size","text":"

    See Size

    "},{"location":"shape-custom-progress/#styles","title":"Styles","text":"

    See Styles

    "},{"location":"shape-custom-progress/#recreate-shapes","title":"Recreate shapes","text":"

    See Shape class

    "},{"location":"shape-custom-progress/#progress-value","title":"Progress value","text":""},{"location":"shape-custom-progress/#ease-progress-value","title":"Ease progress value","text":""},{"location":"shape-custom-progress/#refresh","title":"Refresh","text":"

    Redraw shapes when

    "},{"location":"shape-custom-progress/#shape-class","title":"Shape class","text":"

    See Shape class

    "},{"location":"shape-custom-progress/#events","title":"Events","text":""},{"location":"shape-custom-progress/#alpha","title":"Alpha","text":""},{"location":"shape-custom-shapes/","title":"Custom shapes","text":""},{"location":"shape-custom-shapes/#introduction","title":"Introduction","text":"

    Custom shapes on shape.

    "},{"location":"shape-custom-shapes/#live-demos","title":"Live demos","text":""},{"location":"shape-custom-shapes/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-custom-shapes/#install-plugin","title":"Install plugin","text":""},{"location":"shape-custom-shapes/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-custom-shapes/#import-plugin","title":"Import plugin","text":""},{"location":"shape-custom-shapes/#import-class","title":"Import class","text":""},{"location":"shape-custom-shapes/#add-custom-shapes-object","title":"Add custom shapes object","text":"
    var customShapes = scene.add.rexCustomShapes(x, y, width, height, {\n// type: 'rexCustomShapes',\n\ncreate: [\n{ name: name0, type: shapeType},\n{ name: name1, type: shapeType},\n...\n],\n\n// create: {\n//     shapeType: [name0, name1, ...],\n//     shapeType: number,\n//     shapeType: name,\n// },\n\n// create: function() {\n// \n// },\n\nupdate: function() {\n\n},\n});\n

    or

    var customShapes = scene.add.rexCustomShapes({\n// x: 0,\n// y: 0,\n// width: 64,\n// height: 64,\n// type: 'rexCustomShapes',\n\ncreate: [\n{ name: name0, type: shapeType},\n{ name: name1, type: shapeType},\n...\n],\n\n// create: {\n//     shapeType: [name0, name1, ...],\n//     shapeType: number,\n//     shapeType: name,\n// },\n\n// create: function() {\n// \n// },\n\nupdate: function() {\n\n},\n});\n
    "},{"location":"shape-custom-shapes/#set-update-shape-callback","title":"Set update shape callback","text":"
    customShapes.setUpdateShapesCallback(callback);\n
    "},{"location":"shape-custom-shapes/#size","title":"Size","text":"

    customShapes.setSize(width, height);\n
    or
    customShapes.resize(width, height);\n
    or
    customShapes.width = width;\ncustomShapes.height = height;\n

    Will set dirty and redraw shapes

    "},{"location":"shape-custom-shapes/#styles","title":"Styles","text":"

    Will set dirty and redraw shapes. Apply styles to shapes in update callback.

    "},{"location":"shape-custom-shapes/#world-position-to-local-position","title":"World position to local position","text":"
    var localXY = customShapes.worldToLocalXY(worldX, worldY); // localXY: {x, y}\n

    or

    var out = customShapes.worldToLocalXY(worldX, worldY, camera, out);\n
    "},{"location":"shape-custom-shapes/#recreate-shapes","title":"Recreate shapes","text":""},{"location":"shape-custom-shapes/#refresh","title":"Refresh","text":"

    Redraw shapes when

    "},{"location":"shape-custom-shapes/#update-shape-data","title":"Update shape data","text":"

    Shape data will be updated during rendering, or call shape.updateData() to update shape data before rendering.

    "},{"location":"shape-custom-shapes/#shape-class","title":"Shape class","text":""},{"location":"shape-custom-shapes/#common-properties","title":"Common properties","text":""},{"location":"shape-custom-shapes/#line","title":"Line","text":""},{"location":"shape-custom-shapes/#lines","title":"Lines","text":""},{"location":"shape-custom-shapes/#create-path","title":"Create path","text":""},{"location":"shape-custom-shapes/#transform","title":"Transform","text":""},{"location":"shape-custom-shapes/#display-path-segment","title":"Display path segment","text":"
    1. Create path, under customShapes.isSizeChanged condition.
    2. Display segment of path
      lines.setDisplayPathSegment(startT, endT);\n
      or
      lines.setDisplayPathSegment(endT);  // startT = 0\n
    "},{"location":"shape-custom-shapes/#misc","title":"Misc","text":""},{"location":"shape-custom-shapes/#rectangle","title":"Rectangle","text":""},{"location":"shape-custom-shapes/#round-rectangle","title":"Round rectangle","text":""},{"location":"shape-custom-shapes/#triangle","title":"Triangle","text":""},{"location":"shape-custom-shapes/#arc","title":"Arc","text":""},{"location":"shape-custom-shapes/#circle","title":"Circle","text":""},{"location":"shape-custom-shapes/#ellipse","title":"Ellipse","text":"

    The same as Circle.

    "},{"location":"shape-custom-shapes/#alpha","title":"Alpha","text":""},{"location":"shape-custom-shapes/#compare-with-similar-plugins","title":"Compare with similar plugins","text":""},{"location":"shape-ellipse/","title":"Ellipse","text":""},{"location":"shape-ellipse/#introduction","title":"Introduction","text":"

    Ellipse shape, built-in game object of phaser.

    "},{"location":"shape-ellipse/#usage","title":"Usage","text":""},{"location":"shape-ellipse/#create-shape-object","title":"Create shape object","text":"
    var ellipse = scene.add.ellipse(x, y, width, height, fillColor);\n// var ellipse = scene.add.ellipse(x, y, width, height, fillColor, fillAlpha);\n
    "},{"location":"shape-ellipse/#custom-class","title":"Custom class","text":""},{"location":"shape-ellipse/#color","title":"Color","text":"

    No tint methods

    Uses ellipse.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-ellipse/#alpha","title":"Alpha","text":""},{"location":"shape-ellipse/#size","title":"Size","text":""},{"location":"shape-ellipse/#display-size","title":"Display size","text":""},{"location":"shape-ellipse/#smoothness","title":"Smoothness","text":"

    The number of points used when rendering it. Increase this value for smoother curves, at the cost of more polygons being rendered.

    ellipse.setSmoothness(smoothness);\n
    or
    ellipse.smoothness = smoothness;\n

    "},{"location":"shape-ellipse/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-fullwindowrectangle/","title":"Full window rectangle","text":""},{"location":"shape-fullwindowrectangle/#introduction","title":"Introduction","text":"

    Rectangle shape covered full window.

    "},{"location":"shape-fullwindowrectangle/#live-demos","title":"Live demos","text":""},{"location":"shape-fullwindowrectangle/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-fullwindowrectangle/#install-plugin","title":"Install plugin","text":""},{"location":"shape-fullwindowrectangle/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-fullwindowrectangle/#import-plugin","title":"Import plugin","text":""},{"location":"shape-fullwindowrectangle/#import-class","title":"Import class","text":""},{"location":"shape-fullwindowrectangle/#create-shape-object","title":"Create shape object","text":"
    var rect = scene.add.rexFullWindowRectangle(fillColor, fillAlpha);\n
    "},{"location":"shape-fullwindowrectangle/#custom-class","title":"Custom class","text":""},{"location":"shape-fullwindowrectangle/#color","title":"Color","text":""},{"location":"shape-fullwindowrectangle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-grid/","title":"Grid","text":""},{"location":"shape-grid/#introduction","title":"Introduction","text":"

    Grid shape, built-in game object of phaser.

    "},{"location":"shape-grid/#usage","title":"Usage","text":""},{"location":"shape-grid/#create-shape-object","title":"Create shape object","text":"
    var grid = scene.add.grid(x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha);\n
    "},{"location":"shape-grid/#custom-class","title":"Custom class","text":""},{"location":"shape-grid/#color","title":"Color","text":"

    No tint methods

    Uses grid.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-grid/#alpha","title":"Alpha","text":""},{"location":"shape-grid/#display-size","title":"Display size","text":""},{"location":"shape-grid/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-isobox/","title":"Iso box","text":""},{"location":"shape-isobox/#introduction","title":"Introduction","text":"

    Iso-box shape, built-in game object of phaser.

    "},{"location":"shape-isobox/#usage","title":"Usage","text":""},{"location":"shape-isobox/#create-shape-object","title":"Create shape object","text":"
    var isoBox = scene.add.isobox(x, y, width, height, fillTop, fillLeft, fillRight);\n
    "},{"location":"shape-isobox/#custom-class","title":"Custom class","text":""},{"location":"shape-isobox/#set-color","title":"Set color","text":"

    No tint methods

    Uses isoBox.setFillStyle(fillTop, fillLeft, fillRight) to change color.

    "},{"location":"shape-isobox/#alpha","title":"Alpha","text":""},{"location":"shape-isobox/#projection","title":"Projection","text":""},{"location":"shape-isobox/#display-size","title":"Display size","text":""},{"location":"shape-isobox/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-isotriangle/","title":"Iso triangle","text":""},{"location":"shape-isotriangle/#introduction","title":"Introduction","text":"

    Iso-triangle shape, built-in game object of phaser.

    "},{"location":"shape-isotriangle/#usage","title":"Usage","text":""},{"location":"shape-isotriangle/#create-shape-object","title":"Create shape object","text":"
    var isoTriangle = scene.add.isotriangle(x, y, width, height, reversed, fillTop, fillLeft, fillRight);\n
    "},{"location":"shape-isotriangle/#custom-class","title":"Custom class","text":""},{"location":"shape-isotriangle/#set-color","title":"Set color","text":"

    No tint methods

    Uses isoTriangle.setFillStyle(fillTop, fillLeft, fillRight) to change color.

    "},{"location":"shape-isotriangle/#alpha","title":"Alpha","text":""},{"location":"shape-isotriangle/#projection","title":"Projection","text":""},{"location":"shape-isotriangle/#reverse","title":"Reverse","text":""},{"location":"shape-isotriangle/#display-size","title":"Display size","text":""},{"location":"shape-isotriangle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-line/","title":"Line","text":""},{"location":"shape-line/#introduction","title":"Introduction","text":"

    Line shape, built-in game object of phaser.

    "},{"location":"shape-line/#usage","title":"Usage","text":""},{"location":"shape-line/#create-shape-object","title":"Create shape object","text":"
    var line = scene.add.line(x, y, x1, y1, x2, y2, strokeColor);\n// var line = scene.add.line(x, y, x1, y1, x2, y2, strokeColor, strokeAlpha);\n
    "},{"location":"shape-line/#custom-class","title":"Custom class","text":""},{"location":"shape-line/#set-color","title":"Set color","text":"

    No tint methods

    Uses line.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-line/#alpha","title":"Alpha","text":""},{"location":"shape-line/#set-end-points","title":"Set end points","text":"
    line.setTo(x1, y1, x2, y2);\n
    "},{"location":"shape-line/#line-width","title":"Line width","text":"
    line.setLineWidth(startWidth, endWidth);\n
    "},{"location":"shape-line/#display-size","title":"Display size","text":""},{"location":"shape-line/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-lineprogress/","title":"Line progress","text":""},{"location":"shape-lineprogress/#introduction","title":"Introduction","text":"

    Horizontal line progress bar shape.

    "},{"location":"shape-lineprogress/#live-demos","title":"Live demos","text":""},{"location":"shape-lineprogress/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-lineprogress/#install-plugin","title":"Install plugin","text":""},{"location":"shape-lineprogress/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-lineprogress/#import-plugin","title":"Import plugin","text":""},{"location":"shape-lineprogress/#import-class","title":"Import class","text":""},{"location":"shape-lineprogress/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexLineProgressPlugin',\nplugin: LineProgressPlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"shape-lineprogress/#create-instance","title":"Create instance","text":"
    var lineProgress = scene.add.rexLineProgress(x, y, width, height, barColor, value, {    trackColor: undefined,\ntrackStrokeColor: undefined,\ntrackStrokeThickness: 2,\n\nskewX:0,\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, lineProgress) {\n},\n});\n

    or

    var lineProgress = scene.add.rexLineProgress({\nx: 0,\ny: 0,\nwidth: 2,\nheight: 2,\n\nbarColor: undefined,\ntrackColor: undefined,\ntrackStrokeColor: undefined,\ntrackStrokeThickness: 2,\n\nskewX:0,\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvalue: 0,\nvaluechangeCallback: function(newValue, oldValue, lineProgress) {\n},\n});\n

    Add line-progress from JSON

    var lineProgress = scene.make.rexLineProgress({\nx: 0,\ny: 0,\nwidth: 2,\nheight: 2,\n\nbarColor: undefined,\ntrackColor: undefined,\ntrackStrokeColor: undefined,\ntrackStrokeThickness: 2,\n\nskewX:0,\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvalue: 0,\nvaluechangeCallback: function(newValue, oldValue, lineProgress) {\n},\n\nadd: true\n});\n
    "},{"location":"shape-lineprogress/#custom-class","title":"Custom class","text":""},{"location":"shape-lineprogress/#progress-value","title":"Progress value","text":""},{"location":"shape-lineprogress/#ease-progress-value","title":"Ease progress value","text":""},{"location":"shape-lineprogress/#line-track","title":"Line track","text":""},{"location":"shape-lineprogress/#line-bar","title":"Line bar","text":""},{"location":"shape-lineprogress/#horizontal-skew","title":"Horizontal skew","text":""},{"location":"shape-lineprogress/#right-to-left","title":"Right-to-left","text":""},{"location":"shape-lineprogress/#events","title":"Events","text":""},{"location":"shape-lineprogress/#alpha","title":"Alpha","text":""},{"location":"shape-polygon/","title":"Polygon","text":""},{"location":"shape-polygon/#introduction","title":"Introduction","text":"

    Polygon shape, built-in game object of phaser.

    "},{"location":"shape-polygon/#usage","title":"Usage","text":""},{"location":"shape-polygon/#create-shape-object","title":"Create shape object","text":"
    var polygon = scene.add.polygon(x, y, points, fillColor);\n// var polygon = scene.add.polygon(x, y, points, fillColor, fillAlpha);\n

    Note

    Shift given points to align position (0, 0)

    "},{"location":"shape-polygon/#custom-class","title":"Custom class","text":""},{"location":"shape-polygon/#color","title":"Color","text":"

    No tint methods

    Uses polygon.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-polygon/#alpha","title":"Alpha","text":""},{"location":"shape-polygon/#smooth","title":"Smooth","text":"

    Smooths the polygon over the number of iterations specified.

    polygon.smooth(iterations);\n
    "},{"location":"shape-polygon/#set-points","title":"Set points","text":"
    polygon.setTo(points);\n
    "},{"location":"shape-polygon/#display-size","title":"Display size","text":""},{"location":"shape-polygon/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-rectangle/","title":"Rectangle","text":""},{"location":"shape-rectangle/#introduction","title":"Introduction","text":"

    Rectangle shape, built-in game object of phaser.

    "},{"location":"shape-rectangle/#usage","title":"Usage","text":""},{"location":"shape-rectangle/#create-shape-object","title":"Create shape object","text":"
    var rect = scene.add.rectangle(x, y, width, height, fillColor);\n// var rect = scene.add.rectangle(x, y, width, height, fillColor, fillAlpha);\n
    "},{"location":"shape-rectangle/#custom-class","title":"Custom class","text":""},{"location":"shape-rectangle/#color","title":"Color","text":"

    No tint methods

    Uses rect.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-rectangle/#alpha","title":"Alpha","text":""},{"location":"shape-rectangle/#size","title":"Size","text":""},{"location":"shape-rectangle/#display-size","title":"Display size","text":""},{"location":"shape-rectangle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-roundrectangle/","title":"Round Rectangle","text":""},{"location":"shape-roundrectangle/#introduction","title":"Introduction","text":"

    Round rectangle shape.

    "},{"location":"shape-roundrectangle/#live-demos","title":"Live demos","text":""},{"location":"shape-roundrectangle/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-roundrectangle/#install-plugin","title":"Install plugin","text":""},{"location":"shape-roundrectangle/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-roundrectangle/#import-plugin","title":"Import plugin","text":""},{"location":"shape-roundrectangle/#import-class","title":"Import class","text":""},{"location":"shape-roundrectangle/#create-shape-object","title":"Create shape object","text":"
    var rect = scene.add.rexRoundRectangle(x, y, width, height, radius, fillColor, fillAlpha);\n

    or

    var rect = scene.add.rexRoundRectangle({\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\nradius: 0,\n\ncolor: undefined,\nalpha: undefined,\n\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: 2\n});\n
    "},{"location":"shape-roundrectangle/#deform","title":"Deform","text":""},{"location":"shape-roundrectangle/#custom-class","title":"Custom class","text":""},{"location":"shape-roundrectangle/#color","title":"Color","text":"

    No tint methods

    Uses rect.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-roundrectangle/#alpha","title":"Alpha","text":""},{"location":"shape-roundrectangle/#size","title":"Size","text":""},{"location":"shape-roundrectangle/#display-size","title":"Display size","text":""},{"location":"shape-roundrectangle/#radius","title":"Radius","text":""},{"location":"shape-roundrectangle/#iteration","title":"Iteration","text":"

    Number of interpolation points in each round corner. Default value is 4.

    "},{"location":"shape-roundrectangle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-spinner/","title":"Spinner","text":""},{"location":"shape-spinner/#introduction","title":"Introduction","text":"

    Loading animations on shape.

    "},{"location":"shape-spinner/#live-demos","title":"Live demos","text":""},{"location":"shape-spinner/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-spinner/#install-plugin","title":"Install plugin","text":""},{"location":"shape-spinner/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-spinner/#import-plugin","title":"Import plugin","text":""},{"location":"shape-spinner/#import-class","title":"Import class","text":""},{"location":"shape-spinner/#add-spinner-object","title":"Add spinner object","text":"
    var spinner = scene.rexSpinner.add.audio({\n// x: 0,\n// y: 0,\n// width: 64,\n// height: 64,\n// color: 0xffffff,\n\n// duration: 1000,\n// start: true,\n// delay: 0,\n// repeatDelay: 0,\n});\n
    "},{"location":"shape-spinner/#play-animation","title":"Play animation","text":""},{"location":"shape-spinner/#start","title":"Start","text":""},{"location":"shape-spinner/#pause","title":"Pause","text":"
    spinner.pause();\n
    "},{"location":"shape-spinner/#resume","title":"Resume","text":"
    spinner.resume();\n
    "},{"location":"shape-spinner/#stop","title":"Stop","text":"
    spinner.stop();\n
    "},{"location":"shape-spinner/#play-animation-manually","title":"Play animation manually","text":"
    1. Set start to false in config
    2. Set progress manually
      spinner.setValue(t);\n
      or
      spinner.value = t;\n
    "},{"location":"shape-spinner/#is-running","title":"Is running","text":"
    var isRunning = spinner.isRunning;\n
    "},{"location":"shape-spinner/#color","title":"Color","text":""},{"location":"shape-spinner/#alpha","title":"Alpha","text":""},{"location":"shape-spinner/#duration","title":"Duration","text":""},{"location":"shape-spinner/#ease","title":"Ease","text":""},{"location":"shape-spinner/#custom-spinner","title":"Custom spinner","text":"
    var customSpinner = this.rexSpinner.add.custom({\n// x: 0,\n// y: 0,\n// width: 64,\n// height: 64,\n// color: 0xffffff,\n\n// duration: 1000,\n// start: true,\n\ncreate: {\n// shapeType: [name0, name1, ...],\n// shapeType: number,\n// shapeType: name,\n},\n\n// create: function() {\n// \n// },\n\nupdate: function() {\n\n},\n})\n
    "},{"location":"shape-spinner/#shape-class","title":"Shape class","text":"

    See Shape class

    "},{"location":"shape-star/","title":"Star","text":""},{"location":"shape-star/#introduction","title":"Introduction","text":"

    Star shape, built-in game object of phaser.

    "},{"location":"shape-star/#usage","title":"Usage","text":""},{"location":"shape-star/#create-shape-object","title":"Create shape object","text":"
    var star = scene.add.star(x, y, points, innerRadius, outerRadius, fillColor);\n// var star = scene.add.star(x, y, points, innerRadius, outerRadius, fillColor, fillAlpha);\n
    "},{"location":"shape-star/#custom-class","title":"Custom class","text":""},{"location":"shape-star/#color","title":"Color","text":"

    No tint methods

    Uses star.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-star/#alpha","title":"Alpha","text":""},{"location":"shape-star/#radius","title":"Radius","text":""},{"location":"shape-star/#display-size","title":"Display size","text":""},{"location":"shape-star/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-toggleswitch/","title":"Toggle switch","text":""},{"location":"shape-toggleswitch/#introduction","title":"Introduction","text":"

    Toggle-switch input.

    "},{"location":"shape-toggleswitch/#live-demos","title":"Live demos","text":""},{"location":"shape-toggleswitch/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-toggleswitch/#install-plugin","title":"Install plugin","text":""},{"location":"shape-toggleswitch/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-toggleswitch/#import-plugin","title":"Import plugin","text":""},{"location":"shape-toggleswitch/#import-class","title":"Import class","text":""},{"location":"shape-toggleswitch/#create-toggle-switch-input","title":"Create toggle-switch input","text":"
    var toggleSwitch = scene.add.rexToggleSwitch(x, y, width, height, color, config);\n

    or

    var toggleSwitch = scene.add.rexToggleSwitch({\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\n\ncolor: 0x005cb2,\ntrackFillAlpha: 1,\nfalseValueTrackColor: undefined,\nfalseValueTrackFillAlpha: 1,\n\nthumbColor: 0xffffff,\nthumbAlpha: 1,\n\ntrackWidth: 0.9,\ntrackHeight: 0.5,\ntrackCornerRadius: (trackHeight * 0.5),\n\nthumbHeight: (trackHeight * 0.9),\nthumbWidth: (thumbHeight),\nthumbCornerRadius: (thumbHeight * 0.5),\n\nthumbLeft: 0.3,\nthumbRight: (1 - thumbLeft),\nrtl: false,\n\nanimationDuration: 150,\n\nvalue: false,\n\nclick: undefined,\n// click: {\n//     mode: 1,            // 0|'press'|1|'release'\n//     clickInterval: 100  // ms\n//     threshold: undefined\n// },\nreadOnly: false,\n});\n
    "},{"location":"shape-toggleswitch/#custom-class","title":"Custom class","text":""},{"location":"shape-toggleswitch/#value","title":"Value","text":""},{"location":"shape-toggleswitch/#read-only","title":"Read only","text":""},{"location":"shape-toggleswitch/#track-fill-style","title":"Track fill style","text":""},{"location":"shape-toggleswitch/#thumb-fill-style","title":"Thumb fill style","text":""},{"location":"shape-toggleswitch/#toggle-animation","title":"Toggle animation","text":""},{"location":"shape-toggleswitch/#size","title":"Size","text":""},{"location":"shape-toggleswitch/#display-size","title":"Display size","text":""},{"location":"shape-toggleswitch/#track-size-ratio","title":"Track size ratio","text":""},{"location":"shape-toggleswitch/#track-corner-ratio","title":"Track corner ratio","text":""},{"location":"shape-toggleswitch/#thumb-size-ratio","title":"Thumb size ratio","text":""},{"location":"shape-toggleswitch/#thumb-corner-ratio","title":"Thumb corner ratio","text":""},{"location":"shape-toggleswitch/#thumb-position-ratio","title":"Thumb position ratio","text":""},{"location":"shape-toggleswitch/#events","title":"Events","text":""},{"location":"shape-toggleswitch/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-triangle/","title":"Triangle","text":""},{"location":"shape-triangle/#introduction","title":"Introduction","text":"

    Triangle shape, built-in game object of phaser.

    "},{"location":"shape-triangle/#usage","title":"Usage","text":""},{"location":"shape-triangle/#create-shape-object","title":"Create shape object","text":"
    var triangle = scene.add.triangle(x, y, x1, y1, x2, y2, x3, y3, fillColor);\n// var triangle = scene.add.triangle(x, y, x1, y1, x2, y2, x3, y3, fillColor, fillAlpha);\n
    "},{"location":"shape-triangle/#custom-class","title":"Custom class","text":""},{"location":"shape-triangle/#color","title":"Color","text":"

    No tint methods

    Uses triangle.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-triangle/#alpha","title":"Alpha","text":""},{"location":"shape-triangle/#set-vertices","title":"Set vertices","text":"
    triangle.setTo(x1, y1, x2, y2, x3, y3);\n
    "},{"location":"shape-triangle/#triangle-width","title":"Triangle width","text":"
    triangle.setLineWidth(startWidth, endWidth);\n
    "},{"location":"shape-triangle/#display-size","title":"Display size","text":""},{"location":"shape-triangle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-triangle2/","title":"Triangle 2","text":""},{"location":"shape-triangle2/#introduction","title":"Introduction","text":"

    Trangle shape inside a rectangle bounds.

    "},{"location":"shape-triangle2/#live-demos","title":"Live demos","text":""},{"location":"shape-triangle2/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-triangle2/#install-plugin","title":"Install plugin","text":""},{"location":"shape-triangle2/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-triangle2/#import-plugin","title":"Import plugin","text":""},{"location":"shape-triangle2/#import-class","title":"Import class","text":""},{"location":"shape-triangle2/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexTrianglePlugin',\nplugin: TrianglePlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"shape-triangle2/#create-instance","title":"Create instance","text":"
    var triangle = scene.add.rexTriangle(x, y, width, height, fillColor, fillAlpha);\n

    or

    var triangle = scene.add.rexTriangle({\nx: 0,\ny: 0,\nwidth: 2,\nheight: 2,\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n\narrowOnly: false,\n\ndirection: 0,\neaseDuration: 0,\npadding: 0,\n// padding: {\n//     left: 0,\n//     right: 0,\n//     top: 0,\n//     bottom: 0,\n// },\n\nradius: undefined,\n});\n
    "},{"location":"shape-triangle2/#custom-class","title":"Custom class","text":""},{"location":"shape-triangle2/#color","title":"Color","text":"

    No tint methods

    Uses triangle.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-triangle2/#alpha","title":"Alpha","text":""},{"location":"shape-triangle2/#size","title":"Size","text":""},{"location":"shape-triangle2/#display-size","title":"Display size","text":""},{"location":"shape-triangle2/#direction","title":"Direction","text":""},{"location":"shape-triangle2/#padding","title":"Padding","text":""},{"location":"shape-triangle2/#ease-duration","title":"Ease duration","text":""},{"location":"shape-triangle2/#arrow-only","title":"Arrow only","text":""},{"location":"shatter-image/","title":"Image","text":""},{"location":"shatter-image/#introduction","title":"Introduction","text":"

    Shatter image to triangle faces.

    Reference: Delaunay Triangulation

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"shatter-image/#live-demos","title":"Live demos","text":""},{"location":"shatter-image/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shatter-image/#install-plugin","title":"Install plugin","text":""},{"location":"shatter-image/#load-minify-file","title":"Load minify file","text":""},{"location":"shatter-image/#import-plugin","title":"Import plugin","text":""},{"location":"shatter-image/#import-class","title":"Import class","text":""},{"location":"shatter-image/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexShatterImage(x, y, texture, frame, {\n// ringRadiusList: [1 / 27, 3 / 27, 9 / 27],\n// ringRadiusList: function(width, height) {\n//    return [1 / 27, 3 / 27, 9 / 27];\n// },\n\n// samplesPerRing: 12\n// variation: 0.25,    \n});\n

    or

    var image = scene.add.rexShatterImage({\n// x: 0,\n// y: 0,\nkey,\n// frame: null,\n\n// ringRadiusList: [1 / 27, 3 / 27, 9 / 27],\n// ringRadiusList: function(width, height) {\n//    return [1 / 27, 3 / 27, 9 / 27];\n// },\n\n// samplesPerRing: 12,\n// variation: 0.25,\n\n});\n

    Add perspectiveimage from JSON

    var perspectiveimage = scene.make.rexShatterImage({\nx: 0,\ny: 0,\nkey: null,\nframe: null,\n\n// ringRadiusList: [1 / 27, 3 / 27, 9 / 27],\n// ringRadiusList: function(width, height) {\n//    return [1 / 27, 3 / 27, 9 / 27];\n// },\n\n// samplesPerRing: 12,\n// variation: 0.25,\n\n\nadd: true\n});\n
    "},{"location":"shatter-image/#custom-class","title":"Custom class","text":""},{"location":"shatter-image/#shatter-image","title":"Shatter image","text":"
    image.shatter(centerX, centerY);\n// image.shatter();\n

    or

    image.shatter(centerX, centerY, {\n// ringRadiusList:\n// samplesPerRing: \n// variation\n});\n

    or

    image.shatter({\n// centerX: \n// centerY: \n// ringRadiusList:\n// samplesPerRing: \n// variation\n});\n

    Shatter image into triangle faces.

    "},{"location":"shatter-image/#position-of-shatter-center","title":"Position of Shatter center","text":"
    var shatterCenter = image.shatterCenter; // {x, y}\n
    "},{"location":"shatter-image/#faces","title":"Faces","text":"
    var faces = image.faces;\n

    Faces will be sorted nearby shatter-center to far away.

    "},{"location":"shatter-image/#properties","title":"Properties","text":""},{"location":"shatter-image/#update-properties","title":"Update properties","text":""},{"location":"shatter-image/#tween-properties","title":"Tween properties","text":"
    image.startUpdate();\nscene.tweens.add({\ntargets: image.faces,\nalpha: 0,\nangle: function () { return -90 + Math.random() * 180; },\ny: '-=0.5',\nease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\ndelay: scene.tweens.stagger(20),\nrepeat: 0,            // -1: infinity\nyoyo: false,\nonComplete: function () {\nimage.stopUpdate()\n}\n});\n
    "},{"location":"shatter-image/#reset-image","title":"Reset image","text":"

    Display original image with 2 faces.

    image.resetImage();\n
    "},{"location":"shatter-image/#tint-color","title":"Tint color","text":""},{"location":"shatter-rendertexture/","title":"Render texture","text":""},{"location":"shatter-rendertexture/#introduction","title":"Introduction","text":"

    Shatter render texture to triangle faces.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"shatter-rendertexture/#live-demos","title":"Live demos","text":""},{"location":"shatter-rendertexture/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shatter-rendertexture/#install-plugin","title":"Install plugin","text":""},{"location":"shatter-rendertexture/#load-minify-file","title":"Load minify file","text":""},{"location":"shatter-rendertexture/#import-plugin","title":"Import plugin","text":""},{"location":"shatter-rendertexture/#import-class","title":"Import class","text":""},{"location":"shatter-rendertexture/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexShatterRenderTexturege(x, y, width, height, {\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    or

    var image = scene.add.rexShatterRenderTexturege({\n// x: 0,\n// y: 0,\n// width: 32,\n// height: 32,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    Add prespective render texture from JSON

    var image = scene.make.rexShatterRenderTexturege({\nx: 0,\ny: 0,    width: 32,\nheight: 32,\n\n// gridWidth: 32,\n// girdHeight: 32,\n\nadd: true\n});\n
    "},{"location":"shatter-rendertexture/#custom-class","title":"Custom class","text":""},{"location":"shatter-rendertexture/#internal-render-texture","title":"Internal render texture","text":"
    var rt = image.rt;\n
    "},{"location":"shatter-rendertexture/#paste-texture","title":"Paste texture","text":""},{"location":"shatter-rendertexture/#erase","title":"Erase","text":"
    image.rt.erase(gameObject, x, y);\n
    "},{"location":"shatter-rendertexture/#clear","title":"Clear","text":"
    image.rt.clear();\n
    "},{"location":"shatter-rendertexture/#fill","title":"Fill","text":"
    image.rt.fill(rgb, alpha);\n// image.rt.fill(rgb, alpha, x, y, width, height);\n
    "},{"location":"shatter-rendertexture/#other-properties","title":"Other properties","text":"

    See Shatter image game object.

    "},{"location":"ship/","title":"Ship","text":""},{"location":"ship/#introduction","title":"Introduction","text":"

    Move game object as a space ship by cursor keys.

    "},{"location":"ship/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ship/#install-plugin","title":"Install plugin","text":""},{"location":"ship/#load-minify-file","title":"Load minify file","text":""},{"location":"ship/#import-plugin","title":"Import plugin","text":""},{"location":"ship/#import-class","title":"Import class","text":""},{"location":"ship/#create-instance","title":"Create instance","text":"
    var ship = scene.plugins.get('rexShip').add(gameObject, {\n// maxSpeed: 200,\n// acceleration: 200,\n// drag: 0.99,\n// turnSpeed: 300,\n// wrap: true,\n// padding: 0,\n// enable: true,\n// cursorKeys: scene.input.keyboard.createCursorKeys()\n});\n
    "},{"location":"ship/#set-max-speed","title":"Set max speed","text":"
    ship.setMaxSpeed(speed);\n
    "},{"location":"ship/#set-acceleration","title":"Set acceleration","text":"
    ship.setAcceleration(acc);\n
    "},{"location":"ship/#set-drag","title":"Set drag","text":"
    ship.setDrag(drag);\n
    "},{"location":"ship/#set-turn-speed","title":"Set turn speed","text":"
    ship.setTurnSpeed(angularVelocity);\n
    "},{"location":"ship/#set-wrap-mode","title":"Set wrap mode","text":"
    ship.setWrapMode(wrap, padding);\n
    "},{"location":"skew-image/","title":"Image","text":""},{"location":"skew-image/#introduction","title":"Introduction","text":"

    Skewable Image.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"skew-image/#live-demos","title":"Live demos","text":""},{"location":"skew-image/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"skew-image/#install-plugin","title":"Install plugin","text":""},{"location":"skew-image/#load-minify-file","title":"Load minify file","text":""},{"location":"skew-image/#import-plugin","title":"Import plugin","text":""},{"location":"skew-image/#import-class","title":"Import class","text":""},{"location":"skew-image/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexSkewImage(x, y, texture, frame);\n

    or

    var image = scene.add.rexSkewImage({\n// x: 0,\n// y: 0,\nkey,\n// frame: null,\n});\n

    Add quadimage from JSON

    var quadimage = scene.make.rexSkewImage({\nx: 0,\ny: 0,\n\nkey: null,\nframe: null,\n\nadd: true\n});\n
    "},{"location":"skew-image/#custom-class","title":"Custom class","text":""},{"location":"skew-image/#skew","title":"Skew","text":""},{"location":"skew-image/#other-properties","title":"Other properties","text":"

    See Mesh game object.

    "},{"location":"skew-rendertexture/","title":"Render texture","text":""},{"location":"skew-rendertexture/#introduction","title":"Introduction","text":"

    Skewable render texture.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"skew-rendertexture/#live-demos","title":"Live demos","text":""},{"location":"skew-rendertexture/#usage","title":"Usage","text":""},{"location":"skew-rendertexture/#install-plugin","title":"Install plugin","text":""},{"location":"skew-rendertexture/#load-minify-file","title":"Load minify file","text":""},{"location":"skew-rendertexture/#import-plugin","title":"Import plugin","text":""},{"location":"skew-rendertexture/#import-class","title":"Import class","text":""},{"location":"skew-rendertexture/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexSkewRenderTexturege(x, y, width, height);\n

    or

    var image = scene.add.rexSkewRenderTexturege({\n// x: 0,\n// y: 0,\n// width: 32,\n// height: 32,\n});\n

    Add prespective render texture from JSON

    var image = scene.make.rexSkewRenderTexturege({\nx: 0,\ny: 0,    width: 32,\nheight: 32,\n\nadd: true\n});\n
    "},{"location":"skew-rendertexture/#custom-class","title":"Custom class","text":""},{"location":"skew-rendertexture/#internal-render-texture","title":"Internal render texture","text":"
    var rt = image.rt;\n
    "},{"location":"skew-rendertexture/#paste-texture","title":"Paste texture","text":""},{"location":"skew-rendertexture/#erase","title":"Erase","text":"
    image.rt.erase(gameObject, x, y);\n
    "},{"location":"skew-rendertexture/#clear","title":"Clear","text":"
    image.rt.clear();\n
    "},{"location":"skew-rendertexture/#fill","title":"Fill","text":"
    image.rt.fill(rgb, alpha);\n// image.rt.fill(rgb, alpha, x, y, width, height);\n
    "},{"location":"skew-rendertexture/#other-properties","title":"Other properties","text":"

    See Skew image game object.

    "},{"location":"slider/","title":"Slider","text":""},{"location":"slider/#introduction","title":"Introduction","text":"

    Drag thumb on a slider bar.

    "},{"location":"slider/#live-demos","title":"Live demos","text":""},{"location":"slider/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"slider/#install-plugin","title":"Install plugin","text":""},{"location":"slider/#load-minify-file","title":"Load minify file","text":""},{"location":"slider/#import-plugin","title":"Import plugin","text":""},{"location":"slider/#import-class","title":"Import class","text":""},{"location":"slider/#create-instance","title":"Create instance","text":"
    var slider = scene.plugins.get('rexSlider').add(gameObject, {\n// endPoints: [\n//     {x:0, y:0},\n//     {x:0, y:0}\n// ],\n// value: 0,\n// enable: true,\n\n// valuechangeCallback: null,\n// valuechangeCallbackScope: null\n});\n
    "},{"location":"slider/#set-end-points","title":"Set end-points","text":"
    slider.setEndPoints(p0x, p0y, p1x, p1y);\n// slider.setEndPoints(p0, p1); // p0, p1: {x, y}\n// slider.setEndPoints(points); // points: [p0, p1]\n
    "},{"location":"slider/#get-value","title":"Get value","text":"
    var value = slider.value;          // value: between 0 to 1\n// var value = slider.getValue();  // value: between 0 to 1\n// var value = slider.getValue(min, max);  // value: between min to max\n
    "},{"location":"slider/#set-value","title":"Set value","text":"
    slider.value = newValue;       // newValue: between 0 to 1\n// slider.setValue(newValue);  // newValue: between 0 to 1\n// slider.setValue(newValue, min, max);  // newValue: between min to max\n
    slider.addValue(inc);  // inc: between 0 to 1\n// slider.addValue(inc, min, max);  // inc: between min to max\n

    Fires valuechange event if new value is not equal to current value.

    "},{"location":"slider/#events","title":"Events","text":""},{"location":"slider/#drag","title":"Drag","text":""},{"location":"slider/#drag-enable","title":"Drag enable","text":""},{"location":"slider/#is-dragging","title":"Is dragging","text":"
    var isDragging = slider.isDragging;\n
    "},{"location":"snap/","title":"Snap","text":""},{"location":"snap/#introduction","title":"Introduction","text":"

    Snap a value to nearest grid slice, built-in methods of phaser.

    "},{"location":"snap/#usage","title":"Usage","text":""},{"location":"snap/#round","title":"Round","text":"
    var out = Phaser.Math.Snap.To(value, gap);\n// var out = Phaser.Math.Snap.To(value, gap, start);\n

    Example: set gap to 5

    "},{"location":"snap/#ceil","title":"Ceil","text":"
    var out = Phaser.Math.Snap.Ceil(value, gap);\n// var out = Phaser.Math.Snap.Ceil(value, gap, start);\n

    Example: set gap to 5

    "},{"location":"snap/#floor","title":"Floor","text":"
    var out = Phaser.Math.Snap.Floor(value, gap);\n// var out = Phaser.Math.Snap.Floor(value, gap, start);\n

    Example: set gap to 5

    "},{"location":"snapshot/","title":"Snapshot","text":""},{"location":"snapshot/#introduction","title":"Introduction","text":"

    Get snapshot image, built-in methods of phaser.

    "},{"location":"snapshot/#usage","title":"Usage","text":""},{"location":"snapshot/#get-snapshot-image","title":"Get snapshot image","text":"

    Parameters:

    "},{"location":"sprite/","title":"Sprite","text":""},{"location":"sprite/#introduction","title":"Introduction","text":"

    Display of both static and animated images, built-in game object of phaser.

    "},{"location":"sprite/#usage","title":"Usage","text":""},{"location":"sprite/#load-texture","title":"Load texture","text":"

    Texture for static image

    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"sprite/#load-atlas","title":"Load atlas","text":"

    Atlas for animation images

    scene.load.atlas(key, textureURL, atlasURL);\n

    Reference: load atlas

    "},{"location":"sprite/#add-sprite-object","title":"Add sprite object","text":"
    var sprite = scene.add.sprite(x, y, key);\n// var sprite = scene.add.sprite(x, y, key, frame);\n

    Add sprite from JSON

    var sprite = scene.make.sprite({\nx: 0,\ny: 0,\nkey: '',\n// frame: '',\n\n// angle: 0,\n// alpha: 1\n// flipX: true,\n// flipY: true,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n\n// anims: {\n// key: ,\n// repeat: ,\n// ...\n// },\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"sprite/#custom-class","title":"Custom class","text":""},{"location":"sprite/#texture","title":"Texture","text":"

    See game object - texture

    "},{"location":"sprite/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"sprite/#animation","title":"Animation","text":""},{"location":"sprite/#create-animation","title":"Create animation","text":"

    config : See Add animation section.

    "},{"location":"sprite/#create-aseprite-animation","title":"Create Aseprite animation","text":""},{"location":"sprite/#remove-animation","title":"Remove animation","text":""},{"location":"sprite/#get-animation","title":"Get animation","text":""},{"location":"sprite/#has-animation","title":"Has animation","text":""},{"location":"sprite/#play-animation","title":"Play animation","text":""},{"location":"sprite/#chain","title":"Chain","text":""},{"location":"sprite/#stop","title":"Stop","text":""},{"location":"sprite/#restart","title":"Restart","text":"
    sprite.anims.restart();\n// sprite.anims.restart(includeDelay, resetRepeats);\n
    "},{"location":"sprite/#properties","title":"Properties","text":""},{"location":"sprite/#events","title":"Events","text":""},{"location":"statemanager/","title":"State manager","text":""},{"location":"statemanager/#introduction","title":"Introduction","text":"

    Another version of Finite state machine.

    "},{"location":"statemanager/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"statemanager/#install-plugin","title":"Install plugin","text":""},{"location":"statemanager/#load-minify-file","title":"Load minify file","text":""},{"location":"statemanager/#import-plugin","title":"Import plugin","text":""},{"location":"statemanager/#import-class","title":"Import class","text":""},{"location":"statemanager/#create-instance","title":"Create instance","text":"
    var states = scene.plugins.get('rexStateManager').add({\neventEmitter: undefined\n});\n
    "},{"location":"statemanager/#custom-class","title":"Custom class","text":""},{"location":"statemanager/#add-new-state","title":"Add new state","text":"

    states.addState(name, {\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {}\n})\n
    states.addState({\nname: 'A',\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {}\n})\n

    or

    states.addStates({\n'A' : {\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {}\n},\n// ...\n})\n
    states.addStates([\n{\nname: 'A',\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {}\n},\n// ...\n]);\n

    "},{"location":"statemanager/#read-state","title":"Read state","text":""},{"location":"statemanager/#start-at-state","title":"Start at state","text":"

    Set new state without triggering any state-changing callbacks or events.

    state.start(newState);\n
    "},{"location":"statemanager/#next-state","title":"Next state","text":"
    graph TB\n\nnext[\"states.next()\"] --> next_A[\"stateA.next()<br>return 'B'\"]\n\nnext_A --> eventStateChange[\"states.emit('statechange', states)<br>states.prevState -> states.state\"]\n\nsubgraph State changing\n\neventStateChange --> exit_A[\"stateA.exit()\"]\nexit_A --> eventExitA[\"states.emit('exit_A', states)\"]\n\neventExitA --> enter_B[\"stateB.enter()\"]\nenter_B --> eventEnterB[\"states.emit('enter_B', states)\"]\n\nsubgraph Exit\nexit_A\neventExitA\nend\n\nsubgraph Enter\nenter_B\neventEnterB\nend\n\nend\n\ngoto[\"states.goto('B')\"] --> eventStateChange\n\nsubgraph Request\n\nsubgraph Next\nnext\nnext_A\nend\n\nsubgraph Goto\ngoto\nend\n\nend
    "},{"location":"statemanager/#request","title":"Request","text":""},{"location":"statemanager/#state-changing","title":"State-changing","text":"

    These callbacks or events will be triggered if state is changing.

    For example, state is changing from 'A' to 'B'.

    1. event statechange
      states.on('statechange', function(states) {\nconsole.log( states.prevState + '->' + states.state );\n});\n
    2. callback stateA.exit
    3. event exit_A
      states.on('exit_A', function(states) {\n/*...*/\n});\n
    4. callback stateB.enter
    5. event enter_B
      states.on('enter_B', function(states) {\n/*...*/\n});\n
    "},{"location":"statemanager/#enable","title":"Enable","text":"
    states.setEnable();\n// states.setEnable(false); // disable\n

    or

    states.toggleEnable();\n

    states.next() and states.goto() will be ignored if disabled.

    "},{"location":"statemanager/#update","title":"Update","text":""},{"location":"statemanager/#remove-state","title":"Remove state","text":""},{"location":"step/","title":"Step","text":""},{"location":"step/#introduction","title":"Introduction","text":"

    Interpolate points between previous position and current position with fixed step length.

    "},{"location":"step/#live-demos","title":"Live demos","text":""},{"location":"step/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"step/#install-plugin","title":"Install plugin","text":""},{"location":"step/#load-minify-file","title":"Load minify file","text":""},{"location":"step/#import-plugin","title":"Import plugin","text":""},{"location":"step/#import-class","title":"Import class","text":""},{"location":"step/#create-instance","title":"Create instance","text":"
    var step = scene.plugins.get('rexStep').add(gameObject, {\n// enable: true,\n// stepLength: 5,    \n});\n
    "},{"location":"step/#enable","title":"Enable","text":""},{"location":"step/#set-step-length","title":"Set step length","text":"
    step.setStepLength(stepLength);\n// step.stepLength = stepLength;\n
    "},{"location":"step/#events","title":"Events","text":""},{"location":"structs-list/","title":"List","text":""},{"location":"structs-list/#introduction","title":"Introduction","text":"

    An ordered list, built-in data structure of phaser.

    "},{"location":"structs-list/#usage","title":"Usage","text":""},{"location":"structs-list/#create-instance","title":"Create instance","text":"
    var list = new Phaser.Structs.List();\n
    "},{"location":"structs-list/#add-child","title":"Add child","text":"
    list.add(child);\n
    list.addAt(child, index);\n
    "},{"location":"structs-list/#exist","title":"Exist","text":"
    var hasChild = list.exists(child);\n
    "},{"location":"structs-list/#get-child","title":"Get child","text":"
    var firstChild = list.first;\nvar nextChild = list.next;\nvar prevChild = list.previous;\nvar lastChild = list.last;\n
    var child = list.getByName(name);\n
    var child = list.getRandom(startIndex, length);\n
    var child = list.getFirst(property, value, startIndex, endIndex);\n// value: the value to test the property against. Must pass a strict (`===`) comparison check.\n
    var child = list.getAll(property, value, startIndex, endIndex);\n// value: the value to test the property against. Must pass a strict (`===`) comparison check.\n
    var child = list.count(property, value);\n// value: the value to test the property against. Must pass a strict (`===`) comparison check.\n
    "},{"location":"structs-list/#get-children","title":"Get children","text":"
    var children = list.list;\n
    "},{"location":"structs-list/#sort-children","title":"Sort children","text":""},{"location":"structs-list/#remove-child","title":"Remove child","text":"
    list.remove(child);\n
    list.removeAt(index);\n
    list.removeBetween(startIndex, endIndex);\n
    list.removeAll();\n
    "},{"location":"structs-list/#order-of-child","title":"Order of child","text":"
    list.moveTo(child, index);\n
    list.bringToTop(child);\n
    list.sendToBack(child);\n
    list.moveUp(child);\n
    list.moveDown(child);\n
    list.moveAbove(child1, child2);  // Move child1 above child2\n
    list.moveBelow(child1, child2);  // Move child1 below child2\n
    list.swap(child1, child2);\n
    list.reverse();\n
    list.shuffle();\n
    "},{"location":"structs-list/#replace-child","title":"Replace child","text":"
    list.replace(oldChild, newChild);\n
    "},{"location":"structs-list/#set-properties","title":"Set properties","text":"
    list.setAll(property, value, startIndex, endIndex);\n
    "},{"location":"structs-list/#for-each-child","title":"For each child","text":""},{"location":"structs-list/#children-counts","title":"Children counts","text":"
    var size = list.length;\n
    "},{"location":"structs-set/","title":"Set","text":""},{"location":"structs-set/#introduction","title":"Introduction","text":"

    A collection of unique elements, built-in data structure of phaser.

    "},{"location":"structs-set/#usage","title":"Usage","text":""},{"location":"structs-set/#create-instance","title":"Create instance","text":"
    var set = new Phaser.Structs.Set();\n

    or

    var set = new Phaser.Structs.Set(elements);\n
    "},{"location":"structs-set/#add-an-element","title":"Add an element","text":"
    set.set(element);\n
    "},{"location":"structs-set/#remove-an-element","title":"Remove an element","text":"
    set.delete(element);\n
    "},{"location":"structs-set/#remove-all-elements","title":"Remove all elements","text":"
    set.clear();\n
    "},{"location":"structs-set/#has-element","title":"Has element","text":"
    set.contains(element);\n
    "},{"location":"structs-set/#get-elements","title":"Get elements","text":"
    var elements = set.entries;\n

    or get a shallow copy of elements

    var elements = set.getArray();\n
    "},{"location":"structs-set/#element-counts","title":"Element counts","text":"
    var size = set.size;\n
    "},{"location":"structs-set/#for-each-element","title":"For each element","text":""},{"location":"structs-set/#set-operations","title":"Set operations","text":""},{"location":"tagplayer/","title":"Tag player","text":""},{"location":"tagplayer/#introduction","title":"Introduction","text":"

    Text commands to control sprites, texts, sound effect or backgroun music.

    "},{"location":"tagplayer/#live-demos","title":"Live demos","text":""},{"location":"tagplayer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"tagplayer/#install-plugin","title":"Install plugin","text":""},{"location":"tagplayer/#load-minify-file","title":"Load minify file","text":""},{"location":"tagplayer/#import-plugin","title":"Import plugin","text":""},{"location":"tagplayer/#import-class","title":"Import class","text":""},{"location":"tagplayer/#create-instance","title":"Create instance","text":"
    var tagPlayer = scene.plugins.get('rexTagPlayerPlugin').add(scene, {\nparser: {\ndelimiters: '[]',\ncomment: '//',\n// translateTagNameCallback: undefined,\n}\n\nsprites: {\n// createGameObject: 'sprite',\n// fade: 500,  \n// fade: {mode: 'tint', time: 500},\n// viewportCoordinate: false,\n// symbols: undefined,  // { key:value }\n}, // sprites: false,\n\ntexts: {\n// createGameObject: undefined,        \n// fade: 500,\n// fade: {mode: 'tint', time: 500},\n// viewportCoordinate: false,\n// symbols: undefined,  // { key:value }\n}\n// texts: false,\n\nsounds: {\nbgm: {\ninitial: undefinied,\nloop: true,\nfade: 500\n},\nbgm2: {\ninitial: undefinied,\nloop: true,\nfade: 500\n}\n},\n\nclickTarget: scene,\n});\n
    "},{"location":"tagplayer/#custom-class","title":"Custom class","text":""},{"location":"tagplayer/#game-object-manager","title":"Game object manager","text":"
    tagPlayer.addGameObjectManager({\nname: goType,\ncreateGameObject: function(scene, ...) {\nreturn gameObject\n},\n\n// fade: 500,\n// fade: {mode: 'tint', time: 500},\n\n// viewportCoordinate: false,\n// viewportCoordinate: { viewport: new Phaser.Geom.Rectangle() },\n\n// symbols: undefined,  // { key:value },\n})\n
    "},{"location":"tagplayer/#built-in-commands","title":"Built-in commands","text":"

    goType : name parameter in config of tagPlayer.addGameObjectManager method

    "},{"location":"tagplayer/#execute-commands","title":"Execute commands","text":"
    tagPlayer.play(commands);\n

    or

    tagPlayer.playPromise(commands)\n.then(function(){\n// Typing content complete\n})\n
    "},{"location":"tagplayer/#pause","title":"Pause","text":"

    Invoke this method during tag-start,tag-end, or content events to suspend parsing.

    "},{"location":"tagplayer/#resume","title":"Resume","text":"
    tagPlayer.resume();\n
    "},{"location":"tagplayer/#time-scale","title":"Time scale","text":"

    Time scale of typing, typing animation, sprite animation and easing of sprite's properties.

    "},{"location":"tagplayer/#events","title":"Events","text":""},{"location":"tagplayer/#tags-of-content","title":"Tags of content","text":""},{"location":"tagplayer/#sprite","title":"Sprite","text":""},{"location":"tagplayer/#text","title":"Text","text":""},{"location":"tagplayer/#sound-effect","title":"Sound effect","text":""},{"location":"tagplayer/#background-music","title":"Background music","text":""},{"location":"tagplayer/#camera","title":"Camera","text":""},{"location":"tagplayer/#wait-conditions","title":"Wait conditions","text":""},{"location":"tagplayer/#custom-tag","title":"Custom tag","text":"

    Assume that adding a custom tag : [custom=10,20][/custom]

    "},{"location":"tagplayer/#content","title":"Content","text":"

    These lines will be skipped :

    New line symbol '\\n' will be removed, use \\\\n to insert a new line character.

    Content will pass to one of these callback/event

    1. Set content callback
      tagPlayer.setContentCallback(callback, scope);\n
    2. On parse/execute a content, after a [custom] tag.
      tagPlayer.on('custom#content', function(content) {   })\n
    3. On parse/execute a content, after any tag.
      tagPlayer.on('content', function(content) {   })\n
    "},{"location":"tagplayer/#game-objects","title":"Game objects","text":""},{"location":"tagplayer/#data","title":"Data","text":"

    See data manager

    Note

    Ensure data manager is created before binding any data-changed events.

    "},{"location":"tagtext/","title":"Tag Text","text":""},{"location":"tagtext/#introduction","title":"Introduction","text":"

    Displays text with multi-color, font face, or font size with tags.

    "},{"location":"tagtext/#live-demos","title":"Live demos","text":""},{"location":"tagtext/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"tagtext/#install-plugin","title":"Install plugin","text":""},{"location":"tagtext/#load-minify-file","title":"Load minify file","text":""},{"location":"tagtext/#import-plugin","title":"Import plugin","text":""},{"location":"tagtext/#import-class","title":"Import class","text":""},{"location":"tagtext/#add-text-object","title":"Add text object","text":"
    var tags = {\ntag0: {\ncolor: 'red'\n},\ntag1: {\ncolor: 'blue'\n}\n};\nvar txt = scene.add.rexTagText(x, y, '<class=\"tag0\">h</class>ello', {tags:tags});\n// var txt = scene.add.rexTagText(x, y, '<class=\"tag0\">h</class>ello', { fontFamily: 'Arial', fontSize: 64, color: '#00ff00', tags:tags });\n

    Default style

    {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\nbackgroundColor2: null,\nbackgroundHorizontalGradient: true,\nbackgroundStrokeColor: null,\nbackgroundStrokeLineWidth: 2,\n\nbackgroundCornerRadius: 0,\n// 0   : no round corner, \n// > 0 : convex round corner\n// < 0 : concave round corner\n\nbackgroundCornerIteration: null, color: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},\nunderline: {\ncolor: '#000',\nthickness: 0,\noffset: 0\n},\nstrikethrough: {\ncolor: '#000',\nthickness: 0,\noffset: 0\n},    // align: 'left',  // Equal to halign\nhalign: 'left', // 'left'|'center'|'right'\nvalign: 'top',  // 'top'|'center'|'bottom'\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\nmaxLines: 0,\nlineSpacing: 0,\nfixedWidth: 0,\nfixedHeight: 0,\nlineSpacing: 0,\ntestString: '|M\u00c9qgy',\nwrap: {\nmode: 'none'     // 0|'none'|1|'word'|2|'char'|'character'\nwidth: null\n},\n// rtl: false,\nmetrics: false,\n// metrics: {\n//     ascent: 0,\n//     descent: 0,\n//     fontSize: 0\n// },\n\n// images: {\n//    key: { y:-8 }\n// }\n\ntags: {\n//tag0: {\n//  color: 'red'\n//},\n//tag1: {\n//  color: 'blue'\n//}\n}\n}\n
    var txt = scene.add.rexTagText({\nx: 0,\ny: 0,\ntext: '',\nstyle: {\nfontSize: '64px',\nfontFamily: 'Arial',\ncolor: '#ffffff',\nalign: 'center',\nbackgroundColor: '#ff00ff',\ntags: {}\n}\n})\n

    or

    var txt = scene.make.rexTagText({\nx: 100,\ny: 100,\npadding: {\nleft: 64,\nright: 16,\ntop: 20,\nbottom: 40\n//x: 32,    // 32px padding on the left/right\n//y: 16     // 16px padding on the top/bottom\n},\ntext: 'Text\\nGame Object\\nCreated from config',\nstyle: {\nfontSize: '64px',\nfontFamily: 'Arial',\ncolor: '#ffffff',\nalign: 'center',\nbackgroundColor: '#ff00ff',\ntags: {}\n},\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"tagtext/#properties-of-tag","title":"Properties of tag","text":"
    {\nfontFamily: 'Courier',   // or 'family', 'font-family'\nfontSize: '16px',        // or 'size', 'font-size'\nfontStyle: 'bold italic',// or 'style', 'font-style'\ncolor: 'red',            // or 'font-color'\nstroke: {\ncolor: 'blue',\nthickness: 1\n},\nshadow: {\ncolor: 'black',\noffsetX: 2,\noffsetY: 2,\nblur: 2\n},\nunderline: {            // or 'u'\ncolor: 'blue',\nthickness: 3,\noffset: -1\n},\nstrikethrough: {        // or 's'\ncolor: 'red',\nthickness: 3,\noffset: -1\n},    y: 0,\nimg: textureKey,\narea: areaKey,\n}\n
    "},{"location":"tagtext/#custom-class","title":"Custom class","text":""},{"location":"tagtext/#add-tag","title":"Add tag","text":""},{"location":"tagtext/#wrap","title":"Wrap","text":""},{"location":"tagtext/#content","title":"Content","text":""},{"location":"tagtext/#set-style","title":"Set style","text":"
    txt.setStyle(style);\ntxt.setFont(font);  // font: {fontFamily, fontSize, fontStyle}\ntxt.setFontFamily(family);\ntxt.setFontSize(size);\ntxt.setFontStyle(style);\n
    "},{"location":"tagtext/#color","title":"Color","text":""},{"location":"tagtext/#image","title":"Image","text":""},{"location":"tagtext/#hit-area-of-words","title":"Hit area of words","text":""},{"location":"tagtext/#hitting-events","title":"Hitting events","text":""},{"location":"tagtext/#draw-hit-areas","title":"Draw hit-areas","text":"
    txt.drawAreaBounds(graphics, color);\n
    "},{"location":"tagtext/#line-spacing","title":"Line spacing","text":"

    This value is added to the height of the font when calculating the overall line height.

    "},{"location":"tagtext/#padding","title":"Padding","text":""},{"location":"tagtext/#max-lines","title":"Max lines","text":""},{"location":"tagtext/#fixed-size","title":"Fixed size","text":""},{"location":"tagtext/#left-margin-of-text","title":"Left margin of text","text":"
    var leftMargin = txt.measureTextMargins(testString).left;\n
    "},{"location":"tagtext/#shift-start-position-of-text","title":"Shift start position of text","text":"
    txt.setXOffset(value);\n
    "},{"location":"tagtext/#resolution","title":"Resolution","text":""},{"location":"tagtext/#inline-style","title":"Inline style","text":"

    Define style inline text.

    Or mix them

    "},{"location":"tagtext/#test-string","title":"Test string","text":"

    Set the test string to use when measuring the font.

    txt.setTestString(text);\n
    "},{"location":"tagtext/#save-texture","title":"Save texture","text":"
    txt.generateTexture(key);\n// txt.generateTexture(key, x, y, width, height);\n
    "},{"location":"tagtext/#rtl","title":"RTL","text":""},{"location":"tcrp-player/","title":"Player","text":""},{"location":"tcrp-player/#introduction","title":"Introduction","text":"

    Player of T ime-C ommand-R ecorder-P layer, to run commands on time.

    "},{"location":"tcrp-player/#live-demos","title":"Live demos","text":""},{"location":"tcrp-player/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"tcrp-player/#install-plugin","title":"Install plugin","text":""},{"location":"tcrp-player/#load-minify-file","title":"Load minify file","text":""},{"location":"tcrp-player/#import-plugin","title":"Import plugin","text":""},{"location":"tcrp-player/#import-class","title":"Import class","text":""},{"location":"tcrp-player/#create-instance","title":"Create instance","text":"
    var player = scene.plugins.get('rexTCRP').addPlayer(scene, {\n// timeUnit: 0,        // 'ms'|0|'s'|'sec'|1\n// dtMode: 0,          // 'abs'|'absolute'|0|'inc'|'increment'|1\n// commands: [],       // [[time, command], [time, command], ...]\n// timeScale: 1,\n// scope: undefined\n});\n
    "},{"location":"tcrp-player/#load-commands","title":"Load commands","text":"
    player.load(commands, scope, {\n// timeUnit: 0,        // 'ms'|0|'s'|'sec'|1\n// dtMode: 0           // 'abs'|'absolute'|0|'inc'|'increment'|1\n});\n
    "},{"location":"tcrp-player/#start-playing","title":"Start playing","text":"
    player.start();\n// player.start(startAt);  // Start-at time in ms\n
    "},{"location":"tcrp-player/#events","title":"Events","text":""},{"location":"tcrp-player/#pause-resume-stop-playing","title":"Pause, Resume, stop playing","text":"
    player.pause();\nplayer.resume();\nplayer.stop();\n
    "},{"location":"tcrp-player/#seek-elapsed-time","title":"Seek elapsed time","text":"
    player.seek(time);   // Elapsed time in ms\n
    "},{"location":"tcrp-player/#seek-to-next-command","title":"Seek to next command","text":"
    player.seekToNext();\n

    Seek to time of next command.

    "},{"location":"tcrp-player/#state-of-player","title":"State of player","text":"
    var isPlaying = player.isPlaying;\nvar completed = player.completed;\nvar now = player.now;\n
    "},{"location":"tcrp-player/#time-scale","title":"Time-scale","text":""},{"location":"tcrp-recoder/","title":"Recoder","text":""},{"location":"tcrp-recoder/#introduction","title":"Introduction","text":"

    Recorder of T ime-C ommand-R ecorder-P layer, to store commands with time.

    "},{"location":"tcrp-recoder/#live-demos","title":"Live demos","text":""},{"location":"tcrp-recoder/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"tcrp-recoder/#install-plugin","title":"Install plugin","text":""},{"location":"tcrp-recoder/#load-minify-file","title":"Load minify file","text":""},{"location":"tcrp-recoder/#import-plugin","title":"Import plugin","text":""},{"location":"tcrp-recoder/#import-class","title":"Import class","text":""},{"location":"tcrp-recoder/#create-instance","title":"Create instance","text":"
    var recorder = scene.plugins.get('rexTCRP').addRecorder(scene);\n

    or

    var recorder = scene.plugins.get('rexTCRP').addRecorder(gameObject);\n
    "},{"location":"tcrp-recoder/#start-recording","title":"Start recording","text":"
    recorder.start();\n// recorder.start(startAt);  // start-at time in ms\n
    "},{"location":"tcrp-recoder/#push-commands","title":"Push commands","text":"
    recorder.addCommand([fnName, param0, param1, ...]);\n// recorder.addCommand([command0, command1, ...]);\n// recorder.addCommand([fnName, param0, param1, ...], offset);  // time-offset in ms\n

    See also Run commands

    "},{"location":"tcrp-recoder/#get-commands","title":"Get commands","text":"
    var commands = recorder.getCommands();        // Get a shallow copy of commands\n// var commands = recorder.getCommands(true); // Get reference of commands\n

    Format of return commands:

    [\n[time, [command]],\n[time, [command0,command1]],\n...\n]\n
    "},{"location":"tcrp-recoder/#clear-commands","title":"Clear commands","text":"
    recorder.clear();\n
    "},{"location":"tcrp-recoder/#pause-resume-stop-recording","title":"Pause, Resume, stop recording","text":"
    recorder.pause();\nrecorder.resume();\nrecorder.stop();\n
    "},{"location":"tcrp-recoder/#seek-elapsed-time","title":"Seek elapsed time","text":"
    recorder.seek(time);   // elapsed time in ms\n
    "},{"location":"tcrp-recoder/#state-of-recorder","title":"State of recorder","text":"
    var isRecording = recorder.isRecording;\nvar now = recorder.now;\n
    "},{"location":"tcrp-recoder/#time-scale","title":"Time-scale","text":""},{"location":"tcrp-recoder/#events","title":"Events","text":""},{"location":"text/","title":"Text","text":""},{"location":"text/#introduction","title":"Introduction","text":"

    Drawing text on canvas, built-in game object of phaser.

    "},{"location":"text/#usage","title":"Usage","text":""},{"location":"text/#add-text-object","title":"Add text object","text":"
    var txt = scene.add.text(x, y, 'hello');\n// var txt = scene.add.text(x, y, 'hello', { fontFamily: 'Arial', fontSize: 64, color: '#00ff00' });\n

    Default style

    {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},\nalign: 'left',  // 'left'|'center'|'right'|'justify'\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\nmaxLines: 0,\nlineSpacing: 0,\nfixedWidth: 0,\nfixedHeight: 0,\nrtl: false,\ntestString: '|M\u00c9qgy',\nwordWrap: {\nwidth: null,\ncallback: null,\ncallbackScope: null,\nuseAdvancedWrap: false\n},\nmetrics: false,\n// metrics: {\n//     ascent: 0,\n//     descent: 0,\n//     fontSize: 0\n// },\n}\n

    Add text from JSON

    var txt = scene.make.text({\nx: 100,\ny: 100,\npadding: {\nleft: 64,\nright: 16,\ntop: 20,\nbottom: 40\n//x: 32,    // 32px padding on the left/right\n//y: 16     // 16px padding on the top/bottom\n},\ntext: 'Text\\nGame Object\\nCreated from config',\nstyle: {\nfontSize: '64px',\nfontFamily: 'Arial',\ncolor: '#ffffff',\nalign: 'center',  // 'left'|'center'|'right'|'justify'\nbackgroundColor: '#ff00ff'\n},\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"text/#custom-class","title":"Custom class","text":""},{"location":"text/#word-wrap","title":"Word wrap","text":""},{"location":"text/#content","title":"Content","text":""},{"location":"text/#set-style","title":"Set style","text":"
    txt.setStyle(style);\ntxt.setFont(font);\ntxt.setFontFamily(family);\ntxt.setFontSize(size);\ntxt.setFontStyle(style);\n
    "},{"location":"text/#set-align","title":"Set align","text":"
    txt.setAlign(align);\n
    "},{"location":"text/#color","title":"Color","text":""},{"location":"text/#line-spacing","title":"Line spacing","text":"

    This value is added to the height of the font when calculating the overall line height.

    "},{"location":"text/#padding","title":"Padding","text":""},{"location":"text/#max-lines","title":"Max lines","text":""},{"location":"text/#fixed-size","title":"Fixed size","text":""},{"location":"text/#test-string","title":"Test string","text":"

    Set the test string to use when measuring the font.

    txt.style.setTestString(text);\n
    "},{"location":"textedit/","title":"Edit","text":""},{"location":"textedit/#introduction","title":"Introduction","text":"

    Create an input text object above a text object to edit string content.

    "},{"location":"textedit/#live-demos","title":"Live demos","text":""},{"location":"textedit/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"textedit/#install-plugin","title":"Install plugin","text":""},{"location":"textedit/#load-minify-file","title":"Load minify file","text":""},{"location":"textedit/#import-plugin","title":"Import plugin","text":""},{"location":"textedit/#import-class","title":"Import class","text":""},{"location":"textedit/#open-text-editor","title":"Open text editor","text":"

    Open editor directly.

    var editor = scene.plugins.get('rexTextEdit').edit(textObject, {\n// inputType: 'text',   // 'text'|'password'|'textarea'|...\n// type: 'text',    // 'text'|'password'|'textarea'|...\n\n// enterClose: true,\n// selectAll: false,\n\n// onOpen: undefined,\n// onTextChanged: undefined,\n// onClose: undefined,\n\n// text: '',\n});\n// var editor = scene.plugins.get('rexTextEdit').edit(textObject, config, onClose);\n

    Create a text editor (input element) above text object.

    Limitation of text game object

    Don't assign height property of text game object. Because that text input element does not have vertical align setting, text will always align to middle/center.

    "},{"location":"textedit/#create-instance","title":"Create instance","text":"

    Add text-edit behavior, will open editor under 'pointerdown' event.

    var editor = scene.plugins.get('rexTextEdit').add(textGameObject, {\n// type: 'text',   //'text','password','number'\n// enterClose: true,\n// selectAll: false,\n\n// onOpen: undefined,\n// onTextChanged: undefined,\n// onClose: undefined,\n\n// text: '',\n});\n
    "},{"location":"textedit/#open-editor","title":"Open editor","text":"
    editor.open(config);\n// editor.open(config, onClose);\n

    Create a text editor (input element) above text object.

    "},{"location":"textedit/#is-opened","title":"Is opened","text":"
    var isOpened = editor.isOpened;\n
    "},{"location":"textedit/#close-editor","title":"Close editor","text":"
    editor.close();\n

    Text editor will be closed when

    "},{"location":"textedit/#get-dom","title":"Get DOM","text":"
    var inputText = editor.inputText.node;\n
    "},{"location":"textedit/#bypass-key-input","title":"Bypass key input","text":"

    See InputText/Bypass key input

    "},{"location":"textedit/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"

    See dom-element's Interactive with other game objects

    "},{"location":"textpage/","title":"Page","text":""},{"location":"textpage/#introduction","title":"Introduction","text":"

    Display text page by page on text object, bbcode text object, or tag text object.

    "},{"location":"textpage/#live-demos","title":"Live demos","text":""},{"location":"textpage/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"textpage/#install-plugin","title":"Install plugin","text":""},{"location":"textpage/#load-minify-file","title":"Load minify file","text":""},{"location":"textpage/#import-plugin","title":"Import plugin","text":""},{"location":"textpage/#import-class","title":"Import class","text":""},{"location":"textpage/#create-instance","title":"Create instance","text":"
    var page = scene.plugins.get('rexTextPage').add(textGameObject, {\n// text: '',              // content in string or array\n// maxLines: undefined,\n// pageBreak: '\\f\\n',\n});\n
    "},{"location":"textpage/#set-content","title":"Set content","text":""},{"location":"textpage/#show-page","title":"Show page","text":"

    Note

    Initial page index is -1, so user could call page.showNextPage() to display first page.

    "},{"location":"textpage/#get-lines-of-page","title":"Get lines of page","text":""},{"location":"textpage/#other-properties","title":"Other properties","text":""},{"location":"textplayer/","title":"Text player","text":""},{"location":"textplayer/#introduction","title":"Introduction","text":"

    Typing characters on dynamic text, waiting click or key enter, play sound effect or backgroun music.

    "},{"location":"textplayer/#live-demos","title":"Live demos","text":""},{"location":"textplayer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"textplayer/#install-plugin","title":"Install plugin","text":""},{"location":"textplayer/#load-minify-file","title":"Load minify file","text":""},{"location":"textplayer/#import-plugin","title":"Import plugin","text":""},{"location":"textplayer/#import-class","title":"Import class","text":""},{"location":"textplayer/#create-instance","title":"Create instance","text":"
    var txt = scene.add.rexTextPlayer({\nx: 0, y: 0,\nwidth: undefined, height: undefined,\n\npadding: 0,  // {left: 0, right: 0, top: 0, bottom: 0}\n\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null\n},\n\ninnerBounds: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\noffsetX: 0,\noffsetY: 0,\nleftSpace: 0,\nrightSpace: 0,\n},\n\nparser: {\ndelimiters: '[]',\ncomment: '//',\n// translateTagNameCallback: undefined,\n}\n\nwrap: {\ncallback: undefined, // Default wrapping callback is dynamicText.runWordWrap()\nlineHeight:\n// maxLines: \npadding: { top: 0, left: 0, right: 0, bottom: 0 },\nletterSpacing: 0,\nhAlign: 0, // 0|'left'|1|'center'|2|'right'\nvAlign: 0, // 0|'top'|1|'center'|2|'bottom'\ncharWrap: false\n},\n\ntyping: {\nspeed: 250,\nonTypingStart: function (children) {\nfor (var i = 0, cnt = children.length; i < cnt; i++) {\nchildren[i].setVisible(false);\n}\n},  // Default: set all children invisible\nanimation: undefined,  // Default: no typing animation, only invoke onStart callback\nanimation: {\nduration: 1000,\nyoyo: false,\nonStart: function(child) {\nchild.setVisible();\n},\nonProgress: function(child, t) {\n\n},\nonComplete: function(child) {\n\n}\n},\n\n// skipSpace: false,\n\n// minSizeEnable: false,\n\nfadeOutPage: undefined,  // Default: no fade-out-page animation\nfadeOutPage: function(children) {\nreturn eventEmitter;\nreturn promise;\n},\n\n},\n\nimages: {\n// key: {width, height}\n// key: {key, frame, width, height}\n},\n\nsprites: {\n// createCallback: 'sprite',\n// createCallback: function(scene, ...) { return gameObject; },\n\n// fade: 500,\n// fade: {mode: 'tint', time: 500},\n\n// viewportCoordinate: false,\n// viewportCoordinate: { viewport: new Phaser.Geom.Rectangle() },\n\n}, sounds: {\nbgm: {\ninitial: undefinied,\nloop: true,\nfade: 500\n},\nbgm2: {\ninitial: undefinied,\nloop: true,\nfade: 500\n}\n},\n\nclickTarget: this,  // This text player    \nnextPageInput: null,\n// ignoreNextPageInput: false,\n\ntext: undefined\n});\n

    or

    var txt = scene.add.rexTextPlayer(x, y, width, height, config);\n

    or

    var txt = scene.add.rexTextPlayer(x, y, config);\n

    Add textplayer from JSON

    var txt = scene.make.rexTextPlayer({\nx: 0,\ny: 0,\n\n// origin: {x: 0.5, y: 0.5},\n// fill: null,\n\nadd: true\n});\n
    "},{"location":"textplayer/#custom-class","title":"Custom class","text":""},{"location":"textplayer/#game-object-manager","title":"Game object manager","text":"
    txt.addGameObjectManager({\nname: goType,\ncreateGameObject: function(scene, ...) {\nreturn gameObject\n},\n\n// fade: 500,\n// fade: {mode: 'tint', time: 500},\n\n// viewportCoordinate: false,\n// viewportCoordinate: { viewport: new Phaser.Geom.Rectangle() }\n\n// symbols: undefined,  // { key:value },\n})\n
    "},{"location":"textplayer/#built-in-commands","title":"Built-in commands","text":"

    goType : name parameter in config of txt.addGameObjectManager method

    "},{"location":"textplayer/#typing-content","title":"Typing content","text":"
    txt.play(content);\n

    or

    txt.playPromise(content)\n.then(function(){\n// Typing content complete\n})\n
    "},{"location":"textplayer/#show-current-page","title":"Show current page","text":"
    txt.showPage();\n
    "},{"location":"textplayer/#typing-next-page","title":"Typing next page","text":"
    txt.typingNextPage();\n
    "},{"location":"textplayer/#ignore-next-page-input","title":"Ignore next page input","text":""},{"location":"textplayer/#pause","title":"Pause","text":""},{"location":"textplayer/#resume","title":"Resume","text":""},{"location":"textplayer/#typing-speed","title":"Typing speed","text":""},{"location":"textplayer/#time-scale","title":"Time scale","text":"

    Time scale of typing, typing animation, sprite animation and easing of sprite's properties.

    "},{"location":"textplayer/#status","title":"Status","text":""},{"location":"textplayer/#events","title":"Events","text":""},{"location":"textplayer/#tags-of-content","title":"Tags of content","text":""},{"location":"textplayer/#content","title":"Content","text":"

    These lines will be skipped :

    New line symbol '\\n' will be removed, use [r] to insert a new line character.

    "},{"location":"textplayer/#content-output-switch","title":"Content output switch","text":""},{"location":"textplayer/#content-output-enable","title":"Content output enable","text":""},{"location":"textplayer/#text-style","title":"Text style","text":""},{"location":"textplayer/#new-line","title":"New line","text":""},{"location":"textplayer/#page-break","title":"Page break","text":""},{"location":"textplayer/#image","title":"Image","text":"

    [img=key]

    "},{"location":"textplayer/#render-size","title":"Render size","text":""},{"location":"textplayer/#space","title":"Space","text":"

    [space=width]

    "},{"location":"textplayer/#typing-speed_1","title":"Typing speed","text":""},{"location":"textplayer/#sprite","title":"Sprite","text":""},{"location":"textplayer/#sound-effect","title":"Sound effect","text":""},{"location":"textplayer/#background-music","title":"Background music","text":""},{"location":"textplayer/#camera","title":"Camera","text":""},{"location":"textplayer/#wait-conditions","title":"Wait conditions","text":""},{"location":"textplayer/#custom-tag","title":"Custom tag","text":"

    Assume that adding a custom tag : [custom=10,20][/custom]

    "},{"location":"textplayer/#size","title":"Size","text":""},{"location":"texttranslation/","title":"Translation","text":""},{"location":"texttranslation/#introduction","title":"Introduction","text":"

    Apply translated string (i18next) to text object, bbcode text object, tag text object, bitmap text object, or label game object

    "},{"location":"texttranslation/#live-demos","title":"Live demos","text":""},{"location":"texttranslation/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"texttranslation/#install-plugin","title":"Install plugin","text":""},{"location":"texttranslation/#load-minify-file","title":"Load minify file","text":""},{"location":"texttranslation/#import-plugin","title":"Import plugin","text":""},{"location":"texttranslation/#import-class","title":"Import class","text":""},{"location":"texttranslation/#initialize-i18next","title":"Initialize i18next","text":"
    scene.plugins.get('rexTextTranslation').initI18Next(scene, {\nlng: 'dev',\nns: 'translation',\n\n// resources: {\n//     'dev': {\n//         'translation': {\n//             key: value,  \n//         }\n//     }\n// }\n\n// debug: true,\n\n// backend: {\n//     loadPath: '',\n//     parse: function(data) { return JSON.parse(data); }\n// },\n})\n

    or

    i18next\n.use(Backend)\n.init(config, onComplete);\n

    See also Configuration Options, and Backend Options

    "},{"location":"texttranslation/#create-instance","title":"Create instance","text":"
    var translation = scene.plugins.get('rexTextTranslation').add(textGameObject, {\n// translationKey: '',\n// interpolation: {},\n\n// updateText: true,\n\n// setText: function(gameObject, text) { \n//     gameObject.setText(text); \n// }\n});\n
    "},{"location":"texttranslation/#set-translation-key","title":"Set translation key","text":"
    translation\n.setTranslationKey(key)\n.updateText()\n
    "},{"location":"texttranslation/#set-interpolation","title":"Set interpolation","text":""},{"location":"texttranslation/#update-text","title":"Update text","text":"

    Update text object via translationKey, and interpolation.

    translation.updateText()\n
    "},{"location":"texttranslation/#change-language","title":"Change language","text":"
    scene.plugins.get('rexTextTranslation').changeLanguage(language);\n// scene.plugins.get('rexTextTranslation').changeLanguage(language, onComplete);\n

    or

    i18next.changeLanguage(language, onComplete);\n

    All translation behavior will update text object after changing language.

    "},{"location":"texttranslation/#set-default-namespace","title":"Set default namespace","text":"
    scene.plugins.get('rexTextTranslation').setDefaultNamespace(namespace);\n

    or

    i18next.setDefaultNamespace(namespace);\n
    "},{"location":"texttranslation/#translate-string","title":"Translate string","text":"
    var result = scene.plugins.get('rexTextTranslation').t(translationKey, interpolation);\n

    or

    var result = i18next.t(translationKey, interpolation);\n
    "},{"location":"texttranslation/#events","title":"Events","text":""},{"location":"texttyping/","title":"Typing","text":""},{"location":"texttyping/#introduction","title":"Introduction","text":"

    Typing text on text object, bbcode text object, or tag text object.

    "},{"location":"texttyping/#live-demos","title":"Live demos","text":""},{"location":"texttyping/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"texttyping/#install-plugin","title":"Install plugin","text":""},{"location":"texttyping/#load-minify-file","title":"Load minify file","text":""},{"location":"texttyping/#import-plugin","title":"Import plugin","text":""},{"location":"texttyping/#import-class","title":"Import class","text":""},{"location":"texttyping/#create-instance","title":"Create instance","text":"
    var typing = scene.plugins.get('rexTextTyping').add(textGameObject, {\n// wrap: false,\n// speed: 333,       // typing speed in ms\n// typeMode: 0,      //0|'left-to-right'|1|'right-to-left'|2|'middle-to-sides'|3|'sides-to-middle'\n// setTextCallback: function(text, isLastChar, insertIdx){ return text; }  // callback before set-text\n// setTextCallbackScope: null,   \n});\n
    "},{"location":"texttyping/#start-typing","title":"Start typing","text":"
    typing.start(text);\n// typing.start(text, speed); \n
    "},{"location":"texttyping/#typing-more-text","title":"Typing more text","text":"
    typing.appendText(text);\n
    "},{"location":"texttyping/#stop-typing","title":"Stop typing","text":"
    typing.stop();\n// typing.stop(true);;  // stop and show all text\n
    "},{"location":"texttyping/#pauseresume-typing","title":"Pause/Resume typing","text":""},{"location":"texttyping/#set-typing-speed","title":"Set typing speed","text":"
    typing.setTypingSpeed(speed);  // speed in ms\n// typing.speed = speed;\n

    Set speed in typing event or setTextCallback to change typing speed of remaining text.

    "},{"location":"texttyping/#set-typing-mode","title":"Set typing mode","text":"
    typing.setTypeMode(mode);\n
    "},{"location":"texttyping/#events","title":"Events","text":""},{"location":"texttyping/#status","title":"Status","text":""},{"location":"textures/","title":"Textures","text":""},{"location":"textures/#introduction","title":"Introduction","text":"

    Textures cache, built-in object of phaser.

    "},{"location":"textures/#usage","title":"Usage","text":""},{"location":"textures/#image-texture","title":"Image texture","text":""},{"location":"textures/#get-pixel","title":"Get pixel","text":"
    var color = scene.textures.getPixel(x, y, key);\n// var color = scene.textures.getPixel(x, y, key, frame);\n

    Properties of color

    var alpha = scene.textures.getPixelAlpha(x, y, key);\n// var alpha = scene.textures.getPixelAlpha(x, y, key, frame);\n

    alpha : 0 ~ 255

    Return null if the coordinates were out of bounds.

    "},{"location":"textures/#generate-texture-from-array","title":"Generate texture from array","text":"
    var config = {\ndata: data,\n// 3x3:\n// [ '...',\n//   '...',\n//   '...' ]\npixelWidth: 1,    // pixel width of each data\npixelHeight: 1,   // pixel height of each data\npreRender: null,  // callback, function(canvas, ctx) {}\npostRender: null, // callback, function(canvas, ctx) {}\n\ncanvas: null,  // create a canvas if null\nresizeCanvas: true,\nclearCanvas: true\n};\nvar texture = scene.textures.generate(key, config);\n
    "},{"location":"textures/#has-key","title":"Has key","text":"
    var hasKey = scene.textures.exists(key);\n
    "},{"location":"textures/#remove-texture","title":"Remove texture","text":"

    Remove texture stored in texture cache.

    scene.textures.remove(key);\n
    "},{"location":"textures/#get-base64","title":"Get base64","text":"
    var s = scene.textures.getBase64(key);  // type= 'image/png', encoderOptions= 0.92\n// var s = scene.textures.getBase64(key, frame, type, encoderOptions);\n
    "},{"location":"textures/#texture","title":"Texture","text":""},{"location":"textures/#get-texture","title":"Get texture","text":"
    var texture = scene.textures.get(key);\n
    "},{"location":"textures/#has-frame","title":"Has frame","text":"
    var hasFrame = texture.has(frameName);\n
    "},{"location":"textures/#add-frame","title":"Add frame","text":"
    var frame = texture.add(frameName, sourceIndex, x, y, width, height);\n
    "},{"location":"textures/#remove-frame","title":"Remove frame","text":"
    var removed = texture.remove(frameName);\n
    "},{"location":"textures/#default-textures","title":"Default textures","text":""},{"location":"textures/#get-key-list-of-all-textures","title":"Get key list of all textures","text":"
    var keys = scene.textures.getTextureKeys();\n
    "},{"location":"textures/#frame-object","title":"Frame object","text":""},{"location":"textures/#get-frame","title":"Get frame","text":"
    var frame = scene.textures.getFrame(key, frame);\n
    "},{"location":"textures/#properties","title":"Properties","text":""},{"location":"textures/#add-atlas","title":"Add atlas","text":"
    scene.textures.addAtlas(key, HTMLImageElement, data);\n// scene.textures.addAtlas(key, HTMLImageElement, data, dataSource);\n

    or

    scene.textures.addAtlas(undefined, texture, data);\n// scene.textures.addAtlas(undefined, texture, data, dataSource);\n
    "},{"location":"textures/#add-sprite-sheet","title":"Add sprite sheet","text":"
    scene.textures.addSpriteSheet(key, HTMLImageElement, config);\n// scene.textures.addAtlas(key, HTMLImageElement, config, dataSource);\n

    or

    scene.textures.addSpriteSheet(undefined, texture, config);\n// scene.textures.addSpriteSheet(undefined, texture, config, dataSource);\n
    "},{"location":"textures/#events","title":"Events","text":""},{"location":"tiledmapdata/","title":"Tiled map data","text":""},{"location":"tiledmapdata/#introduction","title":"Introduction","text":"

    Parses a Tiled JSON object into a new MapData object.

    "},{"location":"tiledmapdata/#usage","title":"Usage","text":"
    var mapData = Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled(name, json, insertNull);\n
    "},{"location":"tiledmapdata/#map-data","title":"Map data","text":""},{"location":"tiledmapdata/#map-type","title":"Map type","text":"
    var mapType = mapData.orientation;\n
    "},{"location":"tiledmapdata/#map-size","title":"Map size","text":""},{"location":"tiledmapdata/#tile-size","title":"Tile size","text":"
    var tileWidth = mapData.tileWidth;\nvar tileHeight = mapData.tileHeight;\n
    "},{"location":"tiledmapdata/#layer","title":"Layer","text":"
    var layers = mapData.layers;\n
    mapData.layers.forEach(function(layer){\nvar name = layer.name;\n\n\nvar alpha = layer.alpha;\nvar visible = layer.visible;\n\nvar x = layer.x;\nvar y = layer.y;\nvar width = layer.width;\nvar height = layer.height;\nvar data = layer.data;\n\nlayer.data.forEach(function(gid, index){\nvar tileX = index % width;\nvar tileY = Math.floor(index / width);\nif (gid === -1) { // Empty\n\n} else {\n\n}\n})\n})\n
    "},{"location":"tilemap/","title":"Tile map","text":""},{"location":"tilemap/#introduction","title":"Introduction","text":"

    Display of tiles map, built-in game object of phaser.

    "},{"location":"tilemap/#usage","title":"Usage","text":""},{"location":"tilemap/#hierarchy","title":"Hierarchy","text":"
    graph TB\n\ntilemap --> layerA[\"layerA<br>(Game object)\"]\ntilemap --> layerB\n\nlayerA --> tilesA[\"tiles<br>(layer.data[x][y])\"]\nlayerB --> tilesB[\"tiles\"]
    "},{"location":"tilemap/#load-tile-map","title":"Load tile map","text":"
    scene.load.tilemapTiledJSON(key, url);   // JSON\nscene.load.tilemapCSV(key, url);         // CSV\n
    "},{"location":"tilemap/#add-tile-map-object","title":"Add tile map object","text":"
    1. Create map
    2. Add tileset image
      var tileset = map.addTilesetImage(tilesetName, key); // key: texture key\n// var tileset = map.addTilesetImage(tilesetName);  // key = tilesetName\n// var tileset = map.addTilesetImage(tilesetName, key, tileWidth, tileHeight, tileMargin, tileSpacing, gid, tileOffset);\n
    3. Create layer
    4. Create game objects (optional)
    "},{"location":"tilemap/#map","title":"Map","text":""},{"location":"tilemap/#map-size","title":"Map size","text":"
    var mapWidth = map.width;\nvar mapHeight = map.height;\n
    "},{"location":"tilemap/#tile-size","title":"Tile size","text":""},{"location":"tilemap/#tileworld-position","title":"Tile/world position","text":""},{"location":"tilemap/#tile-at-world-xy","title":"Tile at world XY","text":"
    var hasTile = map.hasTileAtWorldXY(worldX, worldY);\n

    or

    var hasTile = map.hasTileAtWorldXY(worldX, worldY, camera, layer);\n
    "},{"location":"tilemap/#draw-on-graphics","title":"Draw on graphics","text":"
    map.renderDebug(graphics);\n

    or

    map.renderDebug(graphics, {\ntileColor: new Phaser.Display.Color(105, 210, 231, 150),         // null\ncollidingTileColor: new Phaser.Display.Color(243, 134, 48, 200), // null\nfaceColor: new Phaser.Display.Color(40, 39, 37, 150)             // null\n});\n

    or

    map.renderDebug(graphics, styleConfig, layer);\n
    "},{"location":"tilemap/#layer","title":"Layer","text":"

    A Game Object that renders LayerData from a map when used in combination with one or more tileset.

    "},{"location":"tilemap/#get-layer","title":"Get layer","text":""},{"location":"tilemap/#render-pipeline","title":"Render pipeline","text":"
    layer.setPipeline(pipelineName);\n
    layer.setPostPipeline(pipelineName);\n

    See Render pipeline section of Game object.

    "},{"location":"tilemap/#render-order","title":"Render order","text":"
    layer.setRenderOrder(renderOrder);\n
    "},{"location":"tilemap/#fill-tiles","title":"Fill tiles","text":""},{"location":"tilemap/#randomize","title":"Randomize","text":""},{"location":"tilemap/#copy-tiles","title":"Copy tiles","text":""},{"location":"tilemap/#put-tile-at","title":"Put tile at","text":""},{"location":"tilemap/#put-tiles-at","title":"Put tiles at","text":""},{"location":"tilemap/#replace-tiles","title":"Replace tiles","text":""},{"location":"tilemap/#swap-tiles","title":"Swap tiles","text":""},{"location":"tilemap/#shuffle-tiles","title":"Shuffle tiles","text":""},{"location":"tilemap/#tile","title":"Tile","text":""},{"location":"tilemap/#get-tile","title":"Get tile","text":"
    var tile = map.getTileAt(tileX, tileY);\n// var tile = map.getTileAtWorldXY(worldX, worldY);\n

    or

    var tile = map.getTileAt(tileX, tileY, true, layer);  // Return a Tile object with an index of -1 for empty tile\n// var tile = map.getTileAtWorldXY(worldX, worldY, true, camera, layer);\n
    "},{"location":"tilemap/#get-tiles-within-a-rectangle-area","title":"Get tiles within a rectangle area","text":"
    var tiles = map.getTilesWithin(tileX, tileY, width, height);\n

    or

    var tiles = map.getTilesWithin(tileX, tileY, width, height, {\n// isNotEmpty: false,\n// isColliding: false,\n// hasInterestingFace: false\n}, layer);\n
    "},{"location":"tilemap/#get-tiles-within-world-xy","title":"Get tiles within world XY","text":"
    var tiles = map.getTilesWithinWorldXY(worldX, worldY, width, height);\n

    or

    var tiles = map.getTilesWithinWorldXY(worldX, worldY, width, height,  {\n// isNotEmpty: false,\n// isColliding: false,\n// hasInterestingFace: false\n}, camera, layer);\n
    "},{"location":"tilemap/#get-tiles-within-shape","title":"Get tiles within shape","text":"
    vat tiles = map.getTilesWithinShape(shape);\n

    or

    vat tiles = map.getTilesWithinShape(shape, {\n// isNotEmpty: false,\n// isColliding: false,\n// hasInterestingFace: false\n}, camera, layer);\n

    Shape:

    "},{"location":"tilemap/#for-each-tile-in-layer","title":"For each tile in layer","text":"
    map.forEachTile(function(tile, index, tileArray) { /* ... */ }, context);\n

    or

    map.forEachTile(function(tile, index, tileArray) { /* ... */ }, context,\ntileX, tileY, width, height, {\n// isNotEmpty: false,\n// isColliding: false,\n// hasInterestingFace: false\n}, layer);\n
    "},{"location":"tilemap/#tile-index","title":"Tile index","text":""},{"location":"tilemap/#tile-position","title":"Tile position","text":"
    var x = tile.x;\nvar y = tile.y;\n
    "},{"location":"tilemap/#tile-corners","title":"Tile corners","text":"
    var points = map.getTileCorners(tileX, tileY, camera, layer);\n
    "},{"location":"tilemap/#alpha","title":"Alpha","text":""},{"location":"tilemap/#visible","title":"Visible","text":""},{"location":"tilemap/#flip","title":"Flip","text":""},{"location":"tilemap/#bounds","title":"Bounds","text":""},{"location":"tilemap/#properties","title":"Properties","text":"
    var properties = tile.properties;  // object or null\nvar value = properties[key];\n
    tile.properties[key] = value;\n
    "},{"location":"tilemap/#collision","title":"Collision","text":""},{"location":"tilemap/#enable-collision","title":"Enable collision","text":""},{"location":"tilemap/#disable-collision","title":"Disable collision","text":""},{"location":"tilemap/#get-collision-group","title":"Get collision group","text":"
    var collisionGroup = tile.getCollisionGroup();\n

    or

    var collisionGroup = tileset.getTileCollisionGroup(tile.index); // array of collision shapes, or null\n

    Types of collision shape (collisionGroup.objects[i])

    "},{"location":"tilemap/#arcade-collision","title":"Arcade collision","text":"
    scene.physics.add.collider(arcadeGO, layer);\n

    or, in update stage:

    scene.physics.world.collide(arcadeGO, layer);\n

    See Collision section of Arcade-world.

    "},{"location":"tilemap/#matter-collision","title":"Matter collision","text":""},{"location":"tilemap/#tileset","title":"Tileset","text":""},{"location":"tilemap/#get-tileset","title":"Get tileset","text":"
    var tileset = map.getTileset(name);\n
    "},{"location":"tilemap/#change-texture-of-tileset","title":"Change texture of tileset","text":"
    var texture = scene.sys.textures.get(key);\ntileset.setImage(texture);\n
    "},{"location":"tilesprite/","title":"Tile sprite","text":""},{"location":"tilesprite/#introduction","title":"Introduction","text":"

    Display of repeating texture, built-in game object of phaser.

    "},{"location":"tilesprite/#usage","title":"Usage","text":""},{"location":"tilesprite/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"tilesprite/#add-tile-sprite-object","title":"Add tile sprite object","text":"
    var image = scene.add.tileSprite(x, y, width, height, textureKey);\n

    Add tile sprite from JSON

    var image = scene.make.tileSprite({\nx: 0,\ny: 0,\nwidth: 512,\nheight: 512,\nkey: '',\n\n// angle: 0,\n// alpha: 1\n// flipX: true,\n// flipY: true,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"tilesprite/#custom-class","title":"Custom class","text":""},{"location":"tilesprite/#properties-of-tiles","title":"Properties of tiles","text":""},{"location":"tilesprite/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"tilesprite/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"timeline/","title":"Timeline","text":""},{"location":"timeline/#introduction","title":"Introduction","text":"

    Schedule events to happen at specific times in the future, built-in object of phaser.

    "},{"location":"timeline/#usage","title":"Usage","text":""},{"location":"timeline/#create-timeline","title":"Create timeline","text":"
    var timeline = scene.add.timeline([    {\nat: 0,\nin:\nfrom:\n\nset: {\nkey: value,\n},\n\ntween: {\ntargets: gameObject,\nalpha: 1,\nease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\nrepeat: 0,            // -1: infinity\nyoyo: false\n},\n\nrun(target){ },\n\nsound: '',\n\nevent: '',\n\n// target: this,\n\n// once: false,\n// stop: false,\n},\n\n// ...\n])\n

    The Timeline always starts paused.

    "},{"location":"timeline/#start","title":"Start","text":"
    timeline.play();\n

    Restart

    timeline.play(true);\n
    "},{"location":"timeline/#stop","title":"Stop","text":"
    timeline.stop();\n
    "},{"location":"timeline/#pause-resume","title":"Pause / Resume","text":"
    timeline.pause();\n// timeline.paused = true;\n
    timeline.resume();\n// timeline.paused = false;\n
    "},{"location":"timeline/#is-playing","title":"Is playing","text":"

    Timeline is currently playing, not paused or not complete.

    var isPlaying = timeline.isPlaying()\n
    "},{"location":"timeline/#add-event","title":"Add event","text":"
    timeline.add(config);\n

    or

    timeline.add([config0, config1, ...]);\n
    "},{"location":"timeline/#clear-all-events","title":"Clear all events","text":"
    timeline.clear();\n
    "},{"location":"timeline/#destroy","title":"Destroy","text":"

    Also remove updating.

    timeline.destroy();\n
    "},{"location":"timer/","title":"Timer","text":""},{"location":"timer/#introduction","title":"Introduction","text":"

    Execute callback when time-out, built-in object of phaser.

    "},{"location":"timer/#usage","title":"Usage","text":""},{"location":"timer/#start-timer","title":"Start timer","text":"

    Note

    Throw error message if delay : 0 with (repeat > 0 or loop: true)

    "},{"location":"timer/#pauseresume","title":"Pause/resume","text":""},{"location":"timer/#stop","title":"Stop","text":""},{"location":"timer/#time-scale","title":"Time scale","text":""},{"location":"timer/#other-properties","title":"Other properties","text":""},{"location":"tintrgb/","title":"TintRGB","text":""},{"location":"tintrgb/#introduction","title":"Introduction","text":"

    Attach tintR, tintG, tintB, and tintGray properties to a game object.

    Note

    This behavior will override default tint property

    "},{"location":"tintrgb/#live-demos","title":"Live demos","text":""},{"location":"tintrgb/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"tintrgb/#install-plugin","title":"Install plugin","text":""},{"location":"tintrgb/#load-minify-file","title":"Load minify file","text":""},{"location":"tintrgb/#import-plugin","title":"Import plugin","text":""},{"location":"tintrgb/#import-method","title":"Import method","text":""},{"location":"tintrgb/#attach-properties","title":"Attach properties","text":"
    scene.plugins.get('rexTintRGB').add(gameObject, tintRGB);\ngameObject.tintGray = 128;\n// gameObject.tintR = 128;\n// gameObject.tintG = 128;\n// gameObject.tintB = 128;\n
    "},{"location":"tintrgb/#fade","title":"Fade","text":"
    scene.tweens.add({\ntargets: gameObject,\ntintR: 0,\ntintG: 0,\ntintB: 0,\n// tintGray: 0,\nduration: 3000\n})\n
    "},{"location":"tools/","title":"Tools","text":""},{"location":"tools/#texture-atlas","title":"Texture atlas","text":""},{"location":"tools/#texture-packer","title":"Texture-packer","text":"

    Texture-packer

    "},{"location":"tools/#free-texture-packer","title":"Free texture packer","text":"

    Free texture packer, Web app

    "},{"location":"tools/#leshy-spritesheet-tool","title":"Leshy SpriteSheet Tool","text":"

    Leshy SpriteSheet Tool

    Export to JSON-TP-Hash

    "},{"location":"tools/#aseprite","title":"Aseprite","text":"

    Aseprite

    1. Go to \"File - Export Sprite Sheet\"
    2. On the Layout tab:
    3. Set the \"Sheet type\" to \"Packed\"
    4. Set the \"Constraints\" to \"None\"
    5. Check the \"Merge Duplicates\" checkbox
    6. On the Sprite tab:
      1. Set \"Layers\" to \"Visible layers\"
      2. Set \"Frames\" to \"All frames\", unless you only wish to export a sub-set of tags
    7. On the Borders tab:
      1. Check the \"Trim Sprite\" and \"Trim Cells\" options
      2. Ensure \"Border Padding\", \"Spacing\" and \"Inner Padding\" are all > 0 (1 is usually enough)
    8. On the Output tab:
      1. Check \"Output File\", give your image a name and make sure you choose \"png files\" as the file type
      2. Check \"JSON Data\" and give your json file a name
      3. The JSON Data type can be either a Hash or Array, Phaser doesn't mind.
      4. Make sure \"Tags\" is checked in the Meta options
      5. In the \"Item Filename\" input box, make sure it says just \"{frame}\" and nothing more.
    9. Click export

    Tested with Aseprite 1.2.25

    "},{"location":"tools/#atlas-packer","title":"Atlas-packer","text":""},{"location":"tools/#animation","title":"Animation","text":""},{"location":"tools/#bitmap-font","title":"Bitmap font","text":""},{"location":"touchevents/","title":"Touch events","text":""},{"location":"touchevents/#introduction","title":"Introduction","text":"

    Built-in touch/mouse events of phaser.

    Note

    No touch input event fired in preload stage.

    "},{"location":"touchevents/#usage","title":"Usage","text":""},{"location":"touchevents/#quick-start","title":"Quick start","text":"

    Reference : Properties of point

    "},{"location":"touchevents/#register-interactive","title":"Register interactive","text":"

    Call gameObject.setInteractive(...) to register touch input of Game Object before listening touching events.

    Pixel perfect hit-testing

    This is an expensive process, should only be enabled on Game Objects that really need it.

    "},{"location":"touchevents/#disable-interactive","title":"Disable interactive","text":""},{"location":"touchevents/#top-only","title":"Top only","text":"

    When set to true this Input Plugin will emulate DOM behavior by only emitting events from the top-most Game Objects in the Display List. If set to false it will emit events from all Game Objects below a Pointer, not just the top one.

    Each scene can has its own scene.input.topOnly setting.

    "},{"location":"touchevents/#touch-events","title":"Touch events","text":"

    Trigger these events from top scene to bottom scene.

    1. Events on touched Game object
      gameObject.on('pointerdown', function(pointer, localX, localY, event){ /* ... */ }, scope);\ngameObject.on('pointerup', function(pointer, localX, localY, event){ /* ... */ }, scope);\ngameObject.on('pointermove', function(pointer, localX, localY, event){ /* ... */ }, scope);\ngameObject.on('pointerover', function(pointer, localX, localY, event){ /* ... */ }, scope);\ngameObject.on('pointerout', function(pointer, event){ /* ... */ }, scope);\n
    2. Event on input plugin for each touched Game object
      scene.input.on('gameobjectdown', function(pointer, gameObject, event){ /* ... */ }, scope);\nscene.input.on('gameobjectup', function(pointer, gameObject, event){ /* ... */ }, scope);\nscene.input.on('gameobjectmove', function(pointer, gameObject, event){ /* ... */ }, scope);\nscene.input.on('gameobjectover', function(pointer, gameObject, event){ /* ... */ }, scope);\nscene.input.on('gameobjectout', function(pointer, gameObject, event){ /* ... */ }, scope);\n
    3. Events to get all touched Game Objects
      scene.input.on('pointerdown', function(pointer, currentlyOver){ /* ... */ }, scope);\nscene.input.on('pointerdownoutside', function(pointer){ /* ... */ }, scope);\nscene.input.on('pointerup', function(pointer, currentlyOver){ /* ... */ }, scope);\nscene.input.on('pointerupoutside', function(pointer){ /* ... */ }, scope);\nscene.input.on('pointermove', function(pointer, currentlyOver){ /* ... */ }, scope);\nscene.input.on('pointerover', function(pointer, justOver){ /* ... */ }, scope);\nscene.input.on('pointerout', function(pointer, justOut){ /* ... */ }, scope);\nscene.input.on('gameout', function(timeStamp, domEvent){ /* ... */ }, scope);\nscene.input.on('gameover', function(timeStamp, domEvent){ /* ... */ }, scope);\n
    "},{"location":"touchevents/#game-canvas","title":"Game canvas","text":"
    scene.input.on('gameout', function(timeStamp, event){ /* ... */ }, scope);\nscene.input.on('gameover', function(timeStamp, event){ /* ... */ }, scope);\n
    "},{"location":"touchevents/#dragging","title":"Dragging","text":""},{"location":"touchevents/#enable-dragging","title":"Enable dragging","text":""},{"location":"touchevents/#disable-dragging","title":"Disable dragging","text":""},{"location":"touchevents/#dragging-events","title":"Dragging events","text":"
    gameObject.on('dragstart', function(pointer, dragX, dragY){ /* ... */ }, scope);\ngameObject.on('drag', function(pointer, dragX, dragY){ /* ... */ }, scope);\ngameObject.on('dragend', function(pointer, dragX, dragY, dropped){ /* ... */ }, scope);\n
    scene.input.on('dragstart', function(pointer, gameObject){ /* ... */ }, scope);\nscene.input.on('drag', function(pointer, gameObject, dragX, dragY){ /* ... */ }, scope);\nscene.input.on('dragend', function(pointer, gameObject, dropped){ /* ... */ }, scope);\n
    "},{"location":"touchevents/#dragging-properties","title":"Dragging properties","text":"
    scene.input.dragDistanceThreshold = 16;\nscene.input.dragTimeThreshold = 500;\n
    "},{"location":"touchevents/#drop-zone","title":"Drop zone","text":""},{"location":"touchevents/#enable-drop-zone","title":"Enable drop zone","text":""},{"location":"touchevents/#disable-drop-zone","title":"Disable drop zone","text":"
    gameObject.input.dropZone = false;\n
    "},{"location":"touchevents/#dropping-events","title":"Dropping events","text":"
    gameObject.on('drop', function(pointer, target){ /* ... */ }, scope);\n\ngameObject.on('dragenter', function(pointer, target){ /* ... */ }, scope);\ngameObject.on('dragover', function(pointer, target){ /* ... */ }, scope);\ngameObject.on('dragleave', function(pointer, target){ /* ... */ }, scope);\n
    scene.input.on('drop', function(pointer, gameObject, target){ /* ... */ }, scope);\n\nscene.input.on('dragenter', function(pointer, gameObject, target){ /* ... */ }, scope);\nscene.input.on('dragover', function(pointer, gameObject, target){ /* ... */ }, scope);\nscene.input.on('dragleave', function(pointer, gameObject, target){ /* ... */ }, scope);\n
    "},{"location":"touchevents/#first-event-of-all","title":"First event of all","text":"
    scene.input.on('preupdate', function() { /* ... */ }, scope);\n
    "},{"location":"touchevents/#single-touch","title":"Single touch","text":""},{"location":"touchevents/#pointer","title":"Pointer","text":"
    var pointer = scene.input.activePointer;\n
    "},{"location":"touchevents/#multi-touch","title":"Multi-touch","text":""},{"location":"touchevents/#amount-of-active-pointers","title":"Amount of active pointers","text":"

    Set amount of active pointers in game configuration

    var config = {\n// ...\ninput: {\nactivePointers: 1,\n// ...\n}\n};\nvar game = new Phaser.Game(config);\n

    Or add pointers in run-time.

    scene.input.addPointer(num);  // total points = num + 1\n
    "},{"location":"touchevents/#pointers","title":"Pointers","text":""},{"location":"touchevents/#pointer_1","title":"Pointer","text":""},{"location":"touchevents/#input-object","title":"Input object","text":""},{"location":"touchevents/#smooth","title":"Smooth","text":"

    Get touch position from interpolation of previous touch position and current touch position.

    Touch-position = (current-touch-position * smooth-factor) + (previous-touch-position * (1 - smooth-factor))\n
    1. Set smooth factor. In game configuration
      var config = {\n// ....\ninput: {\nsmoothFactor: 0\n}\n}\n
    2. Get touch position
      var x = pointer.x;\nvar y = pointer.y;\nvar worldX = pointer.worldX;\nvar worldY = pointer.worldY;\n
    "},{"location":"touchevents/#debug","title":"Debug","text":""},{"location":"touchevents/#poll-rate","title":"Poll rate","text":""},{"location":"toucheventstop/","title":"Touch event stop","text":""},{"location":"toucheventstop/#introduction","title":"Introduction","text":"

    Stop touch events propagation.

    "},{"location":"toucheventstop/#live-demos","title":"Live demos","text":""},{"location":"toucheventstop/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"toucheventstop/#install-plugin","title":"Install plugin","text":""},{"location":"toucheventstop/#load-minify-file","title":"Load minify file","text":""},{"location":"toucheventstop/#import-plugin","title":"Import plugin","text":""},{"location":"toucheventstop/#import-method","title":"Import method","text":""},{"location":"toucheventstop/#create-instance","title":"Create instance","text":"
    var touchEventStop = scene.plugins.get('rexTouchEventStop').add(gameObject, {\n// hitAreaMode: 0,    // 0|1|'default'|'fullWindow'\n// enable: true\n});\n
    "},{"location":"toucheventstop/#enable","title":"Enable","text":""},{"location":"touchstate/","title":"Touch state","text":""},{"location":"touchstate/#introduction","title":"Introduction","text":"

    Store current touch input properties.

    "},{"location":"touchstate/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"touchstate/#install-plugin","title":"Install plugin","text":""},{"location":"touchstate/#load-minify-file","title":"Load minify file","text":""},{"location":"touchstate/#import-plugin","title":"Import plugin","text":""},{"location":"touchstate/#import-class","title":"Import class","text":""},{"location":"touchstate/#create-instance","title":"Create instance","text":"
    var touchState = scene.plugins.get('rexTouchState').add(gameObject, {\n// enable: true,\n});\n
    "},{"location":"touchstate/#properties","title":"Properties","text":""},{"location":"touchstate/#events","title":"Events","text":""},{"location":"touchstate/#enable","title":"Enable","text":""},{"location":"transitionimage/","title":"Transition image","text":""},{"location":"transitionimage/#introduction","title":"Introduction","text":"

    Transit texture to another one. A containerLite game object with 2 image game objects.

    "},{"location":"transitionimage/#live-demos","title":"Live demos","text":""},{"location":"transitionimage/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"transitionimage/#install-plugin","title":"Install plugin","text":""},{"location":"transitionimage/#load-minify-file","title":"Load minify file","text":""},{"location":"transitionimage/#import-plugin","title":"Import plugin","text":""},{"location":"transitionimage/#import-class","title":"Import class","text":""},{"location":"transitionimage/#create-instance","title":"Create instance","text":"

    var image = scene.add.rexTransitionImage(x, y, texture, frame, {\n// dir: 0,\n// onStart: function(parent, currentImage, nextImage, t) { },\n// onStartScope: undefined,\n// onProgress: function(parent, currentImage, nextImage, t) { },\n// onProgressScope: undefined,\n// onComplete: function(parent, currentImage, nextImage, t) { },\n// onCompleteScope: undefined,    \n// duration: 1000,\n// ease: 'Linear',\n// mask: undefined,\n});\n
    or

    var image = scene.add.rexTransitionImage(x, y, texture, frame, {\n// x: 0,\n// y: 0,\n// key: \n// frame: \n// dir: 0,\n// onStart: function(parent, currentImage, nextImage, t) { },\n// onStartScope: undefined,\n// onProgress: function(parent, currentImage, nextImage, t) { },\n// onProgressScope: undefined,\n// onComplete: function(parent, currentImage, nextImage, t) { },\n// onCompleteScope: undefined,    \n// duration: 1000,\n// ease: 'Linear',\n// mask: undefined,\n});\n

    If onStart, onProgress and onComplete are all undefined, it will use cross-fade as default transition callbacks.

    Add transitionimage from JSON

    var image = scene.make.rexTransitionImage({\nx: 0,\ny: 0,\nkey: null,\nframe: null,\n\n// dir: 0,\n// onStart: function(parent, currentImage, nextImage, t) { },\n// onStartScope: undefined,\n// onProgress: function(parent, currentImage, nextImage, t) { },\n// onProgressScope: undefined,\n// onComplete: function(parent, currentImage, nextImage, t) { },\n// onCompleteScope: undefined,\n// duration: 1000,\n// ease: 'Linear',\n// mask: undefined,\n\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"transitionimage/#custom-class","title":"Custom class","text":""},{"location":"transitionimage/#transit","title":"Transit","text":"
    image\n// .setTransitionDirection(dir)\n// .setTransitionStartCallback(onStart, onStartScope)\n// .setTransitionProgressCallback(onProgress, onProgressScope)\n// .setTransitionCompleteCallback(onComplete, onCompleteScope)\n// .setDuration(duration)\n// .setEaseFunction(ease)\n// .setMaskEnable(enable)\n.transit(texture, frame)\n

    or

    image.transit({\nkey: undefined,\n// frame: undefined,\n// dir: 0,\n// onStart: function(parent, currentImage, nextImage, t) { },\n// onStartScope: undefined,\n// onProgress: function(parent, currentImage, nextImage, t) { },\n// onProgressScope: undefined,\n// onComplete: function(parent, currentImage, nextImage, t) { },\n// onCompleteScope: undefined,\n// duration: 1000,\n// ease: 'Linear',\n// mask: undefined,\n})\n

    Fire 'complete' event when transition completed.

    "},{"location":"transitionimage/#register-transtion-mode","title":"Register transtion mode","text":""},{"location":"transitionimage/#current-texture","title":"Current texture","text":"
    var textureKey = image.texture.key;\nvar frameName = image.frame.name;\n
    "},{"location":"transitionimage/#transition-callbacks","title":"Transition callbacks","text":""},{"location":"transitionimage/#transition-duration","title":"Transition duration","text":""},{"location":"transitionimage/#ease-function","title":"Ease function","text":""},{"location":"transitionimage/#mask","title":"Mask","text":""},{"location":"transitionimage/#grid-cut","title":"Grid cut","text":"

    Grid cut texture to cells.

    Cut cell image game objects will be set to invisible after transition complete.

    "},{"location":"transitionimage/#pauseresume","title":"Pause/Resume","text":"
    image.pause();\n
    image.resume();\n
    "},{"location":"transitionimage/#stop","title":"Stop","text":"
    image.stop();\n

    Also will fire 'complete' event.

    "},{"location":"transitionimage/#events","title":"Events","text":""},{"location":"transitionimage/#flip","title":"Flip","text":""},{"location":"transitionimage/#use-cases","title":"Use cases","text":""},{"location":"transitionimagepack/","title":"Transition image pack","text":""},{"location":"transitionimagepack/#introduction","title":"Introduction","text":"

    Transit texture to another one, with some pre-build effects, extended from TransitionImage

    "},{"location":"transitionimagepack/#live-demos","title":"Live demos","text":""},{"location":"transitionimagepack/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"transitionimagepack/#install-plugin","title":"Install plugin","text":""},{"location":"transitionimagepack/#load-minify-file","title":"Load minify file","text":""},{"location":"transitionimagepack/#import-plugin","title":"Import plugin","text":""},{"location":"transitionimagepack/#import-class","title":"Import class","text":""},{"location":"transitionimagepack/#create-instance","title":"Create instance","text":"

    var image = scene.add.rexTransitionImagePack(x, y, texture, frame, {   // duration: 1000,\n});\n
    or

    var image = scene.add.rexTransitionImagePack(x, y, texture, frame, {\n// x: 0,\n// y: 0,\n// key: \n// frame: \n// duration: 1000,\n});\n

    Add transitionimage from JSON

    var image = scene.make.rexTransitionImagePack({\nx: 0,\ny: 0,\nkey: null,\nframe: null,\n\n// duration: 1000,\n\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"transitionimagepack/#custom-class","title":"Custom class","text":""},{"location":"transitionimagepack/#transit","title":"Transit","text":"
    image\n// .setDuration(duration)\n// .setEaseFunction(ease)\n.transit(texture, frame, modeName)\n

    or

    image.transit({\nkey: undefined,\n// frame: undefined,\n// duration: 1000,\n// ease: 'Linear',\nmode: modeName\n})\n
    "},{"location":"transitionimagepack/#current-texture","title":"Current texture","text":"
    var textureKey = image.texture.key;\nvar frameName = image.frame.name;\n
    "},{"location":"transitionimagepack/#transition-duration","title":"Transition duration","text":""},{"location":"transitionimagepack/#ease-function","title":"Ease function","text":""},{"location":"transitionimagepack/#pauseresume","title":"Pause/Resume","text":"
    image.pause();\n
    image.resume();\n
    "},{"location":"transitionimagepack/#stop","title":"Stop","text":"
    image.stop();\n

    Also will fire 'complete' event.

    "},{"location":"transitionimagepack/#events","title":"Events","text":""},{"location":"transitionimagepack/#flip","title":"Flip","text":""},{"location":"tween-timeline/","title":"Timeline","text":""},{"location":"tween-timeline/#introduction","title":"Introduction","text":"

    Chain a series of tween tasks, built-in object of phaser.

    "},{"location":"tween-timeline/#usage","title":"Usage","text":""},{"location":"tween-timeline/#create-timeline-then-chain-tween-tasks","title":"Create timeline, then chain tween tasks","text":"
    1. Create timeline
      var timeline = scene.tweens.createTimeline();\n
    2. Add tween task configuration
      timeline.add({\ntargets: gameObject,\nx: 400,               // '+=100'\nease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\nrepeat: 0,            // -1: infinity\nyoyo: false,\n// offset: '-=500',   // starts 500ms before previous tween ends\n})\n
    3. Start tween tasks
      timeline.play();\n
    "},{"location":"tween-timeline/#create-timeline-included-tween-tasks","title":"Create timeline, included tween tasks","text":"
    var timeline = scene.tweens.timeline({\ntargets: gameObject,\nease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\neaseParams:\n\nduration: 1000,\ndelay: 0,\nloop: 0,\nhold: 0,\nrepeat: 0,\nloopDelay: 0,\ncompleteDelay: 0,\nyoyo: false,\n\npaused: false,\nuseFrames: false,\nflipX: false,\nflipY: false,\n\n\ntweens: [\n{\ntargets: gameObject,\nx: 400,               // '+=100'\n// ease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\n// duration: 1000,\n// repeat: 0,            // -1: infinity\n// yoyo: false,\n// offset: '-=500',   // starts 500ms before previous tween ends\n},\n// ...\n],\n\n\ncallbackScope: timeline,\n\nonStart: function () {},\nonStartScope: onStartParams: [],\n\nonUpdate: function () {},\nonUpdateScope:\nonUpdateParams: [],\n\nonLoop: function () {},\nonLoopScope:\nonLoopParams: [],\n\nonYoyo: function () {},\nonYoyoScope:\nonYoyoParams: [],\n\nonComplete: function () {},\nonCompleteScope:\nonCompleteParams: [],\n\ntotalDuration: 0,\n\n});\n
    "},{"location":"tween/","title":"Tween task","text":""},{"location":"tween/#introduction","title":"Introduction","text":"

    Change properties by tween equations, built-in object of phaser.

    "},{"location":"tween/#usage","title":"Usage","text":""},{"location":"tween/#create-tween-task","title":"Create tween task","text":"
    var tween = scene.tweens.add({\ntargets: gameObject,\nx: 1,\n// x: '+=1',\n// x: '-=1',\n// x: '*=1',\n// x: '/=1',\n// x: 'random(0.25, 0.75)',\n// x: 'int(10, 100)',\n// x: [100, 300, 200, 600],\n// x: { from: 0, to: 1 },\n// x: { start: 0, to: 1 },  \n// x: { start: value0, from: value1, to: value2 },  \n// x: {\n//      getActive: function (target, key, value, targetIndex, totalTargets, tween) { return newValue; },\n//      getStart: function (target, key, value, targetIndex, totalTargets, tween) { return newValue; },\n//      getEnd: function (target, key, value, targetIndex, totalTargets, tween) { return newValue; }\n// },\nease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\nrepeat: 0,            // -1: infinity\nyoyo: false,\n\n// interpolation: null,\n});\n

    or

    var tween = scene.tweens.add({\ntargets: gameObject,\npaused: false,\ncallbackScope: tween,\n\n// timming/callback of each state\nonStart: function () {},\nonStartParams: [],\n\n// initial delay\ndelay: 0,  // function(target, targetKey, value, targetIndex, totalTargets, tween) { },\n\n// tween duration\nduration: 1000,\nease: 'Linear',\neaseParams: null,\n\nonActive: function () {},\nonUpdate: function (tween, target, key, current, previous, param) {},\nonUpdateParams: [],\n\n// delay between tween and yoyo\nhold: 0,\nyoyo: false,  // true to tween backward\nflipX: false,\nflipY: false,\nonYoyo: function (tween, target, key, current, previous, param) {},\nonYoyoParams: [],\n\n// repeat count (-1: infinite)\nrepeat: 0,\nonRepeat: function (tween, target, key, current, previous, param) {},\nonRepeatParams: [],\n// delay to next pass\nrepeatDelay: 0,\n\n// loop count (-1: infinite)\nloop: 0,\nonLoop: function () {},\nonLoopParams: [],\n// delay to next loop\nloopDelay: 0,\n\n// delay to onComplete callback\ncompleteDelay: 0,\nonComplete: function () {},\nonCompleteParams: [],\n// timming/callback of each state\n\nonStop: function () {}, onPause: function () {}, onResume: function () {}, // properties:\nx: '+=600',        // start from current value\ny: 500,\nrotation: ...\nangle: ...\nalpha: ...\n// ...\n\n// or\nprops: {\nx: { value: '+=600', duration: 3000, ease: 'Power2' },\ny: { value: '500', duration: 1500, ease: 'Bounce.easeOut' }\n},\n\n// or\nprops: {\nx: {\nduration: 400,\nyoyo: true,\nrepeat: 8,\nease: 'Sine.easeInOut',\nvalue: {\ngetActive: function (target, key, value, targetIndex, totalTargets, tween)\n{\nreturn value;\n},\ngetStart: function (target, key, value, targetIndex, totalTargets, tween)\n{\nreturn value + 30;\n},\ngetEnd: function (target, key, value, targetIndex, totalTargets, tween)\n{\ndestX -= 30;\nreturn destX;\n}\n}\n},\n....\n},\n\npersist: false,\n\ninterpolation: null,\ninterpolationData: null,\n\n});\n

    Note

    Tween task will not manipulate any property that begins with an underscore.

    "},{"location":"tween/#ease-equations","title":"Ease equations","text":"

    Demo

    "},{"location":"tween/#pause-resume-task","title":"Pause / Resume task","text":"
    tween.pause();\n
    tween.resume();\n
    "},{"location":"tween/#stop-task","title":"Stop task","text":"
    tween.stop();\n
    "},{"location":"tween/#play-task","title":"Play task","text":"
    tween.play();\n
    "},{"location":"tween/#restart-task","title":"Restart task","text":"
    tween.restart();\n
    "},{"location":"tween/#seek","title":"Seek","text":"
    tween.seek(amount);\n// tween.seek(amount, delta, emit);\n
    "},{"location":"tween/#remove-task","title":"Remove task","text":"

    Removes this Tween from the TweenManager

    tween.remove();\n
    "},{"location":"tween/#destroy-task","title":"Destroy task","text":"

    Free tween task from memory

    tween.destroy();\n

    Note

    A Tween that has been destroyed cannot ever be played or used again.

    "},{"location":"tween/#get-tweens","title":"Get tweens","text":""},{"location":"tween/#destroy-task-of-a-target","title":"Destroy task of a target","text":"
    scene.tweens.killTweensOf(target);\n
    "},{"location":"tween/#time-scale","title":"Time-scale","text":"
    tween.setTimeScale(v);\n// tween.timeScale = timescale;\n
    var timeScale = tween.getTimeScale();\n// var timeScale = tween.timeScale;\n
    "},{"location":"tween/#global-time-scale","title":"Global time-scale","text":"
    var timeScale = scene.tweens.timeScale;\n
    scene.tweens.timeScale = timescale;\n
    "},{"location":"tween/#events","title":"Events","text":""},{"location":"tween/#set-callbacks","title":"Set callbacks","text":"
    tween.setCallback(type, callback, param);\n
    "},{"location":"tween/#state","title":"State","text":""},{"location":"tween/#custom-ease-function","title":"Custom ease function","text":"
    var tween = scene.tweens.add({\ntargets: gameObject,\n// ...\nease: function (t) {  // t: 0~1\nreturn value;     // value: 0~1\n},\n// ...\n});\n
    "},{"location":"tween/#has-target","title":"Has target","text":"
    var hasTarget = tween.hasTarget(gameObject);\n
    "},{"location":"tween/#tween-value","title":"Tween value","text":""},{"location":"tween/#chain","title":"Chain","text":""},{"location":"tween/#create-chain","title":"Create chain","text":"
    var chain = scene.tweens.chain({\ntargets: null,\ntweens: [\n{\n// targets: gameObject,\nalpha: 1,            ease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\nrepeat: 0,            // -1: infinity\nyoyo: false\n},        // ...\n],\n\ndelay: 0,\ncompleteDelay: 0,\nloop: 0,  // repeat: 0,\nrepeatDelay: 0,\npaused: false,\npersist: true,\n// callbackScope: this,\n})\n
    "},{"location":"tween/#pause-resume-chain","title":"Pause / Resume chain","text":"
    chain.pause();\n
    chain.resume();\n
    "},{"location":"tween/#restart-chain","title":"Restart chain","text":"
    chain.restart();\n
    "},{"location":"tween/#add-tween-task","title":"Add tween task","text":"
    chain.add({\ntargets: gameObject,\nalpha: 1,\nease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\nrepeat: 0,            // -1: infinity\nyoyo: false\n})\n

    or

    chain.add([tweenConfig0, tweenConfig1, ...]);\n
    "},{"location":"tween/#remove-tween-task","title":"Remove tween task","text":"
    chain.remove(tweenTask);\n
    "},{"location":"tween/#has-target_1","title":"Has target","text":"
    var hasTarget = chain.hasTarget(gameObject);\n
    "},{"location":"tween/#flow-chart","title":"Flow chart","text":"
    graph TB\n\nStart((Start)) --> CallbackOnStart\nCallbackOnStart>\"Callback: onStart\"] --> ActiveDelay((\"delay\"))\nActiveDelay --> DurationForward\n\nDurationForward((\"Tween forward<br>Callback: onUpdate<br>(duration)\")) --> Hold[\"hold\"]\nHold((hold)) --> IsYoyo{Is yoyo}\nIsYoyo --> |Yes| CallbackOnYoyo>\"Callback: onYoyo\"]\nCallbackOnYoyo --> DurationBackward((\"Tween backword<br>Callback: onUpdate<br>(duration)\"))\nDurationBackward --> IsRepeat{\"Repeat count > 0\"}\nIsYoyo --> |No| IsRepeat\nIsRepeat --> |Yes| CallbackOnRepeat>\"Callback: onRepeat\"]\nCallbackOnRepeat --> RepeatDelay((\"repeatDelay\"))\nRepeatDelay --> DurationForward\n\nIsRepeat --> |No| IsLoop{\"Loop count > 0\"}\n\nIsLoop --> |Yes| CallbackOnLoop\nCallbackOnLoop>\"Callback: onLoop\"] --> LoopDelay((\"loopDelay\"))\nLoopDelay --> DurationForward\n\nIsLoop --> |No| CompleteDelay\nCompleteDelay((\"completeDelay\")) --> CallbackOnComplete>\"Callback: onComplete\"]\nCallbackOnComplete --> End((End))
    "},{"location":"tween/#tween-data","title":"Tween data","text":""},{"location":"ui-badgelabel/","title":"Badge label","text":""},{"location":"ui-badgelabel/#introduction","title":"Introduction","text":"

    A container with badges above a main item.

    "},{"location":"ui-badgelabel/#live-demos","title":"Live demos","text":""},{"location":"ui-badgelabel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-badgelabel/#install-plugin","title":"Install plugin","text":""},{"location":"ui-badgelabel/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-badgelabel/#import-plugin","title":"Import plugin","text":""},{"location":"ui-badgelabel/#import-class","title":"Import class","text":""},{"location":"ui-badgelabel/#add-badgelabel-object","title":"Add badgeLabel object","text":"
    var badgeLabel = scene.rexUI.add.badgeLabel({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nbackground: backgroundGameObject,\nmain: mainItemGameObject,\n\nleftTop: leftTopBadgeGameObject,\ncenterTop: centerTopBadgeGameObject,\nrightTop: rightTopBadgeGameObject,\nleftCenter: leftCenterBadgeGameObject,\ncenter: centerBadgeGameObject,\nrightCenter: rightCenterBadgeGameObject,\nleftBottom: leftBottomBadgeGameObject,\ncenterBottom: centerBottomBadgeGameObject,\nrightBottom: rightBottomBadgeGameObject,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-badgelabel/#custom-class","title":"Custom class","text":""},{"location":"ui-badgelabel/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    badgeLabel.layout();\n

    See also - dirty

    "},{"location":"ui-badgelabel/#get-element","title":"Get element","text":""},{"location":"ui-badgelabel/#other-properties","title":"Other properties","text":"

    See overlap sizer object, base sizer object, container-lite.

    "},{"location":"ui-basesizer/","title":"Base sizer","text":""},{"location":"ui-basesizer/#introduction","title":"Introduction","text":"

    Base class of all ui plugins.

    "},{"location":"ui-basesizer/#usage","title":"Usage","text":""},{"location":"ui-basesizer/#background","title":"Background","text":"
    sizer.addBackground(gameObject);\n// sizer.addBackground(gameObject, key);\n// sizer.addBackground(gameObject, paddingConfig, key);\n
    "},{"location":"ui-basesizer/#remove-background","title":"Remove background","text":""},{"location":"ui-basesizer/#depth-of-background","title":"Depth of background","text":"

    Send this background child to bottom of sizer.

    sizer.sendChildToBack(gameObject);\n
    "},{"location":"ui-basesizer/#minimum-size","title":"Minimum size","text":"

    Resize top-most sizer

    sizer.setMinSize(width, height).layout()\n
    "},{"location":"ui-basesizer/#dirty","title":"Dirty","text":"

    Don't layout this sizer if sizer.dirty is false. i.e. Size of this sizer won't be changed, but won't layout children neither.

    Default value is true.

    "},{"location":"ui-basesizer/#bounds-of-sizer","title":"Bounds of sizer","text":""},{"location":"ui-basesizer/#size-of-sizer","title":"Size of sizer","text":""},{"location":"ui-basesizer/#push-into-bounds","title":"Push into bounds","text":"

    Align sizer to bound if overlapping it.

    sizer.pushIntoBounds();\n

    or

    sizer.pushIntoBounds(bounds);\n
    "},{"location":"ui-basesizer/#scale","title":"Scale","text":""},{"location":"ui-basesizer/#fade","title":"Fade","text":""},{"location":"ui-basesizer/#ease-move","title":"Ease move","text":""},{"location":"ui-basesizer/#shake","title":"Shake","text":""},{"location":"ui-basesizer/#ease-data","title":"Ease data","text":""},{"location":"ui-basesizer/#modal","title":"Modal","text":"
    1. Assign sizer.onCreateModalBehavior callback, or register events to close modal sizer directly.
    2. Pop this modal sizer
      sizer.modal({\n// cover: {\n//     color: 0x0,\n//     alpha: 0.8,\n//     transitIn: function(gameObject, duration) { },\n//     transitOut: function(gameObject, duration) { },\n// },\n// cover: false, \n\n// When to close modal dialog?\n// touchOutsideClose: false,\n// anyTouchClose: false,\n// timeOutClose: false,\n// manualClose: false,\n\n// duration: {\n//     in: 200,\n//     hold: 2000,\n//     out: 200\n// }\n\n// transitIn: 0,\n// transitOut: 0,\n\n// destroy: true\n});\n// sizer.modal(config, onClose);\n
      or
      sizer\n.modalPromise(config)\n.then(function(data){\n\n})\n
    "},{"location":"ui-basesizer/#set-properties-of-child","title":"Set properties of child","text":"
    sizer.setChildPosition(child, x, y);\nsizer.setChildRotation(child, rotation);\nsizer.setChildScale(child, scaleX, scaleY);\nsizer.setChildDisplaySize(child, width, height);\nsizer.setChildVisible(child, visible);\nsizer.setChildAlpha(child, alpha);\n
    "},{"location":"ui-basesizer/#depth","title":"Depth","text":""},{"location":"ui-basesizer/#scroll-factor","title":"Scroll factor","text":""},{"location":"ui-basesizer/#change-origin","title":"Change origin","text":"
    sizer.changeOrigin(originX, originY);\n

    This method also will reset all local state of children.

    "},{"location":"ui-basesizer/#destroy","title":"Destroy","text":"
    sizer.destroy();\n
    "},{"location":"ui-basesizer/#drag-top-most-sizer","title":"Drag top-most sizer","text":""},{"location":"ui-basesizer/#click","title":"Click","text":"

    Equal to

    var click = scene.rexUI.add.click(sizer, config);\nclick.on('click', callback, scope);\n
    "},{"location":"ui-basesizer/#click-child","title":"Click child","text":""},{"location":"ui-basesizer/#click-outside","title":"Click outside","text":"

    Equal to

    var clickOutside = scene.rexUI.add.clickOutside(sizer, config);\nclickOutside.on('clickoutside', callback, scope);\n
    "},{"location":"ui-basesizer/#click-outside-of-child","title":"Click outside of child","text":""},{"location":"ui-basesizer/#is-pointer-in-bounds","title":"Is pointer in bounds","text":""},{"location":"ui-basesizer/#in-touching","title":"In touching","text":"

    Invoke callbeack if pointer is inside hitarea every tick.

    Equal to

    var inTouching = scene.rexUI.add.inTouching(sizer, config);\ninTouching.on('intouch', callback, scope);\n
    "},{"location":"ui-basesizer/#in-touching-child","title":"In touching child","text":""},{"location":"ui-basesizer/#set-children-interactive","title":"Set children interactive","text":"

    Applies click, tap, press, swipe behaviors on this sizer, to detect input events of children.

    sizer.setChildrenInteractive({\n// down: undefined,\n// up: undefined,\n// over: undefined,\n\n// click: {mode: 'release', clickInterval: 100},\n\n// press: {time: 251, threshold: 9},\n\n// tap: {time: 250, tapInterval: 200, threshold: 9, tapOffset: 10, \n//       taps: undefined, minTaps: undefined, maxTaps: undefined,},\n\n// swipe: {threshold: 10, velocityThreshold: 1000, dir: '8dir'},\n\n// inputEventPrefix: 'child.',\n})\n

    Note

    Input behaviors are installed to this Sizer game object, not each child. And it assumes that all children are not overlapped. Use Button if user needs to enable/disable input behaviors of each child individually.

    "},{"location":"ui-basesizer/#events","title":"Events","text":""},{"location":"ui-basesizer/#pin-game-object","title":"Pin game object","text":"
    sizer.pin(gameObject);\n

    Note

    Method sizer.add is override in each sizer class usually.

    "},{"location":"ui-basesizer/#un-pin-game-object","title":"Un-pin game object","text":"

    sizer.unpin(child);\n// sizer.unpin(child, destroyChild);\n
    - destroyChild : Set true to destroy child. Default is false.

    Note

    Method sizer.remove is override in each sizer class usually.

    "},{"location":"ui-basesizer/#draw-bounds","title":"Draw bounds","text":""},{"location":"ui-basesizer/#hide","title":"Hide","text":""},{"location":"ui-basesizer/#padding","title":"Padding","text":""},{"location":"ui-basesizer/#anchor","title":"Anchor","text":"
    sizer.setAnchor({\n// left: '0%+0',\n// right: '0%+0',\n// centerX: '0%+0',\n// x: '0%+0',\n\n// top: '0%+0',\n// bottom: '0%+0',\n// centerY: '0%+0',\n// y: '0%+0'\n})\n

    For example, anchor game object's left bound to viewport's left+10, and centerY to viewport's center :

    {\nleft: 'left+10',\ncenterY: 'center'\n}\n
    "},{"location":"ui-basesizer/#get-child","title":"Get child","text":""},{"location":"ui-basesizer/#get-parent","title":"Get parent","text":""},{"location":"ui-basesizer/#has-parentchild","title":"Has parent/child","text":""},{"location":"ui-basesizer/#is-in-touching","title":"Is in touching","text":""},{"location":"ui-basesizer/#change-properties-of-child","title":"Change properties of child","text":""},{"location":"ui-basesizer/#add-to-container","title":"Add to container","text":"

    Note

    container.add(sizer), or layer.add(sizer) won't add children of sizer.

    "},{"location":"ui-basesizer/#layer","title":"Layer","text":"

    A sizer can have a layer. Current children and new children will draw on this layer, instead of display list of scene.

    "},{"location":"ui-basesizer/#shader-effects","title":"Shader effects","text":"

    Apply post-fx pipeline on layer of sizer.

    "},{"location":"ui-basesizer/#snapshot","title":"Snapshot","text":""},{"location":"ui-basesizer/#events_1","title":"Events","text":""},{"location":"ui-basesizer/#dragging","title":"Dragging","text":""},{"location":"ui-basesizer/#layout-children","title":"Layout children","text":"

    Note

    Enable sizer events by set sizerEvents to true in config.

    "},{"location":"ui-basesizer/#remove-child","title":"Remove child","text":"

    Note

    Enable sizer events by set sizerEvents to true in config.

    "},{"location":"ui-basesizer/#add-child","title":"Add child","text":"

    Note

    Enable sizer events by set sizerEvents to true in config.

    "},{"location":"ui-basesizer/#broadcast-event","title":"Broadcast event","text":"

    Fire event to sizer itself and all children

    sizer.broadcastEvent(eventName, parameter0, parameter1, ...);\n

    Receive event

    child.on(eventName, function(parameter0, parameter1, ...) {\n\n}, scope);\n
    "},{"location":"ui-basesizer/#other-properties","title":"Other properties","text":"

    This game object inherits from ContainerLite.

    "},{"location":"ui-buttons/","title":"Buttons","text":""},{"location":"ui-buttons/#introduction","title":"Introduction","text":"

    A container with a group of buttons.

    "},{"location":"ui-buttons/#live-demos","title":"Live demos","text":""},{"location":"ui-buttons/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-buttons/#install-plugin","title":"Install plugin","text":""},{"location":"ui-buttons/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-buttons/#import-plugin","title":"Import plugin","text":""},{"location":"ui-buttons/#import-class","title":"Import class","text":""},{"location":"ui-buttons/#add-buttons-object","title":"Add Buttons object","text":"
    var buttons = scene.rexUI.add.buttons({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n// buttonsType: undefined,\n\n// Elements\n// background: backgroundGameObject,\n\nbuttons: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\nexpand: false,\nalign: undefined,\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n},\n\n// space: 0,\n// space: { left: 0, right:0, top:0, bottom:0, item:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n// eventEmitter: this,\n// groupName: undefined,\n\n// setValueCallback: undefined,  // or setButtonStateCallback: undefined\n// setValueCallbackScope: undefined  // or setButtonStateCallbackScope: undefined\n});\n
    "},{"location":"ui-buttons/#custom-class","title":"Custom class","text":""},{"location":"ui-buttons/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    buttons.layout();\n

    See also - dirty

    "},{"location":"ui-buttons/#other-properties","title":"Other properties","text":"

    See sizer object

    "},{"location":"ui-buttons/#events","title":"Events","text":""},{"location":"ui-buttons/#emit-button-click-event","title":"Emit button click event","text":"
    buttons.emitButtonClick(index);\n
    "},{"location":"ui-buttons/#enabledisable-input-of-button","title":"Enable/disable input of button","text":""},{"location":"ui-buttons/#get-element","title":"Get element","text":""},{"location":"ui-buttons/#add-child","title":"Add child","text":""},{"location":"ui-buttons/#remove-child","title":"Remove child","text":""},{"location":"ui-buttons/#showhide-button","title":"Show/hide button","text":"

    Hidden elements won't be counted when layouting. Call buttons.layout(), or topSizer.layout() after show/hide any button.

    "},{"location":"ui-buttons/#for-each-button","title":"For each button","text":"
    buttons.forEachButtton(callback, scope);\n
    "},{"location":"ui-buttons/#checkboxesradio","title":"Checkboxes/radio","text":""},{"location":"ui-buttons/#checkboxes","title":"Checkboxes","text":""},{"location":"ui-buttons/#radio","title":"Radio","text":""},{"location":"ui-buttons/#events_1","title":"Events","text":""},{"location":"ui-chart/","title":"Chart","text":""},{"location":"ui-chart/#introduction","title":"Introduction","text":"

    Draw chart on canvas.

    "},{"location":"ui-chart/#live-demos","title":"Live demos","text":""},{"location":"ui-chart/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-chart/#install-plugin","title":"Install plugin","text":""},{"location":"ui-chart/#install-chartjs","title":"Install chart.js","text":"

    Chart.js is not included in rexUI, installs it before creating any chart.

    scene.load.script('chartjs', 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.8.0/chart.min.js');\n
    or
    scene.load.script('chartjs', 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js');\n

    "},{"location":"ui-chart/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-chart/#import-plugin","title":"Import plugin","text":""},{"location":"ui-chart/#import-class","title":"Import class","text":""},{"location":"ui-chart/#add-chart-object","title":"Add chart object","text":"
    var chart = scene.rexUI.add.chart(x, y, width, height, config);\n
    "},{"location":"ui-chart/#custom-class","title":"Custom class","text":""},{"location":"ui-chart/#create-chart","title":"Create chart","text":"

    Create chart (if not creating at beginning).

    chart.setChart(config);\n
    "},{"location":"ui-chart/#chart-data","title":"Chart data","text":""},{"location":"ui-chart/#manipulate-chart-object","title":"Manipulate chart object","text":"
    1. Get chart object
      var chart = chart.chart;\n
    2. Set properties of chart
    3. Update chart
      chart.update();\n
    "},{"location":"ui-colorcomponents/","title":"Color components","text":""},{"location":"ui-colorcomponents/#introduction","title":"Introduction","text":"

    Edit color value by RGB, or HSV input fields. Clicking fist label can switch color format between RGB and HSV

    "},{"location":"ui-colorcomponents/#live-demos","title":"Live demos","text":""},{"location":"ui-colorcomponents/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-colorcomponents/#install-plugin","title":"Install plugin","text":""},{"location":"ui-colorcomponents/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-colorcomponents/#import-plugin","title":"Import plugin","text":""},{"location":"ui-colorcomponents/#import-class","title":"Import class","text":""},{"location":"ui-colorcomponents/#add-colorcomponents-object","title":"Add colorComponents object","text":"
    var colorComponents = scene.rexUI.add.colorComponents({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nbackground: backgroundGameObject,\n\nformatLabel: {\nbackground: {\nradius: 0,\ncolor: undefined, alpha: undefined,\nstrokeColor: undefined, strokeAlpha: undefined, strokeWidth: 2\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},\nalign: 'left',  // 'left'|'center'|'right'|'justify'\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n},\n\nspace: {left: 0, right: 0, top: 0, bottom: 0}\n},\n\n// formatLabel: labelGameObject,\n\ninputText: {\nwidth: undefined, height: undefined,\n\npadding: 0,  // {left: 0, right: 0, top: 0, bottom: 0}\n\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null,\n\n// Style when focus\n// 'focus.color': ...\n// 'focus.color2': ...\n// 'focus.stroke': ...\n},\nfocusStyle: undefined,\n\ninnerBounds: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBY: undefined,\noffsetX: 0,\noffsetY: 0,\n\n// Style when cursor move on\n// 'cursor.color': ...\n// 'cursor.backgroundColor': ...\n// 'cursor.xxx': ...\n},\ncursorStyle: undefined,\n\nwrap: {\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0\n},\nlineHeight: undefined,\nmaxLines: undefined,\nwrapWidth: undefined,\nletterSpacing: 0,\nhAlign: 0,\nvAlign: 'center',  // For single line text input\ncharWrap: true,    // For single line text input\n},\n\n// enterClose: true,\n// readOnly: false,\n\n// Callbacks\n// onOpen: function (textObject, hiddenInputText) {\n// },\n\n// onClose: function (textObject, hiddenInputText) {\n// },\n\n// onUpdate: function (text, textObject, hiddenInputText) {\n//     return text;\n// },   \n\n// onAddChar: function(child, index, canvasInput) {\n//    child.modifyStyle({...})\n// },\n\n// onCursorOut: function(child, cursorIndex, canvasInput) {\n//     child.modifyStyle({\n//         \n//     });\n// },\n\n// onCursorIn: function(child, cursorIndex, canvasInput) {\n//     child.modifyStyle({\n//         \n//     });\n// },\n},\n\n// inputText0: canvasInputGameObject,\n// inputText1: canvasInputGameObject,\n// inputText2: canvasInputGameObject,\n\n// proportion: { formatLabel: 0 },\n\nvaluechangeCallback: function(newValue, oldValue, knob) {\n},\nvaluechangeCallbackScope: undefined,\n\nvalue: 0xffffff,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\nitem: 0\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,    \n});\n
    "},{"location":"ui-colorcomponents/#custom-class","title":"Custom class","text":""},{"location":"ui-colorcomponents/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    colorComponents.layout();\n

    See also - dirty

    "},{"location":"ui-colorcomponents/#get-element","title":"Get element","text":""},{"location":"ui-colorcomponents/#value","title":"Value","text":"

    Change value will also change the position of marker on H-palette and SV-palette

    "},{"location":"ui-colorcomponents/#events","title":"Events","text":""},{"location":"ui-colorcomponents/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-colorinput/","title":"Color input","text":""},{"location":"ui-colorinput/#introduction","title":"Introduction","text":"

    Color number (0x0~0xffffff) or color string ('#000000'~'#ffffff', or 'red') input field.

    "},{"location":"ui-colorinput/#live-demos","title":"Live demos","text":""},{"location":"ui-colorinput/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-colorinput/#install-plugin","title":"Install plugin","text":""},{"location":"ui-colorinput/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-colorinput/#import-plugin","title":"Import plugin","text":""},{"location":"ui-colorinput/#import-class","title":"Import class","text":""},{"location":"ui-colorinput/#add-colorinput-object","title":"Add colorInput object","text":"
    var colorInput = scene.rexUI.add.colorInput({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nbackground: backgroundGameObject,\n\nswatch: undefined,\n// swatch: { shape: 'circle' },\n// swatch: { size: 30 },\n// swatch: swatchGameObject,\n// swatch: false,\n\n// swatchSize: undefined,  // or swatch: { size }\n// squareExpandSwatch: true,\n\ninputText: inputTextConfig,\n// inputText: false,\n\ncolorPicker : {\nwidth: 160, height: 170,\n\nbackground: {\nradius: 0,\ncolor: undefined, alpha: undefined,\nstrokeColor: undefined, strokeAlpha: undefined, strokeWidth: 2\n},\n// createBackgroundCallback: function(scene) {\n//     return gameObject;\n// }\n\n// hPalettePosition: 'bottom',\n\n// space: { left: 10, right: 10, top: 10, bottom: 10, item: 8 }\n},\n\ncolorComponents: {\n// height: undefined,\n\n// formatLabel: undefined,\n\n// inputText: undefined,\n\n// space: { item: 8 }\n},\n// colorComponents: false,\n\nvaluechangeCallback: function(newValue, oldValue, colorInput) {\n},\nvaluechangeCallbackScope: undefined,\n\nvalue: 0xffffff,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0,\ntext: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,    \n});\n
    "},{"location":"ui-colorinput/#custom-class","title":"Custom class","text":""},{"location":"ui-colorinput/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    colorInput.layout();\n

    See also - dirty

    "},{"location":"ui-colorinput/#get-element","title":"Get element","text":""},{"location":"ui-colorinput/#value","title":"Value","text":"

    Change value will also change the position of marker on H-palette and SV-palette

    "},{"location":"ui-colorinput/#events","title":"Events","text":""},{"location":"ui-colorinput/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-colorpicker/","title":"Color picker","text":""},{"location":"ui-colorpicker/#introduction","title":"Introduction","text":"

    Pick color value from H and SV palettes.

    "},{"location":"ui-colorpicker/#live-demos","title":"Live demos","text":""},{"location":"ui-colorpicker/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-colorpicker/#install-plugin","title":"Install plugin","text":""},{"location":"ui-colorpicker/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-colorpicker/#import-plugin","title":"Import plugin","text":""},{"location":"ui-colorpicker/#import-class","title":"Import class","text":""},{"location":"ui-colorpicker/#add-colorpicker-object","title":"Add colorPicker object","text":"
    var colorPicker = scene.rexUI.add.colorPicker({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nbackground: backgroundGameObject,\n\nhPalette: {\nposition: 'bottom',\nsize: 10,\nwidth: undefined,\nheight: undefined,       },\n\nsvPalette: {\nwidth: undefined,\nheight: undefined,\n},\n\nvaluechangeCallback: function(newValue, oldValue, knob) {\n},\nvaluechangeCallbackScope: undefined,\n\nvalue: 0xffffff,\n\n// space: { left: 0, right:0, top:0, bottom:0, item:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,    \n});\n
    "},{"location":"ui-colorpicker/#custom-class","title":"Custom class","text":""},{"location":"ui-colorpicker/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    colorPicker.layout();\n

    See also - dirty

    "},{"location":"ui-colorpicker/#get-element","title":"Get element","text":""},{"location":"ui-colorpicker/#value","title":"Value","text":"

    Change value will also change the position of marker on H-palette and SV-palette

    "},{"location":"ui-colorpicker/#events","title":"Events","text":""},{"location":"ui-colorpicker/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-confirmdialog/","title":"Confirm dialog","text":""},{"location":"ui-confirmdialog/#introduction","title":"Introduction","text":"

    Using json style to create confirm dialog, composed of simple-label title, simple-label content, with simple-label 0, 1, or 2 action button(s).

    "},{"location":"ui-confirmdialog/#live-demos","title":"Live demos","text":""},{"location":"ui-confirmdialog/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-confirmdialog/#install-plugin","title":"Install plugin","text":""},{"location":"ui-confirmdialog/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-confirmdialog/#import-plugin","title":"Import plugin","text":""},{"location":"ui-confirmdialog/#import-class","title":"Import class","text":""},{"location":"ui-confirmdialog/#add-dialog-object","title":"Add dialog object","text":"
    var dialog = scene.rexUI.add.confirmDialog({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// Elements\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\n// SimpleLabelConfig\ntitle: {\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\n// iconMask: false,\n// squareFitIcon: false,\n// iconSize: undefined, iconWidth: undefined, iconHeight: undefined,\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n// expandTextWidth: false,\n// expandTextHeight: false,\n\n// squareFitAction: false,\n// actionMask: false,\n// actionSize: undefined, actionWidth: undefined, actionHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n\nalign: undefined,  // 'left' | 'top' | 'right' | 'bottom' | 'center        \n},\n\ncontent: SimpleLabelConfig,\n\n/* TextArea\n    content: {\n        space: { left: 0, right: 0, top: 0, bottom: 0, text: 0, },\n\n        background: {\n            radius: 0,\n            // radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\n            color: undefined,\n            alpha: undefined,\n            strokeColor: undefined,\n            strokeAlpha: undefined,\n            strokeWidth: undefined,\n        },\n\n        text: {\n            fontFamily: 'Courier',\n            fontSize: '16px',\n            fontStyle: '',\n            backgroundColor: null,\n            color: '#fff',\n            stroke: '#fff',\n            strokeThickness: 0,\n            shadow: {\n                offsetX: 0,\n                offsetY: 0,\n                color: '#000',\n                blur: 0,\n                stroke: false,\n                fill: false\n            },                  \n            padding: {\n                left: 0,\n                right: 0,\n                top: 0,\n                bottom: 0,\n            },\n            // more text styles\n        },\n\n        // textWidth: undefined,\n        // textHeight: undefined,\n        // textMask: false,\n        // alwaysScrollable: false,\n\n        slider: {\n            track: { \n                width: 1, height: 1,\n                radius: 0, \n                color: undefined, alpha: 1,\n                strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n                shape: undefined\n            },\n\n            thumb: { \n                width: 1, height: 1,\n                radius: 0, \n                color: undefined, alpha: 1,\n                strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n                shape: undefined\n            },\n\n            // input: 'drag',\n            // position: 'right',\n\n            // hideUnscrollableSlider: false,\n            // adaptThumbSize: false,\n            // minThumbSize: undefined,\n        },\n\n        // scroller: {\n        //     threshold: 10,\n        //     slidingDeceleration: 5000,\n        //     backDeceleration: 2000,\n        //     pointerOutRelease: true,\n        //     dragRate: 1,\n        // },\n\n        mouseWheelScroller: false,\n        // mouseWheelScroller: {\n        //     focus: false,\n        //     speed: 0.1\n        // },\n\n        clamplChildOY: false,\n    }\n    */\n\nbuttonMode: 0,  // 0|1|2\n\nbutton: SimpleLabelConfig,\n// buttonA: SimpleLabelConfig\n// buttonB: SimpleLabelConfig\n\n// choice: SimpleLabelConfig,\n// choicesType\n// choicesWidth: undefined,\n// choicesHeight: undefined,\n\n// Space\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\ntitle: 0,\ntitleLeft: 0,\ntitleRight: 0,\n\ncontent: 0,\ncontentLeft: 0,\ncontentRight: 0,\n\nactionsLeft: 0,\nactionsRight: 0,\naction: 0,\n\nchoices: 0,\nchoicesLeft: 0,\nchoicesRight: 0,\nchoice: 0,\nchoiceLine: 0,\nchoiceColumn: 0, choiceRow: 0,\nchoicesBackgroundLeft: 0,\nchoicesBackgroundRight: 0,\nchoicesBackgroundTop: 0,\nchoicesBackgroundBottom: 0,\n},\n\nproportion: {\ntitle: 0,\ncontent: 0,\nactions: 0,\nchoices: 0,\n},\n\nexpand: {\ntitle: true,\ncontent: true,\nactions: false,\nchoices: true,\n},\n\nalign: {\ntitle: 'center',\ncontent: 'center',\nactions: 'center',\nchoices: 'center',\n},\n\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n}\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n}, creators);\n
    "},{"location":"ui-confirmdialog/#custom-class","title":"Custom class","text":""},{"location":"ui-confirmdialog/#reset-display-content","title":"Reset display content","text":"
    dialog.resetDisplayContent({\ntitle: '',\ncontent: '',\nbuttonA: '',\nbuttonB: '',\n});\n

    or

    dialog.resetDisplayContent({\ntitle: {\ntext: '',\n\nicon: undefined, iconFrame: undefined,\niconSize: undefined,\n\naction: undefined, actionFrame: undefined,\nactionSize: undefined,\n\n},\n\ncontent: {\ntext: '',\n\nicon: undefined, iconFrame: undefined,\niconSize: undefined,\n\naction: undefined, actionFrame: undefined,\nactionSize: undefined,\n\n},\n\nbuttonA: {\ntext: '',\n\nicon: undefined, iconFrame: undefined,\niconSize: undefined,\n\naction: undefined, actionFrame: undefined,\nactionSize: undefined,\n\n},\n\nbuttonB: {\ntext: '',\n\nicon: undefined, iconFrame: undefined,\niconSize: undefined,\n\naction: undefined, actionFrame: undefined,\nactionSize: undefined,\n\n},\n\nchoices: [\n{\ntext: '', value: undefined,\n\nicon: undefined, iconFrame: undefined,\niconSize: undefined,\n\naction: undefined, actionFrame: undefined,\nactionSize: undefined,\n},        // ...\n]\n});\n

    Run dialog.layout() after this method, to layout children again.

    "},{"location":"ui-confirmdialog/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    dialog.layout();\n

    See also - dirty

    "},{"location":"ui-confirmdialog/#modal","title":"Modal","text":"

    Pop this dialog as modal dialog, clicking any action button to close this modal dialog.

    dialog.modal({\n// cover: {\n//     color: 0x0,\n//     alpha: 0.8,\n//     transitIn: function(gameObject, duration) { },\n//     transitOut: function(gameObject, duration) { },\n// },\n// cover: false, \n\n// When to close modal dialog?\n// touchOutsideClose: false,\n// anyTouchClose: false,\n// timeOutClose: false,\n// manualClose: false,\n\n// duration: {\n//     in: 200,\n//     hold: 2000,\n//     out: 200\n// }\n\n// transitIn: 0,\n// transitOut: 0,\n\n// destroy: true\n});\n// dialog.modal(config, onClose);\n

    or

    dialog\n.modalPromise(config)\n.then(function(data){\n\n})\n
    "},{"location":"ui-confirmdialog/#get-element","title":"Get element","text":""},{"location":"ui-confirmdialog/#other-properties","title":"Other properties","text":"

    See dialog, sizer object, base sizer object, container-lite.

    "},{"location":"ui-dialog/","title":"Dialog","text":""},{"location":"ui-dialog/#introduction","title":"Introduction","text":"

    A container with a title, content, buttons and background.

    "},{"location":"ui-dialog/#live-demos","title":"Live demos","text":""},{"location":"ui-dialog/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-dialog/#install-plugin","title":"Install plugin","text":""},{"location":"ui-dialog/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-dialog/#import-plugin","title":"Import plugin","text":""},{"location":"ui-dialog/#import-class","title":"Import class","text":""},{"location":"ui-dialog/#add-dialog-object","title":"Add dialog object","text":"
    var dialog = scene.rexUI.add.dialog({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// Elements\nbackground: backgroundGameObject,\n\ntitle: titleGameObject,\n\ntoolbarBackground: toolbarBackgroundGameObject,\ntoolbar: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\n\nleftToolbarBackground: leftToolbarBackgroundGameObject,\nleftToolbar: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\n\ncontent: contentGameObject,\n\ndescription: descriptionGameObject,\n\nchoicesType: '',\n// choicesWidth: undefined,\n// choicesHeight: undefined,  // Used when choicesType is `'grid'`, `'grid-radio'`, or `'grid-checkboxes'`\nchoicesBackground: choicesBackgroundGameObject,\nchoices: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\n\nactionsBackground: actionsBackgroundGameObject,\nactions: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\n\n// Space\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\ntitle: 0,\ntitleLeft: 0,\ntitleRight: 0,\ncontent: 0,\ncontentLeft: 0,\ncontentRight: 0,\ndescription: 0,\ndescriptionLeft: 0,\ndescriptionRight: 0\nchoices: 0,\nchoicesLeft: 0,\nchoicesRight: 0,\nactionsLeft: 0,\nactionsRight: 0,\n\ntoolbarItem: 0,\nleftToolbarItem: 0,\n\nchoice: 0,\n// choiceLine: 0,   // Used when choicesType is `'wrap'`, `'wrap-radio'`, or `'wrap-checkboxes'`\n// choiceColumn: 0, // Used when choicesType is `'grid'`, `'grid-radio'`, or `'grid-checkboxes'`\n// choiceRow: 0,    // Used when choicesType is `'grid'`, `'grid-radio'`, or `'grid-checkboxes'`\nchoicesBackgroundLeft: 0,\nchoicesBackgroundRight: 0,\nchoicesBackgroundTop: 0,\nchoicesBackgroundBottom: 0,\n\naction: 0,\n},\n\nproportion: {\ntitle: 0,\ncontent: 0,\ndescription: 0,\nchoices: 0,\nactions: 0,\n},\n\nexpand: {\ntitle: true,\ncontent: true,\ndescription: true,\nchoices: true,\nactions: false,\n},\n\nalign: {\ntitle: 'center',\ncontent: 'center',\ndescription: 'center',\nchoices: 'center',\nactions: 'center',\n},\n\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n}\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-dialog/#custom-class","title":"Custom class","text":""},{"location":"ui-dialog/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    dialog.layout();\n

    See also - dirty

    "},{"location":"ui-dialog/#modal","title":"Modal","text":"

    Pop this dialog as modal dialog, clicking any action button to close this modal dialog.

    dialog.modal({\n// cover: {\n//     color: 0x0,\n//     alpha: 0.8,\n//     transitIn: function(gameObject, duration) { },\n//     transitOut: function(gameObject, duration) { },\n// },\n// cover: false, \n\n// When to close modal dialog?\n// touchOutsideClose: false,\n// anyTouchClose: false,\n// timeOutClose: false,\n// manualClose: false,\n\n// duration: {\n//     in: 200,\n//     hold: 2000,\n//     out: 200\n// }\n\n// transitIn: 0,\n// transitOut: 0,\n\n// destroy: true,\n\n// defaultBehavior: true,\n});\n// dialog.modal(config, onClose);\n

    or

    dialog\n.modalPromise(config)\n.then(function(data){\n\n})\n
    "},{"location":"ui-dialog/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-dialog/#events","title":"Events","text":""},{"location":"ui-dialog/#emit-button-click-event","title":"Emit button click event","text":""},{"location":"ui-dialog/#get-element","title":"Get element","text":""},{"location":"ui-dialog/#add-button","title":"Add button","text":"

    Add choice/action/toolbar/left-toolbar button

    dialog.addChoice(gameObject);\ndialog.addAction(gameObject);\ndialog.addToolbar(gameObject);\ndialog.addLeftToolbar(gameObject);\n
    "},{"location":"ui-dialog/#remove-button","title":"Remove button","text":""},{"location":"ui-dialog/#enabledisable-input-of-button","title":"Enable/disable input of button","text":""},{"location":"ui-dialog/#showhide-button","title":"Show/hide button","text":"

    Hidden elements won't be counted when layouting. Call dialog.layout(), or topSizer.layout() after show/hide any button.

    "},{"location":"ui-dialog/#for-each-button","title":"For each button","text":"
    dialog.forEachChoice(callback, scope);\ndialog.forEachAction(callback, scope);\ndialog.forEachToolbar(callback, scope);\ndialog.forEachLeftToolbar(callback, scope);\n
    "},{"location":"ui-dialog/#state-of-choices-buttons","title":"State of choices buttons","text":""},{"location":"ui-dialog/#radio","title":"Radio","text":""},{"location":"ui-dialog/#checkboxes","title":"Checkboxes","text":""},{"location":"ui-dialog/#events_1","title":"Events","text":""},{"location":"ui-dropdownlist/","title":"Drop down list","text":""},{"location":"ui-dropdownlist/#introduction","title":"Introduction","text":"

    A label can open a drop-down list panel.

    "},{"location":"ui-dropdownlist/#live-demos","title":"Live demos","text":""},{"location":"ui-dropdownlist/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-dropdownlist/#install-plugin","title":"Install plugin","text":""},{"location":"ui-dropdownlist/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-dropdownlist/#import-plugin","title":"Import plugin","text":""},{"location":"ui-dropdownlist/#import-class","title":"Import class","text":""},{"location":"ui-dropdownlist/#add-drop-down-list-object","title":"Add drop-down list object","text":"
    var dropDownList = scene.rexUI.add.dropDownList({\noptions: [\noption0,\noption1,\n// ...\n],\n\nlist: {\n// createBackgroundCallback: function(scene) {\n//     // this : dropDownList\n//     return gameObject;\n// },\n\ncreateButtonCallback: function(scene, option, index, options) {\n// this : dropDownList\nreturn gameObject;\n},\n\nonButtonClick: function(button, index, pointer, event) {\n// this : dropDownList\n},\n\n// onButtonOver: function(button, index, pointer, event) {\n//     // this : dropDownList\n// },\n\n// onButtonOut: function(button, index, pointer, event) {\n//     // this : dropDownList\n// },\n\n// easeIn: 500,\n// transitIn: undefined,\n// transitIn: function(listPanel, duration) {  },\n\n// easeOut: 100,\n// transitOut: undefined,\n// transitOut: function(listPanel, duration) {  },\n\n// wrap: false,\n// width: undefined, \n// height: undefined,\n// alignParent: 'text',\n// alignSide: '',\n// expandDirection: 0,\n// bounds: undefined,\n\n// space: {\n//     left: 0, right: 0, top: 0, bottom: 0, item: 0,\n//     line: 0\n// },\n\n// draggable: false\n},\n\nsetValueCallback: function(dropDownList, value, previousValue) {\n\n},\nsetValueCallbackScope: undefined,\nvalue: undefined,\n\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\nbackground: backgroundGameObject,\nicon: iconGameObject,\niconMask: false,\ntext: textGameObject,\nexpandTextWidth: false,\nexpandTextHeight: false,\naction: actionGameObject,\nactionMask: false,\nalign: undefined,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0,\ntext: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-dropdownlist/#custom-class","title":"Custom class","text":""},{"location":"ui-dropdownlist/#options","title":"Options","text":""},{"location":"ui-dropdownlist/#clicking","title":"Clicking","text":""},{"location":"ui-dropdownlist/#emit-button-click-event","title":"Emit button click event","text":"
    dropDownList.emitButtonClick(index);\n

    Will fire 'button.click' event

    dropDownList.on('button.click', function(dropDownList, listPanel, button, index, pointer, event) {\n// ...\n}, scope);\n
    "},{"location":"ui-dropdownlist/#value","title":"Value","text":""},{"location":"ui-dropdownlist/#openclose-list-panel","title":"Open/close list panel","text":""},{"location":"ui-dropdownlist/#open-list-panel","title":"Open list panel","text":""},{"location":"ui-dropdownlist/#close-list-panel","title":"Close list panel","text":""},{"location":"ui-dropdownlist/#toggle-list-panel","title":"Toggle list panel","text":""},{"location":"ui-dropdownlist/#other-properties","title":"Other properties","text":"

    See label object, sizer object, base sizer object, container-lite.

    "},{"location":"ui-dropdownlist/#events","title":"Events","text":""},{"location":"ui-fileselectorbutton/","title":"File selector button","text":""},{"location":"ui-fileselectorbutton/#introduction","title":"Introduction","text":"

    A transparent file chooser button (<input type=\"file\">) above a Label.

    "},{"location":"ui-fileselectorbutton/#live-demos","title":"Live demos","text":""},{"location":"ui-fileselectorbutton/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-fileselectorbutton/#install-plugin","title":"Install plugin","text":""},{"location":"ui-fileselectorbutton/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-fileselectorbutton/#import-plugin","title":"Import plugin","text":""},{"location":"ui-fileselectorbutton/#import-class","title":"Import class","text":""},{"location":"ui-fileselectorbutton/#add-file-chooser-object","title":"Add file chooser object","text":"
    var button = scene.add.fileSelectorButton({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\nbackground: backgroundGameObject,\n\nicon: iconGameObject,\n// iconMask: false,\n// squareFitIcon: false,\n// iconSize: undefined, iconWidth: undefined, iconHeight: undefined,\n\ntext: textGameObject,\nexpandTextWidth: false,\nexpandTextHeight: false,\n\naction: actionGameObject,\n// actionMask: false,\n// squareFitAction: false,\n// actionSize: undefined, actionWidth: undefined, actionHeight: undefined,\n\nalign: undefined,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0,\ntext: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n\n// accept: '',\n// multiple: false,\n});\n// var fileChooser = scene.add.fileSelectorButton(x, y, width, height, config);\n
    "},{"location":"ui-fileselectorbutton/#custom-class","title":"Custom class","text":""},{"location":"ui-fileselectorbutton/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    label.layout();\n

    See also - dirty

    "},{"location":"ui-fileselectorbutton/#get-element","title":"Get element","text":""},{"location":"ui-fileselectorbutton/#selected-files","title":"Selected files","text":"
    var files = fileChooser.files;\n
    "},{"location":"ui-fileselectorbutton/#set-accept-filter","title":"Set accept filter","text":"
    fileChooser.setAccept(accept);\n
    "},{"location":"ui-fileselectorbutton/#multiple-files","title":"Multiple files","text":""},{"location":"ui-fileselectorbutton/#events","title":"Events","text":""},{"location":"ui-fileselectorbutton/#load-file-to-cache","title":"Load file to cache","text":"
    fileChooser.loadFile(file, loaderType, key);\n// fileChooser.loadFile(file, loaderType, key, cahceType);\n

    or

    fileChooser.loadFilePromise(file, loaderType, key, cahceType)\n.then(function(content) {\n\n})\n
    "},{"location":"ui-fileselectorbutton/#create-object-url","title":"Create object URL","text":""},{"location":"ui-fileselectorbutton/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"

    See dom-element's Interactive with other game objects

    "},{"location":"ui-fileselectorbutton/#other-properties","title":"Other properties","text":"

    See label object, sizer object, base sizer object, container-lite.

    "},{"location":"ui-fixwidthbuttons/","title":"Fix-width buttons","text":""},{"location":"ui-fixwidthbuttons/#introduction","title":"Introduction","text":"

    A container with a group of fix-width buttons.

    "},{"location":"ui-fixwidthbuttons/#live-demos","title":"Live demos","text":""},{"location":"ui-fixwidthbuttons/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-fixwidthbuttons/#install-plugin","title":"Install plugin","text":""},{"location":"ui-fixwidthbuttons/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-fixwidthbuttons/#import-plugin","title":"Import plugin","text":""},{"location":"ui-fixwidthbuttons/#import-class","title":"Import class","text":""},{"location":"ui-fixwidthbuttons/#add-buttons-object","title":"Add Buttons object","text":"
    var buttons = scene.rexUI.add.fixWidthButtons({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// Elements\n// background: backgroundGameObject,\n\nbuttons: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\n// rtl: false,\nalign: 0,\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n},\n\n// space: 0,\n// space: {\n//     left: 0, right: 0, top: 0, bottom: 0,\n//     item: 0, line: 0,\n//     indentLeftOdd: 0, indentLeftEven: 0,\n//     indentTopOdd: 0, indentTopEven: 0,\n// },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n// eventEmitter: this,\n// groupName: undefined,\n\n// buttonsType: undefined,\n// setValueCallback: undefined,  // or setButtonStateCallback: undefined\n// setValueCallbackScope: undefined  // or setButtonStateCallbackScope: undefined\n});\n
    "},{"location":"ui-fixwidthbuttons/#custom-class","title":"Custom class","text":""},{"location":"ui-fixwidthbuttons/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    buttons.layout();\n

    See also - dirty

    "},{"location":"ui-fixwidthbuttons/#other-properties","title":"Other properties","text":"

    See sizer object

    "},{"location":"ui-fixwidthbuttons/#events","title":"Events","text":""},{"location":"ui-fixwidthbuttons/#emit-button-click-event","title":"Emit button click event","text":"
    buttons.emitButtonClick(index);\n
    "},{"location":"ui-fixwidthbuttons/#enabledisable-input-of-button","title":"Enable/disable input of button","text":""},{"location":"ui-fixwidthbuttons/#get-element","title":"Get element","text":""},{"location":"ui-fixwidthbuttons/#add-child","title":"Add child","text":""},{"location":"ui-fixwidthbuttons/#remove-child","title":"Remove child","text":""},{"location":"ui-fixwidthbuttons/#showhide-button","title":"Show/hide button","text":"

    The same as for each button of buttons.

    "},{"location":"ui-fixwidthbuttons/#for-each-button","title":"For each button","text":"

    The same as for each button of buttons.

    "},{"location":"ui-fixwidthbuttons/#checkboxesradio","title":"Checkboxes/radio","text":"

    The same as checkboxes/radio of buttons.

    "},{"location":"ui-fixwidthsizer/","title":"Fix-width sizer","text":""},{"location":"ui-fixwidthsizer/#introduction","title":"Introduction","text":"

    Layout children game objects into lines.

    "},{"location":"ui-fixwidthsizer/#live-demos","title":"Live demos","text":""},{"location":"ui-fixwidthsizer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-fixwidthsizer/#install-plugin","title":"Install plugin","text":""},{"location":"ui-fixwidthsizer/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-fixwidthsizer/#import-plugin","title":"Import plugin","text":""},{"location":"ui-fixwidthsizer/#import-class","title":"Import class","text":""},{"location":"ui-fixwidthsizer/#add-sizer-object","title":"Add sizer object","text":"
    var sizer = scene.rexUI.add.fixWidthSizer({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// space: {\n//     left: 0, right: 0, top: 0, bottom: 0,\n//     item: 0, line: 0, \n//     indentLeftOdd: 0, indentLeftEven: 0,\n// },\n\n// rtl: false,\n// align: 0,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    or

    var sizer = scene.rexUI.add.fixWidthSizer(x, y, {\n// width: 2,\n// height: 2\n// space: {\n//     left: 0, right: 0, top: 0, bottom: 0,\n//     item: 0, line: 0,\n//     indentLeftOdd: 0, indentLeftEven: 0,\n//     indentTopOdd: 0, indentTopEven: 0,\n// },\n\n// rtl: false,\n// align: 0,\n\n// name: '',\n// draggable: false\n});\n

    or

    var sizer = scene.rexUI.add.fixWidthSizer(x, y, width, height, {\n// space: {\n//     left: 0, right: 0, top: 0, bottom: 0,\n//     item: 0, line: 0\n// },\n\n// rtl: false,\n// align: 0,\n\n// name: '',\n// draggable: false\n});\n
    "},{"location":"ui-fixwidthsizer/#custom-class","title":"Custom class","text":""},{"location":"ui-fixwidthsizer/#add-background","title":"Add background","text":"
    sizer.addBackground(child);\n

    or

    sizer.addBackground(child, {left: 0, right: 0, top: 0, bottom: 0}, key);\n
    "},{"location":"ui-fixwidthsizer/#add-child","title":"Add child","text":"

    Add a game obejct to sizer

    sizer.add(child);\n

    or

    sizer.add(child,\n{\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nkey: undefined,\nindex: undefined\n}\n);\n

    or

    sizer.add(child, padding, key, index);\n
    "},{"location":"ui-fixwidthsizer/#insert-child","title":"Insert child","text":"
    sizer.insert(index, child, {\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nkey: undefined,\n}\n);\n

    or

    sizer.insert(index, child, padding, key);\n
    "},{"location":"ui-fixwidthsizer/#insert-at-position","title":"Insert at position","text":"
    sizer.insertAtPosition(x, y, child, {\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nkey: undefined,\n}\n);\n

    or

    sizer.insertAtPosition(x, y, index, child, padding, key);\n
    "},{"location":"ui-fixwidthsizer/#add-new-line","title":"Add new line","text":"
    sizer.addNewLine();\n
    "},{"location":"ui-fixwidthsizer/#layout-children","title":"Layout children","text":"

    Arrange position of all children.

    sizer.layout();\n

    See also - dirty

    "},{"location":"ui-fixwidthsizer/#remove-child","title":"Remove child","text":""},{"location":"ui-fixwidthsizer/#get-element","title":"Get element","text":""},{"location":"ui-fixwidthsizer/#other-properties","title":"Other properties","text":"

    See base-sizer object.

    "},{"location":"ui-folder/","title":"Folder","text":""},{"location":"ui-folder/#introduction","title":"Introduction","text":"

    A container with a title, foldable child, and background.

    "},{"location":"ui-folder/#live-demos","title":"Live demos","text":""},{"location":"ui-folder/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-folder/#install-plugin","title":"Install plugin","text":""},{"location":"ui-folder/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-folder/#import-plugin","title":"Import plugin","text":""},{"location":"ui-folder/#import-class","title":"Import class","text":""},{"location":"ui-folder/#add-folder-object","title":"Add folder object","text":"
    var folder = scene.rexUI.add.folder({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\nbackground: backgroundGameObject,\n\ntitle: titleGameObject,    child: childGameObject,\n// customChildOrigin: false,\n\ntoggleByTarget: undefined,\ntoggleClickConfig: {\nmode:'pointerup',\nclickInterval: 100,\nthreshold: undefined,\n},\n\nalign: {\ntitle: 'left',\nchild: 'left',\n},\n\nexpand: {\ntitle: true,\nchild: true,\n},\n\ntransition: {\nduration: 200,\nexpandCallback: undefined,\ncollapseCallback: undefined,\n},\n\nreLayoutTarget: undefined,\n\nonExpandStart: undefined,\nonExpandComplete: undefined,\nonCollapseStart: undefined,\nonCollapseComplete: undefined,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nitem: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-folder/#custom-class","title":"Custom class","text":""},{"location":"ui-folder/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    folder.layout();\n

    See also - dirty

    Note

    Layout topmost sizer when expanding/collapsing start.

    "},{"location":"ui-folder/#get-element","title":"Get element","text":""},{"location":"ui-folder/#expandcollapse","title":"Expand/collapse","text":""},{"location":"ui-folder/#transition-callbacks","title":"Transition callbacks","text":""},{"location":"ui-folder/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-folder/#events","title":"Events","text":""},{"location":"ui-gridbuttons/","title":"Grid buttons","text":""},{"location":"ui-gridbuttons/#introduction","title":"Introduction","text":"

    A container with a group of buttons in grids.

    "},{"location":"ui-gridbuttons/#live-demos","title":"Live demos","text":""},{"location":"ui-gridbuttons/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-gridbuttons/#install-plugin","title":"Install plugin","text":""},{"location":"ui-gridbuttons/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-gridbuttons/#import-plugin","title":"Import plugin","text":""},{"location":"ui-gridbuttons/#import-class","title":"Import class","text":""},{"location":"ui-gridbuttons/#add-grid-sizer-object","title":"Add grid sizer object","text":"
    var buttons = scene.rexUI.add.gridButtons({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// Elements\n// background: backgroundGameObject,\n\nbuttons: [\n[buttonGameObject, buttonGameObject, buttonGameObject, ...],\n[buttonGameObject, buttonGameObject, buttonGameObject, ...],\n[buttonGameObject, buttonGameObject, buttonGameObject, ...],\n...\n],\n// row: 0, \n// column: 0,   // col: 0\n// createCellContainerCallback: function(scene, x, y) {\n//       return cellContainer;\n// },    \nexpand: true,\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n},\n\n// space: {\n//     left: 0, right: 0, top: 0, bottom:0,\n//     column: 0, // [0, 0, 0]\n//     row: 0     // [0, 0, 0]\n// },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n// eventEmitter: this,\n// groupName: undefined,\n\n// buttonsType: undefined,\n// setValueCallback: undefined,  // or setButtonStateCallback: undefined\n// setValueCallbackScope: undefined  // or setButtonStateCallbackScope: undefined\n});\n
    "},{"location":"ui-gridbuttons/#custom-class","title":"Custom class","text":""},{"location":"ui-gridbuttons/#layout-children","title":"Layout children","text":"

    Arrange position of all children.

    buttons.layout();\n

    See also - dirty

    "},{"location":"ui-gridbuttons/#other-properties","title":"Other properties","text":"

    See grid sizer object.

    "},{"location":"ui-gridbuttons/#events","title":"Events","text":"

    The same as events of buttons.

    "},{"location":"ui-gridbuttons/#get-element","title":"Get element","text":""},{"location":"ui-gridbuttons/#showhide-button","title":"Show/hide button","text":"

    The same as for each button of buttons.

    "},{"location":"ui-gridbuttons/#for-each-button","title":"For each button","text":"

    The same as for each button of buttons.

    "},{"location":"ui-gridbuttons/#checkboxesradio","title":"Checkboxes/radio","text":"

    The same as checkboxes/radio of buttons.

    "},{"location":"ui-gridsizer/","title":"Grid sizer","text":""},{"location":"ui-gridsizer/#introduction","title":"Introduction","text":"

    Layout children game objects in grids.

    "},{"location":"ui-gridsizer/#live-demos","title":"Live demos","text":""},{"location":"ui-gridsizer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-gridsizer/#install-plugin","title":"Install plugin","text":""},{"location":"ui-gridsizer/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-gridsizer/#import-plugin","title":"Import plugin","text":""},{"location":"ui-gridsizer/#import-class","title":"Import class","text":""},{"location":"ui-gridsizer/#add-grid-sizer-object","title":"Add grid sizer object","text":"
    var gridSizer = scene.rexUI.add.gridSizer({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\ncolumn: 0,  // col: 0\nrow: 0,\n// columnProportions: undefined,\n// rowProportions: undefined,\n// space: {\n//     left: 0, right: 0, top: 0, bottom:0,\n//     column: 0, // [0, 0, 0]\n//     row: 0,    // [0, 0, 0]\n//     indentLeftOdd: 0, indentLeftEven: 0,\n//     indentTopOdd: 0, indentTopEven: 0,\n// },\n\n// createCellContainerCallback: function(scene, x, y, config) {\n//     config.expand = true;\n//     return cellContainer;\n// },\n\n// name: '',\n// draggable: false\n});\n

    or

    var gridSizer = scene.rexUI.add.gridSizer(x, y, {\ncolumn: 0,  // col: 0\nrow: 0,\n// columnProportions: undefined,\n// rowProportions: undefined,\n\n// space: {\n//     left: 0, right: 0, top: 0, bottom:0,\n//     column: 0, // [0, 0, 0]\n//     row: 0,    // [0, 0, 0]\n//     indentLeftOdd: 0, indentLeftEven: 0,\n//     indentTopOdd: 0, indentTopEven: 0,\n// },\n\n// createCellContainerCallback: function(scene, x, y, config) {\n//     config.expand = true;\n//     return cellContainer;\n// },\n\n// width: undefined,\n// height: undefined\n});\n

    or

    var gridSizer = scene.rexUI.add.gridSizer(x, y, width, height, {\ncolumn: 0,   // col: 0\nrow: 0,\n// columnProportions: undefined,\n// rowProportions: undefined,\n\n// space: {\n//     left: 0, right: 0, top: 0, bottom:0,\n//     column: 0, // [0, 0, 0]\n//     row: 0,    // [0, 0, 0]\n//     indentLeftOdd: 0, indentLeftEven: 0,\n//     indentTopOdd: 0, indentTopEven: 0,\n// },\n\n// createCellContainerCallback: function(scene, x, y, config) {\n//     config.expand = true;\n//     return cellContainer;\n// },\n});\n

    or

    var gridSizer = scene.rexUI.add.gridSizer(x, y, width, height, column, row, {\n// space: {\n//     left: 0, right: 0, top: 0, bottom:0,\n//     column: 0, // [0, 0, 0]\n//     row: 0,    // [0, 0, 0]\n//     indentLeftOdd: 0, indentLeftEven: 0,\n//     indentTopOdd: 0, indentTopEven: 0,\n// },\n\n// createCellContainerCallback: function(scene, x, y, config, gridSizer) {\n//     config.expand = true;\n//     return cellContainer;\n// },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-gridsizer/#custom-class","title":"Custom class","text":""},{"location":"ui-gridsizer/#add-background","title":"Add background","text":"
    gridSizer.addBackground(child);\n

    or

    gridSizer.addBackground(child, {left: 0, right: 0, top: 0, bottom: 0}, key);\n
    "},{"location":"ui-gridsizer/#add-child","title":"Add child","text":"

    Add a game obejct to grid sizer

    gridSizer.add(child, column, row);\n

    or

    gridSizer.add(child,\n{\ncolumn: 0,\nrow: 0,\nalign: 'center',\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nexpand: false,\nkey: undefined\n}\n);\n

    or

    gridSizer.add(child, column, row, align, padding, expand, key);\n
    "},{"location":"ui-gridsizer/#insert-empty-rowcolumn","title":"Insert empty row/column","text":""},{"location":"ui-gridsizer/#proportion","title":"Proportion","text":"

    Set proportion of each column or row via

    gridSizer.setColumnProportion(columnIndex, proportion);\ngridSizer.setRowProportion(rowIndex, proportion);\n
    "},{"location":"ui-gridsizer/#layout-children","title":"Layout children","text":"

    Arrange position of all children.

    gridSizer.layout();\n

    See also - dirty

    "},{"location":"ui-gridsizer/#grid-index-child","title":"Grid index <-> child","text":""},{"location":"ui-gridsizer/#remove-child","title":"Remove child","text":""},{"location":"ui-gridsizer/#grid-size","title":"Grid size","text":""},{"location":"ui-gridsizer/#get-element","title":"Get element","text":""},{"location":"ui-gridsizer/#reset-grid","title":"Reset grid","text":"
    sizer.resetGrid(column, row, columnProportions, rowProportions, space);\n

    Note

    Children game objects will be removed without destroyed.

    Note

    Will invoke createCellContainerCallback to create cellContainer of each cell.

    "},{"location":"ui-gridsizer/#other-properties","title":"Other properties","text":"

    See base sizer object, container-lite.

    "},{"location":"ui-gridtable/","title":"Grid table","text":""},{"location":"ui-gridtable/#introduction","title":"Introduction","text":"

    A container with a grid table, slider, and scroller.

    "},{"location":"ui-gridtable/#live-demos","title":"Live demos","text":""},{"location":"ui-gridtable/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-gridtable/#install-plugin","title":"Install plugin","text":""},{"location":"ui-gridtable/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-gridtable/#import-plugin","title":"Import plugin","text":""},{"location":"ui-gridtable/#import-class","title":"Import class","text":""},{"location":"ui-gridtable/#add-table-object","title":"Add table object","text":"
    var table = scene.rexUI.add.gridTable({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nscrollMode: 0,\n\n// Elements\nbackground: backgroundGameObject,\n\ntable: {\nwidth: undefined,\nheight: undefined,\n\ncellWidth: undefined,\ncellHeight: undefined,\ncolumns: 1,\n// rows: 1,\nmask: {\npadding: 0,\n// updateMode: 0,\n},\n// enableLayer: false,\ninteractive: true,\nreuseCellContainer: false,\n\n// click: undefined,\n// tap: undefined,\n// press: undefined,\n// swipe: undefined,\n},\n\nslider: {\n// background: sliderBackgroundGameObject,\ntrack: trackGameObject,\n/* \n        track: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\nthumb: thumbGameObject,\n/* \n        thumb: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\n// input: 'drag',\n// position: 'right',\n\n// hideUnscrollableSlider: false,\n// adaptThumbSize: false,\n// minThumbSize: undefined,\n\n// buttons: {\n//     top: topButtonGameObject, bottom: bottomButtonGameObject,\n//     left: leftButtonGameObject, right: rightButtonGameObject,\n//     step: 0.01,\n// }\n},\n\n// scroller: {\n//     threshold: 10,\n//     slidingDeceleration: 5000,\n//     backDeceleration: 2000,\n//     pointerOutRelease: true,\n//     dragRate: 1,\n// },\n\nmouseWheelScroller: false,\n// mouseWheelScroller: {\n//     focus: false,\n//     speed: 0.1\n// }.\n\nclamplChildOY: false,\n\nheader: headerGameObject,\nfooter: footerGameObject,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\ntable: 0,\n// table: {\n//    top: 0,\n//    bottom: 0,\n//    left: 0,\n//    right: 0,\n//},\n\nslider: 0,\n// slider: {\n//     top: 0,\n//     bottom: 0,\n//     left: 0,\n//     right: 0,\n// },\n\nheader: 0,\nfooter: 0,\n},\n\nexpand: {\nheader: true,\nfooter: true,\n},\n\nalign: {\nheader: 'center',\nfooter: 'center',\n},\n\ncreateCellContainerCallback: function(cell, cellContainer) {\nvar scene = cell.scene,\nwidth = cell.width,\nheight = cell.height,\nitem = cell.item,\nitems = cell.items,\nindex = cell.index;\nif (cellContainer === null) { // No reusable cell container, create a new one\n// cellContainer = scene.rexUI.add.label();\n}\n// Set child properties of cell container ...\n\n// cell.setCellContainerAlign();  // Set alignment of cellContainer\n\nreturn cellContainer; // or null\n},\n\nitems: [],\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n});\n
    "},{"location":"ui-gridtable/#custom-class","title":"Custom class","text":""},{"location":"ui-gridtable/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    table.layout();\n

    See also - dirty

    "},{"location":"ui-gridtable/#items","title":"Items","text":""},{"location":"ui-gridtable/#cell-container","title":"Cell container","text":""},{"location":"ui-gridtable/#scroll-content","title":"Scroll content","text":""},{"location":"ui-gridtable/#scroll-by-percentage","title":"Scroll by percentage","text":""},{"location":"ui-gridtable/#scroll-to-topbottom","title":"Scroll to top/bottom","text":""},{"location":"ui-gridtable/#scroll-to-row","title":"Scroll to row","text":""},{"location":"ui-gridtable/#enabledisable-scrolling","title":"Enable/disable scrolling","text":""},{"location":"ui-gridtable/#refresh-table-cells","title":"Refresh table cells","text":""},{"location":"ui-gridtable/#table-size","title":"Table size","text":""},{"location":"ui-gridtable/#other-properties","title":"Other properties","text":"

    See base sizer object, container-lite.

    "},{"location":"ui-gridtable/#events","title":"Events","text":""},{"location":"ui-gridtable/#get-element","title":"Get element","text":""},{"location":"ui-holygrail/","title":"Holy grail","text":""},{"location":"ui-holygrail/#introduction","title":"Introduction","text":"

    Layout elements in Holy grail style.

    "},{"location":"ui-holygrail/#live-demos","title":"Live demos","text":""},{"location":"ui-holygrail/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-holygrail/#install-plugin","title":"Install plugin","text":""},{"location":"ui-holygrail/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-holygrail/#import-plugin","title":"Import plugin","text":""},{"location":"ui-holygrail/#import-class","title":"Import class","text":""},{"location":"ui-holygrail/#add-holygrail-object","title":"Add holyGrail object","text":"
    var holyGrail = scene.rexUI.add.holyGrail({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nlayoutMode: 0,\n\n// Elements\nbackground: backgroundGameObject,\n\nheader: headerGameObject,\n\nleftSide: leftSideGameObject,\n\ncontent: contentGameObject,\n\nrightSide: rightSideGameObject,\n\nfooter: footerGameObject,\n\n// Space\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nheader: 0,  // {left, right, top, bottom}\nfooter: 0,  // {left, right, top, bottom}\nleftSide: 0, // {left, right, top, bottom}\nrightSide: 0, // {left, right, top, bottom}\n},\n\n// proportion: {\n//     header: 0,\n//     footer: 0,\n//     leftSide: 0,\n//     rightSide: 0,\n//     content: 1,\n// },\n\n// expand: {\n//     header: true,\n//     footer: true,\n//     leftSide: true,\n//     rightSide: true,\n//     content: false,\n// },\n\n// align: {\n//     header: 'center',\n//     footer: 'center',\n//     leftSide: 'center',\n//     rightSide: 'center',\n//     content: 'center',\n// },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-holygrail/#custom-class","title":"Custom class","text":""},{"location":"ui-holygrail/#layout-modes","title":"Layout modes","text":""},{"location":"ui-holygrail/#mode-0","title":"Mode 0","text":"

    Bottom row is footer. Default behavior.

    Header Left side Content Right side Footer"},{"location":"ui-holygrail/#mode-1","title":"Mode 1","text":"

    Left side will expand down to bottom row.

    Header Left side Content Right side Footer"},{"location":"ui-holygrail/#mode-2","title":"Mode 2","text":"

    Right side will expand down to bottom row.

    Header Left side Content Right side Footer"},{"location":"ui-holygrail/#mode-3","title":"Mode 3","text":"

    Left side and right side will expand down to bottom row.

    Header Left side Content Right side Footer"},{"location":"ui-holygrail/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    holyGrail.layout();\n

    See also - dirty

    "},{"location":"ui-holygrail/#re-build","title":"Re-build","text":"

    Destroy current elements then add elements with new config.

    holyGrail.build({\n// Elements\nbackground: backgroundGameObject,\n\nheader: headerGameObject,\n\nleftSide: leftSideGameObject,\n\ncontent: contentGameObject,\n\nrightSide: rightSideGameObject,\n\nfooter: footerGameObject,\n\nlayoutMode: 0,\n\n// Space\nspace: {        header: 0,  // {left, right, top, bottom}\nfooter: 0,  // {left, right, top, bottom}\nleftSide: 0, // {left, right, top, bottom}\nrightSide: 0, // {left, right, top, bottom}\n},\n\n// proportion: {\n//     header: 0,\n//     footer: 0,\n//     leftSide: 0,\n//     rightSide: 0,\n//     content: 1,\n// },\n\n// expand: {\n//     header: true,\n//     footer: true,\n//     leftSide: true,\n//     rightSide: true,\n//     content: false,\n// },\n\n// align: {\n//     header: 'center',\n//     footer: 'center',\n//     leftSide: 'center',\n//     rightSide: 'center',\n//     content: 'center',\n// },\n})\n
    "},{"location":"ui-holygrail/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-holygrail/#get-element","title":"Get element","text":""},{"location":"ui-knob/","title":"Knob","text":""},{"location":"ui-knob/#introduction","title":"Introduction","text":"

    A knob button based on circular progress shape.

    "},{"location":"ui-knob/#live-demos","title":"Live demos","text":""},{"location":"ui-knob/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-knob/#install-plugin","title":"Install plugin","text":""},{"location":"ui-knob/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-knob/#import-plugin","title":"Import plugin","text":""},{"location":"ui-knob/#import-class","title":"Import class","text":""},{"location":"ui-knob/#add-knob-object","title":"Add knob object","text":"
    var knob = scene.rexUI.add.knob({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nbackground: backgroundGameObject,\n\nbarColor: undefined,\ntrackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\nknobDepth: 0,\n\ntext: undefined,\ntextFormatCallback: undefined,\ntextFormatCallbackScope: undefined,\n\ninput: 'pan',\n\nvalue: 0,\ngap: undefined,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, knob) {\n},\nvaluechangeCallbackScope: undefined,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n\nenable: true,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-knob/#custom-class","title":"Custom class","text":""},{"location":"ui-knob/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    knob.layout();\n

    See also - dirty

    "},{"location":"ui-knob/#get-element","title":"Get element","text":""},{"location":"ui-knob/#enable","title":"Enable","text":""},{"location":"ui-knob/#value","title":"Value","text":"

    Change value will also change the position of knob thumb and width of knob indicator.

    "},{"location":"ui-knob/#ease-value","title":"Ease value","text":""},{"location":"ui-knob/#other-properties","title":"Other properties","text":"

    See overlap sizer object, base sizer object, container-lite.

    "},{"location":"ui-knob/#events","title":"Events","text":""},{"location":"ui-label/","title":"Label","text":""},{"location":"ui-label/#introduction","title":"Introduction","text":"

    A container with an icon, text, and background.

    "},{"location":"ui-label/#live-demos","title":"Live demos","text":""},{"location":"ui-label/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-label/#install-plugin","title":"Install plugin","text":""},{"location":"ui-label/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-label/#import-plugin","title":"Import plugin","text":""},{"location":"ui-label/#import-class","title":"Import class","text":""},{"location":"ui-label/#add-label-object","title":"Add label object","text":"
    var label = scene.rexUI.add.label({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\nbackground: backgroundGameObject,\n\nicon: iconGameObject,\n// iconMask: false,\n// squareFitIcon: false,\n// iconSize: undefined, iconWidth: undefined, iconHeight: undefined,\n\ntext: textGameObject,\nexpandTextWidth: false,\nexpandTextHeight: false,\n\naction: actionGameObject,\n// actionMask: false,\n// squareFitAction: false,\n// actionSize: undefined, actionWidth: undefined, actionHeight: undefined,\n\nalign: undefined,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0, iconTop: 0, iconBottom: 0, iconLeft: 0, iconRight: 0,\n\ntext: 0,\nactionTop: 0, actionBottom: 0, actionLeft: 0, actionRight: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-label/#expand-size-of-text","title":"Expand size of text","text":"

    Expand width/height of text when expandTextWidth/expandTextHeight is true

    To resize text object, text object should have resize method. For example

    class MyText extends Phaser.GameObjects.Text {\nconstructor(scene, x, y, text, style) {\nsuper(scene, x, y, text, style);\nscene.add.existing(this);\n}\nresize(width, height) {\nthis.setFixedSize(width, height);\nreturn this;\n}\n}\n

    Or uses bbcode text object, or tag text object

    "},{"location":"ui-label/#custom-class","title":"Custom class","text":""},{"location":"ui-label/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    label.layout();\n

    See also - dirty

    "},{"location":"ui-label/#get-element","title":"Get element","text":""},{"location":"ui-label/#text","title":"Text","text":""},{"location":"ui-label/#icon-texture","title":"Icon texture","text":""},{"location":"ui-label/#reset-display-content","title":"Reset display content","text":"
    label.resetDisplayContent({\ntext: '',\n\nicon: undefined, iconFrame: undefined,\niconSize: undefined,\n\naction: undefined, actionFrame: undefined,\nactionSize: undefined,\n\n})\n

    Run label.layout() after this method, to layout children again.

    "},{"location":"ui-label/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-menu/","title":"Menu","text":""},{"location":"ui-menu/#introduction","title":"Introduction","text":"

    A container with buttons and sub-menu.

    "},{"location":"ui-menu/#live-demos","title":"Live demos","text":""},{"location":"ui-menu/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-menu/#install-plugin","title":"Install plugin","text":""},{"location":"ui-menu/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-menu/#import-plugin","title":"Import plugin","text":""},{"location":"ui-menu/#import-class","title":"Import class","text":""},{"location":"ui-menu/#add-menu-object","title":"Add menu object","text":"
    var menu = scene.rexUI.add.menu({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n\n// popup: true,\n// orientation: 1,\n// subMenuSide: undefined,\nitems: [],\n\ncreateBackgroundCallback: function(items) {\nvar scene = items.scene;\n// background = ...\nreturn background;\n},\ncreateBackgroundCallbackScope: undefined,\n\ncreateButtonCallback: function(item, index, items) {\nvar scene = item.scene;\n// var isFirstButton = (index === 0);\n// var isLastButton = (index === (items.length - 1));\n// container = ...\nreturn container;\n},\ncreateButtonCallbackScope: undefined,\n\neaseIn: 0,\n// easeIn: {\n//     duration: 500,\n//     orientation: undefined,\n//     ease: 'Cubic'\n// },\ntransitIn: undefined,\n// transitIn: function(menu, duration) {  },\n\neaseOut: 0,\n// easeOut: {\n//     duration: 100,\n//     orientation: undefined,\n//     ease: 'Linear'\n// },\ntransitOut: undefined,\n// transitOut: function(menu, duration) {  },\n\n// expandEvent: 'button.click',\n\n// pointerDownOutsideCollapsing: true,\n\n// childrenKey: 'children',\n\nname: '',\n// draggable: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-menu/#custom-class","title":"Custom class","text":""},{"location":"ui-menu/#collapse","title":"Collapse","text":""},{"location":"ui-menu/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-menu/#events","title":"Events","text":""},{"location":"ui-namevaluelabel/","title":"Name value label","text":""},{"location":"ui-namevaluelabel/#introduction","title":"Introduction","text":"

    A container with name text, value text in a row, with a horizontal line progress bar, and an icon, background.

    "},{"location":"ui-namevaluelabel/#live-demos","title":"Live demos","text":""},{"location":"ui-namevaluelabel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-namevaluelabel/#install-plugin","title":"Install plugin","text":""},{"location":"ui-namevaluelabel/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-namevaluelabel/#import-plugin","title":"Import plugin","text":""},{"location":"ui-namevaluelabel/#import-class","title":"Import class","text":""},{"location":"ui-namevaluelabel/#add-label-object","title":"Add label object","text":"
    var label = scene.rexUI.add.nameValueLabel({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\nbackground: backgroundGameObject,\nicon: iconGameObject,\niconMask: false,\n\nnameText: nameTextGameObject,\nvalueText: valueTextGameObject,\n// valueTextFormatCallback: function(value, min, max) {\n//     return `${value}/${max}`;\n// },\nbar: {\ntrackColor: undefined,\ntrackThickness: 2,\ntrackStrokeColor: undefined,\nbarColor: undefined,\nbarColor2: undefined,\n\nskewX: 0,\n\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'linear'\n},\n}, // bar: undefined,\n\naction: actionGameObject,\nactionMask: false,\n\nalign: {        text: 'bottom',  // 'top', 'center', 'bottom'\n},\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0, iconTop: 0, iconBottom: 0,\nname: 0, value: 0,\nbar:0, barBottom: 0, barLeft: 0, barRight: 0,\ntext: 0,\nactionTop: 0, actionBottom: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-namevaluelabel/#custom-class","title":"Custom class","text":""},{"location":"ui-namevaluelabel/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    label.layout();\n

    See also - dirty

    "},{"location":"ui-namevaluelabel/#get-element","title":"Get element","text":""},{"location":"ui-namevaluelabel/#name-text","title":"Name text","text":""},{"location":"ui-namevaluelabel/#value-text","title":"Value text","text":""},{"location":"ui-namevaluelabel/#bar","title":"Bar","text":""},{"location":"ui-namevaluelabel/#icon-texture","title":"Icon texture","text":""},{"location":"ui-namevaluelabel/#set-value","title":"Set value","text":"

    Set valueText game object and bar game object.

    label.setValue(value, min, max);\n

    Will invoke valueTextFormatCallback callback.

    "},{"location":"ui-namevaluelabel/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-numberbar/","title":"Number bar","text":""},{"location":"ui-numberbar/#introduction","title":"Introduction","text":"

    A container with an icon, slider, text, and background.

    "},{"location":"ui-numberbar/#live-demos","title":"Live demos","text":""},{"location":"ui-numberbar/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-numberbar/#install-plugin","title":"Install plugin","text":""},{"location":"ui-numberbar/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-numberbar/#import-plugin","title":"Import plugin","text":""},{"location":"ui-numberbar/#import-class","title":"Import class","text":""},{"location":"ui-numberbar/#add-number-bar-object","title":"Add number bar object","text":"
    var numberBar = scene.rexUI.add.numberBar({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nbackground: backgroundGameObject,\nicon: iconGameObject,\niconMask: false,\nslider: {\nbackground: backgroundGameObject,\n/* \n        background: { \n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\ntrack: trackGameObject,\n/* \n        track: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */    indicator: indicatorGameObject,\n/* \n        indicator: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\nthumb: thumbGameObject,\n/* \n        thumb: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\ninput: 'drag',\ngap: undefined,        easeValue: {\nduration: 0,\nease: 'Linear'\n},\n}\ntext: textGameObject,\n\nvaluechangeCallback: function(newValue, oldValue, numberBar) {\n// numberBar.text = Math.round(Phaser.Math.Linear(0, 100, newValue));\n}\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0,\nslider: 0,\n},\n\nenable: true,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-numberbar/#custom-class","title":"Custom class","text":""},{"location":"ui-numberbar/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    numberBar.layout();\n

    See also - dirty

    "},{"location":"ui-numberbar/#get-element","title":"Get element","text":""},{"location":"ui-numberbar/#enable","title":"Enable","text":""},{"location":"ui-numberbar/#value","title":"Value","text":"

    Change value will also change the position of slider thumb and width of slider indicator.

    "},{"location":"ui-numberbar/#ease-value","title":"Ease value","text":""},{"location":"ui-numberbar/#text","title":"Text","text":""},{"location":"ui-numberbar/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-numberbar/#events","title":"Events","text":""},{"location":"ui-overlapsizer/","title":"Overlap sizer","text":""},{"location":"ui-overlapsizer/#introduction","title":"Introduction","text":"

    Layout children game objects overlapped.

    "},{"location":"ui-overlapsizer/#live-demos","title":"Live demos","text":""},{"location":"ui-overlapsizer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-overlapsizer/#install-plugin","title":"Install plugin","text":""},{"location":"ui-overlapsizer/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-overlapsizer/#import-plugin","title":"Import plugin","text":""},{"location":"ui-overlapsizer/#import-class","title":"Import class","text":""},{"location":"ui-overlapsizer/#add-sizer-object","title":"Add sizer object","text":"
    var sizer = scene.rexUI.add.overlapSizer({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n// space: { left: 0, right:0, top:0, bottom:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    or

    var sizer = scene.rexUI.add.overlapSizer(x, y, {\n// width: undefined,\n// height: undefined,\n// anchor: undefined,\n// space: { left: 0, right:0, top:0, bottom:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    or

    var sizer = scene.rexUI.add.overlapSizer(x, y, width, height, {\n// anchor: undefined,\n// space: { left: 0, right:0, top:0, bottom:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-overlapsizer/#custom-class","title":"Custom class","text":""},{"location":"ui-overlapsizer/#add-background","title":"Add background","text":"
    sizer.addBackground(child);\n

    or

    sizer.addBackground(child, {left: 0, right: 0, top: 0, bottom: 0}, key);\n
    "},{"location":"ui-overlapsizer/#add-child","title":"Add child","text":"

    Add a game obejct to sizer

    sizer.add(child);\n

    or

    sizer.add(child,\n{\nkey: undefined,\nalign: 'center',\noffsetX: 0,\noffsetY: 0,\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nexpand: true,        minWidth: undefined,\nminHeight: undefined\n}\n);\n

    or

    sizer.add(child, key, align, padding, expand, minWidth, minHeight, offsetX, offsetY);\n
    "},{"location":"ui-overlapsizer/#layout-children","title":"Layout children","text":"

    Arrange position of all children.

    sizer.layout();\n

    See also - dirty

    "},{"location":"ui-overlapsizer/#remove-child","title":"Remove child","text":""},{"location":"ui-overlapsizer/#get-element","title":"Get element","text":""},{"location":"ui-overlapsizer/#other-properties","title":"Other properties","text":"

    See base sizer object, container-lite.

    "},{"location":"ui-overview/","title":"Overview","text":""},{"location":"ui-overview/#install-ui-plugins","title":"Install ui plugins","text":""},{"location":"ui-overview/#install-from-minify-file","title":"Install from minify file","text":"
    1. Download minify file (link).
    2. Install ui plugin in preload stage
      scene.load.scenePlugin({\nkey: 'rexuiplugin',\nurl: filePath,\nsceneKey: 'rexUI'\n});\n
    "},{"location":"ui-overview/#install-from-npm-package","title":"Install from npm package","text":"
    1. Install rex plugins
      npm i phaser3-rex-plugins\n
    2. Install ui plugin in configuration of game
      import RexUIPlugin from 'phaser3-rex-plugins/templates/ui/ui-plugin.js';\n\nvar config = {\n// ...\nplugins: {\nscene: [{\nkey: 'rexUI',\nplugin: RexUIPlugin,\nmapping: 'rexUI'\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"ui-overview/#using-typescript-declaration-file","title":"Using typescript declaration file","text":"
    import RexUIPlugin from 'phaser3-rex-plugins/templates/ui/ui-plugin.js';\n\nclass Game extends Phaser.Scene {\nrexUI: RexUIPlugin;  // Declare scene property 'rexUI' as RexUIPlugin type\n\ncreate() {\nvar sizer = this.rexUI.add.sizer({\n// ...\n})\n}\n}\n\nvar game = new Phaser.Game({\nscene: Game,\n// ...\nplugins: {\nscene: [{\nkey: 'rexUI',\nplugin: RexUIPlugin,\nmapping: 'rexUI'\n},\n// ...\n]\n}\n// ...\n});\n

    See this example

    "},{"location":"ui-overview/#list-of-ui-plugins","title":"List of ui plugins","text":""},{"location":"ui-overview/#ui-components","title":"UI components","text":"
    1. Badge label: A container with badges above a main item.
    2. Buttons: A container with a group of buttons.
    3. Color componets: Edit color value by RGB, or HSV input fields.
    4. Color input: Color number or color string input field.
    5. Color picker: Pick color value from H and SV palettes.
    6. Confirm dialog: Using json style to create confirm dialog.
    7. Dialog: A container with a title, content, buttons and background.
    8. Drop down list: A label can open a drop-down list panel.
    9. File selector button: A transparent file chooser button above a Label.
    10. Fix-width-buttons: A container with a group of fix-width buttons.
    11. Fix-width-sizer: Layout children game objects into lines.
    12. Folder: A container with a title, foldable child, and background.
    13. Grid-buttons: A container with a group of buttons in grids.
    14. Grid-sizer: Layout children game objects in grids.
    15. Grid-table: A container with a grid table, slider, and scroller.
    16. Holy grail: Layout elements in Holy grail style.
    17. Knob: A knob button based on circular progress.
    18. Label: A container with an icon, text, and background.
    19. Menu: A container with buttons and sub-menu.
    20. Name-value label: A container with name text, value text in a row, with a horizontal line progress bar, and an icon, background.
    21. Number-bar: A container with an icon, slider, text, and background.
    22. Overlap sizer: Layout children game objects overlapped.
    23. Pages: A container with pages, only current page is visible.
    24. Perspective card: A container with front and back faces.
    25. Scroll-able panel: A container with a panel, slider, and scroller.
    26. Simple drop down list: Using plain object to create drop down list.
    27. Simple label: Using json style to create label.
    28. Sizer: Layout children game objects.
    29. Slider: A container with a track, indicator, thumb and background.
    30. Tab-pages: A container with tabs and pages, only current page is visible.
    31. Tabs: A container with 4 groups of buttons around a center panel.
    32. TextArea: A container with a text, slider, and scroller.
    33. Textbox: A container with an icon, (typing and paging) text, and background.
    34. Title label: A container with title, text in two rows, and an icon, background.
    35. Toast: Show text message for a short while.
    36. Tweaker: Fine-tuning properties of target object.

    Scroll-able table

    There are 3 kinds of scroll-able tables :

    "},{"location":"ui-overview/#basic-container","title":"Basic container","text":"
    1. ContainerLite: Control the position and angle of children game objects.
      var container = scene.rexUI.add.container(x, y);\n
      or
      class MyContainer extends RexPlugins.UI.Container {\nconstructor(scene, x, y, width, height, children) {\nsuper(scene, x, y, width, height, children);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#background-objects","title":"Background objects","text":"
    1. Round-rectangle: Round rectangle shape.
      var shape = scene.rexUI.add.roundRectangle(x, y, width, height, radius, fillColor);\n
      or
      class MyRoundRectangle extends RexPlugins.UI.RoundRectangle {\nconstructor(scene, x, y, width, height, radius, fillColor, fillAlpha) {\nsuper(scene, x, y, width, height, radius, fillColor, fillAlpha);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    2. Nine-patch: Stretchable imaage.
      var ninePatch = scene.rexUI.add.ninePatch(x, y, width, height, key, columns, rows, config);\n
      var ninePatch = scene.rexUI.add.ninePatch2(x, y, width, height, key, columns, rows, config);\n
      or
      class MyNinePatch extends RexPlugins.UI.NinePatch {\nconstructor(scene, x, y, width, height, key, columns, rows, config) {\nsuper(scene, x, y, width, height, key, columns, rows, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
      class MyNinePatch extends RexPlugins.UI.NinePatch2 {\nconstructor(scene, x, y, width, height, key, columns, rows, config) {\nsuper(scene, x, y, width, height, key, columns, rows, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    3. Custom shapes: Custom shapes on shape.
      var customShapes = scene.rexUI.add.customShapes(x, y, width, height, config);\n
      or
      class MyCustomShapes extends RexPlugins.UI.CustomShapes {\nconstructor(scene, x, y, width, height, config) {\nsuper(scene, x, y, width, height, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    4. Custom progress: Custom progress on shape.
      var customProgress = scene.rexUI.add.customProgress(x, y, width, height, config);\n
      or
      class MyCustomProgress extends RexPlugins.UI.CustomProgress {\nconstructor(scene, x, y, width, height, config) {\nsuper(scene, x, y, width, height, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}    
    5. Canvas-round-rectangle: Round rectangle on canvas.
      var shape = scene.rexUI.add.roundRectangleCanvas(x, y, width, height, radiusConfig, fillStyle, strokeStyle, lineWidth, fillColor2, isHorizontalGradient);\n
      or
      class MyRoundRectangleCanvas extends RexPlugins.UI.RoundRectangleCanvas {\nconstructor(scene, x, y, width, height, radiusConfig, fillStyle, strokeStyle, lineWidth, fillColor2, isHorizontalGradient) {\nsuper(scene, x, y, width, height, radiusConfig, fillStyle, strokeStyle, lineWidth, fillColor2, isHorizontalGradient);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    6. Cover: Rectangle shape covered full window, and block all touch events.
      var shape = scene.rexUI.add.cover(config);\n
      or
      class MyCover extends RexPlugins.UI.Cover {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#canvasshape-objects","title":"Canvas/Shape objects","text":"
    1. Canvas: Drawing on canvas.
      var canvas = scene.rexUI.add.canvas(x, y, width, height);\n// var canvas = scene.rexUI.add.canvas(x, y, width, height);\n
      or
      class MyCanvas extends RexPlugins.UI.Canvas {\nconstructor(scene, x, y, width, height) {\nsuper(scene, x, y, width, height);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    2. Circle mask image: Load a texture, then apply a circle mask.
      var image = scene.rexUI.add.circleMaskImage(x, y, key, frame, config);\n
      or
      class MyImage extends RexPlugins.UI.CircleMaskImage {\nconstructor(scene, x, y, key, frame, config) {\nsuper(scene, x, y, key, frame, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    3. Alpha mask image: Load a texture, then apply an alpha mask from another texture.
      var image = scene.rexUI.add.alphaMaskImage(x, y, key, frame, config);\n
      or
      class MyImage extends RexPlugins.UI.AlphaMaskImage {\nconstructor(scene, x, y, key, frame, config) {\nsuper(scene, x, y, key, frame, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    4. Circular progress shape: Circular progress bar shape.
      var circularProgress = scene.rexUI.add.circularProgress(x, y, radius, barColor, value, config);\n
      or
      class MyCircularProgress extends RexPlugins.UI.CircularProgress {\nconstructor(scene, x, y, radius, barColor, value, config) {\nsuper(scene, x, y, radius, barColor, value, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    5. Circular progress canvas: Circular progress bar on canvas
      var circularProgress = scene.rexUI.add.circularProgressCanvas(x, y, radius, barColor, value, config);\n
      or
      class MyCircularProgress extends RexPlugins.UI.CircularProgressCanvas {\nconstructor(scene, x, y, radius, barColor, value, config) {\nsuper(scene, x, y, radius, barColor, value, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    6. Line progress shape: Horizontal line progress bar shape.
      var lineProgress = scene.rexUI.add.lineProgress(x, y, width, height, barColor, value, config);\n
      or
      class MyLineProgress extends RexPlugins.UI.LinerProgress {\nconstructor(scene, x, y, width, height, barColor, value, config) {\nsuper(scene, x, y, width, height, barColor, value, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    7. Line progress canvas: Horizontal line progress bar filled with gradient color on canvas.
      var lineProgress = scene.rexUI.add.lineProgressCanvas(x, y, width, height, barColor, value, config);\n
      or
      class MyLineProgress extends RexPlugins.UI.LinerProgressCanvas {\nconstructor(scene, x, y, width, height, barColor, value, config) {\nsuper(scene, x, y, width, height, barColor, value, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    8. Checkbox: Checkbox input with drawing checker path animation.
      var checkbox = scene.rexUI.add.checkbox(x, y, width, height, color, config);\n
      or
      class MyCheckbox extends RexPlugins.UI.Checkbox {\nconstructor(scene, x, y, width, height, color, config) {\nsuper(scene, x, y, width, height, color, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    9. Toggle switch: Toggle-switch input.
      var toggleSwitch = scene.rexUI.add.toggleSwitch(x, y, width, height, color, config);\n
      or
      class MyToggleSwitch extends RexPlugins.UI.ToggleSwitch {\nconstructor(scene, x, y, width, height, color, config) {\nsuper(scene, x, y, width, height, color, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    10. Triangle: Trangle shape inside a rectangle bounds.
      var triangle = scene.rexUI.add.triangle(x, y, width, height, fillColor, fillAlpha);\n
      or
      class MyTriangle extends RexPlugins.UI.Triangle {\nconstructor(scene, x, y, width, height, fillColor, fillAlpha) {\nsuper(scene, x, y, width, height, fillColor, fillAlpha);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    11. Chart: Draw chart on canvas.
    "},{"location":"ui-overview/#colored-text-objects","title":"Colored text objects","text":"
    1. BBCode text: Drawing text with BBCode protocol.
      var txt = scene.rexUI.add.BBCodeText(x, y, text, style);\n
      or
      class MyText extends RexPlugins.UI.BBCodeText {\nconstructor(scene, x, y, text, style) {\nsuper(scene, x, y, text, style);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    2. Tag text: Displays text with multi-color, font face, or font size with tags.
      var txt = scene.rexUI.add.tagText(x, y, text, style);\n
      or
      class MyText extends RexPlugins.UI.TagText {\nconstructor(scene, x, y, text, style) {\nsuper(scene, x, y, text, style);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    3. Dynamic text: Control position, angle of each character drawn on a canvas.
      var txt = scene.rexUI.add.dynamicText(config);\n
      or
      class MyText extends RexPlugins.UI.DynamicText {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    4. Text player: Typing characters on dynamic text, waiting click or key enter, play sound effect or backgroun music.
      var txt = scene.rexUI.add.textPlayer(config);\n
      or
      class MyText extends RexPlugins.UI.TextPlayer {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    5. Canvas input: An invisible Input DOM element to receive character input and display on DynamicText.
      var txt = scene.rexUI.add.canvasInput(config);\n
      or
      class MyText extends RexPlugins.UI.CanvasInput {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#behaviors-of-text","title":"Behaviors of text","text":"
    1. Hidden text edit: Create an invisible Input DOM element to edit string content.
      var hiddenEdit = this.rexUI.add.hiddenEdit(textObject, config);\n
    2. Text edit: Create an input text object above a text object to edit string content.
      scene.rexUI.edit(textObject, config);\n// scene.rexUI.edit(textObject, config, onClose);\n
    3. Wrap-expand text
      var textObject = scene.rexUI.wrapExpandText(textObject);\n// var textObject = scene.rexUI.wrapExpandText(textObject, minWidth);\n
    4. Font-size-expand text
      var textObject = scene.rexUI.fontSizeExpandText(textObject);    
      or
      var textObject = scene.rexUI.fontSizeExpandText(textObject, {\nfitHeight: true\n});\n
    5. Set font-size to fit width
      var textObject = scene.rexUI.setFontSizeFitToWidth(textObject, width);\n
    6. Text typing
      var textTyping = scene.rexUI.textTyping(textObject, config);\n
    7. Text page
      var textPage = scene.rexUI.textPage(textObject, config);\n
    "},{"location":"ui-overview/#scaled-image","title":"Scaled image","text":"
    1. Image box: Keep aspect ratio of image game object after scale-down resizing.
      var image = scene.rexUI.add.imageBox(x, y, texture, frame, config);\n
      or
      class MyTransitionImage extends RexPlugins.UI.ImageBox {\nconstructor(scene, x, y, texture, frame, config) {\nsuper(scene, x, y, texture, frame, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#transition-image","title":"Transition image","text":"
    1. Transition image: Transit texture to another one.
      var image = scene.rexUI.add.transitionImage(x, y, texture, frame, config);\n
      or
      class MyTransitionImage extends RexPlugins.UI.TransitionImage {\nconstructor(scene, x, y, texture, frame, config) {\nsuper(scene, x, y, texture, frame, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    2. Transition image pack: Transit texture to another one, with some pre-build effects, extended from TransitionImage.
      var image = scene.rexUI.add.transitionImagePack(x, y, texture, frame, config);\n
      or
      class MyTransitionImagePack extends RexPlugins.UI.TransitionImagePack {\nconstructor(scene, x, y, texture, frame, config) {\nsuper(scene, x, y, texture, frame, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#states-game-objects","title":"States game objects","text":"
    1. States image: Using plain object to create Image game object, with active, hover, disable styles.
      var image = scene.rexUI.add.statesImage(config);\n
      or
      class MyStatesImage extends RexPlugins.UI.StatesImage {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    2. States text: Using plain object to create Text game object, with active, hover, disable styles.
      var txt = scene.rexUI.add.statesText(config);\n
      or
      class MyStatesText extends RexPlugins.UI.StatesText {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    3. States round-rectangle: Using plain object to create round rectangle game object, with active, hover, disable styles.
      var rect = scene.rexUI.add.statesRoundRectangle(config);\n
      or
      class MyStatesRoundRectangle extends RexPlugins.UI.StatesRoundRectangle {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#dom-game-objects","title":"Dom game objects","text":"
    1. Input text: Input DOM element.
      var image = scene.rexUI.add.inputText(config);\n
      or
      class MyInputText extends RexPlugins.UI.InputText {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    2. File chooser: Create a transparent file chooser button (<input type=\"file\">).
      var image = scene.rexUI.add.fileChooser(config);\n
      or
      class MyFileChooser extends RexPlugins.UI.FileChooser {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    3. File drop zone: Create a div element for dropping file(s).
      var image = scene.rexUI.add.fileDropZone(config);\n
      or
      class MyFileDropZpne extends RexPlugins.UI.FileDropZpne {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#touch-input","title":"Touch input","text":"
    1. Click: Fires 'click' event when touch releasd after pressed.
      var click = scene.rexUI.add.click(gameObject, config);\n
      or
      var click = new RexPlugins.UI.Click(gameObject, config);\n
    2. Click-Outside: Fires 'clickoutside' event when pointer-down or pointer-up outside of game object.
      var clickOutside = scene.rexUI.add.clickOutside(gameObject, config);\n
      or
      var clickOutside = new RexPlugins.UI.ClickOutside(gameObject, config);\n
    3. In touching: Fires 'intouch' event every tick when pressing on a game object.
      var inTouching = scene.rexUI.add.inTouching(gameObject, config);\n
      or
      var inTouching = new RexPlugins.UI.inTouching(gameObject, config);\n
    4. Tap: Get tap/multi-taps events of a game object.
      var tap = scene.rexUI.add.tap(gameObject, config);\n
      or
      var tap = new RexPlugins.UI.Tap(gameObject, config);\n
    5. Press: Get press events of a game object.
      var press = scene.rexUI.add.press(gameObject, config);\n
      or
      var press = new RexPlugins.UI.Press(gameObject, config);\n
    6. Swipe: Get swipe events of a game object.
      var swipe = scene.rexUI.add.swipe(gameObject, config);\n
      or
      var swipe = new RexPlugins.UI.Swipe(gameObject, config);\n
    7. Pan: Get pan events of a game object.
      var pan = scene.rexUI.add.pan(gameObject, config);\n
      or
      var pan = new RexPlugins.UI.Pan(gameObject, config);\n
    8. Pinch: Get scale factor from 2 dragging touch pointers.
      var pinch = scene.rexUI.add.pinch(config);\n
      or
      var pinch = new RexPlugins.UI.Pinch(config);\n
    9. Rotste: Get spin angle from 2 dragging touch pointers.
      var rotate = scene.rexUI.add.rotate(config);\n
      or
      var rotate = new RexPlugins.UI.Rotate(config);\n
    10. Touch event stop: Stop touch events propagation.
      var touchEventStop = scene.rexUI.add.touchEventStop(gameObject, config);\n
      or
      var touchEventStop = new RexPlugins.UI.TouchEventStop(gameObject, config);\n
    "},{"location":"ui-overview/#behaviors","title":"Behaviors","text":"
    1. Modal promise: Modal behavior wrapped into promise.
      scene.rexUI.modalPromise(gameObject, config)\n.then(function(closeEventData){ })\n
    2. Flip: Flip game object to another face by scaling width/height.
      var flip = scene.rexUI.add.flip(gameObject, config);\n
      or
      var flip = new RexPlugins.UI.Flip(gameObject, config);\n
    3. Fade in, fade out destroy
      scene.rexUI.fadeIn(gameObject, duration);\n// scene.rexUI.fadeIn(gameObject, duration, alpha);\n
      scene.rexUI.fadeOutDestroy(gameObject, duration);\n
    4. Ease-move to, ease-move from
      scene.rexUI.easeMoveTo(gameObject, duration, x, y);\n// scene.rexUI.easeMoveTo(gameObject, duration, x, y, ease);\n
      scene.rexUI.easeMoveFrom(gameObject, duration, x, y);\n// scene.rexUI.easeMoveFrom(gameObject, duration, x, y, ease);\n
    5. Shake
      scene.rexUI.shake(gameObject, config);\n
    6. Perspective: Snapshot children of containerlite, to a perspective render texture.
      var perspective = scene.rexUI.add.perspective(gameObject, config);\n
      or
      var perspective = new RexPlugins.UI.Perspective(gameObject, config);\n
    7. Skew: Snapshot children of containerlite, to a skew render texture.
      var skew = scene.rexUI.add.skew(gameObject, config);\n
      or
      var skew = new RexPlugins.UI.Skew(gameObject, config);\n
    "},{"location":"ui-overview/#helper-methods","title":"Helper methods","text":""},{"location":"ui-overview/#get-parent","title":"Get parent","text":""},{"location":"ui-overview/#showhide","title":"Show/hide","text":""},{"location":"ui-overview/#is-pointer-in-bounds","title":"Is pointer in bounds","text":"
    var isInBounds = scene.rexUI.isInTouching(gameObject);\n// var isInBounds = scene.rexUI.isInTouching(gameObject, pointer);\n
    "},{"location":"ui-overview/#event-promise","title":"Event promise","text":""},{"location":"ui-overview/#view-port","title":"View port","text":"

    View port is a rectangle of current visible area.

    var viewport = scene.rexUI.viewport;\n

    Which will be changed after resizing

    scene.scale.on('resize', function() {\nvar viewport = scene.rexUI.viewport;\n/*\n    sizer\n        .setPosition(viewport.centerX, viewport.centerY)\n        .setMinSize(viewport.width, viewport.height)\n        .layout();\n    */\n});\n
    "},{"location":"ui-overview/#yaml","title":"YAML","text":"

    js-yaml

    try {\nconst doc = scene.rexUI.yaml.load(yamlStrinig);\n} catch (e) {\n// ...\n}\n
    scene.rexUI.yaml.loadAll(data, function (doc) {\n// ...\n});\n
    "},{"location":"ui-overview/#demos","title":"Demos","text":""},{"location":"ui-pages/","title":"Pages","text":""},{"location":"ui-pages/#introduction","title":"Introduction","text":"

    A container with pages, only current page is visible.

    "},{"location":"ui-pages/#live-demos","title":"Live demos","text":""},{"location":"ui-pages/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-pages/#install-plugin","title":"Install plugin","text":""},{"location":"ui-pages/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-pages/#import-plugin","title":"Import plugin","text":""},{"location":"ui-pages/#import-class","title":"Import class","text":""},{"location":"ui-pages/#add-pages-object","title":"Add pages object","text":"
    var pages = scene.rexUI.add.pages({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n// space: { left: 0, right:0, top:0, bottom:0 },\n// swapMode: 0,\n// fadeIn: 0,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-pages/#custom-class","title":"Custom class","text":""},{"location":"ui-pages/#add-background","title":"Add background","text":"
    pages.addBackground(child);\n

    or

    pages.addBackground(child, {left: 0, right: 0, top: 0, bottom: 0}, key);\n
    "},{"location":"ui-pages/#add-page","title":"Add page","text":"
    pages.addPage(child, key, align, padding, expand);\n// pages.add(child, key, align, padding, expand);\n

    or

    pages.addPage(child, {\nkey: 0,\nalign: Phaser.Display.Align.TOP_LEFT,\npadding: {left: 0, right: 0, top: 0, bottom: 0}, expand: true\n}\n);\n// pages.add(child, config);\n
    "},{"location":"ui-pages/#swap-to-page","title":"Swap to page","text":"
    pages.swapPage(key);\n// pages.swapPage(key, fadeInDuration);\n

    Note

    This method will run pages.layout() to arrange position of current page.

    "},{"location":"ui-pages/#page-name","title":"Page name","text":""},{"location":"ui-pages/#page-object","title":"Page object","text":""},{"location":"ui-pages/#fade-in-duration","title":"Fade in duration","text":"
    pages.setFadeInDuration(duration);\n
    "},{"location":"ui-pages/#get-element","title":"Get element","text":""},{"location":"ui-pages/#other-properties","title":"Other properties","text":"

    See base sizer object, container-lite.

    "},{"location":"ui-pages/#events","title":"Events","text":""},{"location":"ui-perspectivecard/","title":"Perspective card","text":""},{"location":"ui-perspectivecard/#introduction","title":"Introduction","text":"

    A container with front and back faces.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"ui-perspectivecard/#live-demos","title":"Live demos","text":""},{"location":"ui-perspectivecard/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-perspectivecard/#install-plugin","title":"Install plugin","text":""},{"location":"ui-perspectivecard/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-perspectivecard/#import-plugin","title":"Import plugin","text":""},{"location":"ui-perspectivecard/#import-class","title":"Import class","text":""},{"location":"ui-perspectivecard/#add-card-object","title":"Add card object","text":"
    var sizer = scene.rexUI.add.perspectiveCard({    // x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nback: backGameObject,\nfront: frontGameObject,\n// face: 0,\n// orientation: 0,\n// snapshotPadding: 0,\n\n// flip : {\n//     frontToBack: 0,\n//     backToFront: 1,\n//     duration: 1000,\n//     ease: 'Cubic',\n//     delay: 0,\n// }\n\n// space: { left: 0, right:0, top:0, bottom:0 },\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n\n});\n
    "},{"location":"ui-perspectivecard/#custom-class","title":"Custom class","text":""},{"location":"ui-perspectivecard/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    card.layout();\n

    See also - dirty

    "},{"location":"ui-perspectivecard/#get-element","title":"Get element","text":""},{"location":"ui-perspectivecard/#face","title":"Face","text":""},{"location":"ui-perspectivecard/#face-instances","title":"Face instances","text":""},{"location":"ui-perspectivecard/#flip-behavior","title":"Flip behavior","text":""},{"location":"ui-perspectivecard/#start-flipping","title":"Start flipping","text":"
    card.flip.flip();\n// card.flip.flip(duration, repeat);\n

    or

    Note

    "},{"location":"ui-perspectivecard/#stop-flipping","title":"Stop flipping","text":"
    card.flip.stop();\n
    "},{"location":"ui-perspectivecard/#set-duration","title":"Set duration","text":"
    card.flip.setDuration(duration);\n// card.flip.duration = duration;\n
    "},{"location":"ui-perspectivecard/#set-ease","title":"Set ease","text":"
    card.flip.setEase(ease);\n// card.flip.ease = ease;\n
    "},{"location":"ui-perspectivecard/#events","title":"Events","text":""},{"location":"ui-perspectivecard/#status","title":"Status","text":""},{"location":"ui-perspectivecard/#rotation","title":"Rotation","text":"

    Warning

    Can't be used with flipping mode.

    "},{"location":"ui-perspectivecard/#other-properties","title":"Other properties","text":"

    See overlapSizer.

    "},{"location":"ui-scrollablepanel/","title":"Scroll-able panel","text":""},{"location":"ui-scrollablepanel/#introduction","title":"Introduction","text":"

    A container with a panel, slider, and scroller.

    "},{"location":"ui-scrollablepanel/#live-demos","title":"Live demos","text":""},{"location":"ui-scrollablepanel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-scrollablepanel/#install-plugin","title":"Install plugin","text":""},{"location":"ui-scrollablepanel/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-scrollablepanel/#import-plugin","title":"Import plugin","text":""},{"location":"ui-scrollablepanel/#import-class","title":"Import class","text":""},{"location":"ui-scrollablepanel/#add-scroll-able-panel-object","title":"Add scroll-able panel object","text":"
    var panel = scene.rexUI.add.scrollablePanel({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nscrollMode: 0,\n\n// Elements\nbackground: backgroundGameObject,\n\npanel: {\nchild: panelGameObject,\nmask: {\npadding: 0,\n// updateMode: 0,\n}\n}.\n\nslider: {\n// background: sliderBackgroundGameObject,\ntrack: trackGameObject,\n/* \n        track: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\nthumb: thumbGameObject,\n/* \n        thumb: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\n// input: 'drag',\n// position: 'right',\n\n// hideUnscrollableSlider: false,\n// adaptThumbSize: false,\n// minThumbSize: undefined,\n\n// buttons: {\n//     top: topButtonGameObject, \n//     bottom: bottomButtonGameObject,\n//     left: leftButtonGameObject, \n//     right: rightButtonGameObject,\n//     step: 0.01,\n// }\n},\n\n// scroller: {\n//     threshold: 10,\n//     slidingDeceleration: 5000,\n//     backDeceleration: 2000,\n//     pointerOutRelease: true,\n//     dragRate: 1,\n// },\n\nmouseWheelScroller: false,\n// mouseWheelScroller: {\n//     focus: false,\n//     speed: 0.1\n// },\n\nclamplChildOY: false,\n\nheader: headerGameObject,\nfooter: footerGameObject,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\npanel: 0,\n// panel: {\n//    top: 0,\n//    bottom: 0,\n//    left: 0,\n//    right: 0,\n//},\n\nslider: 0,\n// slider: {\n//     top: 0,\n//     bottom: 0,\n//     left: 0,\n//     right: 0,\n// },\n\nheader: 0,\nfooter: 0,\n},\n\nexpand: {\nheader: true,\nfooter: true,\n},\n\nalign: {\nheader: 'center',\nfooter: 'center',\n},\n\n// name: '',\n// draggable: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-scrollablepanel/#child-bounds","title":"Child bounds","text":"

    Scrollable panel will mask child if child's bounds (child.getBounds()) is across mask area.

    Bitmaptext game object does not have getBounds method. User can inject it by

    const Components = Phaser.GameObjects.Components;\nPhaser.Class.mixin(\nPhaser.GameObjects.BitmapText,\n[\nComponents.ComputedSize,\nComponents.GetBounds\n]\n);\n
    "},{"location":"ui-scrollablepanel/#custom-class","title":"Custom class","text":""},{"location":"ui-scrollablepanel/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    panel.layout();\n

    See also - dirty

    "},{"location":"ui-scrollablepanel/#scroll-content","title":"Scroll content","text":""},{"location":"ui-scrollablepanel/#scroll-by-percentage","title":"Scroll by percentage","text":""},{"location":"ui-scrollablepanel/#scroll-to-topbottom","title":"Scroll to top/bottom","text":""},{"location":"ui-scrollablepanel/#scroll-to-child","title":"Scroll to child","text":"
    panel.scrollToChild(child, align);\n
    "},{"location":"ui-scrollablepanel/#enabledisable-scrolling","title":"Enable/disable scrolling","text":""},{"location":"ui-scrollablepanel/#event","title":"Event","text":""},{"location":"ui-scrollablepanel/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-scrollablepanel/#get-element","title":"Get element","text":""},{"location":"ui-scrollablepanel/#input-events","title":"Input events","text":"

    Two possible solution to register input events to children of scrollable panel.

    "},{"location":"ui-scrollablepanel/#set-children-interactive","title":"Set children interactive","text":"

    Applies click, tap, press, swipe behaviors on this scrollable panel, to detect input events of children.

    panel.setChildrenInteractive({\ntargets: targetSizers,\n\n// click: {mode: 'release', clickInterval: 100},\n\n// over: undefined,\n\n// press: {time: 251, threshold: 9},\n\n// tap: {time: 250, tapInterval: 200, threshold: 9, tapOffset: 10, \n//       taps: undefined, minTaps: undefined, maxTaps: undefined,},\n\n// swipe: {threshold: 10, velocityThreshold: 1000, dir: '8dir'},\n\n// inputEventPrefix: 'child.',\n})\n

    See Base-sizer/Set children interactive

    "},{"location":"ui-scrollablepanel/#events","title":"Events","text":"

    See Base-sizer/Set children interactive/Events

    "},{"location":"ui-scrollablepanel/#individual-input-events","title":"Individual input events","text":"

    When scene.input.topOnly is true (default value), input events of children elements will block the drag-scrolling of scrollable panel. (Assmue that the children elememts are above scrollable panel)

    "},{"location":"ui-scrollablepanel/#steps-of-building-a-scrollable-panel","title":"Steps of building a scrollable panel","text":"
    1. Build child panel from bottom to top
    2. Build scrollable panel
    3. Add interactive events
    "},{"location":"ui-scrollbar/","title":"Scroll bar","text":""},{"location":"ui-scrollbar/#introduction","title":"Introduction","text":"

    A container with slider, two buttons, and background.

    "},{"location":"ui-scrollbar/#live-demos","title":"Live demos","text":""},{"location":"ui-scrollbar/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-scrollbar/#install-plugin","title":"Install plugin","text":""},{"location":"ui-scrollbar/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-scrollbar/#import-plugin","title":"Import plugin","text":""},{"location":"ui-scrollbar/#import-class","title":"Import class","text":""},{"location":"ui-scrollbar/#add-scroll-bar-object","title":"Add scroll bar object","text":"
    var scrollBar = scene.rexUI.add.scrollBar({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\norientation: 0,\n\nbackground: backgroundGameObject,    slider: {\nbackground: backgroundGameObject,\n/* \n        background: { \n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\ntrack: trackGameObject,\n/* \n        track: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */    indicator: indicatorGameObject,\n/* \n        indicator: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\nthumb: thumbGameObject,\n/* \n        thumb: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\ninput: 'drag',\ngap: undefined,        easeValue: {\nduration: 0,\nease: 'Linear'\n},\n},\n\nbuttons: {\ntop: topButtonGameObject, bottom: bottomButtonGameObject,\nleft: leftButtonGameObject, right: rightButtonGameObject,\nstep: 0.01,\n}\n\nvaluechangeCallback: function(newValue, oldValue, scrollBar) {\n// scrollBar.text = Math.round(Phaser.Math.Linear(0, 100, newValue));\n}\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\nitem: 0\n},\n\nenable: true,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-scrollbar/#custom-class","title":"Custom class","text":""},{"location":"ui-scrollbar/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    scrollBar.layout();\n

    See also - dirty

    "},{"location":"ui-scrollbar/#get-element","title":"Get element","text":""},{"location":"ui-scrollbar/#enable","title":"Enable","text":""},{"location":"ui-scrollbar/#value","title":"Value","text":"

    Change value will also change the position of slider thumb and width of slider indicator.

    "},{"location":"ui-scrollbar/#ease-value","title":"Ease value","text":""},{"location":"ui-scrollbar/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-scrollbar/#events","title":"Events","text":""},{"location":"ui-simpledropdownlist/","title":"Simple drop down list","text":""},{"location":"ui-simpledropdownlist/#introduction","title":"Introduction","text":"

    Using plain object to create drop down list.

    "},{"location":"ui-simpledropdownlist/#live-demos","title":"Live demos","text":""},{"location":"ui-simpledropdownlist/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-simpledropdownlist/#install-plugin","title":"Install plugin","text":""},{"location":"ui-simpledropdownlist/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-simpledropdownlist/#import-plugin","title":"Import plugin","text":""},{"location":"ui-simpledropdownlist/#import-class","title":"Import class","text":""},{"location":"ui-simpledropdownlist/#add-drop-down-list-object","title":"Add drop-down list object","text":"
    var dropDownList = scene.rexUI.add.simpleDropDownList({\nlabel: SimpleLabelConfig,\n\nbutton: SimpleLabelConfig,\n\nlist: {\n// easeIn: 500,\n// transitIn: undefined,\n// transitIn: function(listPanel, duration) {  },\n\n// easeOut: 100,\n// transitOut: undefined,\n// transitOut: function(listPanel, duration) {  },\n\n// wrap: false,\n// width: undefined, \n// height: undefined,\n// alignParent: 'text',\n// alignSide: '',\n// expandDirection: 0,\n// bounds: undefined,\n\n// space: {\n//     left: 0, right: 0, top: 0, bottom: 0, item: 0,\n//     line: 0\n// },\n\n// draggable: false        \n}\n\n}, creators);\n
    "},{"location":"ui-simpledropdownlist/#custom-class","title":"Custom class","text":""},{"location":"ui-simpledropdownlist/#options","title":"Options","text":""},{"location":"ui-simpledropdownlist/#other-properties","title":"Other properties","text":"

    See drop-down list, label, sizer object, base sizer object, container-lite.

    "},{"location":"ui-simpledropdownlist/#events","title":"Events","text":"

    See Events section of drop-down list

    "},{"location":"ui-simplelabel/","title":"Simple label","text":""},{"location":"ui-simplelabel/#introduction","title":"Introduction","text":"

    Using plain object to create label.

    "},{"location":"ui-simplelabel/#live-demos","title":"Live demos","text":""},{"location":"ui-simplelabel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-simplelabel/#install-plugin","title":"Install plugin","text":""},{"location":"ui-simplelabel/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-simplelabel/#import-plugin","title":"Import plugin","text":""},{"location":"ui-simplelabel/#import-class","title":"Import class","text":""},{"location":"ui-simplelabel/#add-label-object","title":"Add label object","text":"
    var label = scene.rexUI.add.simpleLabel({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\n// States-Round-rectangle background\nbackground: {...},\n\n// Nine-slice background\nbackground: {\nkey: ,\nframe: ,\nleftWidth: , rightWidth: ,\ntopHeight: , bottomHeight: }\n\n// States-Image\nicon: {...},\n\n// iconMask: false,\n// squareFitIcon: false,\n// iconSize: undefined, iconWidth: undefined, iconHeight: undefined,\n\n// States-Text\ntext: {...},\n// text: {\n//     $type: 'text',\n//     ...\n// }\n\n// Create bbcodetext\n// text: {\n//     $type: 'bbcodetext',\n//     ...\n// },\n\n// Create bitmaptext\n// text: {\n//     $type: 'bitmaptext',\n//     key: '',\n//     size: undefined,\n//     color: undefined,\n// },\n\n// wrapText: false,\n\n// expandTextWidth: false,\n// expandTextHeight: false,\n\n// States-Image\naction: {...},\n\n// squareFitAction: false,\n// actionMask: false,\n// actionSize: undefined, actionWidth: undefined, actionHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n\nalign: undefined,  // 'left' | 'top' | 'right' | 'bottom' | 'center\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n}, creators);\n
    "},{"location":"ui-simplelabel/#custom-class","title":"Custom class","text":""},{"location":"ui-simplelabel/#reset-display-content","title":"Reset display content","text":"

    See label

    "},{"location":"ui-simplelabel/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    label.layout();\n

    See also - dirty

    "},{"location":"ui-simplelabel/#set-state","title":"Set state","text":"

    Override/restore properties of background game object.

    Note

    Assume that background game object is states round rectangle game object.)

    "},{"location":"ui-simplelabel/#active-state","title":"Active state","text":""},{"location":"ui-simplelabel/#hover-state","title":"Hover state","text":""},{"location":"ui-simplelabel/#disable-state","title":"Disable state","text":""},{"location":"ui-simplelabel/#other-properties","title":"Other properties","text":"

    See label, sizer object, base sizer object, container-lite.

    "},{"location":"ui-sizer/","title":"Sizer","text":""},{"location":"ui-sizer/#introduction","title":"Introduction","text":"

    Layout children game objects.

    It is inspired from wxSizer.

    "},{"location":"ui-sizer/#live-demos","title":"Live demos","text":""},{"location":"ui-sizer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-sizer/#install-plugin","title":"Install plugin","text":""},{"location":"ui-sizer/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-sizer/#import-plugin","title":"Import plugin","text":""},{"location":"ui-sizer/#import-class","title":"Import class","text":""},{"location":"ui-sizer/#add-sizer-object","title":"Add sizer object","text":"
    var sizer = scene.rexUI.add.sizer({\norientation: 0,\n// rtl: false,\n// startChildIndex: 0,\n\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n// space: { left: 0, right:0, top:0, bottom:0, item:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    or

    var sizer = scene.rexUI.add.sizer(x, y, {\norientation: 0,\n// rtl: false,\n// startChildIndex: 0,\n\n// width: undefined,\n// height: undefined,\n// anchor: undefined,\n// space: { left: 0, right:0, top:0, bottom:0, item:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    or

    var sizer = scene.rexUI.add.sizer(x, y, width, height, {\norientation: 0,\n// rtl: false,\n// startChildIndex: 0,\n// anchor: undefined,\n// space: { left: 0, right:0, top:0, bottom:0, item:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    or

    var sizer = scene.rexUI.add.sizer(x, y, width, height, orientation, {\n// rtl: false,\n// startChildIndex: 0,\n// anchor: undefined,\n// space: { left: 0, right:0, top:0, bottom:0, item:0 }\n});\n
    "},{"location":"ui-sizer/#custom-class","title":"Custom class","text":""},{"location":"ui-sizer/#add-background","title":"Add background","text":"
    sizer.addBackground(child);\n

    or

    sizer.addBackground(child, {left: 0, right: 0, top: 0, bottom: 0}, key);\n
    "},{"location":"ui-sizer/#add-child","title":"Add child","text":"

    Add a game obejct to sizer

    sizer.add(child);\n

    or

    sizer.add(child,\n{\nproportion: 0,\nalign: 'center',\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nexpand: false,\nkey: undefined,\nindex: undefined,\nminWidth: undefined,\nminHeight: undefined,\nfitRatio: 0,\n}\n);\n

    or

    sizer.add(child, proportion, align, padding, expand, key, index);\n// sizer.add(child, proportion, align, padding, expand, key, index);\n
    "},{"location":"ui-sizer/#insert-child","title":"Insert child","text":"
    sizer.insert(index, child, {\nproportion: 0,\nalign: 'center',\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nexpand: false,\nkey: undefined,\nminWidth: undefined,\nminHeight: undefined,\nfitRatio: 0,\n}\n);\n

    or

    sizer.insert(index, child, proportion, align, padding, expand, key);\n
    "},{"location":"ui-sizer/#insert-at-position","title":"Insert at position","text":"
    sizer.insertAtPosition(x, y, child, {\nproportion: 0,\nalign: 'center',\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nexpand: false,\nkey: undefined,\nminWidth: undefined,\nminHeight: undefined,\nfitRatio: 0,\n}\n);\n

    or

    sizer.insertAtPosition(x, y, index, child, proportion, align, padding, expand, key);\n
    "},{"location":"ui-sizer/#add-space","title":"Add space","text":""},{"location":"ui-sizer/#layout-children","title":"Layout children","text":"

    Arrange position of all children.

    sizer.layout();\n

    See also - dirty

    "},{"location":"ui-sizer/#remove-child","title":"Remove child","text":""},{"location":"ui-sizer/#get-element","title":"Get element","text":""},{"location":"ui-sizer/#rtl","title":"RTL","text":""},{"location":"ui-sizer/#alignment-of-child","title":"Alignment of child","text":""},{"location":"ui-sizer/#proportion-of-child","title":"Proportion of child","text":""},{"location":"ui-sizer/#expand-of-child","title":"Expand of child","text":""},{"location":"ui-sizer/#other-properties","title":"Other properties","text":"

    See base sizer object, container-lite.

    "},{"location":"ui-slider/","title":"Slider","text":""},{"location":"ui-slider/#introduction","title":"Introduction","text":"

    A container with a track, indicator, thumb and background.

    "},{"location":"ui-slider/#live-demos","title":"Live demos","text":""},{"location":"ui-slider/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-slider/#install-plugin","title":"Install plugin","text":""},{"location":"ui-slider/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-slider/#import-plugin","title":"Import plugin","text":""},{"location":"ui-slider/#import-class","title":"Import class","text":""},{"location":"ui-slider/#add-slider-object","title":"Add slider object","text":"
    var slider = scene.rexUI.add.slider({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\nreverseAxis: false,\n\nbackground: backgroundGameObject,\n/* \n    background: { \n        radius: 0, \n        color: undefined, alpha: 1,\n        strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n        shape: undefined\n    }\n    */\n\ntrack: trackGameObject,\n/* \n    track: { \n        width: 1, height: 1,\n        radius: 0, \n        color: undefined, alpha: 1,\n        strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n        shape: undefined\n    }\n    */    indicator: indicatorGameObject,\n/* \n    indicator: { \n        width: 1, height: 1,\n        radius: 0, \n        color: undefined, alpha: 1,\n        strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n        shape: undefined\n    }\n    */\n\nthumb: thumbGameObject,\n/* \n    thumb: { \n        width: 1, height: 1,\n        radius: 0, \n        color: undefined, alpha: 1,\n        strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n        shape: undefined\n    }\n    */\n\ninput: 'drag',\n\nvalue: 0,\ngap: undefined,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},    valuechangeCallback: function(newValue, oldValue, slider) {\n},\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n\nenable: true,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-slider/#custom-class","title":"Custom class","text":""},{"location":"ui-slider/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    slider.layout();\n

    See also - dirty

    "},{"location":"ui-slider/#get-element","title":"Get element","text":""},{"location":"ui-slider/#enable","title":"Enable","text":""},{"location":"ui-slider/#value","title":"Value","text":"

    Change value will also change the position of slider thumb and width of slider indicator.

    "},{"location":"ui-slider/#ease-value","title":"Ease value","text":""},{"location":"ui-slider/#gap","title":"Gap","text":""},{"location":"ui-slider/#events","title":"Events","text":""},{"location":"ui-slider/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-statesimage/","title":"States image","text":""},{"location":"ui-statesimage/#introduction","title":"Introduction","text":"

    Using plain object to create image game object, with active, hover, disable styles.

    "},{"location":"ui-statesimage/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-statesimage/#install-plugin","title":"Install plugin","text":""},{"location":"ui-statesimage/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-statesimage/#import-plugin","title":"Import plugin","text":""},{"location":"ui-statesimage/#import-class","title":"Import class","text":""},{"location":"ui-statesimage/#create-image-object","title":"Create image object","text":"
    var image = scene.rexUI.add.statesImage({\nx: 0,\ny: 0,\nkey:\n// frame:\n// tint: 0xffffff,\n// alpha: 1,\n// scale: 1,\n\n// Style override in active state\n// 'active.key': undefined,\n// 'active.frame': undefined,\n// 'active.tint': undefined,\n// 'active.alpha': undefined,\n// 'active.scale': undefined,\n\n// Style override in hover state\n// 'hover.key': undefined,\n// 'hover.frame': undefined,\n// 'hover.tint': undefined,\n// 'hover.alpha': undefined,\n// 'hover.scale': undefined,\n\n// Style override in disable state\n// 'disable.key': undefined,\n// 'disable.frame': undefined,\n// 'disable.tint': undefined,\n// 'disable.alpha': undefined,\n// 'disable.scale': undefined,\n\n});\n
    "},{"location":"ui-statesimage/#custom-class","title":"Custom class","text":""},{"location":"ui-statesimage/#set-state","title":"Set state","text":""},{"location":"ui-statesimage/#active-state","title":"Active state","text":""},{"location":"ui-statesimage/#hover-state","title":"Hover state","text":""},{"location":"ui-statesimage/#disable-state","title":"Disable state","text":""},{"location":"ui-statesimage/#other-properties","title":"Other properties","text":"

    See Image, game object

    "},{"location":"ui-statesroundrectangle/","title":"States round rectangle","text":""},{"location":"ui-statesroundrectangle/#introduction","title":"Introduction","text":"

    Using plain object to create round rectangle game object, with active, hover, disable styles.

    "},{"location":"ui-statesroundrectangle/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-statesroundrectangle/#install-plugin","title":"Install plugin","text":""},{"location":"ui-statesroundrectangle/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-statesroundrectangle/#import-plugin","title":"Import plugin","text":""},{"location":"ui-statesroundrectangle/#import-class","title":"Import class","text":""},{"location":"ui-statesroundrectangle/#create-shape-object","title":"Create shape object","text":"
    var rect = scene.rexUI.add.statesRoundRectangle({\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\n\n// color: 0xffffff,\n// alpha: 1,\n// strokeColor: 0xffffff,\n// strokeAlpha: 1,\n// strokeWidth: 2,\n// radius: 0,\n\n// Style override in active state\n// 'active.color': undefined,\n// 'active.alpha': undefined,\n// 'active.strokeColor': undefined,\n// 'active.strokeAlpha': undefined,\n// 'active.strokeWidth': undefined,\n// 'active.radius': undefined,\n// 'active.xxx': ...\n\n// Style override in hover state\n// 'hover.color': undefined,\n// 'hover.alpha': undefined,\n// 'hover.strokeColor': undefined,\n// 'hover.strokeAlpha': undefined,\n// 'hover.strokeWidth': undefined,\n// 'hover.radius': undefined,\n// 'hover.xxx': ...\n\n// Style override in disable state\n// 'disable.color': undefined,\n// 'disable.alpha': undefined,\n// 'disable.strokeColor': undefined,\n// 'disable.strokeAlpha': undefined,\n// 'disable.strokeWidth': undefined,\n// 'disable.radius': undefined,\n// 'disable.xxx': ...\n\n});\n
    "},{"location":"ui-statesroundrectangle/#custom-class","title":"Custom class","text":""},{"location":"ui-statesroundrectangle/#set-state","title":"Set state","text":""},{"location":"ui-statesroundrectangle/#active-state","title":"Active state","text":""},{"location":"ui-statesroundrectangle/#hover-state","title":"Hover state","text":""},{"location":"ui-statesroundrectangle/#disable-state","title":"Disable state","text":""},{"location":"ui-statesroundrectangle/#other-properties","title":"Other properties","text":"

    See Round rectangle, game object

    "},{"location":"ui-statestext/","title":"States text","text":""},{"location":"ui-statestext/#introduction","title":"Introduction","text":"

    Using plain object to create text game object, with active, hover, disable styles.

    "},{"location":"ui-statestext/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-statestext/#install-plugin","title":"Install plugin","text":""},{"location":"ui-statestext/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-statestext/#import-plugin","title":"Import plugin","text":""},{"location":"ui-statestext/#import-class","title":"Import class","text":""},{"location":"ui-statestext/#create-text-object","title":"Create text object","text":"
    var txt = scene.rexUI.add.statesText({\nx: 0,\ny: 0,\n\n// Normal text-style\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},\nalign: 'left',  // 'left'|'center'|'right'|'justify'\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\nmaxLines: 0,\nlineSpacing: 0,\nfixedWidth: 0,\nfixedHeight: 0,\nrtl: false,\ntestString: '|M\u00c9qgy',\nwordWrap: {\nwidth: null,\ncallback: null,\ncallbackScope: null,\nuseAdvancedWrap: false\n},\nmetrics: false,\n// metrics: {\n//     ascent: 0,\n//     descent: 0,\n//     fontSize: 0\n// },\n\n// Style override in active state\n'active.fontFamily': undefined,\n'active.fontSize': undefined,\n'active.fontStyle': undefined,\n'active.backgroundColor': undefined,\n'active.color': undefined,\n'active.fill': undefined,\n'active.stroke': undefined,\n'active.strokeThickness': undefined,\n\n// Style override in hover state\n'hover.fontFamily': undefined,\n'hover.fontSize': undefined,\n'hover.fontStyle': undefined,\n'hover.backgroundColor': undefined,\n'hover.color': undefined,\n'hover.fill': undefined,\n'hover.stroke': undefined,\n'hover.strokeThickness': undefined,\n\n// Style override in disable state\n'disable.fontFamily': undefined,\n'disable.fontSize': undefined,\n'disable.fontStyle': undefined,\n'disable.backgroundColor': undefined,\n'disable.color': undefined,\n'disable.fill': undefined,\n'disable.stroke': undefined,\n'disable.strokeThickness': undefined,\n});\n
    "},{"location":"ui-statestext/#custom-class","title":"Custom class","text":""},{"location":"ui-statestext/#set-state","title":"Set state","text":""},{"location":"ui-statestext/#active-state","title":"Active state","text":""},{"location":"ui-statestext/#hover-state","title":"Hover state","text":""},{"location":"ui-statestext/#disable-state","title":"Disable state","text":""},{"location":"ui-statestext/#other-properties","title":"Other properties","text":"

    See Text, game object

    "},{"location":"ui-tabpages/","title":"Tab pages","text":""},{"location":"ui-tabpages/#introduction","title":"Introduction","text":"

    A container with tabs and pages, only current page is visible.

    "},{"location":"ui-tabpages/#live-demos","title":"Live demos","text":""},{"location":"ui-tabpages/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-tabpages/#install-plugin","title":"Install plugin","text":""},{"location":"ui-tabpages/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-tabpages/#import-plugin","title":"Import plugin","text":""},{"location":"ui-tabpages/#import-class","title":"Import class","text":""},{"location":"ui-tabpages/#add-tab-pages-object","title":"Add tab-pages object","text":"
    var tabPages = scene.rexUI.add.tabPages({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// background: backgroundGameObject,\n\ntabPosition: 'top',\nwrapTabs: false,\ntabs: {\n// width:\n// height:\n// rtl:\n\n// background: backgroundGameObject,\nexpand:\nalign:\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n},\nspace: { left: 0, right:0, top:0, bottom:0, item:0 }\n},\n\npages: {\nspace: { left: 0, right:0, top:0, bottom:0 },\nfadeIn: 0,\n},\n\nexpand: {\ntabs: false,\n},\n\nalign: {\ntabs: 'left',\n},\n\n// space: { left:0, right:0, top:0, bottom:0, item:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-tabpages/#custom-class","title":"Custom class","text":""},{"location":"ui-tabpages/#add-page","title":"Add page","text":"

    Add a tab/page to last of tabs/pages.

    tabPages.addPage(key, tabGameObject, pageGameObject).layout();\n

    or

    tabPages.addPage({\n// key: undefined,\ntab: tabGameObject,\npage: pageGameObject\n}).layout();\n

    Note

    Invoke tabPages.layout() after adding pages.

    "},{"location":"ui-tabpages/#swap-to-page","title":"Swap to page","text":""},{"location":"ui-tabpages/#remove-page","title":"Remove page","text":""},{"location":"ui-tabpages/#get-element","title":"Get element","text":""},{"location":"ui-tabpages/#other-properties","title":"Other properties","text":"

    See base sizer object, container-lite, Pages, Buttons

    "},{"location":"ui-tabpages/#events","title":"Events","text":""},{"location":"ui-tabs/","title":"Tabs","text":""},{"location":"ui-tabs/#introduction","title":"Introduction","text":"

    A container with 4 groups of buttons around a center panel.

    "},{"location":"ui-tabs/#live-demos","title":"Live demos","text":""},{"location":"ui-tabs/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-tabs/#install-plugin","title":"Install plugin","text":""},{"location":"ui-tabs/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-tabs/#import-plugin","title":"Import plugin","text":""},{"location":"ui-tabs/#import-class","title":"Import class","text":""},{"location":"ui-tabs/#add-tabs-object","title":"Add Tabs object","text":"
    var tabs = scene.rexUI.add.tabs({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// Elements\nbackground: backgroundGameObject,\npanel: panelGameObject,\n\nleftButtons: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\nrightButtons: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\ntopButtons: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\nbottomButtons: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\nleftButtonsBackground: leftButtonsBackgroundGameObject,\nrightButtonsBackground: rightButtonsBackgroundGameObject,\ntopButtonsBackground: topButtonsBackgroundGameObject,\nbottomButtonsBackground: bottomButtonsBackgroundGameObject,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nleftButtonsOffset: 0,\nrightButtonsOffset: 0,\ntopButtonsOffset: 0,\nbottomButtonsOffset: 0,\n\nleftButton: 0,\nrightButton: 0,\ntopButton: 0,\nbottomButton: 0\n},\n\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n}\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-tabs/#custom-class","title":"Custom class","text":""},{"location":"ui-tabs/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    tabs.layout();\n

    See also - dirty

    "},{"location":"ui-tabs/#other-properties","title":"Other properties","text":"

    See grid sizer object, base-sizer object.

    "},{"location":"ui-tabs/#events","title":"Events","text":""},{"location":"ui-tabs/#emit-button-click-event","title":"Emit button click event","text":""},{"location":"ui-tabs/#enabledisable-input-of-button","title":"Enable/disable input of button","text":""},{"location":"ui-tabs/#get-element","title":"Get element","text":""},{"location":"ui-tabs/#add-button","title":"Add button","text":""},{"location":"ui-tabs/#remove-button","title":"Remove button","text":""},{"location":"ui-tabs/#showhide-button","title":"Show/hide button","text":"

    Hidden elements won't be counted when layouting. Call tabs.layout(), or topSizer.layout() after show/hide any button.

    "},{"location":"ui-tabs/#for-each-button","title":"For each button","text":""},{"location":"ui-textarea/","title":"Text area","text":""},{"location":"ui-textarea/#introduction","title":"Introduction","text":"

    A container with a text, slider, and scroller.

    "},{"location":"ui-textarea/#live-demos","title":"Live demos","text":""},{"location":"ui-textarea/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-textarea/#install-plugin","title":"Install plugin","text":""},{"location":"ui-textarea/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-textarea/#import-plugin","title":"Import plugin","text":""},{"location":"ui-textarea/#import-class","title":"Import class","text":""},{"location":"ui-textarea/#add-text-area-object","title":"Add text-area object","text":"
    var textArea = scene.rexUI.add.textArea({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// Elements\nbackground: backgroundGameObject,\n\ntext: textGameObject,\n// textWidth: undefined,\n// textHeight: undefined,\n// textMask: false,\n// alwaysScrollable: false,\n\nslider: {\n// background: sliderBackgroundGameObject,\ntrack: trackGameObject,\n/* \n        track: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\n\n// indicator: indicatorGameObject,\nthumb: thumbGameObject,\n/* \n        thumb: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\n// input: 'drag',\n// position: 'right',\n\n// hideUnscrollableSlider: false,\n// adaptThumbSize: false,\n// minThumbSize: undefined,\n\n// buttons: {\n//     top: topButtonGameObject, bottom: bottomButtonGameObject,\n//     left: leftButtonGameObject, right: rightButtonGameObject,\n//     step: 0.01,\n// }\n},\n\n// scroller: {\n//     threshold: 10,\n//     slidingDeceleration: 5000,\n//     backDeceleration: 2000,\n//     pointerOutRelease: true,\n//     dragRate: 1,\n// },\n\nmouseWheelScroller: false,\n// mouseWheelScroller: {\n//     focus: false,\n//     speed: 0.1\n// },\n\nclamplChildOY: false,\n\nheader: headerGameObject,\nfooter: footerGameObject,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\ntext: 0,\n// text: {\n//    top: 0,\n//    bottom: 0,\n//    left: 0,\n//    right: 0,\n//},\n\nslider: 0,\n// slider: {\n//     top: 0,\n//     bottom: 0,\n//     left: 0,\n//     right: 0,\n// },\n\nheader: 0,\nfooter: 0,\n},\n\nexpand: {\nheader: true,\nfooter: true,\n},\n\nalign: {\nheader: 'center',\nfooter: 'center',\n},\n\ncontent: '',\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-textarea/#custom-class","title":"Custom class","text":""},{"location":"ui-textarea/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    textArea.layout();\n

    See also - dirty

    "},{"location":"ui-textarea/#content","title":"Content","text":""},{"location":"ui-textarea/#scroll-content","title":"Scroll content","text":""},{"location":"ui-textarea/#scroll-by-percentage","title":"Scroll by percentage","text":""},{"location":"ui-textarea/#scroll-to-topbottom","title":"Scroll to top/bottom","text":""},{"location":"ui-textarea/#scroll-to-line","title":"Scroll to line","text":""},{"location":"ui-textarea/#enabledisable-scrolling","title":"Enable/disable scrolling","text":""},{"location":"ui-textarea/#event","title":"Event","text":""},{"location":"ui-textarea/#lines-count","title":"Lines count","text":"
    var linesCount = textArea.linesCount;\n
    "},{"location":"ui-textarea/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-textarea/#get-element","title":"Get element","text":""},{"location":"ui-textbox/","title":"Text box","text":""},{"location":"ui-textbox/#introduction","title":"Introduction","text":"

    A container with an icon, (typing and paging) text, and background.

    "},{"location":"ui-textbox/#live-demos","title":"Live demos","text":""},{"location":"ui-textbox/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-textbox/#install-plugin","title":"Install plugin","text":""},{"location":"ui-textbox/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-textbox/#import-plugin","title":"Import plugin","text":""},{"location":"ui-textbox/#import-class","title":"Import class","text":""},{"location":"ui-textbox/#add-textbox-object","title":"Add textbox object","text":"
    var textBox = scene.rexUI.add.textBox({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nlayoutMode: 0,\n\nrtl: false,\n\nbackground: backgroundGameObject,\n\ninnerBackground: backgroundGameObject,\n\ntitle: titleGameObject,\n\nseparator: separatorGameObject,\n\nicon: iconGameObject,\niconMask: false,\n\ntext: textGameObject,\n\naction: actionGameObject,\nactionMask: false,\n\nalign: {\ntitle: 'left',\ntext: 'left',\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ninnerLeft: 0, innerRight: 0, innerTop: 0, innerBottom: 0,\n\ntitle: 0, titleLeft: 0, titleRight: 0,\nicon: 0, iconTop: 0, iconBottom: 0,\ntext: 0, textLeft: 0, textRight: 0,\nactionTop: 0, actionBottom: 0,\n},\n\n// page: { \n//    maxLines: undefined,\n//    pageBreak: '\\f\\n',\n// },\n// typing: { \n//    wrap: false,\n//    speed: 333,    \n// },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-textbox/#custom-class","title":"Custom class","text":""},{"location":"ui-textbox/#typing","title":"Typing","text":""},{"location":"ui-textbox/#typing-speed","title":"Typing speed","text":""},{"location":"ui-textbox/#page","title":"Page","text":""},{"location":"ui-textbox/#icon-texture","title":"Icon texture","text":""},{"location":"ui-textbox/#get-element","title":"Get element","text":""},{"location":"ui-textbox/#events","title":"Events","text":""},{"location":"ui-textbox/#other-properties","title":"Other properties","text":"

    See title label, sizer object, base sizer object, container-lite.

    "},{"location":"ui-titlelabel/","title":"Title label","text":""},{"location":"ui-titlelabel/#introduction","title":"Introduction","text":"

    A container with title, text in two rows, and an icon, background.

    "},{"location":"ui-titlelabel/#live-demos","title":"Live demos","text":""},{"location":"ui-titlelabel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-titlelabel/#install-plugin","title":"Install plugin","text":""},{"location":"ui-titlelabel/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-titlelabel/#import-plugin","title":"Import plugin","text":""},{"location":"ui-titlelabel/#import-class","title":"Import class","text":""},{"location":"ui-titlelabel/#add-label-object","title":"Add label object","text":"
    var label = scene.rexUI.add.titleLabel({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nlayoutMode: 0,\n\nrtl: false,\n\nbackground: backgroundGameObject,\n\ninnerBackground: backgroundGameObject,\n\ntitle: titleGameObject,\n\nseparator: separatorGameObject,\n\nicon: iconGameObject,\niconMask: false,\n\ntext: textGameObject,\n\naction: actionGameObject,\nactionMask: false,\n\nalign: {\ntitle: 'left',\ntext: 'left',\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ninnerLeft: 0, innerRight: 0, innerTop: 0, innerBottom: 0,\n\ntitle: 0, titleLeft: 0, titleRight: 0,\nicon: 0, iconTop: 0, iconBottom: 0,\ntext: 0, textLeft: 0, textRight: 0,\nactionTop: 0, actionBottom: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-titlelabel/#custom-class","title":"Custom class","text":""},{"location":"ui-titlelabel/#layout-modes","title":"Layout modes","text":""},{"location":"ui-titlelabel/#mode-0","title":"Mode 0","text":"

    title, separator, and text will be layout vertically inside innerSizer, then layout with icon, action horizontally.

    Icon Title Action Separator Text"},{"location":"ui-titlelabel/#mode-1","title":"Mode 1","text":"

    icon, text, and action will be layout horizontally inside innerSizer, then layout with title, separator vertically.

    Title Separator Icon Text Action"},{"location":"ui-titlelabel/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    label.layout();\n

    See also - dirty

    "},{"location":"ui-titlelabel/#get-element","title":"Get element","text":""},{"location":"ui-titlelabel/#title","title":"Title","text":""},{"location":"ui-titlelabel/#text","title":"Text","text":""},{"location":"ui-titlelabel/#icon-texture","title":"Icon texture","text":""},{"location":"ui-titlelabel/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-toast/","title":"Toast","text":""},{"location":"ui-toast/#introduction","title":"Introduction","text":"

    Show text message for a short while.

    "},{"location":"ui-toast/#live-demos","title":"Live demos","text":""},{"location":"ui-toast/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-toast/#install-plugin","title":"Install plugin","text":""},{"location":"ui-toast/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-toast/#import-plugin","title":"Import plugin","text":""},{"location":"ui-toast/#import-class","title":"Import class","text":""},{"location":"ui-toast/#add-toast-object","title":"Add toast object","text":"
    var toast = scene.rexUI.add.toast({\nx: 0,\ny: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n\nbackground: backgroundGameObject,\nicon: iconGameObject,\niconMask: false,\ntext: textGameObject,\naction: actionGameObject,\nactionMask: false,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0,\ntext: 0,\n},\n\nduration: {\nin: 200,\nhold: 1200,\nout: 200,\n},\n\n// transitIn: 0,\n// transitOut: 0,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    Toast object will be invisible at beginning.

    "},{"location":"ui-toast/#custom-class","title":"Custom class","text":""},{"location":"ui-toast/#show-message","title":"Show message","text":"
    toast.showMessage(message);\n

    Toast displays message follows these steps : transit-in, hold, transit-out. New message will be pending until toast is back to idle.

    "},{"location":"ui-toast/#display-time","title":"Display time","text":""},{"location":"ui-toast/#transit-action","title":"Transit action","text":""},{"location":"ui-toast/#other-properties","title":"Other properties","text":"

    See label object, sizer object, base sizer object, container-lite.

    "},{"location":"ui-tweaker/","title":"Tweaker","text":""},{"location":"ui-tweaker/#introduction","title":"Introduction","text":"

    Fine-tuning properties of target object. Reference

    "},{"location":"ui-tweaker/#live-demos","title":"Live demos","text":""},{"location":"ui-tweaker/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-tweaker/#install-plugin","title":"Install plugin","text":""},{"location":"ui-tweaker/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-tweaker/#import-plugin","title":"Import plugin","text":""},{"location":"ui-tweaker/#import-class","title":"Import class","text":""},{"location":"ui-tweaker/#add-tweaker-object","title":"Add tweaker object","text":"
    var tweaker = scene.rexUI.add.tweaker({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n// orientation: 0,\n\nstyles : {\nitemWidth : 0,\n\ninputRow: {\nbackground: {\n\n},\n\ntitle: {\n\n},\n\ninputText: {\n\n},\n\nlist: {\nlabel: {\n\n},\n\nbutton: {\n\n}\n},\n\nbutton: {\n\n},\n\nslider: {\ntrack: {\n\n},\n\nindicator: {\n\n},\n\nthumb: {\n\n}\n},\n\ncolorInput: {\ncolorPicker: {\n\n},\n\ncolorComponents: {\ninputText: {\n\n}\n}\n},\n\ncheckbox: {\n\n},\n\ntoggleSwitch: {\n\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n},\n\nseparator: {\n\n},\n\nfolder: {\n},\n\ntab: {\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0, item: 0\n},\n},\n\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-tweaker/#custom-class","title":"Custom class","text":""},{"location":"ui-tweaker/#add-input-row","title":"Add input row","text":"

    An input row can fine-tuning properties of target object.

    "},{"location":"ui-tweaker/#text-input-row","title":"Text input row","text":"

    object[key] is a text value.

    tweaker.addInput(object, key, {    // view: 'string',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n\n// autoUpdate: true,\n// onValidate: undefined,\n// onValueChange: undefined,    \n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\n// view: 'string',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n\n// autoUpdate: true,\n// onValidate: undefined,\n// onValueChange: undefined,    \n})\n

    See Styles of text input

    "},{"location":"ui-tweaker/#text-input-from-list","title":"Text input from list","text":"

    object[key] is a text value.

    tweaker.addInput(object, key, {\n// view: 'list',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\n// view: 'list',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of list input

    "},{"location":"ui-tweaker/#text-input-from-buttons","title":"Text input from buttons","text":"

    object[key] is a text value.

    tweaker.addInput(object, key, {\nview: 'buttons',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\nview: 'buttons',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of buttons input

    "},{"location":"ui-tweaker/#number-input-row","title":"Number input row","text":"

    object[key] is a number value.

    tweaker.addInput(object, key, {\n// view: 'number',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\n// view: 'number',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of text input

    "},{"location":"ui-tweaker/#number-input-in-a-range","title":"Number input in a range","text":"

    object[key] is a number value.

    tweaker.addInput(object, key, {\n// view: 'range',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\nmin: minValue, max: maxValue,\n\n// format: function(value) { return s; },\n// inputTextReadOnly: false,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\n// view: 'range',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\nmin: minValue, max: maxValue,\n\n// format: function(value) { return s; },\n// inputTextReadOnly: false,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of range input

    "},{"location":"ui-tweaker/#number-input-from-list","title":"Number input from list","text":"

    object[key] is a number value.

    tweaker.addInput(object, key, {\n// view: 'list',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\n// view: 'list',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of list input

    "},{"location":"ui-tweaker/#number-input-from-buttons","title":"Number input from buttons","text":"

    object[key] is a number value.

    tweaker.addInput(object, key, {\nview: 'buttons',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\nview: 'buttons',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of buttons input

    "},{"location":"ui-tweaker/#color-input","title":"Color input","text":"

    object[key] is a number value.

    tweaker.addInput(object, key, {\nview: 'color',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\nview: 'color',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of color input

    "},{"location":"ui-tweaker/#boolean-input-row","title":"Boolean input row","text":"

    object[key] is a boolean value.

    tweaker.addInput(object, key, {\n// view: 'boolean',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\n// view: 'boolean',\n// view: 'toggleSwitch',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of boolean input

    "},{"location":"ui-tweaker/#add-button","title":"Add button","text":"
    tweaker.addButton({\n// bindingTarget: object,\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\ntitle: undefined,\n\nlabel: undefined,\n\ncallback: function(target) {},\n\n// key: undefined,\n})\n

    See Styles of botton

    "},{"location":"ui-tweaker/#add-separator","title":"Add separator","text":"
    tweaker.addSeparator();\n

    See Styles of separator

    "},{"location":"ui-tweaker/#add-folder","title":"Add folder","text":"

    Folder contains collapsible child tweaker game object.

    var childTweaker = tweaker.addFolder({\ntitle: titleA,\n\n// expanded: true,\n});\n\n// childTweaker.addInput(...)\n

    See Styles of folder

    "},{"location":"ui-tweaker/#add-tab","title":"Add tab","text":"

    Tab containes pages. Each page is a tweaker game object.

    var childrenTweakers = tweaker.addTab({\npages: [\n{\ntitle: titleA, // show: false\n},\n{\ntitle: titleB\n// show: false\n},\n// ...\n]\n});\n\n// childrenTweakers[0].addInput(...)\n// childrenTweakers[1].addInput(...)\n

    See Styles of tab

    "},{"location":"ui-tweaker/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    tweaker.layout();\n

    See also - dirty

    "},{"location":"ui-tweaker/#styles","title":"Styles","text":""},{"location":"ui-tweaker/#styles-of-text-input","title":"Styles of text input","text":"

    Style of text/number input is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\ninputText: {\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null\n},\nfocusStyle: {\n// color:\n// color2:\n// horizontalGradient:\n\n// stroke:\n// strokeThickness:\n\n// cornerRadius:\n// cornerIteration:\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBottomY: undefined,\noffsetX: 0,\noffsetY: 0\n},\ncursorStyle: {\n// bold:\n// italic:\n// fontSize:\n// fontFamily:\n// color:\n// stroke:\n// strokeThickness:\n// shadowColor:\n// shadowOffsetX:\n// shadowOffsetY:\n// shadowBlur:\n// backgroundColor:\n// backgroundHeight:\n// backgroundBottomY:\n// offsetX:\n// offsetY:\n}\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-list-input","title":"Styles of list input","text":"

    Style of text/number list input is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\nlist: {\nlabel: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n\n},\n\nbutton: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n\n'hover.color': undefined,\n'hover.alpha': undefined,\n'hover.strokeColor': undefined,\n'hover.strokeAlpha': undefined,\n'hover.strokeWidth': undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n}\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-buttons-input","title":"Styles of buttons input","text":"

    Style of buttons input is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\nbutton: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n},\n\nexpand: true\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-range-input","title":"Styles of range input","text":"

    Style of range input is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\nslider: {\ntrack: {\nheight: 0,\n\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\nindicator: {\nheight: 0,\n\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\nthumb: {\nwidth: 0, height: 0,\n\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n}\n}\n\ninputText: {\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null\n},\nfocusStyle: {\n// color:\n// color2:\n// horizontalGradient:\n\n// stroke:\n// strokeThickness:\n\n// cornerRadius:\n// cornerIteration:\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBottomY: undefined,\noffsetX: 0,\noffsetY: 0\n},\ncursorStyle: {\n// bold:\n// italic:\n// fontSize:\n// fontFamily:\n// color:\n// stroke:\n// strokeThickness:\n// shadowColor:\n// shadowOffsetX:\n// shadowOffsetY:\n// shadowBlur:\n// backgroundColor:\n// backgroundHeight:\n// backgroundBottomY:\n// offsetX:\n// offsetY:\n}\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-color-input","title":"Styles of color input","text":"

    Style of color input is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\ncolorInput: {\nswatch: {\nradius: 0,\nsize: undefined,\n},\n\ninputText: {\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null\n},\nfocusStyle: {\n// color:\n// color2:\n// horizontalGradient:\n\n// stroke:\n// strokeThickness:\n\n// cornerRadius:\n// cornerIteration:\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBottomY: undefined,\noffsetX: 0,\noffsetY: 0\n},\ncursorStyle: {\n// bold:\n// italic:\n// fontSize:\n// fontFamily:\n// color:\n// stroke:\n// strokeThickness:\n// shadowColor:\n// shadowOffsetX:\n// shadowOffsetY:\n// shadowBlur:\n// backgroundColor:\n// backgroundHeight:\n// backgroundBottomY:\n// offsetX:\n// offsetY:\n}\n},                // inputText: false,\n\ncolorPicker: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n}\n},\n\ncolorComponents: {\ninputText: {\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null\n},\nfocusStyle: {\n// color:\n// color2:\n// horizontalGradient:\n\n// stroke:\n// strokeThickness:\n\n// cornerRadius:\n// cornerIteration:\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBottomY: undefined,\noffsetX: 0,\noffsetY: 0\n},\ncursorStyle: {\n// bold:\n// italic:\n// fontSize:\n// fontFamily:\n// color:\n// stroke:\n// strokeThickness:\n// shadowColor:\n// shadowOffsetX:\n// shadowOffsetY:\n// shadowBlur:\n// backgroundColor:\n// backgroundHeight:\n// backgroundBottomY:\n// offsetX:\n// offsetY:\n}\n\n}\n}\n\n// colorComponents: false,\n\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-boolean-input","title":"Styles of boolean input","text":"

    Style of boolean input is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\n// For checkbox view\ncheckbox: {\n// size: undefined,\n\ncolor: 0x005cb2,\nboxFillAlpha: 1,\nuncheckedColor: null,\nuncheckedBoxFillAlpha: 1,\n\nboxLineWidth: 4,\nboxStrokeColor: 0x005cb2,\nboxStrokeAlpha: 1,\nuncheckedBoxStrokeColor: 0x005cb2,\nuncheckedBoxStrokeAlpha: 1,\n\ncheckerColor: 0xffffff,\ncheckerAlpha: 1,\n\ncircleBox: false\n\nanimationDuration: 150,\n\nreadOnly: false,\n},\n\n// For toggle switch view\ntoggleSwitch: {\n// size: undefined,\n\ncolor: 0x005cb2,\ntrackFillAlpha: 1,\nfalseValueTrackColor: undefined,\nfalseValueTrackFillAlpha: 1,\n\nthumbColor: 0xffffff,\nthumbAlpha: 1,\n\ntrackWidth: 0.9,\ntrackHeight: 0.5,\ntrackCornerRadius: (trackHeight * 0.5),\n\nthumbHeight: (trackHeight * 0.9),\nthumbWidth: (thumbHeight),\nthumbCornerRadius: (thumbHeight * 0.5),\n\nthumbLeft: 0.3,\nthumbRight: (1 - thumbLeft),\nrtl: false,\n\nanimationDuration: 150,\n\nreadOnly: false,\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-botton","title":"Styles of botton","text":"

    Style of button is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\nbutton: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-separator","title":"Styles of separator","text":"

    Style of separator is defined in

    {\nstyles: {\nseparator: {\nheight: 0,\n\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-folder","title":"Styles of folder","text":"

    Style of folder is defined in

    {\nstyles: {\nfolder: {\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n},\n\nexpandedIcon: {\ncolor: undefined,\nalpha: 1,\n\nstrokeColor: undefined,\nstrokeAlpha: 1,\nstrokeWidth: 1,\narrowOnly: false,\n\neaseDuration: 0,\n}\n},\n\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, }\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-tab","title":"Styles of tab","text":"

    Style of tab is defined in

    {\nstyles: {\ntab: {\ntab: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n\n'active.color': undefined,\n'active.alpha': undefined,\n'active.strokeColor': undefined,\n'active.strokeAlpha': undefined,\n'active.strokeWidth': undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\nwrapTabs: false,\n\ntabs: {\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, item: 0,\n}\n},\n\npages: {\nfadeIn: 0,\n}\n}\n}\n}\n
    "},{"location":"ui-tweaker/#bind-target","title":"Bind target","text":"

    All input rows will bind to this new target, and update display status.

    tweaker.setBindingTarget(object);\n
    "},{"location":"ui-tweaker/#get-element","title":"Get element","text":""},{"location":"ui-tweaker/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"uniqueitemlist/","title":"Unique item list","text":""},{"location":"uniqueitemlist/#introduction","title":"Introduction","text":"

    List of unique items. Support array and set methods.

    "},{"location":"uniqueitemlist/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"uniqueitemlist/#install-plugin","title":"Install plugin","text":""},{"location":"uniqueitemlist/#load-minify-file","title":"Load minify file","text":""},{"location":"uniqueitemlist/#import-plugin","title":"Import plugin","text":""},{"location":"uniqueitemlist/#import-class","title":"Import class","text":""},{"location":"uniqueitemlist/#create-instance","title":"Create instance","text":"
    var listA = scene.plugins.get('rexUniqueItemList').add({\n// items: undefined,\n// autoCleanup: true\n});\n

    or

    var listA = scene.plugins.get('rexUniqueItemList').add(items);\n
    "},{"location":"uniqueitemlist/#items","title":"Items","text":""},{"location":"uniqueitemlist/#item-count","title":"Item count","text":""},{"location":"uniqueitemlist/#contains","title":"Contains","text":""},{"location":"uniqueitemlist/#array-operations","title":"Array operations","text":""},{"location":"uniqueitemlist/#add","title":"Add","text":""},{"location":"uniqueitemlist/#remove","title":"Remove","text":""},{"location":"uniqueitemlist/#pop","title":"Pop","text":""},{"location":"uniqueitemlist/#slice","title":"Slice","text":""},{"location":"uniqueitemlist/#sort","title":"Sort","text":""},{"location":"uniqueitemlist/#set-operations","title":"Set operations","text":""},{"location":"uniqueitemlist/#call-method","title":"Call method","text":"

    Apply method of each item.

    listA.call(fnName, arg0, arg1, arg2, ...);\n

    Warning

    Don't add or remove any item during this method.

    listA.call(function(item, i) {\n// ....\n}, scope);\n
    "},{"location":"uuid/","title":"UUID","text":""},{"location":"uuid/#introduction","title":"Introduction","text":"

    Creates and returns an RFC4122 version 4 compliant UUID, built-in method of phaser.

    "},{"location":"uuid/#usage","title":"Usage","text":"
    var uuid = Phaser.Utils.String.UUID();\n
    "},{"location":"vector2/","title":"Vector2","text":""},{"location":"vector2/#introduction","title":"Introduction","text":"

    A representation of a vector in 2D space ({x, y}), built-in object of phaser.

    "},{"location":"vector2/#usage","title":"Usage","text":""},{"location":"vector2/#create-object","title":"Create object","text":"
    var vector = new Phaser.Math.Vector2();\n// var vector = new Phaser.Math.Vector2(x, y);\n// var vector = new Phaser.Math.Vector2({x, y});\n
    "},{"location":"vector2/#clone","title":"Clone","text":"
    var newVector = vector.clone();\n
    "},{"location":"vector2/#set-components","title":"Set components","text":""},{"location":"vector2/#get-componments","title":"Get componments","text":""},{"location":"vector2/#methods","title":"Methods","text":""},{"location":"vector2/#vector-methods","title":"Vector methods","text":""},{"location":"vector2/#points-method","title":"Points method","text":""},{"location":"vector2/#constant","title":"Constant","text":""},{"location":"video/","title":"Video","text":""},{"location":"video/#introduction","title":"Introduction","text":"

    Handling playback of a video file, video stream or media stream.

    "},{"location":"video/#usage","title":"Usage","text":""},{"location":"video/#load-video","title":"Load video","text":"
    scene.load.video(key, url, noAudio);\n

    Reference: load video

    Cross-origin

    Can't load video cross-origin via scene.load.video(...). Using scene.add.video(x, y).loadURL(urls, noAudio, crossOrigin) to load video cross-origin.

    "},{"location":"video/#add-video-object","title":"Add video object","text":""},{"location":"video/#reference-video-from-video-cache","title":"Reference video from Video Cache","text":"
    var video = scene.add.video(x, y, key);\n
    "},{"location":"video/#load-video-from-url","title":"Load video from URL","text":"
    1. Add video object
      var video = scene.add.video(x, y);\n
    2. Play video from URL
      video.loadURL(url);\n// video.loadURL(urls, noAudio, crossOrigin);\n
    "},{"location":"video/#load-video-from-mediastream","title":"Load video from MediaStream","text":"
    video.loadMediaStream(stream);\n// video.loadMediaStream(stream, noAudio, crossOrigin);\n
    navigator.mediaDevices.getUserMedia({ video: true, audio: false })\n.then(function(stream) {\nvideo.loadMediaStream(stream, true);\nvideo.play();\n})\n.catch(function(err) {\n\n})\n
    "},{"location":"video/#play","title":"Play","text":"
    video.play();\n// video.play(loop, markerIn, markerOut);\n

    Play video first time

    Call video.play() when playing video first time.

    Note

    If you need audio in your videos, then you'll have to consider the fact that the video cannot start playing until the user has interacted with the browser, into your game flow.

    "},{"location":"video/#pause","title":"Pause","text":"

    Play video after paused

    Call video.setPaused(false) to resume playing.

    "},{"location":"video/#stop","title":"Stop","text":"

    Stops the video playing and clears all internal event listeners.

    video.stop();\n
    "},{"location":"video/#is-playing","title":"Is playing","text":""},{"location":"video/#playback-time","title":"Playback time","text":""},{"location":"video/#playback-rate","title":"Playback rate","text":""},{"location":"video/#duration","title":"Duration","text":"
    var duration = video.getDuration();  // time in seconds\n
    "},{"location":"video/#volume","title":"Volume","text":""},{"location":"video/#mute","title":"Mute","text":""},{"location":"video/#loop","title":"Loop","text":""},{"location":"video/#video-key","title":"Video key","text":""},{"location":"video/#marks","title":"Marks","text":""},{"location":"video/#snapshot","title":"Snapshot","text":"
    1. Allocate a canvas texrure
      video.saveSnapshotTexture(key);\n
    2. Take a snapshot
      var canvasTexture = video.video.snapshot();\n// var canvasTexture = video.snapshot(width, height);\n
      or
      var canvasTexture = video.snapshotArea(x, y, srcWidth, srcHeight);\n// var canvasTexture = video.snapshotArea(x, y, srcWidth, srcHeight, destWidth, destHeight);\n
    "},{"location":"video/#save-texture","title":"Save texture","text":"

    The saved texture is automatically updated as the video plays. If you pause this video, or change its source, then the saved texture updates instantly.

    var texture = video.saveTexture(key);\n// var texture = video.saveTexture(key, flipY);\n
    "},{"location":"video/#events","title":"Events","text":""},{"location":"viewport-coordinate/","title":"Viewport-coordinate","text":""},{"location":"viewport-coordinate/#introduction","title":"Introduction","text":"

    Attach vpx, vpy properties to a game object, to set position according to proportion (vpx, vpy) of viewport, a rectangle).

    "},{"location":"viewport-coordinate/#live-demos","title":"Live demos","text":""},{"location":"viewport-coordinate/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"viewport-coordinate/#install-plugin","title":"Install plugin","text":""},{"location":"viewport-coordinate/#load-minify-file","title":"Load minify file","text":""},{"location":"viewport-coordinate/#import-plugin","title":"Import plugin","text":""},{"location":"viewport-coordinate/#import-method","title":"Import method","text":""},{"location":"viewport-coordinate/#attach-properties","title":"Attach properties","text":"
    scene.plugins.get('rexViewportCoordinate').add(gameObject, viewport, vpx, vpy, transformCallback);\n

    Changing

    Will change position (x , y) of game object.

    "},{"location":"virtualjoystick/","title":"Virtual joystick","text":""},{"location":"virtualjoystick/#introduction","title":"Introduction","text":"

    Simulate cursor keys according to touch events.

    "},{"location":"virtualjoystick/#live-demos","title":"Live demos","text":""},{"location":"virtualjoystick/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"virtualjoystick/#install-plugin","title":"Install plugin","text":""},{"location":"virtualjoystick/#load-minify-file","title":"Load minify file","text":""},{"location":"virtualjoystick/#import-plugin","title":"Import plugin","text":""},{"location":"virtualjoystick/#import-class","title":"Import class","text":""},{"location":"virtualjoystick/#create-instance","title":"Create instance","text":"
    var joystick = scene.plugins.get('rexVirtualJoystick').add(scene, {\nx: x,\ny: y,\nradius: 100,\nbase: baseGameObject,\nthumb: thumbGameObject,\n// dir: '8dir',\n// forceMin: 16,\n// fixed: true,\n// enable: true\n});\n
    "},{"location":"virtualjoystick/#state-of-cursor-keys","title":"State of cursor keys","text":"
    var cursorKeys = joystick.createCursorKeys();\n\nvar leftKeyDown = cursorKeys.left.isDown;\nvar rightKeyDown = cursorKeys.right.isDown;\nvar upKeyDown = cursorKeys.up.isDown;\nvar downKeyDown = cursorKeys.down.isDown;\n

    Or

    var leftKeyDown = joystick.left;\nvar rightKeyDown = joystick.right;\nvar upKeyDown = joystick.up;\nvar downKeyDown = joystick.down;\nvar noKeyDown = joystick.noKey;\n
    "},{"location":"virtualjoystick/#force-angle","title":"Force & Angle","text":"

    Force : Distance between position of base game object to touch pointer.

    var force = joystick.force;\nvar forceX = joystick.forceX;\nvar forceY = joystick.forceY;\n\nvar angle = joystick.angle;  // degree between -180 to 180\nvar rotation = joystick.rotation; // radians\n
    "},{"location":"virtualjoystick/#visible","title":"Visible","text":"

    Visible of base game object.

    "},{"location":"virtualjoystick/#enable","title":"Enable","text":""},{"location":"virtualjoystick/#position","title":"Position","text":"

    Position of base game object.

    "},{"location":"virtualjoystick/#scroll-factor","title":"Scroll factor","text":""},{"location":"virtualjoystick/#touch-pointer","title":"Touch pointer","text":""},{"location":"virtualjoystick/#destroy","title":"Destroy","text":"

    Destroy base & thumb game object.

    joystick.destroy();\n
    "},{"location":"virtualjoystick/#events","title":"Events","text":""},{"location":"virtualjoystick/#elements","title":"Elements","text":""},{"location":"waitevents/","title":"Wait events","text":""},{"location":"waitevents/#introduction","title":"Introduction","text":"

    Wait fired events or callbacks.

    "},{"location":"waitevents/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"waitevents/#install-plugin","title":"Install plugin","text":""},{"location":"waitevents/#load-minify-file","title":"Load minify file","text":""},{"location":"waitevents/#import-plugin","title":"Import plugin","text":""},{"location":"waitevents/#import-class","title":"Import class","text":""},{"location":"waitevents/#create-instance","title":"Create instance","text":"
    var waitEvents = scene.plugins.get('rexWaitEvents').add(completeCallback, completeCallbackScope);\n
    "},{"location":"waitevents/#set-complete-callback","title":"Set complete callback","text":"
    waitEvents.setCompleteCallback(completeCallback, completeCallbackScope);\n
    "},{"location":"waitevents/#add-waiting-event","title":"Add waiting event","text":""},{"location":"waitevents/#callback","title":"Callback","text":"
    var callback = waitEvents.waitCallback();\n

    For example, invokes completeCallback when all timers are time-out.

    scene.time.delayedCall(500, waitEvents.waitCallback());\nscene.time.delayedCall(1000, waitEvents.waitCallback());\nscene.time.delayedCall(1500, waitEvents.waitCallback());\n
    "},{"location":"waitevents/#callback-from-event-emitter","title":"Callback from event emitter","text":"
    waitEvents.waitEvent(eventEmitter, eventName);\n
    "},{"location":"waitevents/#remove-waiting-event","title":"Remove waiting event","text":"
    callback();\n

    or

    waitEvents.remove(callback);\n
    "},{"location":"waitevents/#clear-all-waiting-events","title":"Clear all waiting events","text":"
    waitEvents.clear();\n
    "},{"location":"waitevents/#no-wait-event","title":"No wait event","text":"
    var noWaitEvent = waitEvents.noWaitEvent;\n
    "},{"location":"webfontloader/","title":"Webfont loader","text":""},{"location":"webfontloader/#introduction","title":"Introduction","text":"

    Load web font by google webfont loader in payload or preload stage.

    "},{"location":"webfontloader/#live-demos","title":"Live demos","text":""},{"location":"webfontloader/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"webfontloader/#install-plugin","title":"Install plugin","text":""},{"location":"webfontloader/#load-minify-file","title":"Load minify file","text":""},{"location":"webfontloader/#import-plugin","title":"Import plugin","text":""},{"location":"webfontloader/#import-class","title":"Import class","text":""},{"location":"webfontloader/#load-webfont","title":"Load webfont","text":"

    In preload stage:

    this.load.rexWebFont({\ngoogle: {\nfamilies: ['Bangers']\n},\n// testString: undefined,\n// testInterval: 20,\n});\n

    or load font in pack

    var sceneConfig = {\nkey: '...',\npack: {\nfiles: [{\ntype: 'rexWebFont',\nkey: 'webfont',\nconfig: {\ngoogle: {\nfamilies: ['Bangers']\n},\n// testString: undefined,\n// testInterval: 20,\n}\n}\n]\n}\n};\n

    Configuration of loading fonts

    "},{"location":"webfontloader/#events","title":"Events","text":""},{"location":"webfontloader/#test-string","title":"Test string","text":"

    Add string parameter testString into config, to test if the font is loaded completed or not.

    1. Fill 0 within an internal canvas.
    2. Draw testString.
    3. Check if any pixel has non-zero value.
    "},{"location":"wrap/","title":"Wrap","text":""},{"location":"wrap/#introduction","title":"Introduction","text":"

    Wrap the given value between min and max, built-in method of phaser.

    "},{"location":"wrap/#usage","title":"Usage","text":"
    var result = Phaser.Math.Wrap(value, min, max);\n
    "},{"location":"xor/","title":"XOR","text":""},{"location":"xor/#introduction","title":"Introduction","text":"

    Encrypt or decrypt string by XOR algorithm.

    "},{"location":"xor/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"xor/#install-plugin","title":"Install plugin","text":""},{"location":"xor/#load-minify-file","title":"Load minify file","text":""},{"location":"xor/#import-plugin","title":"Import plugin","text":""},{"location":"xor/#import-class","title":"Import class","text":""},{"location":"xor/#encrypt","title":"Encrypt","text":"
    var encResult = scene.plugins.get('rexXOR').Encrypt(src, pwd);\n
    "},{"location":"xor/#decrypt","title":"Decrypt","text":"
    var decResult = scene.plugins.get('rexXOR').Decrypt(encResult, pwd);\n
    "},{"location":"ymlachievements/","title":"YAML Achievements","text":""},{"location":"ymlachievements/#introduction","title":"Introduction","text":"

    Achievements in a YAML table.

    "},{"location":"ymlachievements/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ymlachievements/#install-plugin","title":"Install plugin","text":""},{"location":"ymlachievements/#load-minify-file","title":"Load minify file","text":""},{"location":"ymlachievements/#import-plugin","title":"Import plugin","text":""},{"location":"ymlachievements/#import-class","title":"Import class","text":""},{"location":"ymlachievements/#create-instance","title":"Create instance","text":"
    var achievements = scene.plugins.get('rexAchievements').add();\n
    "},{"location":"ymlachievements/#load-table-from-yaml-string","title":"Load table from YAML string","text":"
    achievements.loadYML(ymlString);\n

    For exameple

    Lv1 :\nAch1 : (A >= 10) && (A < 20)\nAch2 : (A >= 20) && (A < 50)\nAch3 : A >= 50\n

    Equations will be parsed by expression-parser.

    "},{"location":"ymlachievements/#test","title":"Test","text":"
    1. Run test
      var achievements.runTest(levelName, values);\n
    2. Get obtained states
      var states = achievements.getObtainedState(levelName);\n

    or

    var states = achievements.getTestResults(levelName, values);\n
    "},{"location":"ymlachievements/#get-obtained-states","title":"Get obtained states","text":""},{"location":"ymlachievements/#get-name","title":"Get name","text":""},{"location":"ymlachievements/#save-load-obtained-states","title":"Save & load obtained states","text":""},{"location":"ymlachievements/#set-obtained-state","title":"Set obtained state","text":""},{"location":"ymlconditionstable/","title":"YAML Conditions table","text":""},{"location":"ymlconditionstable/#introduction","title":"Introduction","text":"

    Check conditions to find passed tests listed in a YAML table.

    "},{"location":"ymlconditionstable/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ymlconditionstable/#install-plugin","title":"Install plugin","text":""},{"location":"ymlconditionstable/#load-minify-file","title":"Load minify file","text":""},{"location":"ymlconditionstable/#import-plugin","title":"Import plugin","text":""},{"location":"ymlconditionstable/#import-class","title":"Import class","text":""},{"location":"ymlconditionstable/#create-instance","title":"Create instance","text":"
    var table = scene.plugins.get('rexConditionsTable').add();\n
    "},{"location":"ymlconditionstable/#load-table-from-yaml-string","title":"Load table from YAML string","text":"
    table.loadYML(ymlString);\n

    For exameple

    Test1 : (A >= 10) && (A <= 20)\nTest2 : B == 3\n

    Equations will be parsed by expression-parser.

    "},{"location":"ymlconditionstable/#test","title":"Test","text":""},{"location":"ymlconditionstable/#get-test-results","title":"Get test results","text":"
    var results = table.getTestResults(context);\n
    "},{"location":"ymlconditionstable/#get-first-pass-test-name","title":"Get first pass test name","text":"
    var testName = table.anyPassTest(context);\n
    "},{"location":"youtubeplayer/","title":"Youtube player","text":""},{"location":"youtubeplayer/#introduction","title":"Introduction","text":"

    Play youtube video on iframe.

    "},{"location":"youtubeplayer/#live-demos","title":"Live demos","text":""},{"location":"youtubeplayer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"youtubeplayer/#install-plugin","title":"Install plugin","text":""},{"location":"youtubeplayer/#load-minify-file","title":"Load minify file","text":""},{"location":"youtubeplayer/#import-plugin","title":"Import plugin","text":""},{"location":"youtubeplayer/#import-class","title":"Import class","text":""},{"location":"youtubeplayer/#add-youtube-player-object","title":"Add youtube player object","text":"

    Default configuration

    {\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\n\nvideoId: '',\nautoPlay: true,\ncontrols: false,\nkeyboardControl: true,\nmodestBranding: false,\nloop: false,\n}\n
    "},{"location":"youtubeplayer/#custom-class","title":"Custom class","text":""},{"location":"youtubeplayer/#load","title":"Load","text":"
    player.load(videoId);\n// player.load(videoId, autoPlay);\n
    "},{"location":"youtubeplayer/#play","title":"Play","text":"
    player.play();\n
    "},{"location":"youtubeplayer/#pause","title":"Pause","text":"
    player.pause();\n
    "},{"location":"youtubeplayer/#playback-time","title":"Playback time","text":""},{"location":"youtubeplayer/#duration","title":"Duration","text":"
    var duration = player.duration;  // time in seconds\n
    "},{"location":"youtubeplayer/#volume","title":"Volume","text":""},{"location":"youtubeplayer/#mute","title":"Mute","text":""},{"location":"youtubeplayer/#loop","title":"Loop","text":""},{"location":"youtubeplayer/#resize","title":"Resize","text":"
    player.resize(width, height);\n
    "},{"location":"youtubeplayer/#status","title":"Status","text":""},{"location":"youtubeplayer/#events","title":"Events","text":"

    No Playback time changed event

    Get playback time every tick might cause playing video lagging.

    "},{"location":"youtubeplayer/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"

    See dom-element's Interactive with other game objects

    "},{"location":"zone/","title":"Zone","text":""},{"location":"zone/#introduction","title":"Introduction","text":"

    Non-rendering rectangular game object for creating drop zones and input hit areas, built-in game object of phaser.

    "},{"location":"zone/#usage","title":"Usage","text":""},{"location":"zone/#add-zone-object","title":"Add zone object","text":"
    var zone = scene.add.zone(x, y, width, height);\n

    Add zone from JSON

    var zone = scene.make.zone({\nx: 0,\ny: 0,\n//width: 1,\n//height: 1,\n// origin: {x: 0.5, y: 0.5},\n});\n
    "},{"location":"zone/#custom-class","title":"Custom class","text":""},{"location":"zone/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"zone/#input-hit-zone","title":"Input hit zone","text":"
    zone.setInteractive();\n

    See touch events

    "},{"location":"zone/#drop-zones","title":"Drop zones","text":"

    See drop zone

    "}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Home","text":""},{"location":"#phaser","title":"Phaser","text":"

    Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.

    "},{"location":"#links","title":"Links","text":""},{"location":"#phaser3","title":"Phaser3","text":""},{"location":"#rex-plugins","title":"Rex plugins","text":""},{"location":"achievements/","title":"CSV Achievements","text":""},{"location":"achievements/#introduction","title":"Introduction","text":"

    Achievements in a csv table.

    "},{"location":"achievements/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"achievements/#install-plugin","title":"Install plugin","text":""},{"location":"achievements/#load-minify-file","title":"Load minify file","text":""},{"location":"achievements/#import-plugin","title":"Import plugin","text":""},{"location":"achievements/#import-class","title":"Import class","text":""},{"location":"achievements/#create-instance","title":"Create instance","text":"
    var achievements = scene.plugins.get('rexAchievements').add();\n
    "},{"location":"achievements/#load-table-from-csv-string","title":"Load table from csv string","text":"
    achievements.loadCSV(csvString, {\n// delimiter: ','\n});\n

    For exameple, csv string

    A A Lv1 Ach1 >= 10 < 20 Lv1 Ach2 >= 20 < 50 Lv1 Ach3 >= 50
    ,A,A\nLv1,Ach1,>= 10,<= 20,\nLv1,Ach2,>= 20,< 50,\nLv1,Ach3,>= 50,,\n

    means that:

    Lv1, Ach1: (A>=10) && (A<20)\nLv1, Ach2: (A>=20) && (A<50)\nLv1, Ach3: (A>=50)\n
    "},{"location":"achievements/#test","title":"Test","text":"
    1. Run test
      var achievements.runTest(levelName, values);\n
    2. Get obtained states
      var states = achievements.getObtainedState(levelName);\n

    or

    var states = achievements.getTestResults(levelName, values);\n
    "},{"location":"achievements/#get-obtained-states","title":"Get obtained states","text":""},{"location":"achievements/#get-name","title":"Get name","text":""},{"location":"achievements/#save-load-obtained-states","title":"Save & load obtained states","text":""},{"location":"achievements/#set-obtained-state","title":"Set obtained state","text":""},{"location":"alphamaskimage/","title":"Alpha mask image","text":""},{"location":"alphamaskimage/#introduction","title":"Introduction","text":"

    Load a texture, then apply an alpha mask from another texture. Extended from canvas plugin.

    "},{"location":"alphamaskimage/#live-demos","title":"Live demos","text":""},{"location":"alphamaskimage/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"alphamaskimage/#install-plugin","title":"Install plugin","text":""},{"location":"alphamaskimage/#load-minify-file","title":"Load minify file","text":""},{"location":"alphamaskimage/#import-plugin","title":"Import plugin","text":""},{"location":"alphamaskimage/#import-class","title":"Import class","text":""},{"location":"alphamaskimage/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexAlphaMaskImagePlugin',\nplugin: AlphaMaskImagePlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"alphamaskimage/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexAlphaMaskImage(x, y, key, frame, {\nmask: {\nkey: textureKey,\n// frame: frameName,\n// invertAlpha: false,\n// scale: undefined,\n}\n\n// backgroundColor: undefined,\n});\n

    or

    var image = scene.add.rexAlphaMaskImage(x, y, key, {\nmask: {\nkey: textureKey,\n// frame: frameName,\n// invertAlpha: false,\n// scale: undefined,\n}\n\n// backgroundColor: undefined,\n});\n

    Add image from JSON

    var image = scene.make.rexAlphaMaskImage({\nx: 0,\ny: 0,\nkey: key,\nframe: name,\nmask: {\nkey: textureKey,\n// frame: frameName,\n// invertAlpha: false,\n// scale: undefined,\n}\n\n// backgroundColor: undefined,\n\nadd: true\n});\n
    "},{"location":"alphamaskimage/#custom-class","title":"Custom class","text":""},{"location":"alphamaskimage/#set-texture","title":"Set texture","text":"
    image.setTexture(key, frame);\n// image.setTexture(key, frame, mask);\n

    or

    image.setTexture(key, frame, {\nmask: {\nkey: textureKey,\n// frame: frameName,\n// invertAlpha: false,\n// scale: undefined,\n}\n\n// backgroundColor: undefined,\n});\n
    "},{"location":"alphamaskimage/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"alphamaskimage/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"alphamaskimage/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"anchor/","title":"Anchor","text":""},{"location":"anchor/#introduction","title":"Introduction","text":"

    Set size and position based on visible window.

    Note

    Visible window will be changed when scale mode is ENVELOP, WIDTH_CONTROLS_HEIGHT, or HEIGHT_CONTROLS_WIDTH.

    "},{"location":"anchor/#live-demos","title":"Live demos","text":""},{"location":"anchor/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"anchor/#install-plugin","title":"Install plugin","text":""},{"location":"anchor/#load-minify-file","title":"Load minify file","text":""},{"location":"anchor/#import-plugin","title":"Import plugin","text":""},{"location":"anchor/#import-class","title":"Import class","text":""},{"location":"anchor/#create-instance","title":"Create instance","text":"
    var anchor = scene.plugins.get('rexAnchor').add(gameObject, {\n// left: '0%+0',\n// right: '0%+0',\n// centerX: '0%+0',\n// x: '0%+0',\n\n// top: '0%+0',\n// bottom: '0%+0',\n// centerY: '0%+0',\n// y: '0%+0',\n\n// width: '100%+0',\n// height: '100%+0',\n// onResizeCallback: function(width, height, gameObject, anchor) {},\n// onResizeCallbackScope: undefined,\n\n// onUpdateViewportCallback: function(viewport, gameObject, anchor) {},\n// onUpdateViewportCallbackScope: undefined,\n\n// enable: true\n});\n

    For example, anchor game object's left bound to viewport's left+10, centerY to viewport's center

    {\nleft: 'left+10',\ncenterY: 'center'\n}\n
    "},{"location":"anchor/#reset-config","title":"Reset config","text":"
    anchor.resetFromJSON({\n// left: '0%+0',\n// right: '0%+0',\n// centerX: '0%+0',\n// x: '0%+0',\n\n// top: '0%+0',\n// bottom: '0%+0',\n// centerY: '0%+0',\n// y: '0%+0',\n\n// width: '100%+0',\n// height: '100%+0',    \n\n// onUpdateViewportCallback: function(viewport, gameObject, anchor) {}\n// onUpdateViewportCallbackScope: undefined,\n})\n
    "},{"location":"anchor/#set-onupdateviewport-callback","title":"Set OnUpdateViewport callback","text":"
    anchor.setUpdateViewportCallback(callback, scope);\n
    "},{"location":"anchor/#manual-anchor","title":"Manual anchor","text":"
    anchor.anchor();\n
    "},{"location":"anchor/#auto-anchor","title":"Auto anchor","text":""},{"location":"angle/","title":"Angle","text":""},{"location":"angle/#introduction","title":"Introduction","text":"

    Convert angle value, built-in methods of phaser.

    "},{"location":"angle/#usage","title":"Usage","text":""},{"location":"angle/#degree-radians","title":"Degree <-> Radians","text":""},{"location":"angle/#wrap","title":"Wrap","text":""},{"location":"angle/#angle-between-points","title":"Angle between points","text":""},{"location":"angle/#angle-between-angles","title":"Angle between angles","text":""},{"location":"angle/#rotate-around-position","title":"Rotate around position","text":""},{"location":"angle/#rotate-to-angle","title":"Rotate to angle","text":"
    var rad = Phaser.Math.Angle.RotateTo(currentAngle, targetAngle, lerp)\n
    "},{"location":"angle/#random-angle","title":"Random angle","text":""},{"location":"animation/","title":"Animation","text":""},{"location":"animation/#introduction","title":"Introduction","text":"

    Animation and animations manager.

    "},{"location":"animation/#usage","title":"Usage","text":""},{"location":"animation/#animation-manager","title":"Animation manager","text":""},{"location":"animation/#add-animation","title":"Add animation","text":"
    scene.anims.create({\nkey: '',\n\nframes: [],\n\nsortFrames: true,\ndefaultTextureKey: null,\nskipMissedFrames: true,\n\n\n// time\ndelay: 0,\nduration: null,\nframeRate: null,\n\n// repeat\nrepeat: 0,              // set to (-1) to repeat forever\nrepeatDelay: 0,\nyoyo: false,\n\n// visible\nshowBeforeDelay: false,\nshowOnStart: false,\nhideOnComplete: false\n});\n
    "},{"location":"animation/#add-from-aseprite","title":"Add from Aseprite","text":"

    Aseprite

    scene.anims.createFromAseprite(key);\n// scene.anims.createFromAseprite(key, tags, target);\n
    "},{"location":"animation/#remove-animation","title":"Remove animation","text":"
    scene.anims.remove(key);\n
    "},{"location":"animation/#delay-between-two-animations","title":"Delay between two animations","text":""},{"location":"animation/#play-animation","title":"Play animation","text":""},{"location":"animation/#pause-all-animations","title":"Pause all animations","text":"
    scene.anims.pauseAll();\n
    "},{"location":"animation/#resume-all-animations","title":"Resume all animations","text":"
    scene.anims.resumeAll();\n
    "},{"location":"animation/#has-animation","title":"Has animation","text":"
    var hasAnim = scene.anims.exists(key);\n
    "},{"location":"animation/#exportload","title":"Export/load","text":""},{"location":"animation/#events","title":"Events","text":""},{"location":"animation/#animation-object","title":"Animation object","text":"
    var anim = scene.anims.get(key);\n
    "},{"location":"animation/#add-frame","title":"Add frame","text":""},{"location":"animation/#remove-frame","title":"Remove frame","text":""},{"location":"animation/#get-frame","title":"Get frame","text":""},{"location":"animation/#export","title":"Export","text":""},{"location":"arcade-body/","title":"Body","text":""},{"location":"arcade-body/#introduction","title":"Introduction","text":"

    Arcade physics body.

    "},{"location":"arcade-body/#usage","title":"Usage","text":""},{"location":"arcade-body/#get-physics-body","title":"Get physics body","text":"
    1. Enable physics world
    2. Add existing game object(s) to physics world
    3. Get physics body
      var body = gameObject.body;\n
    "},{"location":"arcade-body/#enable","title":"Enable","text":"

    Whether this Body is updated by the physics simulation.

    "},{"location":"arcade-body/#immovable","title":"Immovable","text":"

    Whether this Body can be moved by collisions with another Body.

    "},{"location":"arcade-body/#pushable","title":"Pushable","text":"

    Sets if this Body can be pushed by another Body.

    "},{"location":"arcade-body/#moveable","title":"Moveable","text":"

    Whether the Body's position and rotation are affected by its velocity, acceleration, drag, and gravity.

    Use case

    Set body.moves to false when game object is controlled by tween or dragging.

    "},{"location":"arcade-body/#destroy","title":"Destroy","text":"

    Physics body will be destroyed automatically when game object is destroyed.

    "},{"location":"arcade-body/#movement","title":"Movement","text":""},{"location":"arcade-body/#velocity","title":"Velocity","text":""},{"location":"arcade-body/#max-speed","title":"Max speed","text":""},{"location":"arcade-body/#max-velocity","title":"Max velocity","text":""},{"location":"arcade-body/#acceleration","title":"Acceleration","text":""},{"location":"arcade-body/#gravity","title":"Gravity","text":""},{"location":"arcade-body/#drag","title":"Drag","text":"

    Reduces speed per second.

    "},{"location":"arcade-body/#reset-position","title":"Reset position","text":"
    body.reset(x, y);\n
    "},{"location":"arcade-body/#stop","title":"Stop","text":"

    Sets acceleration, velocity, and speed to zero.

    body.stop();\n
    "},{"location":"arcade-body/#friction","title":"Friction","text":"

    If this Body is immovable and in motion, this the proportion of this Body's movement received by the riding body on each axis.

    "},{"location":"arcade-body/#speed","title":"Speed","text":""},{"location":"arcade-body/#rotation","title":"Rotation","text":""},{"location":"arcade-body/#allow-rotation","title":"Allow rotation","text":"

    Whether this Body's rotation is affected by its angular acceleration and velocity.

    "},{"location":"arcade-body/#angular-velocity","title":"Angular velocity","text":""},{"location":"arcade-body/#angular-acceleration","title":"Angular acceleration","text":""},{"location":"arcade-body/#angular-drag","title":"Angular drag","text":"

    Reduces angular speed per second.

    "},{"location":"arcade-body/#collision","title":"Collision","text":""},{"location":"arcade-body/#collision-bound","title":"Collision bound","text":""},{"location":"arcade-body/#offset","title":"Offset","text":"
    body.setOffset(x, y);\n
    "},{"location":"arcade-body/#push-out","title":"Push out","text":"
    scene.physics.add.collider(objectsA, objectsB);\n
    "},{"location":"arcade-body/#callbacks","title":"Callbacks","text":"

    Add collider

    "},{"location":"arcade-body/#point-inside","title":"Point inside","text":"
    var hit = body.hitTest(x, y);\n
    "},{"location":"arcade-body/#is-colliding","title":"Is colliding","text":""},{"location":"arcade-body/#bounce","title":"Bounce","text":""},{"location":"arcade-body/#world-bounds","title":"World bounds","text":""},{"location":"arcade-body/#blocked","title":"Blocked","text":"

    Whether this Body is colliding with a tile or the world boundary.

    "},{"location":"arcade-body/#mass","title":"Mass","text":""},{"location":"arcade-body/#static-body","title":"Static body","text":""},{"location":"arcade-body/#sync","title":"Sync","text":"

    Syncs the Bodies position and size with its parent Game Object.

    body.updateFromGameObject();\n
    "},{"location":"arcade-body/#debug","title":"Debug","text":""},{"location":"arcade-gameobject/","title":"Game object","text":""},{"location":"arcade-gameobject/#introduction","title":"Introduction","text":"

    Arcade physics Image/Sprite/Group object.

    "},{"location":"arcade-gameobject/#usage","title":"Usage","text":""},{"location":"arcade-gameobject/#add-physics-object","title":"Add physics object","text":"

    Enable physics world

    "},{"location":"arcade-gameobject/#image-object","title":"Image object","text":""},{"location":"arcade-gameobject/#sprite-object","title":"Sprite object","text":""},{"location":"arcade-gameobject/#group","title":"Group","text":""},{"location":"arcade-gameobject/#enable","title":"Enable","text":""},{"location":"arcade-gameobject/#movement","title":"Movement","text":""},{"location":"arcade-gameobject/#velocity","title":"Velocity","text":""},{"location":"arcade-gameobject/#max-velocity","title":"Max velocity","text":""},{"location":"arcade-gameobject/#acceleration","title":"Acceleration","text":""},{"location":"arcade-gameobject/#gravity","title":"Gravity","text":""},{"location":"arcade-gameobject/#drag","title":"Drag","text":""},{"location":"arcade-gameobject/#immovable","title":"Immovable","text":""},{"location":"arcade-gameobject/#pushable","title":"Pushable","text":""},{"location":"arcade-gameobject/#friction","title":"Friction","text":"

    If this Body is immovable and in motion, this the proportion of this Body's movement received by the riding body on each axis.

    "},{"location":"arcade-gameobject/#rotation","title":"Rotation","text":""},{"location":"arcade-gameobject/#allow-rotation","title":"Allow rotation","text":"

    Whether this Body's rotation is affected by its angular acceleration and velocity.

    "},{"location":"arcade-gameobject/#angular-velocity","title":"Angular velocity","text":""},{"location":"arcade-gameobject/#angular-acceleration","title":"Angular acceleration","text":"

    -Set

    gameObject.setAngularAcceleration(v);\n
    - Get
    var aa = gameObject.body.angularAcceleration;\n

    "},{"location":"arcade-gameobject/#angular-drag","title":"Angular drag","text":""},{"location":"arcade-gameobject/#collision","title":"Collision","text":""},{"location":"arcade-gameobject/#collision-bound","title":"Collision bound","text":""},{"location":"arcade-gameobject/#offset","title":"Offset","text":"
    gameObject.setOffset(x, y);\n
    "},{"location":"arcade-gameobject/#push-out","title":"Push out","text":"
    scene.physics.add.collider(objectsA, objectsB);\n
    "},{"location":"arcade-gameobject/#callbacks","title":"Callbacks","text":"

    Add collider

    "},{"location":"arcade-gameobject/#point-inside","title":"Point inside","text":"
    var hit = gameObject.hitTest(x, y);\n
    "},{"location":"arcade-gameobject/#bounce","title":"Bounce","text":""},{"location":"arcade-gameobject/#mass","title":"Mass","text":""},{"location":"arcade-gameobject/#static-game-object","title":"Static game object","text":""},{"location":"arcade-gameobject/#sync","title":"Sync","text":"

    Syncs the Bodies position and size in static game object.

    gameObject.refreshBody();\n
    "},{"location":"arcade-gameobject/#methods-of-group","title":"Methods of group","text":"
    group.setVelocity(x, y, step);\n
    group.setVelocityX(value, step);\n
    group.setVelocityY(value, step);\n
    group.refresh();  // call this method when position of game objects were changed in static object group\n
    "},{"location":"arcade-gameobject/#debug","title":"Debug","text":"
    gameObject.setDebug(showBody, showVelocity, bodyColor);\n
    gameObject.setDebugBodyColor(bodyColor);\n
    "},{"location":"arcade-tcrp-player/","title":"Player","text":""},{"location":"arcade-tcrp-player/#introduction","title":"Introduction","text":"

    Player of T ime-C ommand-R ecorder-P layer with Arcade physics engine, to run commands on time.

    Arcade physics engine is fixed-step based, not tick time based.

    This Arcade-TCRP has better result of replaying, which store step count via WORLD_STEP(worldstep) event.

    "},{"location":"arcade-tcrp-player/#live-demos","title":"Live demos","text":""},{"location":"arcade-tcrp-player/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"arcade-tcrp-player/#install-plugin","title":"Install plugin","text":""},{"location":"arcade-tcrp-player/#load-minify-file","title":"Load minify file","text":""},{"location":"arcade-tcrp-player/#import-plugin","title":"Import plugin","text":""},{"location":"arcade-tcrp-player/#import-class","title":"Import class","text":""},{"location":"arcade-tcrp-player/#create-instance","title":"Create instance","text":"
    var player = scene.plugins.get('rexTCRP').addPlayer(scene, {\n// commands: [],       // [[time, command], [time, command], ...]\n// timeScale: 1,\n// scope: undefined\n});\n
    "},{"location":"arcade-tcrp-player/#load-commands","title":"Load commands","text":"
    player.load(commands, scope);\n
    "},{"location":"arcade-tcrp-player/#start-playing","title":"Start playing","text":"
    player.start();\n// player.start(startAt);  // Start-at time in step-count\n
    "},{"location":"arcade-tcrp-player/#events","title":"Events","text":""},{"location":"arcade-tcrp-player/#pause-resume-stop-playing","title":"Pause, Resume, stop playing","text":"
    player.pause();\nplayer.resume();\nplayer.stop();\n
    "},{"location":"arcade-tcrp-player/#seek-elapsed-time","title":"Seek elapsed time","text":"
    player.seek(time);   // Elapsed time in step-count\n
    "},{"location":"arcade-tcrp-player/#state-of-player","title":"State of player","text":"
    var isPlaying = player.isPlaying;\nvar completed = player.completed;\nvar now = player.now;\n
    "},{"location":"arcade-tcrp-player/#time-scale","title":"Time-scale","text":""},{"location":"arcade-tcrp-recorder/","title":"Recoder","text":""},{"location":"arcade-tcrp-recorder/#introduction","title":"Introduction","text":"

    Recorder of T ime-C ommand-R ecorder-P layer with Arcade physics engine, to store commands with time.

    Arcade physics engine is fixed-step based, not tick time based.

    This Arcade-TCRP has better result of replaying, which store step count via WORLD_STEP(worldstep) event.

    "},{"location":"arcade-tcrp-recorder/#live-demos","title":"Live demos","text":""},{"location":"arcade-tcrp-recorder/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"arcade-tcrp-recorder/#install-plugin","title":"Install plugin","text":""},{"location":"arcade-tcrp-recorder/#load-minify-file","title":"Load minify file","text":""},{"location":"arcade-tcrp-recorder/#import-plugin","title":"Import plugin","text":""},{"location":"arcade-tcrp-recorder/#import-class","title":"Import class","text":""},{"location":"arcade-tcrp-recorder/#create-instance","title":"Create instance","text":"
    var recorder = scene.plugins.get('rexTCRP').addRecorder(scene);\n
    "},{"location":"arcade-tcrp-recorder/#start-recording","title":"Start recording","text":"
    recorder.start();\n// recorder.start(startAt);  // start-at in step-count\n
    "},{"location":"arcade-tcrp-recorder/#push-commands","title":"Push commands","text":"
    recorder.addCommand([fnName, param0, param1, ...]);\n// recorder.addCommand([command0, command1, ...]);\n// recorder.addCommand([fnName, param0, param1, ...], offset);  // time-offset in step-count\n

    See also Run commands

    "},{"location":"arcade-tcrp-recorder/#get-commands","title":"Get commands","text":"
    var commands = recorder.getCommands();        // Get a shallow copy of commands\n// var commands = recorder.getCommands(true); // Get reference of commands\n

    Format of return commands:

    [\n[time, [command]],\n[time, [command0,command1]],\n...\n]\n
    "},{"location":"arcade-tcrp-recorder/#pause-resume-stop-recording","title":"Pause, Resume, stop recording","text":"
    recorder.pause();\nrecorder.resume();\nrecorder.stop();\n
    "},{"location":"arcade-tcrp-recorder/#seek-elapsed-time","title":"Seek elapsed time","text":"
    recorder.seek(time);   // elapsed time in step-count\n
    "},{"location":"arcade-tcrp-recorder/#state-of-recorder","title":"State of recorder","text":"
    var isRecording = recorder.isRecording;\nvar now = recorder.now;\n
    "},{"location":"arcade-tcrp-recorder/#time-scale","title":"Time-scale","text":""},{"location":"arcade-tcrp-step-runner/","title":"Step runner","text":""},{"location":"arcade-tcrp-step-runner/#introduction","title":"Introduction","text":"

    Execute command in next WORLD_STEP(worldstep) event, to synchronize command execution with step-counter of Recorder of Arcade-TCRP.

    Command might be executed before or after WORLD_STEP(worldstep) event, which is emitted in scene's update event.

    "},{"location":"arcade-tcrp-step-runner/#live-demos","title":"Live demos","text":""},{"location":"arcade-tcrp-step-runner/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"arcade-tcrp-step-runner/#install-plugin","title":"Install plugin","text":""},{"location":"arcade-tcrp-step-runner/#load-minify-file","title":"Load minify file","text":""},{"location":"arcade-tcrp-step-runner/#import-plugin","title":"Import plugin","text":""},{"location":"arcade-tcrp-step-runner/#import-class","title":"Import class","text":""},{"location":"arcade-tcrp-step-runner/#create-instance","title":"Create instance","text":"
    var stepRunner = scene.plugins.get('rexTCRP').addStepRunner(scene);\n
    "},{"location":"arcade-tcrp-step-runner/#push-commands","title":"Push commands","text":"
    stepRunner.add(commands, scope);\n

    See also Run commands

    "},{"location":"arcade-tcrp-step-runner/#offset-recorder","title":"Offset recorder","text":"

    Since commands will be executed in next WORLD_STEP(worldstep) event, recorder have to add 1 step-count offset.

    "},{"location":"arcade-world/","title":"World","text":""},{"location":"arcade-world/#introduction","title":"Introduction","text":"

    World of Arcade physics engine in phaser.

    "},{"location":"arcade-world/#usage","title":"Usage","text":""},{"location":"arcade-world/#configuration","title":"Configuration","text":"
    var config = {\n// ...\nphysics: {\ndefault: 'arcade',\narcade: {\n//    x: 0,\n//    y: 0,\n//    width: scene.sys.scale.width,\n//    height: scene.sys.scale.height,\n//    gravity: {\n//        x: 0,\n//        y: 0\n//    },\n//    checkCollision: {\n//        up: true,\n//        down: true,\n//        left: true,\n//        right: true\n//    },\n//    customUpdate: false,\n//    fixedStep: true,\n//    fps: 60,\n//    timeScale: 1,     // 2.0 = half speed, 0.5 = double speed\n//    customUpdate: false,\n//    overlapBias: 4,\n//    tileBias: 16,\n//    forceX: false,\n//    isPaused: false,\n//    debug: false,\n//    debugShowBody: true,\n//    debugShowStaticBody: true,\n//    debugShowVelocity: true,\n//    debugBodyColor: 0xff00ff,\n//    debugStaticBodyColor: 0x0000ff,\n//    debugVelocityColor: 0x00ff00,\n//    maxEntries: 16,\n//    useTree: true   // set false if amount of dynamic bodies > 5000\n}\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"arcade-world/#update","title":"Update","text":""},{"location":"arcade-world/#step","title":"Step","text":"

    Advances the simulation by one step.

    scene.physics.world.step(delta);\n
    "},{"location":"arcade-world/#events","title":"Events","text":""},{"location":"arcade-world/#control","title":"Control","text":""},{"location":"arcade-world/#pause","title":"Pause","text":"
    scene.physics.pause();\n
    "},{"location":"arcade-world/#resume","title":"Resume","text":"
    scene.physics.resume();\n
    "},{"location":"arcade-world/#events_1","title":"Events","text":""},{"location":"arcade-world/#duration-per-frame","title":"Duration per frame","text":""},{"location":"arcade-world/#tile-filter-options","title":"Tile filter options","text":"
    var option = scene.physics.world.tileFilterOptions;\n
    "},{"location":"arcade-world/#body","title":"Body","text":""},{"location":"arcade-world/#enable","title":"Enable","text":"
    scene.physics.world.enable(gameObject);\n// scene.physics.world.enable(gameObject, bodyType);\n

    Or

    scene.physics.add.existing(gameObject, bodyType);\n

    See arcade-body

    "},{"location":"arcade-world/#disable","title":"Disable","text":"
    scene.physics.world.disable(gameObject);\n
    "},{"location":"arcade-world/#addremove-body","title":"Add/remove body","text":""},{"location":"arcade-world/#collision","title":"Collision","text":""},{"location":"arcade-world/#set-bound","title":"Set bound","text":"

    See bound in body object, or game object.

    "},{"location":"arcade-world/#collider-callback","title":"Collider & callback","text":""},{"location":"arcade-world/#testing-wo-collider","title":"Testing wo collider","text":""},{"location":"arcade-world/#events_2","title":"Events","text":""},{"location":"arcade-world/#world-bounds","title":"World bounds","text":""},{"location":"arcade-world/#enable_1","title":"Enable","text":""},{"location":"arcade-world/#bodies-inside-an-area","title":"Bodies inside an area","text":""},{"location":"arcade-world/#events_3","title":"Events","text":""},{"location":"arcade-world/#wrap","title":"Wrap","text":"
    scene.physics.world.wrap(gameObject, padding);\n
    "},{"location":"arcade-world/#move-to","title":"Move to","text":""},{"location":"arcade-world/#accelerate-to","title":"Accelerate to","text":""},{"location":"arcade-world/#gravity","title":"Gravity","text":"

    Total Gravity = world.gravity + body.gravity

    "},{"location":"arcade-world/#bodies","title":"Bodies","text":""},{"location":"arcade-world/#closestfurthest","title":"Closest/furthest","text":""},{"location":"arcade-world/#debug","title":"Debug","text":""},{"location":"arcade-world/#draw-body-velocity","title":"Draw body & velocity","text":""},{"location":"arcade-world/#graphics","title":"Graphics","text":"

    Draw debug body & velocity on a Graphics object.

    var graphics = scene.physics.world.debugGraphic;\n
    "},{"location":"arcade-world/#update-loop","title":"Update loop","text":"
    1. scene.sys.events: update
      1. Update position & angle of each body
      2. Process each collider
      3. Update final position of each body
      4. Emit worldstep event
    2. scene.sys.events: postupdate
      1. Draw debug graphics
    graph TB\n\nSceneEventUpdate>\"scene.sys.events: update<br><br>Update arcade world<br>gameObject.preUpdate()\"]\nSceneUpdate[\"scene.update()\"]\nSceneEventPostUpdate>\"scene.sys.events: postupdate<br><br>Post update arcade world\"]\nRender\n\nSceneEventUpdate --> SceneUpdate\nSceneUpdate --> SceneEventPostUpdate\nSceneEventPostUpdate --> Render
    "},{"location":"array-addremove/","title":"Add/remove","text":""},{"location":"array-addremove/#introduction","title":"Introduction","text":"

    Add/insert/remove item(s) of an array, built-in methods of phaser.

    "},{"location":"array-addremove/#usage","title":"Usage","text":""},{"location":"array-addremove/#add-item","title":"Add item","text":"
    Phaser.Utils.Array.Add(arr, item);\n// Phaser.Utils.Array.Add(arr, item, limit, callback, context);\n
    "},{"location":"array-addremove/#insert-item-at","title":"Insert item at","text":"
    Phaser.Utils.Array.AddAt(arr, item, index);\n// Phaser.Utils.Array.AddAt(arr, item, index, limit, callback, context);\n
    "},{"location":"array-addremove/#remove-item","title":"Remove item","text":"
    Phaser.Utils.Array.Remove(arr, item);\n// Phaser.Utils.Array.Remove(arr, item, callback, context);\n
    "},{"location":"array-addremove/#remove-item-at","title":"Remove item at","text":"
    var removed = Phaser.Utils.Array.RemoveAt(arr, index);\n// var removed = Phaser.Utils.Array.RemoveAt(arr, index, callback, context);\n
    "},{"location":"array-addremove/#remove-items-between","title":"Remove items between","text":"
    var removed = Phaser.Utils.Array.RemoveBetween(arr, startIndex, endIndex);\n// var removed = Phaser.Utils.Array.RemoveBetween(arr, startIndex, endIndex, callback, context);\n
    "},{"location":"array-addremove/#remove-random-item","title":"Remove random item","text":"
    var item = Phaser.Utils.Array.RemoveRandomElement(arr);\n
    "},{"location":"array-addremove/#replace-item","title":"Replace item","text":"

    Replaces an element of the array with the new element. The new element cannot already be a member of the array.

    Phaser.Utils.Array.Replace(arr, oldItem, newItem);\n
    "},{"location":"array-filter/","title":"Filter/Map","text":""},{"location":"array-filter/#introduction","title":"Introduction","text":"

    Built-in javascript object.

    "},{"location":"array-filter/#usage","title":"Usage","text":""},{"location":"array-filter/#run-function-for-each-element","title":"Run function for each element","text":"
    arr.forEach(function(element, index, arr) {\n//\n}, scope);\n
    "},{"location":"array-filter/#filter-elements","title":"Filter elements","text":"

    Creates a new array with all elements that pass the test function.

    var result = arr.filter(function(element, index, arr) {\nreturn true; // false\n}, scope);\n
    "},{"location":"array-filter/#find-one-element","title":"Find one element","text":"
    var element = arr.find(function(element, index, arr) {\nreturn true; // false\n}, scope);\n
    "},{"location":"array-filter/#map-elements-to-a-new-array","title":"Map elements to a new array","text":"
    var newArray = arr.map(function(element, index, arr) {\nreturn newElement;\n}, scope);\n
    "},{"location":"array-random/","title":"Random","text":""},{"location":"array-random/#introduction","title":"Introduction","text":"

    Random operation of an array, built-in methods of phaser.

    "},{"location":"array-random/#usage","title":"Usage","text":""},{"location":"array-random/#get-random-item","title":"Get random item","text":"
    var item = Phaser.Utils.Array.GetRandom(arr);\n// var item = Phaser.Utils.Array.GetRandom(arr, startIndex, length);\n
    "},{"location":"array-random/#remove-random-item","title":"Remove random item","text":"
    var item = Phaser.Utils.Array.RemoveRandomElement(arr);\n// var item = Phaser.Utils.Array.RemoveRandomElement(arr, startIndex, length);\n
    "},{"location":"array-random/#shuffle","title":"Shuffle","text":"
    var arr = Phaser.Utils.Array.Shuffle(arr);\n
    "},{"location":"array-sort/","title":"Sort","text":""},{"location":"array-sort/#introduction","title":"Introduction","text":"

    Array sorting, built-in methods of phaser.

    "},{"location":"array-sort/#usage","title":"Usage","text":""},{"location":"array-sort/#built-in-array-sort","title":"Built-in array sort","text":"
    var out = arr.sort(compareFunction);\n
    "},{"location":"array-sort/#stable-array-sort","title":"Stable array sort","text":"
    var out = Phaser.Utils.Array.StableSort(arr, compareFunction);\n
    "},{"location":"array-sort/#shuffle","title":"Shuffle","text":"
    var arr = Phaser.Utils.Array.Shuffle(arr);\n
    "},{"location":"array-sort/#move-item","title":"Move item","text":""},{"location":"audio/","title":"Audio","text":""},{"location":"audio/#introduction","title":"Introduction","text":"

    Play sounds, built-in object of phaser.

    "},{"location":"audio/#usage","title":"Usage","text":""},{"location":"audio/#configuration","title":"Configuration","text":""},{"location":"audio/#web-audio","title":"Web audio","text":"

    Web audio is the default audio context.

    "},{"location":"audio/#html5-audio","title":"Html5 audio","text":"
    var config = {\n// ....\naudio: {\ndisableWebAudio: true\n}\n// ....\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"audio/#no-audio","title":"No audio","text":"
    var config = {\n// ....\naudio: {\nnoAudio: true\n}\n// ....\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"audio/#load-audio-file","title":"Load audio file","text":"
    scene.load.audio(key, urls);  // urls: an array of file url\n// scene.load.audio(key, urls, {instances: 1}, xhrSettings);\n

    See loader

    "},{"location":"audio/#decode-audio","title":"Decode audio","text":"
    scene.sound.decodeAudio(key, audioData);\n

    Or

    scene.sound.decodeAudio(audioFiles);\n
    "},{"location":"audio/#decoded-events","title":"Decoded events","text":""},{"location":"audio/#unlock-audio","title":"Unlock audio","text":"

    Unlocks Web Audio API/HTML5 Audio loading on the initial input event.

    scene.sound.unlock();\n
    "},{"location":"audio/#play-sound","title":"Play sound","text":"

    Sound instance will be destroyed when playback ends.

    scene.sound.play(key);\n

    or

    scene.sound.play(key, config);\n/*\nvar sound = scene.sound.add(key);\nsound.play(config);\n*/\n
    "},{"location":"audio/#position-of-the-spatial-audio-listener","title":"Position of the Spatial Audio listener","text":"
    scene.sound.setListenerPosition(x, y)\n

    Note

    Web audio only

    "},{"location":"audio/#sound-instance","title":"Sound instance","text":""},{"location":"audio/#create-sound-instance","title":"Create sound instance","text":"
    var music = scene.sound.add(key);\n
    var music = scene.sound.add(key, config);\n
    "},{"location":"audio/#configuration_1","title":"Configuration","text":"
    {\nmute: false,\nvolume: 1,\nrate: 1,\ndetune: 0,\nseek: 0,\nloop: false,\ndelay: 0,\n\n// source of the spatial sound\nsource: {\nx: 0,\ny: 0,\nz: 0,\npanningModel: 'equalpower',\ndistanceModel: 'inverse',\norientationX: 0,\norientationY: 0,\norientationZ: -1,\nrefDistance: 1,\nmaxDistance: 10000,\nrolloffFactor: 1,\nconeInnerAngle: 360,\nconeOuterAngle: 0,\nconeOuterGain: 0,\nfollow: undefined\n}\n}\n
    "},{"location":"audio/#play-sound-instance","title":"Play sound instance","text":""},{"location":"audio/#methods","title":"Methods","text":""},{"location":"audio/#mute","title":"Mute","text":""},{"location":"audio/#volume","title":"Volume","text":""},{"location":"audio/#detune","title":"Detune","text":""},{"location":"audio/#play-rate","title":"Play-rate","text":""},{"location":"audio/#seek-to","title":"Seek to","text":""},{"location":"audio/#loop","title":"Loop","text":""},{"location":"audio/#properties","title":"Properties","text":""},{"location":"audio/#events","title":"Events","text":""},{"location":"audio/#play-marked-sound","title":"Play marked sound","text":"

    Sound instance will be destroyed when playback ends.

    scene.sound.play(key, marker);\n
    "},{"location":"audio/#marker","title":"Marker","text":"
    {\nname: '',\nstart: 0,\nduration: music.duration,\nconfig: {\nmute: false,\nvolume: 1,\nrate: 1,\ndetune: 0,\nseek: 0,\nloop: false,\ndelay: 0\n}\n}\n
    "},{"location":"audio/#markers-in-sound-instance","title":"Markers in sound instance","text":""},{"location":"audio/#add-marker","title":"Add marker","text":"
    music.addMarker(marker);\n

    Marker

    "},{"location":"audio/#play-marked-sound_1","title":"Play marked sound","text":"
    music.play(markerName);\n
    music.play(markerName, config);\n

    config

    "},{"location":"audio/#audio-sprite","title":"Audio sprite","text":""},{"location":"audio/#load-audio-sprite","title":"Load audio sprite","text":"
    scene.load.audioSprite(key, urls, markersConfig, config);\n

    See loader

    Format of markersConfig

    {\nresources: urls, // an array of audio files\nspritemap: {\nmarkerName0: {\nstart: 0,\nend: 0\n},\nmarkerName1: {\nstart: 0,\nend: 0\n}\n// ...\n}\n}\n

    "},{"location":"audio/#play-sound_1","title":"Play sound","text":"

    Create a sound instance then play the marked section, this sound instance will be destroyed when playback ends.

    scene.sound.playAudioSprite(key, markerName, config);\n

    config

    "},{"location":"audio/#sound-instance_1","title":"Sound instance","text":"

    Create a sound instance with markers.

    var music = scene.sound.addAudioSprite(key, config);\n

    config

    "},{"location":"audio/#play-sound-instance_1","title":"Play sound instance","text":"
    music.play(markerName);\n
    music.play(markerName, config);\n

    config

    "},{"location":"audio/#sound-manager","title":"Sound manager","text":""},{"location":"audio/#mute_1","title":"Mute","text":""},{"location":"audio/#volume_1","title":"Volume","text":""},{"location":"audio/#detune_1","title":"Detune","text":""},{"location":"audio/#play-rate_1","title":"Play-rate","text":""},{"location":"audio/#get-music-instance","title":"Get music instance","text":""},{"location":"audio/#remove-music-instance","title":"Remove music instance","text":""},{"location":"audio/#stop-music-instance","title":"Stop music instance","text":""},{"location":"audio/#analyser","title":"Analyser","text":"

    Analyser node is only available in Web audio mode.

    1. Create analyser node
      var analyser = scene.sound.context.createAnalyser();\n
    2. Configure analyser node
      analyser.smoothingTimeConstant = 1;\nanalyser.fftSize = 8192;\nanalyser.minDecibels = -90;\nanalyser.maxDecibels = -10;\n
    3. Set source of analyser node
    4. Ouput analyser node to audio context
      analyser.connect(scene.sound.context.destination);\n
    5. Create output data array
      var dataArrayLength = analyser.frequencyBinCount;\nvar dataArray = new Uint8Array(dataArrayLength);\n
    6. Get output data
      analyser.getByteTimeDomainData(dataArray);\n
    "},{"location":"awaitloader/","title":"Await loader","text":""},{"location":"awaitloader/#introduction","title":"Introduction","text":"

    Await custom task in preload stage.

    "},{"location":"awaitloader/#live-demos","title":"Live demos","text":""},{"location":"awaitloader/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"awaitloader/#install-plugin","title":"Install plugin","text":""},{"location":"awaitloader/#load-minify-file","title":"Load minify file","text":""},{"location":"awaitloader/#import-plugin","title":"Import plugin","text":""},{"location":"awaitloader/#import-class","title":"Import class","text":""},{"location":"awaitloader/#start-loading-task","title":"Start loading task","text":"

    In preload stage:

    scene.load.rexAwait(function(successCallback, failureCallback) {\n// successCallback();\n}, scope);\n

    or

    var callback = function(successCallback, failureCallback) {\n// successCallback();\n};\nscene.load.rexAwait(key, {\ncallback: callback,\n// scope: scope\n});\n
    1. This plugin runs callback to start custom task.
    2. Calls successCallback when custom task completed, or failureCallback if error.
    "},{"location":"awaytime/","title":"Away time","text":""},{"location":"awaytime/#introduction","title":"Introduction","text":"

    Get time from previous closing application to now.

    "},{"location":"awaytime/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"awaytime/#install-plugin","title":"Install plugin","text":""},{"location":"awaytime/#load-minify-file","title":"Load minify file","text":""},{"location":"awaytime/#import-plugin","title":"Import plugin","text":""},{"location":"awaytime/#import-class","title":"Import class","text":""},{"location":"awaytime/#default-away-timer","title":"Default away-timer","text":""},{"location":"awaytime/#get-away-time","title":"Get away-time","text":"
    var awayTime = scene.plugins.get('rexAwayTime').awayTime;\n// var awayTime = scene.plugins.get('rexAwayTime').setKey(key).setPeriod(time).awayTime;\n

    Note

    This action also starts saving current time-stamp periodically into localstorage.

    "},{"location":"awaytime/#set-key","title":"Set key","text":"
    scene.plugins.get('rexAwayTime').setKey(key);\n
    "},{"location":"awaytime/#set-period","title":"Set period","text":"
    scene.plugins.get('rexAwayTime').setPeriod(time);\n
    "},{"location":"awaytime/#add-away-timer-object","title":"Add away timer object","text":"
    var awayTimer = scene.plugins.get('rexAwayTime').add({\nkey: 'away',\nperiod: 1000\n})\n
    "},{"location":"awaytime/#get-away-time_1","title":"Get away-time","text":"
    var awayTime = awayTimer.awayTime;\n

    Will also start timer.

    "},{"location":"awaytime/#stop-timer","title":"Stop timer","text":"
    awayTimer.stop();\n
    "},{"location":"base64/","title":"Base64","text":""},{"location":"base64/#introduction","title":"Introduction","text":"

    Decode a base64 string to an array buffer, or create a base64 string from an array buffer, built-in method of phaser.

    "},{"location":"base64/#usage","title":"Usage","text":""},{"location":"base64/#base64-array-buffer","title":"Base64 -> Array buffer","text":"
    var arrayBuffer = Phaser.Utils.Base64.Base64ToArrayBuffer(base64);\n
    "},{"location":"base64/#array-buffer-base64","title":"Array buffer -> Base64","text":"
    var base64 = Phaser.Utils.Base64.ArrayBufferToBase64(arrayBuffer, mediaType);\n
    "},{"location":"bbcodetext/","title":"BBCode Text","text":""},{"location":"bbcodetext/#introduction","title":"Introduction","text":"

    Drawing text with BBCode protocol.

    "},{"location":"bbcodetext/#live-demos","title":"Live demos","text":""},{"location":"bbcodetext/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"bbcodetext/#install-plugin","title":"Install plugin","text":""},{"location":"bbcodetext/#load-minify-file","title":"Load minify file","text":""},{"location":"bbcodetext/#import-plugin","title":"Import plugin","text":""},{"location":"bbcodetext/#import-class","title":"Import class","text":""},{"location":"bbcodetext/#bbcode","title":"BBCode","text":"

    Note

    Can set delimiter [] to another custom value in style of constructor.

    "},{"location":"bbcodetext/#add-text-object","title":"Add text object","text":"
    var txt = scene.add.rexBBCodeText(x, y, '[b]h[/b]ello');\n// var txt = scene.add.rexBBCodeText(x, y, '[b]h[/b]ello', { fontFamily: 'Arial', fontSize: 64, color: '#00ff00' });\n

    Default style

    {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,  // null, css string, or number\nbackgroundColor2: null,  // null, css string, or number\nbackgroundHorizontalGradient: true,\nbackgroundStrokeColor: null,  // null, css string, or number\nbackgroundStrokeLineWidth: 2,\n\nbackgroundCornerRadius: 0,  // 0   : no round corner, \n// > 0 : convex round corner\n// < 0 : concave round corner\n\nbackgroundCornerIteration: null,    color: '#fff',  // null, css string, or number\nstroke: '#fff',  // null, css string, or number\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',  // css string, or number\nblur: 0,\nstroke: false,\nfill: false\n},\nunderline: {\ncolor: '#000',  // css string, or number\nthickness: 0,\noffset: 0\n},\nstrikethrough: {\ncolor: '#000',  // css string, or number\nthickness: 0,\noffset: 0\n},\n// align: 'left',  // Equal to halign\nhalign: 'left', // 'left'|'center'|'right'\nvalign: 'top',  // 'top'|'center'|'bottom'\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\nmaxLines: 0,\nlineSpacing: 0,\nfixedWidth: 0,\nfixedHeight: 0,\ntestString: '|M\u00c9qgy',\nwrap: {\nmode: 'none'     // 0|'none'|1|'word'|2|'char'|'character'\nwidth: null\n},\n// rtl: false,\nmetrics: false,\n// metrics: {\n//     ascent: 0,\n//     descent: 0,\n//     fontSize: 0\n// },\n\n// images: {\n//     imgKey: {y: -8}\n// },\n\n// delimiters: '[]',\n\n// sharedPool: true,\n\n// urlTagCursorStyle: 'pointer',\n// interactive: false\n}\n

    or

    var txt = scene.add.rexBBCodeText({\nx: 0,\ny: 0,\ntext: '',\nstyle: {\nfontSize: '64px',\nfontFamily: 'Arial',\ncolor: '#ffffff',\nalign: 'center',\nbackgroundColor: '#ff00ff',\n// ...\n},\n})\n

    or

    var txt = scene.make.rexBBCodeText({\nx: 0,\ny: 0,\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0\n//x: 32,    // 32px padding on the left/right\n//y: 16     // 16px padding on the top/bottom\n},\ntext: 'Text\\nGame Object\\nCreated from config',\nstyle: {\nfontSize: '64px',\nfontFamily: 'Arial',\ncolor: '#ffffff',\nalign: 'center',\nbackgroundColor: '#ff00ff',\n// ...\n},\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"bbcodetext/#custom-class","title":"Custom class","text":""},{"location":"bbcodetext/#wrap","title":"Wrap","text":""},{"location":"bbcodetext/#content","title":"Content","text":""},{"location":"bbcodetext/#set-style","title":"Set style","text":"
    txt.setStyle(style);\ntxt.setFont(font);  // font: {fontFamily, fontSize, fontStyle}\ntxt.setFontFamily(family);\ntxt.setFontSize(size);\ntxt.setFontStyle(style);\n
    "},{"location":"bbcodetext/#color","title":"Color","text":""},{"location":"bbcodetext/#align","title":"Align","text":""},{"location":"bbcodetext/#image","title":"Image","text":""},{"location":"bbcodetext/#hit-area-of-words","title":"Hit area of words","text":"

    Size of hit-area is word-width x line-height, or image-width x line-height.

    "},{"location":"bbcodetext/#hitting-events","title":"Hitting events","text":""},{"location":"bbcodetext/#draw-hit-areas","title":"Draw hit-areas","text":"
    txt.drawAreaBounds(graphics, color);\n
    "},{"location":"bbcodetext/#line-spacing","title":"Line spacing","text":"

    This value is added to the height of the font when calculating the overall line height.

    "},{"location":"bbcodetext/#padding","title":"Padding","text":""},{"location":"bbcodetext/#max-lines","title":"Max lines","text":""},{"location":"bbcodetext/#fixed-size","title":"Fixed size","text":""},{"location":"bbcodetext/#margin-of-text","title":"Margin of text","text":"
    var leftMargin = txt.measureTextMargins(testString).left;\n
    "},{"location":"bbcodetext/#shift-start-position-of-text","title":"Shift start position of text","text":"
    txt.setXOffset(value);\n
    "},{"location":"bbcodetext/#resolution","title":"Resolution","text":""},{"location":"bbcodetext/#test-string","title":"Test string","text":"

    Set the test string to use when measuring the font.

    txt.setTestString(text);\n
    "},{"location":"bbcodetext/#save-texture","title":"Save texture","text":"
    txt.generateTexture(key);\n// txt.generateTexture(key, x, y, width, height);\n
    "},{"location":"bbcodetext/#delimiters","title":"Delimiters","text":"
    txt.setDelimiters(delimiters);  // '<>', or ['<', '>']\n

    or

    txt.setDelimiters(delimiterLeft, delimiterRight); // '<', '>'\n
    "},{"location":"bbcodetext/#rtl","title":"RTL","text":""},{"location":"bbcodetext/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"bbcodetext/#create-mask","title":"Create mask","text":"
    var mask = txt.createBitmapMask();\n

    See mask

    "},{"location":"bbcodetext/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"bitmaptext/","title":"Static bitmap text","text":""},{"location":"bitmaptext/#introduction","title":"Introduction","text":"

    Drawing text by texture, built-in game object of phaser.

    "},{"location":"bitmaptext/#usage","title":"Usage","text":""},{"location":"bitmaptext/#load-bitmap-font","title":"Load bitmap font","text":""},{"location":"bitmaptext/#add-bitmap-text-object","title":"Add bitmap text object","text":"
    var txt = scene.add.bitmapText(x, y, key, text);\n// var txt = scene.add.bitmapText(x, y, key, text, size, align);\n

    Add text from JSON

    var txt = scene.make.bitmapText({\nx: 0,\ny: 0,\ntext: 'Text\\nGame Object\\nCreated from config',\nfont: '',\nsize: false,\nalign: 0,\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"bitmaptext/#custom-class","title":"Custom class","text":""},{"location":"bitmaptext/#set-text","title":"Set text","text":"
    txt.setText('...');\n

    or

    txt.text = '...';\n
    "},{"location":"bitmaptext/#set-align","title":"Set align","text":"

    or

    txt.align = align;\n
    "},{"location":"bitmaptext/#set-letter-spacing","title":"Set letter spacing","text":"
    txt.setLetterSpacing(spacing);\n

    or

    txt.letterSpacing = spacing;\n

    Can be a positive value to increase the space, or negative to reduce it.

    "},{"location":"bitmaptext/#set-line-spacing","title":"Set line spacing","text":"
    txt.setLineSpacing(spacing);\n

    or

    txt.lineSpacing = spacing;\n

    Can be a positive value to increase the space, or negative to reduce it.

    "},{"location":"bitmaptext/#set-font-size","title":"Set font size","text":"
    txt.setFontSize(size);\n

    or

    txt.fontSize = size;\n
    "},{"location":"bitmaptext/#set-font","title":"Set font","text":"
    txt.setFont(key);\n// txt.setFont(key, size, align);\n
    "},{"location":"bitmaptext/#tint","title":"Tint","text":"

    See Tint.

    "},{"location":"bitmaptext/#color-of-characters","title":"Color of characters","text":""},{"location":"bitmaptext/#drop-shadow-effect","title":"Drop shadow effect","text":"
    txt.setDropShadow(x, y, color, alpha);\n

    or

    txt.dropShadowX = x;\ntxt.dropShadowY = y;\ntxt.dropShadowColor = color;\ntxt.dropShadowAlpha = alpha;\n

    Note

    WebGL only

    "},{"location":"bitmaptext/#wrap","title":"Wrap","text":""},{"location":"bitmaptext/#get-bounds","title":"Get bounds","text":"
    var width = txt.width;\nvar height = txt.height;\n

    or

    var bounds = txt.getTextBounds(round);\n// bounds = {\n//     local: {\n//         x: 0,\n//         y: 0,\n//         width: 0,\n//         height: 0\n//     },\n//     global: {\n//         x: 0,\n//         y: 0,\n//         width: 0,\n//         height: 0\n//     },\n//     lines: {\n//         shortest: 0,\n//         longest: 0,\n//         lengths: null,\n//         height: 0\n//     },\n//     wrappedText: '',\n//     words: [],\n//     characters: [],\n//     scaleX: 0,\n//     scaleY: 0\n// };\n
    "},{"location":"bitmaptext/#get-information-of-character","title":"Get information of character","text":"
    var data = txt.getCharacterAt(x, y);\n// var data = txt.getCharacterAt(x, y, camera);\n
    "},{"location":"bitmaptext/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"bitmaptext/#create-mask","title":"Create mask","text":"
    var mask = txt.createBitmapMask();\n

    See mask

    "},{"location":"bitmaptext/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"bitmaptext/#appendix","title":"Appendix","text":""},{"location":"bitmaptext/#default-characters-set-of-retro-font","title":"Default characters set of retro font","text":""},{"location":"bitmapzone/","title":"Bitmap zone","text":""},{"location":"bitmapzone/#introduction","title":"Introduction","text":"

    Particles' emitter zone from canvas bitmap of text/canvas game object.

    "},{"location":"bitmapzone/#live-demo","title":"Live demo","text":""},{"location":"bitmapzone/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"bitmapzone/#install-plugin","title":"Install plugin","text":""},{"location":"bitmapzone/#load-minify-file","title":"Load minify file","text":""},{"location":"bitmapzone/#import-plugin","title":"Import plugin","text":""},{"location":"bitmapzone/#import-class","title":"Import class","text":""},{"location":"bitmapzone/#create-shape","title":"Create shape","text":"
    var bitmapZone = scene.plugins.get('rexBitmapZone').add(gameObject);\n
    "},{"location":"bitmapzone/#emit-zone","title":"Emit zone","text":"
    var particles = scene.add.particles(key,\n[\n// emitter config\n{\n// blendMode:\n// scale:\n// speed:\n// garvityY:\nemitZone: {\ntype: 'random',\nsource: bitmapZone\n}\n}\n]);\n

    bitmapZone provides getRandomPoint method.

    "},{"location":"bitmapzone/#update-content","title":"Update content","text":"
    bitmapZone.setSource(gameObject);\n
    "},{"location":"blendmode/","title":"Blend mode","text":""},{"location":"blendmode/#introduction","title":"Introduction","text":"

    Constant value of blend modes.

    "},{"location":"blendmode/#usage","title":"Usage","text":""},{"location":"blendmode/#webgl-and-canvas","title":"WebGL and Canvas","text":""},{"location":"blendmode/#canvas-only","title":"Canvas only","text":"

    Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these reasons try to be careful about the construction of your Scene and the frequency in which blend modes are used.

    "},{"location":"blitter/","title":"Blitter","text":""},{"location":"blitter/#introduction","title":"Introduction","text":"

    Display of static images, built-in game object of phaser.

    "},{"location":"blitter/#usage","title":"Usage","text":""},{"location":"blitter/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"blitter/#add-blitter-container","title":"Add blitter container","text":"

    Add blitter container

    var blitter = scene.add.blitter(x, y, key);\n

    Add blitter container from JSON

    var blitter = scene.make.blitter({\nx: 0,\ny: 0,\nkey: '',\n\n// angle: 0,\n// alpha: 1\n// flipX: true,\n// flipY: true,\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"blitter/#custom-class","title":"Custom class","text":""},{"location":"blitter/#add-bob-object","title":"Add bob object","text":"
    var bob = blitter.create(x, y);\n// var bob = blitter.create(x, y, frame, visible, index);\n
    "},{"location":"blitter/#add-mutiple-bob-objects","title":"Add mutiple bob objects","text":"
    var bobs = blitter.createMultiple(quantity, frame, visible);\n
    "},{"location":"blitter/#add-bob-object-from-callback","title":"Add bob object from callback","text":"
    var bobs = blitter.createFromCallback(callback, quantity, frame, visible)\n// var callback = function(bob, i){};\n
    "},{"location":"blitter/#get-bob-objects","title":"Get bob objects","text":"
    var bobs = blitter.children.list;\n
    "},{"location":"blitter/#clear-all-bob-objects","title":"Clear all bob objects","text":"
    blitter.clear();\n
    "},{"location":"blitter/#bob-object","title":"Bob object","text":"

    A Bob has a position, alpha value and a frame from a texture that it uses to render with. You can also toggle the flipped and visible state of the Bob.

    "},{"location":"blitter/#position","title":"Position","text":""},{"location":"blitter/#frame","title":"Frame","text":""},{"location":"blitter/#flip","title":"Flip","text":""},{"location":"blitter/#visible","title":"Visible","text":""},{"location":"blitter/#alpha","title":"Alpha","text":""},{"location":"blitter/#tint","title":"Tint","text":""},{"location":"blitter/#destroy","title":"Destroy","text":"
    bob.destroy();\n
    "},{"location":"blitter/#data","title":"Data","text":"
    var data = bob.data;  // {}\n
    "},{"location":"blitter/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"blitter/#create-mask","title":"Create mask","text":"
    var mask = bob.createBitmapMask();\n

    See mask

    "},{"location":"blitter/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"board-bejeweled/","title":"Bejeweled","text":""},{"location":"board-bejeweled/#introduction","title":"Introduction","text":"

    Match3-like gameplay template.

    "},{"location":"board-bejeweled/#live-demos","title":"Live demos","text":""},{"location":"board-bejeweled/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-bejeweled/#install-plugin","title":"Install plugin","text":""},{"location":"board-bejeweled/#load-minify-file","title":"Load minify file","text":""},{"location":"board-bejeweled/#import-template","title":"Import template","text":""},{"location":"board-bejeweled/#create-bejeweled-object","title":"Create bejeweled object","text":"
    var bejeweled = new Bejeweled(scene, {\n// rexBoard: 'rexBoard',\n\nboard: {\ngrid: {\ngridType: 'quadGrid',\nx: 30,\ny: 30 - 600,\ncellWidth: 60,\ncellHeight: 60,\n},\nwidth: 10,\nheight: 20 // Prepared rows: upper 10 rows\n},\nmatch: {\n// wildcard: undefined\n// dirMask: undefined\n},\nchess: {\n// pick random symbol from array, or a callback to return symbol\nsymbols: [0, 1, 2, 3, 4, 5],\n// symbols: function(board, tileX, tileY, excluded) { return symbol; }\n\n// User-defined chess game object\ncreate: function (board) {\n// Create Game object (Shape, Image, or Sprite)\nvar scene = board.scene;\nvar gameObject = scene.add.sprite(0, 0, textureKey, frame);\n// Initial 'symbol' value\ngameObject.setData('symbol', undefined);\n// Add data changed event of 'symbol` key\ngameObject.data.events.on('changedata_symbol', function (gameObject, value, previousValue) {\n// Change the appearance of game object via new symbol value\ngameObject.setFrame(newFrame);\n});\nreturn gameObject;\n},\n\n// scope for callbacks\nscope: undefined,\n\n// moveTo behavior\nmoveTo: {\nspeed: 400\n},\n// tileZ: 1,\n},\n// mask: false,\n\nselect1Action: undefined,\nselect2Action: undefined,\nswapAction: undefined,\nundoSwapAction: undefined,\neliminatingAction: undefined,\nfallingAction: undefined,\n\n// input: true\n})\n

    Configurations

    "},{"location":"board-bejeweled/#board-height","title":"Board height","text":"

    Board is separated into two parts: upper and bottom

    For example, if amount of visible rows is 10, board.height should set to 20.

    "},{"location":"board-bejeweled/#generate-symbol","title":"Generate symbol","text":"

    Symbols are declared in property chess.symbols in a symbol array like [0, 1, 2, 3, 4, 5], or a callback to return a symbol. The callback also use chess.scope as the scope.

    function(board, tileX, tileY, excluded) {\nreturn symbol\n}\n
    "},{"location":"board-bejeweled/#create-chess-object","title":"Create chess object","text":"

    Return a game object from a callback.

    function(board) {\n// Create Game object (Image, Sprite, or Shape)\nvar scene = board.scene;\nvar gameObject = scene.add.sprite(0, 0, textureKey, frame);\n// Initial 'symbol' value\ngameObject.setData('symbol', undefined);\n// Add data changed event of 'symbol` key\ngameObject.data.events.on('changedata_symbol', function (gameObject, value, previousValue) {\n// Change the appearance of game object via new symbol value\ngameObject.setFrame(newFrame);\n});\nreturn gameObject;\n}\n

    Each chess has a symbol value stored in 'symbol' key in private data. Add data changed event of 'symbol' key to change the appearance of game object via new symbol value.

    "},{"location":"board-bejeweled/#states","title":"States","text":"
    graph TD\n\nStart((Start)) --> Select1Start[select1-start]\n\nsubgraph Select 1 states\n  Select1Start --> |Input| Select1[select1]\nend\n\nSelect1 --> select2Start[select2-start]\n\nsubgraph Select 2 states\n  select2Start --> |Input| select2[select2]\nend\n\nselect2Start --> Select1Start\nselect2 --> Swap[swap]\nSwap --> MatchStart[match-start]\n\nsubgraph Match states\n  MatchStart --> Match[match]\n  Match --> Eliminate[eliminate]\n  Match --> MatchEnd[match-end]\n  Eliminate --> Fall[fall]\n  Fall --> Fill[fill]\n  Fill --> Match\nend\n\nMatchEnd --> UndoSwap[undo-swap]\nUndoSwap --> Select1Start\nMatchEnd --> Select1Start
    "},{"location":"board-bejeweled/#select-first-chess","title":"Select first chess","text":"

    Fire 'select1' event

    bejeweled.on('select1', function(board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#custom-select-first-chess-action","title":"Custom Select first chess Action","text":"

    Default select action:

    function (chess, board, bejeweled) {\n// Do nothing\n}\n
    "},{"location":"board-bejeweled/#select-second-chess","title":"Select second chess","text":"

    Fire 'select2' event

    bejeweled.on('select2', function(board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#custom-select-second-chess-action","title":"Custom Select second chess Action","text":"

    Default select action: The same as Select first chess Action

    "},{"location":"board-bejeweled/#swap-selected-chess","title":"Swap selected chess","text":"

    Fire 'swap' event

    bejeweled.on('swap', function(selectedChess1, selectedChess2, board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#custom-swap-action","title":"Custom Swap Action","text":"

    Default swap action:

    function (chess1, chess2, board, bejeweled) {\nvar tileXYZ1 = board.chessToTileXYZ(chess1);\nvar tileXYZ2 = board.chessToTileXYZ(chess2);\nvar tileX1 = tileXYZ1.x,\ntileY1 = tileXYZ1.y,\ntileX2 = tileXYZ2.x,\ntileY2 = tileXYZ2.y,\ntileZ = tileXYZ1.z;\n\n// TileZ of chess1 and chess2 are the same, change tileZ of chess2 to a different value\nboard.moveChess(chess2, tileX2, tileY2, `#${tileZ}`, false);\n\n// Move chess1 to tileXYZ2, chess2 to tileXYZ1\nvar moveTo1 = bejeweled.getChessMoveTo(chess1);\nvar moveTo2 = bejeweled.getChessMoveTo(chess2);\nmoveTo1.moveTo(tileX2, tileY2);\nmoveTo2.moveTo(tileX1, tileY1);\n\n// Change tileZ of chess2 back\nboard.moveChess(chess2, tileX1, tileY1, tileZ, false);\n\nif (moveTo1.isRunning) {\nbejeweled.waitEvent(moveTo1, 'complete');\n}\nif (moveTo2.isRunning) {\nbejeweled.waitEvent(moveTo2, 'complete');\n}\n};\n
    "},{"location":"board-bejeweled/#match-start","title":"Match start","text":"

    Fire 'match-start' event

    bejeweled.on('match-start', function(board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#match-lines","title":"Match lines","text":"

    Fire 'match' event

    bejeweled.on('match', function(lines, board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#eliminating-chess","title":"Eliminating chess","text":"

    Fire 'eliminate' event

    bejeweled.on('eliminate', function(chessArray, board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#custom-eliminating-action","title":"Custom Eliminating Action","text":"

    Default fliminating action:

    function (chessArray, board, bejeweled) {\nconst duration = 500; //ms\nfor (var i = 0, cnt = chessArray.length; i < cnt; i++) {\nvar fade = FadeOutDestroy(chessArray[i], duration);\nbejeweled.waitEvent(fade, 'complete');\n}\n}\n
    "},{"location":"board-bejeweled/#falling-chess","title":"Falling chess","text":"

    Fire 'fall' event

    bejeweled.on('fall', function(board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#custom-falling-action","title":"Custom Falling Action","text":"

    Default falling action:

    function (board, bejeweled) {\nvar tileZ = bejeweled.chessTileZ,\nchess, moveTo;\n\nfor (var tileY = (board.height - 1); tileY >= 0; tileY--) { // bottom to top\nfor (var tileX = 0, cnt = board.width; tileX < cnt; tileX++) { // left to right\nchess = board.tileXYZToChess(tileX, tileY, tileZ);\nif (chess === null) {\ncontinue;\n}\nmoveTo = bejeweled.getChessMoveTo(chess);\ndo {\nmoveTo.moveToward(1);\n} while (moveTo.lastMoveResult)\nif (moveTo.isRunning) {\nbejeweled.waitEvent(moveTo, 'complete');\n}\n}\n}\n}\n
    "},{"location":"board-bejeweled/#fill-chess","title":"Fill chess","text":"

    Fire 'fill' event

    bejeweled.on('fill', function(board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#match-end","title":"Match end","text":"

    Fire 'match-end' event

    bejeweled.on('match-end', function(board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#undo-swap-selected-chess","title":"Undo-swap selected chess","text":"

    Fire 'undo-swap' event

    bejeweled.on('undo-swap', function(selectedChess1, selectedChess2, board, bejeweled) {\n\n}, scope);\n
    "},{"location":"board-bejeweled/#custom-undo-swap-action","title":"Custom Undo-Swap Action","text":"

    Default undo-swap action : Equal to Swap action

    "},{"location":"board-bejeweled/#start-gameplay","title":"Start gameplay","text":"
    bejeweled.start();\n
    "},{"location":"board-bejeweled/#input-control","title":"Input control","text":""},{"location":"board-bejeweled/#default-input","title":"Default input","text":"
    1. Enable default input control
      var bejeweled = new Bejeweled(scene, {\n// ...\ninput: true\n});\n
    2. Enable/disable temporarily.
    "},{"location":"board-bejeweled/#custom-input","title":"Custom input","text":"
    1. Discard default input control
      var bejeweled = new Bejeweled(scene, {\n// ...\ninput: false\n});\n
    2. Add custom input logic like
      scene.input\n.on('pointerdown', function (pointer) {\nvar chess = bejeweled.worldXYToChess(pointer.worldX, pointer.worldY);\nif (chess) {\nbejeweled.selectChess1(chess);\n}\n}, scene)\n.on('pointermove', function (pointer) {\nif (!pointer.isDown) {\nreturn;\n}\nvar chess = bejeweled.worldXYToChess(pointer.worldX, pointer.worldY);\nif (chess && (chess !== this.bejeweled.getSelectedChess1())) {\nbejeweled.selectChess2(chess);\n}\n}, scene);\n

    Helper methods

    "},{"location":"board-bejeweled/#data","title":"Data","text":"

    See data manager

    Note

    Ensure data manager is created before binding any data-changed events.

    "},{"location":"board-bejeweled/#misc","title":"Misc","text":""},{"location":"board-chessdata/","title":"Chess data","text":""},{"location":"board-chessdata/#introduction","title":"Introduction","text":"

    Properties of chess, chess behavior of Board system.

    "},{"location":"board-chessdata/#usage","title":"Usage","text":""},{"location":"board-chessdata/#add-chess-data-object","title":"Add chess data object","text":"

    Chess data will be added to game object via gameObject.rexChess once adding this game object to board, or attach any chess behavior.

    "},{"location":"board-chessdata/#get-chess-data","title":"Get chess data","text":"
    var chessData = gameObject.rexChess;\n
    "},{"location":"board-chessdata/#set-tile-z","title":"Set tile Z","text":"
    gameObject.rexChess.setTileZ(tileZ);\n

    (tileX, tileY) won't be changed.

    "},{"location":"board-chessdata/#get-tile-position","title":"Get tile position","text":"
    var tileXYZ = gameObject.rexChess.tileXYZ;\n
    "},{"location":"board-chessdata/#get-board","title":"Get board","text":"
    var board = gameObject.rexChess.board;\n

    See also

    "},{"location":"board-chessdata/#blocker","title":"Blocker","text":""},{"location":"board-fieldofview/","title":"Field of view","text":""},{"location":"board-fieldofview/#introduction","title":"Introduction","text":"

    Visible testing, to find field of view, chess behavior of Board system.

    "},{"location":"board-fieldofview/#live-demos","title":"Live demos","text":""},{"location":"board-fieldofview/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-fieldofview/#install-plugin","title":"Install plugin","text":""},{"location":"board-fieldofview/#load-minify-file","title":"Load minify file","text":""},{"location":"board-fieldofview/#import-plugin","title":"Import plugin","text":""},{"location":"board-fieldofview/#import-class","title":"Import class","text":""},{"location":"board-fieldofview/#create-instance","title":"Create instance","text":"
    var fieldOfView = scene.rexBoard.add.fieldOfView(chess, {\n// face: 0,\n// cone: undefined,\n// coneMode: 0,\n// perspective: false,\n\n// ** pre-test **\n// occupiedTest: false,\n// blockerTest: false,\n// preTestCallback: undefined,\n// preTestCallbackScope: undefined,\n\n// ** cost **\n// costCallback: undefined,\n// costCallbackScope: undefined,\n// cost: undefined,   // constant cost\n\n// debug: {\n//     graphics: undefined,\n//     visibleLineColor: 0x00ff00,\n//     invisibleLineColor: 0xff0000,\n//     log: false,\n// }\n})\n

    Note

    Blocker is visible, but tiles behind blocker are invisible.

    "},{"location":"board-fieldofview/#set-pre-test-function","title":"Set pre-test function","text":"
    fieldOfView.setPreTestFunction(callback, scope);\n
    "},{"location":"board-fieldofview/#set-cost-function","title":"Set cost function","text":""},{"location":"board-fieldofview/#is-tilexychess-visible","title":"Is tileXY/chess visible","text":"
    var isVisible = fieldOfView.isInLOS(chess);\n// var isVisible = fieldOfView.isInLOS(chess, visiblePoints);\n// var isVisible = fieldOfView.isInLOS(chess, visiblePoints, originTileXY);\n
    "},{"location":"board-fieldofview/#get-tilexy-array-in-field-of-view","title":"Get tileXY array in field of view","text":"
    var tileXYArray = fieldOfView.findFOV();\n// var tileXYArray = fieldOfView.findFOV(visiblePoints);\n// var tileXYArray = fieldOfView.findFOV(visiblePoints, originTileXY);\n// var out = fieldOfView.findFOV(visiblePoints, out);\n// var out = fieldOfView.findFOV(visiblePoints, originTileXY, out);\n
    "},{"location":"board-fieldofview/#filter-visible-tilexy-array","title":"Filter visible tileXY array","text":""},{"location":"board-fieldofview/#face","title":"Face","text":"

    Face direction

    "},{"location":"board-fieldofview/#debug","title":"Debug","text":""},{"location":"board-hexagongrid/","title":"Hexagon","text":""},{"location":"board-hexagongrid/#introduction","title":"Introduction","text":"

    Hexagon grid object of Board system.

    "},{"location":"board-hexagongrid/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-hexagongrid/#create-instance","title":"Create instance","text":"
    var grid = scene.rexBoard.add.hexagonGrid({\nx: 0,\ny: 0,\ncellWidth: 0,\ncellHeight: 0,\n// size: undefined,\nstaggeraxis: 1,\nstaggerindex: 1\n});\n

    or

    // import { HexagonGrid } from 'phaser3-rex-plugins/plugins/board-components.js';\nvar grid = new HexagonGrid(config);\n
    "},{"location":"board-hexagongrid/#world-position-of-tile-0-0","title":"World position of tile (0, 0)","text":""},{"location":"board-hexagongrid/#cell-size","title":"Cell size","text":""},{"location":"board-hexagongrid/#grid-type","title":"Grid type","text":""},{"location":"board-hexagongrid/#get-world-position","title":"Get world position","text":"
    var worldXY = grid.getWorldXY(tileX, tileY);  // worldXY: {x, y}\n// var out = grid.getWorldXY(tileX, tileY, out);\n
    "},{"location":"board-hexagongrid/#get-tile-position","title":"Get tile position","text":"
    var tileXY = grid.getTileXY(worldX, worldY);  // tileXY: {x, y}\n// var out = grid.getTileXY(worldX, worldY, out);\n
    "},{"location":"board-hexagongrid/#directions","title":"Directions","text":""},{"location":"board-hexagonmap/","title":"Hexagon map","text":""},{"location":"board-hexagonmap/#introduction","title":"Introduction","text":"

    Create tile positions in hexagon/triangle/parallelogram geometry in hexagon grid.

    "},{"location":"board-hexagonmap/#live-demos","title":"Live demos","text":""},{"location":"board-hexagonmap/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-hexagonmap/#install-plugin","title":"Install plugin","text":""},{"location":"board-hexagonmap/#load-minify-file","title":"Load minify file","text":""},{"location":"board-hexagonmap/#import-plugin","title":"Import plugin","text":""},{"location":"board-hexagonmap/#import-class","title":"Import class","text":""},{"location":"board-hexagonmap/#create-tile-positions","title":"Create tile positions","text":""},{"location":"board-hexagonmap/#hexagon","title":"Hexagon","text":"
    var tileXYArray = scene.rexBoard.hexagonMap.hexagon(board, radius);\n// var out = scene.rexBoard.hexagonMap.hexagon(board, radius, out);\n
    staggeraxis y x"},{"location":"board-hexagonmap/#parallelogram","title":"Parallelogram","text":"
    var tileXYArray = scene.rexBoard.hexagonMap.parallelogram(board, type, width, height);\n// var out = scene.rexBoard.hexagonMap.parallelogram(board, type, width, height, out);\n
    type\\staggeraxis y x 0 1 2"},{"location":"board-hexagonmap/#triangle","title":"Triangle","text":"
    var tileXYArray = scene.rexBoard.hexagonMap.triangle(board, type, height);\n// var out = scene.rexBoard.hexagonMap.triangle(board, type, height, out);\n
    type\\staggeraxis y x 0 1"},{"location":"board-hexagonmap/#retrieve-tile-positions","title":"Retrieve tile positions","text":"
    1. Offset all of tile positions to (0, 0), and set board size to fit these tile positions.
      var tileXYArray = board.fit(tileXYArray);\n
    2. Retrieve tile positions
      var tileXY;\nfor(var i = 0, cnt = tileXYArray.length; i < cnt; i++) {\ntileXY = tileXYArray[i];\n// ...\n}\n
    "},{"location":"board-match/","title":"Match","text":""},{"location":"board-match/#introduction","title":"Introduction","text":"

    Get matched chess in lines, or neighbors grouping.

    "},{"location":"board-match/#live-demos","title":"Live demos","text":""},{"location":"board-match/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-match/#install-plugin","title":"Install plugin","text":""},{"location":"board-match/#load-minify-file","title":"Load minify file","text":""},{"location":"board-match/#import-plugin","title":"Import plugin","text":""},{"location":"board-match/#import-class","title":"Import class","text":""},{"location":"board-match/#add-match-object","title":"Add match object","text":"
    var match = scene.rexBoard.add.match({\nboard: board,\n// wildcard: undefined\n// dirMask: undefined\n});\n
    "},{"location":"board-match/#custom-class","title":"Custom class","text":""},{"location":"board-match/#set-board","title":"Set board","text":"

    Board object could be assigned later.

    match.setBoard(board);\n
    "},{"location":"board-match/#update-symbols","title":"Update symbols","text":"

    Each tile position (tileX, tileY) has a symbol.

    "},{"location":"board-match/#update-all-symbols-in-board","title":"Update all symbols in board","text":"
    match.refreshSymbols(function(tileXY, board) {\n// var chess = board.tileXYZToChess(tileXY.x, tileXY.y, 0);\n// if (chess == null) { return null; }\nreturn symbol;\n}, scope);\n
    "},{"location":"board-match/#updata-a-symbol","title":"Updata a symbol","text":"
    match.setSymbol(tileX, tileY, symbol);\n
    "},{"location":"board-match/#get-symbol","title":"Get symbol","text":"
    var symbol = match.getSymbol(tileX, tileY);\n
    "},{"location":"board-match/#for-each-symbol-cahce","title":"For each symbol cahce","text":"
    match.forEach(function(tileXY, symbol, board) {\n// return true; // Break for each loop\n}, scope)\n
    "},{"location":"board-match/#wildcard-symbol","title":"Wildcard symbol","text":""},{"location":"board-match/#directions-mask","title":"Directions mask","text":"

    Enable/Disable matching at directions, all directions are enbale by default.

    match.setDirMask(dir, value);\n
    "},{"location":"board-match/#line-grouping","title":"Line grouping","text":""},{"location":"board-match/#match-n","title":"Match-N","text":"
    match.match(n, function (result, board) {\n// var chess = board.tileXYArrayToChess(result.tileXY, 0);\n// GroupCall(chess, function (chess) { chess.setScale(0.8); });\n\n// return true; // Break for each loop\n}, scope);\n
    "},{"location":"board-match/#any-match-n","title":"Any match-N","text":"
    var hasAnyMatchN = match.anyMatch(n);\n
    "},{"location":"board-match/#match-pattern","title":"Match pattern","text":"
    match.match(pattern, function (result, board) {\n// var chess = board.tileXYArrayToChess(result.tileXY, 0);\n// GroupCall(chess, function (chess) { chess.setScale(0.8); });\n}, scope);\n
    "},{"location":"board-match/#any-match-pattern","title":"Any match pattern","text":"
    var hasAnyMatchN = match.anyMatch(pattern);\n
    "},{"location":"board-match/#neighbors-grouping","title":"Neighbors grouping","text":""},{"location":"board-miniboard/","title":"Mini board","text":""},{"location":"board-miniboard/#introduction","title":"Introduction","text":"

    Chess Container, to rotate/mirror/drag chess together.

    "},{"location":"board-miniboard/#live-demos","title":"Live demos","text":""},{"location":"board-miniboard/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-miniboard/#install-plugin","title":"Install plugin","text":""},{"location":"board-miniboard/#load-minify-file","title":"Load minify file","text":""},{"location":"board-miniboard/#import-plugin","title":"Import plugin","text":""},{"location":"board-miniboard/#import-class","title":"Import class","text":""},{"location":"board-miniboard/#add-container","title":"Add Container","text":"
    var miniBoard = scene.rexBoard.add.miniBoard(x, y, {\ngrid: grid,\ndraggable: undefined,\n});\n
    "},{"location":"board-miniboard/#add-chess","title":"Add chess","text":"
    miniBoard.addChess(gameObject, tileX, tileY, tileZ);\n

    Chess and tile position

    These world properties of chess will be changed with container.

    "},{"location":"board-miniboard/#remove-chess","title":"Remove chess","text":""},{"location":"board-miniboard/#set-origin","title":"Set origin","text":""},{"location":"board-miniboard/#main-board","title":"Main board","text":"

    Put chess to a main-board (Board object) with the same tile position in mini-board, or pull chess out from main-board.

    "},{"location":"board-miniboard/#put-on-main-board","title":"Put on main-board","text":"
    miniBoard.putOnMainBoard(mainBoard, tileX, tileY);\n// miniBoard.putOnMainBoard(mainBoard, tileX, tileY, align);\n

    or

    miniBoard.putOnMainBoard(mainBoard);\n

    To put this mini-board to nearest grid of main-board.

    "},{"location":"board-miniboard/#pull-out-from-main-board","title":"Pull out from main-board","text":"
    miniBoard.pullOutFromMainBoard();\n

    Remove all chess from main-board.

    "},{"location":"board-miniboard/#put-back-to-previous-main-board","title":"Put back to previous main-board","text":"
    miniBoard.putBack();\n

    Previous main-board and tile position will be remembered for putting back.

    "},{"location":"board-miniboard/#is-overlapping-to-main-board","title":"Is overlapping to main-board","text":"

    Return true if any chess is overlapping to main-board.

    miniBoard.isOverlapping(mainBoard);\n

    or

    miniBoard.isOverlapping(mainBoard, tileZ);\n
    "},{"location":"board-miniboard/#align-world-position-to-grid-of-main-board","title":"Align world position to grid of main-board","text":"
    miniBoard.alignToMainBoard(mainBoard, tileX, tileY);\n

    or

    miniBoard.alignToMainBoard(mainBoard);\n

    to align this mini-board to nearest grid of main-board.

    "},{"location":"board-miniboard/#get-current-main-board","title":"Get current main-board","text":"
    var board = miniBoard.mainBoard;\n

    Return null if this mini-board is not at any main-board.

    "},{"location":"board-miniboard/#rotate","title":"Rotate","text":""},{"location":"board-miniboard/#can-rotate","title":"Can rotate","text":"
    miniBoard.canRotate(n);\n

    or

    miniBoard.canRotateTo(direction);\n

    Always return true if this mini-board is not on a main-board.

    "},{"location":"board-miniboard/#rotate_1","title":"Rotate","text":"
    miniBoard.rotate(n);\n

    or

    miniBoard.rotateTo(direction);\n

    Return true if this rotating request is accepted.

    var isSuccess = miniBoard.lastTransferResult;\n
    "},{"location":"board-miniboard/#mirror","title":"Mirror","text":""},{"location":"board-miniboard/#can-mirror","title":"Can mirror","text":"
    miniBoard.canMirror(mode);\n

    Always return true if this mini-board is not on a main-board.

    "},{"location":"board-miniboard/#mirror_1","title":"Mirror","text":"
    miniBoard.mirror(mode);\n

    Return true if this mirroring request is accepted.

    var isSuccess = miniBoard.lastTransferResult;\n
    "},{"location":"board-miniboard/#touch-events","title":"Touch events","text":""},{"location":"board-miniboard/#set-interactive","title":"Set interactive","text":""},{"location":"board-miniboard/#set-drag-able","title":"Set drag-able","text":""},{"location":"board-miniboard/#touch-event","title":"Touch event","text":""},{"location":"board-miniboard/#pointer-down","title":"Pointer down","text":""},{"location":"board-miniboard/#pointer-up","title":"Pointer up","text":""},{"location":"board-miniboard/#pointer-move","title":"Pointer move","text":""},{"location":"board-miniboard/#drag-events","title":"Drag events","text":""},{"location":"board-monopoly/","title":"Monopoly","text":""},{"location":"board-monopoly/#introduction","title":"Introduction","text":"

    Move through path tiles, used in monopoly-like application, chess behavior of Board system.

    "},{"location":"board-monopoly/#live-demos","title":"Live demos","text":""},{"location":"board-monopoly/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-monopoly/#install-plugin","title":"Install plugin","text":""},{"location":"board-monopoly/#load-minify-file","title":"Load minify file","text":""},{"location":"board-monopoly/#import-plugin","title":"Import plugin","text":""},{"location":"board-monopoly/#import-class","title":"Import class","text":""},{"location":"board-monopoly/#create-instance","title":"Create instance","text":"
    var monopoly = scene.rexBoard.add.monopoly(chess, {\nface: 0,\n\n// ** cost **\n// pathTileZ: 0,\n// cost: 1,   // constant cost\n// costCallback: undefined,\n// costCallbackScope: undefined\n})\n
    "},{"location":"board-monopoly/#cost-function","title":"Cost function","text":"
    var callback = function(curTileXY, preTileXY, monopoly) {\nreturn cost;\n}\n
    "},{"location":"board-monopoly/#set-cost-function","title":"Set cost function","text":""},{"location":"board-monopoly/#set-face-direction","title":"Set face direction","text":"
    monopoly.setFace(direction);\n

    Moving direction

    Get path toward this face direction.

    "},{"location":"board-monopoly/#get-path","title":"Get path","text":"
    var tileXYArray = monopoly.getPath(movingPoints);\n// var out = monopoly.getPath(movingPoints, out);\n
    "},{"location":"board-moveto/","title":"Move to","text":""},{"location":"board-moveto/#introduction","title":"Introduction","text":"

    Move chess towards target position with a steady speed, chess behavior of Board system.

    "},{"location":"board-moveto/#live-demos","title":"Live demos","text":""},{"location":"board-moveto/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-moveto/#install-plugin","title":"Install plugin","text":""},{"location":"board-moveto/#load-minify-file","title":"Load minify file","text":""},{"location":"board-moveto/#import-plugin","title":"Import plugin","text":""},{"location":"board-moveto/#import-class","title":"Import class","text":""},{"location":"board-moveto/#create-instance","title":"Create instance","text":"
    var moveTo = scene.rexBoard.add.moveTo(chess, {\n// speed: 400,\n\n// rotateToTarget: false,\n\n// occupiedTest: false,\n// blockerTest: false,\n// moveableTest: undefined,\n// moveableTestScope: undefined,\n\n// sneak: false,\n})\n
    "},{"location":"board-moveto/#move-to-destination-tile","title":"Move to destination tile","text":"
    moveTo.moveTo(tileX, tileY);\n// moveTo.moveTo(tileXY);\n
    "},{"location":"board-moveto/#move-to-neighbor-tile","title":"Move to neighbor tile","text":"
    moveTo.moveToward(direction);\n
    "},{"location":"board-moveto/#move-to-random-neighbor-tile","title":"Move to random neighbor tile","text":"
    moveTo.moveToRandomNeighbor();\n
    "},{"location":"board-moveto/#move-away-or-move-closer","title":"Move away or move closer","text":""},{"location":"board-moveto/#can-move-to-tile","title":"Can move to tile","text":"
    var canMoveTo = moveTo.canMoveTo(tileX, tileY);\n

    Return true if chess can move to (tileX, tileY)

    "},{"location":"board-moveto/#last-move-result","title":"Last move result","text":"
    var lastMoveResult = moveTo.lastMoveResult;\n

    Return true if chess is moved by moveTo.moveTo(), moveTo.moveToward(), or moveTo.moveToRandomNeighbor()

    "},{"location":"board-moveto/#destination","title":"Destination","text":"
    var destinationTileX = moveTo.destinationTileX;\nvar destinationTileY = moveTo.destinationTileY;\nvar destinationDirection = moveTo.destinationDirection;\n
    "},{"location":"board-moveto/#pause-resume-stop-moving","title":"Pause, Resume, stop moving","text":"
    moveTo.pause();\nmoveTo.resume();\nmoveTo.stop();\n
    "},{"location":"board-moveto/#enable","title":"Enable","text":""},{"location":"board-moveto/#set-speed","title":"Set speed","text":"
    moveTo.setSpeed(speed);\n// moveTo.speed = speed;\n
    "},{"location":"board-moveto/#set-rotate-to-target","title":"Set rotate-to-target","text":"
    moveTo.setRotateToTarget(rotateToTarget);\n
    "},{"location":"board-moveto/#events","title":"Events","text":""},{"location":"board-moveto/#status","title":"Status","text":""},{"location":"board-overview/","title":"Overview","text":""},{"location":"board-overview/#install-plugin","title":"Install plugin","text":""},{"location":"board-overview/#load-minify-file","title":"Load minify file","text":""},{"location":"board-overview/#import-plugin","title":"Import plugin","text":""},{"location":"board-overview/#using-typescript-declaration-file","title":"Using typescript declaration file","text":"
    import BoardPlugin from 'phaser3-rex-plugins/plugins/board-plugin.js';\n\nclass Game extends Phaser.Scene {\nrexBoard: BoardPlugin;  // Declare scene property 'rexBoard' as BoardPlugin type\n\ncreate() {\nvar board = this.rexBoard.add.board({\n// ...\n})\n}\n}\n\nvar game = new Phaser.Game({\nscene: Game,\n// ...\nplugins: {\nscene: [{\nkey: 'rexBoard',\nplugin: BoardPlugin,\nmapping: 'rexBoard'\n},\n// ...\n]\n}\n// ...\n});\n

    See this example

    "},{"location":"board-overview/#list-of-board-plugins","title":"List of board plugins","text":""},{"location":"board-overview/#board","title":"Board","text":""},{"location":"board-overview/#shapes","title":"Shapes","text":""},{"location":"board-overview/#behaviors","title":"Behaviors","text":""},{"location":"board-overview/#applications","title":"Applications","text":""},{"location":"board-overview/#mini-board","title":"Mini-board","text":""},{"location":"board-overview/#templates","title":"Templates","text":""},{"location":"board-pathfinder/","title":"Path finder","text":""},{"location":"board-pathfinder/#introduction","title":"Introduction","text":"

    Find moveable area or moving path, chess behavior of Board system.

    "},{"location":"board-pathfinder/#live-demos","title":"Live demos","text":""},{"location":"board-pathfinder/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-pathfinder/#install-plugin","title":"Install plugin","text":""},{"location":"board-pathfinder/#load-minify-file","title":"Load minify file","text":""},{"location":"board-pathfinder/#import-plugin","title":"Import plugin","text":""},{"location":"board-pathfinder/#import-class","title":"Import class","text":""},{"location":"board-pathfinder/#create-instance","title":"Create instance","text":"
    var pathFinder = scene.rexBoard.add.pathFinder({\n// occupiedTest: false,\n// blockerTest: false,\n\n// ** cost **\n// cost: 1,   // constant cost\n// costCallback: undefined,\n// costCallbackScope: undefined,\n// cacheCost: true,\n\n// pathMode: 10,  // A*\n// weight: 10,   // weight for A* searching mode\n// shuffleNeighbors: false,\n})\n
    "},{"location":"board-pathfinder/#create-behavior","title":"Create behavior","text":"
    var pathFinder = scene.rexBoard.add.pathFinder(chess, config);\n
    "},{"location":"board-pathfinder/#set-chess","title":"Set chess","text":"
    pathFinder.setChess(chess);\n

    Note

    Don't use this method if pathFinder is a behavior of Chess

    "},{"location":"board-pathfinder/#cost-function","title":"Cost function","text":"
    var callback = function(curTileXY, preTileXY, pathFinder) {\nreturn cost;\n}\n
    "},{"location":"board-pathfinder/#set-cost-function","title":"Set cost function","text":""},{"location":"board-pathfinder/#set-path-mode","title":"Set path mode","text":"
    pathFinder.setPathMode(pathMode)\n
    "},{"location":"board-pathfinder/#find-moveable-area","title":"Find moveable area","text":"
    var tileXYArray = pathFinder.findArea(movingPoints);\n// var out = pathFinder.findArea(movingPoints, out);\n
    "},{"location":"board-pathfinder/#get-shortest-path-to-a-moveable-tile","title":"Get shortest path to a moveable tile","text":"
    var tileXYArray = pathFinder.getPath(endTileXY);\n

    Path mode

    "},{"location":"board-pathfinder/#find-moving-path","title":"Find moving path","text":"
    var tileXYArray = pathFinder.findPath(endTileXY);\n// var tileXYArray = pathFinder.findPath(endTileXY, movingPoints, isClosest, out);\n

    Path mode

    "},{"location":"board-pathfinder/#cost-of-tile","title":"Cost of tile","text":"

    During or after finding moveable area...

    "},{"location":"board-quadgrid/","title":"Quad","text":""},{"location":"board-quadgrid/#introduction","title":"Introduction","text":"

    Quad grid object of Board system.

    "},{"location":"board-quadgrid/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-quadgrid/#create-instance","title":"Create instance","text":"
    var grid = scene.rexBoard.add.quadGrid({\nx: 0,\ny: 0,\ncellWidth: 0,\ncellHeight: 0,\ntype: 0,\n// dir: 4\n});\n

    or

    // import { QuadGrid } from 'phaser3-rex-plugins/plugins/board-components.js';\nvar grid = new QuadGrid(config);\n
    "},{"location":"board-quadgrid/#world-position-of-tile-0-0","title":"World position of tile (0, 0)","text":""},{"location":"board-quadgrid/#cell-size","title":"Cell size","text":""},{"location":"board-quadgrid/#grid-type","title":"Grid type","text":""},{"location":"board-quadgrid/#get-world-position","title":"Get world position","text":"
    var worldXY = grid.getWorldXY(tileX, tileY);  // worldXY: {x, y}\n// var out = grid.getWorldXY(tileX, tileY, out);\n
    "},{"location":"board-quadgrid/#get-tile-position","title":"Get tile position","text":"
    var tileXY = grid.getTileXY(worldX, worldY);  // tileXY: {x, y}\n// var out = grid.getTileXY(worldX, worldY, out);\n
    "},{"location":"board-quadgrid/#directions","title":"Directions","text":"
    6|3|7\n-+-+-\n2|A|0\n-+-+-\n5|1|4\n
    "},{"location":"board-shape/","title":"Shape","text":""},{"location":"board-shape/#introduction","title":"Introduction","text":"

    Grid (polygon) shape object.

    "},{"location":"board-shape/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-shape/#install-plugin","title":"Install plugin","text":""},{"location":"board-shape/#load-minify-file","title":"Load minify file","text":""},{"location":"board-shape/#import-plugin","title":"Import plugin","text":""},{"location":"board-shape/#import-class","title":"Import class","text":""},{"location":"board-shape/#add-shape-object","title":"Add shape object","text":""},{"location":"board-shape/#set-color","title":"Set color","text":"

    No tint methods

    Uses shape.setFillStyle(color, alpha) to change color.

    "},{"location":"board-shape/#other-properties","title":"Other properties","text":"

    See polygon shape game object, game object

    "},{"location":"board-texture/","title":"Tile texture","text":""},{"location":"board-texture/#introduction","title":"Introduction","text":"

    Create canvas-texture of tile.

    "},{"location":"board-texture/#live-demos","title":"Live demos","text":""},{"location":"board-texture/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-texture/#install-plugin","title":"Install plugin","text":""},{"location":"board-texture/#load-minify-file","title":"Load minify file","text":""},{"location":"board-texture/#import-plugin","title":"Import plugin","text":""},{"location":"board-texture/#import-class","title":"Import class","text":""},{"location":"board-texture/#create-tile-texture","title":"Create tile texture","text":""},{"location":"board-texture/#hexagon","title":"Hexagon","text":"
    CreateTileTexture(board, key, fillStyle, strokeStyle, lineWidth);\n// CreateTileTexture(board, key, fillStyle, strokeStyle, lineWidth, overlapGrid, lineJoin);\n
    "},{"location":"board-tilemap/","title":"Tilemap","text":""},{"location":"board-tilemap/#introduction","title":"Introduction","text":"

    Create board from tilemap

    "},{"location":"board-tilemap/#live-demos","title":"Live demos","text":""},{"location":"board-tilemap/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board-tilemap/#install-plugin","title":"Install plugin","text":""},{"location":"board-tilemap/#load-minify-file","title":"Load minify file","text":""},{"location":"board-tilemap/#import-plugin","title":"Import plugin","text":""},{"location":"board-tilemap/#import-class","title":"Import class","text":""},{"location":"board-tilemap/#create-board-from-tilemap","title":"Create board from tilemap","text":"
    var board = CreateBoardFromTilemap(tilemap, layers);\n
    "},{"location":"board/","title":"Board","text":""},{"location":"board/#introduction","title":"Introduction","text":"

    Core object of Board system.

    "},{"location":"board/#live-demos","title":"Live demos","text":""},{"location":"board/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"board/#install-plugin","title":"Install plugin","text":""},{"location":"board/#load-minify-file","title":"Load minify file","text":""},{"location":"board/#import-plugin","title":"Import plugin","text":""},{"location":"board/#import-class","title":"Import class","text":""},{"location":"board/#add-board-object","title":"Add board object","text":"

    Configuration

    "},{"location":"board/#custom-class","title":"Custom class","text":""},{"location":"board/#board-size","title":"Board size","text":""},{"location":"board/#add-chess","title":"Add chess","text":"
    board.addChess(chess, tileX, tileY, tileZ, align);\n

    Chess and tile position

    "},{"location":"board/#kick-out-event","title":"Kick-out event","text":"

    Board will fire kickout event when adding chess to an occupied grid.

    board.on('kickout', function(chessToAdd, occupiedChess, tileXYZ){\n})\n

    chessToAdd kicks out occupiedChess at tile position tileXYZ({x,y,z}).

    "},{"location":"board/#remove-chess","title":"Remove chess","text":""},{"location":"board/#move-chess","title":"Move chess","text":"
    board.moveChess(chess, toTileX, toTileY, toTileZ, align);\n

    Do nothing if chess is not at this board.

    "},{"location":"board/#set-tilez-of-chess","title":"Set tileZ of chess","text":"
    board.setChessTileZ(chess, toTileZ, align);\n
    "},{"location":"board/#swap-chess","title":"Swap chess","text":"
    board.swapChess(chessA, chessB, align);\n
    "},{"location":"board/#chess-tile-position","title":"Chess -> tile position","text":"
    var tileXYZ = board.chessToTileXYZ(chess);\n
    "},{"location":"board/#tile-position-chess","title":"Tile position -> chess","text":""},{"location":"board/#world-position-chess","title":"World position -> chess","text":""},{"location":"board/#contains","title":"Contains","text":""},{"location":"board/#for-each-tile","title":"For each tile","text":"
    board.forEachTileXY(function(tileXY, board) {\n// var tileX = tileXY.x;\n// var tileY = tileXY.y;\n}, scope);\n

    Iteration order :

    board.forEachTileXY(function(tileXY, board) {\n// var tileX = tileXY.x;\n// var tileY = tileXY.y;\n\n// return isBreak;\n}, scope, order);\n

    Or using for-loop

    for (var tileY = 0; tileY < board.height; tileY++) {\nfor (var tileX = 0; tileX < board.width; tileX++) {\n// ...\n}\n}\n
    "},{"location":"board/#for-each-tile-in-viewport-of-a-camera","title":"For each tile in viewport of a camera","text":"
    board.forEachCullTileXY(function(tileXY, board) {\n// var tileX = tileXY.x;\n// var tileY = tileXY.y;\n}, scope);\n
    board.forEachCullTileXY(function(tileXY, board) {\n// var tileX = tileXY.x;\n// var tileY = tileXY.y;\n}, scope, {\ncamera: board.scene.cameras.main,\npaddingX: 1,\npaddingY: 1,\norder: 0,\n});\n
    "},{"location":"board/#tile-position-world-position","title":"Tile position -> world position","text":"
    var worldXY = board.tileXYToWorldXY(tileX, tileY);  // worldXY: {x, y}\n// var out = board.tileXYToWorldXY(tileX, tileY, out);\n
    "},{"location":"board/#world-position-tile-position","title":"World position -> tile position","text":"
    var tileXY = board.worldXYToTileXY(worldX, worldY);  // tileXY: {x, y}\n// var out = board.worldXYToTileXY(worldX, worldY, out);\n
    "},{"location":"board/#world-position-grid-world-position","title":"World position -> Grid world position","text":"
    var gridWorldXY = board.worldXYSnapToGrid(worldX, worldY);\n// var out = board.worldXYSnapToGrid(worldX, worldY, out);\n
    "},{"location":"board/#grid-distance","title":"Grid distance","text":"
    var distance = board.getDistance(tileA, tileB);\n
    "},{"location":"board/#ring-tile-position","title":"Ring -> tile position","text":""},{"location":"board/#ring-chess","title":"Ring -> chess","text":""},{"location":"board/#shape-tile-position","title":"Shape -> tile position","text":""},{"location":"board/#line-tile-position","title":"Line -> tile position","text":"

    Get array of tile position along a line defined via (startWorldX, startWorldY) to (endWorldX, endWorldY)

    var out = board.lineToTileXYArray(startWorldX, startWorldY, endWorldX, endWorldY);\n// var out = board.lineToTileXYArray(startWorldX, startWorldY, endWorldX, endWorldY, out);\n

    or

    var out = board.lineToTileXYArray(line);\n// var out = board.lineToTileXYArray(line, out);\n
    "},{"location":"board/#circle-tile-position","title":"Circle -> tile position","text":"

    Get array of tile position inside a circle shape

    var out = board.circleToTileXYArray(circle);\n// var out = board.circleToTileXYArray(circle, out);\n// var out = board.circleToTileXYArray(circle, testMode, out);\n
    "},{"location":"board/#rectangle-tile-position","title":"Rectangle -> tile position","text":"

    Get array of tile position inside a rectangle shape

    var out = board.rectangleToTileXYArray(rectangle);\n// var out = board.rectangleToTileXYArray(rectangle, out);\n// var out = board.rectangleToTileXYArray(rectangle, testMode, out);\n
    "},{"location":"board/#ellipse-tile-position","title":"Ellipse -> tile position","text":"

    Get array of tile position inside a ellipse shape

    var out = board.ellipseToTileXYArray(ellipse);\n// var out = board.ellipseToTileXYArray(ellipse, out);\n// var out = board.ellipseToTileXYArray(ellipse, testMode, out);\n
    "},{"location":"board/#triangle-tile-position","title":"Triangle -> tile position","text":"

    Get array of tile position inside a triangle shape

    var out = board.triangleToTileXYArray(triangle);\n// var out = board.triangleToTileXYArray(triangle, out);\n// var out = board.triangleToTileXYArray(triangle, testMode, out);\n
    "},{"location":"board/#polygon-tile-position","title":"Polygon -> tile position","text":"

    Get array of tile position inside a polygon shape

    var out = board.polygonToTileXYArray(polygon);\n// var out = board.polygonToTileXYArray(polygon, out);\n// var out = board.polygonToTileXYArray(polygon, testMode, out);\n
    "},{"location":"board/#angle-between-world-position-of-2-tiles","title":"Angle between world position of 2 tiles","text":"
    var radian = board.angleBetween(tileA, tileB);\n
    "},{"location":"board/#is-angle-in-cone","title":"Is angle in cone","text":"
    var isInCone = board.isAngleInCone(chessA, chessB, face, cone);\n
    "},{"location":"board/#direction-between-2-tiles","title":"Direction between 2 tiles","text":"
    var direction = board.directionBetween(chessA, chessB);\n
    var direction = board.directionBetween(chessA, chessB, false);\n
    "},{"location":"board/#is-direction-in-cone","title":"Is direction in cone","text":"
    var isInCone = board.isDirectionInCone(chessA, chessB, face, cone);\n
    "},{"location":"board/#opposite-direction","title":"Opposite direction","text":"
    var direction = board.getOppositeDirection(tileX, tileY, direction);\n

    or

    var direction = board.getOppositeDirection(tileXY, direction);\n
    "},{"location":"board/#angle-snap-to-direction","title":"Angle snap to direction","text":"
    var direction = board.angleSnapToDirection(tileXY, angle);\n
    "},{"location":"board/#align-world-position-to-grid","title":"Align world position to grid","text":""},{"location":"board/#is-overlapping-with-world-position","title":"Is overlapping with world position","text":"
    var isOverlapping = board.isOverlappingPoint(worldX, worldY);\n

    or

    var isOverlapping = board.isOverlappingPoint(worldX, worldY, tileZ);\n
    "},{"location":"board/#neighbors","title":"Neighbors","text":""},{"location":"board/#neighbor-tile-position","title":"Neighbor tile position","text":""},{"location":"board/#neighbor-chess","title":"Neighbor chess","text":""},{"location":"board/#map-neighbor-tile-position","title":"Map neighbor tile position","text":"
    var newArray = board.mapNeighbors(chess, function(neighborTileXY, index, neighborTileXYArray){\nreturn {};\n}, scope);\n

    or

    var newArray = board.mapNeighbors(chess, distance, function(neighborTileXY, index, neighborTileXYArray){\nreturn {};\n}, scope);\n
    "},{"location":"board/#tile-at-direction","title":"Tile at direction","text":""},{"location":"board/#empty-tile-position","title":"Empty tile position","text":""},{"location":"board/#get-all-chess","title":"Get all chess","text":"
    var chessArray = board.getAllChess();\n
    "},{"location":"board/#fit","title":"Fit","text":"
    var out = board.fit(tileXYArray);\n

    Offset all of tile positions to (0, 0), and set board size to fit these tile positions.

    "},{"location":"board/#blocker","title":"Blocker","text":""},{"location":"board/#touch-events","title":"Touch events","text":""},{"location":"board/#set-interactive","title":"Set interactive","text":""},{"location":"board/#touch-zone","title":"Touch Zone","text":""},{"location":"board/#pointer-down","title":"Pointer down","text":""},{"location":"board/#pointer-up","title":"Pointer up","text":""},{"location":"board/#pointer-move","title":"Pointer move","text":""},{"location":"board/#pointer-over","title":"Pointer over","text":""},{"location":"board/#pointer-out","title":"Pointer out","text":""},{"location":"board/#tap","title":"Tap","text":""},{"location":"board/#press","title":"Press","text":""},{"location":"board/#swipe","title":"Swipe","text":""},{"location":"board/#grid-points","title":"Grid points","text":""},{"location":"board/#bounds","title":"Bounds","text":""},{"location":"board/#board-bounds","title":"Board bounds","text":""},{"location":"board/#grid-bounds","title":"Grid bounds","text":""},{"location":"board/#get-board","title":"Get Board","text":""},{"location":"board/#other-properties","title":"Other properties","text":""},{"location":"bounds/","title":"Bounds","text":""},{"location":"bounds/#introduction","title":"Introduction","text":"

    Clamp game object inside target bounds.

    "},{"location":"bounds/#live-demos","title":"Live demos","text":""},{"location":"bounds/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"bounds/#install-plugin","title":"Install plugin","text":""},{"location":"bounds/#load-minify-file","title":"Load minify file","text":""},{"location":"bounds/#import-plugin","title":"Import plugin","text":""},{"location":"bounds/#import-class","title":"Import class","text":""},{"location":"bounds/#create-instance","title":"Create instance","text":"
    var bounds = scene.plugins.get('rexBounds').add(gameObject, {\n// target: undefined,\n// bounds: undefined,\n// enable: true,\n// alignMode: 0\n});\n
    "},{"location":"bounds/#target-game-object","title":"Target game object","text":""},{"location":"bounds/#target-bounds","title":"Target bounds","text":""},{"location":"bounds/#enable","title":"Enable","text":""},{"location":"bounds/#align-mond","title":"Align mond","text":""},{"location":"bounds/#hit-result","title":"Hit result","text":""},{"location":"bounds/#event","title":"Event","text":""},{"location":"bracketparser/","title":"Bracket parser","text":""},{"location":"bracketparser/#introduction","title":"Introduction","text":"

    A lite-weight delimiter parser.

    "},{"location":"bracketparser/#live-demoes","title":"Live demoes","text":""},{"location":"bracketparser/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"bracketparser/#install-plugin","title":"Install plugin","text":""},{"location":"bracketparser/#load-minify-file","title":"Load minify file","text":""},{"location":"bracketparser/#import-plugin","title":"Import plugin","text":""},{"location":"bracketparser/#import-class","title":"Import class","text":""},{"location":"bracketparser/#create-instance","title":"Create instance","text":"
    var parser = scene.plugins.get('rexBracketParser').add({\n// delimiters: '<>', // or ['<', '>']\n// valueConvert: true,\n// translateTagNameCallback: undefined,\n});\n
    "},{"location":"bracketparser/#tag-and-content","title":"Tag and content","text":"

    Assume that left-delimiter and right-delimiter is '<>'

    "},{"location":"bracketparser/#start-parsing","title":"Start parsing","text":"
    parser.start(text);\n

    These events will be emitted under this method.

    "},{"location":"bracketparser/#pause","title":"Pause","text":"

    Invoke this method during tag-start,tag-end, or content events to suspend parsing.

    "},{"location":"bracketparser/#resume","title":"Resume","text":"
    parser.next();\n
    "},{"location":"bracketparser/#skip-any-tag-startany-tag-end-event","title":"Skip any-tag-start/any-tag-end event","text":"
    parser.skipEvent();\n

    When getting a tag-start, or a tag-end event, parser will emitts

    Invoke this medthod under '+TAG', or '-TAG' event to skip '+', or '-' event.

    "},{"location":"bracketparser/#status","title":"Status","text":""},{"location":"bracketparser/#events","title":"Events","text":""},{"location":"bracketparser/#tagscontent","title":"Tags/Content","text":""},{"location":"bracketparser/#control-flow","title":"Control flow","text":""},{"location":"bracketparser2/","title":"Bracket parser 2","text":""},{"location":"bracketparser2/#introduction","title":"Introduction","text":"

    A lite-weight delimiter parser.

    "},{"location":"bracketparser2/#live-demoes","title":"Live demoes","text":""},{"location":"bracketparser2/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"bracketparser2/#install-plugin","title":"Install plugin","text":""},{"location":"bracketparser2/#load-minify-file","title":"Load minify file","text":""},{"location":"bracketparser2/#import-plugin","title":"Import plugin","text":""},{"location":"bracketparser2/#import-class","title":"Import class","text":""},{"location":"bracketparser2/#create-instance","title":"Create instance","text":"
    var parser = scene.plugins.get('rexBracketParser').add({\n// delimiters: '<>', // or ['<', '>']\n// valueConvert: true,\n// translateTagNameCallback: undefined,\n});\n
    "},{"location":"bracketparser2/#tag-and-content","title":"Tag and content","text":"

    Assume that left-delimiter and right-delimiter is '<>'

    "},{"location":"bracketparser2/#start-parsing","title":"Start parsing","text":"
    parser.start(text);\n

    These events will be emitted under this method.

    "},{"location":"bracketparser2/#pause","title":"Pause","text":"

    Invoke this method during tag-start,tag-end, or content events to suspend parsing.

    "},{"location":"bracketparser2/#resume","title":"Resume","text":"
    parser.next();\n
    "},{"location":"bracketparser2/#skip-any-tag-startany-tag-end-event","title":"Skip any-tag-start/any-tag-end event","text":"
    parser.skipEvent();\n

    When getting a tag-start, or a tag-end event, parser will emitts

    Invoke this medthod under '+TAG', or '-TAG' event to skip '+', or '-' event.

    "},{"location":"bracketparser2/#status","title":"Status","text":""},{"location":"bracketparser2/#events","title":"Events","text":""},{"location":"bracketparser2/#tagscontent","title":"Tags/Content","text":""},{"location":"bracketparser2/#control-flow","title":"Control flow","text":""},{"location":"bracketparser2/#compare-with-bracket-parser","title":"Compare with bracket-parser","text":"

    Tag format in

    "},{"location":"buffdata/","title":"Buff data","text":""},{"location":"buffdata/#introduction","title":"Introduction","text":"

    Data manager with buffs, extends from built-in data manager.

    "},{"location":"buffdata/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"buffdata/#install-plugin","title":"Install plugin","text":""},{"location":"buffdata/#load-minify-file","title":"Load minify file","text":""},{"location":"buffdata/#import-plugin","title":"Import plugin","text":""},{"location":"buffdata/#import-class","title":"Import class","text":""},{"location":"buffdata/#create-instance","title":"Create instance","text":"
    var data = scene.plugins.get('rexBuffData').add(parent);\n// var data = scene.plugins.get('rexBuffData').add(parent, eventEmitter);\n
    "},{"location":"buffdata/#extend-existing-data-manager","title":"Extend existing data manager","text":"
    var data = scene.plugins.get('rexBuffData').extend(data);\n
    "},{"location":"buffdata/#buff","title":"Buff","text":"

    A value is composed of baseValue, and some buffs, clamped by min, max values.

    "},{"location":"buildarcadeobject/","title":"Build arcade object","text":""},{"location":"buildarcadeobject/#introduction","title":"Introduction","text":"

    Create arcade body, and inject arcade object methods.

    "},{"location":"buildarcadeobject/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"buildarcadeobject/#install-plugin","title":"Install plugin","text":""},{"location":"buildarcadeobject/#load-minify-file","title":"Load minify file","text":""},{"location":"buildarcadeobject/#import-plugin","title":"Import plugin","text":""},{"location":"buildarcadeobject/#import-class","title":"Import class","text":""},{"location":"buildarcadeobject/#inject-arcade-object-methods","title":"Inject arcade object methods","text":""},{"location":"bullet/","title":"Bullet","text":""},{"location":"bullet/#introduction","title":"Introduction","text":"

    Move game object toward current angle of game object, with a constant speed.

    "},{"location":"bullet/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"bullet/#install-plugin","title":"Install plugin","text":""},{"location":"bullet/#load-minify-file","title":"Load minify file","text":""},{"location":"bullet/#import-plugin","title":"Import plugin","text":""},{"location":"bullet/#import-class","title":"Import class","text":""},{"location":"bullet/#create-instance","title":"Create instance","text":"
    var bullet = scene.plugins.get('rexBullet').add(gameObject, {\nspeed: 200,\n// wrap: false,\n// padding: 0,\n// enable: true,\n\n// angle: undefined,\n// rotation: undefined\n});\n
    "},{"location":"bullet/#speed","title":"Speed","text":""},{"location":"bullet/#set-wrap-mode","title":"Set wrap mode","text":"
    bullet.setWrapMode(wrap, padding);\n
    "},{"location":"bullet/#angle","title":"Angle","text":""},{"location":"button/","title":"Button","text":""},{"location":"button/#introduction","title":"Introduction","text":"

    Fires 'click' event when touch releasd after pressed.

    "},{"location":"button/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"button/#install-plugin","title":"Install plugin","text":""},{"location":"button/#load-minify-file","title":"Load minify file","text":""},{"location":"button/#import-plugin","title":"Import plugin","text":""},{"location":"button/#import-class","title":"Import class","text":""},{"location":"button/#create-instance","title":"Create instance","text":"
    var button = scene.plugins.get('rexButton').add(gameObject, {\n// enable: true,\n// mode: 1,              // 0|'press'|1|'release'\n// clickInterval: 100    // ms\n// threshold: undefined\n});\n
    "},{"location":"button/#events","title":"Events","text":""},{"location":"button/#enable","title":"Enable","text":""},{"location":"button/#set-mode","title":"Set mode","text":"
    button.setMode(mode);\n
    "},{"location":"button/#set-click-interval","title":"Set click interval","text":"
    button.setClickInterval(interval);  // interval in ms\n
    "},{"location":"button/#set-dragging-threshold","title":"Set dragging threshold","text":"
    button.setDragThreshold(distance);  // distance in pixels\n
    "},{"location":"camera-controllor/","title":"Controllor","text":""},{"location":"camera-controllor/#introduction","title":"Introduction","text":"

    Scroll/zoom camera.

    "},{"location":"camera-controllor/#usage","title":"Usage","text":""},{"location":"camera-controllor/#setup","title":"Setup","text":"
    1. Create controllor
      // var cursors = scene.input.keyboard.createCursorKeys();\nvar controls = new Phaser.Cameras.Controls.SmoothedKeyControl({\ncamera: camera,\n\nleft: cursors.left,    // { isDown, isUp }\nright: cursors.right,  // { isDown, isUp }\nup: cursors.up,        // { isDown, isUp }\ndown: cursors.down,    // { isDown, isUp }\nzoomIn: null,          // { isDown, isUp }\nzoomOut: null,         // { isDown, isUp }\n\nzoomSpeed: 0.01,\nminZoom: 0.001,\nmaxZoom: 1000,\n\nacceleration: null,\n// acceleration: {\n//    x: 0,\n//    y: 0\n// }\n\ndrag: null,\n// drag: {\n//    x: 0,\n//    y: 0\n// }\n\nmaxSpeed: null\n// maxSpeed: {\n//    x: 0,\n//    y: 0\n// }\n});\n
      or
      var controls = new Phaser.Cameras.Controls.FixedKeyControl(config);\n
    2. Update
      scene.update = function (time, delta) {\ncontrols.update(delta);\n}\n
    "},{"location":"camera-controllor/#other-methods","title":"Other methods","text":""},{"location":"camera-effects/","title":"Effects","text":""},{"location":"camera-effects/#introduction","title":"Introduction","text":"

    Effects of camera.

    "},{"location":"camera-effects/#usage","title":"Usage","text":""},{"location":"camera-effects/#fade","title":"Fade","text":""},{"location":"camera-effects/#events","title":"Events","text":"
    camera.on('camerafadeincomplete', camera, fade);\n
    camera.on('camerafadeoutcomplete', camera, fade);\n
    "},{"location":"camera-effects/#flash","title":"Flash","text":"
    camera.flash(duration);   // duration in ms\n// camera.flash(duration, red, green, blue, force, callback, context);\n
    "},{"location":"camera-effects/#events_1","title":"Events","text":"
    camera.on('cameraflashstart', camera, flash, duration, red, green, blue);\n
    camera.on('cameraflashcomplete', camera, flash);\n
    "},{"location":"camera-effects/#shake","title":"Shake","text":"
    camera.shake(duration);   // duration in ms\n// camera.shake(duration, intensity, force, callback, context);  // callback: invoked when completed\n
    "},{"location":"camera-effects/#events_2","title":"Events","text":"
    camera.on('camerashakestart', camera, shake, duration, intensity);\n
    camera.on('camerashakecomplete', camera, shake);\n
    "},{"location":"camera-effects/#pan","title":"Pan","text":"
    camera.pan(x, y, duration);   // duration in ms\n// camera.pan(x, y, duration, ease, force, callback, context);\n
    "},{"location":"camera-effects/#events_3","title":"Events","text":"
    camera.on('camerapanstart', camera, pan, duration, x, y);\n
    camera.on('camerapancomplete', camera, pan);\n
    "},{"location":"camera-effects/#zoom","title":"Zoom","text":"
    camera.zoomTo(zoomValue, duration);   // duration in ms\n// camera.zoomTo(zoomValue, duration, ease, force, callback, context);\n
    "},{"location":"camera-effects/#events_4","title":"Events","text":"
    camera.on('camerazoomstart', camera, zoom, duration, zoomValue);\n
    camera.on('camerazoomcomplete', camera, zoom);\n
    "},{"location":"camera-effects/#rotate-to","title":"Rotate to","text":"
    camera.rotateTo(radians, shortestPath, duration);   // duration in ms\n// camera.rotateTo(radians, shortestPath, duration, ease, force, callback, context);\n
    "},{"location":"camera-effects/#events_5","title":"Events","text":"
    camera.on('camerarotatestart', camera, rotateTo, duration, angle);\n
    camera.on('camerarotatecomplete', camera, rorotateTotate);\n
    "},{"location":"camera-effects/#mask","title":"Mask","text":"

    More detail about mask

    "},{"location":"camera-shader-effect/","title":"Shader effect","text":""},{"location":"camera-shader-effect/#introduction","title":"Introduction","text":"

    Shader effect of camera.

    "},{"location":"camera-shader-effect/#usage","title":"Usage","text":""},{"location":"camera-shader-effect/#register-post-fx-pipeline","title":"Register post-fx pipeline","text":"

    Some post-fx pipelines:

    "},{"location":"camera-shader-effect/#add-post-fx-pipeline","title":"Add post-fx pipeline","text":"
    camera.setPostPipeline(PostFxClass);\n
    "},{"location":"camera-shader-effect/#remove-post-fx-pipeline","title":"Remove post-fx pipeline","text":""},{"location":"camera-shader-effect/#get-post-fx-pipeline","title":"Get post-fx pipeline","text":"
    var pipelineInstance = camera.getPostPipeline(PostFxClass);\n
    "},{"location":"camera-shader-effect/#add-effect-properties","title":"Add effect properties","text":"

    See Add effect properties behavior

    "},{"location":"camera/","title":"Camera","text":""},{"location":"camera/#introduction","title":"Introduction","text":"

    Camera to display game objects, built-in object of phaser.

    "},{"location":"camera/#usage","title":"Usage","text":""},{"location":"camera/#get-camera","title":"Get camera","text":"

    Each scene has one or more cameras.

    "},{"location":"camera/#create-cameras-from-json","title":"Create cameras from JSON","text":"
    scene.cameras.fromJSON(config);\n// scene.cameras.fromJSON(configArray);\n
    "},{"location":"camera/#remove-camera","title":"Remove camera","text":"
    scene.cameras.remove(camera);\n
    "},{"location":"camera/#destroy-camera","title":"Destroy camera","text":"
    camera.destroy();\n
    "},{"location":"camera/#view-port","title":"View port","text":""},{"location":"camera/#zoom","title":"Zoom","text":""},{"location":"camera/#rotation","title":"Rotation","text":""},{"location":"camera/#origin","title":"Origin","text":""},{"location":"camera/#visible","title":"Visible","text":"

    A visible camera will render and perform input tests. An invisible camera will not render anything and will skip input tests.

    camera.setVisible(value);\n// camera.visible = value\n
    var visible = camera.visible;\n
    "},{"location":"camera/#alpha","title":"Alpha","text":"
    camera.setAlpha(value);\n// camera.alpha = value;\n
    var alpha = camera.alpha;\n
    "},{"location":"camera/#scroll","title":"Scroll","text":"
    camera.setScroll(x, y)\n
    camera.scrollX = scrollX;\ncamera.scrollY = scrollY;\n
    camera.centerToBounds();\n
    camera.centerOn(x, y);  // centered on the given coordinates\n
    camera.centerOnX(x);\ncamera.centerOnY(y);\n
    camera.centerToSize();\n
    "},{"location":"camera/#follow-game-object","title":"Follow game object","text":""},{"location":"camera/#events","title":"Events","text":""},{"location":"camera/#scroll-factor","title":"Scroll factor","text":"

    See Scroll factor in game object.

    "},{"location":"camera/#bounds","title":"Bounds","text":""},{"location":"camera/#world-coordinates","title":"World coordinates","text":""},{"location":"camera/#set-background-color","title":"Set background color","text":"
    camera.setBackgroundColor(color);\n
    "},{"location":"camera/#ignore-game-object","title":"Ignore game object","text":"

    Ignored game objects won't show at that camera.

    camera.ignore(gameObject);\n
    "},{"location":"camera/#get-cameras-below-pointer","title":"Get cameras below pointer","text":"
    var cameras = scene.cameras.getCamerasBelowPointer(pointer);\n
    "},{"location":"camera/#pause-resume","title":"Pause, resume","text":""},{"location":"camera/#clear","title":"Clear","text":"
    camera.clearRenderToTexture();\n
    "},{"location":"camera/#children","title":"Children","text":""},{"location":"camera/#visible-children","title":"Visible children","text":"

    See also: gameObject.willRender(camera)

    "},{"location":"camera/#render-children","title":"Render children","text":"
    var children = camera.renderList;\n

    Read only.

    "},{"location":"canvas-circularprogress/","title":"Circular progres","text":""},{"location":"canvas-circularprogress/#introduction","title":"Introduction","text":"

    Circular progress bar on canvas.

    "},{"location":"canvas-circularprogress/#live-demos","title":"Live demos","text":""},{"location":"canvas-circularprogress/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvas-circularprogress/#install-plugin","title":"Install plugin","text":""},{"location":"canvas-circularprogress/#load-minify-file","title":"Load minify file","text":""},{"location":"canvas-circularprogress/#import-plugin","title":"Import plugin","text":""},{"location":"canvas-circularprogress/#import-class","title":"Import class","text":""},{"location":"canvas-circularprogress/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexCircularProgressCanvasPlugin',\nplugin: CircularProgressCanvasPlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"canvas-circularprogress/#create-instance","title":"Create instance","text":"
    var circularProgress = scene.add.rexCircularProgressCanvas(x, y, radius, barColor, value, {\ntrackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\n\ntextColor: undefined,\ntextStrokeColor: undefined,\ntextStrokeThickness: undefined,\n// textFont: ,\ntextSize: '16px',\ntextFamily: 'Courier',\ntextStyle: '',\ntextFormatCallback: undefined,\ntextFormatCallbackScope: undefined,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},\n});\n

    or

    var circularProgress = scene.add.rexCircularProgressCanvas({\nx: 0,\ny: 0,\nradius: 1,\n\nbarColor: undefined,\ntrackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\n\ntextColor: undefined,\ntextStrokeColor: undefined,\ntextStrokeThickness: undefined,\n// textFont: ,\ntextSize: '16px',\ntextFamily: 'Courier',\ntextStyle: '',\ntextFormatCallback: undefined,\ntextFormatCallbackScope: undefined,\n\nvalue: 0,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},\n});\n

    Add circular-progress from JSON

    var circularProgress = scene.make.rexCircularProgressCanvas({\nx: 0,\ny: 0,\nradius: 1,\n\nbarColor: undefined,\ntrackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\n\ntextColor: undefined,\ntextStrokeColor: undefined,\ntextStrokeThickness: undefined,\ntextSize: '16px',\ntextFamily: 'Courier',\ntextStyle: '',\ntextFormatCallback: undefined,\ntextFormatCallbackScope: undefined,\n\nvalue: 0,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},\n\nadd: true\n});\n
    "},{"location":"canvas-circularprogress/#custom-class","title":"Custom class","text":""},{"location":"canvas-circularprogress/#progress-value","title":"Progress value","text":""},{"location":"canvas-circularprogress/#ease-progress-value","title":"Ease progress value","text":""},{"location":"canvas-circularprogress/#radius","title":"Radius","text":""},{"location":"canvas-circularprogress/#circular-track","title":"Circular track","text":""},{"location":"canvas-circularprogress/#circular-bar","title":"Circular bar","text":""},{"location":"canvas-circularprogress/#center-circle","title":"Center circle","text":""},{"location":"canvas-circularprogress/#display-text","title":"Display text","text":""},{"location":"canvas-circularprogress/#events","title":"Events","text":""},{"location":"canvas-circularprogress/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"canvas-circularprogress/#create-mask","title":"Create mask","text":"
    var mask = circularProgress.createBitmapMask();\n

    See mask

    "},{"location":"canvas-circularprogress/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"canvas-circularprogress/#compare-with-circular-progress-shape","title":"Compare with Circular-progress shape","text":""},{"location":"canvas-data/","title":"Canvas image data","text":""},{"location":"canvas-data/#introduction","title":"Introduction","text":"

    Get image data from texture, or text object.

    "},{"location":"canvas-data/#live-demos","title":"Live demos","text":""},{"location":"canvas-data/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvas-data/#install-plugin","title":"Install plugin","text":""},{"location":"canvas-data/#load-minify-file","title":"Load minify file","text":""},{"location":"canvas-data/#import-plugin","title":"Import plugin","text":""},{"location":"canvas-data/#import-class","title":"Import class","text":""},{"location":"canvas-data/#textcanvas-object-bitmap","title":"Text/canvas object -> Bitmap","text":"
    var canvasData = scene.plugins.get('rexCanvasData').canvasObjectToBitmap(gameObject);\n// var out = scene.plugins.get('rexCanvasData').canvasObjectToBitmap(gameObject, out);\n
    "},{"location":"canvas-data/#texture-color-map","title":"Texture -> Color map","text":""},{"location":"canvas-data/#canvas-data","title":"Canvas data","text":""},{"location":"canvas-data/#for-each-pixel","title":"For each pixel","text":""},{"location":"canvas-data/#get-pixel-data","title":"Get pixel data","text":"
    var data = canvasData.get(x, y);\n
    "},{"location":"canvas-data/#size","title":"Size","text":"
    var width = canvasData.width;\nvar height = canvasData.height;\n
    "},{"location":"canvas-lineprogress/","title":"Line progres","text":""},{"location":"canvas-lineprogress/#introduction","title":"Introduction","text":"

    Horizontal line progress bar filled with gradient color on canvas.

    "},{"location":"canvas-lineprogress/#live-demos","title":"Live demos","text":""},{"location":"canvas-lineprogress/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvas-lineprogress/#install-plugin","title":"Install plugin","text":""},{"location":"canvas-lineprogress/#load-minify-file","title":"Load minify file","text":""},{"location":"canvas-lineprogress/#import-plugin","title":"Import plugin","text":""},{"location":"canvas-lineprogress/#import-class","title":"Import class","text":""},{"location":"canvas-lineprogress/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexLineProgressCanvasPlugin',\nplugin: LineProgressCanvasPlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"canvas-lineprogress/#create-instance","title":"Create instance","text":"
    var lineProgress = scene.add.rexLineProgressCanvas(x, y, width, height, barColor, value, {    barColor2: undefined,\nisHorizontalGradient: true,\ntrackColor: undefined,\ntrackStrokeColor: undefined,\ntrackStrokeThickness: 2,\n\nskewX:0,\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, lineProgress) {\n},\n});\n

    or

    var lineProgress = scene.add.rexLineProgressCanvas({\nx: 0,\ny: 0,\nwidth: 2,\nheight: 2,\n\nbarColor: undefined,\nbarColor2: undefined,\nisHorizontalGradient: true,\ntrackColor: undefined,\ntrackStrokeColor: undefined,\ntrackStrokeThickness: 2,\n\nskewX:0,\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvalue: 0,\nvaluechangeCallback: function(newValue, oldValue, lineProgress) {\n},\n});\n

    Add line-progress from JSON

    var lineProgress = scene.make.rexLineProgressCanvas({\nx: 0,\ny: 0,\nwidth: 2,\nheight: 2,\n\nbarColor: undefined,\nbarColor2: undefined,\nisHorizontalGradient: true,\ntrackColor: undefined,\ntrackStrokeColor: undefined,\ntrackStrokeThickness: 2,\n\nskewX:0,\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvalue: 0,\nvaluechangeCallback: function(newValue, oldValue, lineProgress) {\n},\n\nadd: true\n});\n
    "},{"location":"canvas-lineprogress/#custom-class","title":"Custom class","text":""},{"location":"canvas-lineprogress/#progress-value","title":"Progress value","text":""},{"location":"canvas-lineprogress/#ease-progress-value","title":"Ease progress value","text":""},{"location":"canvas-lineprogress/#line-track","title":"Line track","text":""},{"location":"canvas-lineprogress/#line-bar","title":"Line bar","text":""},{"location":"canvas-lineprogress/#horizontal-skew","title":"Horizontal skew","text":""},{"location":"canvas-lineprogress/#right-to-left","title":"Right-to-left","text":""},{"location":"canvas-lineprogress/#events","title":"Events","text":""},{"location":"canvas-lineprogress/#alpha","title":"Alpha","text":""},{"location":"canvas-lineprogress/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"canvas-lineprogress/#create-mask","title":"Create mask","text":"
    var mask = lineProgress.createBitmapMask();\n

    See mask

    "},{"location":"canvas-lineprogress/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"canvas-lineprogress/#compare-with-line-progress-shape","title":"Compare with Line-progress shape","text":""},{"location":"canvas-roundrectangle/","title":"Round rectangle","text":""},{"location":"canvas-roundrectangle/#introduction","title":"Introduction","text":"

    Round rectangle on canvas.

    "},{"location":"canvas-roundrectangle/#live-demos","title":"Live demos","text":""},{"location":"canvas-roundrectangle/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvas-roundrectangle/#install-plugin","title":"Install plugin","text":""},{"location":"canvas-roundrectangle/#load-minify-file","title":"Load minify file","text":""},{"location":"canvas-roundrectangle/#import-plugin","title":"Import plugin","text":""},{"location":"canvas-roundrectangle/#import-class","title":"Import class","text":""},{"location":"canvas-roundrectangle/#create-shape-object","title":"Create shape object","text":"
    var rect = scene.add.rexRoundRectangleCanvas(x, y, width, height, radiusConfig, fillStyle, strokeStyle, lineWidth, fillColor2, isHorizontalGradient);\n

    Note

    If radius >= 0, draw convex corner, else draw concave corner

    "},{"location":"canvas-roundrectangle/#deform","title":"Deform","text":""},{"location":"canvas-roundrectangle/#custom-class","title":"Custom class","text":""},{"location":"canvas-roundrectangle/#color","title":"Color","text":""},{"location":"canvas-roundrectangle/#size","title":"Size","text":""},{"location":"canvas-roundrectangle/#radius","title":"Radius","text":""},{"location":"canvas-roundrectangle/#iteration","title":"Iteration","text":"

    Number of interpolation points in each round corner. Default value is 4.

    "},{"location":"canvas-roundrectangle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"canvas-roundrectangle/#create-mask","title":"Create mask","text":"
    var mask = rect.createBitmapMask();\n

    See mask

    "},{"location":"canvas-roundrectangle/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"canvas-roundrectangle/#compare-with-shape-roundrectangle","title":"Compare with Shape-Roundrectangle","text":""},{"location":"canvas-texture/","title":"Canvas texture","text":""},{"location":"canvas-texture/#introduction","title":"Introduction","text":"

    Canvas Canvas Texture stored in texture cache, built-in object of phaser.

    "},{"location":"canvas-texture/#usage","title":"Usage","text":""},{"location":"canvas-texture/#create-canvas-texture","title":"Create canvas texture","text":"
    var texture = scene.textures.createCanvas(key, width, height);\n
    "},{"location":"canvas-texture/#get-canvas-element","title":"Get canvas element","text":"
    var canvas = texture.getCanvas();\nvar context = texture.getContext();\n

    Canvas api

    "},{"location":"canvas-texture/#draw-frame","title":"Draw frame","text":"
    texture.drawFrame(key, frame, x, y);\n// texture.drawFrame(key, frame, x, y, update);\n
    "},{"location":"canvas-texture/#draw-image","title":"Draw image","text":"
    texture.draw(x, y, source);\n// texture.draw(x, y, source, update);\n
    "},{"location":"canvas-texture/#clear","title":"Clear","text":"
    texture.clear();\n
    texture.clear(x, y, width, height);\n// // texture.clear(x, y, width, height, update);\n
    "},{"location":"canvas-texture/#refresh-texture","title":"Refresh texture","text":"
    texture.refresh();\n
    "},{"location":"canvas-texture/#color","title":"Color","text":""},{"location":"canvas-texture/#image-data","title":"Image data","text":""},{"location":"canvas-texture/#add-frame","title":"Add frame","text":"
    texture.add(name, sourceIndex, x, y, width, height);\n
    "},{"location":"canvas/","title":"Canvas","text":""},{"location":"canvas/#introduction","title":"Introduction","text":"

    Drawing on canvas.

    "},{"location":"canvas/#live-demos","title":"Live demos","text":""},{"location":"canvas/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvas/#install-plugin","title":"Install plugin","text":""},{"location":"canvas/#load-minify-file","title":"Load minify file","text":""},{"location":"canvas/#import-plugin","title":"Import plugin","text":""},{"location":"canvas/#import-class","title":"Import class","text":""},{"location":"canvas/#create-instance","title":"Create instance","text":"
    var canvas = scene.add.rexCanvas(x, y, width, height);\n

    Add canvas from JSON

    var canvas = scene.make.rexCanvas({\nx: 0,\ny: 0,\nwidth: 256,\nheight: 256,\n\n// origin: {x: 0.5, y: 0.5},\n// fill: null,\n\nadd: true\n});\n
    "},{"location":"canvas/#custom-class","title":"Custom class","text":""},{"location":"canvas/#clear-or-fill-canvas","title":"Clear or fill canvas","text":""},{"location":"canvas/#update-canvas","title":"Update canvas","text":"
    1. Get canvas elemet
      var canvasElem = canvas.getCanvas();\nvar context = canvas.getContext();\n
      or
      var canvaesElem = canvas.canvas;\nvar context = canvas.context;\n
    2. Draw on context
    "},{"location":"canvas/#update-display-texture","title":"Update display texture","text":""},{"location":"canvas/#load-or-save-texture","title":"Load or save texture","text":""},{"location":"canvas/#paste-frame","title":"Paste frame","text":"
    canvas.drawFrame(key, frame);\n// canvas.drawFrame(key, frame, dx, dy, dWidth, dHeight);\n// canvas.drawFrame(key, frame, dx, dy, dWidth, dHeight, sxOffset, syOffset, sWidth, sHeight);\n
    "},{"location":"canvas/#data-url","title":"Data URL","text":""},{"location":"canvas/#file","title":"File","text":""},{"location":"canvas/#pixel-color","title":"Pixel color","text":""},{"location":"canvas/#size","title":"Size","text":"
    canvas.setCanvasSize(width, height);\n

    or

    canvas.setSize(width, height);\n

    or

    canvas.resize(width, height);\n
    "},{"location":"canvas/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"canvas/#create-mask","title":"Create mask","text":"
    var mask = canvas.createBitmapMask();\n

    See mask

    "},{"location":"canvas/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"canvas/#compare-with-graphics-object","title":"Compare with Graphics object","text":""},{"location":"canvasframemanager/","title":"Canvas frame manager","text":""},{"location":"canvasframemanager/#introduction","title":"Introduction","text":"

    Generate bitmapfont from text game object, or bbcode text game object.

    "},{"location":"canvasframemanager/#live-demos","title":"Live demos","text":""},{"location":"canvasframemanager/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvasframemanager/#install-plugin","title":"Install plugin","text":""},{"location":"canvasframemanager/#load-minify-file","title":"Load minify file","text":""},{"location":"canvasframemanager/#import-plugin","title":"Import plugin","text":""},{"location":"canvasframemanager/#import-class","title":"Import class","text":""},{"location":"canvasframemanager/#create-instance","title":"Create instance","text":"
    var canvasFrames = scene.plugins.get('rexCanvasFrameManager').add(scene, {\nkey: '',\nwidth: 4096,\nheight: 4096,\ncellWidth: 64,\ncellHeight: 64,\nfillColor: undefined\n});\n

    or

    var canvasFrames = scene.plugins.get('rexCanvasFrameManager').add(scene, key, width, height, cellWidth, cellHeight, fillColor);\n

    Steps of generating bitmapfont :

    1. Add frames :
      canvasFrames.paste(frameName, gameObject);\n
    2. Update texture
      canvasFrames.updateTexture();\n
    3. Export frame data to bitmapfont
      canvasFrames.addToBitmapFont();\n
    "},{"location":"canvasframemanager/#add-frame","title":"Add frame","text":""},{"location":"canvasframemanager/#from-game-object","title":"From game object","text":"

    After rendering content on text, bbcode text, canvas

    canvasFrames.paste(frameName, gameObject);\n
    "},{"location":"canvasframemanager/#custom-drawing","title":"Custom drawing","text":"
    canvasFrames.draw(frameName, callback, scope)\n
    "},{"location":"canvasframemanager/#empty-frame","title":"Empty frame","text":"
    canvasFrames.addEmptyFrame(frameName);\n// canvasFrames.addEmptyFrame(frameName, width, height);\n
    "},{"location":"canvasframemanager/#update-texture","title":"Update texture","text":"

    Update texture after adding frames.

    canvasFrames.updateTexture();\n
    "},{"location":"canvasframemanager/#remove-frame","title":"Remove frame","text":"
    canvasFrames.remove(frameName);\n
    "},{"location":"canvasframemanager/#export-to-bitmapfont","title":"Export to bitmapfont","text":"
    canvasFrames.addToBitmapFont();\n
    "},{"location":"canvasframemanager/#destroy-instance","title":"Destroy instance","text":"
    canvasFrames.destroy();\n
    "},{"location":"canvasinput/","title":"Canvas input","text":""},{"location":"canvasinput/#introduction","title":"Introduction","text":"

    An invisible Input DOM element to receive character input and display on DynamicText.

    Inspirited from CanvasInput.

    "},{"location":"canvasinput/#live-demos","title":"Live demos","text":""},{"location":"canvasinput/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"canvasinput/#install-plugin","title":"Install plugin","text":""},{"location":"canvasinput/#load-minify-file","title":"Load minify file","text":""},{"location":"canvasinput/#import-plugin","title":"Import plugin","text":""},{"location":"canvasinput/#import-class","title":"Import class","text":""},{"location":"canvasinput/#create-instance","title":"Create instance","text":"
    var txt = scene.add.rexCanvasInput({\n// Parameters of DynamicText\nx: 0, y: 0,\nwidth: undefined, height: undefined,\n\npadding: 0,  // {left: 0, right: 0, top: 0, bottom: 0}\n\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null,\n\n// Style when focus\n// 'focus.color': ...\n// 'focus.color2': ...\n// 'focus.stroke': ...\n},\nfocusStyle: undefined,\n\ninnerBounds: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBY: undefined,\noffsetX: 0,\noffsetY: 0,\n\n// Style when cursor move on\n// 'cursor.color': ...\n// 'cursor.backgroundColor': ...\n// 'cursor.xxx': ...\n},\ncursorStyle: undefined,\n\nchildrenInteractive: false,\n\ntext: '',\n\nwrap: {\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0\n},\nlineHeight: undefined,\nuseDefaultLineHeight: true,\nmaxLines: 1,\nwrapWidth: undefined,\nletterSpacing: 0,\nhAlign: 0,\nvAlign: 'center',  // For single line text input\ncharWrap: true,    // For single line text input\n},\n\ntextArea: false,\n\n// Parameters of hidden-text-editor   \n// inputType: 'text',  // 'text'|'password'|'textarea'|...                \n\n// readOnly: false,\n// maxLength: undefined,\n// minLength: undefined,\n// selectAll: false,\n\n// enterClose: true,\n\n// Callbacks\n// onOpen: function (textObject, hiddenInputText) {\n// },\n\n// onClose: function (textObject, hiddenInputText) {\n// },\n\n// onUpdate: function (text, textObject, hiddenInputText) {\n//     return text;\n// },   \n\n// onAddChar: function(child, index, canvasInput) {\n//    child.modifyStyle({...})\n// },\n\n// onCursorOut: function(child, cursorIndex, canvasInput) {\n//     child.modifyStyle({\n//         \n//     });\n// },\n\n// onCursorIn: function(child, cursorIndex, canvasInput) {\n//     child.modifyStyle({\n//         \n//     });\n// },\n\n// parseTextCallback: function(text) {\n//     return text;\n// }.\n\n});\n
    "},{"location":"canvasinput/#number-input","title":"Number input","text":"
    txt.setNumberInput();\n
    "},{"location":"canvasinput/#custom-class","title":"Custom class","text":""},{"location":"canvasinput/#open-editor","title":"Open editor","text":"
    txt.open();\n

    or

    txt.open(onCloseCallback);\n
    "},{"location":"canvasinput/#close-editor","title":"Close editor","text":"
    txt.close();\n
    "},{"location":"canvasinput/#is-opened","title":"Is opened","text":"
    var isOpened = txt.isOpened;\n
    "},{"location":"canvasinput/#read-only","title":"Read only","text":""},{"location":"canvasinput/#text","title":"Text","text":""},{"location":"canvasinput/#value","title":"Value","text":""},{"location":"canvasinput/#size","title":"Size","text":""},{"location":"canvasinput/#events","title":"Events","text":""},{"location":"canvasinput/#select-text","title":"Select text","text":"

    This feature does not support.

    "},{"location":"canvasinput/#bypass-key-input","title":"Bypass key input","text":"

    Registered keyboard events might capture key input.

    var keyObj = scene.input.keyboard.addKey('W', enableCapture, emitOnRepeat);\n

    Set enableCapture to false to bypass key input to this input-text game objecct.

    "},{"location":"canvasinput/#other-properties","title":"Other properties","text":"

    See Dynamic text game object game object

    "},{"location":"canvasinput/#create-mask","title":"Create mask","text":"
    var mask = txt.createBitmapMask();\n

    See mask

    "},{"location":"canvasinput/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"capitalizes-first/","title":"Capitalizes first","text":""},{"location":"capitalizes-first/#introduction","title":"Introduction","text":"

    Capitalizes the first letter of a string, built-in method of phaser.

    "},{"location":"capitalizes-first/#usage","title":"Usage","text":"
    var result = Phaser.Utils.String.UppercaseFirst(str);\n
    "},{"location":"charactercache/","title":"Character cache","text":""},{"location":"charactercache/#introduction","title":"Introduction","text":"

    Generate bitmapfont from text game object, or bbcode text game object.

    "},{"location":"charactercache/#live-demos","title":"Live demos","text":""},{"location":"charactercache/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"charactercache/#install-plugin","title":"Install plugin","text":""},{"location":"charactercache/#load-minify-file","title":"Load minify file","text":""},{"location":"charactercache/#import-plugin","title":"Import plugin","text":""},{"location":"charactercache/#import-class","title":"Import class","text":""},{"location":"charactercache/#create-instance","title":"Create instance","text":"
    var characterCache = scene.plugins.get('rexCharacterCache').add(scene, {\nkey: '',  cellWidth: 32,\ncellHeight: 32,\nmaxCharacterCount: 4096,\nfreqMode: true,\n\ntextObject: textGameOject,\n\ncontent: '',\n});\n
    "},{"location":"charactercache/#load-characters","title":"Load characters","text":"

    Load characters into bitmap font, replace unused characters if no free character space.

    characterCache.load(content);\n// characterCache.load(content, lock);\n

    Warning

    Console.warn messages if no unused character is found.

    "},{"location":"charactercache/#events","title":"Events","text":""},{"location":"charactercache/#override-bitmaptext","title":"Override bitmaptext","text":"

    Inject characterCache.load(text) into bitmapText.setText(text) method.

    characterCache.overrideBitmapText(bitmapText);\n// var bitmapText = characterCache.overrideBitmapText(bitmapText);\n

    Now setText method has lock parameter : bitmapText.setText(text, lock).

    Or user can override bitmapText.setText by extending Phaser.GameObjects.BitmapText class.

    "},{"location":"charactercache/#unlock-all-characters","title":"Unlock all characters","text":"
    characterCache.unlock();\n
    "},{"location":"charactercache/#get-all-cache-data","title":"Get all cache data","text":"
    var cacheData = characterCache.getAllData();\n
    "},{"location":"charactercache/#destroy-instance","title":"Destroy instance","text":"
    characterCache.destroy();\n
    "},{"location":"charactercache/#properties","title":"Properties","text":""},{"location":"circlemaskimage/","title":"Circle mask image","text":""},{"location":"circlemaskimage/#introduction","title":"Introduction","text":"

    Load a texture, then apply a circle mask. Extended from canvas plugin.

    "},{"location":"circlemaskimage/#live-demos","title":"Live demos","text":""},{"location":"circlemaskimage/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"circlemaskimage/#install-plugin","title":"Install plugin","text":""},{"location":"circlemaskimage/#load-minify-file","title":"Load minify file","text":""},{"location":"circlemaskimage/#import-plugin","title":"Import plugin","text":""},{"location":"circlemaskimage/#import-class","title":"Import class","text":""},{"location":"circlemaskimage/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexCircleMaskImagePlugin',\nplugin: CircleMaskImagePlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"circlemaskimage/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexCircleMaskImage(x, y, key, frame, {\nmaskType: 0,\n// radius: undefined,\n\n// backgroundColor: undefined,\n\n// strokeColor: undefined,\n// strokeWidth: 0,\n});\n

    or

    var image = scene.add.rexCircleMaskImage(x, y, key, {\nmaskType: 0,\n// radius: undefined,\n\n// backgroundColor: undefined,\n\n// strokeColor: undefined,\n// strokeWidth: 0,\n});\n

    Add image from JSON

    var image = scene.make.rexCircleMaskImage({\nx: 0,\ny: 0,\nkey: key,\nframe: name,\nmaskType: 0,\n// radius: undefined\n// origin: {x: 0.5, y: 0.5},\n\n// backgroundColor: undefined,\n\n// strokeColor: undefined,\n// strokeWidth: 0,\n\nadd: true\n});\n
    "},{"location":"circlemaskimage/#custom-class","title":"Custom class","text":""},{"location":"circlemaskimage/#set-texture","title":"Set texture","text":"
    image.setTexture(key, frame);\n// image.setTexture(key, frame, maskType);\n

    or

    image.setTexture(key, frame, {\nmaskType: 0,\n// radius: undefined\n});\n
    "},{"location":"circlemaskimage/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"circlemaskimage/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"circlemaskimage/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"clamp/","title":"Clamp","text":""},{"location":"clamp/#introduction","title":"Introduction","text":"

    Force a value within the boundaries by clamping it to the range min, max, built-in method of phaser.

    "},{"location":"clamp/#usage","title":"Usage","text":"
    var result = Phaser.Math.Clamp(value, min, max);\n
    "},{"location":"clickoutside/","title":"Click outside","text":""},{"location":"clickoutside/#introduction","title":"Introduction","text":"

    Fires 'clickoutside' event when pointer-down or pointer-up outside of game object.

    "},{"location":"clickoutside/#live-demos","title":"Live demos","text":""},{"location":"clickoutside/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"clickoutside/#install-plugin","title":"Install plugin","text":""},{"location":"clickoutside/#load-minify-file","title":"Load minify file","text":""},{"location":"clickoutside/#import-plugin","title":"Import plugin","text":""},{"location":"clickoutside/#import-class","title":"Import class","text":""},{"location":"clickoutside/#create-instance","title":"Create instance","text":"
    var clickOutside = scene.plugins.get('rexClickOutside').add(gameObject, {\n// enable: true,\n// mode: 1,              // 0|'press'|1|'release'\n// clickInterval: 100,   // ms\n// threshold: undefined\n});\n
    "},{"location":"clickoutside/#events","title":"Events","text":""},{"location":"clickoutside/#enable","title":"Enable","text":""},{"location":"clickoutside/#set-mode","title":"Set mode","text":"
    clickOutside.setMode(mode);\n
    "},{"location":"clickoutside/#set-click-interval","title":"Set click interval","text":"
    clickOutside.setClickInterval(interval);  // interval in ms\n
    "},{"location":"clickoutside/#set-dragging-threshold","title":"Set dragging threshold","text":"
    clickOutside.setDragThreshold(distance);  // distance in pixels\n
    "},{"location":"clock/","title":"Clock","text":""},{"location":"clock/#introduction","title":"Introduction","text":"

    A clock to count elapsed time.

    "},{"location":"clock/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"clock/#install-plugin","title":"Install plugin","text":""},{"location":"clock/#load-minify-file","title":"Load minify file","text":""},{"location":"clock/#import-plugin","title":"Import plugin","text":""},{"location":"clock/#import-class","title":"Import class","text":""},{"location":"clock/#create-instance","title":"Create instance","text":"
    var clock = scene.plugins.get('rexClock').add(scene, {\n// timeScale: 1\n});\n
    "},{"location":"clock/#start-counting","title":"Start counting","text":"
    clock.start();\n// clock.start(startAt);  // start-at time in ms\n
    "},{"location":"clock/#force-ticking","title":"Force ticking","text":"
    clock.tick(0);\n// clock.tick(delta);\n
    "},{"location":"clock/#get-elapsed-time","title":"Get elapsed time","text":"
    var now = clock.now;  // Elapsed time in ms\n
    "},{"location":"clock/#pause-resume-stop-counting","title":"Pause, Resume, stop counting","text":"
    clock.pause();\nclock.resume();\nclock.stop();\n
    "},{"location":"clock/#seek-elapsed-time","title":"Seek elapsed time","text":"
    clock.seek(time);   // elapsed time in ms\n
    "},{"location":"clock/#state-of-counting","title":"State of counting","text":"
    var isRunning = clock.isRunning;\n
    "},{"location":"clock/#time-scale","title":"Time-scale","text":""},{"location":"clock/#events","title":"Events","text":""},{"location":"color/","title":"Color","text":""},{"location":"color/#introduction","title":"Introduction","text":"

    Get color value, built-in methods of phaser.

    "},{"location":"color/#usage","title":"Usage","text":""},{"location":"color/#get-color-integer","title":"Get color integer","text":""},{"location":"color/#color-integer-to-rgb","title":"Color integer to RGB","text":"
    var rgb = Phaser.Display.Color.IntegerToRGB(color);\n
    "},{"location":"color/#hsv-color-wheel","title":"HSV color wheel","text":"
    1. Create color array
      var colorArray = Phaser.Display.Color.HSVColorWheel(s, v);\n
    2. Get color
      var color = colorArray[i].color;  // i : 0 ~ 359\n
    "},{"location":"color/#color-object","title":"Color object","text":""},{"location":"color/#create-color-object","title":"Create color object","text":""},{"location":"color/#set-color","title":"Set color","text":""},{"location":"color/#properties","title":"Properties","text":""},{"location":"color/#clone","title":"Clone","text":"
    var newColor = color.clone();\n
    "},{"location":"color/#to-hex-string","title":"To hex string","text":"
    var hexString = Phaser.Display.Color.RGBToString(color.r, color.g, color.b, color.a);\n// var hexString = Phaser.Display.Color.RGBToString(color.r, color.g, color.b, color.a, prefix);\n
    "},{"location":"color/#interpolation","title":"Interpolation","text":"

    Interpolate between 2 colors.

    var colorOut = Phaser.Display.Color.Interpolate.RGBWithRGB(r1, g1, b1, r2, g2, b2, length, index);\nvar colorOut = Phaser.Display.Color.Interpolate.ColorWithColor(color1, color2, length, index);\nvar colorOut = Phaser.Display.Color.Interpolate.ColorWithRGB(color, r, g, b, length, index);\n
    "},{"location":"conditionstable/","title":"CSV Conditions table","text":""},{"location":"conditionstable/#introduction","title":"Introduction","text":"

    Check conditions to find passed tests listed in a csv table.

    "},{"location":"conditionstable/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"conditionstable/#install-plugin","title":"Install plugin","text":""},{"location":"conditionstable/#load-minify-file","title":"Load minify file","text":""},{"location":"conditionstable/#import-plugin","title":"Import plugin","text":""},{"location":"conditionstable/#import-class","title":"Import class","text":""},{"location":"conditionstable/#create-instance","title":"Create instance","text":"
    var table = scene.plugins.get('rexConditionsTable').add();\n
    "},{"location":"conditionstable/#load-table-from-csv-string","title":"Load table from csv string","text":"
    table.loadCSV(csvString, {\n// delimiter: ','\n});\n

    For exameple, csv string

    name A A B Test1 >= 10 <= 20 Test2 3
    ,A,A,B\nTest1,>= 10,<= 20,\nTest2,,,3\n

    means that:

    Test1: (A>=10) && (A<=20)\nTest2: (B==3)\n

    Equations will be evaled by new Function.

    "},{"location":"conditionstable/#test","title":"Test","text":""},{"location":"conditionstable/#get-test-results","title":"Get test results","text":"
    var results = table.getTestResults(context);\n
    "},{"location":"conditionstable/#get-first-pass-test-name","title":"Get first pass test name","text":"
    var testName = table.anyPassTest(context);\n
    "},{"location":"config-data/","title":"Configuration data","text":""},{"location":"config-data/#introduction","title":"Introduction","text":"

    Get parameters from configuration object.

    "},{"location":"config-data/#usage","title":"Usage","text":""},{"location":"config-data/#quick-start","title":"Quick start","text":"
    const GetValue = Phaser.Utils.Objects.GetValue;\nvar myMethod = function(config) {\nvar x = GetValue(config, 'x', 0);\nvar y = GetValue(config, 'y', 0);\nvar width = GetValue(config, 'width', 0);\nvar height = GetValue(config, 'height', 0);\n// ...\n}\n
    "},{"location":"config-data/#get-value","title":"Get value","text":""},{"location":"config-data/#is-plain-object","title":"Is plain object","text":"
    var isPlainObject = Phaser.Utils.Objects.IsPlainObject(object);\n

    Plain object:

    "},{"location":"config-data/#merge-configuration","title":"Merge configuration","text":"
    var configOut = Phaser.Utils.Objects.Merge(configIn, defaultConfig);\n
    "},{"location":"container/","title":"Container","text":""},{"location":"container/#introduction","title":"Introduction","text":"

    Control the position and angle of children game objects, built-in game object of phaser.

    "},{"location":"container/#usage","title":"Usage","text":""},{"location":"container/#container","title":"Container","text":""},{"location":"container/#add-container-object","title":"Add container object","text":"
    var container = scene.add.container(x, y);\n// var container = scene.add.container(x, y, children); // children: an array of game object\n
    "},{"location":"container/#custom-class","title":"Custom class","text":""},{"location":"container/#destroy","title":"Destroy","text":"
    container.destroy();\n

    Also destroy all children game objects.

    "},{"location":"container/#set-properties","title":"Set properties","text":"

    Reference game object, to set position, angle, visible, alpha, etc...

    "},{"location":"container/#set-size","title":"Set size","text":"
    container.setSize(width, height);\n

    Default size is 0x0.

    "},{"location":"container/#set-scroll-factor","title":"Set scroll factor","text":"
    container.setScrollFactor(x, y);\n

    Apply this scrollFactor to all Container children.

    container.setScrollFactor(x, y, true);\n
    "},{"location":"container/#hit-area","title":"Hit area","text":"
    container.setInteractive(new Phaser.Geom.Circle(0, 0, radius), Phaser.Geom.Circle.Contains);\n// container.setInteractive(false); // disable\n

    Assign hit area with a circle shape.

    "},{"location":"container/#non-exclusive","title":"Non-exclusive","text":"
    container.setExclusive(false);\n

    Allows a game object added to container many times.

    "},{"location":"container/#children","title":"Children","text":""},{"location":"container/#add-child","title":"Add child","text":"
    container.add(child);  // child: a game object or an array of game objects\n
    container.addAt(child, index);\n
    "},{"location":"container/#exist","title":"Exist","text":"
    var hasChild = container.exists(child);\n
    "},{"location":"container/#get-child","title":"Get child","text":"
    var firstChild = container.first;\nvar nextChild = container.next;\nvar prevChild = container.previous;\nvar lastChild = container.last;\n
    var child = container.getByName(name);\n
    var child = container.getRandom(startIndex, length);\n
    var child = container.getFirst(property, value, startIndex, endIndex);\n// value: the value to test the property against. Must pass a strict (`===`) comparison check.\n
    var children = container.getAll(property, value, startIndex, endIndex);\n// value: the value to test the property against. Must pass a strict (`===`) comparison check.\n
    var amount = container.count(property, value, startIndex, endIndex);\n// value: the value to test the property against. Must pass a strict (`===`) comparison check.\n
    "},{"location":"container/#sort-children","title":"Sort children","text":"
    container.sort(property);\n
    container.sort(property, function(childA, childB){\nreturn 0; // 0, 1, -1\n});\n
    "},{"location":"container/#remove-child","title":"Remove child","text":"
    container.remove(child);\n// container.remove(child, true);  // remove child object and destroy it\n
    container.removeAt(index);\n// container.removeAt(index, true);  // remove child object and destroy it\n
    container.removeBetween(startIndex, endIndex);\n// container.removeBetween(startIndex, endIndex, true);  // remove children objects and destroy them\n
    container.removeAll();\n// container.removeAll(true);  // remove all children objects and destroy them\n
    "},{"location":"container/#order-of-child","title":"Order of child","text":"
    container.moveTo(child, index);\n
    container.bringToTop(child);\n
    container.sendToBack(child);\n
    container.moveUp(child);\n
    container.moveDown(child);\n
    container.moveAbove(child1, child2);  // Move child1 above child2\n
    container.moveBelow(child1, child2);  // Move child1 below child2\n
    container.swap(child1, child2);\n
    container.reverse();\n
    container.shuffle();\n
    "},{"location":"container/#replace-child","title":"Replace child","text":"
    container.replace(oldChild, newChild);\n// container.replace(oldChild, newChild, true);  // destroy oldChild\n
    "},{"location":"container/#set-properties_1","title":"Set properties","text":"
    container.setAll(property, value, startIndex, endIndex);\n
    "},{"location":"container/#for-each-child","title":"For each child","text":""},{"location":"container/#get-world-position-rotation-scale","title":"Get world position, rotation, scale","text":"
    var matrix = child.getWorldTransformMatrix();\nvar x = matrix.tx;\nvar y = matrix.ty;\nvar rotation = matrix.rotation;\nvar scaleX = matrix.scaleX;\nvar scaleY = matrix.scaleY;\n
    "},{"location":"container/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"container/#create-mask","title":"Create mask","text":"
    var mask = container.createBitmapMask();\n

    See mask

    "},{"location":"container/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"container/#compare-with-group-object","title":"Compare with group object","text":""},{"location":"containerlite-perspective/","title":"Perspective","text":""},{"location":"containerlite-perspective/#introduction","title":"Introduction","text":"

    Snapshot children of containerlite, to a perspective render texture.

    "},{"location":"containerlite-perspective/#live-demos","title":"Live demos","text":""},{"location":"containerlite-perspective/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"containerlite-perspective/#install-plugin","title":"Install plugin","text":""},{"location":"containerlite-perspective/#load-minify-file","title":"Load minify file","text":""},{"location":"containerlite-perspective/#import-plugin","title":"Import plugin","text":""},{"location":"containerlite-perspective/#import-class","title":"Import class","text":""},{"location":"containerlite-perspective/#create-instance","title":"Create instance","text":"
    var perspective = scene.plugins.get('rexPerspectiveImagePlugin').addContainerPerspective(container, {\nuseParentBounds: false,\n// hideCCW: true,\n});\n
    "},{"location":"containerlite-perspective/#perspective-mode","title":"Perspective mode","text":""},{"location":"containerlite-perspective/#enter","title":"Enter","text":"
    perspective.enter();\n
    1. Snapshot current visible children into perspective render texture
    2. Set current visible children to invisible
    3. Set this perspective render texture to visible
    "},{"location":"containerlite-perspective/#exit","title":"Exit","text":"
    perspective.exit();\n
    1. Inverse visible of children and perspective render texture
    "},{"location":"containerlite-perspective/#is-in-perspective-mode","title":"Is in perspective mode","text":"
    var isInPerspectiveMode = perspective.perspectiveState;\n
    "},{"location":"containerlite-perspective/#rotation","title":"Rotation","text":""},{"location":"containerlite-perspective/#flip","title":"Flip","text":"
    scene.tweens.add({\ntargets: perspective,\nangleY: { start: 0, to: -180}\n})\n
    "},{"location":"containerlite-perspective/#other-properties","title":"Other properties","text":"

    See Perspective rendertexture game object.

    "},{"location":"containerlite-skew/","title":"Skew","text":""},{"location":"containerlite-skew/#introduction","title":"Introduction","text":"

    Snapshot children of containerlite, to a skew render texture.

    "},{"location":"containerlite-skew/#live-demos","title":"Live demos","text":""},{"location":"containerlite-skew/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"containerlite-skew/#install-plugin","title":"Install plugin","text":""},{"location":"containerlite-skew/#load-minify-file","title":"Load minify file","text":""},{"location":"containerlite-skew/#import-plugin","title":"Import plugin","text":""},{"location":"containerlite-skew/#import-class","title":"Import class","text":""},{"location":"containerlite-skew/#create-instance","title":"Create instance","text":"
    var quad = scene.plugins.get('rexQuadImagePlugin').addContainerSkew(container, {\nuseParentBounds: false\n});\n
    "},{"location":"containerlite-skew/#skew-mode","title":"Skew mode","text":""},{"location":"containerlite-skew/#enter","title":"Enter","text":"
    skew.enter();\n
    1. Snapshot current visible children into skew render texture
    2. Set current visible children to invisible
    3. Set this skew render texture to visible
    "},{"location":"containerlite-skew/#exit","title":"Exit","text":"
    skew.exit();\n
    1. Inverse visible of children and skew render texture
    "},{"location":"containerlite-skew/#is-in-skew-mode","title":"Is in skew mode","text":"
    var isInSkewMode = skew.skewState;\n
    "},{"location":"containerlite-skew/#skew","title":"Skew","text":""},{"location":"containerlite-skew/#other-properties","title":"Other properties","text":"

    See Skew rendertexture game object.

    "},{"location":"containerlite/","title":"Container Lite","text":""},{"location":"containerlite/#introduction","title":"Introduction","text":"

    Control the position and angle of children game objects.

    It is inspired from Ziao/phaser3-interim-containers.

    "},{"location":"containerlite/#live-demos","title":"Live demos","text":""},{"location":"containerlite/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"containerlite/#install-plugin","title":"Install plugin","text":""},{"location":"containerlite/#load-minify-file","title":"Load minify file","text":""},{"location":"containerlite/#import-plugin","title":"Import plugin","text":""},{"location":"containerlite/#import-class","title":"Import class","text":""},{"location":"containerlite/#add-container-object","title":"Add container object","text":"
    var container = scene.add.rexContainerLite(x, y);  // width = 1, height = 1\n// var container = scene.add.rexContainerLite(x, y, width, height);\n

    or

    var container = scene.add.rexContainerLite(x, y, children);  // width = 1, height = 1\n// var container = scene.add.rexContainerLite(x, y, width, height, children);\n

    Add container from JSON

    var container = scene.make.rexContainerLite({\nx: 0,\ny: 0,\nwidth: 1,\nheight: 1,\n\n// angle: 0,\n// alpha: 1,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n});\n
    "},{"location":"containerlite/#custom-class","title":"Custom class","text":""},{"location":"containerlite/#destroy","title":"Destroy","text":"
    container.destroy();\n

    Also destroy all children.

    "},{"location":"containerlite/#other-properties","title":"Other properties","text":"

    This container game object inherits from Zone.

    "},{"location":"containerlite/#add-child","title":"Add child","text":""},{"location":"containerlite/#pin","title":"Pin","text":"

    Add(pin) a game obejct to container

    container.add(child);  // child: a game object\n// container.pin(child);\n

    or

    container.pin(child, {\n// syncPosition: true,\n// syncRotation: true,\n// syncScale : true,\n// syncAlpha: true,\n// syncScrollFactor: true,\n});\n

    Or add(pin) children

    container.addMultiple(children);\n// container.add(children);\n

    These world properties of children will be changed with container.

    Note

    "},{"location":"containerlite/#add-local","title":"Add local","text":"
    container.addLocal(child);\n

    or

    container.addLocalMultiple(children);\n

    or

    container.pinLocal(child, {\n// syncPosition: true,\n// syncRotation: true,\n// syncScale : true,\n// syncAlpha: true,\n});\n

    Add child to container with related properties, like official container. For example, container-lite is at (100, 100), and child is at (10, 10), then child will be placed at (110, 110) after adding to container-lite.

    "},{"location":"containerlite/#remove-child","title":"Remove child","text":""},{"location":"containerlite/#get-child","title":"Get child","text":""},{"location":"containerlite/#traversal","title":"Traversal","text":""},{"location":"containerlite/#exist","title":"Exist","text":"

    Return true if child is under this container-lite (nested).

    var hasChild = container.contains(child);\n
    "},{"location":"containerlite/#children","title":"Children","text":"
    var children = container.children;\n
    "},{"location":"containerlite/#get-parent","title":"Get parent","text":"
    var parentContainer = scene.plugins.get('rexContainerLitePlugin').getParent(child);\n

    or

    var parentContainer = Container.GetParent(child); // Static method\n
    "},{"location":"containerlite/#set-properties-of-child","title":"Set properties of child","text":""},{"location":"containerlite/#position","title":"Position","text":"
    container.setChildPosition(child, x, y);\n
    "},{"location":"containerlite/#rotation","title":"Rotation","text":"
    container.setChildRotation(child, rotation);\n
    "},{"location":"containerlite/#scale","title":"Scale","text":"
    container.setChildScale(child, scaleX, scaleY);\n

    or

    container.setChildDisplaySize(child, width, height);\n
    "},{"location":"containerlite/#visible","title":"Visible","text":"
    container.setChildVisible(child, visible);\n
    "},{"location":"containerlite/#alpha","title":"Alpha","text":"
    container.setChildAlpha(child, alpha);\n
    "},{"location":"containerlite/#local-state-of-child","title":"Local state of child","text":"

    Get local state

    var localState = container.getLocalState(child);\n

    or

    var localState = child.rexContainer;\n
    "},{"location":"containerlite/#change-local-state-of-child","title":"Change local state of child","text":""},{"location":"containerlite/#reset-local-state-of-child","title":"Reset local state of child","text":"

    Reset local state of child according to current properties of children

    "},{"location":"containerlite/#tween-local-state","title":"Tween local state","text":"
    var tweenObj = container.tweenChild({\ntargets: child,\n// x: '+=100',\n// y: '+=100',\n// repeat: -1,\n// yoyo: true\n})\n

    Paramters of configuration is the same as tween task.

    Supported properties :

    "},{"location":"containerlite/#tween-local-state-of-a-containerlite-child","title":"Tween local state of a containerlite child","text":"
    var tweenObj = containerLiteChild.tweenSelf({    // x: '+=100',\n// y: '+=100',\n// repeat: -1,\n// yoyo: true\n})\n

    Equal to

    containerLiteChild.tweenChild({\ntargets: containerLiteChild,\n// x: '+=100',\n// y: '+=100',\n// repeat: -1,\n// yoyo: true\n})\n
    "},{"location":"containerlite/#create-tween-config","title":"Create tween config","text":"
    var tweenConfig = container.createTweenChildConfig({\ntargets: child,\n// x: '+=100',\n// y: '+=100',\n// repeat: -1,\n// yoyo: true\n});\nscene.tweens.add(tweenConfig);\n
    "},{"location":"containerlite/#depth","title":"Depth","text":""},{"location":"containerlite/#layer","title":"Layer","text":"

    A containerLite can have a layer. Current children and new children will draw on this layer, instead of display list of scene.

    "},{"location":"containerlite/#mask","title":"Mask","text":""},{"location":"containerlite/#shader-effects","title":"Shader effects","text":"

    Apply post-fx pipeline on layer of containerLite.

    "},{"location":"containerlite/#snapshot","title":"Snapshot","text":""},{"location":"containerlite/#draw-bounds","title":"Draw bounds","text":""},{"location":"containerlite/#scroll-factor","title":"Scroll factor","text":""},{"location":"containerlite/#change-origin","title":"Change origin","text":"
    container.changeOrigin(originX, originY);\n

    This method also will reset all local state of children.

    "},{"location":"containerlite/#add-to-container","title":"Add to container","text":"

    Note

    container.add(containerLite), or layer.add(containerLite) won't add children of containerLite.

    "},{"location":"containerlite/#other-properties_1","title":"Other properties","text":"

    See game object

    "},{"location":"containerlite/#compare-with-official-container","title":"Compare with Official Container","text":""},{"location":"create-number-array/","title":"Number array","text":""},{"location":"create-number-array/#introduction","title":"Introduction","text":"

    Create an array representing the range of numbers, built-in method of phaser.

    "},{"location":"create-number-array/#usage","title":"Usage","text":""},{"location":"create-number-array/#create-number-array","title":"Create number array","text":"

    Create an array representing the range of numbers (usually integers), between, and inclusive of, the given start and end arguments.

    var arr = Phaser.Utils.Array.NumberArray(start, end);\n

    For example,

    var arr = Phaser.Utils.Array.NumberArray(2, 4);\n// arr = [2, 3, 4]\n

    "},{"location":"create-number-array/#create-number-array-with-step","title":"Create number array with step","text":"

    Create an array of numbers (positive and/or negative) progressing from start up to but not including end by advancing by step.

    var arr = Phaser.Utils.Array.NumberArray(start, end, step);\n

    For example,

    var arr = Phaser.Utils.Array.NumberArrayStep(0, 20, 5);\n// arr =  [0, 5, 10, 15]\n

    "},{"location":"create-number-array/#create-prefix-number-suffix-string-array","title":"Create prefix-number-suffix string array","text":"
    var arr = Phaser.Utils.Array.NumberArray(start, end, prefix, suffix);\n

    For example,

    var arr = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png');\n// arr = ['HD-5.png', 'HD-6.png', 'HD-7.png']\n

    "},{"location":"csvscenario/","title":"CSV scenario","text":""},{"location":"csvscenario/#introduction","title":"Introduction","text":"

    Run script in csv format. Csv could be edited by excel or google document.

    "},{"location":"csvscenario/#live-demos","title":"Live demos","text":""},{"location":"csvscenario/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"csvscenario/#install-plugin","title":"Install plugin","text":""},{"location":"csvscenario/#load-minify-file","title":"Load minify file","text":""},{"location":"csvscenario/#import-plugin","title":"Import plugin","text":""},{"location":"csvscenario/#import-class","title":"Import class","text":""},{"location":"csvscenario/#create-instance","title":"Create instance","text":"
    var scenario = scene.plugins.get('rexCSVScenario').add(scene, {\n// timeUnit: 0,        // 'ms'|0|'s'|'sec'|1\n// prefix: /^#([a-zA-Z]+)/\n// argsConvert: true,\n// argsConvertScope: undefined,\n// delimiter: ','\n// translateCommandNameCallback: undefined,\n});\n
    "},{"location":"csvscenario/#load-csv-script","title":"Load csv script","text":"
    scenario.load(csvString, scope, {\n// timeUnit: 0,        // 'ms'|0|'s'|'sec'|1\n// prefix: /^#([a-zA-Z]+)/\n// argsConvert: true,\n// argsConvertScope: undefined,\n// delimiter: ',',\n// translateCommandNameCallback: undefined,\n})\n
    "},{"location":"csvscenario/#append-csv-script","title":"Append csv script","text":"
    scenario.append(csvString);\n
    "},{"location":"csvscenario/#start-running-instructions","title":"Start running instructions","text":"

    scenario.start({\n// label: '',\n// offset: 0\n})\n
    scenario.play({\n// label: '',\n// offset: 0\n})\n

    or

    scenario.playPromise({\n// label: '',\n// offset: 0\n})\n.then(function(){\n// On complete\n})\n
    "},{"location":"csvscenario/#events","title":"Events","text":""},{"location":"csvscenario/#types-of-instructions","title":"Types of instructions","text":"

    Each row in csv table is an instruction.

    "},{"location":"csvscenario/#run-custom-function","title":"Run custom function","text":"

    Run custom function of scope, which passed from scenario.load(...)

    Format:

    -,fnName,param0,param1,...\n
    "},{"location":"csvscenario/#delay-execution","title":"Delay execution","text":"

    Run custom function after a delay.

    Format:

    time,fnName,param0,param1,...\n
    "},{"location":"csvscenario/#wait-then-execution","title":"Wait then execution","text":"

    Run custom function until scenario.continue(eventName)

    Format:

    eventName,fnName,param0,param1,...\n
    "},{"location":"csvscenario/#skip-waiting","title":"Skip waiting","text":"
    scenario.continue(true);\n
    "},{"location":"csvscenario/#task","title":"Task","text":"

    Sample code

    Scenario will be paused if custom function return an event emitter, resumed when that evnt emitter fires complete event.

    See also: Sequence

    "},{"location":"csvscenario/#label","title":"Label","text":"

    Sample code

    A label for #GOTO or #IF instructions.

    Format:

    #LABEL,label\n

    Example: A label named 'AA'

    #LABEL,AA\n
    "},{"location":"csvscenario/#exit","title":"Exit","text":"

    Exit current execution.

    Format:

    #EXIT\n
    "},{"location":"csvscenario/#goto","title":"Goto","text":"

    Sample code

    Go to label and execute.

    Format:

    #GOTO,label\n

    Example: Goto label 'AA'

    #GOTO,AA\n
    "},{"location":"csvscenario/#if-goto","title":"If-goto","text":"

    Sample code

    Go to trueLabel if condition is true, otherwise go to falseLabel.

    Format:

    #IF,condition,trueLabel,falseLabel\n

    Example: Goto label 'AA' if (this.coin > 100), else run next instruction

    #IF,this.coin > 100,AA\n
    "},{"location":"csvscenario/#wait","title":"Wait","text":"

    Run next instruction after a delay time, or scenario.continue(eventName).

    Format:

    #WAIT,time\n
    #WAIT,eventName\n

    Example:

    "},{"location":"csvscenario/#pause","title":"Pause","text":"
    scenario.pause();\n
    "},{"location":"csvscenario/#resume","title":"Resume","text":"
    scenario.resume();\n
    "},{"location":"csvscenario/#time-scale","title":"Time-scale","text":""},{"location":"csvscenario/#clear","title":"Clear","text":"

    Stop running and clear instructions.

    scenario.clear();\n
    "},{"location":"csvscenario/#states","title":"States","text":""},{"location":"csvtoarray/","title":"CSV to array","text":""},{"location":"csvtoarray/#introduction","title":"Introduction","text":"

    Generate array from csv string.

    "},{"location":"csvtoarray/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"csvtoarray/#import-class","title":"Import class","text":"
    import rexCSVToArray from './plugins/csvtoarray.js';\n
    "},{"location":"csvtoarray/#import-plugin","title":"Import plugin","text":""},{"location":"csvtoarray/#convert-csv","title":"Convert csv","text":"
    var arr = scene.plugins.get('rexCSVToArray').convert(csvString, {\n// delimiter: ',',\n// convert: true\n});\n

    Values will be converted to number (include hex number string like '0xFF'), boolean, null, or string, if convert is true.

    "},{"location":"csvtohashtable/","title":"CSV to hash table","text":""},{"location":"csvtohashtable/#introduction","title":"Introduction","text":"

    Hash table indexed by (col-key, row-key) from csv string.

    "},{"location":"csvtohashtable/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"csvtohashtable/#install-plugin","title":"Install plugin","text":""},{"location":"csvtohashtable/#load-minify-file","title":"Load minify file","text":""},{"location":"csvtohashtable/#import-plugin","title":"Import plugin","text":""},{"location":"csvtohashtable/#import-class","title":"Import class","text":""},{"location":"csvtohashtable/#create-instance","title":"Create instance","text":"
    var table = scene.plugins.get('rexCsvToHashTable').add();\n
    "},{"location":"csvtohashtable/#append-rows-from-csv-string","title":"Append rows from csv string","text":"
    table.loadCSV(csvString, {\n// delimiter: ',',\n// convert: true\n// convertScope: undefined\n});\n

    For exameple, csv string

    name hp mp Rex 100 20 Alice 300 40
    name,hp,mp\nRex,100,20\nAlice,300,40\n

    will be converted to

    {\n\"Alice\": {\n\"name\": \"Alice\",\n\"hp\": 300,\n\"mp\": 40\n},\n\"Rex\": {\n\"name\": \"Rex\",\n\"hp\": 100,\n\"mp\": 20\n}\n}\n

    Then get value by

    var value = table.get('Rex', 'hp');\n
    "},{"location":"csvtohashtable/#convert-value-type","title":"Convert value type","text":"

    Values will be converted to number (include hex number string like '0xFF'), boolean, null, or string, if convert is true, or assign your convert function by convert and convertScope when loading table (table.loadCSV(...)).

    var convertCallback = function(table, rowKey, colKey, value) {\n// value = ...\nreturn value;\n};\n

    Or uses these metheds to convert columns or rows.

    "},{"location":"csvtohashtable/#get-value","title":"Get value","text":"
    var val = table.get(rowKey, colKey);\n
    "},{"location":"csvtohashtable/#set-value","title":"Set value","text":"
    table.set(rowKey, colKey, value);\n
    table.add(rowKey, colKey, value);\n// equal to table.set(rowKey, colKey, table.get(rowKey, colKey) + value);\n
    "},{"location":"csvtohashtable/#has-columnrow-key","title":"Has column/row key","text":"
    var hasRow = table.hasRowKey(rowKey);\n
    var hasCol = table.hasColKey(colKey);\n
    var hasCell = table.hasKey(rowKey, colKey);\n
    "},{"location":"csvtohashtable/#value-in-column-or-row","title":"Value in column or row","text":"
    var existed = table.isValueInRol(rowKey, value);\n
    var existed = table.isValueInCol(colKey, value);\n
    "},{"location":"csvtohashtable/#create-table","title":"Create table","text":""},{"location":"csvtohashtable/#clear-table","title":"Clear table","text":"
    table.clear();\n
    "},{"location":"csvtohashtable/#append-a-column","title":"Append a column","text":"
    table.appendCol(colKey, initValue);\n// table.appendCol(colKey, callback, scope);  // get initValue from callback\n

    Callback

    var callback = function (table, rowKey, colKey) { // value = ...\nreturn value;\n};\n
    "},{"location":"csvtohashtable/#append-a-row","title":"Append a row","text":"
    table.appendRow(rowKey, initValue);\n// table.appendRow(rowKey, callback, scope);  // get initValue from callback\n

    Callback

    var callback = function (table, rowKey, colKey) { // value = ...\nreturn value;\n};\n
    "},{"location":"csvtohashtable/#remove-a-column","title":"Remove a column","text":"
    table.removeCol(colKey);\n
    "},{"location":"csvtohashtable/#remove-a-row","title":"Remove a row","text":"
    table.removeRol(rowKey);\n
    "},{"location":"csvtohashtable/#sort-column-or-row","title":"Sort column or row","text":"
    table.sortCol(colKey, mode);\n// table.sortCol(callback, scope);  // sort columns by callback\n
    table.sortRow(rowKey, mode);\n// table.sortRow(callback, scope);  // sort rows by callback\n

    Mode:

    Sorting callback

    var callback = function(rowKeyA, rowKeyB) {\nreturn result; // 1, -1, or 0\n};\n
    "},{"location":"csvtohashtable/#retrieve-columns-or-rows","title":"Retrieve columns or rows","text":"
    table.eachCol(rowKey, callback, scope);\n
    table.eachRow(colKey, callback, scope);\n

    Callback

    var callback = function(table, rowKey, colKey, value) {\n// ...\n};\n
    "},{"location":"csvtohashtable/#json","title":"JSON","text":""},{"location":"cursor/","title":"Cursor","text":""},{"location":"cursor/#introduction","title":"Introduction","text":"

    Custom cursor, built-in feature of phaser.

    "},{"location":"cursor/#usage","title":"Usage","text":"

    References:

    "},{"location":"cursor/#set-default-cursor","title":"Set default cursor","text":"
    scene.input.setDefaultCursor(CSSString);\n// CSSString: 'url(assets/input/cursors/sword.cur), pointer'\n
    "},{"location":"cursor/#set-cursor-of-a-game-object","title":"Set cursor of a Game Object","text":"

    Change cursor image when cursor is over that Game Object.

    gameObject.setInteractive({\ncursor: CSSString\n});\n// CSSString: 'url(assets/input/cursors/sword.cur), pointer'\n

    Set cursor image directly after gameObject.setInteractive().

    gameObject.input.cursor = CSSString;\n// CSSString: 'url(assets/input/cursors/sword.cur), pointer'\n

    Use pointer (hand cursor).

    gameObject.setInteractive({\nuseHandCursor: true\n});\n
    "},{"location":"cursor/#change-current-cursor","title":"Change current cursor","text":"
    scene.input.manager.canvas.style.cursor = cursor;\n
    "},{"location":"cursoratbound/","title":"Cursor at bound","text":""},{"location":"cursoratbound/#introduction","title":"Introduction","text":"

    Map cursor-at-(left/right/top/botttom-)bound to (left/right/up/down) cursor key state.

    "},{"location":"cursoratbound/#live-demos","title":"Live demos","text":""},{"location":"cursoratbound/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"cursoratbound/#install-plugin","title":"Install plugin","text":""},{"location":"cursoratbound/#load-minify-file","title":"Load minify file","text":""},{"location":"cursoratbound/#import-plugin","title":"Import plugin","text":""},{"location":"cursoratbound/#import-class","title":"Import class","text":""},{"location":"cursoratbound/#create-instance","title":"Create instance","text":"
    var cursorAtBound = scene.plugins.get('rexCursorAtBound').add(scene, {\n// bounds: undefined,\n// sensitiveDistance: 20,\n});\n

    Map position of cursor to state of cursor key

    "},{"location":"cursoratbound/#state-of-cursor-keys","title":"State of cursor keys","text":"
    var cursorKeys = cursorAtBound.createCursorKeys();\n\nvar leftKeyDown = cursorKeys.left.isDown;\nvar rightKeyDown = cursorKeys.right.isDown;\nvar upKeyDown = cursorKeys.up.isDown;\nvar downKeyDown = cursorKeys.down.isDown;\n

    Or

    var leftKeyDown = cursorAtBound.left;\nvar rightKeyDown = cursorAtBound.right;\nvar upKeyDown = cursorAtBound.up;\nvar downKeyDown = cursorAtBound.down;\nvar noKeyDown = cursorAtBound.noKey;\n
    "},{"location":"cursoratbound/#destroy","title":"Destroy","text":"
    cursorAtBound.destroy();\n
    "},{"location":"curve-spiral/","title":"Spiral curve","text":""},{"location":"curve-spiral/#introduction","title":"Introduction","text":"

    Spiral curve.

    "},{"location":"curve-spiral/#live-demos","title":"Live demos","text":""},{"location":"curve-spiral/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"curve-spiral/#install-plugin","title":"Install plugin","text":""},{"location":"curve-spiral/#load-minify-file","title":"Load minify file","text":""},{"location":"curve-spiral/#import-plugin","title":"Import plugin","text":""},{"location":"curve-spiral/#import-class","title":"Import class","text":""},{"location":"curve-spiral/#create-shape","title":"Create shape","text":""},{"location":"curve-spiral/#properties","title":"Properties","text":""},{"location":"curve-spiral/#other-methods","title":"Other methods","text":"

    See path

    "},{"location":"datamanager/","title":"Built-in data","text":""},{"location":"datamanager/#introduction","title":"Introduction","text":"

    Store data in key-value pairs, built-in object of phaser.

    "},{"location":"datamanager/#usage","title":"Usage","text":""},{"location":"datamanager/#write","title":"Write","text":""},{"location":"datamanager/#set-value","title":"Set value","text":""},{"location":"datamanager/#set-values","title":"Set values","text":"
    parent.data.set(data);    // data: {key:value, ...}\n
    "},{"location":"datamanager/#merge-values","title":"Merge values","text":"
    parent.data.merge(data);  // data: {key:value, ...}\nparent.data.merge(data, false);  // won't overwrite existed keys\n
    "},{"location":"datamanager/#events","title":"Events","text":"

    Fires setdata event when a value is first set.

    parent.data.events.on('setdata', function(parent, key, value){ /* ... */ });\n

    Fires changedata, and changedata- + key events when a value is set that already exists.

    parent.data.events.on('changedata', function(parent, key, value, previousValue){ /* ... */ });\n
    parent.data.events.on('changedata-' + key, function(parent, value, previousValue){ /* ... */ });\n
    "},{"location":"datamanager/#read","title":"Read","text":""},{"location":"datamanager/#get-value","title":"Get value","text":"

    var value = parent.data.get(key);\n
    or
    var value = parent.data.values[key];\n

    "},{"location":"datamanager/#get-values","title":"Get values","text":"
    var values = parent.data.get(keys); // values: [value, value, ...], keys: [key, key, ...]\n
    "},{"location":"datamanager/#get-all-values","title":"Get all values","text":"
    var allValues = parent.data.getAll();  // return a copy of data\n
    "},{"location":"datamanager/#query","title":"Query","text":"

    Using string.match() to pick matched keys.

    var result = parent.data.query(rgExp);\n
    "},{"location":"datamanager/#remove","title":"Remove","text":""},{"location":"datamanager/#remove-key","title":"Remove key","text":"
    parent.data.remove(key);\n
    "},{"location":"datamanager/#remove-keys","title":"Remove keys","text":"
    parent.data.remove(keys);  // keys: [key, key, ...]\n
    "},{"location":"datamanager/#pop-key","title":"Pop key","text":"
    var value = parent.data.pop(key);\n

    Get and remove that key.

    "},{"location":"datamanager/#delet-all-keys","title":"Delet all keys","text":"

    Delete all data in this Data Manager and unfreeze it.

    parent.data.reset();\n
    "},{"location":"datamanager/#events_1","title":"Events","text":"

    Fires removedata event when a key is removed.

    parent.data.events.on('removedata', function(parent, key, value){ /* ... */ });\n
    "},{"location":"datamanager/#freeze","title":"Freeze","text":"
    var isFrozen = parent.data.freeze;\nparent.data.freeze = true;\n

    No changes can be written to it.

    "},{"location":"datamanager/#has-key","title":"Has key","text":"
    var hasKey = parent.data.has(key);\n
    "},{"location":"datamanager/#for-each-key","title":"For each key","text":"
    parent.data.each(function(parent, key, value){\n/* ... */\n}, scope);\n
    "},{"location":"datamanager/#count-of-data","title":"Count of data","text":"
    var cnt = parent.data.count;\n
    "},{"location":"datamanager/#reset","title":"Reset","text":"

    Reset status and clear all keys.

    parent.data.reset()\n
    "},{"location":"date/","title":"Date","text":""},{"location":"date/#introduction","title":"Introduction","text":"

    Get current date or unix-timestamp.

    "},{"location":"date/#usage","title":"Usage","text":"

    Reference

    "},{"location":"date/#create-instance","title":"Create instance","text":"
    var d = new Date();\nvar d = new Date(timestamp);\nvar d = new Date(dateString);\nvar d = new Date(year, month, day, hours, minutes, seconds, milliseconds);\n
    "},{"location":"date/#get-date","title":"Get date","text":"
    var year = d.getFullYear();    // returns the year\nvar month = d.getMonth();      // returns the month (0-11)\nvar date = d.getDate();        // returns the day of the month (1-31)\nvar day = d.getDay();          // returns the day of the week\nvar hour = d.getHours();       // returns the hour (0-23)\nvar min = d.getMinutes();      // returns the minutes (0-59)\nvar sec = d.getSeconds();      // returns the seconds (0-59)\nvar ms = d.getMilliseconds();  // returns the milliseconds (0-999)\n
    "},{"location":"date/#get-unix-timestamp","title":"Get unix-timestamp","text":"
    var timestamp = d.getTime();;   // unix-timestamp in milliseconds\n

    or

    var timestamp = Date.now();;    // unix-timestamp in milliseconds\n
    "},{"location":"date/#to-string","title":"To string","text":"
    var s = d.toLocaleString();   // locale conventions\nvar iso = d.toISOString();    // ISO standard\n
    "},{"location":"device/","title":"Device","text":""},{"location":"device/#introduction","title":"Introduction","text":"

    Get information of device, built-in properties of phaser.

    "},{"location":"device/#usage","title":"Usage","text":""},{"location":"device/#os","title":"OS","text":""},{"location":"device/#browser","title":"Browser","text":""},{"location":"device/#audio","title":"Audio","text":"
    var flac = scene.sys.game.device.audio.flac;\nvar aac = scene.sys.game.device.audio.aac;\nvar dolby = scene.sys.game.device.audio.dolby;\nvar m4a = scene.sys.game.device.audio.m4a;\nvar mp3 = scene.sys.game.device.audio.mp3;\nvar ogg = scene.sys.game.device.audio.ogg;\nvar opus = scene.sys.game.device.audio.opus;\nvar wav = scene.sys.game.device.audio.wav;\nvar webm = scene.sys.game.device.audio.webm;\nvar webAudio = scene.sys.game.device.audio.webAudio;\nvar audioData = scene.sys.game.device.audio.audioData;\n
    "},{"location":"device/#video","title":"Video","text":"
    var h264Video = scene.sys.game.device.video.h264;  // Can this device play h264 mp4 video files?\nvar hlsVideo = scene.sys.game.device.video.hls;    // Can this device play hls video files?\nvar mp4Video = scene.sys.game.device.video.mp4;    // Can this device play h264 mp4 video files?\nvar m4vVideo = scene.sys.game.device.video.m4v;    // Can this device play m4v (typically mp4) video files?\nvar oggVideo = scene.sys.game.device.video.ogg;    // Can this device play ogg video files?\nvar vp9Video = scene.sys.game.device.video.vp9;    // Can this device play vp9 video files?\nvar webmVideo = scene.sys.game.device.video.webm;  // Can this device play webm video files?\n
    "},{"location":"dialog-quest/","title":"Dialog-quest","text":""},{"location":"dialog-quest/#introduction","title":"Introduction","text":"

    Flow control of question manager with a dialog.

    "},{"location":"dialog-quest/#live-demos","title":"Live demos","text":""},{"location":"dialog-quest/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"dialog-quest/#install-plugin","title":"Install plugin","text":""},{"location":"dialog-quest/#load-minify-file","title":"Load minify file","text":""},{"location":"dialog-quest/#import-plugin","title":"Import plugin","text":""},{"location":"dialog-quest/#import-class","title":"Import class","text":""},{"location":"dialog-quest/#create-dialog-quest-object","title":"Create dialog-quest object","text":"
    var quest = new DialogQuest({\ndialog: dialog,\n\nquestions: undefined,\n// format: undefined,\n// delimiter: ',',\n// types: {\n//     question: 'q',\n//     option: '',\n// },\n// convert: true,\n\nquest: true,\n// quest: {\n//     shuffleQuestions: false,\n//     shuffleOptions: false,\n// }\n});\n
    "},{"location":"dialog-quest/#flow-chart","title":"Flow chart","text":"
    graph TB\n\nStart[\"quest.start()\"] --> EventUpdateChoice[\"quest.emit('update-choice', choice, option, quest)<br>----<br>Update each choice button via question.option[i]\"]\n\nEventUpdateChoice --> EventUpdateDialog[\"quest.emit('update-dialog', dialog, question, quest)<br>----<br>Update dialog, action button via question\"]\n\nEventUpdateDialog --> EventClickChoice[\"quest.emit('click-choice', choice, dialog, quest)<br>----<br>Click any choice button\"]\n\nEventClickChoice --> EventClickAction[\"quest.emit('click-action', action, dialog, quest)<br>----<br>Click any action button\"]\n\nEventClickAction --> IsLast{\"quest.isLast()\"}\nEventClickChoice --> IsLast\n\nIsLast --> |No| Next[\"quest.next()\"]\nIsLast --> |Yes| Complete(\"Complete\")\n\nNext --> EventUpdateChoice
    "},{"location":"dialog-quest/#events","title":"Events","text":""},{"location":"dialog-quest/#quest-methods","title":"Quest methods","text":""},{"location":"dialog-quest/#private-data-methods","title":"Private data methods","text":""},{"location":"distance/","title":"Distance","text":""},{"location":"distance/#introduction","title":"Introduction","text":"

    Get distance, built-in methods of phaser.

    "},{"location":"distance/#usage","title":"Usage","text":""},{"location":"distance/#distance","title":"Distance","text":""},{"location":"distance/#speed","title":"Speed","text":""},{"location":"domelement/","title":"DOM element","text":""},{"location":"domelement/#introduction","title":"Introduction","text":"

    Carry DOM element, built-in game object of phaser.

    Limitations

    Dom elements appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have a DOM Element, then a Sprite, then another DOM Element behind it.

    "},{"location":"domelement/#usage","title":"Usage","text":""},{"location":"domelement/#configuration","title":"Configuration","text":"
    var config = {\n// ...\nparent: divId,\n// fullscreenTarget: divId, // For fullscreen\ndom: {\ncreateContainer: true\n},\ninput: {\nmouse: {\ntarget: divId\n},\ntouch: {\ntarget: divId\n},\n},\n// ...\n}\nvar game = new Phaser.Game(config);\n
    "},{"location":"domelement/#add-dom-element-object","title":"Add DOM element object","text":""},{"location":"domelement/#add-html-string","title":"Add html string","text":"
    1. Load html string in preload stage
      scene.load.html(key, url);\n
      Reference: load html
    2. Add DOM element object with html string from cache
      var domElement = scene.add.dom(x, y).createFromCache(key);  // elementType = 'div'\n// var domElement = scene.add.dom(x, y).createFromCache(key, elementType);\n
    "},{"location":"domelement/#create-element","title":"Create element","text":"
    scene.add.dom(x, y).createElement(tagName);\n// scene.add.dom(x, y).createElement(tagName, style, innerText);\n
    "},{"location":"domelement/#add-existing-dom","title":"Add existing DOM","text":"
    1. Create DOM element
      var el = document.createElement('div');\n// el.style = '...';\n// el.innerText = '...';\n
    2. Add to scene
      var domElement = scene.add.dom(x, y, el);\n// var domElement = scene.add.dom(x, y, el, style, innerText);\n
    "},{"location":"domelement/#custom-class","title":"Custom class","text":""},{"location":"domelement/#event-of-dom-element","title":"Event of DOM element","text":""},{"location":"domelement/#get-child","title":"Get child","text":""},{"location":"domelement/#set-inner-html-string","title":"Set inner html string","text":"
    scene.setHTML(html);\n

    or

    scene.setText(html);\n
    "},{"location":"domelement/#dom-element","title":"DOM Element","text":"

    Each DOM element object has 1 DOM element.

    "},{"location":"domelement/#depth","title":"Depth","text":"
    domElement.setDepth(value);\n
    "},{"location":"domelement/#set-size","title":"Set size","text":"
    var style = domElement.node.style;\nstyle.width = width + 'px';\nstyle.height = height + 'px';\ndomElement.updateSize();\n
    "},{"location":"domelement/#skew","title":"Skew","text":"
    domElement.setSkew(x, y);\n

    or

    domElement.skewX = x;\ndomElement.skewY = y;\n
    "},{"location":"domelement/#rotate-3d","title":"Rotate 3d","text":"

    The rotate3d() CSS function defines a transformation that rotates an element around a fixed axis in 3D space, without deforming it.

    domElement.rotate3d.set(x, y, z, a);\n

    or

    domElement.rotate3d.x = x;\ndomElement.rotate3d.y = y;\ndomElement.rotate3d.z = z;\ndomElement.rotate3d.w = a;\n

    Reference

    "},{"location":"domelement/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"
    1. DOM game object always put above game canvas, i.e. DOM game object will render above any other kind of game object.
    2. DOM game object will receive touch event even if it is not the first touched game object.
    3. P3's 'pointerdown', 'pointerup' events will be fired above/under DOM game object.
    4. P3's 'pointermove' event won't be fired above/under DOM game object, except
    "},{"location":"domelement/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"drag/","title":"Drag","text":""},{"location":"drag/#introduction","title":"Introduction","text":"

    Drag game object.

    "},{"location":"drag/#live-demos","title":"Live demos","text":""},{"location":"drag/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"drag/#install-plugin","title":"Install plugin","text":""},{"location":"drag/#load-minify-file","title":"Load minify file","text":""},{"location":"drag/#import-plugin","title":"Import plugin","text":""},{"location":"drag/#import-class","title":"Import class","text":""},{"location":"drag/#create-instance","title":"Create instance","text":"
    var drag = scene.plugins.get('rexDrag').add(gameObject, {\n// enable: true,\n// axis: 0,      //0|'both'|'h&v'|1|'horizontal'|'h'|2|'vertical'|'v'\n// rotation: Phaser.Math.DegToRad(45)  // axis rotation in rad\n});\n
    "},{"location":"drag/#events","title":"Events","text":"

    Built-in dragging events

    gameObject.on('dragstart', function(pointer, dragX, dragY){ /*...*/ });\ngameObject.on('drag', function(pointer, dragX, dragY){ /*...*/ });\ngameObject.on('dragend', function(pointer, dragX, dragY, dropped){ /*...*/ });\n
    "},{"location":"drag/#enable","title":"Enable","text":""},{"location":"drag/#get-dragging-state","title":"Get dragging state","text":"
    var isDragging = drag.isDragging;\n
    "},{"location":"drag/#set-rotation-of-axis","title":"Set rotation of axis","text":"
    drag.setAxisRotation(rad);\n// drag.axisRotation = rad;\n
    "},{"location":"drag/#set-axis-mode","title":"Set axis mode","text":"
    drag.setAxisMode(axis);\n
    "},{"location":"drag/#try-drag","title":"Try drag","text":"

    Game object will be dragged if there is any point above it.

    drag.drag();\n
    "},{"location":"drag/#drop","title":"Drop","text":"

    Game object will be dropped(dragend) manually.

    drag.dragend();\n
    "},{"location":"dragrotate/","title":"Drag rotate","text":""},{"location":"dragrotate/#introduction","title":"Introduction","text":"

    Get dragging angle around a specific point.

    "},{"location":"dragrotate/#live-demos","title":"Live demos","text":""},{"location":"dragrotate/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"dragrotate/#install-plugin","title":"Install plugin","text":""},{"location":"dragrotate/#load-minify-file","title":"Load minify file","text":""},{"location":"dragrotate/#import-plugin","title":"Import plugin","text":""},{"location":"dragrotate/#import-class","title":"Import class","text":""},{"location":"dragrotate/#create-instance","title":"Create instance","text":"
    var dragRotate = scene.plugins.get('rexDragRotate').add(scene, {\nx: 0,\ny: 0,\nmaxRadius: 100\nminRadius: 0,\n// enable: true,\n});\n
    "},{"location":"dragrotate/#enable","title":"Enable","text":""},{"location":"dragrotate/#origin-point","title":"Origin point","text":"

    Note

    Parameter (x,y) is world position, not camera position.

    "},{"location":"dragrotate/#radius","title":"Radius","text":""},{"location":"dragrotate/#get-dragging-state","title":"Get dragging state","text":"
    var state = dragRotate.state;\n
    "},{"location":"dragrotate/#is-drag","title":"Is drag","text":"
    var isDrag = dragRotate.isDrag;\n

    Return true if (dragRotate.state === 1) and catched touch pointer just moved.

    "},{"location":"dragrotate/#drag-cancel","title":"Drag cancel","text":"
    dragRotate.dragCancel();\n
    "},{"location":"dragrotate/#events","title":"Events","text":""},{"location":"dragrotate/#on-dragging","title":"On dragging","text":""},{"location":"dragrotate/#on-drag-start-on-drag-end","title":"On drag start, on drag end","text":""},{"location":"dragrotate/#catched-touch-pointer","title":"Catched touch pointer","text":""},{"location":"dropdown/","title":"Drop down","text":""},{"location":"dropdown/#introduction","title":"Introduction","text":"

    Drop down game object below another target game object.

    "},{"location":"dropdown/#live-demos","title":"Live demos","text":""},{"location":"dropdown/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"dropdown/#install-plugin","title":"Install plugin","text":""},{"location":"dropdown/#load-minify-file","title":"Load minify file","text":""},{"location":"dropdown/#import-plugin","title":"Import plugin","text":""},{"location":"dropdown/#import-class","title":"Import class","text":""},{"location":"dropdown/#create-instance","title":"Create instance","text":"
    var dropDown = scene.plugins.get('rexDropDown').add(gameObject, {        // expandDirection: 0,\n// alignTargetX: \n// alignTargetY: \n// alignOffsetX: \n// alignOffsetY: \n// bounds:\n\n// When to close dropdown dialog?\n// touchOutsideClose: false,\n// anyTouchClose: false,\n\n// duration: {\n//     in: 200,\n//     out: 200\n// }\n\n// transitIn: undefined,\n// transitOut: undefined,\n\n// destroy: true\n});\n
    "},{"location":"dropdown/#close","title":"Close","text":"
    dropDown.requestClose();\n// dropDown.requestClose();\n
    "},{"location":"dropdown/#events","title":"Events","text":""},{"location":"dynamic-texture/","title":"Dynamic texture","text":""},{"location":"dynamic-texture/#introduction","title":"Introduction","text":"

    Canvas Dynamic Texture stored in texture cache, built-in object of phaser.

    "},{"location":"dynamic-texture/#usage","title":"Usage","text":""},{"location":"dynamic-texture/#create-dynamic-texture","title":"Create dynamic texture","text":"
    var texture = scene.textures.addDynamicTexture(key, width, height);\n

    Disable texture.isSpriteTexture if this texture is not a base texture for Sprite Game Objects.

    texture.setIsSpriteTexture(false);\n// texture.isSpriteTexture = false;\n
    "},{"location":"dynamic-texture/#set-size","title":"Set size","text":"
    texture.setSize(width, height);\n
    "},{"location":"dynamic-texture/#fill-color","title":"Fill color","text":"
    texture.fill(rgb);\n// texture.fill(rgb, alpha, x, y, width, height);\n
    "},{"location":"dynamic-texture/#clear","title":"Clear","text":"
    texture.clear();\n
    texture.clear(x, y, width, height);\n
    "},{"location":"dynamic-texture/#draw-game-object","title":"Draw game object","text":"
    texture.draw(entries);\n// texture.draw(entries,x, y);\n// texture.draw(entries, x, y, alpha, tint);\n
    "},{"location":"dynamic-texture/#erase-game-object","title":"Erase game object","text":"
    texture.erase(entries);\n// texture.erase(entries, x, y);\n
    "},{"location":"dynamic-texture/#draw-frame","title":"Draw frame","text":"
    texture.drawFrame(key, frame, x, y);\n// texture.drawFrame(key, frame, x, y, alpha, tint);\n

    or

    texture.stamp(key, frame, x, y, {\nalpha: 1,\ntint: 0xffffff,\nangle: 0,\nrotation: 0,\nscale: 1,\nscaleX: 1,\nscaleY: 1,\noriginX: 0.5,\noriginY: 0.5,\nblendMode: 0,\nerase: false,\nskipBatch: false\n})\n
    "},{"location":"dynamic-texture/#draw-repeat-frames","title":"Draw repeat frames","text":""},{"location":"dynamic-texture/#draw-frame_1","title":"Draw frame","text":"
    texture.add(name, sourceIndex, x, y, width, height);\n
    "},{"location":"dynamic-texture/#batch-draw","title":"Batch draw","text":"
    1. Begin
      texture.beginDraw();\n
    2. Draw
    3. End
      texture.endDraw();\n
    "},{"location":"dynamic-texture/#snapshot","title":"Snapshot","text":""},{"location":"dynamic-texture/#snapshot-area","title":"Snapshot area","text":"
    texture.snapshot(callback);\n// texture.snapshot(callback, type, encoderOptions);\n

    or

    texture.snapshotArea(x, y, width, height, callback, type, encoderOptions);\n
    "},{"location":"dynamic-texture/#get-color-of-a-pixel","title":"Get color of a pixel","text":"
    texture.snapshotPixel(x, y, callback);\n
    "},{"location":"dynamicbitmaptext/","title":"Dynamic bitmap text","text":""},{"location":"dynamicbitmaptext/#introduction","title":"Introduction","text":"

    Drawing text by texture with a callback for each character triggered at every tick, built-in game object of phaser.

    "},{"location":"dynamicbitmaptext/#usage","title":"Usage","text":""},{"location":"dynamicbitmaptext/#load-bitmap-font","title":"Load bitmap font","text":"

    Reference: load bitmap font

    "},{"location":"dynamicbitmaptext/#add-bitmap-text-object","title":"Add bitmap text object","text":"
    var txt = scene.add.dynamicBitmapText(x, y, key, text);\n// var txt = scene.add.dynamicBitmapText(x, y, key, text, size, align);\n

    Add text from JSON

    var txt = scene.make.dynamicBitmapText({\nx: 0,\ny: 0,\ntext: 'Text\\nGame Object\\nCreated from config',\nfont: '',\nsize: false,\nalign: 0,\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"dynamicbitmaptext/#custom-class","title":"Custom class","text":""},{"location":"dynamicbitmaptext/#set-callback","title":"Set callback","text":"
    var callback = function(data) {\n// input\n// data.index, data.charCode\n// data.x, data.y, data.scale, data.rotation\n// data.data\n// data.tint.topLeft, data.tint.topRight, data.tint.bottomLeft, data.tint.bottomRight    \n\n// modify input `data` then return it\n// ...\n// offset: data.y += 2\n// set tint: data.color = tint\nreturn data;\n}\ntxt.setDisplayCallback(callback);\n
    "},{"location":"dynamicbitmaptext/#set-text","title":"Set text","text":"
    txt.setText('...');\n

    or

    txt.text = '...';\n
    "},{"location":"dynamicbitmaptext/#crop","title":"Crop","text":""},{"location":"dynamicbitmaptext/#other-properties","title":"Other properties","text":"

    See bitmap text, game object

    "},{"location":"dynamicbitmaptext/#create-mask","title":"Create mask","text":"
    var mask = txt.createBitmapMask();\n

    See mask

    "},{"location":"dynamicbitmaptext/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"dynamictext/","title":"Dynamic text","text":""},{"location":"dynamictext/#introduction","title":"Introduction","text":"

    Control position, angle of each character drawn on a canvas.

    "},{"location":"dynamictext/#live-demos","title":"Live demos","text":""},{"location":"dynamictext/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"dynamictext/#install-plugin","title":"Install plugin","text":""},{"location":"dynamictext/#load-minify-file","title":"Load minify file","text":""},{"location":"dynamictext/#import-plugin","title":"Import plugin","text":""},{"location":"dynamictext/#import-class","title":"Import class","text":""},{"location":"dynamictext/#create-instance","title":"Create instance","text":"
    var txt = scene.add.rexDynamicText({\nx: 0, y: 0,\nwidth: undefined, height: undefined,\n\npadding: 0,  // {left: 0, right: 0, top: 0, bottom: 0}\n\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null\n},\n\ninnerBounds: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBottomY: undefined,\noffsetX: 0,\noffsetY: 0\n},\n\nchildrenInteractive: false,\n\ntext: '',\n\nwrap: undefined,\n\ntestString: '|M\u00c9qgy',\n});\n

    or

    var txt = scene.add.rexDynamicText(x, y, width, height, config);\n

    or

    var txt = scene.add.rexDynamicText(x, y, config);\n

    Add dynamictext from JSON

    var txt = scene.make.rexDynamicText({\nx: 0,\ny: 0,\n\n// origin: {x: 0.5, y: 0.5},\n// fill: null,\n\nadd: true\n});\n
    "},{"location":"dynamictext/#custom-class","title":"Custom class","text":""},{"location":"dynamictext/#clear-content","title":"Clear content","text":"
    txt.clearContent();\n
    "},{"location":"dynamictext/#text","title":"Text","text":""},{"location":"dynamictext/#append-text","title":"Append text","text":"
    txt.appendText(text);\n

    or

    txt.appendText(text, {\n// bold: false,\n// italic: false,\n// fontSize: '16px',\n// fontFamily: 'Courier',\n// color: '#fff',\n// stroke: '#fff',\n// strokeThickness: 0,\n// shadowColor: null,\n// shadowOffsetX: 0,\n// shadowOffsetY: 0,\n// shadowBlur: 0,\n// backgroundColor: null,\n// backgroundHeight: undefined,\n// backgroundBottomY: undefined,\n// offsetY: 0,\n// offsetY: 0,\n// align: undefined\n}\n);\n

    To overwrite some properties of text-style.

    Each character will be placed at position (0,0), without rotation. Uses word-wrap method to rearrange position of characters.

    "},{"location":"dynamictext/#set-text","title":"Set text","text":"
    txt.setText(text);\n

    or

    txt.setText(text, {\n// bold: false,\n// italic: false,\n// fontSize: '16px',\n// fontFamily: 'Courier',\n// color: '#fff',\n// stroke: '#fff',\n// strokeThickness: 0,\n// shadowColor: null,\n// shadowOffsetX: 0,\n// shadowOffsetY: 0,\n// shadowBlur: 0,\n// backgroundColor: null,\n// backgroundHeight: undefined,\n// backgroundBottomY: undefined,\n// offsetY: 0,\n// offsetY: 0,\n// align: undefined\n}\n);\n
    "},{"location":"dynamictext/#insert-text","title":"Insert text","text":"

    txt.insertText(index, text);\n
    or

    txt.insertText(index, text, {\n// bold: false,\n// italic: false,\n// fontSize: '16px',\n// fontFamily: 'Courier',\n// color: '#fff',\n// stroke: '#fff',\n// strokeThickness: 0,\n// shadowColor: null,\n// shadowOffsetX: 0,\n// shadowOffsetY: 0,\n// shadowBlur: 0,\n// backgroundColor: null,\n// backgroundHeight: undefined,\n// backgroundBottomY: undefined,\n// offsetY: 0,\n// offsetY: 0,\n// align: undefined\n}\n);\n
    "},{"location":"dynamictext/#remove-text","title":"Remove text","text":"
    txt.removeText(index);\n
    "},{"location":"dynamictext/#get-text","title":"Get text","text":""},{"location":"dynamictext/#image","title":"Image","text":""},{"location":"dynamictext/#append-image","title":"Append image","text":"
    txt.appendImage(key, frame, {\n// width\n// height\n// scaleX\n// scaleY\n})\n
    "},{"location":"dynamictext/#background","title":"Background","text":""},{"location":"dynamictext/#inner-bounds","title":"Inner bounds","text":""},{"location":"dynamictext/#wrap","title":"Wrap","text":"

    Control characters :

    "},{"location":"dynamictext/#horizontal-wrap","title":"Horizontal wrap","text":"
    var result = txt.runWordWrap({\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0\n},\nascent: undefined,\nlineHeight: undefined,\nuseDefaultTextHeight: false,\nmaxLines: undefined,\nwrapWidth: undefined,\nletterSpacing: 0,\nhAlign: 0,\nvAlign: 0,\ncharWrap: false\n});\n
    "},{"location":"dynamictext/#align","title":"Align","text":""},{"location":"dynamictext/#test-string","title":"Test string","text":"
    txt.setTestString(text);\n
    "},{"location":"dynamictext/#vertical-wrap","title":"Vertical wrap","text":"
    var result = txt.runVerticalWrap({\npadding: {\ntop: 0,\nleft: 0,\nright: 0,\nbottom: 0\n},\nlineWidth: undefined,\nmaxLines: undefined,\nfixedChildHeight: undefined,\ncharPerLine: undefined,\nwrapHeight: undefined,\nletterSpacing: 0,\nrtl: true,\nhAlign: 0,\nvAlign: 0,\n});\n
    "},{"location":"dynamictext/#result","title":"Result","text":"
    {\nchildren: [],\nlines: [],\nisLastPage: false\n}\n
    "},{"location":"dynamictext/#wrap-next-page","title":"Wrap next page","text":"
    var result = txt.runWordWrap(prevResult);\n
    "},{"location":"dynamictext/#default-configuration-of-wrapping","title":"Default configuration of wrapping","text":"
    txt.setWrapConfig(config);\n
    "},{"location":"dynamictext/#child","title":"Child","text":""},{"location":"dynamictext/#general-properties","title":"General properties","text":""},{"location":"dynamictext/#character","title":"Character","text":""},{"location":"dynamictext/#text-style","title":"Text-style","text":""},{"location":"dynamictext/#image_1","title":"Image","text":""},{"location":"dynamictext/#for-each-child","title":"For each child","text":""},{"location":"dynamictext/#get-children","title":"Get children","text":""},{"location":"dynamictext/#get-character-children","title":"Get character children","text":""},{"location":"dynamictext/#move-child","title":"Move child","text":""},{"location":"dynamictext/#size","title":"Size","text":""},{"location":"dynamictext/#input-events-of-child","title":"Input events of child","text":""},{"location":"dynamictext/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"dynamictext/#create-mask","title":"Create mask","text":"
    var mask = txt.createBitmapMask();\n

    See mask

    "},{"location":"dynamictext/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"dynamictext/#compare-with-other-kinds-of-text-game-object","title":"Compare with other kinds of text game object","text":""},{"location":"ease-function/","title":"Ease","text":""},{"location":"ease-function/#introduction","title":"Introduction","text":"

    Ease functions, built-in method of phaser.

    "},{"location":"ease-function/#usage","title":"Usage","text":""},{"location":"ease-function/#ease-functions","title":"Ease functions","text":""},{"location":"ease-function/#get-ease-function-via-string","title":"Get ease function via string","text":"
    var easeFunction = Phaser.Tweens.Builders.GetEaseFunction(ease);\n// var easeFunction = Phaser.Tweens.Builders.GetEaseFunction(ease, easeParams);\n
    "},{"location":"ease-function/#get-result","title":"Get result","text":"
    var result = easeFunction(t);\n
    "},{"location":"easedata/","title":"Ease-data","text":""},{"location":"easedata/#introduction","title":"Introduction","text":"

    Easing data value of game object's data-manager.

    "},{"location":"easedata/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"easedata/#install-plugin","title":"Install plugin","text":""},{"location":"easedata/#load-minify-file","title":"Load minify file","text":""},{"location":"easedata/#import-plugin","title":"Import plugin","text":""},{"location":"easedata/#import-method","title":"Import method","text":""},{"location":"easedata/#create-instance","title":"Create instance","text":"
    var easedata = scene.plugins.get('rexEaseData').add(gameObject);\n
    "},{"location":"easedata/#ease-data","title":"Ease data","text":""},{"location":"easedata/#events","title":"Events","text":""},{"location":"easemove/","title":"Ease-move","text":""},{"location":"easemove/#introduction","title":"Introduction","text":"

    Ease-move game object.

    "},{"location":"easemove/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"easemove/#install-plugin","title":"Install plugin","text":""},{"location":"easemove/#load-minify-file","title":"Load minify file","text":""},{"location":"easemove/#import-plugin","title":"Import plugin","text":""},{"location":"easemove/#import-method","title":"Import method","text":""},{"location":"easemove/#move-to","title":"Move to","text":"
    var easemove = scene.plugins.get('rexEaseMove').moveTo(gameObject, duration, x, y);\n// var easemove = scene.plugins.get('rexEaseMove').moveTo(gameObject, duration, x, y, ease);\n// easemove = scene.plugins.get('rexEaseMove').moveTo(gameObject, duration, x, y, ease, easemove);\n
    "},{"location":"easemove/#move-from","title":"Move from","text":"
    var easemove = scene.plugins.get('rexEaseMove').moveFrom(gameObject, duration, x, y);\n// var easemove = scene.plugins.get('rexEaseMove').moveFrom(gameObject, duration, x, y, ease);\n// easemove = scene.plugins.get('rexEaseMove').moveFrom(gameObject, duration, x, y, ease, easemove);\n
    "},{"location":"easemove/#events","title":"Events","text":"

    See Events of tween task

    "},{"location":"effect-properties/","title":"Effect properties","text":""},{"location":"effect-properties/#introduction","title":"Introduction","text":"

    Attach properties to a game object or camera, to add/remove/control builtin preFX or postFX effects.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"effect-properties/#live-demos","title":"Live demos","text":""},{"location":"effect-properties/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"effect-properties/#install-plugin","title":"Install plugin","text":""},{"location":"effect-properties/#load-minify-file","title":"Load minify file","text":""},{"location":"effect-properties/#import-plugin","title":"Import plugin","text":""},{"location":"effect-properties/#import-method","title":"Import method","text":""},{"location":"effect-properties/#attach-properties","title":"Attach properties","text":"

    Supported effects are barrel, blackWhite, bloom, blur, bokeh, brightness, brown, circle, contrast, desaturate, desaturateLuminance, displacement, glow, gradient, grayscale, hue, kodachrome, lsd, negative, pixelate, polaroid, reveal, saturate, sepia, shadow, shiftToBGR, shine, technicolor, tiltShift, vignette, vintagePinhole, wipe.

    "},{"location":"effect-properties/#effect-properties","title":"Effect properties","text":"

    Will try to create preFX effect if gameObject has preFX, otherwise, try to create postFX effect.

    "},{"location":"effect-properties/#barrel","title":"Barrel","text":""},{"location":"effect-properties/#blackwhite","title":"BlackWhite","text":""},{"location":"effect-properties/#bloom","title":"Bloom","text":""},{"location":"effect-properties/#blur","title":"Blur","text":""},{"location":"effect-properties/#bokeh","title":"Bokeh","text":""},{"location":"effect-properties/#brightness","title":"Brightness","text":""},{"location":"effect-properties/#brown","title":"Brown","text":""},{"location":"effect-properties/#circle","title":"Circle","text":""},{"location":"effect-properties/#contrast","title":"Contrast","text":""},{"location":"effect-properties/#desaturate","title":"Desaturate","text":""},{"location":"effect-properties/#desaturateluminance","title":"DesaturateLuminance","text":""},{"location":"effect-properties/#displacement","title":"Displacement","text":""},{"location":"effect-properties/#glow","title":"Glow","text":""},{"location":"effect-properties/#gradient","title":"Gradient","text":""},{"location":"effect-properties/#grayscale","title":"Grayscale","text":""},{"location":"effect-properties/#hue","title":"Hue","text":""},{"location":"effect-properties/#kodachrome","title":"Kodachrome","text":""},{"location":"effect-properties/#lsd","title":"Lsd","text":""},{"location":"effect-properties/#negative","title":"Negative","text":""},{"location":"effect-properties/#pixelate","title":"Pixelate","text":""},{"location":"effect-properties/#polaroid","title":"Polaroid","text":""},{"location":"effect-properties/#reveal","title":"Reveal","text":""},{"location":"effect-properties/#saturate","title":"Saturate","text":""},{"location":"effect-properties/#sepia","title":"Sepia","text":""},{"location":"effect-properties/#shadow","title":"Shadow","text":""},{"location":"effect-properties/#shifttobgr","title":"ShiftToBGR","text":""},{"location":"effect-properties/#shine","title":"Shine","text":""},{"location":"effect-properties/#technicolor","title":"Technicolor","text":""},{"location":"effect-properties/#tiltshift","title":"TiltShift","text":""},{"location":"effect-properties/#vignette","title":"Vignette","text":""},{"location":"effect-properties/#vintagepinhole","title":"VintagePinhole","text":""},{"location":"effect-properties/#wipe","title":"Wipe","text":""},{"location":"effect-properties/#clear-all-effects","title":"Clear all effects","text":"
    gameObject.clearAllEffects();\n
    "},{"location":"effectlayer-outline/","title":"Effectlayer outline","text":""},{"location":"effectlayer-outline/#introduction","title":"Introduction","text":"

    Draw outline of target game objects.

    "},{"location":"effectlayer-outline/#live-demos","title":"Live demos","text":""},{"location":"effectlayer-outline/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"effectlayer-outline/#install-plugin","title":"Install plugin","text":""},{"location":"effectlayer-outline/#load-minify-file","title":"Load minify file","text":""},{"location":"effectlayer-outline/#import-plugin","title":"Import plugin","text":""},{"location":"effectlayer-outline/#import-class","title":"Import class","text":""},{"location":"effectlayer-outline/#create-instance","title":"Create instance","text":"
    var effectLayer = scene.add.rexOutlineEffectLayer({\n// knockout: false,\n// thickness: 3,\n// outlineColor: 0x000000\n});\n
    "},{"location":"effectlayer-outline/#custom-class","title":"Custom class","text":""},{"location":"effectlayer-outline/#thickness","title":"Thickness","text":""},{"location":"effectlayer-outline/#outline-color","title":"Outline color","text":""},{"location":"effectlayer-outline/#target-game-objects","title":"Target game objects","text":"

    Draw outline of added target game objects.

    "},{"location":"effectlayer-outline/#limitation","title":"Limitation","text":""},{"location":"eightdirection/","title":"8 direction","text":""},{"location":"eightdirection/#introduction","title":"Introduction","text":"

    Move game object by cursor keys, with a constant speed.

    "},{"location":"eightdirection/#live-demos","title":"Live demos","text":""},{"location":"eightdirection/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"eightdirection/#install-plugin","title":"Install plugin","text":""},{"location":"eightdirection/#load-minify-file","title":"Load minify file","text":""},{"location":"eightdirection/#import-plugin","title":"Import plugin","text":""},{"location":"eightdirection/#import-class","title":"Import class","text":""},{"location":"eightdirection/#create-instance","title":"Create instance","text":"
    var eightDirection = scene.plugins.get('rexEightDirection').add(gameObject, {\nspeed: 200,\n// dir: '8dir',     // 0|'up&down'|1|'left&right'|2|'4dir'|3|'8dir'\n// rotateToDirection: false,\n// wrap: false,\n// padding: 0,\n// enable: true,\n// cursorKeys: scene.input.keyboard.createCursorKeys()\n});\n
    "},{"location":"eightdirection/#set-speed","title":"Set speed","text":"
    eightDirection.setSpeed(speed);\n// eightDirection.speed = speed;\n
    "},{"location":"eightdirection/#set-rotate-to-direction","title":"Set rotate-to-direction","text":"
    eightDirection.setRotateToDirection(rotateToDirection);\n
    "},{"location":"eightdirection/#set-direction-mode","title":"Set direction mode","text":"
    eightDirection.setDirMode(dir);\n
    "},{"location":"eightdirection/#set-wrap-mode","title":"Set wrap mode","text":"
    ship.setWrapMode(wrap, padding);\n
    "},{"location":"eventemitter3/","title":"Event emitter","text":""},{"location":"eventemitter3/#introduction","title":"Introduction","text":"

    Event emitter.

    "},{"location":"eventemitter3/#usage","title":"Usage","text":""},{"location":"eventemitter3/#get-event-emitter","title":"Get event emitter","text":""},{"location":"eventemitter3/#attach-listener","title":"Attach listener","text":"
    ee.on(eventName, callback, scope);\nee.once(eventName, callback, scope);  // only fire listeners one time\n

    Alias

    ee.addListener(eventName, callback, scope);\nee.addListener(eventName, callback, scope, true);  // only fire listeners one time\n
    "},{"location":"eventemitter3/#fire-event","title":"Fire event","text":"
    ee.emit(eventName, parameter0, ...);\n
    "},{"location":"eventemitter3/#remove-listeners","title":"Remove listeners","text":""},{"location":"eventemitter3/#get-listeners-count","title":"Get listeners count","text":"
    var count = ee.listenerCount(eventName);\n//var noListener = (ee.listenerCount(eventName) === 0);\n
    "},{"location":"eventemitter3/#get-listeners","title":"Get listeners","text":"
    var listeners = ee.listeners(eventName);\n
    "},{"location":"eventemitter3/#get-event-names","title":"Get event names","text":"
    var names = ee.eventNames();\n
    "},{"location":"eventemitter3/#listener","title":"Listener","text":"
    {\nfn: callback,\ncontext: scope,\nonce: once\n}\n
    "},{"location":"eventemitter3/#custom-event-emitter-class","title":"Custom event emitter class","text":"
    class MyEventEmitter extends Phaser.Events.EventEmitter {\n// construct() {\n//     super();\n// }\n\n// destroy() {\n//     super.destroy();\n// }\n}\n
    "},{"location":"eventpromise/","title":"Event promise","text":""},{"location":"eventpromise/#introduction","title":"Introduction","text":"

    Return a promise of an event.

    "},{"location":"eventpromise/#live-demos","title":"Live demos","text":""},{"location":"eventpromise/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"eventpromise/#install-plugin","title":"Install plugin","text":""},{"location":"eventpromise/#load-minify-file","title":"Load minify file","text":""},{"location":"eventpromise/#import-plugin","title":"Import plugin","text":""},{"location":"eventpromise/#import-class","title":"Import class","text":""},{"location":"eventpromise/#get-event-promise","title":"Get event promise","text":"
    var promoise = scene.plugins.get('rexEventPromise').waitEvent(eventEmitter, eventName)\n.then(function() {\n\n})\n
    "},{"location":"eventpromise/#get-complete-event-promise","title":"Get complete event promise","text":"
    var promoise = scene.plugins.get('rexEventPromise').waitComplete(eventEmitter)\n.then(function() {\n\n})\n
    "},{"location":"expression-parser/","title":"Expression parser","text":""},{"location":"expression-parser/#introduction","title":"Introduction","text":"

    Parse expression string into function. Parser is generated from jison

    "},{"location":"expression-parser/#live-demos","title":"Live demos","text":""},{"location":"expression-parser/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"expression-parser/#install-plugin","title":"Install plugin","text":""},{"location":"expression-parser/#load-minify-file","title":"Load minify file","text":""},{"location":"expression-parser/#import-plugin","title":"Import plugin","text":""},{"location":"expression-parser/#import-class","title":"Import class","text":""},{"location":"expression-parser/#create-instance","title":"Create instance","text":"
    var parser = scene.plugins.get('rexExpressionParserPlugin').add();\n
    "},{"location":"expression-parser/#execute","title":"Execute","text":""},{"location":"expression-parser/#compile-then-execute","title":"Compile then execute","text":"
    1. Compile expression string into function
      var f = parser.compile(expressionString);\n
      or
      var f = scene.plugins.get('rexExpressionParserPlugin').compile(expressionString);\n
    2. Invoke function
      var value = f(context);\n
    "},{"location":"expression-parser/#execute-directly","title":"Execute directly","text":"
    var value = parser.exec(expressionString, context);\n

    or

    var value = parser.exec(f, context);\n
    "},{"location":"expression-parser/#custom-method","title":"Custom method","text":""},{"location":"expression-parser/#proxy-as-context","title":"Proxy as context","text":"

    Proxy with has and get handlers could be a context.

    For example, proxy scene data :

    var context = new Proxy({}, {\nhas(target, key) {\nreturn scene.data.has(key);\n},\nget(target, prop) {\nreturn scene.data.get(prop);\n}\n})\n

    or

    var context = scene.plugins.get('rexExpressionParserPlugin').createProxyContext({\nhas(target, key) {\n// return boolean\n},\nget(target, prop) {\n// return any;\n}\n})\n
    "},{"location":"fadeoutdestroy/","title":"Fade out destroy","text":""},{"location":"fadeoutdestroy/#introduction","title":"Introduction","text":"

    Fade out game object then destroy it.

    "},{"location":"fadeoutdestroy/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"fadeoutdestroy/#install-plugin","title":"Install plugin","text":""},{"location":"fadeoutdestroy/#load-minify-file","title":"Load minify file","text":""},{"location":"fadeoutdestroy/#import-plugin","title":"Import plugin","text":""},{"location":"fadeoutdestroy/#import-method","title":"Import method","text":""},{"location":"fadeoutdestroy/#fade-out-destroy","title":"Fade-out-destroy","text":"
    var fade = scene.plugins.get('rexFade').fadeOutDestroy(gameObject, duration);\n
    "},{"location":"fadeoutdestroy/#events","title":"Events","text":"

    See Events of tween task

    "},{"location":"fadevolume/","title":"Volume fading","text":""},{"location":"fadevolume/#introduction","title":"Introduction","text":"

    Fade-in/fade-out volume of sound.

    "},{"location":"fadevolume/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"fadevolume/#install-plugin","title":"Install plugin","text":""},{"location":"fadevolume/#load-minify-file","title":"Load minify file","text":""},{"location":"fadevolume/#import-plugin","title":"Import plugin","text":""},{"location":"fadevolume/#import-method","title":"Import method","text":""},{"location":"fadevolume/#fade-in","title":"Fade in","text":""},{"location":"fadevolume/#fade-out","title":"Fade out","text":""},{"location":"filechooser/","title":"File chooser","text":""},{"location":"filechooser/#introduction","title":"Introduction","text":"

    Create a transparent file chooser button (<input type=\"file\">).

    "},{"location":"filechooser/#live-demos","title":"Live demos","text":""},{"location":"filechooser/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"filechooser/#install-plugin","title":"Install plugin","text":""},{"location":"filechooser/#load-minify-file","title":"Load minify file","text":""},{"location":"filechooser/#import-plugin","title":"Import plugin","text":""},{"location":"filechooser/#import-class","title":"Import class","text":""},{"location":"filechooser/#add-file-chooser-object","title":"Add file chooser object","text":"
    var fileChooser = scene.add.rexFileChooser({\naccept: '',\nmultiple: false\n});\n// var fileChooser = scene.add.rexFileChooser(x, y, width, height, config);\n
    "},{"location":"filechooser/#custom-class","title":"Custom class","text":""},{"location":"filechooser/#sync","title":"Sync","text":"

    Sync position, size and origin to another game object.

    fileChooser.syncTo(gameObject);\n
    "},{"location":"filechooser/#selected-files","title":"Selected files","text":"
    var files = fileChooser.files;\n
    "},{"location":"filechooser/#set-accept-filter","title":"Set accept filter","text":"
    fileChooser.setAccept(accept);\n
    "},{"location":"filechooser/#multiple-files","title":"Multiple files","text":""},{"location":"filechooser/#events","title":"Events","text":""},{"location":"filechooser/#load-file-to-cache","title":"Load file to cache","text":"
    fileChooser.loadFile(file, loaderType, key);\n// fileChooser.loadFile(file, loaderType, key, cahceType);\n

    or

    fileChooser.loadFilePromise(file, loaderType, key, cahceType)\n.then(function(content) {\n\n})\n
    "},{"location":"filechooser/#create-object-url","title":"Create object URL","text":""},{"location":"filechooser/#open-file-chooser","title":"Open file chooser","text":"

    Failure

    This method can't run at ipad.

    Note

    Open a file chooser dialog under any touch event. i.e. User can't open file chooser dialog directly.

    scene.plugins.get('rexFileChooser').open({\n// accept: '',\n// multiple: false,\n// closeDelay: 200\n})\n.then(function(result) {\n// var files = result.files;\n})\n
    "},{"location":"filechooser/#other-properties","title":"Other properties","text":"

    See dom game object, game object

    "},{"location":"filechooser/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"

    See dom-element's Interactive with other game objects

    "},{"location":"filedropzone/","title":"File drop zone","text":""},{"location":"filedropzone/#introduction","title":"Introduction","text":"

    Create a div element for dropping file(s).

    "},{"location":"filedropzone/#live-demos","title":"Live demos","text":""},{"location":"filedropzone/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"filedropzone/#install-plugin","title":"Install plugin","text":""},{"location":"filedropzone/#load-minify-file","title":"Load minify file","text":""},{"location":"filedropzone/#import-plugin","title":"Import plugin","text":""},{"location":"filedropzone/#import-class","title":"Import class","text":""},{"location":"filedropzone/#add-file-drop-zone-object","title":"Add file-drop-zone object","text":"
    var fileDropZone = scene.add.rexFileDropZone({\n// style: { },\n\n// dropEnable: true,\n// filters: { filterType: (file, files) => boolean }\n});\n// var fileDropZone = scene.add.rexFileDropZone(x, y, width, height, config);\n
    "},{"location":"filedropzone/#custom-class","title":"Custom class","text":""},{"location":"filedropzone/#sync","title":"Sync","text":"

    Sync position, size and origin to another game object.

    fileDropZone.syncTo(gameObject);\n
    "},{"location":"filedropzone/#dropped-files","title":"Dropped files","text":"
    var files = fileDropZone.files;\n
    "},{"location":"filedropzone/#events","title":"Events","text":"

    Warning

    Game objects under this file drop zone can't receive touch input events.

    "},{"location":"filedropzone/#enable-drop-events","title":"Enable drop events","text":""},{"location":"filedropzone/#load-file-to-cache","title":"Load file to cache","text":"
    fileDropZone.loadFile(file, loaderType, key);\n// fileDropZone.loadFile(file, loaderType, key, cahceType, onComplete);\n

    or

    fileDropZone.loadFilePromise(file, loaderType, key, cahceType)\n.then(function(content) {\n\n})\n
    "},{"location":"filedropzone/#create-object-url","title":"Create object URL","text":""},{"location":"filedropzone/#other-properties","title":"Other properties","text":"

    See dom game object, game object

    "},{"location":"filedropzone/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"

    See dom-element's Interactive with other game objects

    "},{"location":"firebase-auth/","title":"Authentication","text":""},{"location":"firebase-auth/#introduction","title":"Introduction","text":"

    It supports authentication using passwords, phone numbers, popular federated identity providers like Google, Facebook and Twitter, and more.

    "},{"location":"firebase-auth/#usage","title":"Usage","text":"

    Official document

    Sample code

    "},{"location":"firebase-auth/#setup","title":"Setup","text":"
    1. Import firestore
      import firebase from 'firebase/app';\nimport 'firebase/auth';\n
      Firebase has been included in package.json.
    2. Initialize
      var firebaseApp = firebase.initializeApp({\napiKey: '...',\nauthDomain: '...',\ndatabaseURL: '...',\nprojectId: '...',\nstorageBucket: '...',\nmessagingSenderId: '...'\n});\n
    "},{"location":"firebase-auth/#on-sign-insign-out","title":"On sign-in/sign-out","text":"
    firebaseApp.auth().onAuthStateChanged(function (user) {\nif (user) {\n// User is signed in.\nvar displayName = user.displayName;\nvar email = user.email;\nvar emailVerified = user.emailVerified;\nvar photoURL = user.photoURL;\nvar isAnonymous = user.isAnonymous;\nvar uid = user.uid;\nvar providerData = user.providerData;\n// ...\n} else {\n// User is signed out.\n// ...\n}\n});\n
    "},{"location":"firebase-auth/#sign-in-with-facebook","title":"Sign-in with facebook","text":"
    var provider = new firebase.auth.FacebookAuthProvider();\nfirebaseApp.auth().signInWithPopup(provider).then(function (result) {\n// This gives you a Facebook Access Token. You can use it to access the Facebook API.\nvar token = result.credential.accessToken;\n// The signed-in user info.\nvar user = result.user;\n// ...\n}).catch(function (error) {\n// Handle Errors here.\nvar errorCode = error.code;\nvar errorMessage = error.message;\n// The email of the user's account used.\nvar email = error.email;\n// The firebase.auth.AuthCredential type that was used.\nvar credential = error.credential;\n// ...\n});\n
    "},{"location":"firebase-auth/#sign-in-with-google","title":"Sign-in with Google","text":"
    var provider = new firebase.auth.GoogleAuthProvider();\nfirebaseApp.auth().signInWithPopup(provider).then(function (result) {\n// This gives you a Google Access Token. You can use it to access the Google API.\nvar token = result.credential.accessToken;\n// The signed-in user info.\nvar user = result.user;\n// ...\nconsole.log(user);\n}).catch(function (error) {\n// Handle Errors here.\nvar errorCode = error.code;\nvar errorMessage = error.message;\n// The email of the user's account used.\nvar email = error.email;\n// The firebase.auth.AuthCredential type that was used.\nvar credential = error.credential;\n// ...\n});\n
    "},{"location":"firebase-auth/#sign-in-with-password","title":"Sign-in with password","text":""},{"location":"firebase-auth/#sign-out","title":"Sign-out","text":"
    firebaseApp.auth().signOut();\n
    "},{"location":"firebase-auth/#current-sign-in-user","title":"Current sign-in user","text":"
    var user = firebaseApp.auth().currentUser;\nif (user != null) {\nvar name = user.displayName;\nvar email = user.email;\nvar photoUrl = user.photoURL;\nvar emailVerified = user.emailVerified;\nvar uid = user.uid;\n}\n
    "},{"location":"firebase-auth/#update-email","title":"Update email","text":"
    user.updateEmail('...').then(function() {\n// Update successful.\n}).catch(function(error) {\n// An error happened.\n});\n
    "},{"location":"firebase-auth/#update-profile","title":"Update profile","text":"
    user.updateProfile({\ndisplayName: '...',\nphotoURL: '...'\n}).then(function() {\n// Update successful.\n}).catch(function(error) {\n// An error happened.\n});\n
    "},{"location":"firebase-auth/#send-a-verification-email","title":"Send a verification email","text":"
    user.sendEmailVerification().then(function() {\n// Email sent.\n}).catch(function(error) {\n// An error happened.\n});\n
    "},{"location":"firebase-broadcast/","title":"Broadcast","text":""},{"location":"firebase-broadcast/#introduction","title":"Introduction","text":"

    Broadcast real-time messages, using firebase-database.

    "},{"location":"firebase-broadcast/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-broadcast/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-broadcast/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-broadcast/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-broadcast/#import-class","title":"Import class","text":""},{"location":"firebase-broadcast/#create-instance","title":"Create instance","text":"
    var messager = scene.plugins.get('rexFirebase').add.broadcast({\nroot: '',\n// senderID: '',\n// senderName: '',\n// receiverID: '',\n// history: 0\n});\n
    "},{"location":"firebase-broadcast/#send-message","title":"Send message","text":"
    1. Set sender in config, or setSender method.
      messager.setSender(userID, userName);\n
      or
      messager.setSender({\nuserID: userID,\nuserName: userName\n});\n
    2. Set receiver in config, or setReceiver method.
      messager.setReceiver(receiverID);\n
    3. Send message to receiverID.
      messager.send(message)\n// .then(function() { })\n// .catch(function() { })\n
    "},{"location":"firebase-broadcast/#receive-messages","title":"Receive messages","text":"
    1. Register receive event
      messager.on('receive', function(data){\n// var senderID = data.senderID;\n// var senderName = data.senderName;\n// var message = data.message;\n})\n
    2. Set receiver in config, or setReceiver method
      messager.setReceiver(receiverID);\n
    3. Start receiving
      messager.startReceiving();\n
    4. Stop receive
      messager.stopReceiving();\n

    Only receive messages after invoking startReceiving method. Previous messages won't be got anymore.

    "},{"location":"firebase-broadcast/#received-messages","title":"Received messages","text":"

    Received messages will be saved in client side.

    "},{"location":"firebase-files/","title":"Files","text":""},{"location":"firebase-files/#introduction","title":"Introduction","text":"

    Save JSON data, using firebase-firestore.

    Each owner has several files, each file contains header and content indexed by fileID.

    "},{"location":"firebase-files/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-files/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-files/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-files/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-files/#import-class","title":"Import class","text":""},{"location":"firebase-files/#create-instance","title":"Create instance","text":"
    var fileManager = scene.plugins.get('rexFirebase').add.files({\nroot: ''\n});\n
    "},{"location":"firebase-files/#save-file","title":"Save file","text":"
    1. Set file owner.
      fileManager.setOwner(userID);\n
      or
      fileManager.setOwner({\nuserID: userID\n});\n
    2. Save header and content data.
    "},{"location":"firebase-files/#load-headers","title":"Load headers","text":"
    1. Set file owner.
      fileManager.setOwner(userID);\n
    2. Load all headers of this file owner.
      fileManager.loadHeaders()\n.then(function(result) { // var headers = result.headers;\n// var userID = result.userID;\n})\n.catch(function(result) {\n// var error = result.error;\n// var userID = result.userID;\n})\n
    "},{"location":"firebase-files/#load-file","title":"Load file","text":"
    1. Set file owner.
      fileManager.setOwner(userID);\n
    2. Load file.
      fileManager.load(fileID)\n.then(function(result) { // var header = result.header;\n// var content = result.content;\n// var fileID = result.fileID;\n// var userID = result.userID;\n})\n.catch(function(result) {\n// var error = result.error;\n// var fileID = result.fileID;\n// var userID = result.userID;\n})\n
    "},{"location":"firebase-firestore/","title":"Firestore","text":""},{"location":"firebase-firestore/#introduction","title":"Introduction","text":"

    Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud Platform.

    "},{"location":"firebase-firestore/#usage","title":"Usage","text":"

    Official document

    Sample code

    "},{"location":"firebase-firestore/#setup","title":"Setup","text":"
    1. Import firestore
      import firebase from 'firebase/app';\nimport 'firebase/firestore';\n
      Firebase has been included in package.json.
    2. Initialize
      var firebaseApp = firebase.initializeApp({\napiKey: '...',\nauthDomain: '...',\ndatabaseURL: '...',\nprojectId: '...',\nstorageBucket: '...',\nmessagingSenderId: '...'\n});\nvar db = firebaseApp.firestore();\ndb.settings({\ntimestampsInSnapshots: true\n})\n
    "},{"location":"firebase-firestore/#references","title":"References","text":""},{"location":"firebase-firestore/#save","title":"Save","text":"

    Limitation: Writes and transactions section

    "},{"location":"firebase-firestore/#server-timestamp","title":"Server timestamp","text":"
    firebase.firestore.FieldValue.serverTimestamp()\n
    "},{"location":"firebase-firestore/#load","title":"Load","text":""},{"location":"firebase-firestore/#paginate","title":"Paginate","text":""},{"location":"firebase-firestore/#get-realtime-updates","title":"Get realtime updates","text":""},{"location":"firebase-firestore/#indexing","title":"Indexing","text":"

    Reference

    "},{"location":"firebase-idalias/","title":"ID-alias","text":""},{"location":"firebase-idalias/#introduction","title":"Introduction","text":"

    Map an unique ID to another unique ID (alias), using firebase-firestore.

    Each owner has several files, each file contains header and content indexed by fileID.

    "},{"location":"firebase-idalias/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-idalias/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-idalias/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-idalias/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-idalias/#import-class","title":"Import class","text":""},{"location":"firebase-idalias/#create-instance","title":"Create instance","text":"
    var idAlias = scene.plugins.get('rexFirebase').add.idAlias({\nroot: ''\n});\n
    "},{"location":"firebase-idalias/#random-alias","title":"Random alias","text":"

    Get alias of an id, or register an alias from a random word.

    idAlias.getRandomAlias(id, {\ndigits: 10,\ncandidates: '0123456789',\nretry: 1000\n})\n.then(function(result) { // var alias = result.alias;\n// var id = result.id;\n})\n.catch(function(error) { })\n
    "},{"location":"firebase-idalias/#specific-alias","title":"Specific alias","text":""},{"location":"firebase-itemtable/","title":"Item table","text":""},{"location":"firebase-itemtable/#introduction","title":"Introduction","text":"

    1d/2d/3d table, using firebase-database.

    "},{"location":"firebase-itemtable/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-itemtable/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-itemtable/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-itemtable/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-itemtable/#import-class","title":"Import class","text":""},{"location":"firebase-itemtable/#create-instance","title":"Create instance","text":"
    var table = scene.plugins.get('rexFirebase').add.itemTable({\nroot: '',\ntype: 3\n});\n
    "},{"location":"firebase-itemtable/#write","title":"Write","text":""},{"location":"firebase-itemtable/#read","title":"Read","text":""},{"location":"firebase-itemtable/#events","title":"Events","text":""},{"location":"firebase-itemtable/#1d-table","title":"1d table","text":"

    1d table, indexing by (key0)

    "},{"location":"firebase-itemtable/#2d-table","title":"2d table","text":"

    2d table, indexing by (key0, key1)

    "},{"location":"firebase-itemtable/#3d-table","title":"3d table","text":"

    3d table, indexing by (key0, key1, key2)

    "},{"location":"firebase-leaderboard/","title":"Leaderboard","text":""},{"location":"firebase-leaderboard/#introduction","title":"Introduction","text":"

    Descending sort scores, using firebase-firestore.

    "},{"location":"firebase-leaderboard/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-leaderboard/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-leaderboard/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-leaderboard/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-leaderboard/#import-class","title":"Import class","text":""},{"location":"firebase-leaderboard/#create-instance","title":"Create instance","text":"
    var leaderBoard = scene.plugins.get('rexFirebase').add.leaderBoard({\nroot: '',\n// timeFilters: false,\n// timeFilterType: 'year',\n// pageItemCount: 100,\n// userID: '',\n// userName: '',\n// boardID: undefined,\n// tag: undefined\n});\n

    Time filter enabled

    Add indexes if time filter is enabled. - tagD(ascending), scoreD(descending), boardID(ascending), tag(ascending) - tagW(ascending), scoreW(descending), boardID(ascending), tag(ascending) - tagM(ascending), scoreM(descending), boardID(ascending), tag(ascending) - tagY(ascending), scoreY(descending), boardID(ascending), tag(ascending) - tagA(ascending), scoreA(descending), boardID(ascending), tag(ascending)

    "},{"location":"firebase-leaderboard/#post-score","title":"Post score","text":"
    1. Set user.
      leaderBoard.setUser(userID, userName);\n
      or
      leaderBoard.setUser({\nuserID: userID,\nuserName: userName\n});\n
    2. Set board property, optional.
    3. Post score
      leaderBoard.post(score)\n// leaderBoard.post(score, extraData)\n// leaderBoard.post(score, extraData, timestamp)\n.then(function(record) { })\n.catch(function(error) { })\n
    "},{"location":"firebase-leaderboard/#get-my-score","title":"Get my score","text":"
    leaderBoard.getScore()\n// leaderBoard.getScore(userID)\n.then(function(score) { })\n.catch(function(error) { })\n
    "},{"location":"firebase-leaderboard/#get-my-rank","title":"Get my rank","text":"
    leaderBoard.getRank()\n// leaderBoard.getRank(userID)\n.then(function(rank) { })\n.catch(function(error) { })\n
    "},{"location":"firebase-leaderboard/#get-scores","title":"Get scores","text":"
    1. Set board property, optional.
    2. Set time filter, optional.
      leaderBoard.setTimeFilterType(type);\n
    3. Load scores page by page.
    "},{"location":"firebase-leaderboard/#page-index","title":"Page index","text":""},{"location":"firebase-leaderboard/#delete","title":"Delete","text":""},{"location":"firebase-messages/","title":"Messages","text":""},{"location":"firebase-messages/#introduction","title":"Introduction","text":"

    Store messages in firebase-firestore.

    "},{"location":"firebase-messages/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-messages/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-messages/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-messages/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-messages/#import-class","title":"Import class","text":""},{"location":"firebase-messages/#create-instance","title":"Create instance","text":"
    var messages = scene.plugins.get('rexFirebase').add.messages({\nroot: '',\n// pageItemCount: 100,\n\n// senderID: '',\n// senderName: '',\n// receiverID: undefined,\n});\n
    "},{"location":"firebase-messages/#send-message","title":"Send message","text":"
    1. Set sender.
      messages.setSender(userID, userName);\n
      or
      messages.setSender({\nuserID: userID,\nuserName: userName\n});\n
    2. Set receiver, optional.
      messages.setReceiver(userID);\n
    3. Send message
      messages.send(message)    .then(function() { })\n.catch(function(error) { })\n
    "},{"location":"firebase-messages/#receive-messages","title":"Receive messages","text":"
    1. Set receiverID, optional.
      messages.setReceiver(userID)\n
    2. Load previous messages, optional.
      messages.loadPreviousMessages()\n.then(function(messageObjs) { })\n.catch(function(error) { })    
    3. Add 'receiver' event.
      messages.on('receive', function(messageObj) {\n// var senderID = messageObj.senderID;\n// var senderName = messageObj.senderName;\n// var receiverID = messageObj.receiverID;\n// var message = messageObj.message;\n// var timestamp = messageObj.timestamp;\n})\n
    4. Start receiving
      messages.startReceiving();\n
    5. Stop receiving
      messages.stopReceiving();\n

    Received messages will be stored in messages.cacheMessages

    "},{"location":"firebase-onlineuserlist/","title":"Online user list","text":""},{"location":"firebase-onlineuserlist/#introduction","title":"Introduction","text":"

    Online user list, using firebase-database.

    "},{"location":"firebase-onlineuserlist/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-onlineuserlist/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-onlineuserlist/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-onlineuserlist/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-onlineuserlist/#import-class","title":"Import class","text":""},{"location":"firebase-onlineuserlist/#create-instance","title":"Create instance","text":"
    var userList = scene.plugins.get('rexFirebase').add.onlineUserList({\nroot: '',\n// maxUsers: 0,\n\n// userID: '',\n// userName: '',\n});\n
    "},{"location":"firebase-onlineuserlist/#join","title":"Join","text":"
    1. Set userID and user name.
      userList.setUser(userID, userName);\n
      or
      userList.setUser({\nuserID: userID,\nuserName: userName\n});\n
    2. Join list.
      userList.join()\n// .then(function() { })\n// .catch(function() { })\n
    "},{"location":"firebase-onlineuserlist/#leave","title":"Leave","text":"
    userList.leave()\n// .then(function() { })\n// .catch(function() { })\n
    "},{"location":"firebase-onlineuserlist/#kick-user","title":"Kick user","text":"
    userList.leave(userID)\n// .then(function() { })\n// .catch(function() { })\n
    "},{"location":"firebase-onlineuserlist/#change-user-name","title":"Change user name","text":"
    userList.changeUserName(newUserName)\n// .then(function() { })\n// .catch(function() { })\n
    "},{"location":"firebase-onlineuserlist/#user-list","title":"User list","text":""},{"location":"firebase-onlineuserlist/#events","title":"Events","text":""},{"location":"firebase-overview/","title":"Firebase overview","text":""},{"location":"firebase-overview/#introduction","title":"Introduction","text":""},{"location":"firebase-overview/#usage","title":"Usage","text":""},{"location":"firebase-overview/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-overview/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-overview/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-singleroom/","title":"Single room","text":""},{"location":"firebase-singleroom/#introduction","title":"Introduction","text":"

    Chat room, using firebase-database.

    "},{"location":"firebase-singleroom/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"firebase-singleroom/#install-plugin","title":"Install plugin","text":""},{"location":"firebase-singleroom/#load-minify-file","title":"Load minify file","text":""},{"location":"firebase-singleroom/#import-plugin","title":"Import plugin","text":""},{"location":"firebase-singleroom/#import-class","title":"Import class","text":""},{"location":"firebase-singleroom/#create-instance","title":"Create instance","text":"
    var room = scene.plugins.get('rexFirebase').add.singleRoom({\nroot: '',\n// maxUsers: 0,\n// userID: '',\n// userName: '',\n// broadcast: true,\n// tables: undefined,\n\n});\n
    "},{"location":"firebase-singleroom/#join-room","title":"Join room","text":"
    1. Set userID and user name.
      room.setUser(userID, userName);\n
    2. Join room.
      room.joinRoom();\n
    "},{"location":"firebase-singleroom/#leave-room","title":"Leave room","text":"
    room.leaveRoom();\n
    "},{"location":"firebase-singleroom/#kick-user","title":"Kick user","text":"
    room.kickUser(userID);\n
    "},{"location":"firebase-singleroom/#user-list","title":"User list","text":""},{"location":"firebase-singleroom/#send-message","title":"Send message","text":"
    room.broadcast.send(message);\n
    "},{"location":"firebase-singleroom/#receive-messages","title":"Receive messages","text":"
    1. Register receive event
      room.on('broadcast.receive', function(data){\n// var senderID = data.senderID;\n// var senderName = data.senderName;\n// var message = data.message;\n})\n

    Only receive messages after joined room. Previous messages won't be got anymore.

    "},{"location":"firebase-singleroom/#received-messages","title":"Received messages","text":"

    Received messages will be saved in client side.

    "},{"location":"firebase-singleroom/#change-user-name","title":"Change user name","text":"
    room.changeUserName(newUserName);\n
    "},{"location":"firebase-singleroom/#tables","title":"Tables","text":""},{"location":"firebase-singleroom/#write","title":"Write","text":"

    See here

    "},{"location":"firebase-singleroom/#read","title":"Read","text":"

    See here

    "},{"location":"firebase-singleroom/#events","title":"Events","text":""},{"location":"firebase-singleroom/#user-list-events","title":"User list events","text":""},{"location":"firebase-singleroom/#broadcast-events","title":"Broadcast events","text":""},{"location":"firebase-singleroom/#table-events","title":"Table events","text":"

    Event names of each table indexed by key

    "},{"location":"firebase-storage/","title":"Storage","text":""},{"location":"firebase-storage/#introduction","title":"Introduction","text":"

    It supports authentication using passwords, phone numbers, popular federated identity providers like Google, Facebook and Twitter, and more.

    "},{"location":"firebase-storage/#usage","title":"Usage","text":"

    Official document

    Sample code

    "},{"location":"firebase-storage/#setup","title":"Setup","text":"
    1. Import firestore
      import firebase from 'firebase/app';\nimport 'firebase/storage';\n
      Firebase has been included in package.json.
    2. Initialize
      var firebaseApp = firebase.initializeApp({\napiKey: '...',\nauthDomain: '...',\ndatabaseURL: '...',\nprojectId: '...',\nstorageBucket: '...',\nmessagingSenderId: '...'\n});\nvar storageRef = firebaseApp.storage().ref();\n
    "},{"location":"firebase-storage/#upload-string","title":"Upload string","text":""},{"location":"firebase-storage/#upload-image","title":"Upload image","text":"
    1. Get image from image texture
      var image = scene.textures.get(key).getSourceImage();\n
    2. Copy image to canvas
      var canvas = CanvasPool.create(scene, image.width, image.height);\nvar ctx = canvas.getContext('2d');\nctx.drawImage(image, 0, 0, image.width, image.height);\n
    3. Get blob from canvas, then upload this blob.
      var uploadTask;\ncanvasToBlob(canvas)\n.then(function(blob) {\nvar metadata = {\ncontentType: 'image/jpeg',\n};        var fileRef = storageRef.child('path/to/filename');\nuploadTask = fileRef.put(blob, metadata);\nreturn uploadTask;\n})\n.then(function (snapshot) {})\n.catch(function (error) {});\n
      Reference: canvasToBlob
    4. Free canvas
      CanvasPool.remove(canvas);\n
    "},{"location":"firebase-storage/#upload-task","title":"Upload task","text":""},{"location":"firebase-storage/#download-file","title":"Download file","text":"
    1. Get download url
      var fileRef = storageRef.child('path/to/filename');\nfileRef.getDownloadURL()\n.then(function(url) {})\n.catch(function (error) {});\n
    2. Download file by loader
    "},{"location":"firebase-storage/#delete-file","title":"Delete file","text":"
    var fileRef = storageRef.child('path/to/filename');\nfileRef.delete()\n.then(function() {})\n.catch(function(error) {});\n
    "},{"location":"flash/","title":"Flash","text":""},{"location":"flash/#introduction","title":"Introduction","text":"

    Flashing (set invisible then visible) game object.

    "},{"location":"flash/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"flash/#install-plugin","title":"Install plugin","text":""},{"location":"flash/#load-minify-file","title":"Load minify file","text":""},{"location":"flash/#import-plugin","title":"Import plugin","text":""},{"location":"flash/#import-class","title":"Import class","text":""},{"location":"flash/#create-instance","title":"Create instance","text":"
    var flash = scene.plugins.get('rexFlash').add(gameObject, {\n// duration: 500,\n// repeat: 2\n});\n
    "},{"location":"flash/#start-flashing","title":"Start flashing","text":"
    flash.flash();\n// flash.flash(duration, repeat);\n

    or

    flash.flash({\nduration: 500,\nrepeat: 2\n});\n
    "},{"location":"flash/#stop-flashing","title":"Stop flashing","text":"
    flash.stop();\n
    "},{"location":"flash/#enable","title":"Enable","text":""},{"location":"flash/#set-duration","title":"Set duration","text":"
    flash.setDuration(duration);\n// flash.duration = duration;\n
    "},{"location":"flash/#set-repeat","title":"Set repeat","text":"
    flash.setRepeat(repeat);\n// flash.repeat = repeat;\n
    "},{"location":"flash/#events","title":"Events","text":""},{"location":"flash/#status","title":"Status","text":""},{"location":"flip/","title":"Flip","text":""},{"location":"flip/#introduction","title":"Introduction","text":"

    Flipping game object to another face by scaling width/height.

    "},{"location":"flip/#live-demos","title":"Live demos","text":""},{"location":"flip/#usage","title":"Usage","text":"

    Sample code, Sample code-2

    "},{"location":"flip/#install-plugin","title":"Install plugin","text":""},{"location":"flip/#load-minify-file","title":"Load minify file","text":""},{"location":"flip/#import-plugin","title":"Import plugin","text":""},{"location":"flip/#import-class","title":"Import class","text":""},{"location":"flip/#create-instance","title":"Create instance","text":"
    var flip = scene.plugins.get('rexFlip').add(gameObject, {\nface: 'back',\nfront: { key, frame }, // key, or callback\nback: { key, frame },  // key, or callback\n\n// orientation: 0, // 0|'x'|1|'y'\n// duration: 500,\n// delay: 0,\n// ease: 'Sine',\n});\n
    "},{"location":"flip/#start-flipping","title":"Start flipping","text":"
    flip.flip();\n// flip.flip(duration);\n
    "},{"location":"flip/#stop-flipping","title":"Stop flipping","text":"
    flip.stop();\n
    "},{"location":"flip/#set-duration","title":"Set duration","text":"
    flip.setDuration(duration);\n// flip.duration = duration;\n
    "},{"location":"flip/#set-ease","title":"Set ease","text":"
    flip.setEase(ease);\n// flip.ease = ease;\n
    "},{"location":"flip/#faces","title":"Faces","text":""},{"location":"flip/#current-face","title":"Current face","text":""},{"location":"flip/#set-texture-of-face","title":"Set texture of face","text":""},{"location":"flip/#events","title":"Events","text":""},{"location":"flip/#status","title":"Status","text":""},{"location":"format/","title":"Format","text":""},{"location":"format/#introduction","title":"Introduction","text":"

    Format string with variables, built-in method of phaser.

    "},{"location":"format/#usage","title":"Usage","text":"

    Replace %x from an array. x starts from 1.

    // const Format = Phaser.Utils.String.Format;\nvar template = 'hello, %1';\nvar view = ['rex'];\nvar result = Format(template, view);\n
    "},{"location":"fsm/","title":"FSM","text":""},{"location":"fsm/#introduction","title":"Introduction","text":"

    Finite state machine.

    "},{"location":"fsm/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"fsm/#install-plugin","title":"Install plugin","text":""},{"location":"fsm/#load-minify-file","title":"Load minify file","text":""},{"location":"fsm/#import-plugin","title":"Import plugin","text":""},{"location":"fsm/#import-class","title":"Import class","text":""},{"location":"fsm/#create-instance","title":"Create instance","text":""},{"location":"fsm/#create-by-config","title":"Create by config","text":"
    var states = scene.plugins.get('rexFSM').add({\nstart: 'A',   // default: undefined\nstates: {\nA: {\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {},\nupdate: function(time, delta) {},\npreupdate: function(time, delta) {},\npostupdate: function(time, delta) {},\n},\n// ...\n},\ninit: function() {},\nextend: {\ni: 0,\nname: 'abc'\n// ...\n},\nenable: true,\nscene: undefined,\neventEmitter: undefined\n});\n
    "},{"location":"fsm/#inheritance","title":"Inheritance","text":"
    1. Create new class
      class State extends FSM {\nconstructor() {\nsuper();\n}\n\nnext_A() { return 'B' }\n\nenter_A() { /* ... */ }\n\nexit_A() { /* ... */ }\n}\n
      Members: - next_ + stateName: Callback to get next state. - enter_ + stateName: Callback when enter state. - exit_ + stateName: Callback when exit state.
    2. Create instance
      var states = new State();\n
    "},{"location":"fsm/#read-state","title":"Read state","text":""},{"location":"fsm/#start-at-state","title":"Start at state","text":"
    states.start(newState);\n

    Note

    Set new state without triggering any state-changing callbacks or events.

    "},{"location":"fsm/#next-state","title":"Next state","text":"
    graph TB\n\nnext[\"states.next()\"] --> next_A[\"states.next_A()<br>return 'B'\"]\n\nnext_A --> eventStateChange[\"states.emit('statechange', states)<br>states.prevState -> states.state\"]\n\nsubgraph State changing\n\neventStateChange --> exit_A[\"states.exit_A()\"]\nexit_A --> eventExitA[\"states.emit('exit_A', states)\"]\n\neventExitA --> enter_B[\"states.enter_B()\"]\nenter_B --> eventEnterB[\"states.emit('enter_B', states)\"]\n\nsubgraph Exit\nexit_A\neventExitA\nend\n\nsubgraph Enter\nenter_B\neventEnterB\nend\n\nend\n\ngoto[\"states.goto('B')\"] --> eventStateChange\n\nsubgraph Request\n\nsubgraph Next\nnext\nnext_A\nend\n\nsubgraph Goto\ngoto\nend\n\nend
    "},{"location":"fsm/#request","title":"Request","text":""},{"location":"fsm/#state-changing","title":"State-changing","text":"

    These callbacks or events will be triggered if state is changing.

    For example, state is changing from 'A' to 'B'.

    1. event statechange
      states.on('statechange', function(states) {\nconsole.log( states.prevState + '->' + states.state );\n});\n
    2. callback states.exit_A
    3. event exit_A
      states.on('exit_A', function(states) {\n/*...*/\n});\n
    4. callback states.enter_B
    5. event enter_B
      states.on('enter_B', function(states) {\n/*...*/\n});\n
    "},{"location":"fsm/#enable","title":"Enable","text":"
    states.setEnable();\n// states.setEnable(false); // disable\n

    or

    states.toggleEnable();\n

    states.next() and states.goto() will be ignored if disabled.

    "},{"location":"fsm/#update","title":"Update","text":""},{"location":"fsm/#add-new-state","title":"Add new state","text":"

    states.addState(name, {\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {},\nupdate: function(time, delta) {},\npreupdate: function(time, delta) {},\npostupdate: function(time, delta) {},\n})\n
    states.addState({\nname: 'A',\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {},\nupdate: function(time, delta) {},\npreupdate: function(time, delta) {},\npostupdate: function(time, delta) {},\n})\n

    or

    states.addStates({\n'A' : {\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {},\nupdate: function(time, delta) {},\npreupdate: function(time, delta) {},\npostupdate: function(time, delta) {},\n},\n// ...\n})\n
    states.addStates([\n{\nname: 'A',\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {},\nupdate: function(time, delta) {},\npreupdate: function(time, delta) {},\npostupdate: function(time, delta) {},\n},\n// ...\n]);\n

    "},{"location":"fullscreen/","title":"Full screen","text":""},{"location":"fullscreen/#introduction","title":"Introduction","text":"

    Enable or disable full screen mode, built-in method of phaser.

    "},{"location":"fullscreen/#usage","title":"Usage","text":""},{"location":"fullscreen/#enabledisable","title":"Enable/disable","text":"

    Under any input event (touch or keyboard)

    gameObject.setInteractive().on('pointerdown', function() {\nif (scene.scale.isFullscreen) {\nscene.scale.stopFullscreen();\n// On stop fulll screen\n} else {\nscene.scale.startFullscreen();\n// On start fulll screen\n}\n});\n

    Fire one of these events

    "},{"location":"fullscreen/#toggle","title":"Toggle","text":"

    Under any input event (touch or keyboard)

    gameObject.setInteractive().on('pointerdown', function() {\nscene.scale.toggleFullscreen();\nif (scene.scale.isFullscreen) {\n// On start fulll screen\n} else {\n// On stop fulll screen\n}\n});\n
    "},{"location":"fullscreen/#state","title":"State","text":""},{"location":"fullscreen/#events","title":"Events","text":""},{"location":"fullscreen/#with-dom-game-object","title":"With DOM game object","text":"

    Set gameConfig.fullscreenTarget to parent id.

    var config = {\nparent: parentDivID,\nfullscreenTarget: parentDivID\n};\n\nvar game = new Phaser.Game(config);\n
    "},{"location":"fuzzy/","title":"Fuzzy","text":""},{"location":"fuzzy/#introduction","title":"Introduction","text":"

    A wrap of fuzzy logic (MIT license).

    "},{"location":"fuzzy/#live-demos","title":"Live demos","text":""},{"location":"fuzzy/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"fuzzy/#install-plugin","title":"Install plugin","text":""},{"location":"fuzzy/#load-minify-file","title":"Load minify file","text":""},{"location":"fuzzy/#import-plugin","title":"Import plugin","text":""},{"location":"fuzzy/#import-class","title":"Import class","text":""},{"location":"fuzzy/#create-instance","title":"Create instance","text":"
    var fuzzyModule = scene.plugins.get('rexFuzzy').add(`\n// Declare fuzzy sets\nFuzzySetName : left, middle, right, setType\nFuzzySetName : left, middle, right\nFuzzySetName : left, right\n\n// Declare rules\nFuzzySetNameA => FuzzySetNameT\nFuzzySetNameA and FuzzySetNameB => FuzzySetNameT\nFuzzySetNameA or FuzzySetNameB => FuzzySetNameT\nFuzzySetNameA or (FuzzySetNameA and FuzzySetNameB) => FuzzySetNameT\n\n// More comment lines...\n`);\n
    "},{"location":"fuzzy/#set-input","title":"Set input","text":"
    fuzzyModule.fuzzify(variableName, value);\n

    or

    fuzzyModule.fuzzify({\nvarName: value,\n});\n
    "},{"location":"fuzzy/#get-result","title":"Get result","text":"
    var result = fuzzyModule.defuzzify(variableName);\n

    or

    var result = fuzzyModule.defuzzify([varName0, varName1, ...]);\n

    or

    var result = fuzzyModule.defuzzify();\n
    "},{"location":"game/","title":"Game","text":""},{"location":"game/#boot","title":"Boot","text":"
    var config = {\ntype: Phaser.AUTO,\nparent: null,\nwidth: 1024,\nheight: 768,\nscale: {\nmode: Phaser.Scale.FIT,\nautoCenter: Phaser.Scale.CENTER_BOTH\n},\n\nscene: null\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"game/#configuration","title":"Configuration","text":"

    Reference

    {\ntype: Phaser.AUTO,\nparent: 'phaser-example',\nwidth: 800,\nheight: 600,\nscale: {\nmode: Phaser.Scale.FIT,\nautoCenter: Phaser.Scale.CENTER_BOTH\n},\ndom: {\ncreateContainer: false,\n},\nscene: null,\nbackgroundColor: 0x333333\n}\n

    or

    {\ntype: Phaser.AUTO,\nparent: null,\nwidth: 800,\nheight: 600,\nscale: {\nmode: Phaser.Scale.NONE,\nautoCenter: Phaser.Scale.NO_CENTER\n},\nautoRound: false,\ncanvas: null,\ncanvasStyle: null,\n\nscene: null,\n\ncallbacks: {\npreBoot: NOOP,\npostBoot: NOOP\n},\n\nseed: [ (Date.now() * Math.random()).toString() ],\n\ntitle: '',\nurl: 'https://phaser.io',\nversion: '',\n\ninput: {\nkeyboard: {\ntarget: window\n},\nmouse: {\ntarget: null,\ncapture: true\n},\nactivePointers: 1,\ntouch: {\ntarget: null,\ncapture: true\n},\nsmoothFactor: 0,\ngamepad: false,\nwindowEvents: true,\n},\ndisableContextMenu: false,\n\nbackgroundColor: 0,\n\nrender: {\nantialias: true,\nantialiasGL: true,\ndesynchronized: false,\npixelArt: false,\nroundPixels: false,\ntransparent: false,\nclearBeforeRender: true,\npreserveDrawingBuffer: false,\npremultipliedAlpha: true,\nfailIfMajorPerformanceCaveat: false,\npowerPreference: 'default', // 'high-performance', 'low-power' or 'default'\nbatchSize: 4096,\nmaxLights: 10,\nmaxTextures: -1,\nmipmapFilter: 'LINEAR', // 'NEAREST', 'LINEAR', 'NEAREST_MIPMAP_NEAREST', 'LINEAR_MIPMAP_NEAREST', 'NEAREST_MIPMAP_LINEAR', 'LINEAR_MIPMAP_LINEAR'\nautoMobilePipeline: true,\ndefaultPipeline: 'MultiPipeline',\npipeline:[]\n},\n\nphysics: {\ndefault: false  // no physics system enabled\n},\n\nloader:{\nbaseURL: '',\npath: '',\nenableParallel: true,\nmaxParallelDownloads: 4,\ncrossOrigin: undefined,\nresponseType: '',\nasync: true,\nuser: '',\npassword: '',\ntimeout: 0,\nwithCredentials: false,\nimageLoadType: 'XHR',    // 'HTMLImageElement' \nlocalScheme: [ 'file://', 'capacitor://' ]\n},\n\nimages: {\ndefault: 'data:image/png;base64....',\nmissing: 'data:image/png;base64....'\n},\n\ndom: {\ncreateContainer: false,\nbehindCanvas: false,\n},\n\nplugins: {\nglobal: [\n//{key, plugin, start}\n],\nscene: [\n// ...\n]\n},\n\npipeline: { key:PipelineClass },\n\nfps: {\nmin: 10,\ntarget: 60,\nforceSetTimeOut: false,\ndeltaHistory: 10\n},\n\ndisableContextMenu: false,\nbanner: {\nhidePhaser: false,\ntext: '#ffffff',\nbackground: [\n'#ff0000',\n'#ffff00',\n'#00ff00',\n'#00ffff',\n'#000000'\n]\n},\n\nstableSort: -1\n}\n
    "},{"location":"game/#destroy","title":"Destroy","text":"
    game.destroy();\n// game.destroy(removeCanvas, noReturn);\n
    "},{"location":"game/#global-members","title":"Global members","text":""},{"location":"game/#scene-manager","title":"Scene manager","text":"

    Global scene manager in game.scene, or scene.scene in each scene.

    "},{"location":"game/#global-data","title":"Global data","text":"

    Instance of data manager in game.registry, or scene.registry in each scene.

    "},{"location":"game/#game-time","title":"Game time","text":""},{"location":"game/#game-config","title":"Game config","text":"
    var config = game.config;\n// var config = scene.game.config;\n
    "},{"location":"game/#window-size","title":"Window size","text":""},{"location":"game/#pause-resume","title":"Pause / Resume","text":""},{"location":"game/#events","title":"Events","text":""},{"location":"gameobject/","title":"Game object","text":""},{"location":"gameobject/#introduction","title":"Introduction","text":"

    Base class of all game object in phaser.

    "},{"location":"gameobject/#usage","title":"Usage","text":""},{"location":"gameobject/#destroy","title":"Destroy","text":""},{"location":"gameobject/#position","title":"Position","text":""},{"location":"gameobject/#local-point","title":"Local point","text":"

    Transfer world point to local point

    var point = gameObject.getLocalPoint(x, y);  // point : {x, y}\n// var out = gameObject.getLocalPoint(x, y, out);\n
    or
    var out = gameObject.getLocalPoint(x, y, out, camera);\n

    "},{"location":"gameobject/#angle","title":"Angle","text":""},{"location":"gameobject/#visible","title":"Visible","text":""},{"location":"gameobject/#alpha","title":"Alpha","text":""},{"location":"gameobject/#flipx-flipy","title":"FlipX, FlipY","text":""},{"location":"gameobject/#order-of-rendering","title":"Order of rendering","text":""},{"location":"gameobject/#depth-z-index","title":"Depth (z-index)","text":"

    The depth starts from zero (the default value) and increases from that point. A game object with a higher depth value will always render in front of one with a lower value.

    "},{"location":"gameobject/#display-list","title":"Display list","text":"
    scene.children.bringToTop(child);\nscene.children.sendToBack(child);\nscene.children.moveUp(child);\nscene.children.moveDown(child);\nscene.children.moveAbove(child1, child2);  // Move child1 above child2\nscene.children.moveBelow(child1, child2);  // Move child1 below child2\nscene.children.moveTo(child, index);\nscene.children.swap(child1, child2);\n
    "},{"location":"gameobject/#layer-game-object","title":"Layer game object","text":"

    Place game object into Layer game object

    "},{"location":"gameobject/#scroll-factor","title":"Scroll factor","text":"

    Scroll factor: 0~1

    "},{"location":"gameobject/#bounds","title":"Bounds","text":"
    var output = gameObject.getTopLeft(output);     // output: {x, y}\nvar output = gameObject.getTopCenter(output);     // output: {x, y}\nvar output = gameObject.getTopRight(output);    // output: {x, y}\nvar output = gameObject.getLeftCenter(output);    // output: {x, y}\nvar output = gameObject.getRightCenter(output);    // output: {x, y}\nvar output = gameObject.getBottomLeft(output);  // output: {x, y}\nvar output = gameObject.getBottomCenter(output);     // output: {x, y}\nvar output = gameObject.getBottomRight(output); // output: {x, y}\nvar output = gameObject.getCenter(output);      // output: {x, y}\nvar output = gameObject.getBounds(output);      // output: {x, y, width, height}\n
    "},{"location":"gameobject/#origin","title":"Origin","text":""},{"location":"gameobject/#tint","title":"Tint","text":""},{"location":"gameobject/#blend-mode","title":"Blend mode","text":""},{"location":"gameobject/#mask","title":"Mask","text":"

    See Mask.

    "},{"location":"gameobject/#built-in-shader-effects","title":"Built-in shader effects","text":"

    See built-in shader effects

    "},{"location":"gameobject/#post-fx-pipeline","title":"Post-fx pipeline","text":""},{"location":"gameobject/#register-post-fx-pipeline","title":"Register post-fx pipeline","text":"

    Some post-fx pipelines:

    "},{"location":"gameobject/#add-post-fx-pipeline","title":"Add post-fx pipeline","text":"
    gameObject.setPostPipeline(PostFxClass);\n
    "},{"location":"gameobject/#remove-post-fx-pipeline","title":"Remove post-fx pipeline","text":""},{"location":"gameobject/#get-post-fx-pipeline","title":"Get post-fx pipeline","text":"
    var pipelineInstance = gameObject.getPostPipeline(PostFxClass);\n
    "},{"location":"gameobject/#size","title":"Size","text":""},{"location":"gameobject/#click","title":"Click","text":"
    gameObject.setInteractive().on('pointerdown', function(pointer, localX, localY, event){\n// ...\n});\n

    See touch event

    "},{"location":"gameobject/#state","title":"State","text":""},{"location":"gameobject/#data","title":"Data","text":"

    See data manager

    Note

    Ensure data manager is created before binding any data-changed events.

    "},{"location":"gameobject/#texture","title":"Texture","text":""},{"location":"gameobject/#name","title":"Name","text":""},{"location":"gameobject/#will-render","title":"Will render","text":""},{"location":"gameobject/#add-to-scenecontainer","title":"Add to scene/container","text":""},{"location":"gameobject/#add","title":"Add","text":"

    Trigger 'addedtoscene' event, which invoke gameObject.addedToScene()

    "},{"location":"gameobject/#remove","title":"Remove","text":"

    Trigger 'removedfromscene' event, which invoke gameObject.removedFromScene()

    "},{"location":"gameobject/#custom-class","title":"Custom class","text":""},{"location":"gamepad/","title":"Gamepad","text":""},{"location":"gamepad/#introduction","title":"Introduction","text":"

    Gamepad's state of buttons, or axis.

    "},{"location":"gamepad/#usage","title":"Usage","text":""},{"location":"gamepad/#get-gamepad","title":"Get gamepad","text":""},{"location":"gamepad/#events","title":"Events","text":""},{"location":"gamepad/#gamepad","title":"Gamepad","text":""},{"location":"gamepad/#buttons","title":"Buttons","text":""},{"location":"gamepad/#axis-sticks","title":"Axis sticks","text":""},{"location":"gamepad/#properties","title":"Properties","text":""},{"location":"gashapon/","title":"Gashapon","text":""},{"location":"gashapon/#introduction","title":"Introduction","text":"

    Pick random item from box.

    "},{"location":"gashapon/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gashapon/#install-plugin","title":"Install plugin","text":""},{"location":"gashapon/#load-minify-file","title":"Load minify file","text":""},{"location":"gashapon/#import-plugin","title":"Import plugin","text":""},{"location":"gashapon/#import-class","title":"Import class","text":""},{"location":"gashapon/#create-instance","title":"Create instance","text":"
    var gashapon = scene.plugins.get('rexGashapon').add({\nmode: 'shuffle',  // 0|'shuffle'|1|'random\nitems: {  // name:count\na:1, b:2, c:3 },\nreload: true,     // true|false\nrnd: undefined,\n});\n
    "},{"location":"gashapon/#pick-item","title":"Pick item","text":""},{"location":"gashapon/#set-item","title":"Set item","text":""},{"location":"gashapon/#remove-item","title":"Remove item","text":""},{"location":"gashapon/#current-status","title":"Current status","text":""},{"location":"gashapon/#get-items","title":"Get items","text":""},{"location":"gashapon/#set-random-generator","title":"Set random generator","text":"
    gashapon.setRND(rnd);\n
    "},{"location":"geom-circle/","title":"Circle","text":""},{"location":"geom-circle/#introduction","title":"Introduction","text":"

    Circle shape and methods, built-in methods of phaser.

    "},{"location":"geom-circle/#usage","title":"Usage","text":""},{"location":"geom-circle/#create-shape","title":"Create shape","text":"
    var circle = new Phaser.Geom.Circle(x, y, radius);\n
    "},{"location":"geom-circle/#clone-shape","title":"Clone shape","text":"
    var circle1 = Phaser.Geom.Circle.Clone(circle0);\n
    "},{"location":"geom-circle/#draw-on-graphics","title":"Draw on graphics","text":"

    Note

    Negative radius will be treated as positive radius. i.e. Math.abs(radius)

    "},{"location":"geom-circle/#set-properties","title":"Set properties","text":""},{"location":"geom-circle/#get-properties","title":"Get properties","text":""},{"location":"geom-circle/#points-shape","title":"Point(s) & shape","text":""},{"location":"geom-circle/#empty","title":"Empty","text":""},{"location":"geom-circle/#equal","title":"Equal","text":"
    var isEqual = Phaser.Geom.Circle.Equals(circle0, circle1);\n

    Position and radius are equal.

    "},{"location":"geom-circle/#intersection","title":"Intersection","text":""},{"location":"geom-circle/#circle-to-circle","title":"Circle to circle","text":""},{"location":"geom-circle/#circle-to-rectangle","title":"Circle to rectangle","text":""},{"location":"geom-circle/#circle-to-triangle","title":"Circle to triangle","text":""},{"location":"geom-circle/#circle-to-line","title":"Circle to line","text":""},{"location":"geom-ellipse/","title":"Ellipse","text":""},{"location":"geom-ellipse/#introduction","title":"Introduction","text":"

    Ellipse shape and methods, built-in methods of phaser.

    "},{"location":"geom-ellipse/#usage","title":"Usage","text":""},{"location":"geom-ellipse/#create-shape","title":"Create shape","text":"
    var ellipse = new Phaser.Geom.Ellipse(x, y, width, height);\n
    "},{"location":"geom-ellipse/#clone-shape","title":"Clone shape","text":"
    var ellipse1 = Phaser.Geom.Ellipse.Clone(ellipse0);\n
    "},{"location":"geom-ellipse/#draw-on-graphics","title":"Draw on graphics","text":"

    Note

    Negative width, height will be treated as positive width, height. i.e. Math.abs(width), Math.abs(height)

    "},{"location":"geom-ellipse/#set-properties","title":"Set properties","text":""},{"location":"geom-ellipse/#get-properties","title":"Get properties","text":""},{"location":"geom-ellipse/#points-shape","title":"Point(s) & shape","text":""},{"location":"geom-ellipse/#empty","title":"Empty","text":""},{"location":"geom-ellipse/#equal","title":"Equal","text":"
    var isEqual = Phaser.Geom.Ellipse.Equals(ellipse0, ellipse1);\n

    Position and width, height are equal.

    "},{"location":"geom-hexagon/","title":"Hexagon","text":""},{"location":"geom-hexagon/#introduction","title":"Introduction","text":"

    Hexagon shape and methods, extends from Polygon geometry object.

    "},{"location":"geom-hexagon/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"geom-hexagon/#install-plugin","title":"Install plugin","text":""},{"location":"geom-hexagon/#load-minify-file","title":"Load minify file","text":""},{"location":"geom-hexagon/#import-plugin","title":"Import plugin","text":""},{"location":"geom-hexagon/#import-class","title":"Import class","text":""},{"location":"geom-hexagon/#create-shape","title":"Create shape","text":"

    var hexagon = scene.plugins.get('rexHexagon').add(x, y, size, orientationType);\n
    or
    var hexagon = scene.plugins.get('rexHexagon').add({\nx: 0,\ny: 0,\nsize: 20,\norientationType: 0     // 0|'flat'|'vertical'|1|'pointy'|'horizontal'\n});\n
    or
    var hexagon = new Phaser.Geom.rexHexagon(x, y, size, orientationType);\n

    "},{"location":"geom-hexagon/#draw-on-graphics","title":"Draw on graphics","text":"

    See Polygon shape.

    "},{"location":"geom-hexagon/#set-properties","title":"Set properties","text":""},{"location":"geom-hexagon/#get-properties","title":"Get properties","text":"

    See Polygon shape.

    "},{"location":"geom-hexagon/#points-shape","title":"Point(s) & shape","text":"

    See Polygon shape.

    "},{"location":"geom-line/","title":"Line","text":""},{"location":"geom-line/#introduction","title":"Introduction","text":"

    Line shape and methods, built-in methods of phaser.

    "},{"location":"geom-line/#usage","title":"Usage","text":""},{"location":"geom-line/#create-shape","title":"Create shape","text":"
    var line = new Phaser.Geom.Line(x1, y1, x2, y2);\n
    "},{"location":"geom-line/#clone-shape","title":"Clone shape","text":"
    var line1 = Phaser.Geom.Line.Clone(line0);\n
    "},{"location":"geom-line/#draw-on-graphics","title":"Draw on graphics","text":"
    // graphics.lineStyle(lineWidth, color, alpha);   // color: 0xRRGGBB\ngraphics.strokeLineShape(line);\n
    "},{"location":"geom-line/#set-properties","title":"Set properties","text":""},{"location":"geom-line/#get-properties","title":"Get properties","text":""},{"location":"geom-line/#points-shape","title":"Point(s) & shape","text":""},{"location":"geom-line/#equal","title":"Equal","text":"
    var isEqual = Phaser.Geom.Line.Equals(line0, line1);\n

    x1, y2, x2, y2 are equal.

    "},{"location":"geom-line/#intersection","title":"Intersection","text":""},{"location":"geom-line/#line-to-circle","title":"Line to circle","text":""},{"location":"geom-line/#line-to-rectangle","title":"Line to rectangle","text":""},{"location":"geom-line/#line-to-triangle","title":"Line to triangle","text":""},{"location":"geom-line/#line-to-line","title":"Line to line","text":""},{"location":"geom-point/","title":"Point","text":""},{"location":"geom-point/#introduction","title":"Introduction","text":"

    Point shape and methods, built-in methods of phaser.

    "},{"location":"geom-point/#usage","title":"Usage","text":""},{"location":"geom-point/#create-shape","title":"Create shape","text":"
    var point = new Phaser.Geom.Point(x, y);\n
    "},{"location":"geom-point/#clone-shape","title":"Clone shape","text":"
    var point1 = Phaser.Geom.Point.Clone(point0);\n
    "},{"location":"geom-point/#draw-on-graphics","title":"Draw on graphics","text":"
    // graphics.fillStyle(color, alpha);   // color: 0xRRGGBB\ngraphics.fillPointShape(point, size);\n
    "},{"location":"geom-point/#set-properties","title":"Set properties","text":""},{"location":"geom-point/#symmetry","title":"Symmetry","text":""},{"location":"geom-point/#get-properties","title":"Get properties","text":""},{"location":"geom-point/#equal","title":"Equal","text":"
    var isEqual = Phaser.Geom.Point.Equals(point0, point1);\n

    x, y are equal.

    "},{"location":"geom-point/#points","title":"Points","text":""},{"location":"geom-point/#intersection","title":"Intersection","text":""},{"location":"geom-point/#point-as-vector","title":"Point as Vector","text":"

    Vector starting at (0,0)

    "},{"location":"geom-polygon/","title":"Polygon","text":""},{"location":"geom-polygon/#introduction","title":"Introduction","text":"

    Polygon shape and methods, built-in methods of phaser.

    "},{"location":"geom-polygon/#usage","title":"Usage","text":""},{"location":"geom-polygon/#create-shape","title":"Create shape","text":"
    var polygon = new Phaser.Geom.Polygon(points);\n
    "},{"location":"geom-polygon/#clone-shape","title":"Clone shape","text":"
    var polygon1 = Phaser.Geom.Polygon.Clone(polygon0);\n
    "},{"location":"geom-polygon/#draw-on-graphics","title":"Draw on graphics","text":""},{"location":"geom-polygon/#set-properties","title":"Set properties","text":"
    polygon.setTo(points);\n// points = [x0, y0, x1, y1, x2, y2, ...] , or [{x,y}, {x,y}, {x,y}, ...]\n
    "},{"location":"geom-polygon/#get-properties","title":"Get properties","text":""},{"location":"geom-polygon/#points-shape","title":"Point(s) & shape","text":""},{"location":"geom-polygon/#vector-to-polygon","title":"Vector to polygon","text":""},{"location":"geom-rectangle/","title":"Rectangle","text":""},{"location":"geom-rectangle/#introduction","title":"Introduction","text":"

    Rectangle shape and methods, built-in methods of phaser.

    "},{"location":"geom-rectangle/#usage","title":"Usage","text":""},{"location":"geom-rectangle/#create-shape","title":"Create shape","text":"
    var rect = new Phaser.Geom.Rectangle(x, y, width, height);\n
    "},{"location":"geom-rectangle/#create-from-points","title":"Create from points","text":"

    All of the given points are on or within its bounds.

    var rect = Phaser.Geom.Rectangle.FromPoints(points);\n// var rect = Phaser.Geom.Rectangle.FromPoints(points, rect);  // push rect\n

    or

    var rect = Phaser.Geom.Rectangle.FromXY(x1, y1, x2, y2);\n// var rect = Phaser.Geom.Rectangle.FromXY(x1, y1, x2, y2, rect);  // push rect\n
    "},{"location":"geom-rectangle/#clone-shape","title":"Clone shape","text":"
    var rect1 = Phaser.Geom.Rectangle.Clone(rect0);\n
    "},{"location":"geom-rectangle/#draw-on-graphics","title":"Draw on graphics","text":"

    Note

    x with positive/negative width is left/right bound y with positive/negative height is top/bottom bound

    "},{"location":"geom-rectangle/#set-properties","title":"Set properties","text":""},{"location":"geom-rectangle/#get-properties","title":"Get properties","text":""},{"location":"geom-rectangle/#points-shape","title":"Point(s) & shape","text":""},{"location":"geom-rectangle/#rectangles","title":"Rectangles","text":""},{"location":"geom-rectangle/#empty","title":"Empty","text":""},{"location":"geom-rectangle/#equal","title":"Equal","text":""},{"location":"geom-rectangle/#intersection","title":"Intersection","text":""},{"location":"geom-rectangle/#rectangle-to-circle","title":"Rectangle to circle","text":""},{"location":"geom-rectangle/#rectangle-to-rectangle","title":"Rectangle to rectangle","text":""},{"location":"geom-rectangle/#rectangle-to-triangle","title":"Rectangle to triangle","text":""},{"location":"geom-rectangle/#rectangle-to-line","title":"Rectangle to line","text":""},{"location":"geom-rhombus/","title":"Rhombus","text":""},{"location":"geom-rhombus/#introduction","title":"Introduction","text":"

    Rhombus shape and methods, extends from Polygon geometry object.

    "},{"location":"geom-rhombus/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"geom-rhombus/#install-plugin","title":"Install plugin","text":""},{"location":"geom-rhombus/#load-minify-file","title":"Load minify file","text":""},{"location":"geom-rhombus/#import-plugin","title":"Import plugin","text":""},{"location":"geom-rhombus/#import-class","title":"Import class","text":""},{"location":"geom-rhombus/#create-shape","title":"Create shape","text":"

    var rhombus = scene.plugins.get('rexRhombus').add(x, y, width, height);\n
    or
    var rhombus = scene.plugins.get('rexRhombus').add({\nx: 0,\ny: 0,\nwidth: 40,\nheight: 20\n});\n
    or
    var rhombus = new rexRhombus(x, y, width, height);\n// var rhombus = new Phaser.Geom.rexRhombus(x, y, width, height);\n

    "},{"location":"geom-rhombus/#draw-on-graphics","title":"Draw on graphics","text":"

    See Polygon shape.

    "},{"location":"geom-rhombus/#set-properties","title":"Set properties","text":""},{"location":"geom-rhombus/#get-properties","title":"Get properties","text":"

    See Polygon shape.

    "},{"location":"geom-rhombus/#points-shape","title":"Point(s) & shape","text":"

    See Polygon shape.

    "},{"location":"geom-triangle/","title":"Triangle","text":""},{"location":"geom-triangle/#introduction","title":"Introduction","text":"

    Triangle shape and methods, built-in methods of phaser.

    "},{"location":"geom-triangle/#usage","title":"Usage","text":""},{"location":"geom-triangle/#create-shape","title":"Create shape","text":"
    var triangle = new Phaser.Geom.Triangle(x1, y1, x2, y2, x3, y3);\n
    "},{"location":"geom-triangle/#clone-shape","title":"Clone shape","text":"
    var triangle1 = Phaser.Geom.Triangle.Clone(triangle0);\n
    "},{"location":"geom-triangle/#equilateral-triangle","title":"Equilateral triangle","text":"
    var triangle = Phaser.Geom.Triangle.BuildEquilateral(x1, y1, length);\n
    "},{"location":"geom-triangle/#right-triangle","title":"Right triangle","text":"
    var triangle = Phaser.Geom.Triangle.BuildRight(x1, y1, width, height);\n
    "},{"location":"geom-triangle/#polygon-to-triangles","title":"Polygon to triangles","text":"
    var out = Phaser.Geom.Triangle.BuildFromPolygon(data);\n// var out = Phaser.Geom.Triangle.BuildFromPolygon(data, holes, scaleX, scaleY);\n// out = Phaser.Geom.Triangle.BuildFromPolygon(data, holes, scaleX, scaleY, out);\n
    "},{"location":"geom-triangle/#draw-on-graphics","title":"Draw on graphics","text":""},{"location":"geom-triangle/#set-properties","title":"Set properties","text":""},{"location":"geom-triangle/#get-properties","title":"Get properties","text":""},{"location":"geom-triangle/#points-shape","title":"Point(s) & shape","text":""},{"location":"geom-triangle/#equal","title":"Equal","text":"
    var isEqual = Phaser.Geom.Triangle.Equals(triangle0, triangle1);\n

    Position and radius are equal.

    "},{"location":"geom-triangle/#intersection","title":"Intersection","text":""},{"location":"geom-triangle/#triangle-to-circle","title":"Triangle to circle","text":""},{"location":"geom-triangle/#triangle-to-rectangle","title":"Triangle to rectangle","text":""},{"location":"geom-triangle/#triangle-to-triangle","title":"Triangle to triangle","text":""},{"location":"geom-triangle/#triangle-to-line","title":"Triangle to line","text":""},{"location":"gesture-overview/","title":"Overview","text":""},{"location":"gesture-overview/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-overview/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-overview/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-overview/#list-of-gesture-plugins","title":"List of gesture plugins","text":""},{"location":"gesture-overview/#one-pointer-gesture","title":"One pointer gesture","text":""},{"location":"gesture-overview/#two-pointers-gesture","title":"Two pointers gesture","text":""},{"location":"gesture-pan/","title":"Pan","text":""},{"location":"gesture-pan/#introduction","title":"Introduction","text":"

    Get pan events of a game object.

    "},{"location":"gesture-pan/#live-demos","title":"Live demos","text":""},{"location":"gesture-pan/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gesture-pan/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-pan/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-pan/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-pan/#import-class","title":"Import class","text":""},{"location":"gesture-pan/#create-instance","title":"Create instance","text":""},{"location":"gesture-pan/#enable","title":"Enable","text":""},{"location":"gesture-pan/#events","title":"Events","text":""},{"location":"gesture-pan/#pan","title":"Pan","text":"
    pan.on('pan', function(pan, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-pan/#pan-start","title":"Pan start","text":"
    pan.on('panstart', function(pan, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-pan/#pan-end","title":"Pan end","text":"
    pan.on('panend', function(pan, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-pan/#is-panned","title":"Is panned","text":"
    var isPanned = pan.isPanned;\n

    Return true if panned.

    "},{"location":"gesture-pan/#other-properties","title":"Other properties","text":""},{"location":"gesture-pinch/","title":"Pinch","text":""},{"location":"gesture-pinch/#introduction","title":"Introduction","text":"

    Get scale factor from 2 dragging touch pointers.

    "},{"location":"gesture-pinch/#live-demos","title":"Live demos","text":"

    Pinch-zoom

    "},{"location":"gesture-pinch/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gesture-pinch/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-pinch/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-pinch/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-pinch/#import-class","title":"Import class","text":""},{"location":"gesture-pinch/#create-instance","title":"Create instance","text":"
    var pinch = scene.rexGestures.add.pinch({\n// enable: true,\n// bounds: undefined,\n\n// threshold: 0,\n});\n
    "},{"location":"gesture-pinch/#enable","title":"Enable","text":""},{"location":"gesture-pinch/#events","title":"Events","text":""},{"location":"gesture-pinch/#on-dragging","title":"On dragging","text":""},{"location":"gesture-pinch/#on-drag-start-on-drag-end","title":"On drag start, on drag end","text":""},{"location":"gesture-pinch/#scale-factor","title":"Scale factor","text":"
    var scaleFactor = pinch.scaleFactor;\n

    Rate of distance change between 2 catched touch pointers. (i.e current distance between 2 catched touch pointers / previous distance ).

    "},{"location":"gesture-pinch/#drag-vector-of-1st-touch-pointer","title":"Drag vector of 1st touch pointer","text":"
    var drag1Vector = pinch.drag1Vector; // {x, y}\n
    "},{"location":"gesture-pinch/#catched-touch-pointers","title":"Catched touch pointers","text":""},{"location":"gesture-pinch/#is-pinched","title":"Is pinched","text":"
    var isPinched = pinch.isPinched;\n

    Return true if pinched.

    "},{"location":"gesture-pinch/#other-properties","title":"Other properties","text":""},{"location":"gesture-press/","title":"Press","text":""},{"location":"gesture-press/#introduction","title":"Introduction","text":"

    Get press events of a game object.

    "},{"location":"gesture-press/#live-demos","title":"Live demos","text":""},{"location":"gesture-press/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gesture-press/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-press/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-press/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-press/#import-class","title":"Import class","text":""},{"location":"gesture-press/#create-instance","title":"Create instance","text":""},{"location":"gesture-press/#enable","title":"Enable","text":""},{"location":"gesture-press/#events","title":"Events","text":""},{"location":"gesture-press/#pressing-start","title":"Pressing start","text":"
    press.on('pressstart', function(press, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-press/#pressing-end","title":"Pressing end","text":"
    press.on('pressend', function(press, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-press/#is-pressed","title":"Is pressed","text":"
    var isPressed = press.isPressed;\n

    Return true if pressed.

    "},{"location":"gesture-press/#other-properties","title":"Other properties","text":""},{"location":"gesture-rotate/","title":"Rotate","text":""},{"location":"gesture-rotate/#introduction","title":"Introduction","text":"

    Get spin angle from 2 dragging touch pointers.

    "},{"location":"gesture-rotate/#live-demos","title":"Live demos","text":""},{"location":"gesture-rotate/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gesture-rotate/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-rotate/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-rotate/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-rotate/#import-class","title":"Import class","text":""},{"location":"gesture-rotate/#create-instance","title":"Create instance","text":"
    var rotate = scene.rexGestures.add.rotate({\n// enable: true,\n// bounds: undefined,\n\n// threshold: 0,\n});\n
    "},{"location":"gesture-rotate/#enable","title":"Enable","text":""},{"location":"gesture-rotate/#events","title":"Events","text":""},{"location":"gesture-rotate/#on-dragging","title":"On dragging","text":""},{"location":"gesture-rotate/#on-drag-start-on-drag-end","title":"On drag start, on drag end","text":""},{"location":"gesture-rotate/#spin-game-object","title":"Spin game object","text":"
    rotate.spinObject(gameObejects);\n

    Drag and spin game objects around current center of 2 dragging pointers. Uses this function under 'rotate' event.

    "},{"location":"gesture-rotate/#spin-angle","title":"Spin angle","text":"
    var angle = rotate.rotation;\n

    Spin angle of 2 dragging pointers, in radius.

    "},{"location":"gesture-rotate/#drag-vector-of-1st-touch-pointer","title":"Drag vector of 1st touch pointer","text":"
    var drag1Vector = rotate.drag1Vector; // {x, y}\n
    "},{"location":"gesture-rotate/#catched-touch-pointers","title":"Catched touch pointers","text":""},{"location":"gesture-rotate/#is-rotated","title":"Is rotated","text":"
    var isRotated = rotate.isRotated;\n

    Return true if pinched.

    "},{"location":"gesture-rotate/#other-properties","title":"Other properties","text":""},{"location":"gesture-swipe/","title":"Swipe","text":""},{"location":"gesture-swipe/#introduction","title":"Introduction","text":"

    Get swipe events of a game object.

    "},{"location":"gesture-swipe/#live-demos","title":"Live demos","text":""},{"location":"gesture-swipe/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gesture-swipe/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-swipe/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-swipe/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-swipe/#import-class","title":"Import class","text":""},{"location":"gesture-swipe/#create-instance","title":"Create instance","text":""},{"location":"gesture-swipe/#enable","title":"Enable","text":""},{"location":"gesture-swipe/#events","title":"Events","text":""},{"location":"gesture-swipe/#swipe","title":"Swipe","text":"
    swipe.on('swipe', function(swipe, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-swipe/#is-swiped","title":"Is swiped","text":"
    var isSwiped = swipe.isSwiped;\n

    Return true if panning.

    "},{"location":"gesture-swipe/#other-properties","title":"Other properties","text":""},{"location":"gesture-tap/","title":"Tap","text":""},{"location":"gesture-tap/#introduction","title":"Introduction","text":"

    Get tap/multi-taps events of a game object.

    "},{"location":"gesture-tap/#live-demos","title":"Live demos","text":""},{"location":"gesture-tap/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gesture-tap/#install-plugin","title":"Install plugin","text":""},{"location":"gesture-tap/#load-minify-file","title":"Load minify file","text":""},{"location":"gesture-tap/#import-plugin","title":"Import plugin","text":""},{"location":"gesture-tap/#import-class","title":"Import class","text":""},{"location":"gesture-tap/#create-instance","title":"Create instance","text":""},{"location":"gesture-tap/#enable","title":"Enable","text":""},{"location":"gesture-tap/#events","title":"Events","text":""},{"location":"gesture-tap/#tap","title":"Tap","text":"
    tap.on('tap', function(tap, gameObject, lastPointer){\n}, scope);\n
    tap.on(tapsCount + 'tap', function(tap, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-tap/#tapping-start","title":"Tapping start","text":"

    Each pointer-down will increase taps count and fire tappingstart event.

    tap.on('tappingstart', function(tap, gameObject, lastPointer){\n}, scope);\n
    "},{"location":"gesture-tap/#is-tapped","title":"Is tapped","text":"
    var isTapped = tap.isTapped;\n

    Return true if tapped end.

    "},{"location":"gesture-tap/#other-properties","title":"Other properties","text":""},{"location":"graphics/","title":"Graphics","text":""},{"location":"graphics/#introduction","title":"Introduction","text":"

    Drawing on webgl or canvas, built-in game object of phaser.

    "},{"location":"graphics/#usage","title":"Usage","text":""},{"location":"graphics/#add-graphics-object","title":"Add graphics object","text":"
    var graphics = scene.add.graphics();\n

    or

    var graphics = scene.add.graphics({\nx: 0,\ny: 0,\n\n// lineStyle: {\n//     width: 1,\n//     color: 0xffffff,\n//     alpha: 1\n// },\n// fillStyle: {\n//     color: 0xffffff,\n//     alpha: 1\n// },\n\nadd: true\n});\n
    "},{"location":"graphics/#custom-class","title":"Custom class","text":""},{"location":"graphics/#drawing-commands","title":"Drawing commands","text":""},{"location":"graphics/#set-style","title":"Set style","text":""},{"location":"graphics/#clear","title":"Clear","text":"
    graphics.clear();\n
    "},{"location":"graphics/#path","title":"Path","text":"
    graphics.beginPath();\ngraphics.closePath();\ngraphics.fillPath(); // = graphics.fill()\ngraphics.strokePath(); // = graphics.stroke()\n
    "},{"location":"graphics/#rectangle","title":"Rectangle","text":"
    graphics.fillRectShape(rect); // rect: {x, y, width, height}\ngraphics.fillRect(x, y, width, height);\ngraphics.strokeRectShape(rect);  // rect: {x, y, width, height}\ngraphics.strokeRect(x, y, width, height);\n
    "},{"location":"graphics/#rounded-rectangle","title":"Rounded rectangle","text":"
    graphics.fillRoundedRect(x, y, width, height, radius);\ngraphics.strokeRoundedRect(x, y, width, height, radius);\n
    "},{"location":"graphics/#triangle","title":"Triangle","text":"
    graphics.fillTriangleShape(triangle); // triangle: {x1, y1, x2, y2, x3, y3}\ngraphics.fillTriangle(x1, y1, x2, y2, x3, y3);\ngraphics.strokeTriangleShape(triangle); // triangle: {x1, y1, x2, y2, x3, y3}\ngraphics.strokeTriangle(x1, y1, x2, y2, x3, y3);\n
    "},{"location":"graphics/#point","title":"Point","text":"
    graphics.fillPointShape(point, size); // point: {x, y}\ngraphics.fillPoint(x, y, size);\n
    "},{"location":"graphics/#line","title":"Line","text":"
    graphics.strokeLineShape(line); // line: {x1, y1, x2, y2}\ngraphics.lineBetween(x1, y1, x2, y2);\ngraphics.lineTo(x, y);\ngraphics.moveTo(x, y);\n
    "},{"location":"graphics/#lines","title":"Lines","text":"
    graphics.strokePoints(points, closeShape, closePath, endIndex);  // points: [{x, y}, ...]\ngraphics.fillPoints(points, closeShape, closePath, endIndex);  // points: [{x, y}, ...]\n
    "},{"location":"graphics/#circle","title":"Circle","text":"
    graphics.fillCircleShape(circle); // circle: {x, y, radius}\ngraphics.fillCircle(x, y, radius);\ngraphics.strokeCircleShape(circle);  // circle: {x, y, radius}\ngraphics.strokeCircle(x, y, radius);\n

    Draw or fill circle shape by points.

    "},{"location":"graphics/#ellipse","title":"Ellipse","text":"
    graphics.strokeEllipseShape(ellipse, smoothness);   // ellipse: Phaser.Geom.Ellipse\ngraphics.strokeEllipse(x, y, width, height, smoothness);\ngraphics.fillEllipseShape(ellipse, smoothness);    // ellipse: Phaser.Geom.Ellipse\ngraphics.fillEllipse(x, y, width, height, smoothness);\n

    Draw or fill ellipse shape by points.

    "},{"location":"graphics/#arc","title":"Arc","text":"
    graphics.arc(x, y, radius, startAngle, endAngle, anticlockwise);\ngraphics.arc(x, y, radius, startAngle, endAngle, anticlockwise, overshoot);\n

    Draw arc curve by points.

    "},{"location":"graphics/#pie-chart-slice","title":"Pie-chart slice","text":"
    graphics.slice(x, y, radius, startAngle, endAngle, anticlockwise);\ngraphics.slice(x, y, radius, startAngle, endAngle, anticlockwise, overshoot);\n

    Draw pie-chart slice shape by points.

    Fill this shape

    graphics.fillPath();\n
    "},{"location":"graphics/#clear-pattern","title":"Clear pattern","text":"
    graphics.setTexture();\n
    "},{"location":"graphics/#transfer","title":"Transfer","text":"
    graphics.save();\ngraphics.restore();\ngraphics.translateCanvas(x, y);\ngraphics.scaleCanvas(x, y);\ngraphics.rotateCanvas(radians);\n
    "},{"location":"graphics/#generate-texture","title":"Generate texture","text":"
    graphics.generateTexture(key, width, height);  // key: texture key\n
    "},{"location":"graphics/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"graphics/#create-mask","title":"Create mask","text":"
    var mask = graphics.createGeometryMask();\n

    See mask

    "},{"location":"graphics/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"gridalign/","title":"Quad/Hexagon grid align","text":""},{"location":"gridalign/#introduction","title":"Introduction","text":"

    Align objects on quadrilateral or hexagon grid.

    See also built-in grid-align.

    "},{"location":"gridalign/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gridalign/#install-plugin","title":"Install plugin","text":""},{"location":"gridalign/#load-minify-file","title":"Load minify file","text":""},{"location":"gridalign/#import-plugin","title":"Import plugin","text":""},{"location":"gridalign/#import-class","title":"Import class","text":""},{"location":"gridalign/#quadrilateral-grid","title":"Quadrilateral grid","text":"
    scene.plugins.get('rexGridAlign').quad(gameObjects, {\nwidth: -1,\nheight: -1,\ncellWidth: 1,\ncellHeight: 1,\ntype: 0,\nposition: Phaser.Display.Align.CENTER,\nx: 0,\ny: 0\n});\n
    "},{"location":"gridalign/#hexagon-grid","title":"Hexagon grid","text":"
    scene.plugins.get('rexGridAlign').hexagon(gameObjects, {\nwidth: -1,\nheight: -1,\ncellWidth: 1,\ncellHeight: 1,\nstaggeraxis: 'x',\nstaggerindex: 'odd',\nposition: Phaser.Display.Align.CENTER,\nx: 0,\ny: 0\n});\n
    "},{"location":"gridalign/#types-of-hexagon-grid","title":"Types of hexagon grid","text":"

    Reference

    "},{"location":"gridcutimage/","title":"Grid cut image","text":""},{"location":"gridcutimage/#introduction","title":"Introduction","text":"

    Create image game objects in grids, to assemble target texture.

    "},{"location":"gridcutimage/#live-demos","title":"Live demos","text":""},{"location":"gridcutimage/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gridcutimage/#install-plugin","title":"Install plugin","text":""},{"location":"gridcutimage/#load-minify-file","title":"Load minify file","text":""},{"location":"gridcutimage/#import-plugin","title":"Import plugin","text":""},{"location":"gridcutimage/#import-class","title":"Import class","text":""},{"location":"gridcutimage/#grid-cut","title":"Grid cut","text":"
    scene.plugins.get('rexGridCutImage').gridCut(gameObjects, columns, rows, {\n// onCreateImage: undefined,\n// ImageClass: Phaser.GameObjects.Image,\n\n// originX: 0.5,\n// originY: 0.5,\n// add: true,\n// align: true,\n// objectPool: undefined\n})\n
    "},{"location":"gridtable/","title":"Grid table","text":""},{"location":"gridtable/#introduction","title":"Introduction","text":"

    Viewer of grid table, to manipulate game object of each visible cell.

    "},{"location":"gridtable/#live-demos","title":"Live demos","text":""},{"location":"gridtable/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"gridtable/#install-plugin","title":"Install plugin","text":""},{"location":"gridtable/#load-minify-file","title":"Load minify file","text":""},{"location":"gridtable/#import-plugin","title":"Import plugin","text":""},{"location":"gridtable/#import-class","title":"Import class","text":""},{"location":"gridtable/#create-instance","title":"Create instance","text":"
    var table = scene.add.rexGridTable(x, y, width, height, {\nscrollMode: 0,        // 0|'v'|'vertical'|1|'h'|'horizontal'\ncellsCount: 0,\ncolumns: 1,\n// rows: 1,\ncellHeight: 30,\ncellWidth: 30,\n\ncellVisibleCallback: null,\n// cellVisibleCallback: function (cell, cellContainer, table) {},\ncellVisibleCallbackScope: undefined,\nreuseCellContainer: false,\n\ncellInvisibleCallback: null,\n// cellInvisibleCallback: function(cell) {},\ncellInvisibleCallbackScope: undefined,\nclamplTableOXY: true,\n\nmask: {\npadding: 0,\n// updateMode: 0,\n// layer: undefined,\n},\n// enableLayer: false\n});\n

    Add grid table from JSON

    var table = scene.make.rexGridTable({\nx: 0,\ny: 0,\nwidth: 256,\nheight: 256,\n\n// cellsCount: 0,   // total cells count\n// ...\n// origin: {x: 0.5, y: 0.5},\n});\n
    "},{"location":"gridtable/#custom-class","title":"Custom class","text":""},{"location":"gridtable/#cell-begins-visible","title":"Cell begins visible","text":"

    Add container of cell when it begins visible in event cellvisible.

    table.on('cellvisible', function(cell, cellContainer, table){\nif (cellContainer === null) { // No reusable cell container, create a new one\nvar scene = cell.scene;\n// cellContainer = scene.add.container();\n}\n// Set child properties of cell container ...\ncell.setContainer(cellContainer); // Assign cell container\n})\n

    It is equal to cellVisibleCallback in configuration.

    {\n// ...\ncellVisibleCallback: function(cell, cellContainer, table) {\ncell.setContainer(cellContainer); // Assign cell container\n},\n// ...\n}\n

    Each cell only has one container gameObject, old container will be destroyed when assigning a new container.

    "},{"location":"gridtable/#cell-begins-invisible","title":"Cell begins invisible","text":"

    Container of an invisible cell will be destroyed automatically.

    To resue container gameObject

    table.on('cellinvisible', function(cell){\n// var container = cell.popContainer();\n})\n

    It is equal to cellInvisibleCallback in configuration.

    {\n// ...\ncellInvisibleCallback: function(cell) {\n// var container = cell.popContainer();\n},\n// ...\n}\n
    "},{"location":"gridtable/#scroll-table-content","title":"Scroll table content","text":"

    Use case

    Scroll table by scroller behavior.

    "},{"location":"gridtable/#scroll-by-percentage","title":"Scroll by percentage","text":"

    Use case

    Scroll table by slider behavior.

    "},{"location":"gridtable/#scroll-to-bottom","title":"Scroll to bottom","text":"
    table.scrollToBottom();\n
    "},{"location":"gridtable/#scroll-to-row","title":"Scroll to row","text":""},{"location":"gridtable/#refresh-table-content","title":"Refresh table content","text":""},{"location":"gridtable/#table-size-in-cells","title":"Table size in cells","text":""},{"location":"gridtable/#total-cells-count","title":"Total cells count","text":""},{"location":"gridtable/#columns-count","title":"Columns count","text":""},{"location":"gridtable/#table-size-in-pixels","title":"Table size in pixels","text":""},{"location":"gridtable/#bounds-of-tableox-tableoy","title":"Bounds of tableOX, tableOY","text":"

    Use case

    Set bounds of scroller

    "},{"location":"gridtable/#resize-table","title":"Resize table","text":"
    table.resize(width, height);\n
    "},{"location":"gridtable/#cell","title":"Cell","text":""},{"location":"gridtable/#get-cell","title":"Get cell","text":"
    var cell = table.getCell(cellIndex);\n
    "},{"location":"gridtable/#get-cell-from-position","title":"Get cell from position","text":"
    var cellIndex = table.pointToCellIndex(x, y);\nvar cell = table.getCell(cellIndex);\n
    "},{"location":"gridtable/#cell-height","title":"Cell height","text":""},{"location":"gridtable/#cell-width","title":"Cell width","text":""},{"location":"gridtable/#fore-each-visible-cell","title":"Fore each visible cell","text":""},{"location":"gridtable/#container","title":"Container","text":""},{"location":"gridtable/#properties","title":"Properties","text":"
    var cellIndex = cell.index;\n
    "},{"location":"gridtable/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"group/","title":"Group","text":""},{"location":"group/#introduction","title":"Introduction","text":"

    Objects pool, built-in game object of phaser.

    "},{"location":"group/#usage","title":"Usage","text":""},{"location":"group/#add-group-object","title":"Add group object","text":"
    var group = scene.add.group(config);\n// var group = scene.add.group(gameObjects, config);  // Add game objects into group\n
    "},{"location":"group/#add-game-object","title":"Add game object","text":"
    group.add(gameObject);\n// group.add(gameObject, true);  // add this game object to display and update list of scene\n
    group.addMultiple(gameObjects);   // array of game objects\n// group.addMultiple(gameObjects, true);\n
    "},{"location":"group/#remove-game-object","title":"Remove game object","text":"
    group.remove(gameObject);\n// group.remove(gameObject, true);  // also remove this game object from display and update list of scene\n

    Remove all game objects

    group.clear();\n// group.clear(removeFromScene, destroyChild);\n
    "},{"location":"group/#get-game-objects","title":"Get game objects","text":""},{"location":"group/#group-actions","title":"Group actions","text":""},{"location":"group/#property","title":"Property","text":""},{"location":"group/#position","title":"Position","text":""},{"location":"group/#angle","title":"Angle","text":""},{"location":"group/#visible","title":"Visible","text":""},{"location":"group/#alpha","title":"Alpha","text":""},{"location":"group/#tint","title":"Tint","text":""},{"location":"group/#blend-mode","title":"Blend mode","text":""},{"location":"group/#scale","title":"Scale","text":""},{"location":"group/#origin","title":"Origin","text":""},{"location":"group/#depth","title":"Depth","text":""},{"location":"group/#animation","title":"Animation","text":""},{"location":"group/#hit-area","title":"Hit area","text":""},{"location":"group/#shuffle","title":"Shuffle","text":""},{"location":"group/#activeinactive-game-objects","title":"Active/inactive game objects","text":""},{"location":"group/#create-game-objects","title":"Create game objects","text":"
    var gameObjects = group.createFromConfig(config);\nvar gameObjects = group.createMultiple(config);    // config in array\n
    "},{"location":"group/#destroy","title":"Destroy","text":""},{"location":"groupactions/","title":"Group actions","text":""},{"location":"groupactions/#introduction","title":"Introduction","text":"

    Set properties of game objects, built-in methods of phaser.

    "},{"location":"groupactions/#usage","title":"Usage","text":""},{"location":"groupactions/#call-function","title":"Call function","text":"
    Phaser.Actions.Call(gameObjects, function(gameObject) {\n\n}, scope);\n
    "},{"location":"groupactions/#set-any-property","title":"Set any property","text":"
    Phaser.Actions.PropertyValueSet(gameObjects, key, value, step, index, direction);\n
    Phaser.Actions.PropertyValueInc(gameObjects, key, value, step, index, direction);\n
    Phaser.Actions.SmootherStep(gameObjects, key, min, max, inc));\n
    Phaser.Actions.SmoothStep(gameObjects, key, min, max, inc));\n
    Phaser.Actions.Spread(gameObjects, key, min, max, inc));\n
    "},{"location":"groupactions/#position","title":"Position","text":"
    Phaser.Actions.SetX(gameObjects, value, step, index, direction);\n
    Phaser.Actions.IncX(gameObjects, value, step, index, direction);\n
    Phaser.Actions.SetY(gameObjects, value, step, index, direction);\n
    Phaser.Actions.IncY(gameObjects, value, step, index, direction);\n
    Phaser.Actions.SetXY(gameObjects, x, y, stepX, stepY, index, direction);\n
    Phaser.Actions.IncXY(gameObjects, x, y, stepX, stepY, index, direction);\n
    "},{"location":"groupactions/#shift-position","title":"Shift position","text":"

    Set the position of first game object to (x, y), others to the position of previous game object.

    Phaser.Actions.ShiftPosition(gameObjects, x, y, direction, output);\n
    "},{"location":"groupactions/#position-on-shape","title":"Position on shape","text":""},{"location":"groupactions/#grid-align","title":"Grid align","text":"
    Phaser.Actions.GridAlign(gameObjects, {\nwidth: -1,\nheight: -1,\ncellWidth: 1,\ncellHeight: 1,\nposition: Phaser.Display.Align.TOP_LEFT,\nx: 0,\ny: 0\n});\n
    "},{"location":"groupactions/#line","title":"Line","text":"

    Line :

    var line = new Phaser.Geom.Line(x1, y1, x2, y2);\n
    Phaser.Actions.PlaceOnLine(gameObjects, line);\n
    Phaser.Actions.RandomLine(gameObjects, line);\n
    "},{"location":"groupactions/#circle","title":"Circle","text":"

    Circle :

    var circle = new Phaser.Geom.Circle(x, y, radius);\n
    Phaser.Actions.PlaceOnCircle(gameObjects, circle, startAngle, endAngle);\n
    Phaser.Actions.RandomCircle(gameObjects, circle);\n
    "},{"location":"groupactions/#ellipse","title":"Ellipse","text":"

    Ellipse :

    var ellipse = new Phaser.Geom.Ellipse(x, y, width, height);\n
    Phaser.Actions.PlaceOnEllipse(gameObjects, ellipse, startAngle, endAngle);\n
    "},{"location":"groupactions/#triangle","title":"Triangle","text":"

    Triangle :

    var triangle = new Phaser.Geom.Triangle(x1, y1, x2, y2, x3, y3);\n
    Phaser.Actions.PlaceOnTriangle(gameObjects, triangle, stepRate);\n
    Phaser.Actions.RandomTriangle(gameObjects, triangle);\n
    "},{"location":"groupactions/#rectangle","title":"Rectangle","text":"

    Rectangle :

    var rect = new Phaser.Geom.Rectangle(x, y, width, height);\n
    Phaser.Actions.PlaceOnRectangle(gameObjects, rect, shift;\n
    Phaser.Actions.RandomRectangle(gameObjects, rect);\n
    Phaser.Actions.WrapInRectangle(gameObjects, rect, padding);\n
    "},{"location":"groupactions/#angle","title":"Angle","text":"
    Phaser.Actions.Angle(gameObjects, value, step, index, direction);\n// value: angle in radians\n
    Phaser.Actions.Rotate(gameObjects, value, step, index, direction);\n// value: angle in degree\n
    Phaser.Actions.RotateAround(gameObjects, point, angle);\n// point: {x, y}, angle: angle in radians\n
    Phaser.Actions.RotateAroundDistance(gameObjects, point, angle, distance);\n// point: {x, y}, angle: angle in radians\n
    "},{"location":"groupactions/#visible","title":"Visible","text":"
    Phaser.Actions.SetVisible(gameObjects, value, index, direction);\n
    Phaser.Actions.ToggleVisible(gameObjects);\n
    "},{"location":"groupactions/#alpha","title":"Alpha","text":"
    Phaser.Actions.SetAlpha(gameObjects, value, step, index, direction);\n
    "},{"location":"groupactions/#tint","title":"Tint","text":"
    Phaser.Actions.setTint(gameObjects, value);\n//Phaser.Actions.setTint(gameObjects, topLeft, topRight, bottomLeft, bottomRight);\n
    "},{"location":"groupactions/#origin","title":"Origin","text":"
    Phaser.Actions.SetOrigin(gameObjects, originX, originY, stepX, stepY, index, direction);\n
    "},{"location":"groupactions/#scale","title":"Scale","text":"
    Phaser.Actions.ScaleX(gameObjects, value, step, index, direction);\n
    Phaser.Actions.ScaleY(gameObjects, value, step, index, direction);\n
    Phaser.Actions.ScaleXY(gameObjects, x, y, stepX, stepY, index, direction);\n
    "},{"location":"groupactions/#scroll-factor","title":"Scroll factor","text":"
    Phaser.Actions.SetScrollFactorX(gameObjects, value, step, index, direction);\n
    Phaser.Actions.SetScrollFactorY(gameObjects, value, step, index, direction);\n
    Phaser.Actions.SetScrollFactor(gameObjects, x, y, stepX, stepY, index, direction);\n
    "},{"location":"groupactions/#depth","title":"Depth","text":"
    Phaser.Actions.SetDepth(gameObjects, value, step, index, direction);\n
    "},{"location":"groupactions/#hit-area","title":"Hit area","text":"
    Phaser.Actions.SetHitArea(gameObjects, hitArea, hitAreaCallback);\n
    "},{"location":"groupactions/#blend-mode","title":"Blend mode","text":"
    Phaser.Actions.SetBlendMode(gameObjects, blendMode, index, direction);\n
    "},{"location":"groupactions/#play-animation","title":"Play animation","text":"
    Phaser.Actions.PlayAnimation(gameObjects, key, ignoreIfPlaying);\n
    "},{"location":"groupactions/#shuffle","title":"Shuffle","text":"
    Phaser.Actions.Shuffle(gameObjects);\n
    "},{"location":"handlebars/","title":"Handlebars","text":""},{"location":"handlebars/#introduction","title":"Introduction","text":"

    Format string with variables, largely compatible with Mustache templates. Reference

    "},{"location":"handlebars/#usage","title":"Usage","text":"
    var template = 'hello, {{name}}';\nvar view = {\nname: 'rex'\n};\nvar result = Mustache.render(template, view);\n
    "},{"location":"handlebars/#pre-compile","title":"Pre-compile","text":"
    const template = Handlebars.compile(\"{{foo}}\");\ntemplate({}, {\n// allowProtoPropertiesByDefault: false,\n// allowProtoMethodsByDefault: false\n});\n
    "},{"location":"hiddeninputtext/","title":"Hidden edit","text":""},{"location":"hiddeninputtext/#introduction","title":"Introduction","text":"

    An invisible Input DOM element to receive character input and display on text, bbocodetext, or tagtext.

    Inspirited from CanvasInput.

    "},{"location":"hiddeninputtext/#live-demos","title":"Live demos","text":""},{"location":"hiddeninputtext/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"hiddeninputtext/#install-plugin","title":"Install plugin","text":""},{"location":"hiddeninputtext/#load-minify-file","title":"Load minify file","text":""},{"location":"hiddeninputtext/#import-plugin","title":"Import plugin","text":""},{"location":"hiddeninputtext/#import-class","title":"Import class","text":""},{"location":"hiddeninputtext/#add-input-text-object","title":"Add input text object","text":"
    var hiddenInputText = scene.plugins.get('rexHiddenInputTextPlugin').add(textGameObject, {\n// inputType: 'text',    // 'text'|'password'|'textarea'|...\n// type: 'text',    // 'text'|'password'|'textarea'|...\n\ncursor: '|',\ncursorFlashDuration: 1000,\n\n// enterClose: true,\n\n// onOpen: function (textObject, hiddenInputText) {   // Or onFocus:\n// },\n// onClose: function (textObject, hiddenInputText) {  // Or onBlur:\n// },\n// onUpdate: function (text, textObject, hiddenInputText) {\n//     return text;\n// },\n});\n

    Note

    This hiddenInputText will be destroyed when textGameObject is destroyed.

    "},{"location":"hiddeninputtext/#custom-class","title":"Custom class","text":""},{"location":"hiddeninputtext/#cursor","title":"Cursor","text":""},{"location":"hiddeninputtext/#open-editor","title":"Open editor","text":"
    hiddenInputText.open();\n
    "},{"location":"hiddeninputtext/#close-editor","title":"Close editor","text":"
    hiddenInputText.close();\n
    "},{"location":"hiddeninputtext/#is-opened","title":"Is opened","text":"
    var isOpened = hiddenInputText.isOpened;\n
    "},{"location":"hiddeninputtext/#select-text","title":"Select text","text":"

    This feature does not support.

    "},{"location":"hiddeninputtext/#bypass-key-input","title":"Bypass key input","text":"

    Registered keyboard events might capture key input.

    var keyObj = scene.input.keyboard.addKey('W', enableCapture, emitOnRepeat);\n

    Set enableCapture to false to bypass key input to this input-text game objecct.

    "},{"location":"hiddeninputtext/#event","title":"Event","text":""},{"location":"i18next/","title":"i18next","text":""},{"location":"i18next/#introduction","title":"Introduction","text":"

    i18next is a very popular internationalization framework for browser or any other javascript environment.

    "},{"location":"i18next/#usage","title":"Usage","text":""},{"location":"i18next/#import-class","title":"Import class","text":""},{"location":"i18next/#initialize","title":"Initialize","text":"
    i18next\n.use(Backend)\n.init({\nlng: 'dev',\nns: 'translation',\n\n// resources: {\n//     'dev': {\n//         'translation': {\n//             key: value,  \n//         }\n//     }\n// }\n\n// debug: true,\n})\n

    See also Configuration Options, and Backend Options

    "},{"location":"i18next/#change-language","title":"Change language","text":"
    i18next.changeLanguage(\"en\");\n

    Fire event 'languageChanged'.

    "},{"location":"i18next/#set-default-namespace","title":"Set default namespace","text":"
    i18next.setDefaultNamespace(namespace);\n
    "},{"location":"i18next/#translate","title":"Translate","text":"
    var result = i18next.t(key);\n// var result = i18next.t(key, interpolation);\n
    "},{"location":"i18next/#events","title":"Events","text":""},{"location":"image/","title":"Image","text":""},{"location":"image/#introduction","title":"Introduction","text":"

    Display of static images, built-in game object of phaser.

    "},{"location":"image/#usage","title":"Usage","text":""},{"location":"image/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"image/#add-image-object","title":"Add image object","text":"
    var image = scene.add.image(x, y, key);\n// var image = scene.add.image(x, y, key, frame);\n

    Add image from JSON

    var image = scene.make.image({\nx: 0,\ny: 0,\nkey: '',\n// frame: '',\n\n// angle: 0,\n// alpha: 1,\n// flipX: true,\n// flipY: true,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"image/#custom-class","title":"Custom class","text":""},{"location":"image/#texture","title":"Texture","text":"

    See game object - texture

    "},{"location":"image/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"image/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"image/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"imagebox/","title":"Image box","text":""},{"location":"imagebox/#introduction","title":"Introduction","text":"

    Keep aspect ratio of image game object when scale-down resizing. A containerLite game object with 1 image game object.

    "},{"location":"imagebox/#live-demos","title":"Live demos","text":""},{"location":"imagebox/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"imagebox/#install-plugin","title":"Install plugin","text":""},{"location":"imagebox/#load-minify-file","title":"Load minify file","text":""},{"location":"imagebox/#import-plugin","title":"Import plugin","text":""},{"location":"imagebox/#import-class","title":"Import class","text":""},{"location":"imagebox/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexImageBox(x, y, texture, frame, {\n// width: undefined,\n// height: undefined,\n\n// image: undefined\n});\n

    Add imagebox from JSON

    var image = scene.make.rexImageBox({\nx: 0,\ny: 0,\nkey: null,\nframe: null,\n\n// width: undefined,\n// height: undefined,\n\n// image: undefined\n\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"imagebox/#custom-class","title":"Custom class","text":""},{"location":"imagebox/#resize","title":"Resize","text":"
    image.resize(width, height);\n

    Note

    "},{"location":"imagebox/#set-texture","title":"Set texture","text":"
    image.setTexture(key, frame);\n
    "},{"location":"imagebox/#current-texture","title":"Current texture","text":"
    var textureKey = image.texture.key;\nvar frameName = image.frame.name;\n
    "},{"location":"imagebox/#clear-texture","title":"Clear texture","text":"
    image.setTexture();\n

    Will set internal image game object to invisible.

    "},{"location":"imagebox/#scale-image","title":"Scale image","text":"
    image.scaleImage();\n

    image.resize(width, height), or image.setTexture(key, frame) will invoke this method internally.

    "},{"location":"imagebox/#internal-image-game-object","title":"Internal image game object","text":"
    var internalImageGO = image.image;\n
    "},{"location":"imagebox/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"imagebox/#create-mask","title":"Create mask","text":"

    Create mask from internal image game object (image.image).

    var mask = image.image.createBitmapMask();\n

    See mask

    "},{"location":"imagebox/#shader-effects","title":"Shader effects","text":"

    Internal image game object (image.image) support preFX and postFX effects

    "},{"location":"imageuriloader/","title":"Image URI loader","text":""},{"location":"imageuriloader/#introduction","title":"Introduction","text":"

    Load image by uri (base64 string) in preload stage.

    Built-in image loader dosen't support loading local image uri.

    "},{"location":"imageuriloader/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"imageuriloader/#install-plugin","title":"Install plugin","text":""},{"location":"imageuriloader/#load-minify-file","title":"Load minify file","text":""},{"location":"imageuriloader/#import-plugin","title":"Import plugin","text":""},{"location":"imageuriloader/#import-class","title":"Import class","text":""},{"location":"imageuriloader/#load-image","title":"Load image","text":"

    In preload stage:

    this.load.rexImageURI(key, uri);\n
    "},{"location":"imageuriloader/#load-sprite-sheet","title":"Load sprite sheet","text":"

    In preload stage:

    this.load.rexImageURI(key, uri, frameConfig);\n
    "},{"location":"input/","title":"Input","text":""},{"location":"input/#introduction","title":"Introduction","text":"

    Input system of each scene, built-in object of phaser.

    "},{"location":"input/#usage","title":"Usage","text":""},{"location":"input/#enabledisable","title":"Enable/disable","text":"
    scene.input.enabled = enabled; // enabled: true/false\n
    "},{"location":"inputtext/","title":"Input text","text":""},{"location":"inputtext/#introduction","title":"Introduction","text":"

    Input DOM element.

    "},{"location":"inputtext/#live-demos","title":"Live demos","text":""},{"location":"inputtext/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"inputtext/#install-plugin","title":"Install plugin","text":""},{"location":"inputtext/#load-minify-file","title":"Load minify file","text":""},{"location":"inputtext/#import-plugin","title":"Import plugin","text":""},{"location":"inputtext/#import-class","title":"Import class","text":""},{"location":"inputtext/#add-input-text-object","title":"Add input text object","text":"
    var inputText = scene.add.rexInputText(x, y, width, height, config);\n// var inputText = scene.add.rexInputText(x, y, config);\n// var inputText = scene.add.rexInputText(config);\n

    Default configuration

    {\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\n\ntype: 'text',    // 'text'|'password'|'textarea'|'number'|'color'|...\n\n// Element properties\nid: undefined,\ntext: undefined,\nmaxLength: undefined,\nminLength: undefined,    placeholder: undefined,\ntooltip: undefined,\nreadOnly: false,\nspellCheck: false,\nautoComplete: 'off',\n\n// Style properties\nalign: undefined,\npaddingLeft: undefined,\npaddingRight: undefined,\npaddingTop: undefined,\npaddingBottom: undefined,\nfontFamily: undefined,\nfontSize: undefined,\ncolor: '#ffffff',\nborder: 0,\nbackgroundColor: 'transparent',\nborderColor: 'transparent',\noutline: 'none',\ndirection: 'ltr',\n\nselectAll: false\n}\n
    "},{"location":"inputtext/#custom-class","title":"Custom class","text":""},{"location":"inputtext/#text","title":"Text","text":""},{"location":"inputtext/#style","title":"Style","text":""},{"location":"inputtext/#focus","title":"Focus","text":""},{"location":"inputtext/#font-color","title":"Font color","text":""},{"location":"inputtext/#max-length","title":"Max length","text":""},{"location":"inputtext/#min-length","title":"Min length","text":""},{"location":"inputtext/#placeholder","title":"Placeholder","text":""},{"location":"inputtext/#tooltip","title":"Tooltip","text":""},{"location":"inputtext/#readonly","title":"Readonly","text":""},{"location":"inputtext/#resize","title":"Resize","text":"
    inputText.resize(width, height);\n
    "},{"location":"inputtext/#select-text","title":"Select text","text":""},{"location":"inputtext/#cursor-position","title":"Cursor position","text":""},{"location":"inputtext/#events","title":"Events","text":""},{"location":"inputtext/#bypass-key-input","title":"Bypass key input","text":"

    Registered keyboard events might capture key input.

    var keyObj = scene.input.keyboard.addKey('W', enableCapture, emitOnRepeat);\n

    Set enableCapture to false to bypass key input to this input-text game objecct.

    "},{"location":"inputtext/#other-properties","title":"Other properties","text":"

    See dom game object, game object

    "},{"location":"inputtext/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"

    See dom-element's Interactive with other game objects

    "},{"location":"inputtext/#close-editing","title":"Close editing","text":""},{"location":"interception/","title":"Interception","text":""},{"location":"interception/#introduction","title":"Introduction","text":"

    Predict the intersection position of two game objects with constant moving speed.

    "},{"location":"interception/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"interception/#install-plugin","title":"Install plugin","text":""},{"location":"interception/#load-minify-file","title":"Load minify file","text":""},{"location":"interception/#import-plugin","title":"Import plugin","text":""},{"location":"interception/#import-class","title":"Import class","text":""},{"location":"interception/#create-instance","title":"Create instance","text":"
    var interception = scene.plugins.get('rexInterception').add(gameObject, {\n// target: undefined,\n// enable: true\n});\n
    "},{"location":"interception/#target","title":"Target","text":""},{"location":"interception/#enable-predicting","title":"Enable predicting","text":""},{"location":"interception/#predicted-result","title":"Predicted result","text":""},{"location":"interpolation/","title":"Interpolation","text":""},{"location":"interpolation/#introduction","title":"Introduction","text":"

    Calculates interpolation value over t (0~1), built-in method of phaser.

    "},{"location":"interpolation/#usage","title":"Usage","text":""},{"location":"intouching/","title":"In touching","text":""},{"location":"intouching/#introduction","title":"Introduction","text":"

    Fires 'intouch' event every tick when pressing on a game object.

    "},{"location":"intouching/#live-demos","title":"Live demos","text":""},{"location":"intouching/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"intouching/#install-plugin","title":"Install plugin","text":""},{"location":"intouching/#load-minify-file","title":"Load minify file","text":""},{"location":"intouching/#import-plugin","title":"Import plugin","text":""},{"location":"intouching/#import-class","title":"Import class","text":""},{"location":"intouching/#create-instance","title":"Create instance","text":"
    var intouching = scene.plugins.get('rexInTouching').add(gameObject, {\n// enable: true,\n// cooldown: undefined\n});\n
    "},{"location":"intouching/#events","title":"Events","text":""},{"location":"intouching/#in-touching","title":"In touching","text":"
    var isInTouching = intouching.isInTouching;\n
    "},{"location":"intouching/#enable","title":"Enable","text":""},{"location":"intouching/#cooldown","title":"Cooldown","text":""},{"location":"keyboardcombo/","title":"Combo events","text":""},{"location":"keyboardcombo/#introduction","title":"Introduction","text":"

    Combo-keys events.

    "},{"location":"keyboardcombo/#usage","title":"Usage","text":"
    1. Create combo
      var keyCombo = scene.input.keyboard.createCombo(keys, {\n// resetOnWrongKey: true,\n// maxKeyDelay: 0,\n// resetOnMatch: false,\n// deleteOnMatch: false,\n});\n
    2. Listen combo matching event
      scene.input.keyboard.on('keycombomatch', function (keyCombo, keyboardEvent) { /* ... */ });\n
    "},{"location":"keyboardevents/","title":"Keyboard events","text":""},{"location":"keyboardevents/#introduction","title":"Introduction","text":"

    Built-in keyboard events of phaser.

    "},{"location":"keyboardevents/#usage","title":"Usage","text":""},{"location":"keyboardevents/#quick-start","title":"Quick start","text":""},{"location":"keyboardevents/#key-object","title":"Key object","text":""},{"location":"keyboardevents/#key-object-of-cursorkeys","title":"Key object of cursorkeys","text":"
    1. Get key state object
      var cursorKeys = scene.input.keyboard.createCursorKeys();\n
    2. Get key state
      var isUpDown = cursorKeys.up.isDown;\nvar isDownDown = cursorKeys.down.isDown;\nvar isLeftDown = cursorKeys.left.isDown;\nvar isRightDown = cursorKeys.right.isDown;\nvar isSpaceDown = cursorKeys.space.isDown;\nvar isShiftDown = cursorKeys.shift.isDown;\n
    "},{"location":"keyboardevents/#order-of-key-downkey-up-events","title":"Order of key-down/key-up events","text":"
    1. Key-down/key-up events of key object
      var keyObj = scene.input.keyboard.addKey('W');  // Get key object\nkeyObj.on('down', function(event) { /* ... */ });\nkeyObj.on('up', function(event) { /* ... */ });\n
    2. On key-down/on key-up
      scene.input.keyboard.on('keydown-' + 'W', function (event) { /* ... */ });\nscene.input.keyboard.on('keyup-' + 'W', function (event) { /* ... */ });\n
    3. Any key-down/on key-up
      scene.input.keyboard.on('keydown', function (event) { /* ... */ });\nscene.input.keyboard.on('keyup', function (event) { /* ... */ });\n
    "},{"location":"keyboardevents/#destroy-key-object","title":"Destroy key object","text":"
    keyObj.destroy();\n
    "},{"location":"keyboardevents/#key-map","title":"Key map","text":""},{"location":"layer/","title":"Layer","text":""},{"location":"layer/#introduction","title":"Introduction","text":"

    A local display list, built-in game object of phaser.

    Layers have no position or size

    Layers have no position or size within the Scene

    Layers cannot be added to Containers

    Containers can be added to Layers, but Layers cannot be added to Containers.

    "},{"location":"layer/#usage","title":"Usage","text":""},{"location":"layer/#add-layer","title":"Add layer","text":"
    var layer = scene.add.layer();\n// var layer = scene.add.layer(children);\n
    "},{"location":"layer/#custom-class","title":"Custom class","text":""},{"location":"layer/#add-child","title":"Add child","text":""},{"location":"layer/#remove-child","title":"Remove child","text":"

    Removed game object won't be added to display list of scene, use

    scene.add.existing(gameObject);\n

    to add it back.

    "},{"location":"layer/#get-child","title":"Get child","text":""},{"location":"layer/#iterate","title":"Iterate","text":""},{"location":"layer/#move-child","title":"Move child","text":"

    Note

    Children game objects also sort by depth.

    "},{"location":"layer/#for-each-child","title":"For each child","text":"
    layer.each(function(gameObject) {\n\n}, scope);\n
    "},{"location":"layer/#set-property","title":"Set property","text":"
    layer.setAll(property, value);\n// layer.setAll(property, value, startIndex, endIndex);\n
    "},{"location":"layer/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"layer/#create-mask","title":"Create mask","text":"
    var mask = layer.createBitmapMask();\n

    See mask

    "},{"location":"layer/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"layermanager/","title":"Layer manager","text":""},{"location":"layermanager/#introduction","title":"Introduction","text":"

    A dictionary to store Layer game objects.

    "},{"location":"layermanager/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"layermanager/#install-plugin","title":"Install plugin","text":""},{"location":"layermanager/#load-minify-file","title":"Load minify file","text":""},{"location":"layermanager/#import-plugin","title":"Import plugin","text":""},{"location":"layermanager/#import-class","title":"Import class","text":""},{"location":"layermanager/#create-instance","title":"Create instance","text":"
    var layerManager = scene.plugins.get('rexLayerManager').add(scene, {\n// layerManager: ['layer0', 'layer1', ...]\n});\n

    or

    var layerManager = scene.plugins.get('rexLayerManager').add(scene, ['layer0', 'layer1', ...]\n);\n
    "},{"location":"layermanager/#destroy","title":"Destroy","text":"
    layerManager.destroy()\n

    Also destroy all layers in this layer manager.

    "},{"location":"layermanager/#add-layer","title":"Add layer","text":"
    layerManager.add(name);\n// layerManager.add(name, depth);\n
    "},{"location":"layermanager/#add-game-object-to-layer","title":"Add game object to layer","text":"
    layerManager.addToLayer(name, gameObject);\n

    Note

    Print a warn message if specific layer is not existed.

    "},{"location":"layermanager/#get-layer","title":"Get layer","text":""},{"location":"layermanager/#has-layer","title":"Has layer","text":"
    var hasLayer = layerManager.has(name);\n// var hasLayer = layerManager.exists(name);\n
    "},{"location":"lifetime/","title":"Life time","text":""},{"location":"lifetime/#introduction","title":"Introduction","text":"

    Destroy game object when time-out.

    "},{"location":"lifetime/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"lifetime/#install-plugin","title":"Install plugin","text":""},{"location":"lifetime/#load-minify-file","title":"Load minify file","text":""},{"location":"lifetime/#import-plugin","title":"Import plugin","text":""},{"location":"lifetime/#import-class","title":"Import class","text":""},{"location":"lifetime/#create-instance","title":"Create instance","text":"
    var lifeTime = scene.plugins.get('rexLifeTime').add(gameObject, {\nlifeTime: 1000,\n// destroy: true,\n// start: true\n});\n
    "},{"location":"lifetime/#events","title":"Events","text":""},{"location":"lifetime/#life-time","title":"Life-time","text":""},{"location":"lifetime/#startstoppauseresume","title":"Start/Stop/Pause/Resume","text":""},{"location":"light/","title":"Light","text":""},{"location":"light/#introduction","title":"Introduction","text":"

    lighting system from normal map.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"light/#usage","title":"Usage","text":""},{"location":"light/#light-system","title":"Light system","text":""},{"location":"light/#enable","title":"Enable","text":""},{"location":"light/#ambient-color","title":"Ambient color","text":"
    scene.lights.setAmbientColor(color);\n
    "},{"location":"light/#light","title":"Light","text":""},{"location":"light/#position","title":"Position","text":""},{"location":"light/#color","title":"Color","text":""},{"location":"light/#size","title":"Size","text":""},{"location":"light/#intensity","title":"Intensity","text":""},{"location":"light/#game-object","title":"Game object","text":""},{"location":"light/#load-texture-with-normal-map","title":"Load texture with normal map","text":"
    scene.load.image(key, [url, normalMapUrl]);\n
    "},{"location":"light/#apply-light-pipeline","title":"Apply light pipeline","text":"
    gameObject.setPipeline('Light2D');\n
    "},{"location":"line/","title":"Line","text":""},{"location":"line/#introduction","title":"Introduction","text":"

    Draw a line with start/end/body textures, extended from RenderTexture game object.

    "},{"location":"line/#live-demos","title":"Live demos","text":""},{"location":"line/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"line/#install-plugin","title":"Install plugin","text":""},{"location":"line/#load-minify-file","title":"Load minify file","text":""},{"location":"line/#import-plugin","title":"Import plugin","text":""},{"location":"line/#import-class","title":"Import class","text":""},{"location":"line/#create-instance","title":"Create instance","text":"
    var line = scene.add.rexLine({\nstart: {\nx: 0, y: 0,\nkey: undefined, frame: undefined, origin: 0.5,\n},\n// start: key,\n// start: undefined,\n\nend: {\nx: 0, y: 0,\nkey: undefined, frame: undefined, origin: 1,\n},\n// end: key,\n// end: undefined,\n\nbody: {\nkey: undefined, frame: undefined, extendMode: 1,\nwidth: undefined,\n},\n// body: key,\n});\n
    "},{"location":"line/#custom-class","title":"Custom class","text":""},{"location":"line/#position-of-line-startline-end","title":"Position of line-start/line-end","text":""},{"location":"line/#set-textures","title":"Set textures","text":""},{"location":"line/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"line/#create-mask","title":"Create mask","text":"
    var mask = line.createBitmapMask();\n

    See mask

    "},{"location":"line/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"list-inputtext/","title":"Input text","text":"

    Solutions of single or multiple line(s) input text.

    "},{"location":"live2d/","title":"Live2d","text":""},{"location":"live2d/#introduction","title":"Introduction","text":"

    Display live2d model.

    "},{"location":"live2d/#live-demos","title":"Live demos","text":"

    The example Live2D models, Haru and Hiyori, are redistributed under Live2D's Free Material License.

    "},{"location":"live2d/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"live2d/#install-plugin","title":"Install plugin","text":""},{"location":"live2d/#load-minify-file","title":"Load minify file","text":""},{"location":"live2d/#import-plugin","title":"Import plugin","text":""},{"location":"live2d/#import-class","title":"Import class","text":""},{"location":"live2d/#create-instance","title":"Create instance","text":"
    var live2dGameObject = scene.add.rexLive2d(x, y, key, {\n// autoPlayIdleMotion: motionGroupName\n});\n

    Add live2d from JSON

    var live2d = scene.make.rexLive2d({\nx: 0,\ny: 0,\nkey: 256,\n// autoPlayIdleMotion: motionGroupName,\n\nadd: true\n});\n
    "},{"location":"live2d/#custom-class","title":"Custom class","text":""},{"location":"live2d/#change-model","title":"Change model","text":"
    live2dGameObject.setModel(key);\n

    or

    live2dGameObject.setModel(key, {\n// autoPlayIdleMotion: motionGroupName\n})\n
    "},{"location":"live2d/#expression","title":"Expression","text":""},{"location":"live2d/#motion","title":"Motion","text":""},{"location":"live2d/#look-at","title":"Look at","text":""},{"location":"live2d/#lip-sync","title":"Lip sync","text":""},{"location":"live2d/#hit-test","title":"Hit test","text":""},{"location":"live2d/#touch-events","title":"Touch events","text":"
    1. Set interactive
      live2dGameObject.setInteractive();\n
    2. Register touch events of hit area
    "},{"location":"live2d/#is-hit","title":"Is hit","text":"
    var isHit = live2dGameObject.hitTest(hitAreaName, x, y);\n// var isHit = live2dGameObject.hitTest(hitAreaName, x, y, camera);\n
    "},{"location":"live2d/#parameter","title":"Parameter","text":"
    1. Register parameter
      live2dGameObject.registerParameter(name);\n
    2. Reset and add value
      live2dGameObject\n.resetParameterValue(name)\n.addParameterValue(name, value);\n
      or
      var parameters = live2dGameObject.getParameters();  // {name: value}\nparameters[name] = value;\n
    "},{"location":"loader/","title":"Loader","text":""},{"location":"loader/#introduction","title":"Introduction","text":"

    Load assets, built-in object of phaser.

    "},{"location":"loader/#usage","title":"Usage","text":""},{"location":"loader/#loading-in-preload-stage","title":"Loading in preload stage","text":"
    scene.load.image(key, url);\n// scene.load.image(config); // config: {key, url}\n

    Loader in preload stage will start loading automatically by scene.

    "},{"location":"loader/#loading-after-preload-stage","title":"Loading after preload stage","text":"
    scene.load.image(key, url);   // add task\n// scene.load.image(config); // config: {key, url}\nscene.load.once('complete', callback, scope);  // add callback of 'complete' event\nscene.load.start();                     // start loading\n
    "},{"location":"loader/#set-path","title":"Set path","text":"
    scene.load.setPath(path)\n
    "},{"location":"loader/#more-configurations","title":"More configurations","text":"

    More configurations in game config

    loader:{\nbaseURL: '',\npath: '',\nenableParallel: true,\nmaxParallelDownloads: 4,\ncrossOrigin: undefined,\nresponseType: '',\nasync: true,\nuser: '',\npassword: '',\ntimeout: 0,\nwithCredentials: false,\nimageLoadType: 'XHR',    // 'HTMLImageElement' \nlocalScheme: [ 'file://', 'capacitor://' ]\n},\n
    "},{"location":"loader/#events","title":"Events","text":""},{"location":"loader/#status-of-loader","title":"Status of loader","text":""},{"location":"loader/#file-types","title":"File types","text":""},{"location":"loader/#image","title":"Image","text":"

    Get data from texture cache

    var cache = scene.textures;\nvar data = cache.get(key);\n
    "},{"location":"loader/#sprite-sheet","title":"Sprite sheet","text":"
    scene.load.spritesheet(key, url, {\n// frameWidth: frameWidth,\n// frameHeight: frameHeight,\n// startFrame: startFrame,\n// endFrame: endFrame,\n// margin: margin,\n// spacing: spacing\n});\n// scene.load.spritesheet(key, url, frameConfig, xhrSettings);\n

    Get data from texture cache

    var cache = scene.textures;\nvar data = cache.get(key);\n
    "},{"location":"loader/#texture-atlas","title":"Texture atlas","text":"
    scene.load.atlas(key, textureURL, atlasURL);\n// scene.load.atlas(key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\n

    Get data from texture cache

    var cache = scene.textures;\nvar data = cache.get(key);\n
    "},{"location":"loader/#multi-file-texture-atlas","title":"Multi file texture atlas","text":"
    scene.load.multiatlas(key, atlasURL);\n// scene.load.multiatlas(key, atlasURL, path, baseURL, atlasXhrSettings);\n
    "},{"location":"loader/#unity-texture-atlas","title":"Unity texture atlas","text":"
    scene.load.unityAtlas(key, textureURL, atlasURL);\n// scene.load.unityAtlas(key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\n
    "},{"location":"loader/#animation","title":"Animation","text":"
    scene.load.animation(key, url);\n// scene.load.animation(key, url, dataKey, xhrSettings);\n

    Get data from json cache

    var cache = scene.json;\nvar data = cache.get(key);\n
    "},{"location":"loader/#audio","title":"Audio","text":"
    scene.load.audio(key, urls);\n// scene.load.audio(key, urls, {instances: 1}, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.audio;\nvar data = cache.get(key);\n
    "},{"location":"loader/#audio-sprite","title":"Audio sprite","text":"
    scene.load.audioSprite(key, jsonURL, audioURL, audioConfig);\n// scene.load.audioSprite(key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings);\n
    "},{"location":"loader/#video","title":"Video","text":"
    scene.load.video(key, url, noAudio);\n// scene.load.video(key, url, noAudio, xhrSettings);\n

    Get data from video cache

    var cache = scene.video;\nvar data = cache.get(key);\n
    "},{"location":"loader/#bitmap-font","title":"Bitmap font","text":"
    scene.load.bitmapFont(key, textureURL, fontDataURL);\n// scene.load.bitmapFont(key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings);\n

    Get data from cache

    var cache = scene.cache.bitmapFont;\nvar data = cache.get(key);\n
    "},{"location":"loader/#tile-map","title":"Tile map","text":"

    Get data from cache

    var cache = scene.cache.tilemap;\nvar data = cache.get(key);\n
    "},{"location":"loader/#text","title":"Text","text":"
    scene.load.text(key, url);\n// scene.load.text(key, url, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.text;\nvar data = cache.get(key);\n
    "},{"location":"loader/#json","title":"JSON","text":"
    scene.load.json(key, url);\n// scene.load.json(key, url, dataKey, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.json;\nvar data = cache.get(key);\n
    "},{"location":"loader/#xml","title":"XML","text":"
    scene.load.xml(key, url);\n// scene.load.xml(key, url, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.xml;\nvar data = cache.get(key);\n
    "},{"location":"loader/#html","title":"HTML","text":"
    scene.load.html(key, url);\n// scene.load.html(key, url, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.html;\nvar data = cache.get(key);\n
    "},{"location":"loader/#css","title":"CSS","text":"
    scene.load.css(key, url);\n// scene.load.css(key, url, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.css;\nvar data = cache.get(key);\n
    "},{"location":"loader/#scene","title":"Scene","text":"
    scene.load.sceneFile(key, url);\n// scene.load.sceneFile(key, url, xhrSettings);\n

    The key matches the class name in the JavaScript file.

    "},{"location":"loader/#script","title":"Script","text":"
    scene.load.script(key, url);\n// scene.load.script(key, url, type, xhrSettings);\n
    "},{"location":"loader/#scripts","title":"Scripts","text":"
    scene.load.scripts(key, urlArray);\n// scene.load.scripts(key, urlArray, xhrSettings);\n

    Add scripts in the exact order of urlArray.

    "},{"location":"loader/#glsl","title":"GLSL","text":"
    scene.load.glsl(key, url);\n// scene.load.glsl(key, url, shaderType, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.shader;\nvar data = cache.get(key);\n

    A glsl file can contain multiple shaders, all separated by a frontmatter block.

    ---\nname: type: ---\n\nvoid main(void)\n{\n}\n
    "},{"location":"loader/#binary","title":"Binary","text":"
    scene.load.binary(key, url, dataType);  // dataType: Uint8Array\n// scene.load.binary(key, url, dataType, xhrSettings);\n

    Get data from cache

    var cache = scene.cache.binary;\nvar data = cache.get(key);\n
    "},{"location":"loader/#plugin","title":"Plugin","text":"
    scene.load.plugin(key, url, true); // start plugin when loaded\n// scene.load.plugin(key, url, true, undefined, xhrSettings);\n
    "},{"location":"loader/#scene-plugin","title":"Scene plugin","text":"
    scene.load.scenePlugin(key, url, systemKey, sceneKey);\n// scene.load.scenePlugin(key, url, systemKey, sceneKey, xhrSettings);\n
    "},{"location":"loader/#file-pack","title":"File pack","text":"

    Load files in JSON format.

    scene.load.pack(key, url);\n// scene.load.pack(key, url, dataKey, xhrSettings);\n

    or

    scene.load.pack(key, json);\n// scene.load.pack(key, json, dataKey);\n

    JSON pack file:

    {\n'dataKey': {\n// \"prefix\": \"...\",          // optional, extend key by prefix\n// \"path\": \"...\",            // optional, extend url by path\n// \"defaultType\": \"image\",   // optional, default file type\n'files': [\n{\n'type': 'image',\n'key': '...',\n'url': '...'\n},\n{\n'type': 'image',\n'key': '...',\n'url': '...'\n}\n// ...\n]\n},\n\n'node0': {\n'node1': {\n'node2': {\n'files': [\n// ....\n]\n}\n}\n}\n// dataKey: 'node0.node1.node2'\n}\n

    File type:

    Get pack json data from cache

    var cache = scene.cache.json;  // pack json is stored in json cache\nvar data = cache.get(key);\n

    Event name in 'filecomplete' event : 'filecomplete-packfile-' + key

    "},{"location":"loader/#release-data","title":"Release data","text":"
    var cache = scene.cache.text;\ncache.remove(key);\n
    "},{"location":"loader/#data-in-cache","title":"Data in cache","text":"
    var cache = scene.cache.text;\nvar hasData = cache.exists(key);\n// var hasData = cache.has(key);\n
    "},{"location":"loader/#cache-events","title":"Cache events","text":""},{"location":"loader/#replace","title":"Replace","text":"
    1. Remove key.
    2. Load file again.
    "},{"location":"loader/#xhr-settings-object","title":"XHR Settings Object","text":"

    Parameter xhrSettings

    {\nasync: true,\nuser: '',\npassword: '',\ntimeout: 0,\nheaders: undefined,\nheader: undefined,\nheaderValue: undefined,\nrequestedWith: undefined,\noverrideMimeType: undefined,\nwithCredentials: false\n}\n
    "},{"location":"loadingprogress/","title":"Loading progress","text":""},{"location":"loadingprogress/#introduction","title":"Introduction","text":"

    Pop-up dialog for loading-progress, then scale-down this dialog.

    "},{"location":"loadingprogress/#live-demos","title":"Live demos","text":""},{"location":"loadingprogress/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"loadingprogress/#install-plugin","title":"Install plugin","text":""},{"location":"loadingprogress/#load-minify-file","title":"Load minify file","text":""},{"location":"loadingprogress/#import-plugin","title":"Import plugin","text":""},{"location":"loadingprogress/#import-class","title":"Import class","text":""},{"location":"loadingprogress/#create-instance","title":"Create instance","text":"
    var loadingProgress = scene.plugins.get('rexLoadingProgress').add(gameObject, {\n// duration: {\n//     in: 200,\n//     out: 200\n// }\n\n// progress: function(gameObject, progress) {},\n// transitIn: function(gameObject, duration) {},\n// transitOut: function(gameObject, duration) {},\n});\n
    "},{"location":"loadingprogress/#events","title":"Events","text":""},{"location":"localforage-files/","title":"Files","text":""},{"location":"localforage-files/#introduction","title":"Introduction","text":"

    Save JSON data, using localforage.

    Each file contains header and content indexed by fileID.

    "},{"location":"localforage-files/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"localforage-files/#install-plugin","title":"Install plugin","text":""},{"location":"localforage-files/#load-minify-file","title":"Load minify file","text":""},{"location":"localforage-files/#import-plugin","title":"Import plugin","text":""},{"location":"localforage-files/#import-class","title":"Import class","text":""},{"location":"localforage-files/#create-instance","title":"Create instance","text":"
    var fileManager = scene.plugins.get('rexFiles').add.files({\n// name: 'files',\n// zip: true\n});\n
    "},{"location":"localforage-files/#save-file","title":"Save file","text":""},{"location":"localforage-files/#load-headers","title":"Load headers","text":"
    fileManager.loadHeaders()\n.then(function(result) { // var headers = result.headers;\n})\n.catch(function(result) {\n// var error = result.error;\n})\n
    "},{"location":"localforage-files/#load-file","title":"Load file","text":"
    fileManager.load(fileID)\n.then(function(result) { // var header = result.header;\n// var content = result.content;\n// var fileID = result.fileID;\n})\n.catch(function(result) {\n// var error = result.error;\n// var fileID = result.fileID;\n})\n
    "},{"location":"localforage/","title":"LocalForage","text":""},{"location":"localforage/#introduction","title":"Introduction","text":"

    Offline storage, improved.

    "},{"location":"localforage/#usage","title":"Usage","text":"

    Official document

    Sample code

    By default, LocalForage selects backend drivers for the datastore in this order:

    1. IndexedDB
    2. WebSQL
    3. localStorage
    "},{"location":"localforage/#save-data","title":"Save data","text":""},{"location":"localforage/#read-data","title":"Read data","text":""},{"location":"localforage/#remove-data","title":"Remove data","text":""},{"location":"localstorage-data/","title":"Data manager","text":""},{"location":"localstorage-data/#introduction","title":"Introduction","text":"

    Sync data from data manager to local-storage.

    Max Size

    5MB per app per browser.

    "},{"location":"localstorage-data/#live-demos","title":"Live demos","text":""},{"location":"localstorage-data/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"localstorage-data/#install-plugin","title":"Install plugin","text":""},{"location":"localstorage-data/#load-minify-file","title":"Load minify file","text":""},{"location":"localstorage-data/#import-plugin","title":"Import plugin","text":""},{"location":"localstorage-data/#import-class","title":"Import class","text":""},{"location":"localstorage-data/#create-instance","title":"Create instance","text":"
    var data = scene.plugins.get('rexLocalStorageData').add({\n// name: '',\n// load: true,\n// default: undefined,\n// reset: false\n});\n// var data = scene.plugins.get('rexLocalStorageData').add(parent, config);\n// var data = scene.plugins.get('rexRData').add(parent, eventEmitter, config);\n
    "},{"location":"localstorage-data/#load","title":"Load","text":"
    data.load(defaultData);\n// data.load(defaultData, reset);\n

    Note

    Data loaded from local storage already, if load is true.

    "},{"location":"localstorage-data/#getsetremove-value","title":"Get/set/remove value","text":"

    See built-in data manager.

    "},{"location":"localstorage-data/#reserved-keys","title":"Reserved keys","text":"

    '__keys__' is used internally by this plugin.

    "},{"location":"localstorage-data/#get-default-value","title":"Get default value","text":"
    var value = data.getDefaultValue(key);\n
    "},{"location":"localstorage/","title":"LocalStorage","text":""},{"location":"localstorage/#introduction","title":"Introduction","text":"

    Store small data in key-value pairs locally within the user's browser.

    Max Size

    5MB per app per browser.

    "},{"location":"localstorage/#usage","title":"Usage","text":"

    Reference

    Sample code

    "},{"location":"localstorage/#save-data","title":"Save data","text":"
    localStorage.setItem(key, value);\n
    "},{"location":"localstorage/#read-data","title":"Read data","text":"
    var value = localStorage.getItem(key);\n

    Note

    The keys and the values are always strings. Objects, integer keys will be automatically converted to strings.

    "},{"location":"localstorage/#remove-data","title":"Remove data","text":"
    localStorage.removeItem(key);\n
    "},{"location":"lokijs/","title":"LokiJs","text":""},{"location":"lokijs/#introduction","title":"Introduction","text":"

    In-memory JavaScript Datastore with Persistence.

    "},{"location":"lokijs/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"lokijs/#create-database","title":"Create database","text":"
    var db = new loki();\n// var db = new loki('loki.json', config);  // load database from file\n
    "},{"location":"lokijs/#create-collection","title":"Create collection","text":"
    var collection = db.addCollection(name);\n// var collection = db.addCollection(name, config);\n
    "},{"location":"lokijs/#get-collection","title":"Get collection","text":"
    var collection = db.getCollection(name);\n
    "},{"location":"lokijs/#insert-document","title":"Insert document","text":"
    var docInColl = collection.insert(doc);  // doc: an object\n

    Get Id

    var id = docInColl.$loki;\n
    "},{"location":"lokijs/#insert-documents","title":"Insert documents","text":"
    collection.insert(docArray);  // documents in array\n
    "},{"location":"lokijs/#query","title":"Query","text":""},{"location":"lokijs/#get-document-by-id","title":"Get document by id","text":"
    var doc = collection.get(id);  // id: `$loki`\n
    "},{"location":"lokijs/#get-doc-by-unique-index","title":"Get doc by unique index","text":"
    var doc = collection.by(key, value);\n
    "},{"location":"lokijs/#filter-documents","title":"Filter documents","text":""},{"location":"lokijs/#find-one-document","title":"Find one document","text":"
    var doc = collection.findOne({});\n
    "},{"location":"lokijs/#filter-by-function","title":"Filter by function","text":"
    var docArray = collection.where(function(doc){\n// ...\nreturn isPicked;  // true to pick this document\n})\n
    "},{"location":"lokijs/#sort","title":"Sort","text":""},{"location":"lokijs/#pagination","title":"Pagination","text":"

    Get documents from start to start+count-1.

    var docArray = collection.chain().find({}).offset(start).limit(count).data();\n
    "},{"location":"lokijs/#update","title":"Update","text":"

    Update each filtered documents.

    var docArray = collection.chain().find({}).update(\nfunction(doc) { //\nreturn doc;\n});\n
    "},{"location":"lokijs/#remove","title":"Remove","text":"

    Remove filtered documents.

    collection.chain().find({}).remove();\n
    "},{"location":"lokijs/#map","title":"Map","text":"

    Map document into a new anonymous collection, won't affect original collection.

    var docArray = collection.chain().find({}).map(\nfunction(doc) {\n// ...\nreturn doc\n})\n.data();\n
    "},{"location":"lokijs/#map-reduce","title":"Map-reduce","text":"
    1. Map document into a new anonymous collection
    2. Run reduceFn to get final result value from result set of step 1.
    var mapFn = function(doc) {\n// ...\nreturn doc\n};\nvar reduceFn = function(docArray) {\n// ...\nreturn result;\n}\nvar result = collection.chain().find({}).mapReduce(mapFn, reduceFn);\n
    "},{"location":"lokijs/#clone-result-set","title":"Clone result set","text":"
    var resultSet = collection.chain().find({});\nvar resultSetClone = resultSet.branch();\n\n// resultSetClone.find({}).data();\n
    "},{"location":"lokijs/#dynamic-view","title":"Dynamic view","text":"
    1. Create dynamic view
      var view = children.addDynamicView(name);\n
    2. Add filters
    3. Get result data
      var docArray = view.data();\n

    Add new filters

    var docArray = view.branchResultset().find({}).data();\n

    "},{"location":"lokijs/#speed-up-quering","title":"Speed-up quering","text":""},{"location":"lokijs/#custom-unique-index","title":"Custom unique index","text":"
    1. Define custom unique index
      var collection = db.addCollection(name, {\nunique: [key0]\n});\n
    2. Get document by custom unique index
      var doc = collection.by(key0, value);\n
    "},{"location":"lokijs/#binary-indices","title":"Binary indices","text":"
    1. Define binary index
      var collection = db.addCollection(name, {\nindices: [key0]\n});\n
      Or
      collection.ensureIndex(key);\n
    2. Get documents by normal filters
      var docArray = collection.find({key0: {'$gt': value}});\n
    "},{"location":"lokijs/#methods-of-collection","title":"Methods of collection","text":""},{"location":"lokijs/#serialize-deserialize","title":"Serialize & Deserialize","text":""},{"location":"luxon/","title":"Luxon","text":""},{"location":"luxon/#introduction","title":"Introduction","text":"

    Parse, validate, manipulate, and display dates and times. Reference

    "},{"location":"luxon/#usage","title":"Usage","text":""},{"location":"luxon/#creating-a-datetime","title":"Creating a DateTime","text":"
    const dt = DateTime.local(2017, 5, 15, 8, 30);\n

    or

    var dt = DateTime.fromISO('2017-05-15');\n// var dt = DateTime.fromISO('2017-05-15T17:36');\n// var dt = DateTime.fromISO('2017-W33-4');\n// var dt = DateTime.fromISO('2017-W33-4T04:45:32.343');\n
    "},{"location":"luxon/#current-date-and-time","title":"Current date and time","text":"
    const now = DateTime.now();\n// const now = DateTime.local();\n
    "},{"location":"luxon/#json","title":"JSON","text":""},{"location":"luxon/#math","title":"Math","text":"
    var dt1 = dt0.plus({ hours: 3, minutes: 2 });\nvar dt1 = dt0.minus({ days: 7 });\nvar dt1 = dt0.startOf('day');\nvar dt1 = dt0.endOf('hour');\n
    "},{"location":"luxon/#difference","title":"Difference","text":"
    var i1 = DateTime.fromISO('1982-05-25T09:45'),\ni2 = DateTime.fromISO('1983-10-14T10:30');\ni2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\ni2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\ni2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\ni2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n
    "},{"location":"luxon/#durations","title":"Durations","text":"
    var dur = Duration.fromObject({ hours: 2, minutes: 7 });\n// dt.plus(dur);\n\ndur.as('seconds') //=> 7620\ndur.toObject()    //=> { hours: 2, minutes: 7 }\ndur.toISO()       //=> 'PT2H7M'\n
    "},{"location":"luxon/#parseformat","title":"Parse/Format","text":""},{"location":"luxon/#relative-time","title":"Relative time","text":"

    Returns a string representation of this date relative to today.

    var s = dt.toRelativeCalendar();\n
    var s = dt.toRelativeCalendar({\nbase: dt0,\nlocale: string,\nunit: string\n});\n
    "},{"location":"lzstring/","title":"LZ string","text":""},{"location":"lzstring/#introduction","title":"Introduction","text":"

    Compress string using LZ-based compression algorithm. Reference

    "},{"location":"lzstring/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"lzstring/#install-plugin","title":"Install plugin","text":""},{"location":"lzstring/#load-minify-file","title":"Load minify file","text":""},{"location":"lzstring/#import-plugin","title":"Import plugin","text":""},{"location":"lzstring/#import-class","title":"Import class","text":""},{"location":"lzstring/#create-instance","title":"Create instance","text":"
    var lzstring = scene.plugins.get('rexLZString').add({\n// encoding: 'none'     // 'none'|0, 'base64'|1, 'utf16'|2, 'uri'|3\n});\n
    "},{"location":"lzstring/#compression","title":"Compression","text":"
    var compressionResult = lzstring.compress(src);\n
    "},{"location":"lzstring/#decompression","title":"Decompression","text":"
    var decompressionResult = lzstring.decompress(compressionResult);\n
    "},{"location":"lzstring/#set-encoding","title":"Set encoding","text":"
    lzstring.setEncoding(m);  // 0|'none'|1|'base64'|2|'utf16'|3|'uri'\n
    "},{"location":"mainloop/","title":"Main loop","text":"
    1. game.events prestep event. Global Managers like Input and Sound update.
      1. trigger game.sound.update()
    2. game.events step event. User-land code and plugins
    3. Update the Scene Manager and all active Scenes
      1. scene.events preupdate event
        • Register event
          scene.events.on('preupdate', function(time, delta){\n//\n}, scope);\n
        • InputPlugin.preUpdate()
        • TweenManager.preUpdate() to arrange active targets
        • UpdateList.preUpdate(), to arrange game objects in UpdateList
      2. scene.events update event
        • Register event
          scene.events.on('update', function(time, delta){\n//\n}, scope);\n
        • TweenManager.update(), to run active tweens
        • UpdateList.update
          • gameObject.preUpdate
        • Update arcade world
      3. scene.update()
      4. scene.events postupdate event
        • Register event
          scene.events.on('postupdate', function(time, delta){\n//\n}, scope);\n
    4. game.events poststep event. Final event before rendering starts.
    5. game.renderer.preRender()
    6. game.events prerender event
    7. SceneManager.render()
      1. Sort display list
      2. scene.events prerender event
        • Register event
          scene.events.on('prerender', function(renderer){\n//\n}, scope);\n
      3. Render cameras
      4. scene.events render event
        • Register event
          scene.events.on('render', function(renderer){\n//\n}, scope);\n
    8. game.renderer.postRender()
    9. game.events postrender event. Final event before the step repeats.

    Note

    Each scene is a standalone system.

    "},{"location":"mainloop/#flow-chart","title":"Flow chart","text":""},{"location":"mainloop/#game-loop","title":"Game loop","text":"
    graph TB\n\nsubgraph Render\nGameRenderPreRender[\"game.renderer.preRender()\"]\nGameEventPreRender>\"game.events: prerender\"]\nSceneManagerRender[\"SceneManager.render()<br>...See 'Scene steps'...\"]\nGameRenderPostRender[\"game.renderer.postRender()\"]\nGameEventPostRender>\"game.events: postrender\"]\nend\n\nsubgraph Step\nGameEventPreStep>\"game.events: prestep<br><br>sound.update()\"]\nGameEventStep>\"game.events: step\"]\nSceneManagerUpdate[\"SceneManager.update()<br>...See 'Scene steps'...\"]\nGameEventPostStep>\"game.events: poststep\"]\nend\n\n\nGameEventPreStep --> GameEventStep\nGameEventStep --> SceneManagerUpdate\nSceneManagerUpdate --> GameEventPostStep\nGameEventPostStep --> GameRenderPreRender\nGameRenderPreRender --> GameEventPreRender\nGameEventPreRender --> SceneManagerRender\nSceneManagerRender --> GameRenderPostRender\nGameRenderPostRender --> GameEventPostRender\nGameEventPostRender --> GameEventPreStep
    "},{"location":"mainloop/#scene-steps","title":"Scene steps","text":"
    graph TB\n\nsubgraph Render\nSceneEventPreRender>\"scene.events: prerender\"]\nSceneCameraRender[\"scene.cameras.render()\"]\nSceneEventRender>\"scene.events: render\"]\nend\n\nsubgraph Update\nSceneEventPreUpdate>\"scene.events: preupdate<br><br>InputPlugin.preUpdate()<br>TweenManager.preUpdate()<br>UpdateList.preUpdate()\"]\nSceneEventUpdate>\"scene.events: update<br><br>TweenManager.update()<br>UpdateList.update()<br>gameObject.preUpdate()\"]\nSceneUpdate[\"scene.update()\"]\nSceneEventPostUpdate>\"scene.events: postupdate\"]\nend\n\n\nSceneEventPreUpdate --> SceneEventUpdate\nSceneEventUpdate --> SceneUpdate\nSceneUpdate --> SceneEventPostUpdate\n\nSceneEventPostUpdate -.-> SceneEventPreRender\nSceneEventPreRender --> SceneCameraRender\nSceneCameraRender --> SceneEventRender
    "},{"location":"markedeventsheet/","title":"Markdown event sheets","text":""},{"location":"markedeventsheet/#introduction","title":"Introduction","text":"

    Event sheets contains main condition(s) and actions, in simple markdown format (headings, code block).

    "},{"location":"markedeventsheet/#live-demos","title":"Live demos","text":""},{"location":"markedeventsheet/#usage","title":"Usage","text":""},{"location":"markedeventsheet/#install-plugin","title":"Install plugin","text":""},{"location":"markedeventsheet/#load-minify-file","title":"Load minify file","text":""},{"location":"markedeventsheet/#import-plugin","title":"Import plugin","text":""},{"location":"markedeventsheet/#import-class","title":"Import class","text":""},{"location":"markedeventsheet/#create-instance","title":"Create instance","text":"
    var eventSheetManager = scene.plugins.get('rexMarkedEventSheets').add({\ncommandExecutor: Object,\nparallel: false\n});\n
    "},{"location":"markedeventsheet/#add-event-sheet","title":"Add event sheet","text":"
    eventSheetManager.addEventSheet(content, {\ncommentLineStart: '\\/\\/',\nlineBreak: '\\\\',\nparallel: undefined\n})\n

    or

    eventSheetManager.addEventSheet(content, groupName, {\ncommentLineStart: '\\/\\/',\nlineBreak: '\\\\',\nparallel: undefined\n})\n
    "},{"location":"markedeventsheet/#remove-event-sheet","title":"Remove event sheet","text":""},{"location":"markedeventsheet/#start-running","title":"Start running","text":""},{"location":"markedeventsheet/#stop-running","title":"Stop running","text":""},{"location":"markedeventsheet/#local-memory","title":"Local memory","text":"

    Local memory is shared for all event sheets.

    "},{"location":"markedeventsheet/#states","title":"States","text":""},{"location":"markedeventsheet/#events","title":"Events","text":""},{"location":"markedeventsheet/#structure-of-event-sheet","title":"Structure of event sheet","text":"

    Sample

    "},{"location":"markedeventsheet/#main-headings","title":"Main headings","text":"
    # Title\n\n## [Condition]\n\ncoin > 5\n\n## Script\n\n## [Catch]\n
    "},{"location":"markedeventsheet/#flow-control-instructions","title":"Flow control instructions","text":""},{"location":"markedeventsheet/#simple-branch","title":"Simple branch","text":"
    ## [If]\n\ncoin > 5\n\n### Label\n
    "},{"location":"markedeventsheet/#complex-branch","title":"Complex branch","text":"

    Does not support complex branch (if... else if ... else) inside an event sheet. User can build complex branch by mutiple event sheets with main condition ([Condition] H2 heading). Example

    "},{"location":"markedeventsheet/#while-loop","title":"While loop","text":"
    ## [While]\n\nloopCount > 0\n\n### Label\n
    "},{"location":"markedeventsheet/#break","title":"Break","text":"
    [break]\n
    "},{"location":"markedeventsheet/#exit","title":"Exit","text":"
    [exit]\n
    "},{"location":"markedeventsheet/#custom-command","title":"Custom command","text":"
    commandName\n  param0=value\n  param1=value\n

    For multiple lines parameter :

    ```commandName,param0=value,param1=value\nline0\nline1\nline2\n```\n

    So it will be equal to

    commandName\n  text=...\n  param0=value\n  param1=value\n
    "},{"location":"markedeventsheet/#command-executor","title":"Command executor","text":"

    A command executor for phaser3 engine.

    "},{"location":"markedeventsheet/#create-command-executor-instance","title":"Create command executor instance","text":"
    var commandExecutor = scene.plugins.get('rexMarkedEventSheets').addCommandExecutor(scene, {\nlayers: []\n});\n\n// Add to event sheet manager\n// var eventSheetManager = scene.plugins.get('rexMarkedEventSheets').add({\n//     commandExecutor: commandExecutor\n// });\n
    "},{"location":"markedeventsheet/#game-object","title":"Game object","text":""},{"location":"markedeventsheet/#register-custom-game-object","title":"Register custom game object","text":"
    commandExecutor.addGameObjectManager({\nname: GOTYPE,\n\nviewportCoordinate: false,\n// viewportCoordinate: { viewport: new Phaser.Geom.Rectangle() },\n\nfade: 500,\n// fade: {mode: 'tint', time: 500},\n\ndefaultLayer: layerName,\n\ncommands: {\ncommandName(config, eventSheetManager) {\n// commandExecutor.waitEvent(eventEmitter, eventName);\n}\n}\n})\n
    "},{"location":"markedeventsheet/#create-custom-game-object","title":"Create custom game object","text":"
    GOTYPE\n  id=NAME\n  param0=value\n  param1=value\n
    "},{"location":"markedeventsheet/#set-properties-of-custom-game-object","title":"Set properties of custom game object","text":"
    NAME\n  x=\n  vpx=\n  y=\n  vpy=\n  alpha=\n
    "},{"location":"markedeventsheet/#ease-properties-of-custom-game-object","title":"Ease properties of custom game object","text":"
    NAME.to\n  x=\n  vpx=\n  y=\n  vpy=\n  alpha=\n  duration=1000\n  ease=Linear\n  repeat=0\n  wait=\n
    NAME.yoyo\n  x=\n  vpx=\n  y=\n  vpy=\n  alpha=\n  duration=1000\n  ease=Linear\n  repeat=0\n  wait=\n
    "},{"location":"markedeventsheet/#invoke-custom-command","title":"Invoke custom command","text":"
    NAME.commandName\n  param0=value\n  param1=value\n

    Do nothing if gameObject or commandName is not found.

    "},{"location":"markedeventsheet/#destroy-custom-game-object","title":"Destroy custom game object","text":"
    NAME.destroy\n
    "},{"location":"markedeventsheet/#wait","title":"Wait","text":""},{"location":"markedeventsheet/#wait-click","title":"Wait click","text":"
    click\n
    "},{"location":"markedeventsheet/#wait-any","title":"Wait any","text":"
    wait\n  click\n  key=keyName\n  time=\n

    Emit these events from eventSheetManager

    "},{"location":"markedeventsheet/#sound","title":"Sound","text":"

    This command executor provides

    "},{"location":"markedeventsheet/#sound-properties","title":"Sound properties","text":"
    bgm\n  volume\n  mute\n  unmute\n
    "},{"location":"markedeventsheet/#play-sound","title":"Play sound","text":"
    bgm.play\n  key=\n  // volume\n  // detune\n  // rate\n  fadeIn=0\n  // loop\n  wait=false\n
    "},{"location":"markedeventsheet/#cross-fade-in-sound","title":"Cross fade in sound","text":"
    bgm.cross\n  key=\n  duration=500\n  wait=false\n
    "},{"location":"markedeventsheet/#stop-sound","title":"Stop sound","text":"
    bgm.stop\n
    "},{"location":"markedeventsheet/#fade-out-sound","title":"Fade out sound","text":"
    bgm.fadeOut\n  duration=500\n  stop=true\n  wait=false\n
    "},{"location":"markedeventsheet/#fade-in-sound","title":"Fade in sound","text":"
    bgm.fadeIn\n  duration=500\n
    "},{"location":"markedeventsheet/#pause-sound","title":"Pause sound","text":"
    bgm.pause\n
    "},{"location":"markedeventsheet/#resume-sound","title":"Resume sound","text":"
    bgm.resume\n
    "},{"location":"markedeventsheet/#mute-sound","title":"Mute sound","text":"
    bgm.mute\n
    "},{"location":"markedeventsheet/#unmute-sound","title":"Unmute sound","text":"
    bgm.unmute\n
    "},{"location":"markedeventsheet/#camera","title":"Camera","text":""},{"location":"markedeventsheet/#camera-properties","title":"Camera properties","text":"
    camera\n  x=\n  y=\n  rotate=\n  zoom=\n

    Run next command immediately.

    "},{"location":"markedeventsheet/#fade-in","title":"Fade in","text":"
    camera.fadeIn\n  duration=1000\n  red\n  green\n  blue\n  wait=false\n
    "},{"location":"markedeventsheet/#fade-out","title":"Fade out","text":"
    camera.fadeOut\n  duration=1000\n  red\n  green\n  blue\n  wait=false\n
    "},{"location":"markedeventsheet/#flash","title":"Flash","text":"
    camera.flash\n  duration=1000\n  red\n  green\n  blue\n  wait=false\n
    "},{"location":"markedeventsheet/#shake","title":"Shake","text":"
    camera.shake\n  duration=1000\n  intensity\n  wait=false\n
    "},{"location":"markedeventsheet/#zoom","title":"Zoom","text":"
    camera.zoomTo\n  duration=1000\n  zoom\n  wait=false\n
    "},{"location":"markedeventsheet/#rotate-to","title":"Rotate to","text":"
    camera.rotateTo\n  duration=1000\n  rotate\n  ease\n  wait=false\n
    "},{"location":"markedeventsheet/#scroll-to","title":"Scroll to","text":"
    camera.scrollTo\n  duration=1000\n  x\n  y\n  ease\n  wait=false\n
    "},{"location":"markedeventsheet/#add-custom-command","title":"Add custom command","text":"
    commandExecutor.addCommand(commandName, function(config, eventSheetManager){\n// return eventEmitter;\n}, scope);\n
    "},{"location":"mask/","title":"Mask","text":""},{"location":"mask/#introduction","title":"Introduction","text":"

    Apply mask on game object. Built-in render of phaser.

    "},{"location":"mask/#usage","title":"Usage","text":""},{"location":"mask/#add-mask","title":"Add mask","text":""},{"location":"mask/#create-mask-object","title":"Create mask object","text":""},{"location":"mask/#bitmap-mask","title":"Bitmap mask","text":"
    1. Create image (image, sprite, bitmap text, particles, text),or shader
      var shape = scene.add.image(x, y, key).setVisible(false);\n
    2. Create mask
      var mask = shape.createBitmapMask();\n
      or
      var mask = scene.add.bitmapMask(shape);\n

    or

    var mask =  scene.add.bitmapMask(undefined, x, y, key, frame);\n
    "},{"location":"mask/#geometry-mask","title":"Geometry mask","text":"

    The mask is essentially a clipping path which can only make a masked pixel fully visible or fully invisible without changing its alpha (opacity).

    1. Create graphics
      var shape = scene.make.graphics();\n
    2. Create mask
      var mask = shape.createGeometryMask();\n
    "},{"location":"mask/#apply-mask-object","title":"Apply mask object","text":"
    gameObject.setMask(mask); // image.mask = mask;\n

    A mask object could be added to many game objects.

    Error

    Don't put game object and its mask into a container together. See this testing, enable line 22-24.

    Note

    Bitmap Mask is WebGL only.

    Note

    Can combine Geometry Masks and Blend Modes on the same Game Object, but Bitmap Masks can't.

    "},{"location":"mask/#clear-mask","title":"Clear mask","text":""},{"location":"mask/#invert-alpha","title":"Invert alpha","text":"

    Only GeometryMask has inverse alpha feature.

    "},{"location":"mask/#get-shape-game-object","title":"Get shape game object","text":""},{"location":"matterjs-attractor/","title":"Attractor","text":""},{"location":"matterjs-attractor/#introduction","title":"Introduction","text":"

    Apply continual forces on bodies.

    "},{"location":"matterjs-attractor/#usage","title":"Usage","text":""},{"location":"matterjs-attractor/#system-configuration","title":"System configuration","text":""},{"location":"matterjs-attractor/#matter-object-configuration","title":"Matter object configuration","text":"
    var options = {\n// ...\nplugin: {\nattractors: [\ncallback,\n// ...\n]\n},\n// ...\n}\n
    "},{"location":"matterjs-gameobject/","title":"Game object","text":""},{"location":"matterjs-gameobject/#introduction","title":"Introduction","text":"

    Matterjs physics Image/Sprite/Group object.

    "},{"location":"matterjs-gameobject/#usage","title":"Usage","text":""},{"location":"matterjs-gameobject/#add-physics-object","title":"Add physics object","text":"

    Enable physics world

    "},{"location":"matterjs-gameobject/#image-object","title":"Image object","text":"
    var image = scene.matter.add.image(x, y, key, frame);\n// var image = scene.matter.add.image(x, y, key, frame, config);\n
    "},{"location":"matterjs-gameobject/#sprite-object","title":"Sprite object","text":"
    var image = scene.matter.add.sprite(x, y, key, frame);\n// var image = scene.matter.add.sprite(x, y, key, frame, config);\n
    "},{"location":"matterjs-gameobject/#any-game-object","title":"Any game object","text":"
    var gameObject = scene.matter.add.gameObject(gameObject);\n// var gameObject = scene.matter.add.gameObject(gameObject, config);\n
    "},{"location":"matterjs-gameobject/#image-composite","title":"Image composite","text":"

    Create a new composite containing Matter Image objects created in a grid arrangement.

    var composite = scene.matter.add.imageStack(key, frame, x, y, columns, rows);\n// var composite = scene.matter.add.imageStack(key, frame, x, y, columns, rows, columnGap, rowGap, options);\n
    "},{"location":"matterjs-gameobject/#config","title":"Config","text":"
    {\nlabel: 'Body',\nshape: 'rectangle',\nchamfer: null,\n\nisStatic: false,\nisSensor: false,\nisSleeping: false,\nignoreGravity: false,\nignorePointer: false,\n\nsleepThreshold: 60,\ndensity: 0.001,\nrestitution: 0,\nfriction: 0.1,\nfrictionStatic: 0.5,\nfrictionAir: 0.01,\n\nforce: { x: 0, y: 0 },\nangle: 0,\ntorque: 0,\n\ncollisionFilter: {\ngroup: 0,\ncategory: 0x0001,\nmask: 0xFFFFFFFF,\n},\n\n// parts: [],\n\n// plugin: {\n//     attractors: [\n//         (function(bodyA, bodyB) { return {x, y}}),\n//     ]\n// },\n\nslop: 0.05,\n\ntimeScale: 1,\n}\n
    "},{"location":"matterjs-gameobject/#collision","title":"Collision","text":"

    Collisions between two bodies will obey the following rules:

    "},{"location":"matterjs-gameobject/#movement","title":"Movement","text":""},{"location":"matterjs-gameobject/#velocity","title":"Velocity","text":"
    gameObject.setVelocity(x, y);\n
    gameObject.setVelocityX(x);\n
    gameObject.setVelocityY(x);\n
    "},{"location":"matterjs-gameobject/#acceleration","title":"Acceleration","text":""},{"location":"matterjs-gameobject/#force","title":"Force","text":""},{"location":"matterjs-gameobject/#gravity","title":"Gravity","text":""},{"location":"matterjs-gameobject/#friction","title":"Friction","text":"
    gameObject.setFriction(value, air, fstatic);\n
    gameObject.setFrictionAir(v);\n
    gameObject.setFrictionStatic(v);\n
    "},{"location":"matterjs-gameobject/#rotation","title":"Rotation","text":""},{"location":"matterjs-gameobject/#fixed-rotation","title":"Fixed rotation","text":"
    gameObject.setFixedRotation();\n
    "},{"location":"matterjs-gameobject/#angular-velocity","title":"Angular velocity","text":"
    gameObject.setAngularVelocity(v);\n
    "},{"location":"matterjs-gameobject/#collision_1","title":"Collision","text":""},{"location":"matterjs-gameobject/#enable","title":"Enable","text":""},{"location":"matterjs-gameobject/#collision-group","title":"Collision group","text":""},{"location":"matterjs-gameobject/#collision-event","title":"Collision event","text":"
    scene.matter.world.on('collisionstart', function (event, bodyA, bodyB) {\n// var pairs = event.pairs;\n});\n
    "},{"location":"matterjs-gameobject/#collision-bound","title":"Collision bound","text":""},{"location":"matterjs-gameobject/#bounce","title":"Bounce","text":"
    gameObject.setBounce(v);\n
    "},{"location":"matterjs-gameobject/#mass","title":"Mass","text":"
    gameObject.setMass(v);\n
    gameObject.setDensity(v);\n
    "},{"location":"matterjs-gameobject/#sleep","title":"Sleep","text":""},{"location":"matterjs-gameobject/#enable_1","title":"Enable","text":"
    var config = {\n// ...\nphysics: {\nmatter: {\n// ...\nenableSleeping: true\n// ...\n}\n}\n\n}\n
    "},{"location":"matterjs-gameobject/#sleep-threshold","title":"Sleep threshold","text":"
    gameObject.setSleepThreshold(value);\n
    "},{"location":"matterjs-gameobject/#sleep-events","title":"Sleep events","text":""},{"location":"matterjs-world/","title":"World","text":""},{"location":"matterjs-world/#introduction","title":"Introduction","text":"

    Matter physics engine in phaser.

    "},{"location":"matterjs-world/#usage","title":"Usage","text":""},{"location":"matterjs-world/#configuration","title":"Configuration","text":"
    var config = {\n// ...\nphysics: {\ndefault: 'matter',\nmatter: {\n//    enabled: true,\n//    positionIterations: 6,\n//    velocityIterations: 4,\n//    constraintIterations: 2,\n//    enableSleeping: false,\n//    plugins: {\n//        attractors: false,\n//        wrap: false,\n//    },\n//    gravity: {\n//        x: 0,\n//        y: 0,\n//    }\n//    setBounds: {\n//        x: 0,\n//        y: 0,\n//        width: scene.sys.scale.width,\n//        height: scene.sys.scale.height,\n//        thickness: 64,\n//        left: true,\n//        right: true,\n//        top: true,\n//        bottom: true,\n//    },\n//    timing: {\n//        timestamp: 0,\n//        timeScale: 1,\n//    },\n//    correction: 1,\n//    getDelta: (function() { return 1000 / 60; }),\n//    autoUpdate: true,\n//    debug: false,\n//    debug: {\n//        showAxes: false,\n//        showAngleIndicator: false,\n//        angleColor: 0xe81153,\n//        showBroadphase: false,\n//        broadphaseColor: 0xffb400,\n//        showBounds: false,\n//        boundsColor: 0xffffff,\n//        showVelocity: false,\n//        velocityColor: 0x00aeef,\n//        showCollisions: false,\n//        collisionColor: 0xf5950c,\n//        showSeparations: false,\n//        separationColor: 0xffa500,\n//        showBody: true,\n//        showStaticBody: true,\n//        showInternalEdges: false,\n//        renderFill: false,\n//        renderLine: true,\n//        fillColor: 0x106909,\n//        fillOpacity: 1,\n//        lineColor: 0x28de19,\n//        lineOpacity: 1,\n//        lineThickness: 1,\n//        staticFillColor: 0x0d177b,\n//        staticLineColor: 0x1327e4,\n//        showSleeping: false,\n//        staticBodySleepOpacity: 0.7,\n//        sleepFillColor: 0x464646,\n//        sleepLineColor: 0x999a99,\n//        showSensors: true,\n//        sensorFillColor: 0x0d177b,\n//        sensorLineColor: 0x1327e4,\n//        showPositions: true,\n//        positionSize: 4,\n//        positionColor: 0xe042da,\n//        showJoint: true,\n//        jointColor: 0xe0e042,\n//        jointLineOpacity: 1,\n//        jointLineThickness: 2,\n//        pinSize: 4,\n//        pinColor: 0x42e0e0,\n//        springColor: 0xe042e0,\n//        anchorColor: 0xefefef,\n//        anchorSize: 4,\n//        showConvexHulls: false,\n//        hullColor: 0xd703d0\n//    }\n}\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"matterjs-world/#control","title":"Control","text":""},{"location":"matterjs-world/#pause","title":"Pause","text":"
    scene.matter.world.pause();\n
    "},{"location":"matterjs-world/#resume","title":"Resume","text":"
    scene.matter.world.resume();\n
    "},{"location":"matterjs-world/#drag-object","title":"Drag object","text":"
    scene.matter.add.mouseSpring();\n// scene.matter.add.mouseSpring(options);\n
    "},{"location":"matterjs-world/#world-bounds","title":"World bounds","text":""},{"location":"matterjs-world/#enable","title":"Enable","text":""},{"location":"matterjs-world/#gravity","title":"Gravity","text":""},{"location":"matterjs-world/#constraint","title":"Constraint","text":""},{"location":"matterjs-world/#constraint-of-2-game-objects","title":"Constraint of 2 game objects","text":"
    var constraint = scene.matter.add.constraint(gameObjectA, gameObjectB);\n// var constraint = scene.matter.add.constraint(gameObjectA, gameObjectB, length, stiffness, options);\n

    Alias:

    var constraint = scene.matter.add.spring(gameObjectA, gameObjectB, length, stiffness, options);\nvar constraint = scene.matter.add.joint(gameObjectA, gameObjectB, length, stiffness, options);\n
    "},{"location":"matterjs-world/#constraint-to-world-position","title":"Constraint to world position","text":"
    var constraint = scene.matter.add.worldConstraint(gameObjectB, length, stiffness, options);\n
    "},{"location":"matterjs-world/#chain-game-objects","title":"Chain game objects","text":"
    var composite = scene.matter.add.chain(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options);\n
    "},{"location":"matterjs-world/#remove-constraint","title":"Remove constraint","text":"
    scene.matter.world.removeConstraint(constraint);\n
    "},{"location":"matterjs-wrap/","title":"Wrap","text":""},{"location":"matterjs-wrap/#introduction","title":"Introduction","text":"

    Automatically wrap the position of bodies and composites such that they always stay within the given bounds.

    "},{"location":"matterjs-wrap/#usage","title":"Usage","text":""},{"location":"matterjs-wrap/#system-configuration","title":"System configuration","text":""},{"location":"matterjs-wrap/#matter-object-configuration","title":"Matter object configuration","text":"
    var options = {\n// ...\nplugin: {\nwrap: {\nmin: {\nx: 0,\ny: 0\n},\nmax: {\nx: 1024,\ny: 1024\n}\n}\n},\n// ...\n}\n
    "},{"location":"mesh/","title":"Mesh","text":""},{"location":"mesh/#introduction","title":"Introduction","text":"

    Render a group of textured vertices and manipulate the view of those vertices, such as rotation, translation or scaling.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"mesh/#usage","title":"Usage","text":""},{"location":"mesh/#quad","title":"Quad","text":"

    Note

    See also Plane

    1. Load texture
      scene.load.image(key, url);\n
    2. Add mesh object
      var mesh = scene.add.mesh(x, y, texture, frame);\n
      or
      var mesh = scene.make.mesh({\nx: 0,\ny: 0,\nadd: true,\n\nkey: null,\nframe: null\n});\n
    3. Set perspective or orthographic projection
    4. Creates a grid of vertices
      Phaser.Geom.Mesh.GenerateGridVerts({\nmesh: mesh,\ntexture: textureKey,\nframe: frameName,\nwidth: 1,\nheight: 1,\nwidthSegments: 1,\nheightSegments: 1,\n\n// x: 0,\n// y: 0,\n// colors: 0xffffff,\n// alphas: 1,\n// tile: false,\n// isOrtho: false\n})\n
    "},{"location":"mesh/#model","title":"Model","text":"
    1. Load model
      scene.load.obj(key, url, objURL, matURL);\n
    2. Add mesh object
      var mesh = scene.add.mesh(x, y);\n
      or
      var mesh = scene.make.mesh({\nx: 0,\ny: 0,\nadd: true\n});\n
    3. Add model
      mesh.addVerticesFromObj(key, scale, x, y, z, rotateX, rotateY, rotateZ, zIsUp);\n
    "},{"location":"mesh/#custom-mesh-class","title":"Custom mesh class","text":""},{"location":"mesh/#control","title":"Control","text":""},{"location":"mesh/#view","title":"View","text":""},{"location":"mesh/#model_1","title":"Model","text":""},{"location":"mesh/#backward-facing-faces","title":"Backward facing Faces","text":""},{"location":"mesh/#faces","title":"Faces","text":"

    Mesh is composed of triangle faces.

    var faces = mesh.faces;\n
    "},{"location":"mesh/#contains","title":"Contains","text":""},{"location":"mesh/#properties","title":"Properties","text":""},{"location":"mesh/#vertices","title":"Vertices","text":"

    Each face has 3 vertices.

    var vertices = mesh.vertices;\n
    "},{"location":"mesh/#properties_1","title":"Properties","text":""},{"location":"mesh/#update-properties","title":"Update properties","text":""},{"location":"mesh/#interactive","title":"Interactive","text":"

    To test if pointer is at any face of this mesh game object.

    mesh.setInteractive();\n
    "},{"location":"mesh/#debug","title":"Debug","text":"
    1. Set debug Graphics
      var debugGraphics = scene.add.graphics();\nmesh.setDebug(debugGraphics);\n
    2. Update Graphics in scene.update() method.
      debugGraphics.clear();\ndebugGraphics.lineStyle(1, 0x00ff00);\n
    "},{"location":"mesh/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"mesh/#create-mask","title":"Create mask","text":"
    var mask = mesh.createBitmapMask();\n

    See mask

    "},{"location":"mesh/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"modal-promise/","title":"Modal promise","text":""},{"location":"modal-promise/#introduction","title":"Introduction","text":"

    Modal behavior wrapped into promise.

    "},{"location":"modal-promise/#live-demos","title":"Live demos","text":""},{"location":"modal-promise/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"modal-promise/#install-plugin","title":"Install plugin","text":""},{"location":"modal-promise/#load-minify-file","title":"Load minify file","text":""},{"location":"modal-promise/#import-plugin","title":"Import plugin","text":""},{"location":"modal-promise/#import-class","title":"Import class","text":""},{"location":"modal-promise/#promise","title":"Promise","text":"
    scene.plugins.get('rexModal').promise(gameObject, config)\n.then(function(closeEventData) {\n})\n
    "},{"location":"modal-promise/#close","title":"Close","text":"

    scene.plugins.get('rexModal').close(gameObject);\n// scene.plugins.get('rexModal').close(gameObject, closeEventData);\n
    or
    gameObject.emit('modal.requestClose');\n// gameObject.emit('modal.requestClose', closeEventData);\n

    graph TB\n\nPromise[\"promose('gameObject, config)\"]\nOnOpen[\"gameObject.on('modal.open')\"]\nRequestCloseEvent[\"gameObject.emit('modal.requestClose', closeEventData)\"]\nTimeOut[\"Timeout<br>Any touch\"]\nOnClose[\"gameObject.on('modal.close')\"]\nResolve[\"then(function(closeEventData) { })\"]\n\nPromise --> |Transition-in| OnOpen\nOnOpen --> |manualClose| RequestCloseEvent\nOnOpen --> |Not manualClose| TimeOut\nRequestCloseEvent --> |Transition-out| OnClose\nTimeOut --> |Transition-out| OnClose\nOnClose --> Resolve
    "},{"location":"modal-promise/#events","title":"Events","text":""},{"location":"modal/","title":"Modal behavior","text":""},{"location":"modal/#introduction","title":"Introduction","text":"

    Pop-up modal dialog, then scale-down this dialog.

    "},{"location":"modal/#live-demos","title":"Live demos","text":""},{"location":"modal/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"modal/#install-plugin","title":"Install plugin","text":""},{"location":"modal/#load-minify-file","title":"Load minify file","text":""},{"location":"modal/#import-plugin","title":"Import plugin","text":""},{"location":"modal/#import-class","title":"Import class","text":""},{"location":"modal/#create-instance","title":"Create instance","text":"
    var modal = scene.plugins.get('rexModal').add(gameObject, {\n// cover: {\n//     color: 0x0,\n//     alpha: 0.8,\n//     transitIn: function(gameObject, duration) { },\n//     transitOut: function(gameObject, duration) { },\n// },\n// cover: false, \n\n// When to close modal dialog?\n// touchOutsideClose: false,\n// anyTouchClose: false,\n// timeOutClose: false,\n// manualClose: false,\n\n// duration: {\n//     in: 200,\n//     hold: 2000,\n//     out: 200\n// }\n\n// transitIn: 0,\n// transitOut: 0,\n\n// destroy: true,\n// openOnStart: true\n});\n
    "},{"location":"modal/#open","title":"Open","text":""},{"location":"modal/#close","title":"Close","text":"
    modal.requestClose();\n// modal.requestClose(closeEventData);\n
    "},{"location":"modal/#events","title":"Events","text":""},{"location":"mousewheel/","title":"Mouse wheel","text":""},{"location":"mousewheel/#introduction","title":"Introduction","text":"

    Mouse wheel events of phaser.

    "},{"location":"mousewheel/#usage","title":"Usage","text":""},{"location":"mousewheel/#mouse-wheel-events","title":"Mouse wheel events","text":"
    1. Events on touched Game object
      gameObject.on('wheel', function(pointer, dx, dy, dz, event){ /* ... */ });\n
    2. Event on input plugin for each touched Game object
      scene.input.on('gameobjectwheel', function(pointer, gameObject, dx, dy, dz, event){ /* ... */ });\n
    3. Events to get all touched Game Objects
      scene.input.on('wheel', function(pointer, currentlyOver, dx, dy, dz, event){ /* ... */ });\n
    "},{"location":"mousewheel/#mouse-wheel-properties","title":"Mouse wheel properties","text":""},{"location":"mousewheelscroller/","title":"Mouse wheel scroller","text":""},{"location":"mousewheelscroller/#introduction","title":"Introduction","text":"

    Emit scroll event when mouse-wheeling.

    "},{"location":"mousewheelscroller/#live-demos","title":"Live demos","text":""},{"location":"mousewheelscroller/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"mousewheelscroller/#install-plugin","title":"Install plugin","text":""},{"location":"mousewheelscroller/#load-minify-file","title":"Load minify file","text":""},{"location":"mousewheelscroller/#import-plugin","title":"Import plugin","text":""},{"location":"mousewheelscroller/#import-class","title":"Import class","text":""},{"location":"mousewheelscroller/#create-instance","title":"Create instance","text":"
    var scroller = scene.plugins.get('rexMouseWheelScroller').add(gameObject, {\n// focus: false,\n// speed: 0.1,\n// enable: true,\n});\n
    "},{"location":"mousewheelscroller/#event","title":"Event","text":""},{"location":"mousewheelscroller/#speed","title":"Speed","text":""},{"location":"mousewheelscroller/#enable","title":"Enable","text":""},{"location":"mousewheeltoupdown/","title":"Mouse-wheel to up/down","text":""},{"location":"mousewheeltoupdown/#introduction","title":"Introduction","text":"

    Map mouse-wheeling to (up/down) cursor key state.

    "},{"location":"mousewheeltoupdown/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"mousewheeltoupdown/#install-plugin","title":"Install plugin","text":""},{"location":"mousewheeltoupdown/#load-minify-file","title":"Load minify file","text":""},{"location":"mousewheeltoupdown/#import-plugin","title":"Import plugin","text":""},{"location":"mousewheeltoupdown/#import-class","title":"Import class","text":""},{"location":"mousewheeltoupdown/#create-instance","title":"Create instance","text":"
    var mouseWheelToUpDown = scene.plugins.get('rexMouseWheelToUpDown').add(scene);\n
    "},{"location":"mousewheeltoupdown/#state-of-cursor-keys","title":"State of cursor keys","text":"
    var cursorKeys = mouseWheelToUpDown.createCursorKeys();\n\nvar upKeyDown = cursorKeys.up.isDown;\nvar downKeyDown = cursorKeys.down.isDown;\n

    Or

    var upKeyDown = mouseWheelToUpDown.up;\nvar downKeyDown = mouseWheelToUpDown.down;\nvar noKeyDown = mouseWheelToUpDown.noKey;\n
    "},{"location":"mousewheeltoupdown/#destroy","title":"Destroy","text":"
    mouseWheelToUpDown.destroy();\n
    "},{"location":"moveto/","title":"Move to","text":""},{"location":"moveto/#introduction","title":"Introduction","text":"

    Move game object towards target position with a steady speed.

    "},{"location":"moveto/#live-demos","title":"Live demos","text":""},{"location":"moveto/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"moveto/#install-plugin","title":"Install plugin","text":""},{"location":"moveto/#load-minify-file","title":"Load minify file","text":""},{"location":"moveto/#import-plugin","title":"Import plugin","text":""},{"location":"moveto/#import-class","title":"Import class","text":""},{"location":"moveto/#create-instance","title":"Create instance","text":"
    var moveTo = scene.plugins.get('rexMoveTo').add(gameObject, {\n// speed: 400,\n// rotateToTarget: false\n});\n
    "},{"location":"moveto/#start-moving","title":"Start moving","text":""},{"location":"moveto/#target-position","title":"Target position","text":"
    var targetX = moveTo.targetX;\nvar targetY = moveTo.targetY;\n
    "},{"location":"moveto/#enable","title":"Enable","text":""},{"location":"moveto/#pause-resume-stop-moving","title":"Pause, Resume, stop moving","text":"
    moveTo.pause();\nmoveTo.resume();\nmoveTo.stop();\n
    "},{"location":"moveto/#set-speed","title":"Set speed","text":"
    moveTo.setSpeed(speed);\n// moveTo.speed = speed;\n
    "},{"location":"moveto/#set-rotate-to-target","title":"Set rotate-to-target","text":"
    moveTo.setRotateToTarget(rotateToTarget);\n
    "},{"location":"moveto/#events","title":"Events","text":""},{"location":"moveto/#status","title":"Status","text":""},{"location":"mustache/","title":"Mustache","text":""},{"location":"mustache/#introduction","title":"Introduction","text":"

    Format string with variables. Reference

    "},{"location":"mustache/#usage","title":"Usage","text":"
    var template = 'hello, {{name}}';\nvar view = {\nname: 'rex'\n};\nvar result = Mustache.render(template, view);\n
    "},{"location":"ninepatch/","title":"Nine patch","text":""},{"location":"ninepatch/#introduction","title":"Introduction","text":"

    Stretchable image, extended from RenderTexture game object.

    "},{"location":"ninepatch/#live-demos","title":"Live demos","text":""},{"location":"ninepatch/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ninepatch/#install-plugin","title":"Install plugin","text":""},{"location":"ninepatch/#load-minify-file","title":"Load minify file","text":""},{"location":"ninepatch/#import-plugin","title":"Import plugin","text":""},{"location":"ninepatch/#import-class","title":"Import class","text":""},{"location":"ninepatch/#create-instance","title":"Create instance","text":"
    var ninePatch = scene.add.rexNinePatch(x, y, width, height, key, baseFrame, columns, rows, {\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch(x, y, width, height, key, columns, rows, {\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch(x, y, width, height, key, {\ncolumns: undefined, // leftWidth: undefined, right: undefined,\nrows: undefined,    // topHeight: undefined, bottomHeight: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch(x, y, width, height, {\nkey: undefined,\ncolumns: undefined, // leftWidth: undefined, right: undefined,\nrows: undefined,    // topHeight: undefined, bottomHeight: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch(x, y, {\nwidth: 1, height: 1,\nkey: undefined,\ncolumns: undefined, // leftWidth: undefined, right: undefined,\nrows: undefined,    // topHeight: undefined, bottomHeight: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch({\nx: 0, y: 0,\nwidth: 1, height: 1,\nkey: undefined,\ncolumns: undefined, // leftWidth: undefined, rightWidth: undefined,\nrows: undefined,    // topHeight: undefined, bottomHeight: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n
    "},{"location":"ninepatch/#custom-class","title":"Custom class","text":""},{"location":"ninepatch/#resize","title":"Resize","text":"
    ninePatch.resize(width, height);\n

    Will update texture

    "},{"location":"ninepatch/#set-base-texture-of-source-image","title":"Set base texture of source image","text":"
    ninePatch.setBaseTexture(key, baseFrame, columns, rows);\n

    or

    ninePatch.setBaseTexture(key, baseFrame, leftWidth, rightWidth, topHeight, bottomHeight);\n

    Will update texture

    "},{"location":"ninepatch/#set-stretch-mode","title":"Set stretch mode","text":"
    ninePatch.setStretchMode(mode);\n
    "},{"location":"ninepatch/#set-get-frame-name-callback","title":"Set get-frame-name callback","text":"
    ninePatch.setGetFrameNameCallback(callback);\n
    "},{"location":"ninepatch/#fixed-part-scale","title":"Fixed-part scale","text":""},{"location":"ninepatch/#update-texture","title":"Update texture","text":"
    ninePatch.updateTexture();\n
    "},{"location":"ninepatch/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"ninepatch/#create-mask","title":"Create mask","text":"
    var mask = ninePatch.createBitmapMask();\n

    See mask

    "},{"location":"ninepatch/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"ninepatch/#compare-with-nine-slice","title":"Compare with nine-slice","text":""},{"location":"ninepatch2/","title":"Nine patch2","text":""},{"location":"ninepatch2/#introduction","title":"Introduction","text":"

    Stretchable image. Has better performance than nine-patch.

    "},{"location":"ninepatch2/#live-demos","title":"Live demos","text":""},{"location":"ninepatch2/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ninepatch2/#install-plugin","title":"Install plugin","text":""},{"location":"ninepatch2/#load-minify-file","title":"Load minify file","text":""},{"location":"ninepatch2/#import-plugin","title":"Import plugin","text":""},{"location":"ninepatch2/#import-class","title":"Import class","text":""},{"location":"ninepatch2/#create-instance","title":"Create instance","text":"
    var ninePatch = scene.add.rexNinePatch2(x, y, width, height, key, baseFrame, columns, rows, {\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch2(x, y, width, height, key, columns, rows, {\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch2(x, y, width, height, key, {\ncolumns: undefined,\nrows: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch2(x, y, width, height, {\nkey: undefined,\ncolumns: undefined,\nrows: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch2(x, y, {\nwidth: 1, height: 1,\nkey: undefined,\ncolumns: undefined,\nrows: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n

    or

    var ninePatch = scene.add.rexNinePatch2({\nx: 0, y: 0,\nwidth: 1, height: 1,\nkey: undefined,\ncolumns: undefined,\nrows: undefined,\n\n// preserveRatio: true,\n// maxFixedPartScale: 1,\n// stretchMode: 0,\nbaseFrame: undefined,\ngetFrameNameCallback: undefined\n});\n
    "},{"location":"ninepatch2/#custom-class","title":"Custom class","text":""},{"location":"ninepatch2/#resize","title":"Resize","text":"
    ninePatch.resize(width, height);\n

    Will update texture

    "},{"location":"ninepatch2/#tint","title":"Tint","text":""},{"location":"ninepatch2/#set-texture-of-source-image","title":"Set texture of source image","text":"
    ninePatch.setBaseTexture(key, baseFrame, columns, rows);\n// ninePatch.setBaseTexture(key, columns, rows);\n

    Will update texture

    "},{"location":"ninepatch2/#set-stretch-mode","title":"Set stretch mode","text":"
    ninePatch.setStretchMode(mode);\n
    "},{"location":"ninepatch2/#set-get-frame-name-callback","title":"Set get-frame-name callback","text":"
    ninePatch.setGetFrameNameCallback(callback);\n
    "},{"location":"ninepatch2/#fixed-part-scale","title":"Fixed-part scale","text":""},{"location":"ninepatch2/#update-texture","title":"Update texture","text":"
    ninePatch.updateTexture();\n
    "},{"location":"ninepatch2/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"ninepatch2/#create-mask","title":"Create mask","text":"
    var mask = ninePatch.createBitmapMask();\n

    See mask

    "},{"location":"ninepatch2/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"ninepatch2/#compare-with-nine-patch","title":"Compare with nine-patch","text":""},{"location":"nineslice/","title":"Nine slice","text":""},{"location":"nineslice/#introduction","title":"Introduction","text":"

    Display a texture-based object that can be stretched both horizontally and vertically, but that retains fixed-sized corners, built-in game object of phaser.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"nineslice/#usage","title":"Usage","text":""},{"location":"nineslice/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"nineslice/#add-nine-slice-object","title":"Add nine slice object","text":"
    var nineSlice = scene.add.nineslice(x, y, texture, frame, width, height, leftWidth, rightWidth, topHeight, bottomHeight);\n

    Add nine slice from JSON

    var nineSlice = scene.make.nineslice({\nx: 0,\ny: 0,\nkey: '',\n// frame: '',\n\n// width: 256,\n// height: 256,\n// leftWidth: 10,\n// rightWidth: 10,\n// topHeight: 0,\n// bottomHeight: 0,\n\n// angle: 0,\n// alpha: 1,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"nineslice/#custom-class","title":"Custom class","text":""},{"location":"nineslice/#resize","title":"Resize","text":"
    nineSlice.setSize(width, height);\n
    "},{"location":"nineslice/#set-texture-of-source-image","title":"Set texture of source image","text":"
    nineSlice.setTexture(texture, frame);\nnineSlice.setSlices(width, height, leftWidth, rightWidth, topHeight, bottomHeight);\n
    "},{"location":"nineslice/#texture","title":"Texture","text":"

    See game object - texture

    "},{"location":"nineslice/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"nineslice/#create-mask","title":"Create mask","text":"
    var mask = nineSlice.createBitmapMask();\n

    See mask

    "},{"location":"nineslice/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"nineslice/#compare-with-nine-patch","title":"Compare with nine-patch","text":""},{"location":"orientation/","title":"Orientation","text":""},{"location":"orientation/#introduction","title":"Introduction","text":"

    Get oriention, built-in method of phaser.

    "},{"location":"orientation/#usage","title":"Usage","text":""},{"location":"orientation/#orientation","title":"Orientation","text":"
    var orientation = scene.scale.orientation;\n
    "},{"location":"orientation/#events","title":"Events","text":""},{"location":"orientation/#lock-orientation","title":"Lock orientation","text":"
    scene.scale.lockOrientation(orientation)\n
    "},{"location":"pad/","title":"Pad","text":""},{"location":"pad/#introduction","title":"Introduction","text":"

    Takes the given string and pads it out, to the length required, built-in method of phaser.

    "},{"location":"pad/#usage","title":"Usage","text":"
    var result = Phaser.Utils.String.Pad(str, len, pad, dir);\n
    "},{"location":"particles-along-bounds/","title":"Particles along bounds","text":""},{"location":"particles-along-bounds/#introduction","title":"Introduction","text":"

    Emit particles along bounds of game object.

    "},{"location":"particles-along-bounds/#live-demos","title":"Live demos","text":""},{"location":"particles-along-bounds/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"particles-along-bounds/#install-plugin","title":"Install plugin","text":""},{"location":"particles-along-bounds/#load-minify-file","title":"Load minify file","text":""},{"location":"particles-along-bounds/#import-plugin","title":"Import plugin","text":""},{"location":"particles-along-bounds/#import-class","title":"Import class","text":""},{"location":"particles-along-bounds/#create-instance","title":"Create instance","text":"
    var particles = scene.plugins.get('rexParticlesAlongBounds').startEffect(gameObject, {\ntextureKey: key,\n// textureFrames: undefined,\n// padding: 0,\n// blendMode: 'ADD',\n// lifespan: 1000,\n// stepRate: 10,\n// spread: 10,\n\n// scale: undefined,\n// alpha: undefined,\n// tint: undefined,\n\n// repeat: 0,\n// gravityX: 0,\n// gravityY: 0,\n// duration: undefined\n});\n

    Format of spread, scale, alpha, tint parameters :

    "},{"location":"particles-along-bounds/#is-running","title":"Is running","text":"
    var isRunning = particles.isRunning;\n
    "},{"location":"particles-along-bounds/#events","title":"Events","text":""},{"location":"particles/","title":"Particles","text":""},{"location":"particles/#introduction","title":"Introduction","text":"

    Particles uses its own lightweight physics system, and can interact only with its Emitter's bounds and zones. Built-in game object of phaser.

    Note

    API is not compatible with 3.55.x

    "},{"location":"particles/#usage","title":"Usage","text":""},{"location":"particles/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"particles/#add-particle","title":"Add particle","text":"
    var particles = scene.add.particles(x, y, texture, {\n\n// EmitterOp\naccelerationX: 0,\naccelerationY: 0,\nalpha: 1,\nangle: { min: 0, max: 360 },\nbounce: 0,\ncolor: undefined,\ndelay: 0,\nhold: 0,\nlifespan: 1000,\nmaxVelocityX: 10000,\nmaxVelocityY: 10000,\nmoveToX: 0,\nmoveToY: 0,\nquantity: 1,\nrotate: 0,\nscaleX: 1,\nscaleY: 1,\n// scale:\nspeedX: 0,\nspeedY: 0,\nspeed: tint: 0xffffff,\nx: 0,\ny: 0,\n\n// Emitter properties\nactive:\nadvance:\nblendMode:\ncolorEase:\ndeathCallback:\ndeathCallbackScope:\nduration:\nemitCallback:\nemitCallbackScope:\n// callbackScope    \nfrequency:\ngravityX:\ngravityY:\nmaxAliveParticles:\nmaxParticles:\nname:\nemitting:\nparticleBringToTop:\nparticleClass:\nradial:\nsortCallback:\nsortOrderAsc:\nsortProperty:\nstopAfter:\ntintFill:\ntimeScale:\ntrackVisible:\nvisible:\n\n// Position\n// emitZone : random-zone, edge-zone\n// random-zone\nemitZone: {\ntype: 'random',\nsource: geom,\n},\n\n// edge-zone\nemitZone:{\ntype: 'edge',\nsource: geom,\nquantity: 1,\nstepRate: 0,\ntotal: -1,\nyoyo: false,\nseamless: true\n},\n\ndeathZone: {\ntype: 'onEnter', // 'onEnter', or 'onLeave'\nsource: geom,\n},\n\nbounds:               // {x, y, w, h}, or {x, y, width, height}, or Phaser.Geom.Rectangle\ncollideLeft: true,\ncollideRight: true,\ncollideTop: true,\ncollideBottom: true,\n\nfollow:\nfollowOffset:{\nx: 0,\ny: 0\n},\n\n// Texture\ntexture:\nframe:\nanim: [],  // string, or array of string\n\nreserve: 0,\nadvance: 0\n});\n
    "},{"location":"particles/#control","title":"Control","text":""},{"location":"particles/#follow-target","title":"Follow target","text":""},{"location":"particles/#frame","title":"Frame","text":"

    emitter.setEmitterFrame(frames);\n// emitter.setEmitterFrame(frames, pickRandom, quantity);\n
    - frames : One or more texture frames, or a configuration object. - String or number value - Array of string or number value - Configuration object :
    {\nframes: [],\ncycle: false,\nquantity: 1\n}\n
    - pickRandom : - true : Whether frames should be assigned at random from frames. Default behavior. - quantity : The number of consecutive particles that will receive each frame. Default value is 1.

    "},{"location":"particles/#animation","title":"Animation","text":"

    emitter.setAnim(anims);\n// emitter.setAnim(anims, pickRandom, quantity);\n
    - anims : One or more animations, or a configuration object. - String or number value - Array of string or number value - Configuration object :
    {\nanims: [],\ncycle: false,\nquantity: 1\n}\n
    - pickRandom : - true : Whether frames should be assigned at random from frames. Default behavior. - quantity : The number of consecutive particles that will receive each frame. Default value is 1.

    "},{"location":"particles/#particle","title":"Particle","text":""},{"location":"particles/#render-order","title":"Render order","text":""},{"location":"particles/#emitter","title":"Emitter","text":""},{"location":"particles/#zone","title":"Zone","text":""},{"location":"particles/#emit-zone","title":"Emit zone","text":""},{"location":"particles/#add-emit-zone","title":"Add emit zone","text":"
    var zone = emitter.addEmitZone({\ntype: 'random',\nsource: geom,\n});\n
    "},{"location":"particles/#add-emit-edge","title":"Add emit edge","text":"
    var zone = emitter.addEmitZone({\ntype: 'edge',\nsource: curve,\n\nquantity: 1,\nstepRate: 0,\nyoyo: false,\nseamless: true,\ntotal: -1\n});\n

    quantity or stepRate

    "},{"location":"particles/#set-emit-zone","title":"Set emit zone","text":"
    emitter.setEmitZone(zone);\n
    "},{"location":"particles/#zone-source","title":"Zone source","text":""},{"location":"particles/#remove-emit-zone","title":"Remove emit zone","text":"
    emitter.removeEmitZone(zone)\n
    "},{"location":"particles/#clear-emit-zone","title":"Clear emit zone","text":"
    emitter.emitZones.length = 0;\nemitter.zoneIndex = 0;\n
    "},{"location":"particles/#death-zone","title":"Death zone","text":"
    var zone = emitter.addDeathZone({\ntype: 'onEnter',\nsource: geom\n});\n
    "},{"location":"particles/#remove-death-zone","title":"Remove death zone","text":"
    emitter.removeDeathZone(zone)\n
    "},{"location":"particles/#clear-death-zone","title":"Clear death zone","text":"
    emitter.deathZones.length = 0;\n
    "},{"location":"particles/#events","title":"Events","text":""},{"location":"particles/#bounds","title":"Bounds","text":""},{"location":"particles/#gravity-well","title":"Gravity well","text":""},{"location":"particles/#custom-particle-processor","title":"Custom Particle Processor","text":""},{"location":"particles/#custom-particle-class","title":"Custom particle class","text":"
    class MyParticle extends Phaser.GameObjects.Particles.Particle {\nconstructor (emitter) {\nsuper(emitter);\n/* ... */\n}\n\nupdate (delta, step, processors) {\nsuper.update(delta, step, processors);\n/* ... */\n}\n}\n
    "},{"location":"particles/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"particles/#create-mask","title":"Create mask","text":"
    var mask = emitter.createBitmapMask();\n

    See mask

    "},{"location":"particles/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"path/","title":"Path","text":""},{"location":"path/#introduction","title":"Introduction","text":"

    Path in curves, built-in object of phaser.

    "},{"location":"path/#usage","title":"Usage","text":""},{"location":"path/#add-path-object","title":"Add path object","text":"
    var path = scene.add.path();\n// var path = scene.add.path(x, y);  // curve start from (x, y)\n

    or

    var path = new Phaser.Curves.Path();\n// var path = new Phaser.Curves.Path(x, y);  // curve start from (x, y)\n
    "},{"location":"path/#add-path-object-with-curves","title":"Add path object with curves","text":"

    Curves in JSON

    var path = scene.add.path(json);\n
    or
    var path = new Phaser.Curves.Path(json);\n

    "},{"location":"path/#add-curve","title":"Add curve","text":""},{"location":"path/#line","title":"Line","text":"

    Properties:

    "},{"location":"path/#circleellipsearc","title":"Circle/ellipse/arc","text":"

    Properties:

    "},{"location":"path/#spline","title":"Spline","text":""},{"location":"path/#append-point","title":"Append point","text":"
    var point = curve.addPoint(x, y);\n
    "},{"location":"path/#quadratic-bezier-curve","title":"Quadratic bezier curve","text":"
    1. Create quadratic bezier curve object
      var curve = new Phaser.Curves.QuadraticBezier(startPoint, controlPoint, endPoint); // point: {x, y}\n
      or
      var points = [\nx0, y0,     // start point\nx1, y1,     // control point\nx2, y2      // end point\n];\nvar curve = new Phaser.Curves.QuadraticBezier(points);\n
    2. Add to path
      path.add(curve);\n

    Add quadratic bezier curve started from previous end point to next point

    path.quadraticBezierTo(endX, endY, controlX, controlY);\n
    or
    path.quadraticBezierTo(endPoint, controlPoint);  // point : Phaser.Math.Vector2\n

    "},{"location":"path/#cubic-bezier-curve","title":"Cubic bezier curve","text":"
    1. Create quadratic bezier curve object
      var curve = new Phaser.Curves.CubicBezier(startPoint, controlPoint1, controlPoint2, endPoint); // point: {x, y}\n
      or
      var points = [\nx0, y0,     // start point\nx1, y1,     // control point1\nx2, y2,     // control point2\nx3, y3      // end point\n];\nvar curve = new Phaser.Curves.CubicBezier(points);\n
    2. Add to path
      path.add(curve);\n

    Add cubic bezier curve started from previous end point to next point

    path.cubicBezierTo(endX, endY, control1X, control1Y, control2X, control2Y);\n
    or
    path.cubicBezierTo(endPoint, controlPoint1, controlPoint2);  // point : Phaser.Math.Vector2\n

    "},{"location":"path/#move-to-point","title":"Move to point","text":"
    path.moveTo(x, y);\n
    "},{"location":"path/#add-curves-from-json","title":"Add curves from JSON","text":"
    path.fromJSON(json);\n
    "},{"location":"path/#get-curves","title":"Get curves","text":"
    var curves = path.curves;\n
    "},{"location":"path/#get-curve-at-t","title":"Get curve at t","text":"
    var curve = path.getCurveAt(t);\n
    "},{"location":"path/#draw-on-graphics","title":"Draw on graphics","text":"
    path.draw(graphics);\n// path.draw(graphics, pointsTotal);\n

    or

    curve.draw(graphics);\n// curve.draw(graphics, pointsTotal);\n
    "},{"location":"path/#point","title":"Point","text":""},{"location":"path/#length-of-path","title":"Length of path","text":"

    var l = path.getLength();\n
    or
    var l = curve.getLength();\n

    Length of path/curve will be cached.

    "},{"location":"path/#update-length","title":"Update length","text":"

    path.updateArcLengths();\n
    or
    curve.updateArcLengths();\n

    "},{"location":"path/#curves-to-json","title":"Curves to JSON","text":"

    var json = path.toJSON();\n
    or
    var json = curve.toJSON();\n

    "},{"location":"path/#bounds","title":"Bounds","text":"

    Get bounds

    var out = path.getBounds();    // accuracy = 16\n// var out = path.getBounds(out);\n// var out = path.getBounds(out, accuracy);\n
    or
    var out = curve.getBounds();    // accuracy = 16\n// var out = curve.getBounds(out);\n// var out = curve.getBounds(out, accuracy);\n

    "},{"location":"path/#destroy","title":"Destroy","text":"
    path.destroy();\n
    "},{"location":"pathfollower/","title":"Path follower","text":""},{"location":"pathfollower/#introduction","title":"Introduction","text":"

    Set position of game object on a path.

    "},{"location":"pathfollower/#live-demos","title":"Live demos","text":""},{"location":"pathfollower/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"pathfollower/#install-plugin","title":"Install plugin","text":""},{"location":"pathfollower/#load-minify-file","title":"Load minify file","text":""},{"location":"pathfollower/#import-plugin","title":"Import plugin","text":""},{"location":"pathfollower/#import-class","title":"Import class","text":""},{"location":"pathfollower/#create-instance","title":"Create instance","text":"
    // var path = scene.add.path();\nvar pathFollower = scene.plugins.get('rexPathFollower').add(gameObject, {\n// path: path,          // path object\n// t: 0,                // t: 0~1\n// rotateToPath: false,\n// rotationOffset: 0,\n// angleOffset: 0,\n\n// spacedPoints: false,\n// spacedPoints: {\n//     divisions: undefined,\n//     stepRate: 10,\n// }\n\n});\n
    "},{"location":"pathfollower/#move-along-path","title":"Move along path","text":"

    Set pathFollower.t (0~1) to move along path

    pathFollower.t = t;  // t: 0~1\n// pathFollower.setT(t);\n

    or tween pathFollower.t

    var tween = scene.tweens.add({\ntargets: pathFollower,\nt: 1,\nease: 'Linear', // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\nrepeat: 0,\nyoyo: false\n});\n
    "},{"location":"pathfollower/#set-path","title":"Set path","text":"
    pathFollower.setPath(path);\n
    "},{"location":"pathfollower/#set-rotate-to-path","title":"Set rotate-to-path","text":"
    pathFollower.setRotateToPath(rotateToPath, rotationOffset);\n
    "},{"location":"percentage/","title":"Percentage","text":""},{"location":"percentage/#introduction","title":"Introduction","text":"

    Work out what percentage value is of the range between min and max, built-in method of phaser.

    "},{"location":"percentage/#usage","title":"Usage","text":"
    var result = Phaser.Math.Percent(value, min, max);\n
    "},{"location":"perlin/","title":"Perlin","text":""},{"location":"perlin/#introduction","title":"Introduction","text":"

    Perlin2/Perlin3 noise and simplex2/simplex3 noise. (Reference)

    "},{"location":"perlin/#live-demos","title":"Live demos","text":""},{"location":"perlin/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perlin/#install-plugin","title":"Install plugin","text":""},{"location":"perlin/#load-minify-file","title":"Load minify file","text":""},{"location":"perlin/#import-plugin","title":"Import plugin","text":""},{"location":"perlin/#import-class","title":"Import class","text":""},{"location":"perlin/#create-noise-instance","title":"Create noise instance","text":"
    var noise = scene.plugins.get('rexPerlin').add(seed);\n
    "},{"location":"perlin/#perlin","title":"Perlin","text":""},{"location":"perlin/#simplex","title":"Simplex","text":""},{"location":"perlin/#set-seed","title":"Set seed","text":"
    noise.setSeed(seed);\n
    "},{"location":"perspective-card/","title":"Card","text":""},{"location":"perspective-card/#introduction","title":"Introduction","text":"

    A container with two perspective-images.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"perspective-card/#live-demos","title":"Live demos","text":""},{"location":"perspective-card/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perspective-card/#install-plugin","title":"Install plugin","text":""},{"location":"perspective-card/#load-minify-file","title":"Load minify file","text":""},{"location":"perspective-card/#import-plugin","title":"Import plugin","text":""},{"location":"perspective-card/#import-class","title":"Import class","text":""},{"location":"perspective-card/#create-instance","title":"Create instance","text":"
    var card = scene.add.rexPerspectiveCard({\nx: 0, y: 0,\n\nback: {key, frame},\nfront: {key, frame},\nface: 0,\n\norientation: 0,\n\n// width,\n// height,\n\n// flip : {\n//     frontToBack: 0,\n//     backToFront: 1,\n//     duration: 1000,\n//     ease: 'Cubic',\n//     delay: 0,\n// }\n// flip: false\n});\n

    Add card from JSON

    var card = scene.make.rexPerspectiveCard({\nx: 0,\ny: 0,\n\nfront,\nback,\nface: 0,\n\norientation: 0,\n\nwidth,\nheight,\n\nflip,\n\nadd: true\n});\n
    "},{"location":"perspective-card/#custom-class","title":"Custom class","text":""},{"location":"perspective-card/#face","title":"Face","text":""},{"location":"perspective-card/#face-instances","title":"Face instances","text":""},{"location":"perspective-card/#flip-behavior","title":"Flip behavior","text":""},{"location":"perspective-card/#start-flipping","title":"Start flipping","text":"
    card.flip.flip();\n// card.flip.flip(duration, repeat);\n

    or

    "},{"location":"perspective-card/#stop-flipping","title":"Stop flipping","text":"
    card.flip.stop();\n
    "},{"location":"perspective-card/#set-duration","title":"Set duration","text":"
    card.flip.setDuration(duration);\n// card.flip.duration = duration;\n
    "},{"location":"perspective-card/#set-ease","title":"Set ease","text":"
    card.flip.setEase(ease);\n// card.flip.ease = ease;\n
    "},{"location":"perspective-card/#events","title":"Events","text":""},{"location":"perspective-card/#status","title":"Status","text":""},{"location":"perspective-card/#rotation","title":"Rotation","text":""},{"location":"perspective-card/#debug","title":"Debug","text":"
    1. Set debug Graphics
      var debugGraphics = scene.add.graphics();\ncard.setDebug(debugGraphics);\n
    2. Update Graphics in scene.update() method.
      debugGraphics.clear();\ndebugGraphics.lineStyle(1, 0x00ff00);\n
    "},{"location":"perspective-card/#other-properties","title":"Other properties","text":"

    See container, Mesh game object, game object

    "},{"location":"perspective-card/#create-mask","title":"Create mask","text":"
    var mask = card.createBitmapMask();\n

    See mask

    "},{"location":"perspective-card/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"perspective-carousel/","title":"Carousel","text":""},{"location":"perspective-carousel/#introduction","title":"Introduction","text":"

    A container with cards.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"perspective-carousel/#live-demos","title":"Live demos","text":""},{"location":"perspective-carousel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perspective-carousel/#install-plugin","title":"Install plugin","text":""},{"location":"perspective-carousel/#load-minify-file","title":"Load minify file","text":""},{"location":"perspective-carousel/#import-plugin","title":"Import plugin","text":""},{"location":"perspective-carousel/#import-class","title":"Import class","text":""},{"location":"perspective-carousel/#create-instance","title":"Create instance","text":"
    var carousel = scene.add.rexPerspectiveCarousel({\nx: 0, y: 0,\n\nfaces: [],\n// face: 0,\n// rtl: false,\n\n// width,\n// height,\n\n// faceWidth,\n// faceSpace: 0,\n\n// z: 1,\n// zEnd: 0,\n\n// roll : {\n//     duration: 1000,\n//     ease: 'Cubic',\n//     delay: 0,\n// }\n});\n

    Add carousel from JSON

    var carousel = scene.make.rexPerspectiveCarousel({\nx: 0,\ny: 0,\n\nfaces: [],\n\n// width,\n// height,\n\n// faceWidth,\n// faceSpace: 0,\n\n// z: 1,\n// zEnd: 0,\n\nadd: true\n});\n
    "},{"location":"perspective-carousel/#custom-class","title":"Custom class","text":""},{"location":"perspective-carousel/#face-instances","title":"Face instances","text":"
    var faces = carousel.faces;\n
    "},{"location":"perspective-carousel/#face","title":"Face","text":""},{"location":"perspective-carousel/#roll-behavior","title":"Roll behavior","text":""},{"location":"perspective-carousel/#start-rolling","title":"Start rolling","text":""},{"location":"perspective-carousel/#stop-flipping","title":"Stop flipping","text":"
    carousel.roll.stop();\n
    "},{"location":"perspective-carousel/#set-duration","title":"Set duration","text":"
    carousel.roll.setDuration(duration);\n// carousel.roll.duration = duration;\n
    "},{"location":"perspective-carousel/#set-ease","title":"Set ease","text":"
    carousel.roll.setEase(ease);\n// carousel.roll.ease = ease;\n
    "},{"location":"perspective-carousel/#events","title":"Events","text":""},{"location":"perspective-carousel/#status","title":"Status","text":""},{"location":"perspective-carousel/#rotation","title":"Rotation","text":""},{"location":"perspective-carousel/#other-properties","title":"Other properties","text":"

    See container, Mesh game object, game object

    "},{"location":"perspective-carousel/#create-mask","title":"Create mask","text":"
    var mask = carousel.createBitmapMask();\n

    See mask

    "},{"location":"perspective-carousel/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"perspective-image/","title":"Image","text":""},{"location":"perspective-image/#introduction","title":"Introduction","text":"

    Image with perspective rotation.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"perspective-image/#live-demos","title":"Live demos","text":""},{"location":"perspective-image/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perspective-image/#install-plugin","title":"Install plugin","text":""},{"location":"perspective-image/#load-minify-file","title":"Load minify file","text":""},{"location":"perspective-image/#import-plugin","title":"Import plugin","text":""},{"location":"perspective-image/#import-class","title":"Import class","text":""},{"location":"perspective-image/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexPerspectiveImage(x, y, texture, frame, {\n// hideCCW: true,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    or

    var image = scene.add.rexPerspectiveImage({\n// x: 0,\n// y: 0,\nkey,\n// frame: null,\n// hideCCW: true,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    Add perspectiveimage from JSON

    var perspectiveimage = scene.make.rexPerspectiveImage({\nx: 0,\ny: 0,\n\nkey: null,\nframe: null,\n\n// hideCCW: false,\n// gridWidth: 32,\n// girdHeight: 32,\n\nadd: true\n});\n
    "},{"location":"perspective-image/#custom-class","title":"Custom class","text":""},{"location":"perspective-image/#transform-vertices","title":"Transform vertices","text":"

    Offset then rotate all vertices.

    image.transformVerts(x, y, z, rotateX, rotateY, rotateZ);\n
    "},{"location":"perspective-image/#rotation","title":"Rotation","text":""},{"location":"perspective-image/#flip","title":"Flip","text":"
    scene.tweens.add({\ntargets: image,\nangleY: { start: 0, to: -180}\n})\n
    "},{"location":"perspective-image/#tint-color","title":"Tint color","text":""},{"location":"perspective-image/#change-frame","title":"Change frame","text":"

    Frame is bound with vertices. Use perspective renderTexture to change frame without recreate vertices again (assume that size of frame won't changed).

    rt.drawFrame(key, frame);\n
    "},{"location":"perspective-image/#other-properties","title":"Other properties","text":"

    See Mesh game object, game object

    "},{"location":"perspective-image/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"perspective-image/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"perspective-imagecarousel/","title":"Image carousel","text":""},{"location":"perspective-imagecarousel/#introduction","title":"Introduction","text":"

    Display list of images.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"perspective-imagecarousel/#live-demos","title":"Live demos","text":""},{"location":"perspective-imagecarousel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perspective-imagecarousel/#install-plugin","title":"Install plugin","text":""},{"location":"perspective-imagecarousel/#load-minify-file","title":"Load minify file","text":""},{"location":"perspective-imagecarousel/#import-plugin","title":"Import plugin","text":""},{"location":"perspective-imagecarousel/#import-class","title":"Import class","text":""},{"location":"perspective-imagecarousel/#create-instance","title":"Create instance","text":"
    var carousel = scene.add.rexPerspectiveImageCarousel({\nx: 0, y: 0,\n\nimages: [],  // Array of {key, frame}\n// index: 0,\n// rtl: false,\n// repeat: true,\n\n// width,\n// height,\n// faceCount: 4,\n\n// z: 1,\n// zEnd: 0,\n\n// roll : {\n//     duration: 1000,\n//     ease: 'Cubic',\n//     delay: 0,\n// }\n});\n

    Add perspectiveimage from JSON

    var perspectiveimage = scene.make.rexPerspectiveImageCarousel({\nx: 0,\ny: 0,\n\nimages: [],  // Array of {key, frame}\n// index: 0,\n// rtl: false,\n// repeat: true,\n\n// width,\n// height,\n// faceCount: 4,\n\n// z: 1,\n// zEnd: 0,\n\n// roll : {\n//     duration: 1000,\n//     ease: 'Cubic',\n//     delay: 0,\n// }\n\nadd: true\n});\n
    "},{"location":"perspective-imagecarousel/#custom-class","title":"Custom class","text":""},{"location":"perspective-imagecarousel/#roll-behavior","title":"Roll behavior","text":""},{"location":"perspective-imagecarousel/#start-rolling","title":"Start rolling","text":""},{"location":"perspective-imagecarousel/#set-duration","title":"Set duration","text":"
    carousel.roll.setDuration(duration);\n// carousel.roll.duration = duration;\n
    "},{"location":"perspective-imagecarousel/#set-ease","title":"Set ease","text":"
    carousel.roll.setEase(ease);\n// carousel.roll.ease = ease;\n
    "},{"location":"perspective-imagecarousel/#events","title":"Events","text":""},{"location":"perspective-imagecarousel/#status","title":"Status","text":""},{"location":"perspective-imagecarousel/#other-properties","title":"Other properties","text":"

    See container, Mesh game object, game object

    "},{"location":"perspective-imagecarousel/#create-mask","title":"Create mask","text":"
    var mask = carousel.createBitmapMask();\n

    See mask

    "},{"location":"perspective-imagecarousel/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"perspective-rendertexture/","title":"Render texture","text":""},{"location":"perspective-rendertexture/#introduction","title":"Introduction","text":"

    Render texture with perspective rotation.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"perspective-rendertexture/#live-demos","title":"Live demos","text":""},{"location":"perspective-rendertexture/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perspective-rendertexture/#install-plugin","title":"Install plugin","text":""},{"location":"perspective-rendertexture/#load-minify-file","title":"Load minify file","text":""},{"location":"perspective-rendertexture/#import-plugin","title":"Import plugin","text":""},{"location":"perspective-rendertexture/#import-class","title":"Import class","text":""},{"location":"perspective-rendertexture/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexPerspectiveRenderTexturege(x, y, width, height, {\n// hideCCW: true,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    or

    var image = scene.add.rexPerspectiveRenderTexturege({\n// x: 0,\n// y: 0,\n// width: 32,\n// height: 32,\n// hideCCW: true,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    Add prespective render texture from JSON

    var image = scene.make.rexPerspectiveRenderTexturege({\nx: 0,\ny: 0,    width: 32,\nheight: 32,\n\n// hideCCW: false,\n// gridWidth: 32,\n// girdHeight: 32,\n\nadd: true\n});\n
    "},{"location":"perspective-rendertexture/#custom-class","title":"Custom class","text":""},{"location":"perspective-rendertexture/#internal-render-texture","title":"Internal render texture","text":"
    var rt = image.rt;\n
    "},{"location":"perspective-rendertexture/#paste-texture","title":"Paste texture","text":""},{"location":"perspective-rendertexture/#erase","title":"Erase","text":"
    image.rt.erase(gameObject, x, y);\n
    "},{"location":"perspective-rendertexture/#clear","title":"Clear","text":"
    image.rt.clear();\n
    "},{"location":"perspective-rendertexture/#fill","title":"Fill","text":"
    image.rt.fill(rgb, alpha);\n// image.rt.fill(rgb, alpha, x, y, width, height);\n
    "},{"location":"perspective-rendertexture/#other-properties","title":"Other properties","text":"

    See Perspective image game object, Mesh game object, game object

    "},{"location":"perspective-rendertexture/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"perspective-rendertexture/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"perspective-sprite/","title":"Sprite","text":""},{"location":"perspective-sprite/#introduction","title":"Introduction","text":"

    Play animation on perspective-image.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"perspective-sprite/#live-demos","title":"Live demos","text":""},{"location":"perspective-sprite/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"perspective-sprite/#install-plugin","title":"Install plugin","text":""},{"location":"perspective-sprite/#load-minify-file","title":"Load minify file","text":""},{"location":"perspective-sprite/#import-plugin","title":"Import plugin","text":""},{"location":"perspective-sprite/#import-class","title":"Import class","text":""},{"location":"perspective-sprite/#create-instance","title":"Create instance","text":"
    var sprite = scene.add.rexPerspectiveSprite(x, y, texture, frame, {\n// width: undefined,\n// height: undefined,\n// hideCCW: true,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    or

    var sprite = scene.add.rexPerspectiveImage({\n// x: 0,\n// y: 0,\nkey,\n// frame: null,\n// width: undefined,\n// height: undefined,\n// hideCCW: true,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    Add perspectiveimage from JSON

    var perspectiveimage = scene.make.rexPerspectiveImage({\nx: 0,\ny: 0,\n\nkey: null,\nframe: null,\n\n// width: undefined,\n// height: undefined,\n// hideCCW: false,\n// gridWidth: 32,\n// girdHeight: 32,\n\nadd: true\n});\n
    "},{"location":"perspective-sprite/#custom-class","title":"Custom class","text":""},{"location":"perspective-sprite/#play-animation","title":"Play animation","text":""},{"location":"perspective-sprite/#chain","title":"Chain","text":""},{"location":"perspective-sprite/#stop","title":"Stop","text":""},{"location":"perspective-sprite/#restart","title":"Restart","text":"
    sprite.anims.restart();\n// sprite.anims.restart(includeDelay, resetRepeats);\n
    "},{"location":"perspective-sprite/#other-properties","title":"Other properties","text":"

    See Perspective image game object, Mesh game object, game object

    "},{"location":"perspective-sprite/#create-mask","title":"Create mask","text":"
    var mask = sprite.createBitmapMask();\n

    See mask

    "},{"location":"perspective-sprite/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"plane/","title":"Plane","text":""},{"location":"plane/#introduction","title":"Introduction","text":"

    A Plane is a kind of Mesh game object with one-sided grid of cells. which can have a texture that is either repeated (tiled) across each cell, or applied to the full Plane.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"plane/#usage","title":"Usage","text":""},{"location":"plane/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"plane/#add-plane-object","title":"Add plane object","text":"
    var plane = scene.add.plane(x, y, key);\n// var plane = scene.add.plane(x, y, key, frame);\n// var plane = scene.add.plane(x, y, texture, frame, width, height, tile);\n

    Add plane from JSON

    var plane = scene.make.plane({\nx: 0,\ny: 0,\nkey: '',\n// frame: '',\n// width: 8,\n// height: 8,\n// tile: false,\n// checkerboard: null,\n// checkerboard: { color1, color2, alpha1, alpha2, height }\n\n// angle: 0,\n// alpha: 1,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"plane/#custom-class","title":"Custom class","text":""},{"location":"plane/#texture","title":"Texture","text":"

    See game object - texture

    "},{"location":"plane/#animation","title":"Animation","text":"

    See Sprite's animation section.

    "},{"location":"plane/#play-animation","title":"Play animation","text":""},{"location":"plane/#stop","title":"Stop","text":""},{"location":"plane/#properties","title":"Properties","text":""},{"location":"plane/#interactive","title":"Interactive","text":"

    To test if pointer is at any face of this mesh game object.

    plane.setInteractive();\n
    "},{"location":"plane/#other-properties","title":"Other properties","text":"

    See Mesh game object, game object

    "},{"location":"plane/#checkerboard","title":"Checkerboard","text":"

    Creates a checkerboard style texture, based on the given colors and alpha values and applies it to this Plane, replacing any current texture it may have.

    "},{"location":"plane/#other-properties_1","title":"Other properties","text":"

    See Mesh game object, game object

    "},{"location":"plane/#create-mask","title":"Create mask","text":"
    var mask = plane.createBitmapMask();\n

    See mask

    "},{"location":"plane/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"plugin-list/","title":"Plugin list","text":""},{"location":"plugin-list/#list-of-my-plugins","title":"List of my plugins","text":"

    Version of phaser3

    Please upgrade your phaser3 to version >= 3.60.0.

    1. Achievements: Achievements in a csv table.
    2. Alpha mask image: Load a texture, then apply an alpha mask from another texture.
    3. Anchor: Set size and position based on visible window.
    4. Arcade-TCRP/Player: Run commands on step of Arcade.
    5. Arcade-TCRP/Recorder: Store commands with step of Arcade.
    6. AwaitLoader: Await custom task in preload stage.
    7. Away time: Get time from previous closing application to now.
    8. BBCode-text: Drawing text with BBCode protocol.
    9. Board: Core object of Board system.
    10. Board/Field of view: Visible testing, to find field of view.
    11. Board/Hexagon map: Create tile positions in hexagon/triangle/parallelogram geometry in hexagon grid.
    12. Board/Match: Get matched chess.
    13. Board/Mini board: Chess Container, to rotate/mirror/drag chess together.
    14. Board/Monopoly: Move through path tiles.
    15. Board/Move To: Move chess towards target position with a steady speed.
    16. Board/Path finder: Find moveable area or moving path.
    17. Board/Shape: Grid (polygon) shape object.
    18. Board/Tilemap: Create board from tilemap.
    19. Board/Tile texture: Create canvas-texture of tile.
    20. Bounds: Clamp game object inside target bounds.
    21. Bracket parser: A lite-weight bracket parser.
    22. Bracket parser2: A lite-weight bracket parser.
    23. Buff data: Data manager with buffs.
    24. Build arcade object: Create arcade body, and inject arcade object methods.
    25. Bullet: Move game object toward current angle of game object, with a constant speed.
    26. Button: Fires 'click' event when touch releasd after pressed.
    27. Canvas: Drawing on canvas.
    28. CanvasInput: An invisible Input DOM element to receive character input and display on DynamicText.
    29. Canvas/Circular progress: Circular progress bar on canvas.
    30. Canvas/Line progress: Horizontal line progress bar filled with gradient color on canvas.
    31. Canvas/Round rectangle: Round rectangle on canvas.
    32. Canvas image data: Get image data from texture, or text object.
    33. Canvas frame manager: Generate bitmapfont from text game object, or bbcode text game object.
    34. Circle mask image: Load a texture, then apply a circle mask.
    35. Click outside: Fires 'clickoutside' event when pointer-down or pointer-up outside of game object.
    36. Clock: A clock to count elapsed time.
    37. Character cache: Generate bitmapfont from text game object, or bbcode text game object.
    38. Color/TintRGB: Attach tintR, tintG, tintB, and tintGray properties to a game object.
    39. Conditions table: Check conditions to find passed tests listed in a csv table.
    40. ContainerLite: Control the position and angle of children game objects.
    41. Containerlite-perspective: Snapshot children of containerlite, to a perspective render texture.
    42. Containerlite-skew: Snapshot children of containerlite, to a skew render texture.
    43. CSV-scenario: Run script in csv format.
    44. CSV-to-hash-table: Hash table indexed by (col-key, row-key) from csv string.
    45. Cursor at bound: Map position pf cursor to cursor key state.
    46. Curve/Spiral: Spiral curve.
    47. Drag: Drag game object.
    48. Drag-rotate: Get dragging angle around a specific point.
    49. Drop down: Drop down game object below another target game object.
    50. Dynamic text: Control position, angle of each character drawn on a canvas.
    51. Ease-data: Easing data value of game object's data-manager.
    52. Ease-move: Ease-move game object.
    53. Effect properties: Attach properties to a game object or camera, to add/remove/control builtin preFX or postFX effects.
    54. Eight direction: Move game object by cursor keys, with a constant speed.
    55. Event promise: Return a promise of an event.
    56. Expression parser: Parse expression string into function.
    57. Fade-out-destroy: Fade out game object then destroy it.
    58. Fade-volume: Fade-in/fade-out volume of sound.
    59. File chooser: Create a transparent file chooser button.
    60. File drop zone: Create a div element for dropping file(s).
    61. Firebase/Broadcast: Broadcast real-time messages, using firebase-database.
    62. Firebase/Files: Save JSON data, using firebase-firestore.
    63. Firebase/ID-alias: Map an unique ID to another unique ID, using firebase-firestore.
    64. Firebase/Item-table: 1d/2d/3d table, using firebase-database.
    65. Firebase/Leaderboard: Descending sort scores, using firebase-firestore.
    66. Firebase/Messages: Store messages in firebase-firestore.
    67. Firebase/Online-user-list: Online user list, using firebase-database.
    68. Firebase/Single-room: Chat room, using firebase-database.
    69. Flash: Flashing (set invisible then visible) game object.
    70. Flip: Flipping game object to another face by scaling width/height.
    71. FSM: Finite state machine.
    72. Fuzzy: A wrap of fuzzy logic.
    73. Gashapon: Pick random item from box.
    74. Geom/Hexagon: Hexagon geometry object.
    75. Geom/Rhombus: Rhombus shape and methods.
    76. Gesture/Pan: Get pan events of a game object.
    77. Gesture/Pinch: Get scale factor from 2 dragging touch pointers.
    78. Gesture/Press: Get press events of a game object.
    79. Gesture/Rotate: Get spin angle from 2 dragging touch pointers.
    80. Gesture/Swipe: Get swipe events of a game object.
    81. Gesture/Tap: Get tap/multi-taps events of a game object.
    82. Grid align: Align objects on quadrilateral or hexagon grid.
    83. Grid cut image: Create image game objects in grids, to assemble target texture.
    84. Grid table: Viewer of grid table, to manipulate game object of each visible cell.
    85. Hidden input text: An invisible Input DOM element to receive character input and display on text game object.
    86. Image box: Keep aspect ratio of image game object after scale-down resizing.
    87. Image URI loader: Load image by uri in preload stage.
    88. Input text: Input DOM element.
    89. Interception: Predict the intersection position of two game objects with constant moving speed.
    90. In touching: Fires 'intouch' event every tick when pressing on a game object.
    91. Layer manager: A container of Layer game objects.
    92. Life time: Destroy game object when time-out.
    93. Line: Draw a line with start/end/body textures.
    94. Live2d: Display live2d model.
    95. Loading-progress: Pop-up dialog for loading-progress, then scale-down this dialog.
    96. LocalForage/Files: Save JSON data, using localforage.
    97. LocalStorage/Data: Sync data from data manager to local-storage.
    98. LZ-string: Compress string using LZ-based compression algorithm.
    99. Markdown event sheets: Event sheets contains main condition(s) and actions, in simple markdown format (headings, code block).
    100. Modal promise: Modal behavior wrapped into promise.
    101. Mouse-wheel to up/down: Map mouse-wheeling to (up/down) cursor key state.
    102. Mouse-wheel scroller: Emit scroll event when mouse-wheeling.
    103. Move to: Move game object towards target position with a steady speed.
    104. Nine patch: Stretchable image.
    105. Nine patch2: Stretchable image. Has better performance than nine-patch.
    106. Particles-along-bounds: Emit particles along bounds of game object.
    107. Particles/Bitmap-zone: Particles' emitter zone from canvas bitmap of text/canvas game object.
    108. Path follower: Set position of game object on a path.
    109. Perlin: Perlin2/Perlin3 noise and simplex2/simplex3 noise.
    110. Perspective/Card: A container with two perspective-images.
    111. Perspective/Carousel: A container with cards.
    112. Perspective/Image: Image with perspective rotation.
    113. Perspective/ImageCarousel: Display list of images.
    114. Perspective/Render texture: Render texture with perspective rotation.
    115. Perspective/Sprite: Play animation on perspective-image..
    116. PNG appender: Append user data below tail of PNG data, or extract this user data from PNG data.
    117. polar-coordinate: Attach polarOX, polarOY, polarRotation, polarAngle, and polarRadius properties to a game object.
    118. Pop up: Scale up game object.
    119. Quad/Image: Image with 4 or 9 vertex control points.
    120. Quad/Render texture: Render texture with 4 or 9 vertex control points.
    121. Quest: Question manager.
    122. Raycaster: Raycaster between obstacles.
    123. Random place: Place objects randomly inside an area without overlapping.
    124. Real-time timers: Start and counting timer by real-time timestamp.
    125. Restorable data: Restorable data manager.
    126. RotateTo: Rotate game object towards target position with a steady speed.
    127. Rotate: Rotate game object continually with a steady speed.
    128. Run-commands: Run commands in array.
    129. Scale-down-destroy: Scale down game object then destroy it.
    130. Scale outer: Scroll and zoom camera to make default game window fit the display area, in RESIZE scale mode.
    131. Script-tag loader: Load script tag in preload stage.
    132. Scroller: Drag content. Slow down when dragging released, pull back when out of bounds.
    133. Sequence: Run sequence commands in array.
    134. Shader/Barrel: Barrel post processing filter.
    135. Shader/Color-replace: Replace color post processing filter.
    136. Shader/Cross-stitching: Cross-stitching post processing filter.
    137. Shader/Dissolve: Dissolve transition post processing filter.
    138. Shader/Drop-shadow: Drop-shadow post processing filter.
    139. Shader/Fish-eye: Fish-eye post processing filter.
    140. Shader/Glow-filter: Glow post processing filter.
    141. Shader/Glow-filter: Glow post processing filter, ported from pixi.
    142. Shader/Gray-scale: Gray scale post processing filter.
    143. Shader/Horri-fi: 6-in-1 post processing filter.
    144. Shader/Hsl-adjust: Adjust color in HSL domain, post processing filter.
    145. Shader/Inverse: Inverse color post processing filter.
    146. Shader/Kawaseblur: Kawase-blur post processing filter.
    147. Shader/Outline: Outline post processing filter, ported from pixi.
    148. Shader/Pixelation: Pixelation post processing filter.
    149. Shader/Shockwave: Shockwave post processing filter.
    150. Shader/Split: Split image into 4 parts.
    151. Shader/Swirl: Swirl post processing filter.
    152. Shader/Toonify: Draw outlines and quantize color in HSV domain, post processing filter.
    153. Shader/Warp: Warp post processing filter.
    154. Shake-position: Shake position of game object.
    155. Shape/Checkbox: Checkbox input with drawing checker path animation.
    156. Shape/Circular progress: Circular progress bar shape.
    157. Shape/Cover: Rectangle shape covered full window, and block all touch events.
    158. Shape/Custom progress: Custom progress bar shape.
    159. Shape/Custom shapes: Custom shapes on shape.
    160. Shape/Full window rectangle: Rectangle shape covered full window.
    161. Shape/Line progress: Horizontal line progress bar shape.
    162. Shape/Round-Rectangle: Round rectangle shape.
    163. Shape/Spinner: Loading animations on shape.
    164. Shape/Toggle-switch: Toggle-switch input.
    165. Shape/Triangle: Trangle shape inside a rectangle bounds.
    166. Shatter/Image: Shatter image to triangle faces.
    167. Shatter/Render texture: Shatter render texture to triangle faces.
    168. Ship: Move game object as a space ship by cursor keys.
    169. Skew/Image: Skewable Image.
    170. Skew/RenderTexture: Skewable render texture.
    171. Slider: Drag thumb on a slider bar.
    172. State manager: Another version of Finite state machine.
    173. Step: Interpolate points between previous position and current position with fixed step length.
    174. Tag-player: Text commands to control sprites, texts, sound effect or backgroun music.
    175. Tag-text: Displays text with multi-color, font face, or font size with tags.
    176. TCRP/Player: Run commands on time.
    177. TCRP/Recorder: Store commands with time.
    178. Text/Edit: Create an input text object above a text object to edit string content.
    179. Text/Typing: Typing text on text object.
    180. Text/Page: Display text page by page on text object.
    181. Text/Translation: Apply translated string (i18next) to text object.
    182. Text player: Typing characters on dynamic text, waiting click or key enter, play sound effect or backgroun music.
    183. Touch event stop: Stop touch events propagation.
    184. Touch state: Store current touch input properties.
    185. Transition image: Transit texture to another one.
    186. Transition image pack: Transit texture to another one, with some pre-build effects.
    187. UI/Badge label: A container with badges above a main item.
    188. UI/Buttons: A container with a group of buttons.
    189. UI/Chart: Draw chart on canvas.
    190. UI/Color components: Edit color value by RGB, or HSV input fields.
    191. UI/Color input: Color value input field.
    192. UI/Color picker: Pick color value from H and SV palettes.
    193. UI/Confrim dialog: Using json style to create confirm dialog.
    194. UI/Dialog: A container with a title, content, buttons and backgrounds.
    195. UI/Drop down list: A label can open a drop-down list panel.
    196. UI/File selector button: A transparent file chooser button above a Label.
    197. UI/Fixwidthbuttons: A container with a group of fix-width buttons.
    198. UI/Fixwidthsizer: Layout children game objects into lines.
    199. UI/Folder: A container with a title, foldable child, and background.
    200. UI/Grid buttons: A container with a group of buttons in grids.
    201. UI/Grid sizer: Layout children game objects in grids.
    202. UI/Gird table: A container with a grid table, slider, and scroller.
    203. UI/Holy grail: Layout elements in Holy grail style.
    204. UI/Knob: A knob button based on circular progress.
    205. UI/Label: A game object container with an icon, text, and background.
    206. UI/Menu: A container with buttons and sub-menu.
    207. UI/Name-value label: A container with name text, value text in a row, with a horizontal line progress bar, 1d an icon, background.
    208. UI/Number bar: A container with an icon, slider, text, and background.
    209. UI/Overlap sizer: Layout children game objects overlapped.
    210. UI/Pages: A container with pages, only current page is visible.
    211. UI/Perspective card: A container with front and back faces.
    212. UI/Scroll-able panel: A container with a panel, slider, and scroller.
    213. UI/Scroll bar: A container with slider, two buttons, and background.
    214. UI/Simple drop down list: Using plain object to create drop down list.
    215. UI/Simple label: Using json style to create label.
    216. UI/Sizer: Layout children game objects.
    217. UI/Slider: A container with a track, indicator, thumb and background.
    218. UI/States image: Using plain object to create image game object, with active, hover, disable styles.
    219. UI/States round-rectangle: Using plain object to create round rectangle game object, with active, hover, disable styles.
    220. UI/States text: Using plain object to create text game object, with active, hover, disable styles.
    221. UI/Tab-pages: A container with tabs and pages, only current page is visible.
    222. UI/Tabs: A container with 4 groups of buttons around a center panel.
    223. UI/Text area: A container with a text, slider, and scroller.
    224. UI/Text box: A container with an icon, (typing and paging) text, and background.
    225. UI/Title label: A container with title, text in two rows, and an icon, background.
    226. UI/Toast: Show text message for a short while.
    227. UI/Tweaker: Fine-tuning properties of target object.
    228. Unique item list: List of unique items. Support array and set methods.
    229. Viewport-coordinate: Attach vpx, vpy properties to a game object, to set position according to proportion of viewport.
    230. Virtual joystick: Simulate cursor keys according to touch events.
    231. Wait events: Wait fired events or callbacks.
    232. Webfont-loader: Load web font by google webfont loader in preload stage.
    233. XOR: Encrypt or decrypt string by XOR algorithm.
    234. YML-Achievements: Achievements in a YAML table.
    235. YML-Conditions table: Check conditions to find passed tests listed in a YAML table.
    236. Youtube player: Play youtube video on iframe.
    "},{"location":"pluginsystem/","title":"Plugin system","text":""},{"location":"pluginsystem/#introduction","title":"Introduction","text":"

    Plugin system, built-in system of phaser.

    "},{"location":"pluginsystem/#usage","title":"Usage","text":""},{"location":"pluginsystem/#global-plugin","title":"Global plugin","text":""},{"location":"pluginsystem/#load-plugin","title":"Load plugin","text":""},{"location":"pluginsystem/#get-instance","title":"Get instance","text":"
    var pluginInst = scene.plugins.get(key);\n
    "},{"location":"pluginsystem/#scene-plugin","title":"Scene plugin","text":""},{"location":"pluginsystem/#load-plugin_1","title":"Load plugin","text":""},{"location":"pluginsystem/#get-instance_1","title":"Get instance","text":"
    var pluginInst = scene[sceneKey];\n
    "},{"location":"pluginsystem/#plugin-cache","title":"Plugin cache","text":""},{"location":"png-appender/","title":"PNG Appender","text":""},{"location":"png-appender/#introduction","title":"Introduction","text":"

    Append user data below tail of PNG data, or extract this user data from PNG data.

    "},{"location":"png-appender/#live-demos","title":"Live demos","text":""},{"location":"png-appender/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"png-appender/#install-plugin","title":"Install plugin","text":""},{"location":"png-appender/#load-minify-file","title":"Load minify file","text":""},{"location":"png-appender/#import-plugin","title":"Import plugin","text":""},{"location":"png-appender/#import-class","title":"Import class","text":""},{"location":"png-appender/#append-data","title":"Append data","text":"
    var resultBuffer = scene.plugins.get('rexPNGAppender').append(pngBuffer, data);\n
    "},{"location":"png-appender/#extract-data","title":"Extract data","text":"
    var data = scene.plugins.get('rexPNGAppender').extract(pngBuffer);\n
    "},{"location":"point-light/","title":"Point light","text":""},{"location":"point-light/#introduction","title":"Introduction","text":"

    A point light with gradient color in a circle.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"point-light/#usage","title":"Usage","text":""},{"location":"point-light/#add-point-light","title":"Add point light","text":"
    var pointLight = scene.add.pointlight(x, y, color, radius, intensity, attenuation);\n
    "},{"location":"point-light/#position","title":"Position","text":""},{"location":"point-light/#color","title":"Color","text":""},{"location":"point-light/#radius","title":"Radius","text":""},{"location":"point-light/#intensity","title":"Intensity","text":""},{"location":"point-light/#attenuation","title":"Attenuation","text":""},{"location":"polar-coordinate/","title":"Polar-coordinate","text":""},{"location":"polar-coordinate/#introduction","title":"Introduction","text":"

    Attach polarOX, polarOY, polarRotation, polarAngle, and polarRadius properties to a game object.

    "},{"location":"polar-coordinate/#live-demos","title":"Live demos","text":""},{"location":"polar-coordinate/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"polar-coordinate/#install-plugin","title":"Install plugin","text":""},{"location":"polar-coordinate/#load-minify-file","title":"Load minify file","text":""},{"location":"polar-coordinate/#import-plugin","title":"Import plugin","text":""},{"location":"polar-coordinate/#import-method","title":"Import method","text":""},{"location":"polar-coordinate/#attach-properties","title":"Attach properties","text":"
    scene.plugins.get('rexPolarCoordinate').add(gameObject, ox, oy, rotation, radius);\ngameObject.polarOX = 400;\ngameObject.polarOY = 300;\ngameObject.polarRadius = 200;\ngameObject.polarAngle = -45;\n
    x = ( polarRadius * cos(polarRotation) ) + polarOX\ny = ( polarRadius * sin(polarRotation) ) + polarOY\n
    "},{"location":"polar-coordinate/#circle","title":"Circle","text":"
    scene.tweens.add({\ntargets: gameObject,\npolarAngle: 360,\nduration: 3000\n})\n
    "},{"location":"popup/","title":"Pop up","text":""},{"location":"popup/#introduction","title":"Introduction","text":"

    Scale up from 0 to current scale of game object.

    "},{"location":"popup/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"popup/#install-plugin","title":"Install plugin","text":""},{"location":"popup/#load-minify-file","title":"Load minify file","text":""},{"location":"popup/#import-plugin","title":"Import plugin","text":""},{"location":"popup/#import-class","title":"Import class","text":""},{"location":"popup/#pop-up","title":"Pop up","text":""},{"location":"popup/#events","title":"Events","text":"

    See Events of tween task

    "},{"location":"postfx-pipeline/","title":"Post fx pipeline","text":""},{"location":"postfx-pipeline/#introduction","title":"Introduction","text":"

    Post fx pipelines for game objects or camera.

    WebGL only

    All kinds of post fx pipelines only work in WebGL render mode.

    "},{"location":"postfx-pipeline/#usage","title":"Usage","text":""},{"location":"postfx-pipeline/#post-fx-pipeline-class","title":"Post fx pipeline class","text":"
    class MyPostFxClass extends Phaser.Renderer.WebGL.Pipelines.PostFXPipeline {\nconstructor(game) {\nsuper({\ngame: game,\nrenderTarget: true,\nfragShader: '...',  // GLSL shader\nuniforms: []\n});\n}\n\nonPreRender() {\nthis.set1f('intensity', this._intensity);\n}\n\nonDraw(renderTarget) {\n}\n}\n
    "},{"location":"postfx-pipeline/#set-uniform-values","title":"Set uniform values","text":""},{"location":"postfx-pipeline/#onprerender","title":"onPreRender","text":""},{"location":"postfx-pipeline/#ondraw","title":"onDraw","text":""},{"location":"postfx-pipeline/#register-post-fx-pipeline","title":"Register post-fx pipeline","text":""},{"location":"postfx-pipeline/#apply-effect","title":"Apply effect","text":""},{"location":"postfx-pipeline/#get-post-fx-pipeline","title":"Get post-fx pipeline","text":""},{"location":"postfx-pipeline/#remove-post-fx-pipeline","title":"Remove post-fx pipeline","text":"
    gameObject.removePostPipeline(MyPostFxClass);\n
    "},{"location":"postfx-pipeline/#unregister-post-fx-pipeline","title":"Unregister post-fx pipeline","text":"
    var pipelineManager = scene.sys.renderer.pipelines;\npipelineManager.remove(PostFxName);\n
    "},{"location":"postfx-pipeline/#color-matrix","title":"Color matrix","text":"

    Use color martix to change RGB render result, and more...

    class MyPostFxClass extends Phaser.Renderer.WebGL.Pipelines.PostFXPipeline {\nconstructor(game) {\nsuper({\ngame: game,\nrenderTarget: true,\nfragShader: '...',  // GLSL shader\nuniforms: []\n});\n}\n\nonPreRender() {\n// this.set1f('intensity', this._intensity);\nthis.colorMatrix.grayscale(this._intensity);\n}\n\nonDraw(renderTarget) {\nthis.colorMatrix.grayscale(this._intensity);\nthis.drawFrame(renderTarget, this.fullFrame1);\nthis.bindAndDraw(this.fullFrame1);\n}\n}\n
    "},{"location":"postfx-pipeline/#color-adjusting","title":"Color adjusting","text":"

    Invoke before drawFrame().

    "},{"location":"postfx-pipeline/#draw","title":"Draw","text":"

    Invoke under onDraw(renderTarget).

    this.drawFrame(renderTarget, this.fullFrame1);\nthis.bindAndDraw(this.fullFrame1);\n
    "},{"location":"quad-image/","title":"Image","text":""},{"location":"quad-image/#introduction","title":"Introduction","text":"

    Image with 4 or 9 vertex control points.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"quad-image/#live-demos","title":"Live demos","text":""},{"location":"quad-image/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"quad-image/#install-plugin","title":"Install plugin","text":""},{"location":"quad-image/#load-minify-file","title":"Load minify file","text":""},{"location":"quad-image/#import-plugin","title":"Import plugin","text":""},{"location":"quad-image/#import-class","title":"Import class","text":""},{"location":"quad-image/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexQuadImage(x, y, texture, frame, {\n// ninePointMode: false,\n});\n

    or

    var image = scene.add.rexQuadImage({\n// x: 0,\n// y: 0,\nkey,\n// frame: null,\n// ninePointMode: false,\n// rtl: false\n});\n

    Add quadimage from JSON

    var quadimage = scene.make.rexQuadImage({\nx: 0,\ny: 0,\n\nkey: null,\nframe: null,\n\n// ninePointMode: false,\n// rtl: false\n\nadd: true\n});\n
    "},{"location":"quad-image/#custom-class","title":"Custom class","text":""},{"location":"quad-image/#vertex-control-points","title":"Vertex control points","text":""},{"location":"quad-image/#position","title":"Position","text":""},{"location":"quad-image/#tint-color","title":"Tint color","text":""},{"location":"quad-image/#other-properties","title":"Other properties","text":"

    See Mesh game object, game object

    "},{"location":"quad-image/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"quad-image/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"quad-rendertexture/","title":"Render texture","text":""},{"location":"quad-rendertexture/#introduction","title":"Introduction","text":"

    Render texture with 4 or 9 vertex control points.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"quad-rendertexture/#live-demos","title":"Live demos","text":""},{"location":"quad-rendertexture/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"quad-rendertexture/#install-plugin","title":"Install plugin","text":""},{"location":"quad-rendertexture/#load-minify-file","title":"Load minify file","text":""},{"location":"quad-rendertexture/#import-plugin","title":"Import plugin","text":""},{"location":"quad-rendertexture/#import-class","title":"Import class","text":""},{"location":"quad-rendertexture/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexQuadRenderTexturege(x, y, width, height, {\n// hideCCW: true,\n// ninePointMode: false,\n});\n

    or

    var image = scene.add.rexQuadRenderTexturege({\n// x: 0,\n// y: 0,\n// width: 32,\n// height: 32,\n// hideCCW: true,\n// ninePointMode: false,\n});\n

    Add prespective render texture from JSON

    var image = scene.make.rexQuadRenderTexturege({\nx: 0,\ny: 0,    width: 32,\nheight: 32,\n\n// hideCCW: false,\n// ninePointMode: false,\n\nadd: true\n});\n
    "},{"location":"quad-rendertexture/#custom-class","title":"Custom class","text":""},{"location":"quad-rendertexture/#internal-render-texture","title":"Internal render texture","text":"
    var rt = image.rt;\n
    "},{"location":"quad-rendertexture/#paste-texture","title":"Paste texture","text":""},{"location":"quad-rendertexture/#erase","title":"Erase","text":"
    image.rt.erase(gameObject, x, y);\n
    "},{"location":"quad-rendertexture/#clear","title":"Clear","text":"
    image.rt.clear();\n
    "},{"location":"quad-rendertexture/#fill","title":"Fill","text":"
    image.rt.fill(rgb, alpha);\n// image.rt.fill(rgb, alpha, x, y, width, height);\n
    "},{"location":"quad-rendertexture/#other-properties","title":"Other properties","text":"

    See Quad image game object, Mesh game object, game object

    "},{"location":"quad-rendertexture/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"quad-rendertexture/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"quest/","title":"Quest","text":""},{"location":"quest/#introduction","title":"Introduction","text":"

    Question manager.

    "},{"location":"quest/#live-demos","title":"Live demos","text":""},{"location":"quest/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"quest/#install-plugin","title":"Install plugin","text":""},{"location":"quest/#load-minify-file","title":"Load minify file","text":""},{"location":"quest/#import-plugin","title":"Import plugin","text":""},{"location":"quest/#import-class","title":"Import class","text":""},{"location":"quest/#question-manager","title":"Question manager","text":""},{"location":"quest/#create-question-manager-instance","title":"Create question manager instance","text":"
    var questionManager = scene.plugins.get('rexQuest').add({\nquestions: undefined,\n// format: undefined,\n// delimiter: ',',\n// types: {\n//     question: 'q',\n//     option: '',\n// },\n// convert: true,\n\nquest: undefined,\n// quest: {\n//     shuffleQuestions: false,\n//     shuffleOptions: false,\n// }\n});\n
    "},{"location":"quest/#add-questions","title":"Add questions","text":"
    questionManager.add(questions, config);\n
    "},{"location":"quest/#remove-question","title":"Remove question","text":""},{"location":"quest/#get-question","title":"Get question","text":""},{"location":"quest/#question-is-existed","title":"Question is existed","text":"
    var isExisted = questionManager.has(key);\n
    "},{"location":"quest/#array-of-questions","title":"Array of questions","text":"
    var questions = questionManager.questions;\n

    Rearrange items of this questions array to reorder questions in quest task.

    "},{"location":"quest/#get-option","title":"Get option","text":"
    var option = questionManager.getOption(question, optionKey);\n
    "},{"location":"quest/#private-quest-task","title":"Private quest task","text":""},{"location":"quest/#create-private-quest-task","title":"Create private quest task","text":"

    Each question manager can hava a private quest task object, created when creating question manager, or

    questionManager.startQuest(config);\n
    "},{"location":"quest/#get-next-question-object","title":"Get next question object","text":""},{"location":"quest/#event","title":"Event","text":""},{"location":"quest/#is-last-question","title":"Is last question","text":"
    var isLast = questionManager.isLastQuestion();\n
    "},{"location":"quest/#restart-quest-task","title":"Restart quest task","text":"
    questionManager.restartQuest();\n
    "},{"location":"quest/#private-data","title":"Private data","text":""},{"location":"quest/#quest-task","title":"Quest task","text":"

    Create new quest task if user needs more then 1 quest task.

    "},{"location":"quest/#create-quest-task","title":"Create quest task","text":"
    var quest = questionManager.newQuest(config);\n
    "},{"location":"quest/#get-next-question-object_1","title":"Get next question object","text":""},{"location":"quest/#event_1","title":"Event","text":""},{"location":"quest/#is-last-question_1","title":"Is last question","text":"
    var isLast = quest.isLastQuestion();\n
    "},{"location":"quest/#restart-quest-task_1","title":"Restart quest task","text":"
    quest.start();\n
    "},{"location":"quest/#private-data_1","title":"Private data","text":""},{"location":"quest/#get-option_1","title":"Get option","text":"
    var option = quest.getOption(question, optionKey);\n
    "},{"location":"random-data-generator/","title":"Random data generator","text":""},{"location":"random-data-generator/#introduction","title":"Introduction","text":"

    Get random value from a random generator, built-in methods of phaser.

    "},{"location":"random-data-generator/#usage","title":"Usage","text":""},{"location":"random-data-generator/#random-data-generator","title":"Random data generator","text":""},{"location":"random-data-generator/#set-seed","title":"Set seed","text":""},{"location":"random-data-generator/#get-random-value","title":"Get random value","text":""},{"location":"random-data-generator/#get-random-item","title":"Get random item","text":""},{"location":"random-data-generator/#shuffle-array","title":"Shuffle array","text":"
    var arr = rnd.shuffle(arr);\n
    "},{"location":"random/","title":"Random number","text":""},{"location":"random/#introduction","title":"Introduction","text":"

    Get random value, built-in methods of phaser.

    "},{"location":"random/#usage","title":"Usage","text":""},{"location":"random/#get-random-value-between-min-max","title":"Get random value between (min, max)","text":""},{"location":"random/#get-random-vector","title":"Get random vector","text":""},{"location":"randomplace/","title":"Random place","text":""},{"location":"randomplace/#introduction","title":"Introduction","text":"

    Place objects randomly inside an area without overlapping.

    "},{"location":"randomplace/#live-demos","title":"Live demos","text":""},{"location":"randomplace/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"randomplace/#install-plugin","title":"Install plugin","text":""},{"location":"randomplace/#load-minify-file","title":"Load minify file","text":""},{"location":"randomplace/#import-plugin","title":"Import plugin","text":""},{"location":"randomplace/#import-class","title":"Import class","text":""},{"location":"randomplace/#random-place","title":"Random place","text":"
    scene.plugins.get('rexRandomPlace').randomPlace(gameObjects, {\nradius: radius,\n\ngetPositionCallback: undefined,\narea: areaGeomObject,\n});\n
    "},{"location":"raycaster/","title":"Raycaster","text":""},{"location":"raycaster/#introduction","title":"Introduction","text":"

    Raycaster between obstacles.

    "},{"location":"raycaster/#live-demos","title":"Live demos","text":""},{"location":"raycaster/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"raycaster/#install-plugin","title":"Install plugin","text":""},{"location":"raycaster/#load-minify-file","title":"Load minify file","text":""},{"location":"raycaster/#import-plugin","title":"Import plugin","text":""},{"location":"raycaster/#import-class","title":"Import class","text":""},{"location":"raycaster/#create-instance","title":"Create instance","text":"
    var raycaster = scene.plugins.get('rexRaycaster').add({\n// maxRayLength: 10000\n});\n
    "},{"location":"raycaster/#obstacle","title":"Obstacle","text":""},{"location":"raycaster/#add","title":"Add","text":"
    raycaster.addObstacle(gameObject);\n// raycaster.addObstacle(gameObject, polygon);\n

    or

    raycaster.addObstacle(gameObjects);\n
    "},{"location":"raycaster/#remove","title":"Remove","text":"
    raycaster.removeObstacle(gameObject);\n
    "},{"location":"raycaster/#clear","title":"Clear","text":"
    raycaster.clearObstacle();\n
    "},{"location":"raycaster/#update-shape","title":"Update shape","text":"
    raycaster.updateObstacle(gameObject);\n// raycaster.updateObstacle(gameObject, polygon);\n
    "},{"location":"raycaster/#raycaster","title":"Raycaster","text":"
    var result = raycaster.rayToward(x, y, angle);\n

    Reflection

    Use result.x, result.y, result.reflectAngle for next reflection ray.

    raycaster.rayToward(result.x, result.y, result.reflectAngle)\n

    "},{"location":"realtimetimers/","title":"Real time timers","text":""},{"location":"realtimetimers/#introduction","title":"Introduction","text":"

    Start and counting timer by real-time timestamp.

    Note

    Not support pause, or timescale features.

    "},{"location":"realtimetimers/#live-demos","title":"Live demos","text":""},{"location":"realtimetimers/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"realtimetimers/#install-plugin","title":"Install plugin","text":""},{"location":"realtimetimers/#load-minify-file","title":"Load minify file","text":""},{"location":"realtimetimers/#import-plugin","title":"Import plugin","text":""},{"location":"realtimetimers/#import-class","title":"Import class","text":""},{"location":"realtimetimers/#create-instance","title":"Create instance","text":"
    var realTimeTimers = scene.plugins.get('rexRealTimeTimers').add({\n// startTimestamp: new Date().getTime(),\n// getTimestampCallback: functio() { return timestamp; }\n});\n
    "},{"location":"realtimetimers/#set-start-timestamp","title":"Set start timestamp","text":"

    Start-timestamp is set when creating this real-time timers object.

    User still can change Start-timestamp by

    realTimeTimers.setStartTimestamp(timestamp);\n

    This changing won't affect existed timers.

    "},{"location":"realtimetimers/#add-a-timer","title":"Add a timer","text":"
    realTimeTimers.addTimer(name, period);\n// realTimeTimers.addTimer(name, period, data);\n// realTimeTimers.addTimer(name, period, data, currentTimestamp);\n

    or

    realTimeTimers.addTimer(name, {\nday: dayCount,        // d: dayCount,\nhour: hourCount,      // h: hourCount,\nminute: minuteCount,  // m: minuteCount,\nsecond: secondCount,  // s: secondCount,\n}, data, currentTimestamp);\n
    "},{"location":"realtimetimers/#increase-period","title":"Increase period","text":"
    realTimeTimers.incTimerPeriod(name, period);\n

    or

    realTimeTimers.incTimerPeriod(name, {\nday: dayCount,        // d: dayCount,\nhour: hourCount,      // h: hourCount,\nminute: minuteCount,  // m: minuteCount,\nsecond: secondCount,  // s: secondCount,\n});\n

    Will trigger 'update' event.

    "},{"location":"realtimetimers/#expire-timers","title":"Expire timers","text":""},{"location":"realtimetimers/#get-timers","title":"Get timers","text":""},{"location":"realtimetimers/#remove-timers","title":"Remove timers","text":""},{"location":"realtimetimers/#states","title":"States","text":""},{"location":"realtimetimers/#events","title":"Events","text":""},{"location":"rendertexture/","title":"Render texture","text":""},{"location":"rendertexture/#introduction","title":"Introduction","text":"

    Paste game objects or textures on dynaimc texture, built-in game object of phaser.

    "},{"location":"rendertexture/#usage","title":"Usage","text":""},{"location":"rendertexture/#add-render-texture-object","title":"Add render texture object","text":"

    Add render texture from JSON

    var rt = scene.make.renderTexture({\nx: 0,\ny: 0,\nwidth: 32,\nheight: 32,\n\n// angle: 0,\n// alpha: 1\n// flipX: true,\n// flipY: true,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n

    Origin position

    Origin position of this render texture is (0,0) (top-left)

    "},{"location":"rendertexture/#custom-class","title":"Custom class","text":""},{"location":"rendertexture/#paste-texture","title":"Paste texture","text":""},{"location":"rendertexture/#global-alpha","title":"Global alpha","text":"
    rt.setGlobalAlpha(alpha);\n// rt.globalAlpha = alpha;\n
    "},{"location":"rendertexture/#global-tint","title":"Global tint","text":"
    rt.setGlobalTint(tint);\n// rt.globalTint = tint;\n
    "},{"location":"rendertexture/#erase","title":"Erase","text":"
    rt.erase(gameObject, x, y);\n
    "},{"location":"rendertexture/#clear","title":"Clear","text":"
    rt.clear();\n
    "},{"location":"rendertexture/#fill","title":"Fill","text":"
    rt.fill(rgb, alpha);\n// rt.fill(rgb, alpha, x, y, width, height);\n
    "},{"location":"rendertexture/#set-size","title":"Set size","text":"
    rt.setSize(width, height);\n// rt.resize(width, height);\n
    "},{"location":"rendertexture/#save-texture","title":"Save texture","text":"

    Stores a copy of this Render Texture in the Texture Manager using the given key.

    rt.saveTexture(key);\n

    Calling saveTexture again will not save another copy of the same texture, it will just rename the key of the existing copy.

    "},{"location":"rendertexture/#internal-camera","title":"Internal camera","text":"

    Internal camera rt.camera

    "},{"location":"rendertexture/#snapshot","title":"Snapshot","text":""},{"location":"rendertexture/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"rendertexture/#create-mask","title":"Create mask","text":"
    var mask = rt.createBitmapMask();\n

    See mask

    "},{"location":"rendertexture/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"restorabledata/","title":"Restorable data","text":""},{"location":"restorabledata/#introduction","title":"Introduction","text":"

    Restorable data manager, extends from built-in data manager.

    "},{"location":"restorabledata/#live-demos","title":"Live demos","text":""},{"location":"restorabledata/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"restorabledata/#install-plugin","title":"Install plugin","text":""},{"location":"restorabledata/#load-minify-file","title":"Load minify file","text":""},{"location":"restorabledata/#import-plugin","title":"Import plugin","text":""},{"location":"restorabledata/#import-class","title":"Import class","text":""},{"location":"restorabledata/#create-instance","title":"Create instance","text":"
    var data = scene.plugins.get('rexRData').add(parent);\n// var data = scene.plugins.get('rexRData').add(parent, eventEmitter);\n
    "},{"location":"restorabledata/#getsetremove-value","title":"Get/set/remove value","text":"

    See built-in data manager.

    "},{"location":"restorabledata/#commit","title":"Commit","text":"

    Commit current data status into repository, and increase current version number.

    data.commit();\n

    or

    data.commit(alias);\n
    "},{"location":"restorabledata/#restore","title":"Restore","text":""},{"location":"restorabledata/#version","title":"Version","text":"

    Version starts from 0 which has no data. Each data.commit() will increase this version number.

    "},{"location":"restorabledata/#saveload-status","title":"Save/load status","text":"

    or

    "},{"location":"reverse-string/","title":"Reverse","text":""},{"location":"reverse-string/#introduction","title":"Introduction","text":"

    Reverses string, built-in method of phaser.

    "},{"location":"reverse-string/#usage","title":"Usage","text":"
    var result = Phaser.Utils.String.ReverseString(str);\n
    "},{"location":"rexvideo/","title":"Rexvideo","text":""},{"location":"rexvideo/#introduction","title":"Introduction","text":"

    Play video on DOM, or on canvas.

    "},{"location":"rexvideo/#live-demos","title":"Live demos","text":""},{"location":"rexvideo/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"rexvideo/#install-plugin","title":"Install plugin","text":""},{"location":"rexvideo/#load-minify-file","title":"Load minify file","text":""},{"location":"rexvideo/#import-plugin","title":"Import plugin","text":""},{"location":"rexvideo/#import-class","title":"Import class","text":""},{"location":"rexvideo/#add-video-object","title":"Add video object","text":"

    Default configuration

    {\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\n\n// Element properties\nsrc: url,\n// src: {\n//     webm: webmFileURL,\n//     ogg: oggFileURL,\n//     mp4: mp4FileURL,\n//     h264: h264FileURL,\n// }\nid: undefined,\nautoPlay: true,\ncontrols: false,\nloop: false,\nmuted: false,\nplaysInline: true,\ncrossOrigin: 'anonymous',\nplaybackTimeChangeEventEnable: true,\n}\n
    "},{"location":"rexvideo/#different-between-rexvideo-and-rexvideocanvas","title":"Different between rexVideo and rexVideoCanvas","text":""},{"location":"rexvideo/#custom-class","title":"Custom class","text":""},{"location":"rexvideo/#load","title":"Load","text":"
    video.load(src);\n
    "},{"location":"rexvideo/#play","title":"Play","text":"
    video.play();\n
    "},{"location":"rexvideo/#pause","title":"Pause","text":"
    video.pause();\n
    "},{"location":"rexvideo/#playback-time","title":"Playback time","text":""},{"location":"rexvideo/#duration","title":"Duration","text":"
    var duration = video.duration;  // time in seconds\n
    "},{"location":"rexvideo/#volume","title":"Volume","text":""},{"location":"rexvideo/#mute","title":"Mute","text":""},{"location":"rexvideo/#loop","title":"Loop","text":""},{"location":"rexvideo/#resize","title":"Resize","text":"
    video.resize(width, height);\n
    "},{"location":"rexvideo/#status","title":"Status","text":""},{"location":"rexvideo/#events","title":"Events","text":""},{"location":"rope/","title":"Rope","text":""},{"location":"rope/#introduction","title":"Introduction","text":"

    Manipulate the vertices of images, built-in game object of phaser.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"rope/#usage","title":"Usage","text":""},{"location":"rope/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"rope/#add-object","title":"Add object","text":"
    var rope = scene.add.rope(x, y, texture, frame, points, horizontal);\n// var rope = scene.add.rope(x, y, texture, frame, points, horizontal, colors, alphas);\n

    Add rope from JSON

    var rope = scene.make.rope({\nx: 0,\ny: 0,\nkey: '',\nframe: null,\nhorizontal: true,\npoints: undefined,\ncolors: undefined,\nalphas: undefined,\n\n// angle: 0,\n// alpha: 1\n// flipX: true,\n// flipY: true,\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"rope/#custom-rope-class","title":"Custom rope class","text":""},{"location":"rope/#origin","title":"Origin","text":"

    A Ropes origin is always 0.5 x 0.5 and cannot be changed.

    "},{"location":"rope/#set-vertices","title":"Set vertices","text":"

    Set vertices via

    rope.setPoints(points);\n// rope.setPoints(points, colors, alphas);\n

    Also change horizontal mode :

    Or set rope.points directly :

    1. Change rope.points
    2. Call rope.setDirty(), or rope.updateVertices()

    Each point is relative to position of rope object, get points of world via

    var worldX = rope.points[i].x + rope.x;\nvar worldY = rope.points[i].y + rope.y;\n
    "},{"location":"rope/#play-animation","title":"Play animation","text":"
    rope.play(key);\n// rope.play(key, ignoreIfPlaying, startFrame);\n
    "},{"location":"rope/#alpha","title":"Alpha","text":""},{"location":"rope/#color-tint","title":"Color tint","text":""},{"location":"rope/#tint-fill-mode","title":"Tint fill mode","text":"

    Sets the tint fill mode.

    rope.setTintFill(mode);\n
    "},{"location":"rope/#flip","title":"Flip","text":"
    rope.flipX = flip;\nrope.flipY = flip;\n

    If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.

    "},{"location":"rope/#debug","title":"Debug","text":"

    Draw debug mesh each render tick.

    rope.setDebug(graphic);\n// rope.setDebug(graphic, callback);\n

    Note

    Clear Debug graphics (rope.debugGraphic.clear()) during scene's update stage (scene.update() { })

    "},{"location":"rotate/","title":"Rotate","text":""},{"location":"rotate/#introduction","title":"Introduction","text":"

    Rotate game object continually with a steady speed.

    "},{"location":"rotate/#live-demos","title":"Live demos","text":""},{"location":"rotate/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"rotate/#install-plugin","title":"Install plugin","text":""},{"location":"rotate/#load-minify-file","title":"Load minify file","text":""},{"location":"rotate/#import-plugin","title":"Import plugin","text":""},{"location":"rotate/#import-class","title":"Import class","text":""},{"location":"rotate/#create-instance","title":"Create instance","text":"
    var rotate = scene.plugins.get('rexRotate').add(gameObject, {\n// speed: 180,\n// enable: true,\n// timeScale: 1,\n});\n
    "},{"location":"rotate/#enable","title":"Enable","text":""},{"location":"rotate/#set-speed","title":"Set speed","text":"
    rotate.setSpeed(speed);\n// rotate.speed = speed;\n
    "},{"location":"rotate/#status","title":"Status","text":""},{"location":"rotateto/","title":"Rotate to","text":""},{"location":"rotateto/#introduction","title":"Introduction","text":"

    Rotate game object towards target position with a steady speed.

    "},{"location":"rotateto/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"rotateto/#install-plugin","title":"Install plugin","text":""},{"location":"rotateto/#load-minify-file","title":"Load minify file","text":""},{"location":"rotateto/#import-plugin","title":"Import plugin","text":""},{"location":"rotateto/#import-class","title":"Import class","text":""},{"location":"rotateto/#create-instance","title":"Create instance","text":"
    var rotateTo = scene.plugins.get('rexRotateTo').add(gameObject, {\n// speed: 180,\n// enable: true,\n// timeScale: 1,\n});\n
    "},{"location":"rotateto/#start-moving","title":"Start moving","text":""},{"location":"rotateto/#rotate-game-object-towards-position","title":"Rotate game object towards position","text":""},{"location":"rotateto/#rotate-game-object-to-angle","title":"Rotate game object to angle","text":""},{"location":"rotateto/#enable","title":"Enable","text":""},{"location":"rotateto/#pause-resume-stop-rotating","title":"Pause, Resume, stop rotating","text":"
    rotateTo.pause();\nrotateTo.resume();\nrotateTo.stop();\n
    "},{"location":"rotateto/#set-speed","title":"Set speed","text":"
    rotateTo.setSpeed(speed);\n// rotateTo.speed = speed;\n
    "},{"location":"rotateto/#events","title":"Events","text":""},{"location":"rotateto/#status","title":"Status","text":""},{"location":"round-to/","title":"Round to","text":""},{"location":"round-to/#introduction","title":"Introduction","text":"

    Round/ceil/floor to the given precision, built-in method of phaser.

    "},{"location":"round-to/#usage","title":"Usage","text":""},{"location":"round-to/#round-to","title":"Round to","text":"

    var result = Phaser.Math.RoundTo(value);\n
    or
    var result = Phaser.Math.RoundTo(value, place, base);\n

    Examples

    RoundTo(123.456789, 0) = 123\nRoundTo(123.456789, -1) = 123.5\nRoundTo(123.456789, -2) = 123.46\nRoundTo(123.456789, -3) = 123.457\n
    "},{"location":"round-to/#ceil-to","title":"Ceil to","text":"

    var result = Phaser.Math.CeilTo(value);\n
    or
    var result = Phaser.Math.CeilTo(value, place, base);\n

    "},{"location":"round-to/#floor-to","title":"Floor to","text":"

    var result = Phaser.Math.floorTo(value);\n
    or
    var result = Phaser.Math.floorTo(value, place, base);\n

    "},{"location":"runcommands/","title":"Run commands","text":""},{"location":"runcommands/#introduction","title":"Introduction","text":"

    Run commands in array.

    "},{"location":"runcommands/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"runcommands/#install-plugin","title":"Install plugin","text":""},{"location":"runcommands/#load-minify-file","title":"Load minify file","text":""},{"location":"runcommands/#import-plugin","title":"Import plugin","text":""},{"location":"runcommands/#import-class","title":"Import class","text":""},{"location":"runcommands/#run-commands","title":"Run commands","text":"
    scene.plugins.get('rexRunCommands').run(commands, scope);\n
    "},{"location":"scaledowndestroy/","title":"Scale down destroy","text":""},{"location":"scaledowndestroy/#introduction","title":"Introduction","text":"

    Scale down (i.e. ease scaleX, scaleY to 0) game object then destroy it.

    "},{"location":"scaledowndestroy/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"scaledowndestroy/#install-plugin","title":"Install plugin","text":""},{"location":"scaledowndestroy/#load-minify-file","title":"Load minify file","text":""},{"location":"scaledowndestroy/#import-plugin","title":"Import plugin","text":""},{"location":"scaledowndestroy/#import-class","title":"Import class","text":""},{"location":"scaledowndestroy/#scale-down","title":"Scale down","text":""},{"location":"scaledowndestroy/#events","title":"Events","text":"

    See Events of tween task

    "},{"location":"scalemanager/","title":"Scale manager","text":""},{"location":"scalemanager/#introduction","title":"Introduction","text":"

    Scale game window, built-in method of phaser.

    "},{"location":"scalemanager/#usage","title":"Usage","text":""},{"location":"scalemanager/#setup","title":"Setup","text":"

    Setup scale mode in game configuration.

    var config = {\n// ...\nparent: divId,\n\n// Game size\nwidth: 1024,\nheight: 768,\n\nscale: {\n// Or set parent divId here\nparent: divId,\n\nmode: Phaser.Scale.FIT,\nautoCenter: Phaser.Scale.CENTER_BOTH,\n\n// Or put game size here\n// width: 1024,\n// height: 768,\n\n// Minimum size\nmin: {\nwidth: 800,\nheight: 600\n},\n// Or set minimum size like these\n// minWidth: 800,\n// minHeight: 600,\n\n// Maximum size\nmax: {\nwidth: 1600,\nheight: 1200\n},\n// Or set maximum size like these\n// maxWidth: 1600,\n// maxHeight: 1200,\n\nzoom: 1,  // Size of game canvas = game size * zoom\n},\nautoRound: false\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"scalemanager/#resize-canvas-element","title":"Resize canvas element","text":"
    scene.scale.resize(width, height);\n

    Modify the size of the Phaser canvas element directly. You should only use this if you are using the NO_SCALE scale mode,

    "},{"location":"scalemanager/#set-game-size","title":"Set game size","text":"
    scene.scale.setGameSize(width, height);\n

    It should only be used if you're looking to change the base size of your game and are using one of the Scale Manager scaling modes, i.e. FIT. If you're using NO_SCALE and wish to change the game and canvas size directly, then please use the resize method instead.

    "},{"location":"scalemanager/#get-view-port","title":"Get view port","text":"
    var viewport = scene.scale.getViewPort();\n// var viewport = scene.scale.getViewPort(camera, out);\n
    "},{"location":"scalemanager/#members","title":"Members","text":""},{"location":"scalemanager/#events","title":"Events","text":"
    scene.scale.on('resize', function(gameSize, baseSize, displaySize, previousWidth, previousHeight) {});\n
    "},{"location":"scalemanager/#update-bounds","title":"Update bounds","text":"

    This method dose not have to be invoked, unless the canvas position, or visibility is changed via any other method (i.e. via an Angular route).

    scene.scale.updateBounds();\n
    "},{"location":"scalemanager/#full-screen","title":"Full screen","text":"

    Under 'pointerup' touch event :

    Games within an iframe will also be blocked from fullscreen unless the iframe has the allowfullscreen attribute.

    Performing an action that navigates to another page, or opens another tab, will automatically cancel fullscreen mode, as will the user pressing the ESC key.

    "},{"location":"scalemanager/#events_1","title":"Events","text":""},{"location":"scalemanager/#orientation","title":"Orientation","text":"
    scene.scale.on('orientationchange', function(orientation) {\nif (orientation === Phaser.Scale.PORTRAIT) {\n\n} else if (orientation === Phaser.Scale.LANDSCAPE) {\n\n}\n}, scope);\n
    "},{"location":"scaleouter/","title":"Scale outer","text":""},{"location":"scaleouter/#introduction","title":"Introduction","text":"

    Scroll and zoom camera to make default game window fit the display area, in RESIZE scale mode.

    "},{"location":"scaleouter/#live-demos","title":"Live demos","text":""},{"location":"scaleouter/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"scaleouter/#install-plugin","title":"Install plugin","text":""},{"location":"scaleouter/#set-scale-mode-to-resize","title":"Set scale mode to RESIZE","text":"
    var config = {\n// ...\nscale: {\nparent: divId,\nmode: Phaser.Scale.RESIZE,\nwidth: 1024,    // Default game window width\nheight: 768,    // Default game window height\n// ...\n}\n}\nvar game = new Phaser.Game(config);\n
    "},{"location":"scaleouter/#load-minify-file","title":"Load minify file","text":""},{"location":"scaleouter/#import-plugin","title":"Import plugin","text":""},{"location":"scaleouter/#import-class","title":"Import class","text":""},{"location":"scaleouter/#create-instance","title":"Create instance","text":"

    ScaleOuter plugin is a scene plugin, which created as a member of scene (scene.rexScaleOuter) for each scene. It does not have to create other scale outer instance.

    "},{"location":"scaleouter/#remove-instance","title":"Remove instance","text":"

    Invoke scene.rexScaleOuter.destroy() under scene.create() { ... }.

    "},{"location":"scaleouter/#add-camera","title":"Add camera","text":""},{"location":"scaleouter/#viewport","title":"Viewport","text":""},{"location":"scaleouter/#manual-scale","title":"Manual scale","text":"
    1. Stop resize callback
      scene.rexScaleOuter.stop()\n
    2. Manual scale
      scene.rexScaleOuter.scale();\n
    "},{"location":"scene/","title":"Scene","text":""},{"location":"scene/#define-a-scene","title":"Define a scene","text":""},{"location":"scene/#configuration-of-scene","title":"Configuration of scene","text":"
    var config = {\nkey: \"\",\n// active: false,\n// visible: true,\n// pack: false,\n// cameras: null,\n// map: {},\n// physics: {},\n// loader: {},\n// plugins: false,\n// input: {}\n};\n
    "},{"location":"scene/#es6-class","title":"ES6 class","text":"
    class MyScene extends Phaser.Scene {\nconstructor(config) {\nsuper(config);\n}\n\ninit(data) {}\npreload() {}\ncreate(data) {}\nupdate(time, delta) {}\n}\n
    "},{"location":"scene/#class","title":"Class","text":"
    var MyScene = new Phaser.Class({\nExtends: Phaser.Scene,\n\ninitialize: function MyScene(config) {\nPhaser.Scene.call(this, config);\n},\n\ninit: function (data) {},\npreload: function () {},\ncreate: function (data) {},\nupdate: function (time, delta) {},\n});\n
    var MyGame = {};\n\nMyGame.Boot = function () {};\n\nMyGame.Boot.prototype.constructor = MyGame.Boot;\n\nMyGame.Boot.prototype = {\ninit: function (data) {},\npreload: function () {},\ncreate: function (data) {},\nupdate: function (time, delta) {},\n};\n
    "},{"location":"scene/#override","title":"Override","text":"
    var demo = new Phaser.Scene(\"Demo\");\n\ndemo.init = function (data) {};\ndemo.preload = function () {};\ndemo.create = function (data) {};\ndemo.update = function (time, delta) {};\n
    "},{"location":"scene/#flow-chart","title":"Flow chart","text":"
    graph TB\n\nsubgraph Stop\nSceneEventDestroy>\"scene.events: destroy\"]\nStop[\"Shutdown<br>Free game objects\"]\nend\n\nsubgraph Update\nSceneUpdate[\"Run: Every tick<br>scene.update()\"]\nSceneEventPauseSleep>\"scene.events: pause<br>scene.events: sleep\"]\nPause[\"Pause: render but no update<br>Sleep: no update, no render\"]\nSceneEventResumeWake>\"scene.events: resume<br>scene.events: wake\"]\nend\n\nsubgraph Create\nSceneEventStart>\"scene.events: start\"]\nSceneEventReady>\"scene.events: ready\"]\nSceneInit[\"scene.init()\"]\nScenePreLoad[\"Load assets<br>scene.preload()\"]\nSceneCreate[\"Create game objects<br>scene.create()\"]\nend\n\nStart((Start)) --> SceneEventStart\nSceneEventStart --> SceneEventReady\nSceneEventReady --> SceneInit\nSceneInit --> ScenePreLoad\nScenePreLoad --> SceneCreate\nSceneCreate --> SceneUpdate\nSceneUpdate --> SceneUpdate\nSceneUpdate --> |\"scene.scene.pause()<br>scene.scene.sleep()\"|SceneEventPauseSleep\nSceneEventPauseSleep --> Pause\nPause --> |\"scene.scene.resume()<br>scene.scene.wake()\"|SceneEventResumeWake\nSceneEventResumeWake --> SceneUpdate\n\nSceneUpdate --> |\"scene.scene.stop()<br>scene.scene.restart()\"|Stop\nPause --> |\"scene.scene.stop()<br>scene.scene.restart()\"|SceneEventDestroy\nSceneEventDestroy --> Stop\n\nStop --> |\"scene.scene.start()<br>scene.scene.launch()<br>scene.scene.restart()\"|SceneEventStart

    See also

    "},{"location":"scene/#start","title":"Start","text":"
    1. Invoke scene.preload()
    2. Invoke scene.create()

    scene.scene.restart() is equal to

    scene.scene.stop();\nscene.scene.start();\n
    "},{"location":"scene/#stop","title":"Stop","text":""},{"location":"scene/#members","title":"Members","text":"

    Preserve word in a scene.

    "},{"location":"scene/#events","title":"Events","text":""},{"location":"scenemanager/","title":"Scene manager","text":"

    Scene manager plugin:

    "},{"location":"scenemanager/#add-new-scene","title":"Add new scene","text":"
    var newScene = scene.scene.add(key, sceneConfig, autoStart, data);\n// var newScene = game.scene.add(key, sceneConfig, autoStart, data);\n
    "},{"location":"scenemanager/#load-scene-from-external-files","title":"Load scene from external files","text":"
    1. load script
      scene.load.script(key, url);\n
    2. add new scene
      scene.scene.add(key, sceneConfig, autoStart);\n// game.scene.add(key, sceneConfig, autoStart);\n
    "},{"location":"scenemanager/#destroy-scene","title":"Destroy scene","text":"
    scene.scene.remove(key);\n
    "},{"location":"scenemanager/#start-scene","title":"Start scene","text":""},{"location":"scenemanager/#pauseresume-scene","title":"Pause/Resume scene","text":""},{"location":"scenemanager/#run-scene","title":"Run scene","text":"

    Runs the given Scene, but does not change the state of this Scene.

    If the given Scene is paused, it will resume it. If sleeping, it will wake it. If not running at all, it will be started.

    scene.scene.run(key, data);\n
    "},{"location":"scenemanager/#stop-scene","title":"Stop scene","text":"

    Shutdown the Scene, clearing display list, timers, etc.

    scene.scene.stop(key);\n// scene.scene.stop();  // stop myself\n
    "},{"location":"scenemanager/#set-visible","title":"Set visible","text":"
    scene.scene.setVisible(value, key);  // value: true/false\n// scene.scene.setVisible(value);    // set visible to myself\n
    "},{"location":"scenemanager/#read-status","title":"Read status","text":"
    var isSleep = scene.scene.isSleeping(key);\n// var isSleep = scene.scene.isSleeping();\n
    var isPaused = scene.scene.isPaused(key);\n// var isPaused = scene.scene.isPaused();\n
    var isActive = scene.scene.isActive(key);\n// var isActive = scene.scene.isActive();\n
    var isVisible = scene.scene.isVisible(key);\n// var isVisible = scene.scene.isVisible();\n
    Update/isActive Render/isVisible Run Pause Sleep

    Pause/Sleep/Stop

    var status = scene.scene.getStatus(key);\n// var status = scene.scene.getStatus();\n
    "},{"location":"scenemanager/#get-scene","title":"Get scene","text":"
    var scene = scene.scene.get(key);\n
    "},{"location":"scenemanager/#order-of-scenes","title":"Order of scenes","text":"

    Swaps the position of two scenes in the Scenes list.

    scene.scene.swapPosition(keyA, keyB);\n// scene.scene.stop(keyA);\n
    scene.scene.moveAbove(keyA, keyB);\n// scene.scene.moveAbove(keyA);\n

    Scene B is directly above Scene A.

    scene.scene.moveBelow(keyA, keyB);\n// scene.scene.moveBelow(keyA);\n

    Scene B is directly below Scene A.

    scene.scene.moveUp(keyA);\n// scene.scene.moveBelow();\n
    scene.scene.moveDown(keyA);\n// scene.scene.moveDown();\n
    scene.scene.bringToTop(keyA);\n// scene.scene.bringToTop();\n
    scene.scene.sendToBack(keyA);\n// scene.scene.sendToBack();\n
    "},{"location":"scenemanager/#transition","title":"Transition","text":"
    scene.scene.transition({\ntarget: key,\n// data: null,\n// moveAbove: false,\n// moveBelow: false,\n\nduration: 1000,\n\n// remove: false,\n// sleep: false,\n// allowInput: false,\n\n// onStart: null,\n// onStartScope: scene,\n\n// onUpdate: null,\n// onUpdateScope: scene,\n})\n
    "},{"location":"scenemanager/#execution-flow","title":"Execution flow","text":"
    1. Invoke scene.scene.transition method.
    2. When transition completed.
    "},{"location":"scenemanager/#events","title":"Events","text":""},{"location":"scenemanager/#system-scene","title":"System scene","text":"

    A default empty Scene that lives outside of the Scene list, but can be used by plugins and managers that need access to a live Scene, without being tied to one.

    var scene = scene.scene.get('__SYSTEM');\n

    or

    var scene = scene.scene.systemScene;\n
    "},{"location":"scripttagloader/","title":"Script tag loader","text":""},{"location":"scripttagloader/#introduction","title":"Introduction","text":"

    Load script tag in preload stage.

    "},{"location":"scripttagloader/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"scripttagloader/#install-plugin","title":"Install plugin","text":""},{"location":"scripttagloader/#load-minify-file","title":"Load minify file","text":""},{"location":"scripttagloader/#import-plugin","title":"Import plugin","text":""},{"location":"scripttagloader/#import-class","title":"Import class","text":""},{"location":"scripttagloader/#load-script-tag","title":"Load script tag","text":"

    In preload stage:

    this.load.rexScriptTag(url);\n// this.load.rexScriptTag(url, availableTest);\n

    or

    this.load.rexScriptTag({\nurl: url,\navailableTest: undefined\n});\n
    "},{"location":"scripttagloader/#compare-with-script-loader","title":"Compare with script loader","text":""},{"location":"scroller/","title":"Scroller","text":""},{"location":"scroller/#introduction","title":"Introduction","text":"

    Drag content. Slow down when dragging released, pull back when out of bounds.

    "},{"location":"scroller/#live-demos","title":"Live demos","text":""},{"location":"scroller/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"scroller/#install-plugin","title":"Install plugin","text":""},{"location":"scroller/#load-minify-file","title":"Load minify file","text":""},{"location":"scroller/#import-plugin","title":"Import plugin","text":""},{"location":"scroller/#import-class","title":"Import class","text":""},{"location":"scroller/#create-instance","title":"Create instance","text":"
    var scroller = scene.plugins.get('rexScroller').add(gameObject, {\nbounds: [\nbottomBound,\ntopBound\n],\nvalue: topBound,    // threshold: 10,\n// slidingDeceleration: 5000,\n// backDeceleration: 2000,\n\n// dragReverse: false,\n// dragRate: 1,\n\n// enable: true,\n// orientation: 'vertical',\n// pointerOutRelease: true,\n\n// valuechangeCallback: null,\n// valuechangeCallbackScope: null,\n\n// overmaxCallback: null,\n// overmaxCallbackScope: null,\n\n// overminCallback: null,\n// overminCallbackScope: null,\n});\n
    "},{"location":"scroller/#set-bounds","title":"Set bounds","text":"
    this.setBounds(bounds);  // bounds: [bound0, bound1]\n// this.setBounds(bound0, bound1);\n
    "},{"location":"scroller/#set-deceleration","title":"Set deceleration","text":""},{"location":"scroller/#get-value","title":"Get value","text":"
    var value = scroller.value;\n
    "},{"location":"scroller/#set-value","title":"Set value","text":"

    Fires valuechange event if new value is not equal to current value.

    "},{"location":"scroller/#events","title":"Events","text":""},{"location":"scroller/#drag","title":"Drag","text":""},{"location":"scroller/#drag-enable","title":"Drag enable","text":""},{"location":"scroller/#is-dragging","title":"Is dragging","text":"
    var isDragging = scroller.isDragging;\n
    "},{"location":"scroller/#state-machine","title":"State machine","text":"
    graph TB\n\nIDLE[\"Idle\"] --> |Drag| DRAG[\"Dragging<br>event 'valuechange'\"]\nDRAG --> |Release| OnRelease{\"Under bounds?\"}\n\nOnRelease --> |Yes| SLIDE[\"Sliding<br>Sliding-deceleration\"]\nSLIDE --> |Stop| IDLE\nSLIDE --> |Drag| DRAG\n\nOnRelease --> |No| BACK[\"Pull back to bounds<br>Back-deceleration\"]\nBACK --> |Stop| IDLE\nBACK --> |Drag| DRAG
    "},{"location":"sequence/","title":"Sequence","text":""},{"location":"sequence/#introduction","title":"Introduction","text":"

    Run sequence commands in array.

    "},{"location":"sequence/#live-demos","title":"Live demos","text":""},{"location":"sequence/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"sequence/#install-plugin","title":"Install plugin","text":""},{"location":"sequence/#load-minify-file","title":"Load minify file","text":""},{"location":"sequence/#import-plugin","title":"Import plugin","text":""},{"location":"sequence/#import-class","title":"Import class","text":""},{"location":"sequence/#create-sequence-instance","title":"Create sequence instance","text":"
    var seq = this.plugins.get('rexSequence').add({\n// yoyo: false  // reverse sequence when it reaches the end\n// repeat: 0,   // repeat count\n// loop: false  // repeat forever\n});\n
    "},{"location":"sequence/#load-commands","title":"Load commands","text":"
    seq.load(commands, actionScope);\n

    Format of command is the same as run-command.

    "},{"location":"sequence/#run-commands","title":"Run commands","text":"
    seq.start();\n
    "},{"location":"sequence/#stop","title":"Stop","text":"
    seq.stop();\n
    "},{"location":"sequence/#events","title":"Events","text":"
    seq.on('complete', function(actionScope, seq){ });\n
    "},{"location":"sequence/#action-of-commands","title":"Action of commands","text":"

    Action of commands, extended from Phaser.Events.EventEmitter.

    class ActionKlass extends Phaser.Events.EventEmitter {\nconstructor(scene) {\nsuper();\n\nthis.scene = scene;\nthis.myConsole = scene.add.text(100, 100, '');\n\nthis['wait-click'] = this.waitClick;\nthis['wait-time'] = this.waitTime;\n}\n\n// callbacks\nprint(msg) {\nthis.myConsole.setText(msg);\n// return undefined to run next command\n}\n\nwaitClick() {\nthis.scene.input.once('pointerup', this.complete, this);\nreturn this;  // return eventEmitter to pause the sequence\n}\n\nwaitTime(delay) {\nthis.scene.time.delayedCall(delay * 1000, this.complete, [], this);\nreturn this;  // return eventEmitter to pause the sequence\n}\n\ncomplete() {\nthis.emit('complete');  // resume sequence\n}\n}\nvar actionScope = new ActionKlass(scene);\n

    Now this scope supports 3 commands

    "},{"location":"sequence/#state","title":"State","text":"
    var state = seq.state;\n
    var completed = seq.completed; // seq.state === 3\n
    "},{"location":"sequence/#other-properties","title":"Other properties","text":""},{"location":"shader-barrel/","title":"Barrel","text":"

    Note

    Phaser3.60 has a built-in barrel effect.

    "},{"location":"shader-barrel/#introduction","title":"Introduction","text":"

    Barrel post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-barrel/#live-demos","title":"Live demos","text":""},{"location":"shader-barrel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-barrel/#install-plugin","title":"Install plugin","text":""},{"location":"shader-barrel/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-barrel/#import-plugin","title":"Import plugin","text":""},{"location":"shader-barrel/#import-class","title":"Import class","text":""},{"location":"shader-barrel/#apply-effect","title":"Apply effect","text":""},{"location":"shader-barrel/#remove-effect","title":"Remove effect","text":""},{"location":"shader-barrel/#get-effect","title":"Get effect","text":""},{"location":"shader-barrel/#shrink-mode","title":"Shrink mode","text":""},{"location":"shader-barrel/#radius","title":"Radius","text":""},{"location":"shader-barrel/#power","title":"Power","text":""},{"location":"shader-barrel/#intensity","title":"Intensity","text":""},{"location":"shader-barrel/#center-position","title":"Center position","text":"

    Default value is center of window.

    "},{"location":"shader-builtin/","title":"Effects","text":""},{"location":"shader-builtin/#introduction","title":"Introduction","text":"

    Built-in pre-fx, and post-fx shader effects.

    Texture-based Game Objects also support Pre FX, including: Image, Sprite, TileSprite, Text, RenderTexture, Video.

    All Game Objects and camera support Post FX. These are effects applied after the Game Object has been rendered.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-builtin/#live-demos","title":"Live demos","text":""},{"location":"shader-builtin/#usage","title":"Usage","text":""},{"location":"shader-builtin/#barrel","title":"Barrel","text":""},{"location":"shader-builtin/#bloom","title":"Bloom","text":""},{"location":"shader-builtin/#blur","title":"Blur","text":""},{"location":"shader-builtin/#bokeh","title":"Bokeh","text":""},{"location":"shader-builtin/#tilt-shift","title":"Tilt Shift","text":""},{"location":"shader-builtin/#circle-outline","title":"Circle Outline","text":""},{"location":"shader-builtin/#colormatrix","title":"ColorMatrix","text":""},{"location":"shader-builtin/#displacement","title":"Displacement","text":""},{"location":"shader-builtin/#glow","title":"Glow","text":""},{"location":"shader-builtin/#gradient","title":"Gradient","text":""},{"location":"shader-builtin/#pixelate","title":"Pixelate","text":""},{"location":"shader-builtin/#shadow","title":"Shadow","text":""},{"location":"shader-builtin/#shine","title":"Shine","text":""},{"location":"shader-builtin/#vignette","title":"Vignette","text":""},{"location":"shader-builtin/#wipe","title":"Wipe","text":""},{"location":"shader-builtin/#reveal","title":"Reveal","text":""},{"location":"shader-builtin/#remove-all-effects","title":"Remove all effects","text":"

    gameObject.preFX.clear();\n
    gameObject.postFX.clear();\n
    camera.postFX.clear();\n

    "},{"location":"shader-builtin/#disable-all-effects","title":"Disable all effects","text":"

    gameObject.preFX.disable();\n// gameObject.preFX.disable(true);  // Also remove all effects\n
    gameObject.postFX.disable();\n// gameObject.postFX.disable(true);  // Also remove all effects\n
    camera.postFX.disable();\n// camera.postFX.disable(true);  // Also remove all effects\n

    "},{"location":"shader-colorreplace/","title":"Color replace","text":""},{"location":"shader-colorreplace/#introduction","title":"Introduction","text":"

    Replace color post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-colorreplace/#live-demos","title":"Live demos","text":""},{"location":"shader-colorreplace/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-colorreplace/#install-plugin","title":"Install plugin","text":""},{"location":"shader-colorreplace/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-colorreplace/#import-plugin","title":"Import plugin","text":""},{"location":"shader-colorreplace/#import-class","title":"Import class","text":""},{"location":"shader-colorreplace/#apply-effect","title":"Apply effect","text":""},{"location":"shader-colorreplace/#remove-effect","title":"Remove effect","text":""},{"location":"shader-colorreplace/#get-effect","title":"Get effect","text":""},{"location":"shader-colorreplace/#original-color","title":"Original color","text":""},{"location":"shader-colorreplace/#new-color","title":"New color","text":""},{"location":"shader-colorreplace/#epsilon","title":"Epsilon","text":""},{"location":"shader-crossstitching/","title":"Cross-stitching","text":""},{"location":"shader-crossstitching/#introduction","title":"Introduction","text":"

    Cross-stitching post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-crossstitching/#live-demos","title":"Live demos","text":""},{"location":"shader-crossstitching/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-crossstitching/#install-plugin","title":"Install plugin","text":""},{"location":"shader-crossstitching/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-crossstitching/#import-plugin","title":"Import plugin","text":""},{"location":"shader-crossstitching/#import-class","title":"Import class","text":""},{"location":"shader-crossstitching/#apply-effect","title":"Apply effect","text":""},{"location":"shader-crossstitching/#remove-effect","title":"Remove effect","text":""},{"location":"shader-crossstitching/#get-effect","title":"Get effect","text":""},{"location":"shader-crossstitching/#stitching-size","title":"Stitching size","text":""},{"location":"shader-crossstitching/#brightness","title":"Brightness","text":""},{"location":"shader-dissolve/","title":"Dissolve","text":""},{"location":"shader-dissolve/#introduction","title":"Introduction","text":"

    Dissolve transition post processing filter. (Reference)

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-dissolve/#live-demos","title":"Live demos","text":""},{"location":"shader-dissolve/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-dissolve/#install-plugin","title":"Install plugin","text":""},{"location":"shader-dissolve/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-dissolve/#import-plugin","title":"Import plugin","text":""},{"location":"shader-dissolve/#import-class","title":"Import class","text":""},{"location":"shader-dissolve/#apply-effect","title":"Apply effect","text":""},{"location":"shader-dissolve/#remove-effect","title":"Remove effect","text":""},{"location":"shader-dissolve/#get-effect","title":"Get effect","text":""},{"location":"shader-dissolve/#transition-target-texture","title":"Transition target texture","text":""},{"location":"shader-dissolve/#progress","title":"Progress","text":""},{"location":"shader-dissolve/#resize-mode","title":"Resize mode","text":""},{"location":"shader-dissolve/#noise","title":"Noise","text":""},{"location":"shader-dissolve/#edge","title":"Edge","text":""},{"location":"shader-dropshadow/","title":"Drop shadow","text":""},{"location":"shader-dropshadow/#introduction","title":"Introduction","text":"

    Drop-shadow post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-dropshadow/#live-demos","title":"Live demos","text":""},{"location":"shader-dropshadow/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-dropshadow/#install-plugin","title":"Install plugin","text":""},{"location":"shader-dropshadow/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-dropshadow/#import-plugin","title":"Import plugin","text":""},{"location":"shader-dropshadow/#import-class","title":"Import class","text":""},{"location":"shader-dropshadow/#apply-effect","title":"Apply effect","text":""},{"location":"shader-dropshadow/#remove-effect","title":"Remove effect","text":""},{"location":"shader-dropshadow/#get-effect","title":"Get effect","text":""},{"location":"shader-dropshadow/#rotation","title":"Rotation","text":""},{"location":"shader-dropshadow/#distance","title":"Distance","text":""},{"location":"shader-dropshadow/#shadow-color","title":"Shadow color","text":""},{"location":"shader-dropshadow/#alpha","title":"Alpha","text":""},{"location":"shader-dropshadow/#shadow-only","title":"Shadow-only","text":""},{"location":"shader-dropshadow/#blur","title":"Blur","text":""},{"location":"shader-dropshadow/#quality","title":"Quality","text":""},{"location":"shader-dropshadow/#pixel-size","title":"Pixel size","text":""},{"location":"shader-fisheye/","title":"Fisheye","text":""},{"location":"shader-fisheye/#introduction","title":"Introduction","text":"

    Fish-eye post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-fisheye/#live-demos","title":"Live demos","text":""},{"location":"shader-fisheye/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-fisheye/#install-plugin","title":"Install plugin","text":""},{"location":"shader-fisheye/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-fisheye/#import-plugin","title":"Import plugin","text":""},{"location":"shader-fisheye/#import-class","title":"Import class","text":""},{"location":"shader-fisheye/#apply-effect","title":"Apply effect","text":""},{"location":"shader-fisheye/#remove-effect","title":"Remove effect","text":""},{"location":"shader-fisheye/#get-effect","title":"Get effect","text":""},{"location":"shader-fisheye/#radius","title":"Radius","text":""},{"location":"shader-fisheye/#intensity","title":"Intensity","text":""},{"location":"shader-fisheye/#center-position","title":"Center position","text":"

    Default value is center of window.

    "},{"location":"shader-fisheye/#mode","title":"Mode","text":""},{"location":"shader-glowfilter/","title":"Glow","text":"

    Note

    Phaser3.60 has a built-in Glow effect.

    "},{"location":"shader-glowfilter/#introduction","title":"Introduction","text":"

    Glow post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-glowfilter/#live-demos","title":"Live demos","text":""},{"location":"shader-glowfilter/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-glowfilter/#install-plugin","title":"Install plugin","text":""},{"location":"shader-glowfilter/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-glowfilter/#import-plugin","title":"Import plugin","text":""},{"location":"shader-glowfilter/#import-class","title":"Import class","text":""},{"location":"shader-glowfilter/#apply-effect","title":"Apply effect","text":""},{"location":"shader-glowfilter/#remove-effect","title":"Remove effect","text":""},{"location":"shader-glowfilter/#get-effect","title":"Get effect","text":""},{"location":"shader-glowfilter/#intensity","title":"Intensity","text":""},{"location":"shader-glowfilter2/","title":"Glow","text":"

    Note

    Phaser3.60 has a built-in Glow effect.

    "},{"location":"shader-glowfilter2/#introduction","title":"Introduction","text":"

    Glow post processing filter, port from pixi. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-glowfilter2/#live-demos","title":"Live demos","text":""},{"location":"shader-glowfilter2/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-glowfilter2/#install-plugin","title":"Install plugin","text":""},{"location":"shader-glowfilter2/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-glowfilter2/#import-plugin","title":"Import plugin","text":""},{"location":"shader-glowfilter2/#import-class","title":"Import class","text":""},{"location":"shader-glowfilter2/#apply-effect","title":"Apply effect","text":""},{"location":"shader-glowfilter2/#remove-effect","title":"Remove effect","text":""},{"location":"shader-glowfilter2/#get-effect","title":"Get effect","text":""},{"location":"shader-glowfilter2/#outer-strength","title":"Outer strength","text":""},{"location":"shader-glowfilter2/#inner-strength","title":"Inner strength","text":""},{"location":"shader-glowfilter2/#glow-color","title":"Glow color","text":""},{"location":"shader-glowfilter2/#distance","title":"Distance","text":"

    The distance of the glow. Make it 2 times more for resolution=2. It can't be changed after filter creation.

    "},{"location":"shader-glowfilter2/#quality","title":"Quality","text":"

    A number between 0 and 1 that describes the quality of the glow. The higher the number the less performant.

    "},{"location":"shader-grayscale/","title":"Gray scale","text":"

    Note

    Phaser3.60 has a built-in Color Matrix effects.

    "},{"location":"shader-grayscale/#introduction","title":"Introduction","text":"

    Gray scale post processing filter.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-grayscale/#live-demos","title":"Live demos","text":""},{"location":"shader-grayscale/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-grayscale/#install-plugin","title":"Install plugin","text":""},{"location":"shader-grayscale/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-grayscale/#import-plugin","title":"Import plugin","text":""},{"location":"shader-grayscale/#import-class","title":"Import class","text":""},{"location":"shader-grayscale/#apply-effect","title":"Apply effect","text":""},{"location":"shader-grayscale/#remove-effect","title":"Remove effect","text":""},{"location":"shader-grayscale/#get-effect","title":"Get effect","text":""},{"location":"shader-grayscale/#intensity","title":"Intensity","text":""},{"location":"shader-horrifi/","title":"Horri-fi","text":""},{"location":"shader-horrifi/#introduction","title":"Introduction","text":"

    6-in-1 post processing filter

    Reference : Horri-fi shader effect

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-horrifi/#live-demos","title":"Live demos","text":""},{"location":"shader-horrifi/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-horrifi/#install-plugin","title":"Install plugin","text":""},{"location":"shader-horrifi/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-horrifi/#import-plugin","title":"Import plugin","text":""},{"location":"shader-horrifi/#import-class","title":"Import class","text":""},{"location":"shader-horrifi/#apply-effect","title":"Apply effect","text":""},{"location":"shader-horrifi/#remove-effect","title":"Remove effect","text":""},{"location":"shader-horrifi/#get-effect","title":"Get effect","text":""},{"location":"shader-horrifi/#bloom","title":"Bloom","text":""},{"location":"shader-horrifi/#enable","title":"Enable","text":""},{"location":"shader-horrifi/#parameters","title":"Parameters","text":""},{"location":"shader-horrifi/#chromatic-abberation","title":"Chromatic abberation","text":""},{"location":"shader-horrifi/#enable_1","title":"Enable","text":""},{"location":"shader-horrifi/#parameters_1","title":"Parameters","text":""},{"location":"shader-horrifi/#vignette","title":"Vignette","text":""},{"location":"shader-horrifi/#enable_2","title":"Enable","text":""},{"location":"shader-horrifi/#parameters_2","title":"Parameters","text":""},{"location":"shader-horrifi/#noise","title":"Noise","text":""},{"location":"shader-horrifi/#enable_3","title":"Enable","text":""},{"location":"shader-horrifi/#parameters_3","title":"Parameters","text":""},{"location":"shader-horrifi/#vhs","title":"VHS","text":""},{"location":"shader-horrifi/#enable_4","title":"Enable","text":""},{"location":"shader-horrifi/#parameters_4","title":"Parameters","text":""},{"location":"shader-horrifi/#scanlines","title":"Scanlines","text":""},{"location":"shader-horrifi/#enable_5","title":"Enable","text":""},{"location":"shader-horrifi/#parameters_5","title":"Parameters","text":""},{"location":"shader-horrifi/#crt","title":"CRT","text":""},{"location":"shader-horrifi/#enable_6","title":"Enable","text":""},{"location":"shader-horrifi/#parameters_6","title":"Parameters","text":""},{"location":"shader-horrifi/#enable-all-effects","title":"Enable all effects","text":""},{"location":"shader-hsladjust/","title":"HSL adjust","text":"

    Note

    Phaser3.60 has a built-in Color Matrix effects.

    "},{"location":"shader-hsladjust/#introduction","title":"Introduction","text":"

    Adjust color in HSL domain, post processing filter.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-hsladjust/#live-demos","title":"Live demos","text":""},{"location":"shader-hsladjust/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-hsladjust/#install-plugin","title":"Install plugin","text":""},{"location":"shader-hsladjust/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-hsladjust/#import-plugin","title":"Import plugin","text":""},{"location":"shader-hsladjust/#import-class","title":"Import class","text":""},{"location":"shader-hsladjust/#apply-effect","title":"Apply effect","text":""},{"location":"shader-hsladjust/#remove-effect","title":"Remove effect","text":""},{"location":"shader-hsladjust/#get-effect","title":"Get effect","text":""},{"location":"shader-hsladjust/#hue-rotation","title":"Hue rotation","text":""},{"location":"shader-hsladjust/#saturation-adjustment","title":"Saturation adjustment","text":""},{"location":"shader-hsladjust/#lumen-adjustment","title":"Lumen adjustment","text":""},{"location":"shader-inverse/","title":"Inverse","text":"

    Note

    Phaser3.60 has a built-in Color Matrix effects.

    "},{"location":"shader-inverse/#introduction","title":"Introduction","text":"

    Inverse color post processing filter.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-inverse/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-inverse/#install-plugin","title":"Install plugin","text":""},{"location":"shader-inverse/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-inverse/#import-plugin","title":"Import plugin","text":""},{"location":"shader-inverse/#import-class","title":"Import class","text":""},{"location":"shader-inverse/#apply-effect","title":"Apply effect","text":""},{"location":"shader-inverse/#remove-effect","title":"Remove effect","text":""},{"location":"shader-inverse/#get-effect","title":"Get effect","text":""},{"location":"shader-inverse/#intensity","title":"Intensity","text":""},{"location":"shader-kawaseblur/","title":"Kawase blur","text":"

    Note

    Phaser3.60 has a built-in blur effect.

    "},{"location":"shader-kawaseblur/#introduction","title":"Introduction","text":"

    Kawase-blur post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-kawaseblur/#live-demos","title":"Live demos","text":""},{"location":"shader-kawaseblur/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-kawaseblur/#install-plugin","title":"Install plugin","text":""},{"location":"shader-kawaseblur/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-kawaseblur/#import-plugin","title":"Import plugin","text":""},{"location":"shader-kawaseblur/#import-class","title":"Import class","text":""},{"location":"shader-kawaseblur/#apply-effect","title":"Apply effect","text":""},{"location":"shader-kawaseblur/#remove-effect","title":"Remove effect","text":""},{"location":"shader-kawaseblur/#get-effect","title":"Get effect","text":""},{"location":"shader-kawaseblur/#blur","title":"Blur","text":""},{"location":"shader-kawaseblur/#quality","title":"Quality","text":""},{"location":"shader-kawaseblur/#pixel-size","title":"Pixel size","text":""},{"location":"shader-outline/","title":"Outline","text":""},{"location":"shader-outline/#introduction","title":"Introduction","text":"

    Outline post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-outline/#live-demos","title":"Live demos","text":""},{"location":"shader-outline/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-outline/#install-plugin","title":"Install plugin","text":""},{"location":"shader-outline/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-outline/#import-plugin","title":"Import plugin","text":""},{"location":"shader-outline/#import-class","title":"Import class","text":""},{"location":"shader-outline/#apply-effect","title":"Apply effect","text":""},{"location":"shader-outline/#remove-effect","title":"Remove effect","text":""},{"location":"shader-outline/#get-effect","title":"Get effect","text":""},{"location":"shader-outline/#thickness","title":"Thickness","text":""},{"location":"shader-outline/#outline-color","title":"Outline color","text":""},{"location":"shader-outline/#quality","title":"Quality","text":"

    The quality of the outline from 0 to 1, using a higher quality setting will result in slower performance and more accuracy.

    "},{"location":"shader-pixelation/","title":"Pixelation","text":"

    Note

    Phaser3.60 has a built-in pixelate effect.

    "},{"location":"shader-pixelation/#introduction","title":"Introduction","text":"

    Pixelation post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-pixelation/#live-demos","title":"Live demos","text":""},{"location":"shader-pixelation/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-pixelation/#install-plugin","title":"Install plugin","text":""},{"location":"shader-pixelation/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-pixelation/#import-plugin","title":"Import plugin","text":""},{"location":"shader-pixelation/#import-class","title":"Import class","text":""},{"location":"shader-pixelation/#apply-effect","title":"Apply effect","text":""},{"location":"shader-pixelation/#remove-effect","title":"Remove effect","text":""},{"location":"shader-pixelation/#get-effect","title":"Get effect","text":""},{"location":"shader-pixelation/#pixel-size","title":"Pixel size","text":""},{"location":"shader-shockwave/","title":"Shockwave","text":""},{"location":"shader-shockwave/#introduction","title":"Introduction","text":"

    Shockwave post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-shockwave/#live-demos","title":"Live demos","text":""},{"location":"shader-shockwave/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-shockwave/#install-plugin","title":"Install plugin","text":""},{"location":"shader-shockwave/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-shockwave/#import-plugin","title":"Import plugin","text":""},{"location":"shader-shockwave/#import-class","title":"Import class","text":""},{"location":"shader-shockwave/#apply-effect","title":"Apply effect","text":""},{"location":"shader-shockwave/#remove-effect","title":"Remove effect","text":""},{"location":"shader-shockwave/#get-effect","title":"Get effect","text":""},{"location":"shader-shockwave/#wave-radius","title":"Wave radius","text":""},{"location":"shader-shockwave/#wave-width","title":"Wave width","text":""},{"location":"shader-split/","title":"Split","text":""},{"location":"shader-split/#introduction","title":"Introduction","text":"

    Split image into 4 parts.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-split/#live-demos","title":"Live demos","text":""},{"location":"shader-split/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-split/#install-plugin","title":"Install plugin","text":""},{"location":"shader-split/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-split/#import-plugin","title":"Import plugin","text":""},{"location":"shader-split/#import-class","title":"Import class","text":""},{"location":"shader-split/#apply-effect","title":"Apply effect","text":""},{"location":"shader-split/#remove-effect","title":"Remove effect","text":""},{"location":"shader-split/#get-effect","title":"Get effect","text":""},{"location":"shader-split/#split-position","title":"Split position","text":""},{"location":"shader-split/#split-at-center-of-render","title":"Split at center of render","text":"
    pipelineInstance.splitAtCenter();\n// pipelineInstance.splitAtCenter(width, height);\n
    "},{"location":"shader-split/#split-length","title":"Split length","text":"

    or specify left/right/top/bottom of split length

    "},{"location":"shader-split/#rotation-axis-of-split-edge","title":"Rotation Axis of Split edge","text":""},{"location":"shader-split/#shift-enable","title":"Shift enable","text":""},{"location":"shader-swirl/","title":"Swirl","text":""},{"location":"shader-swirl/#introduction","title":"Introduction","text":"

    Swirl post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-swirl/#live-demos","title":"Live demos","text":""},{"location":"shader-swirl/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-swirl/#install-plugin","title":"Install plugin","text":""},{"location":"shader-swirl/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-swirl/#import-plugin","title":"Import plugin","text":""},{"location":"shader-swirl/#import-class","title":"Import class","text":""},{"location":"shader-swirl/#apply-effect","title":"Apply effect","text":""},{"location":"shader-swirl/#remove-effect","title":"Remove effect","text":""},{"location":"shader-swirl/#get-effect","title":"Get effect","text":""},{"location":"shader-swirl/#radius","title":"Radius","text":""},{"location":"shader-swirl/#rotation","title":"Rotation","text":""},{"location":"shader-swirl/#center-position","title":"Center position","text":"

    Default value is center of window.

    "},{"location":"shader-toonify/","title":"Toonify","text":""},{"location":"shader-toonify/#introduction","title":"Introduction","text":"

    Draw outlines and quantize color in HSV domain, post processing filter. Reference

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-toonify/#live-demos","title":"Live demos","text":""},{"location":"shader-toonify/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-toonify/#install-plugin","title":"Install plugin","text":""},{"location":"shader-toonify/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-toonify/#import-plugin","title":"Import plugin","text":""},{"location":"shader-toonify/#import-class","title":"Import class","text":""},{"location":"shader-toonify/#apply-effect","title":"Apply effect","text":""},{"location":"shader-toonify/#remove-effect","title":"Remove effect","text":""},{"location":"shader-toonify/#get-effect","title":"Get effect","text":""},{"location":"shader-toonify/#edge-threshold","title":"Edge threshold","text":""},{"location":"shader-toonify/#hue-levels","title":"Hue levels","text":""},{"location":"shader-toonify/#saturation-levels","title":"Saturation levels","text":""},{"location":"shader-toonify/#value-levels","title":"Value levels","text":""},{"location":"shader-toonify/#edge-color","title":"Edge color","text":""},{"location":"shader-warp-transition/","title":"Warp","text":""},{"location":"shader-warp-transition/#introduction","title":"Introduction","text":"

    Warp transition post processing filter.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-warp-transition/#usage","title":"Usage","text":"

    Reference

    "},{"location":"shader-warp-transition/#install-plugin","title":"Install plugin","text":""},{"location":"shader-warp-transition/#import-class","title":"Import class","text":""},{"location":"shader-warp-transition/#remove-effect","title":"Remove effect","text":"
    gameObject.removePostPipeline(WarpPostFX); // WarpPostFX class\n
    "},{"location":"shader-warp-transition/#get-effect","title":"Get effect","text":""},{"location":"shader-warp-transition/#set-texture","title":"Set texture","text":"
    pipelineInstance.setTexture(textureKey, resizeMode);\n
    "},{"location":"shader-warp-transition/#progress","title":"Progress","text":""},{"location":"shader-warp-transition/#direction","title":"Direction","text":""},{"location":"shader-warp-transition/#smoothness","title":"Smoothness","text":""},{"location":"shader-warp-transition/#resize-mode","title":"Resize mode","text":""},{"location":"shader-warp/","title":"Warp","text":""},{"location":"shader-warp/#introduction","title":"Introduction","text":"

    Warp post processing filter.

    WebGL only

    Only work in WebGL render mode.

    "},{"location":"shader-warp/#live-demos","title":"Live demos","text":""},{"location":"shader-warp/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shader-warp/#install-plugin","title":"Install plugin","text":""},{"location":"shader-warp/#load-minify-file","title":"Load minify file","text":""},{"location":"shader-warp/#import-plugin","title":"Import plugin","text":""},{"location":"shader-warp/#import-class","title":"Import class","text":""},{"location":"shader-warp/#apply-effect","title":"Apply effect","text":""},{"location":"shader-warp/#remove-effect","title":"Remove effect","text":""},{"location":"shader-warp/#get-effect","title":"Get effect","text":""},{"location":"shader-warp/#frequency","title":"Frequency","text":"

    Horizontal/vertical frequency, in pixel.

    "},{"location":"shader-warp/#amplitude","title":"Amplitude","text":"

    Horizontal/vertical amplitude, in pixel.

    "},{"location":"shader-warp/#speed","title":"Speed","text":"

    Horizontal/vertical speed.

    "},{"location":"shader/","title":"Shader","text":""},{"location":"shader/#introduction","title":"Introduction","text":"

    A quad with its own shader, built-in game object of phaser.

    "},{"location":"shader/#usage","title":"Usage","text":""},{"location":"shader/#load-glsl","title":"Load GLSL","text":"
    scene.load.glsl(key, url);\n

    Reference: load glsl

    "},{"location":"shader/#add-shader-object","title":"Add shader object","text":"
    var shader = scene.add.shader(key, x, y, width, height, textures);\n

    Note

    Lots of shaders expect textures to be power-of-two sized.

    Add shader object from JSON

    var shader = scene.make.shader({\nx: 0,\ny: 0,\nkey: '',\n\n// angle: 0,\n// alpha: 1\n// flipX: true,\n// flipY: true,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"shader/#custom-class","title":"Custom class","text":""},{"location":"shader/#sampler2d-uniform","title":"Sampler2D uniform","text":""},{"location":"shader/#other-uniforms","title":"Other uniforms","text":""},{"location":"shader/#output","title":"Output","text":""},{"location":"shader/#texture-routing","title":"Texture routing","text":"
    graph TB\n\nTextureManagerIn[\"Texture manager\"] --> |\"shader.setSampler2D()\"| Sampler2D[\"Samplers:<br>iChannel0<br>iChannel1<br>iChannel2<br>iChannel3\"]\nSampler2D--> Shader[\"shader<br>Shader game object\"]\nShader --> DisplayList[\"Display list\"]\nShader --> |\"shader.setRenderToTexture()\"| InternalTexture[\"shader.glTexture\"]\nInternalTexture -.-> |\"Texture key\"| TextureManagerOut[\"Texture manager\"]\nTextureManagerOut -.-> GameObject[\"Image game object\"]\nGameObject -.-> DisplayList\n\nWebGLTexture[\"WebGl texture<br>gameObject.glTexture\"] --> |\"shader.setSampler2DBuffer()\"| Sampler2D\nInternalTexture --> WebGLTexture\n\nsubgraph Output\nDisplayList\nGameObject\nTextureManagerOut\nend\n\nsubgraph Input\nTextureManagerIn\nWebGLTexture\nend
    "},{"location":"shader/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shader/#create-mask","title":"Create mask","text":"
    var mask = shader.createBitmapMask();\n

    See mask

    "},{"location":"shader/#baseshader","title":"BaseShader","text":"
    var baseShader = new Phaser.Display.BaseShader(key, fragmentSrc, vertexSrc, uniforms);\n
    "},{"location":"shake-position/","title":"Shake position","text":""},{"location":"shake-position/#introduction","title":"Introduction","text":"

    Shake position of game object.

    "},{"location":"shake-position/#live-demos","title":"Live demos","text":""},{"location":"shake-position/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shake-position/#install-plugin","title":"Install plugin","text":""},{"location":"shake-position/#load-minify-file","title":"Load minify file","text":""},{"location":"shake-position/#import-plugin","title":"Import plugin","text":""},{"location":"shake-position/#import-class","title":"Import class","text":""},{"location":"shake-position/#create-instance","title":"Create instance","text":"
    var shake = scene.plugins.get('rexShake').add(gameObject, {\n// mode: 1, // 0|'effect'|1|'behavior'\n// duration: 500,\n// magnitude: 10,\n// magnitudeMode: 1, // 0|'constant'|1|'decay'\n// axis: 0,      //0|'both'|'h&v'|1|'horizontal'|'h'|2|'vertical'|'v'\n});\n
    "},{"location":"shake-position/#start-shaking","title":"Start shaking","text":"
    shake.shake();\n// shake.shake(duration, magnitude);\n

    or

    shake.shake({\nduration: 500,\nmagnitude: 10\n});\n
    "},{"location":"shake-position/#stop-shakeing","title":"Stop shakeing","text":"
    shake.stop();\n
    "},{"location":"shake-position/#enable","title":"Enable","text":""},{"location":"shake-position/#set-updating-mode","title":"Set updating mode","text":"
    shake.setMode(mode);\n
    "},{"location":"shake-position/#set-duration","title":"Set duration","text":"
    shake.setDuration(duration);\n// shake.duration = duration;\n
    "},{"location":"shake-position/#set-magnitude","title":"Set magnitude","text":"
    shake.setMagnitude(magnitude);\nshake.magnitude = magnitude;\n
    "},{"location":"shake-position/#set-magnitude-mode","title":"Set magnitude mode","text":"
    shake.setMagnitudeMode(magnitudeMode);\n// shake.magnitudeMode = magnitudeMode;\n
    "},{"location":"shake-position/#set-axis-mode","title":"Set axis mode","text":"
    shake.setAxisMode(axis);\n
    "},{"location":"shake-position/#events","title":"Events","text":""},{"location":"shake-position/#status","title":"Status","text":""},{"location":"shape-arc/","title":"Arc","text":""},{"location":"shape-arc/#introduction","title":"Introduction","text":"

    Arc shape, built-in game object of phaser.

    "},{"location":"shape-arc/#usage","title":"Usage","text":""},{"location":"shape-arc/#create-shape","title":"Create shape","text":"
    var arc = scene.add.arc(x, y, radius, startAngle, endAngle, anticlockwise, fillColor);\n// var arc = scene.add.arc(x, y, radius, startAngle, endAngle, anticlockwise, fillColor, fillAlpha);\n
    "},{"location":"shape-arc/#custom-class","title":"Custom class","text":""},{"location":"shape-arc/#color","title":"Color","text":"

    No tint methods

    Uses arc.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-arc/#alpha","title":"Alpha","text":""},{"location":"shape-arc/#angle","title":"Angle","text":""},{"location":"shape-arc/#radius","title":"Radius","text":""},{"location":"shape-arc/#display-size","title":"Display size","text":""},{"location":"shape-arc/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-arc/#create-mask","title":"Create mask","text":"
    var mask = arc.createGeometryMask();\n

    See mask

    "},{"location":"shape-arc/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-checkbox/","title":"Checkbox","text":""},{"location":"shape-checkbox/#introduction","title":"Introduction","text":"

    Checkbox input with drawing checker path animation.

    "},{"location":"shape-checkbox/#live-demos","title":"Live demos","text":""},{"location":"shape-checkbox/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-checkbox/#install-plugin","title":"Install plugin","text":""},{"location":"shape-checkbox/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-checkbox/#import-plugin","title":"Import plugin","text":""},{"location":"shape-checkbox/#import-class","title":"Import class","text":""},{"location":"shape-checkbox/#create-checkbox-input","title":"Create checkbox input","text":"
    var checkbox = scene.add.rexCheckbox(x, y, width, height, color, config);\n

    or

    var checkbox = scene.add.rexCheckbox({\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\n\ncolor: 0x005cb2,\nboxFillAlpha: 1,\nuncheckedColor: null,\nuncheckedBoxFillAlpha: 1,\n\nboxLineWidth: 4,\nboxStrokeColor: 0x005cb2,\nboxStrokeAlpha: 1,\nuncheckedBoxStrokeColor: 0x005cb2,\nuncheckedBoxStrokeAlpha: 1,\n\ncheckerColor: 0xffffff,\ncheckerAlpha: 1,\n\n// boxSize: 1,\n// checkerSize: 1,\n\ncircleBox: false,\n\nanimationDuration: 150,\n\nchecked: false, // or value: false,\n\nclick: undefined,\n// click: {\n//     mode: 1,            // 0|'press'|1|'release'\n//     clickInterval: 100  // ms\n//     threshold: undefined\n// },\nreadOnly: false,\n});\n
    "},{"location":"shape-checkbox/#custom-class","title":"Custom class","text":""},{"location":"shape-checkbox/#check","title":"Check","text":""},{"location":"shape-checkbox/#read-only","title":"Read only","text":""},{"location":"shape-checkbox/#box-fill-style","title":"Box fill style","text":""},{"location":"shape-checkbox/#box-stroke-style","title":"Box stroke style","text":""},{"location":"shape-checkbox/#checker-style","title":"Checker style","text":""},{"location":"shape-checkbox/#checker-animation","title":"Checker animation","text":""},{"location":"shape-checkbox/#size","title":"Size","text":""},{"location":"shape-checkbox/#display-size","title":"Display size","text":""},{"location":"shape-checkbox/#size-ratio","title":"Size ratio","text":""},{"location":"shape-checkbox/#events","title":"Events","text":""},{"location":"shape-checkbox/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-checkbox/#create-mask","title":"Create mask","text":"
    var mask = checkbox.createGeometryMask();\n

    See mask

    "},{"location":"shape-checkbox/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-circle/","title":"Circle","text":""},{"location":"shape-circle/#introduction","title":"Introduction","text":"

    Circle shape, built-in game object of phaser.

    "},{"location":"shape-circle/#usage","title":"Usage","text":""},{"location":"shape-circle/#create-shape-object","title":"Create shape object","text":"
    var circle = scene.add.circle(x, y, radius, fillColor);\n// var circle = scene.add.circle(x, y, radius, fillColor, fillAlpha);\n
    "},{"location":"shape-circle/#custom-class","title":"Custom class","text":""},{"location":"shape-circle/#color","title":"Color","text":"

    No tint methods

    Uses circle.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-circle/#alpha","title":"Alpha","text":""},{"location":"shape-circle/#radius","title":"Radius","text":""},{"location":"shape-circle/#display-size","title":"Display size","text":""},{"location":"shape-circle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-circle/#create-mask","title":"Create mask","text":"
    var mask = circle.createGeometryMask();\n

    See mask

    "},{"location":"shape-circle/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-circularprogress/","title":"Circular progres","text":""},{"location":"shape-circularprogress/#introduction","title":"Introduction","text":"

    Circular progress bar shape.

    "},{"location":"shape-circularprogress/#live-demos","title":"Live demos","text":""},{"location":"shape-circularprogress/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-circularprogress/#install-plugin","title":"Install plugin","text":""},{"location":"shape-circularprogress/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-circularprogress/#import-plugin","title":"Import plugin","text":""},{"location":"shape-circularprogress/#import-class","title":"Import class","text":""},{"location":"shape-circularprogress/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexCircularProgressPlugin',\nplugin: CircularProgressPlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"shape-circularprogress/#create-instance","title":"Create instance","text":"
    var circularProgress = scene.add.rexCircularProgress(x, y, radius, barColor, value, {    trackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},\n});\n

    or

    var circularProgress = scene.add.rexCircularProgress({\nx: 0,\ny: 0,\nradius: 1,\n\nbarColor: undefined,\ntrackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\n\nvalue: 0,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},  });\n

    Add circular-progress from JSON

    var circularProgress = scene.make.rexCircularProgress({\nx: 0,\ny: 0,\nradius: 1,\n\nbarColor: undefined,\ntrackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\n\nvalue: 0,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},  add: true\n});\n
    "},{"location":"shape-circularprogress/#custom-class","title":"Custom class","text":""},{"location":"shape-circularprogress/#progress-value","title":"Progress value","text":""},{"location":"shape-circularprogress/#ease-progress-value","title":"Ease progress value","text":""},{"location":"shape-circularprogress/#radius","title":"Radius","text":""},{"location":"shape-circularprogress/#circular-track","title":"Circular track","text":""},{"location":"shape-circularprogress/#circular-bar","title":"Circular bar","text":""},{"location":"shape-circularprogress/#center-circle","title":"Center circle","text":""},{"location":"shape-circularprogress/#events","title":"Events","text":""},{"location":"shape-circularprogress/#alpha","title":"Alpha","text":""},{"location":"shape-circularprogress/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-circularprogress/#create-mask","title":"Create mask","text":"
    var mask = circularProgress.createGeometryMask();\n

    See mask

    "},{"location":"shape-circularprogress/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-circularprogress/#compare-with-circular-progress-canvas","title":"Compare with Circular-progress canvas","text":""},{"location":"shape-cover/","title":"Cover","text":""},{"location":"shape-cover/#introduction","title":"Introduction","text":"

    Rectangle shape covered full window, and block all touch events.

    "},{"location":"shape-cover/#live-demos","title":"Live demos","text":""},{"location":"shape-cover/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-cover/#install-plugin","title":"Install plugin","text":""},{"location":"shape-cover/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-cover/#import-plugin","title":"Import plugin","text":""},{"location":"shape-cover/#import-class","title":"Import class","text":""},{"location":"shape-cover/#create-cover-object","title":"Create cover object","text":"
    var cover = scene.add.rexCover({\n// color: 0x0,\n// alpha: 0.8\n});\n
    "},{"location":"shape-cover/#custom-class","title":"Custom class","text":""},{"location":"shape-cover/#color","title":"Color","text":""},{"location":"shape-cover/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-cover/#create-mask","title":"Create mask","text":"
    var mask = cover.createGeometryMask();\n

    See mask

    "},{"location":"shape-cover/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-curve/","title":"Curve","text":""},{"location":"shape-curve/#introduction","title":"Introduction","text":"

    Curve shape, built-in game object of phaser.

    "},{"location":"shape-curve/#usage","title":"Usage","text":""},{"location":"shape-curve/#create-shape-object","title":"Create shape object","text":"
    var curve = scene.add.curve(x, y, path, fillColor);\n// var curve = scene.add.curve(x, y, path, fillColor, fillAlpha);\n
    "},{"location":"shape-curve/#custom-class","title":"Custom class","text":""},{"location":"shape-curve/#color","title":"Color","text":"

    No tint methods

    Uses curve.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-curve/#alpha","title":"Alpha","text":""},{"location":"shape-curve/#smoothness","title":"Smoothness","text":"

    The number of points used when rendering it. Increase this value for smoother curves, at the cost of more polygons being rendered.

    curve.setSmoothness(smoothness);\n
    or
    curve.smoothness = smoothness;\n

    "},{"location":"shape-curve/#display-size","title":"Display size","text":""},{"location":"shape-curve/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-curve/#create-mask","title":"Create mask","text":"
    var mask = curve.createGeometryMask();\n

    See mask

    "},{"location":"shape-curve/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-custom-progress/","title":"Custom progress","text":""},{"location":"shape-custom-progress/#introduction","title":"Introduction","text":"

    Custom progress bar based on custom-shapes.

    "},{"location":"shape-custom-progress/#live-demos","title":"Live demos","text":""},{"location":"shape-custom-progress/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-custom-progress/#install-plugin","title":"Install plugin","text":""},{"location":"shape-custom-progress/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-custom-progress/#import-plugin","title":"Import plugin","text":""},{"location":"shape-custom-progress/#import-class","title":"Import class","text":""},{"location":"shape-custom-progress/#add-custom-shapes-object","title":"Add custom shapes object","text":"
    var customProgress = scene.add.rexCustomProgress(x, y, width, height, {\n// type: 'rexCustomProgress',\n\ncreate: [\n{ name: name0, type: shapeType},\n{ name: name1, type: shapeType},\n...\n],\n\n// create: {\n//     shapeType: [name0, name1, ...],\n//     shapeType: number,\n//     shapeType: name,\n// },\n\n// create: function() {\n// \n// },\n\nupdate: function() {\n\n},\n\nvalue: 0,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},\n});\n

    or

    var customProgress = scene.add.rexCustomProgress({\n// x: 0,\n// y: 0,\n// width: 64,\n// height: 64,\n// type: 'rexCustomProgress',\n\ncreate: [\n{ name: name0, type: shapeType},\n{ name: name1, type: shapeType},\n...\n],\n\n// create: {\n//     shapeType: [name0, name1, ...],\n//     shapeType: number,\n//     shapeType: name,\n// },\n\n// create: function() {\n// \n// },\n\nupdate: function() {\n\n},\n\nvalue: 0,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\n\nvaluechangeCallback: function(newValue, oldValue, circularProgress) {\n},\n});\n
    "},{"location":"shape-custom-progress/#set-update-shape-callback","title":"Set update shape callback","text":"

    See Shape class

    "},{"location":"shape-custom-progress/#size","title":"Size","text":"

    See Size

    "},{"location":"shape-custom-progress/#styles","title":"Styles","text":"

    See Styles

    "},{"location":"shape-custom-progress/#recreate-shapes","title":"Recreate shapes","text":"

    See Shape class

    "},{"location":"shape-custom-progress/#progress-value","title":"Progress value","text":""},{"location":"shape-custom-progress/#ease-progress-value","title":"Ease progress value","text":""},{"location":"shape-custom-progress/#refresh","title":"Refresh","text":"

    Redraw shapes when

    "},{"location":"shape-custom-progress/#shape-class","title":"Shape class","text":"

    See Shape class

    "},{"location":"shape-custom-progress/#events","title":"Events","text":""},{"location":"shape-custom-progress/#alpha","title":"Alpha","text":""},{"location":"shape-custom-progress/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-custom-progress/#create-mask","title":"Create mask","text":"
    var mask = customProgress.createGeometryMask();\n

    See mask

    "},{"location":"shape-custom-progress/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-custom-shapes/","title":"Custom shapes","text":""},{"location":"shape-custom-shapes/#introduction","title":"Introduction","text":"

    Custom shapes on shape.

    "},{"location":"shape-custom-shapes/#live-demos","title":"Live demos","text":""},{"location":"shape-custom-shapes/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-custom-shapes/#install-plugin","title":"Install plugin","text":""},{"location":"shape-custom-shapes/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-custom-shapes/#import-plugin","title":"Import plugin","text":""},{"location":"shape-custom-shapes/#import-class","title":"Import class","text":""},{"location":"shape-custom-shapes/#add-custom-shapes-object","title":"Add custom shapes object","text":"
    var customShapes = scene.add.rexCustomShapes(x, y, width, height, {\n// type: 'rexCustomShapes',\n\ncreate: [\n{ name: name0, type: shapeType},\n{ name: name1, type: shapeType},\n...\n],\n\n// create: {\n//     shapeType: [name0, name1, ...],\n//     shapeType: number,\n//     shapeType: name,\n// },\n\n// create: function() {\n// \n// },\n\nupdate: function() {\n\n},\n});\n

    or

    var customShapes = scene.add.rexCustomShapes({\n// x: 0,\n// y: 0,\n// width: 64,\n// height: 64,\n// type: 'rexCustomShapes',\n\ncreate: [\n{ name: name0, type: shapeType},\n{ name: name1, type: shapeType},\n...\n],\n\n// create: {\n//     shapeType: [name0, name1, ...],\n//     shapeType: number,\n//     shapeType: name,\n// },\n\n// create: function() {\n// \n// },\n\nupdate: function() {\n\n},\n});\n
    "},{"location":"shape-custom-shapes/#set-update-shape-callback","title":"Set update shape callback","text":"
    customShapes.setUpdateShapesCallback(callback);\n
    "},{"location":"shape-custom-shapes/#size","title":"Size","text":"

    customShapes.setSize(width, height);\n
    or
    customShapes.resize(width, height);\n
    or
    customShapes.width = width;\ncustomShapes.height = height;\n

    Will set dirty and redraw shapes

    "},{"location":"shape-custom-shapes/#styles","title":"Styles","text":"

    Will set dirty and redraw shapes. Apply styles to shapes in update callback.

    "},{"location":"shape-custom-shapes/#world-position-to-local-position","title":"World position to local position","text":"
    var localXY = customShapes.worldToLocalXY(worldX, worldY); // localXY: {x, y}\n

    or

    var out = customShapes.worldToLocalXY(worldX, worldY, camera, out);\n
    "},{"location":"shape-custom-shapes/#recreate-shapes","title":"Recreate shapes","text":""},{"location":"shape-custom-shapes/#refresh","title":"Refresh","text":"

    Redraw shapes when

    "},{"location":"shape-custom-shapes/#update-shape-data","title":"Update shape data","text":"

    Shape data will be updated during rendering, or call shape.updateData() to update shape data before rendering.

    "},{"location":"shape-custom-shapes/#shape-class","title":"Shape class","text":""},{"location":"shape-custom-shapes/#common-properties","title":"Common properties","text":""},{"location":"shape-custom-shapes/#line","title":"Line","text":""},{"location":"shape-custom-shapes/#lines","title":"Lines","text":""},{"location":"shape-custom-shapes/#create-path","title":"Create path","text":""},{"location":"shape-custom-shapes/#transform","title":"Transform","text":""},{"location":"shape-custom-shapes/#display-path-segment","title":"Display path segment","text":"
    1. Create path, under customShapes.isSizeChanged condition.
    2. Display segment of path
      lines.setDisplayPathSegment(startT, endT);\n
      or
      lines.setDisplayPathSegment(endT);  // startT = 0\n
    "},{"location":"shape-custom-shapes/#misc","title":"Misc","text":""},{"location":"shape-custom-shapes/#rectangle","title":"Rectangle","text":""},{"location":"shape-custom-shapes/#round-rectangle","title":"Round rectangle","text":""},{"location":"shape-custom-shapes/#triangle","title":"Triangle","text":""},{"location":"shape-custom-shapes/#arc","title":"Arc","text":""},{"location":"shape-custom-shapes/#circle","title":"Circle","text":""},{"location":"shape-custom-shapes/#ellipse","title":"Ellipse","text":"

    The same as Circle.

    "},{"location":"shape-custom-shapes/#alpha","title":"Alpha","text":""},{"location":"shape-custom-shapes/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-custom-shapes/#create-mask","title":"Create mask","text":"
    var mask = shape.createGeometryMask();\n

    See mask

    "},{"location":"shape-custom-shapes/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-custom-shapes/#compare-with-similar-plugins","title":"Compare with similar plugins","text":""},{"location":"shape-ellipse/","title":"Ellipse","text":""},{"location":"shape-ellipse/#introduction","title":"Introduction","text":"

    Ellipse shape, built-in game object of phaser.

    "},{"location":"shape-ellipse/#usage","title":"Usage","text":""},{"location":"shape-ellipse/#create-shape-object","title":"Create shape object","text":"
    var ellipse = scene.add.ellipse(x, y, width, height, fillColor);\n// var ellipse = scene.add.ellipse(x, y, width, height, fillColor, fillAlpha);\n
    "},{"location":"shape-ellipse/#custom-class","title":"Custom class","text":""},{"location":"shape-ellipse/#color","title":"Color","text":"

    No tint methods

    Uses ellipse.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-ellipse/#alpha","title":"Alpha","text":""},{"location":"shape-ellipse/#size","title":"Size","text":""},{"location":"shape-ellipse/#display-size","title":"Display size","text":""},{"location":"shape-ellipse/#smoothness","title":"Smoothness","text":"

    The number of points used when rendering it. Increase this value for smoother curves, at the cost of more polygons being rendered.

    ellipse.setSmoothness(smoothness);\n
    or
    ellipse.smoothness = smoothness;\n

    "},{"location":"shape-ellipse/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-ellipse/#create-mask","title":"Create mask","text":"
    var mask = ellipse.createGeometryMask();\n

    See mask

    "},{"location":"shape-ellipse/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-fullwindowrectangle/","title":"Full window rectangle","text":""},{"location":"shape-fullwindowrectangle/#introduction","title":"Introduction","text":"

    Rectangle shape covered full window.

    "},{"location":"shape-fullwindowrectangle/#live-demos","title":"Live demos","text":""},{"location":"shape-fullwindowrectangle/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-fullwindowrectangle/#install-plugin","title":"Install plugin","text":""},{"location":"shape-fullwindowrectangle/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-fullwindowrectangle/#import-plugin","title":"Import plugin","text":""},{"location":"shape-fullwindowrectangle/#import-class","title":"Import class","text":""},{"location":"shape-fullwindowrectangle/#create-shape-object","title":"Create shape object","text":"
    var rect = scene.add.rexFullWindowRectangle(fillColor, fillAlpha);\n
    "},{"location":"shape-fullwindowrectangle/#custom-class","title":"Custom class","text":""},{"location":"shape-fullwindowrectangle/#color","title":"Color","text":""},{"location":"shape-fullwindowrectangle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-fullwindowrectangle/#create-mask","title":"Create mask","text":"
    var mask = rect.createGeometryMask();\n

    See mask

    "},{"location":"shape-fullwindowrectangle/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-grid/","title":"Grid","text":""},{"location":"shape-grid/#introduction","title":"Introduction","text":"

    Grid shape, built-in game object of phaser.

    "},{"location":"shape-grid/#usage","title":"Usage","text":""},{"location":"shape-grid/#create-shape-object","title":"Create shape object","text":"
    var grid = scene.add.grid(x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha);\n
    "},{"location":"shape-grid/#custom-class","title":"Custom class","text":""},{"location":"shape-grid/#color","title":"Color","text":"

    No tint methods

    Uses grid.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-grid/#alpha","title":"Alpha","text":""},{"location":"shape-grid/#display-size","title":"Display size","text":""},{"location":"shape-grid/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-grid/#create-mask","title":"Create mask","text":"
    var mask = grid.createGeometryMask();\n

    See mask

    "},{"location":"shape-grid/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-isobox/","title":"Iso box","text":""},{"location":"shape-isobox/#introduction","title":"Introduction","text":"

    Iso-box shape, built-in game object of phaser.

    "},{"location":"shape-isobox/#usage","title":"Usage","text":""},{"location":"shape-isobox/#create-shape-object","title":"Create shape object","text":"
    var isoBox = scene.add.isobox(x, y, width, height, fillTop, fillLeft, fillRight);\n
    "},{"location":"shape-isobox/#custom-class","title":"Custom class","text":""},{"location":"shape-isobox/#set-color","title":"Set color","text":"

    No tint methods

    Uses isoBox.setFillStyle(fillTop, fillLeft, fillRight) to change color.

    "},{"location":"shape-isobox/#alpha","title":"Alpha","text":""},{"location":"shape-isobox/#projection","title":"Projection","text":""},{"location":"shape-isobox/#display-size","title":"Display size","text":""},{"location":"shape-isobox/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-isobox/#create-mask","title":"Create mask","text":"
    var mask = isoBox.createGeometryMask();\n

    See mask

    "},{"location":"shape-isobox/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-isotriangle/","title":"Iso triangle","text":""},{"location":"shape-isotriangle/#introduction","title":"Introduction","text":"

    Iso-triangle shape, built-in game object of phaser.

    "},{"location":"shape-isotriangle/#usage","title":"Usage","text":""},{"location":"shape-isotriangle/#create-shape-object","title":"Create shape object","text":"
    var isoTriangle = scene.add.isotriangle(x, y, width, height, reversed, fillTop, fillLeft, fillRight);\n
    "},{"location":"shape-isotriangle/#custom-class","title":"Custom class","text":""},{"location":"shape-isotriangle/#set-color","title":"Set color","text":"

    No tint methods

    Uses isoTriangle.setFillStyle(fillTop, fillLeft, fillRight) to change color.

    "},{"location":"shape-isotriangle/#alpha","title":"Alpha","text":""},{"location":"shape-isotriangle/#projection","title":"Projection","text":""},{"location":"shape-isotriangle/#reverse","title":"Reverse","text":""},{"location":"shape-isotriangle/#display-size","title":"Display size","text":""},{"location":"shape-isotriangle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-isotriangle/#create-mask","title":"Create mask","text":"
    var mask = isoTriangle.createGeometryMask();\n

    See mask

    "},{"location":"shape-isotriangle/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-line/","title":"Line","text":""},{"location":"shape-line/#introduction","title":"Introduction","text":"

    Line shape, built-in game object of phaser.

    "},{"location":"shape-line/#usage","title":"Usage","text":""},{"location":"shape-line/#create-shape-object","title":"Create shape object","text":"
    var line = scene.add.line(x, y, x1, y1, x2, y2, strokeColor);\n// var line = scene.add.line(x, y, x1, y1, x2, y2, strokeColor, strokeAlpha);\n
    "},{"location":"shape-line/#custom-class","title":"Custom class","text":""},{"location":"shape-line/#set-color","title":"Set color","text":"

    No tint methods

    Uses line.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-line/#alpha","title":"Alpha","text":""},{"location":"shape-line/#set-end-points","title":"Set end points","text":"
    line.setTo(x1, y1, x2, y2);\n
    "},{"location":"shape-line/#line-width","title":"Line width","text":"
    line.setLineWidth(startWidth, endWidth);\n
    "},{"location":"shape-line/#display-size","title":"Display size","text":""},{"location":"shape-line/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-line/#create-mask","title":"Create mask","text":"
    var mask = line.createGeometryMask();\n

    See mask

    "},{"location":"shape-line/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-lineprogress/","title":"Line progress","text":""},{"location":"shape-lineprogress/#introduction","title":"Introduction","text":"

    Horizontal line progress bar shape.

    "},{"location":"shape-lineprogress/#live-demos","title":"Live demos","text":""},{"location":"shape-lineprogress/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-lineprogress/#install-plugin","title":"Install plugin","text":""},{"location":"shape-lineprogress/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-lineprogress/#import-plugin","title":"Import plugin","text":""},{"location":"shape-lineprogress/#import-class","title":"Import class","text":""},{"location":"shape-lineprogress/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexLineProgressPlugin',\nplugin: LineProgressPlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"shape-lineprogress/#create-instance","title":"Create instance","text":"
    var lineProgress = scene.add.rexLineProgress(x, y, width, height, barColor, value, {    trackColor: undefined,\ntrackStrokeColor: undefined,\ntrackStrokeThickness: 2,\n\nskewX:0,\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, lineProgress) {\n},\n});\n

    or

    var lineProgress = scene.add.rexLineProgress({\nx: 0,\ny: 0,\nwidth: 2,\nheight: 2,\n\nbarColor: undefined,\ntrackColor: undefined,\ntrackStrokeColor: undefined,\ntrackStrokeThickness: 2,\n\nskewX:0,\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvalue: 0,\nvaluechangeCallback: function(newValue, oldValue, lineProgress) {\n},\n});\n

    Add line-progress from JSON

    var lineProgress = scene.make.rexLineProgress({\nx: 0,\ny: 0,\nwidth: 2,\nheight: 2,\n\nbarColor: undefined,\ntrackColor: undefined,\ntrackStrokeColor: undefined,\ntrackStrokeThickness: 2,\n\nskewX:0,\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvalue: 0,\nvaluechangeCallback: function(newValue, oldValue, lineProgress) {\n},\n\nadd: true\n});\n
    "},{"location":"shape-lineprogress/#custom-class","title":"Custom class","text":""},{"location":"shape-lineprogress/#progress-value","title":"Progress value","text":""},{"location":"shape-lineprogress/#ease-progress-value","title":"Ease progress value","text":""},{"location":"shape-lineprogress/#line-track","title":"Line track","text":""},{"location":"shape-lineprogress/#line-bar","title":"Line bar","text":""},{"location":"shape-lineprogress/#horizontal-skew","title":"Horizontal skew","text":""},{"location":"shape-lineprogress/#right-to-left","title":"Right-to-left","text":""},{"location":"shape-lineprogress/#events","title":"Events","text":""},{"location":"shape-lineprogress/#alpha","title":"Alpha","text":""},{"location":"shape-lineprogress/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-lineprogress/#create-mask","title":"Create mask","text":"
    var mask = lineProgress.createGeometryMask();\n

    See mask

    "},{"location":"shape-lineprogress/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-polygon/","title":"Polygon","text":""},{"location":"shape-polygon/#introduction","title":"Introduction","text":"

    Polygon shape, built-in game object of phaser.

    "},{"location":"shape-polygon/#usage","title":"Usage","text":""},{"location":"shape-polygon/#create-shape-object","title":"Create shape object","text":"
    var polygon = scene.add.polygon(x, y, points, fillColor);\n// var polygon = scene.add.polygon(x, y, points, fillColor, fillAlpha);\n

    Note

    Shift given points to align position (0, 0)

    "},{"location":"shape-polygon/#custom-class","title":"Custom class","text":""},{"location":"shape-polygon/#color","title":"Color","text":"

    No tint methods

    Uses polygon.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-polygon/#alpha","title":"Alpha","text":""},{"location":"shape-polygon/#smooth","title":"Smooth","text":"

    Smooths the polygon over the number of iterations specified.

    polygon.smooth(iterations);\n
    "},{"location":"shape-polygon/#set-points","title":"Set points","text":"
    polygon.setTo(points);\n
    "},{"location":"shape-polygon/#display-size","title":"Display size","text":""},{"location":"shape-polygon/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-polygon/#create-mask","title":"Create mask","text":"
    var mask = polygon.createGeometryMask();\n

    See mask

    "},{"location":"shape-polygon/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-rectangle/","title":"Rectangle","text":""},{"location":"shape-rectangle/#introduction","title":"Introduction","text":"

    Rectangle shape, built-in game object of phaser.

    "},{"location":"shape-rectangle/#usage","title":"Usage","text":""},{"location":"shape-rectangle/#create-shape-object","title":"Create shape object","text":"
    var rect = scene.add.rectangle(x, y, width, height, fillColor);\n// var rect = scene.add.rectangle(x, y, width, height, fillColor, fillAlpha);\n
    "},{"location":"shape-rectangle/#custom-class","title":"Custom class","text":""},{"location":"shape-rectangle/#color","title":"Color","text":"

    No tint methods

    Uses rect.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-rectangle/#alpha","title":"Alpha","text":""},{"location":"shape-rectangle/#size","title":"Size","text":""},{"location":"shape-rectangle/#display-size","title":"Display size","text":""},{"location":"shape-rectangle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-rectangle/#create-mask","title":"Create mask","text":"
    var mask = rect.createGeometryMask();\n

    See mask

    "},{"location":"shape-rectangle/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-roundrectangle/","title":"Round Rectangle","text":""},{"location":"shape-roundrectangle/#introduction","title":"Introduction","text":"

    Round rectangle shape.

    "},{"location":"shape-roundrectangle/#live-demos","title":"Live demos","text":""},{"location":"shape-roundrectangle/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-roundrectangle/#install-plugin","title":"Install plugin","text":""},{"location":"shape-roundrectangle/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-roundrectangle/#import-plugin","title":"Import plugin","text":""},{"location":"shape-roundrectangle/#import-class","title":"Import class","text":""},{"location":"shape-roundrectangle/#create-shape-object","title":"Create shape object","text":"
    var rect = scene.add.rexRoundRectangle(x, y, width, height, radius, fillColor, fillAlpha);\n

    or

    var rect = scene.add.rexRoundRectangle({\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\nradius: 0,\n\ncolor: undefined,\nalpha: undefined,\n\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: 2\n});\n
    "},{"location":"shape-roundrectangle/#deform","title":"Deform","text":""},{"location":"shape-roundrectangle/#custom-class","title":"Custom class","text":""},{"location":"shape-roundrectangle/#color","title":"Color","text":"

    No tint methods

    Uses rect.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-roundrectangle/#alpha","title":"Alpha","text":""},{"location":"shape-roundrectangle/#size","title":"Size","text":""},{"location":"shape-roundrectangle/#display-size","title":"Display size","text":""},{"location":"shape-roundrectangle/#radius","title":"Radius","text":""},{"location":"shape-roundrectangle/#iteration","title":"Iteration","text":"

    Number of interpolation points in each round corner. Default value is 4.

    "},{"location":"shape-roundrectangle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-roundrectangle/#create-mask","title":"Create mask","text":"
    var mask = rect.createGeometryMask();\n

    See mask

    "},{"location":"shape-roundrectangle/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-spinner/","title":"Spinner","text":""},{"location":"shape-spinner/#introduction","title":"Introduction","text":"

    Loading animations on shape.

    "},{"location":"shape-spinner/#live-demos","title":"Live demos","text":""},{"location":"shape-spinner/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-spinner/#install-plugin","title":"Install plugin","text":""},{"location":"shape-spinner/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-spinner/#import-plugin","title":"Import plugin","text":""},{"location":"shape-spinner/#import-class","title":"Import class","text":""},{"location":"shape-spinner/#add-spinner-object","title":"Add spinner object","text":"
    var spinner = scene.rexSpinner.add.audio({\n// x: 0,\n// y: 0,\n// width: 64,\n// height: 64,\n// color: 0xffffff,\n\n// duration: 1000,\n// start: true,\n// delay: 0,\n// repeatDelay: 0,\n});\n
    "},{"location":"shape-spinner/#play-animation","title":"Play animation","text":""},{"location":"shape-spinner/#start","title":"Start","text":""},{"location":"shape-spinner/#pause","title":"Pause","text":"
    spinner.pause();\n
    "},{"location":"shape-spinner/#resume","title":"Resume","text":"
    spinner.resume();\n
    "},{"location":"shape-spinner/#stop","title":"Stop","text":"
    spinner.stop();\n
    "},{"location":"shape-spinner/#play-animation-manually","title":"Play animation manually","text":"
    1. Set start to false in config
    2. Set progress manually
      spinner.setValue(t);\n
      or
      spinner.value = t;\n
    "},{"location":"shape-spinner/#is-running","title":"Is running","text":"
    var isRunning = spinner.isRunning;\n
    "},{"location":"shape-spinner/#color","title":"Color","text":""},{"location":"shape-spinner/#alpha","title":"Alpha","text":""},{"location":"shape-spinner/#duration","title":"Duration","text":""},{"location":"shape-spinner/#ease","title":"Ease","text":""},{"location":"shape-spinner/#custom-spinner","title":"Custom spinner","text":"
    var customSpinner = this.rexSpinner.add.custom({\n// x: 0,\n// y: 0,\n// width: 64,\n// height: 64,\n// color: 0xffffff,\n\n// duration: 1000,\n// start: true,\n\ncreate: {\n// shapeType: [name0, name1, ...],\n// shapeType: number,\n// shapeType: name,\n},\n\n// create: function() {\n// \n// },\n\nupdate: function() {\n\n},\n})\n
    "},{"location":"shape-spinner/#shape-class","title":"Shape class","text":"

    See Shape class

    "},{"location":"shape-spinner/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-spinner/#create-mask","title":"Create mask","text":"
    var mask = customSpinner.createGeometryMask();\n

    See mask

    "},{"location":"shape-spinner/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-star/","title":"Star","text":""},{"location":"shape-star/#introduction","title":"Introduction","text":"

    Star shape, built-in game object of phaser.

    "},{"location":"shape-star/#usage","title":"Usage","text":""},{"location":"shape-star/#create-shape-object","title":"Create shape object","text":"
    var star = scene.add.star(x, y, points, innerRadius, outerRadius, fillColor);\n// var star = scene.add.star(x, y, points, innerRadius, outerRadius, fillColor, fillAlpha);\n
    "},{"location":"shape-star/#custom-class","title":"Custom class","text":""},{"location":"shape-star/#color","title":"Color","text":"

    No tint methods

    Uses star.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-star/#alpha","title":"Alpha","text":""},{"location":"shape-star/#radius","title":"Radius","text":""},{"location":"shape-star/#display-size","title":"Display size","text":""},{"location":"shape-star/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-star/#create-mask","title":"Create mask","text":"
    var mask = star.createGeometryMask();\n

    See mask

    "},{"location":"shape-star/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-toggleswitch/","title":"Toggle switch","text":""},{"location":"shape-toggleswitch/#introduction","title":"Introduction","text":"

    Toggle-switch input.

    "},{"location":"shape-toggleswitch/#live-demos","title":"Live demos","text":""},{"location":"shape-toggleswitch/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-toggleswitch/#install-plugin","title":"Install plugin","text":""},{"location":"shape-toggleswitch/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-toggleswitch/#import-plugin","title":"Import plugin","text":""},{"location":"shape-toggleswitch/#import-class","title":"Import class","text":""},{"location":"shape-toggleswitch/#create-toggle-switch-input","title":"Create toggle-switch input","text":"
    var toggleSwitch = scene.add.rexToggleSwitch(x, y, width, height, color, config);\n

    or

    var toggleSwitch = scene.add.rexToggleSwitch({\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\n\ncolor: 0x005cb2,\ntrackFillAlpha: 1,\nfalseValueTrackColor: undefined,\nfalseValueTrackFillAlpha: 1,\n\nthumbColor: 0xffffff,\nthumbAlpha: 1,\n\ntrackWidth: 0.9,\ntrackHeight: 0.5,\ntrackCornerRadius: (trackHeight * 0.5),\n\nthumbHeight: (trackHeight * 0.9),\nthumbWidth: (thumbHeight),\nthumbCornerRadius: (thumbHeight * 0.5),\n\nthumbLeft: 0.3,\nthumbRight: (1 - thumbLeft),\nrtl: false,\n\nanimationDuration: 150,\n\nvalue: false,\n\nclick: undefined,\n// click: {\n//     mode: 1,            // 0|'press'|1|'release'\n//     clickInterval: 100  // ms\n//     threshold: undefined\n// },\nreadOnly: false,\n});\n
    "},{"location":"shape-toggleswitch/#custom-class","title":"Custom class","text":""},{"location":"shape-toggleswitch/#value","title":"Value","text":""},{"location":"shape-toggleswitch/#read-only","title":"Read only","text":""},{"location":"shape-toggleswitch/#track-fill-style","title":"Track fill style","text":""},{"location":"shape-toggleswitch/#thumb-fill-style","title":"Thumb fill style","text":""},{"location":"shape-toggleswitch/#toggle-animation","title":"Toggle animation","text":""},{"location":"shape-toggleswitch/#size","title":"Size","text":""},{"location":"shape-toggleswitch/#display-size","title":"Display size","text":""},{"location":"shape-toggleswitch/#track-size-ratio","title":"Track size ratio","text":""},{"location":"shape-toggleswitch/#track-corner-ratio","title":"Track corner ratio","text":""},{"location":"shape-toggleswitch/#thumb-size-ratio","title":"Thumb size ratio","text":""},{"location":"shape-toggleswitch/#thumb-corner-ratio","title":"Thumb corner ratio","text":""},{"location":"shape-toggleswitch/#thumb-position-ratio","title":"Thumb position ratio","text":""},{"location":"shape-toggleswitch/#events","title":"Events","text":""},{"location":"shape-toggleswitch/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-toggleswitch/#create-mask","title":"Create mask","text":"
    var mask = toggleSwitch.createGeometryMask();\n

    See mask

    "},{"location":"shape-toggleswitch/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-triangle/","title":"Triangle","text":""},{"location":"shape-triangle/#introduction","title":"Introduction","text":"

    Triangle shape, built-in game object of phaser.

    "},{"location":"shape-triangle/#usage","title":"Usage","text":""},{"location":"shape-triangle/#create-shape-object","title":"Create shape object","text":"
    var triangle = scene.add.triangle(x, y, x1, y1, x2, y2, x3, y3, fillColor);\n// var triangle = scene.add.triangle(x, y, x1, y1, x2, y2, x3, y3, fillColor, fillAlpha);\n
    "},{"location":"shape-triangle/#custom-class","title":"Custom class","text":""},{"location":"shape-triangle/#color","title":"Color","text":"

    No tint methods

    Uses triangle.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-triangle/#alpha","title":"Alpha","text":""},{"location":"shape-triangle/#set-vertices","title":"Set vertices","text":"
    triangle.setTo(x1, y1, x2, y2, x3, y3);\n
    "},{"location":"shape-triangle/#triangle-width","title":"Triangle width","text":"
    triangle.setLineWidth(startWidth, endWidth);\n
    "},{"location":"shape-triangle/#display-size","title":"Display size","text":""},{"location":"shape-triangle/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-triangle/#create-mask","title":"Create mask","text":"
    var mask = triangle.createGeometryMask();\n

    See mask

    "},{"location":"shape-triangle/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shape-triangle2/","title":"Triangle 2","text":""},{"location":"shape-triangle2/#introduction","title":"Introduction","text":"

    Trangle shape inside a rectangle bounds.

    "},{"location":"shape-triangle2/#live-demos","title":"Live demos","text":""},{"location":"shape-triangle2/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shape-triangle2/#install-plugin","title":"Install plugin","text":""},{"location":"shape-triangle2/#load-minify-file","title":"Load minify file","text":""},{"location":"shape-triangle2/#import-plugin","title":"Import plugin","text":""},{"location":"shape-triangle2/#import-class","title":"Import class","text":""},{"location":"shape-triangle2/#install-plugin_1","title":"Install plugin","text":"

    Install plugin in configuration of game

    var config = {\n// ...\nplugins: {\nglobal: [{\nkey: 'rexTrianglePlugin',\nplugin: TrianglePlugin,\nstart: true\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"shape-triangle2/#create-instance","title":"Create instance","text":"
    var triangle = scene.add.rexTriangle(x, y, width, height, fillColor, fillAlpha);\n

    or

    var triangle = scene.add.rexTriangle({\nx: 0,\ny: 0,\nwidth: 2,\nheight: 2,\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n\narrowOnly: false,\n\ndirection: 0,\neaseDuration: 0,\npadding: 0,\n// padding: {\n//     left: 0,\n//     right: 0,\n//     top: 0,\n//     bottom: 0,\n// },\n\nradius: undefined,\n});\n
    "},{"location":"shape-triangle2/#custom-class","title":"Custom class","text":""},{"location":"shape-triangle2/#color","title":"Color","text":"

    No tint methods

    Uses triangle.setFillStyle(color, alpha) to change color.

    "},{"location":"shape-triangle2/#alpha","title":"Alpha","text":""},{"location":"shape-triangle2/#size","title":"Size","text":""},{"location":"shape-triangle2/#display-size","title":"Display size","text":""},{"location":"shape-triangle2/#direction","title":"Direction","text":""},{"location":"shape-triangle2/#padding","title":"Padding","text":""},{"location":"shape-triangle2/#ease-duration","title":"Ease duration","text":""},{"location":"shape-triangle2/#arrow-only","title":"Arrow only","text":""},{"location":"shape-triangle2/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"shape-triangle2/#create-mask","title":"Create mask","text":"
    var mask = triangle.createGeometryMask();\n

    See mask

    "},{"location":"shape-triangle2/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shatter-image/","title":"Image","text":""},{"location":"shatter-image/#introduction","title":"Introduction","text":"

    Shatter image to triangle faces.

    Reference: Delaunay Triangulation

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"shatter-image/#live-demos","title":"Live demos","text":""},{"location":"shatter-image/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shatter-image/#install-plugin","title":"Install plugin","text":""},{"location":"shatter-image/#load-minify-file","title":"Load minify file","text":""},{"location":"shatter-image/#import-plugin","title":"Import plugin","text":""},{"location":"shatter-image/#import-class","title":"Import class","text":""},{"location":"shatter-image/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexShatterImage(x, y, texture, frame, {\n// ringRadiusList: [1 / 27, 3 / 27, 9 / 27],\n// ringRadiusList: function(width, height) {\n//    return [1 / 27, 3 / 27, 9 / 27];\n// },\n\n// samplesPerRing: 12\n// variation: 0.25,    \n});\n

    or

    var image = scene.add.rexShatterImage({\n// x: 0,\n// y: 0,\nkey,\n// frame: null,\n\n// ringRadiusList: [1 / 27, 3 / 27, 9 / 27],\n// ringRadiusList: function(width, height) {\n//    return [1 / 27, 3 / 27, 9 / 27];\n// },\n\n// samplesPerRing: 12,\n// variation: 0.25,\n\n});\n

    Add perspectiveimage from JSON

    var perspectiveimage = scene.make.rexShatterImage({\nx: 0,\ny: 0,\nkey: null,\nframe: null,\n\n// ringRadiusList: [1 / 27, 3 / 27, 9 / 27],\n// ringRadiusList: function(width, height) {\n//    return [1 / 27, 3 / 27, 9 / 27];\n// },\n\n// samplesPerRing: 12,\n// variation: 0.25,\n\n\nadd: true\n});\n
    "},{"location":"shatter-image/#custom-class","title":"Custom class","text":""},{"location":"shatter-image/#shatter-image","title":"Shatter image","text":"
    image.shatter(centerX, centerY);\n// image.shatter();\n

    or

    image.shatter(centerX, centerY, {\n// ringRadiusList:\n// samplesPerRing: \n// variation\n});\n

    or

    image.shatter({\n// centerX: \n// centerY: \n// ringRadiusList:\n// samplesPerRing: \n// variation\n});\n

    Shatter image into triangle faces.

    "},{"location":"shatter-image/#position-of-shatter-center","title":"Position of Shatter center","text":"
    var shatterCenter = image.shatterCenter; // {x, y}\n
    "},{"location":"shatter-image/#faces","title":"Faces","text":"
    var faces = image.faces;\n

    Faces will be sorted nearby shatter-center to far away.

    "},{"location":"shatter-image/#properties","title":"Properties","text":""},{"location":"shatter-image/#update-properties","title":"Update properties","text":""},{"location":"shatter-image/#tween-properties","title":"Tween properties","text":"
    image.startUpdate();\nscene.tweens.add({\ntargets: image.faces,\nalpha: 0,\nangle: function () { return -90 + Math.random() * 180; },\ny: '-=0.5',\nease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\ndelay: scene.tweens.stagger(20),\nrepeat: 0,            // -1: infinity\nyoyo: false,\nonComplete: function () {\nimage.stopUpdate()\n}\n});\n
    "},{"location":"shatter-image/#reset-image","title":"Reset image","text":"

    Display original image with 2 faces.

    image.resetImage();\n
    "},{"location":"shatter-image/#tint-color","title":"Tint color","text":""},{"location":"shatter-image/#other-properties","title":"Other properties","text":"

    See Mesh game object, game object

    "},{"location":"shatter-image/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"shatter-image/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"shatter-rendertexture/","title":"Render texture","text":""},{"location":"shatter-rendertexture/#introduction","title":"Introduction","text":"

    Shatter render texture to triangle faces.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"shatter-rendertexture/#live-demos","title":"Live demos","text":""},{"location":"shatter-rendertexture/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"shatter-rendertexture/#install-plugin","title":"Install plugin","text":""},{"location":"shatter-rendertexture/#load-minify-file","title":"Load minify file","text":""},{"location":"shatter-rendertexture/#import-plugin","title":"Import plugin","text":""},{"location":"shatter-rendertexture/#import-class","title":"Import class","text":""},{"location":"shatter-rendertexture/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexShatterRenderTexturege(x, y, width, height, {\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    or

    var image = scene.add.rexShatterRenderTexturege({\n// x: 0,\n// y: 0,\n// width: 32,\n// height: 32,\n// gridWidth: 32,\n// girdHeight: 32\n});\n

    Add prespective render texture from JSON

    var image = scene.make.rexShatterRenderTexturege({\nx: 0,\ny: 0,    width: 32,\nheight: 32,\n\n// gridWidth: 32,\n// girdHeight: 32,\n\nadd: true\n});\n
    "},{"location":"shatter-rendertexture/#custom-class","title":"Custom class","text":""},{"location":"shatter-rendertexture/#internal-render-texture","title":"Internal render texture","text":"
    var rt = image.rt;\n
    "},{"location":"shatter-rendertexture/#paste-texture","title":"Paste texture","text":""},{"location":"shatter-rendertexture/#erase","title":"Erase","text":"
    image.rt.erase(gameObject, x, y);\n
    "},{"location":"shatter-rendertexture/#clear","title":"Clear","text":"
    image.rt.clear();\n
    "},{"location":"shatter-rendertexture/#fill","title":"Fill","text":"
    image.rt.fill(rgb, alpha);\n// image.rt.fill(rgb, alpha, x, y, width, height);\n
    "},{"location":"shatter-rendertexture/#other-properties","title":"Other properties","text":"

    See Shatter image game object, Mesh game object, game object

    "},{"location":"shatter-rendertexture/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"shatter-rendertexture/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"ship/","title":"Ship","text":""},{"location":"ship/#introduction","title":"Introduction","text":"

    Move game object as a space ship by cursor keys.

    "},{"location":"ship/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ship/#install-plugin","title":"Install plugin","text":""},{"location":"ship/#load-minify-file","title":"Load minify file","text":""},{"location":"ship/#import-plugin","title":"Import plugin","text":""},{"location":"ship/#import-class","title":"Import class","text":""},{"location":"ship/#create-instance","title":"Create instance","text":"
    var ship = scene.plugins.get('rexShip').add(gameObject, {\n// maxSpeed: 200,\n// acceleration: 200,\n// drag: 0.99,\n// turnSpeed: 300,\n// wrap: true,\n// padding: 0,\n// enable: true,\n// cursorKeys: scene.input.keyboard.createCursorKeys()\n});\n
    "},{"location":"ship/#set-max-speed","title":"Set max speed","text":"
    ship.setMaxSpeed(speed);\n
    "},{"location":"ship/#set-acceleration","title":"Set acceleration","text":"
    ship.setAcceleration(acc);\n
    "},{"location":"ship/#set-drag","title":"Set drag","text":"
    ship.setDrag(drag);\n
    "},{"location":"ship/#set-turn-speed","title":"Set turn speed","text":"
    ship.setTurnSpeed(angularVelocity);\n
    "},{"location":"ship/#set-wrap-mode","title":"Set wrap mode","text":"
    ship.setWrapMode(wrap, padding);\n
    "},{"location":"skew-image/","title":"Image","text":""},{"location":"skew-image/#introduction","title":"Introduction","text":"

    Skewable Image.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"skew-image/#live-demos","title":"Live demos","text":""},{"location":"skew-image/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"skew-image/#install-plugin","title":"Install plugin","text":""},{"location":"skew-image/#load-minify-file","title":"Load minify file","text":""},{"location":"skew-image/#import-plugin","title":"Import plugin","text":""},{"location":"skew-image/#import-class","title":"Import class","text":""},{"location":"skew-image/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexSkewImage(x, y, texture, frame);\n

    or

    var image = scene.add.rexSkewImage({\n// x: 0,\n// y: 0,\nkey,\n// frame: null,\n});\n

    Add quadimage from JSON

    var quadimage = scene.make.rexSkewImage({\nx: 0,\ny: 0,\n\nkey: null,\nframe: null,\n\nadd: true\n});\n
    "},{"location":"skew-image/#custom-class","title":"Custom class","text":""},{"location":"skew-image/#skew","title":"Skew","text":""},{"location":"skew-image/#other-properties","title":"Other properties","text":"

    See Mesh game object, game object

    "},{"location":"skew-image/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"skew-image/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"skew-rendertexture/","title":"Render texture","text":""},{"location":"skew-rendertexture/#introduction","title":"Introduction","text":"

    Skewable render texture.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"skew-rendertexture/#live-demos","title":"Live demos","text":""},{"location":"skew-rendertexture/#usage","title":"Usage","text":""},{"location":"skew-rendertexture/#install-plugin","title":"Install plugin","text":""},{"location":"skew-rendertexture/#load-minify-file","title":"Load minify file","text":""},{"location":"skew-rendertexture/#import-plugin","title":"Import plugin","text":""},{"location":"skew-rendertexture/#import-class","title":"Import class","text":""},{"location":"skew-rendertexture/#create-instance","title":"Create instance","text":"
    var image = scene.add.rexSkewRenderTexturege(x, y, width, height);\n

    or

    var image = scene.add.rexSkewRenderTexturege({\n// x: 0,\n// y: 0,\n// width: 32,\n// height: 32,\n});\n

    Add prespective render texture from JSON

    var image = scene.make.rexSkewRenderTexturege({\nx: 0,\ny: 0,    width: 32,\nheight: 32,\n\nadd: true\n});\n
    "},{"location":"skew-rendertexture/#custom-class","title":"Custom class","text":""},{"location":"skew-rendertexture/#internal-render-texture","title":"Internal render texture","text":"
    var rt = image.rt;\n
    "},{"location":"skew-rendertexture/#paste-texture","title":"Paste texture","text":""},{"location":"skew-rendertexture/#erase","title":"Erase","text":"
    image.rt.erase(gameObject, x, y);\n
    "},{"location":"skew-rendertexture/#clear","title":"Clear","text":"
    image.rt.clear();\n
    "},{"location":"skew-rendertexture/#fill","title":"Fill","text":"
    image.rt.fill(rgb, alpha);\n// image.rt.fill(rgb, alpha, x, y, width, height);\n
    "},{"location":"skew-rendertexture/#other-properties","title":"Other properties","text":"

    See Skew image game object, Mesh game object, game object

    "},{"location":"skew-rendertexture/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"skew-rendertexture/#shader-effects","title":"Shader effects","text":"

    Support postFX effects

    Note

    No preFX effect support

    "},{"location":"slider/","title":"Slider","text":""},{"location":"slider/#introduction","title":"Introduction","text":"

    Drag thumb on a slider bar.

    "},{"location":"slider/#live-demos","title":"Live demos","text":""},{"location":"slider/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"slider/#install-plugin","title":"Install plugin","text":""},{"location":"slider/#load-minify-file","title":"Load minify file","text":""},{"location":"slider/#import-plugin","title":"Import plugin","text":""},{"location":"slider/#import-class","title":"Import class","text":""},{"location":"slider/#create-instance","title":"Create instance","text":"
    var slider = scene.plugins.get('rexSlider').add(gameObject, {\n// endPoints: [\n//     {x:0, y:0},\n//     {x:0, y:0}\n// ],\n// value: 0,\n// enable: true,\n\n// valuechangeCallback: null,\n// valuechangeCallbackScope: null\n});\n
    "},{"location":"slider/#set-end-points","title":"Set end-points","text":"
    slider.setEndPoints(p0x, p0y, p1x, p1y);\n// slider.setEndPoints(p0, p1); // p0, p1: {x, y}\n// slider.setEndPoints(points); // points: [p0, p1]\n
    "},{"location":"slider/#get-value","title":"Get value","text":"
    var value = slider.value;          // value: between 0 to 1\n// var value = slider.getValue();  // value: between 0 to 1\n// var value = slider.getValue(min, max);  // value: between min to max\n
    "},{"location":"slider/#set-value","title":"Set value","text":"
    slider.value = newValue;       // newValue: between 0 to 1\n// slider.setValue(newValue);  // newValue: between 0 to 1\n// slider.setValue(newValue, min, max);  // newValue: between min to max\n
    slider.addValue(inc);  // inc: between 0 to 1\n// slider.addValue(inc, min, max);  // inc: between min to max\n

    Fires valuechange event if new value is not equal to current value.

    "},{"location":"slider/#events","title":"Events","text":""},{"location":"slider/#drag","title":"Drag","text":""},{"location":"slider/#drag-enable","title":"Drag enable","text":""},{"location":"slider/#is-dragging","title":"Is dragging","text":"
    var isDragging = slider.isDragging;\n
    "},{"location":"snap/","title":"Snap","text":""},{"location":"snap/#introduction","title":"Introduction","text":"

    Snap a value to nearest grid slice, built-in methods of phaser.

    "},{"location":"snap/#usage","title":"Usage","text":""},{"location":"snap/#round","title":"Round","text":"
    var out = Phaser.Math.Snap.To(value, gap);\n// var out = Phaser.Math.Snap.To(value, gap, start);\n

    Example: set gap to 5

    "},{"location":"snap/#ceil","title":"Ceil","text":"
    var out = Phaser.Math.Snap.Ceil(value, gap);\n// var out = Phaser.Math.Snap.Ceil(value, gap, start);\n

    Example: set gap to 5

    "},{"location":"snap/#floor","title":"Floor","text":"
    var out = Phaser.Math.Snap.Floor(value, gap);\n// var out = Phaser.Math.Snap.Floor(value, gap, start);\n

    Example: set gap to 5

    "},{"location":"snapshot/","title":"Snapshot","text":""},{"location":"snapshot/#introduction","title":"Introduction","text":"

    Get snapshot image, built-in methods of phaser.

    "},{"location":"snapshot/#usage","title":"Usage","text":""},{"location":"snapshot/#get-snapshot-image","title":"Get snapshot image","text":"

    Parameters:

    "},{"location":"sprite/","title":"Sprite","text":""},{"location":"sprite/#introduction","title":"Introduction","text":"

    Display of both static and animated images, built-in game object of phaser.

    "},{"location":"sprite/#usage","title":"Usage","text":""},{"location":"sprite/#load-texture","title":"Load texture","text":"

    Texture for static image

    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"sprite/#load-atlas","title":"Load atlas","text":"

    Atlas for animation images

    scene.load.atlas(key, textureURL, atlasURL);\n

    Reference: load atlas

    "},{"location":"sprite/#add-sprite-object","title":"Add sprite object","text":"
    var sprite = scene.add.sprite(x, y, key);\n// var sprite = scene.add.sprite(x, y, key, frame);\n

    Add sprite from JSON

    var sprite = scene.make.sprite({\nx: 0,\ny: 0,\nkey: '',\n// frame: '',\n\n// angle: 0,\n// alpha: 1\n// flipX: true,\n// flipY: true,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n\n// anims: {\n// key: ,\n// repeat: ,\n// ...\n// },\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"sprite/#custom-class","title":"Custom class","text":""},{"location":"sprite/#texture","title":"Texture","text":"

    See game object - texture

    "},{"location":"sprite/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"sprite/#create-mask","title":"Create mask","text":"
    var mask = sprite.createBitmapMask();\n

    See mask

    "},{"location":"sprite/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"sprite/#animation","title":"Animation","text":""},{"location":"sprite/#create-animation","title":"Create animation","text":"

    config : See Add animation section.

    "},{"location":"sprite/#create-aseprite-animation","title":"Create Aseprite animation","text":""},{"location":"sprite/#remove-animation","title":"Remove animation","text":""},{"location":"sprite/#get-animation","title":"Get animation","text":""},{"location":"sprite/#has-animation","title":"Has animation","text":""},{"location":"sprite/#play-animation","title":"Play animation","text":""},{"location":"sprite/#chain","title":"Chain","text":""},{"location":"sprite/#stop","title":"Stop","text":""},{"location":"sprite/#restart","title":"Restart","text":"
    sprite.anims.restart();\n// sprite.anims.restart(includeDelay, resetRepeats);\n
    "},{"location":"sprite/#properties","title":"Properties","text":""},{"location":"sprite/#events","title":"Events","text":""},{"location":"statemanager/","title":"State manager","text":""},{"location":"statemanager/#introduction","title":"Introduction","text":"

    Another version of Finite state machine.

    "},{"location":"statemanager/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"statemanager/#install-plugin","title":"Install plugin","text":""},{"location":"statemanager/#load-minify-file","title":"Load minify file","text":""},{"location":"statemanager/#import-plugin","title":"Import plugin","text":""},{"location":"statemanager/#import-class","title":"Import class","text":""},{"location":"statemanager/#create-instance","title":"Create instance","text":"
    var states = scene.plugins.get('rexStateManager').add({\neventEmitter: undefined\n});\n
    "},{"location":"statemanager/#custom-class","title":"Custom class","text":""},{"location":"statemanager/#add-new-state","title":"Add new state","text":"

    states.addState(name, {\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {}\n})\n
    states.addState({\nname: 'A',\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {}\n})\n

    or

    states.addStates({\n'A' : {\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {}\n},\n// ...\n})\n
    states.addStates([\n{\nname: 'A',\nnext: 'B',  // function() { return 'B'; }\nenter: function() {},\nexit: function() {}\n},\n// ...\n]);\n

    "},{"location":"statemanager/#read-state","title":"Read state","text":""},{"location":"statemanager/#start-at-state","title":"Start at state","text":"

    Set new state without triggering any state-changing callbacks or events.

    state.start(newState);\n
    "},{"location":"statemanager/#next-state","title":"Next state","text":"
    graph TB\n\nnext[\"states.next()\"] --> next_A[\"stateA.next()<br>return 'B'\"]\n\nnext_A --> eventStateChange[\"states.emit('statechange', states)<br>states.prevState -> states.state\"]\n\nsubgraph State changing\n\neventStateChange --> exit_A[\"stateA.exit()\"]\nexit_A --> eventExitA[\"states.emit('exit_A', states)\"]\n\neventExitA --> enter_B[\"stateB.enter()\"]\nenter_B --> eventEnterB[\"states.emit('enter_B', states)\"]\n\nsubgraph Exit\nexit_A\neventExitA\nend\n\nsubgraph Enter\nenter_B\neventEnterB\nend\n\nend\n\ngoto[\"states.goto('B')\"] --> eventStateChange\n\nsubgraph Request\n\nsubgraph Next\nnext\nnext_A\nend\n\nsubgraph Goto\ngoto\nend\n\nend
    "},{"location":"statemanager/#request","title":"Request","text":""},{"location":"statemanager/#state-changing","title":"State-changing","text":"

    These callbacks or events will be triggered if state is changing.

    For example, state is changing from 'A' to 'B'.

    1. event statechange
      states.on('statechange', function(states) {\nconsole.log( states.prevState + '->' + states.state );\n});\n
    2. callback stateA.exit
    3. event exit_A
      states.on('exit_A', function(states) {\n/*...*/\n});\n
    4. callback stateB.enter
    5. event enter_B
      states.on('enter_B', function(states) {\n/*...*/\n});\n
    "},{"location":"statemanager/#enable","title":"Enable","text":"
    states.setEnable();\n// states.setEnable(false); // disable\n

    or

    states.toggleEnable();\n

    states.next() and states.goto() will be ignored if disabled.

    "},{"location":"statemanager/#update","title":"Update","text":""},{"location":"statemanager/#remove-state","title":"Remove state","text":""},{"location":"step/","title":"Step","text":""},{"location":"step/#introduction","title":"Introduction","text":"

    Interpolate points between previous position and current position with fixed step length.

    "},{"location":"step/#live-demos","title":"Live demos","text":""},{"location":"step/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"step/#install-plugin","title":"Install plugin","text":""},{"location":"step/#load-minify-file","title":"Load minify file","text":""},{"location":"step/#import-plugin","title":"Import plugin","text":""},{"location":"step/#import-class","title":"Import class","text":""},{"location":"step/#create-instance","title":"Create instance","text":"
    var step = scene.plugins.get('rexStep').add(gameObject, {\n// enable: true,\n// stepLength: 5,    \n});\n
    "},{"location":"step/#enable","title":"Enable","text":""},{"location":"step/#set-step-length","title":"Set step length","text":"
    step.setStepLength(stepLength);\n// step.stepLength = stepLength;\n
    "},{"location":"step/#events","title":"Events","text":""},{"location":"structs-list/","title":"List","text":""},{"location":"structs-list/#introduction","title":"Introduction","text":"

    An ordered list, built-in data structure of phaser.

    "},{"location":"structs-list/#usage","title":"Usage","text":""},{"location":"structs-list/#create-instance","title":"Create instance","text":"
    var list = new Phaser.Structs.List();\n
    "},{"location":"structs-list/#add-child","title":"Add child","text":"
    list.add(child);\n
    list.addAt(child, index);\n
    "},{"location":"structs-list/#exist","title":"Exist","text":"
    var hasChild = list.exists(child);\n
    "},{"location":"structs-list/#get-child","title":"Get child","text":"
    var firstChild = list.first;\nvar nextChild = list.next;\nvar prevChild = list.previous;\nvar lastChild = list.last;\n
    var child = list.getByName(name);\n
    var child = list.getRandom(startIndex, length);\n
    var child = list.getFirst(property, value, startIndex, endIndex);\n// value: the value to test the property against. Must pass a strict (`===`) comparison check.\n
    var child = list.getAll(property, value, startIndex, endIndex);\n// value: the value to test the property against. Must pass a strict (`===`) comparison check.\n
    var child = list.count(property, value);\n// value: the value to test the property against. Must pass a strict (`===`) comparison check.\n
    "},{"location":"structs-list/#get-children","title":"Get children","text":"
    var children = list.list;\n
    "},{"location":"structs-list/#sort-children","title":"Sort children","text":""},{"location":"structs-list/#remove-child","title":"Remove child","text":"
    list.remove(child);\n
    list.removeAt(index);\n
    list.removeBetween(startIndex, endIndex);\n
    list.removeAll();\n
    "},{"location":"structs-list/#order-of-child","title":"Order of child","text":"
    list.moveTo(child, index);\n
    list.bringToTop(child);\n
    list.sendToBack(child);\n
    list.moveUp(child);\n
    list.moveDown(child);\n
    list.moveAbove(child1, child2);  // Move child1 above child2\n
    list.moveBelow(child1, child2);  // Move child1 below child2\n
    list.swap(child1, child2);\n
    list.reverse();\n
    list.shuffle();\n
    "},{"location":"structs-list/#replace-child","title":"Replace child","text":"
    list.replace(oldChild, newChild);\n
    "},{"location":"structs-list/#set-properties","title":"Set properties","text":"
    list.setAll(property, value, startIndex, endIndex);\n
    "},{"location":"structs-list/#for-each-child","title":"For each child","text":""},{"location":"structs-list/#children-counts","title":"Children counts","text":"
    var size = list.length;\n
    "},{"location":"structs-set/","title":"Set","text":""},{"location":"structs-set/#introduction","title":"Introduction","text":"

    A collection of unique elements, built-in data structure of phaser.

    "},{"location":"structs-set/#usage","title":"Usage","text":""},{"location":"structs-set/#create-instance","title":"Create instance","text":"
    var set = new Phaser.Structs.Set();\n

    or

    var set = new Phaser.Structs.Set(elements);\n
    "},{"location":"structs-set/#add-an-element","title":"Add an element","text":"
    set.set(element);\n
    "},{"location":"structs-set/#remove-an-element","title":"Remove an element","text":"
    set.delete(element);\n
    "},{"location":"structs-set/#remove-all-elements","title":"Remove all elements","text":"
    set.clear();\n
    "},{"location":"structs-set/#has-element","title":"Has element","text":"
    set.contains(element);\n
    "},{"location":"structs-set/#get-elements","title":"Get elements","text":"
    var elements = set.entries;\n

    or get a shallow copy of elements

    var elements = set.getArray();\n
    "},{"location":"structs-set/#element-counts","title":"Element counts","text":"
    var size = set.size;\n
    "},{"location":"structs-set/#for-each-element","title":"For each element","text":""},{"location":"structs-set/#set-operations","title":"Set operations","text":""},{"location":"tagplayer/","title":"Tag player","text":""},{"location":"tagplayer/#introduction","title":"Introduction","text":"

    Text commands to control sprites, texts, sound effect or backgroun music.

    "},{"location":"tagplayer/#live-demos","title":"Live demos","text":""},{"location":"tagplayer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"tagplayer/#install-plugin","title":"Install plugin","text":""},{"location":"tagplayer/#load-minify-file","title":"Load minify file","text":""},{"location":"tagplayer/#import-plugin","title":"Import plugin","text":""},{"location":"tagplayer/#import-class","title":"Import class","text":""},{"location":"tagplayer/#create-instance","title":"Create instance","text":"
    var tagPlayer = scene.plugins.get('rexTagPlayerPlugin').add(scene, {\nparser: {\ndelimiters: '[]',\ncomment: '//',\n// translateTagNameCallback: undefined,\n}\n\nsprites: {\n// createGameObject: 'sprite',\n// fade: 500,  \n// fade: {mode: 'tint', time: 500},\n// viewportCoordinate: false,\n// symbols: undefined,  // { key:value }\n}, // sprites: false,\n\ntexts: {\n// createGameObject: undefined,        \n// fade: 500,\n// fade: {mode: 'tint', time: 500},\n// viewportCoordinate: false,\n// symbols: undefined,  // { key:value }\n}\n// texts: false,\n\nsounds: {\nbgm: {\ninitial: undefinied,\nloop: true,\nfade: 500\n},\nbgm2: {\ninitial: undefinied,\nloop: true,\nfade: 500\n}\n},\n\nclickTarget: scene,\n});\n
    "},{"location":"tagplayer/#custom-class","title":"Custom class","text":""},{"location":"tagplayer/#game-object-manager","title":"Game object manager","text":"
    tagPlayer.addGameObjectManager({\nname: goType,\ncreateGameObject: function(scene, ...) {\nreturn gameObject\n},\n\n// fade: 500,\n// fade: {mode: 'tint', time: 500},\n\n// viewportCoordinate: false,\n// viewportCoordinate: { viewport: new Phaser.Geom.Rectangle() },\n\n// symbols: undefined,  // { key:value },\n})\n
    "},{"location":"tagplayer/#built-in-commands","title":"Built-in commands","text":"

    goType : name parameter in config of tagPlayer.addGameObjectManager method

    "},{"location":"tagplayer/#execute-commands","title":"Execute commands","text":"
    tagPlayer.play(commands);\n

    or

    tagPlayer.playPromise(commands)\n.then(function(){\n// Typing content complete\n})\n
    "},{"location":"tagplayer/#pause","title":"Pause","text":"

    Invoke this method during tag-start,tag-end, or content events to suspend parsing.

    "},{"location":"tagplayer/#resume","title":"Resume","text":"
    tagPlayer.resume();\n
    "},{"location":"tagplayer/#time-scale","title":"Time scale","text":"

    Time scale of typing, typing animation, sprite animation and easing of sprite's properties.

    "},{"location":"tagplayer/#events","title":"Events","text":""},{"location":"tagplayer/#tags-of-content","title":"Tags of content","text":""},{"location":"tagplayer/#sprite","title":"Sprite","text":""},{"location":"tagplayer/#text","title":"Text","text":""},{"location":"tagplayer/#sound-effect","title":"Sound effect","text":""},{"location":"tagplayer/#background-music","title":"Background music","text":""},{"location":"tagplayer/#camera","title":"Camera","text":""},{"location":"tagplayer/#wait-conditions","title":"Wait conditions","text":""},{"location":"tagplayer/#custom-tag","title":"Custom tag","text":"

    Assume that adding a custom tag : [custom=10,20][/custom]

    "},{"location":"tagplayer/#content","title":"Content","text":"

    These lines will be skipped :

    New line symbol '\\n' will be removed, use \\\\n to insert a new line character.

    Content will pass to one of these callback/event

    1. Set content callback
      tagPlayer.setContentCallback(callback, scope);\n
    2. On parse/execute a content, after a [custom] tag.
      tagPlayer.on('custom#content', function(content) {   })\n
    3. On parse/execute a content, after any tag.
      tagPlayer.on('content', function(content) {   })\n
    "},{"location":"tagplayer/#game-objects","title":"Game objects","text":""},{"location":"tagplayer/#data","title":"Data","text":"

    See data manager

    Note

    Ensure data manager is created before binding any data-changed events.

    "},{"location":"tagtext/","title":"Tag Text","text":""},{"location":"tagtext/#introduction","title":"Introduction","text":"

    Displays text with multi-color, font face, or font size with tags.

    "},{"location":"tagtext/#live-demos","title":"Live demos","text":""},{"location":"tagtext/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"tagtext/#install-plugin","title":"Install plugin","text":""},{"location":"tagtext/#load-minify-file","title":"Load minify file","text":""},{"location":"tagtext/#import-plugin","title":"Import plugin","text":""},{"location":"tagtext/#import-class","title":"Import class","text":""},{"location":"tagtext/#add-text-object","title":"Add text object","text":"
    var tags = {\ntag0: {\ncolor: 'red'\n},\ntag1: {\ncolor: 'blue'\n}\n};\nvar txt = scene.add.rexTagText(x, y, '<class=\"tag0\">h</class>ello', {tags:tags});\n// var txt = scene.add.rexTagText(x, y, '<class=\"tag0\">h</class>ello', { fontFamily: 'Arial', fontSize: 64, color: '#00ff00', tags:tags });\n

    Default style

    {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\nbackgroundColor2: null,\nbackgroundHorizontalGradient: true,\nbackgroundStrokeColor: null,\nbackgroundStrokeLineWidth: 2,\n\nbackgroundCornerRadius: 0,\n// 0   : no round corner, \n// > 0 : convex round corner\n// < 0 : concave round corner\n\nbackgroundCornerIteration: null, color: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},\nunderline: {\ncolor: '#000',\nthickness: 0,\noffset: 0\n},\nstrikethrough: {\ncolor: '#000',\nthickness: 0,\noffset: 0\n},    // align: 'left',  // Equal to halign\nhalign: 'left', // 'left'|'center'|'right'\nvalign: 'top',  // 'top'|'center'|'bottom'\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\nmaxLines: 0,\nlineSpacing: 0,\nfixedWidth: 0,\nfixedHeight: 0,\nlineSpacing: 0,\ntestString: '|M\u00c9qgy',\nwrap: {\nmode: 'none'     // 0|'none'|1|'word'|2|'char'|'character'\nwidth: null\n},\n// rtl: false,\nmetrics: false,\n// metrics: {\n//     ascent: 0,\n//     descent: 0,\n//     fontSize: 0\n// },\n\n// images: {\n//    key: { y:-8 }\n// }\n\ntags: {\n//tag0: {\n//  color: 'red'\n//},\n//tag1: {\n//  color: 'blue'\n//}\n}\n}\n
    var txt = scene.add.rexTagText({\nx: 0,\ny: 0,\ntext: '',\nstyle: {\nfontSize: '64px',\nfontFamily: 'Arial',\ncolor: '#ffffff',\nalign: 'center',\nbackgroundColor: '#ff00ff',\ntags: {}\n}\n})\n

    or

    var txt = scene.make.rexTagText({\nx: 100,\ny: 100,\npadding: {\nleft: 64,\nright: 16,\ntop: 20,\nbottom: 40\n//x: 32,    // 32px padding on the left/right\n//y: 16     // 16px padding on the top/bottom\n},\ntext: 'Text\\nGame Object\\nCreated from config',\nstyle: {\nfontSize: '64px',\nfontFamily: 'Arial',\ncolor: '#ffffff',\nalign: 'center',\nbackgroundColor: '#ff00ff',\ntags: {}\n},\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"tagtext/#properties-of-tag","title":"Properties of tag","text":"
    {\nfontFamily: 'Courier',   // or 'family', 'font-family'\nfontSize: '16px',        // or 'size', 'font-size'\nfontStyle: 'bold italic',// or 'style', 'font-style'\ncolor: 'red',            // or 'font-color'\nstroke: {\ncolor: 'blue',\nthickness: 1\n},\nshadow: {\ncolor: 'black',\noffsetX: 2,\noffsetY: 2,\nblur: 2\n},\nunderline: {            // or 'u'\ncolor: 'blue',\nthickness: 3,\noffset: -1\n},\nstrikethrough: {        // or 's'\ncolor: 'red',\nthickness: 3,\noffset: -1\n},    y: 0,\nimg: textureKey,\narea: areaKey,\n}\n
    "},{"location":"tagtext/#custom-class","title":"Custom class","text":""},{"location":"tagtext/#add-tag","title":"Add tag","text":""},{"location":"tagtext/#wrap","title":"Wrap","text":""},{"location":"tagtext/#content","title":"Content","text":""},{"location":"tagtext/#set-style","title":"Set style","text":"
    txt.setStyle(style);\ntxt.setFont(font);  // font: {fontFamily, fontSize, fontStyle}\ntxt.setFontFamily(family);\ntxt.setFontSize(size);\ntxt.setFontStyle(style);\n
    "},{"location":"tagtext/#color","title":"Color","text":""},{"location":"tagtext/#image","title":"Image","text":""},{"location":"tagtext/#hit-area-of-words","title":"Hit area of words","text":""},{"location":"tagtext/#hitting-events","title":"Hitting events","text":""},{"location":"tagtext/#draw-hit-areas","title":"Draw hit-areas","text":"
    txt.drawAreaBounds(graphics, color);\n
    "},{"location":"tagtext/#line-spacing","title":"Line spacing","text":"

    This value is added to the height of the font when calculating the overall line height.

    "},{"location":"tagtext/#padding","title":"Padding","text":""},{"location":"tagtext/#max-lines","title":"Max lines","text":""},{"location":"tagtext/#fixed-size","title":"Fixed size","text":""},{"location":"tagtext/#left-margin-of-text","title":"Left margin of text","text":"
    var leftMargin = txt.measureTextMargins(testString).left;\n
    "},{"location":"tagtext/#shift-start-position-of-text","title":"Shift start position of text","text":"
    txt.setXOffset(value);\n
    "},{"location":"tagtext/#resolution","title":"Resolution","text":""},{"location":"tagtext/#inline-style","title":"Inline style","text":"

    Define style inline text.

    Or mix them

    "},{"location":"tagtext/#test-string","title":"Test string","text":"

    Set the test string to use when measuring the font.

    txt.setTestString(text);\n
    "},{"location":"tagtext/#save-texture","title":"Save texture","text":"
    txt.generateTexture(key);\n// txt.generateTexture(key, x, y, width, height);\n
    "},{"location":"tagtext/#rtl","title":"RTL","text":""},{"location":"tagtext/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"tagtext/#create-mask","title":"Create mask","text":"
    var mask = txt.createBitmapMask();\n

    See mask

    "},{"location":"tagtext/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"tcrp-player/","title":"Player","text":""},{"location":"tcrp-player/#introduction","title":"Introduction","text":"

    Player of T ime-C ommand-R ecorder-P layer, to run commands on time.

    "},{"location":"tcrp-player/#live-demos","title":"Live demos","text":""},{"location":"tcrp-player/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"tcrp-player/#install-plugin","title":"Install plugin","text":""},{"location":"tcrp-player/#load-minify-file","title":"Load minify file","text":""},{"location":"tcrp-player/#import-plugin","title":"Import plugin","text":""},{"location":"tcrp-player/#import-class","title":"Import class","text":""},{"location":"tcrp-player/#create-instance","title":"Create instance","text":"
    var player = scene.plugins.get('rexTCRP').addPlayer(scene, {\n// timeUnit: 0,        // 'ms'|0|'s'|'sec'|1\n// dtMode: 0,          // 'abs'|'absolute'|0|'inc'|'increment'|1\n// commands: [],       // [[time, command], [time, command], ...]\n// timeScale: 1,\n// scope: undefined\n});\n
    "},{"location":"tcrp-player/#load-commands","title":"Load commands","text":"
    player.load(commands, scope, {\n// timeUnit: 0,        // 'ms'|0|'s'|'sec'|1\n// dtMode: 0           // 'abs'|'absolute'|0|'inc'|'increment'|1\n});\n
    "},{"location":"tcrp-player/#start-playing","title":"Start playing","text":"
    player.start();\n// player.start(startAt);  // Start-at time in ms\n
    "},{"location":"tcrp-player/#events","title":"Events","text":""},{"location":"tcrp-player/#pause-resume-stop-playing","title":"Pause, Resume, stop playing","text":"
    player.pause();\nplayer.resume();\nplayer.stop();\n
    "},{"location":"tcrp-player/#seek-elapsed-time","title":"Seek elapsed time","text":"
    player.seek(time);   // Elapsed time in ms\n
    "},{"location":"tcrp-player/#seek-to-next-command","title":"Seek to next command","text":"
    player.seekToNext();\n

    Seek to time of next command.

    "},{"location":"tcrp-player/#state-of-player","title":"State of player","text":"
    var isPlaying = player.isPlaying;\nvar completed = player.completed;\nvar now = player.now;\n
    "},{"location":"tcrp-player/#time-scale","title":"Time-scale","text":""},{"location":"tcrp-recoder/","title":"Recoder","text":""},{"location":"tcrp-recoder/#introduction","title":"Introduction","text":"

    Recorder of T ime-C ommand-R ecorder-P layer, to store commands with time.

    "},{"location":"tcrp-recoder/#live-demos","title":"Live demos","text":""},{"location":"tcrp-recoder/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"tcrp-recoder/#install-plugin","title":"Install plugin","text":""},{"location":"tcrp-recoder/#load-minify-file","title":"Load minify file","text":""},{"location":"tcrp-recoder/#import-plugin","title":"Import plugin","text":""},{"location":"tcrp-recoder/#import-class","title":"Import class","text":""},{"location":"tcrp-recoder/#create-instance","title":"Create instance","text":"
    var recorder = scene.plugins.get('rexTCRP').addRecorder(scene);\n

    or

    var recorder = scene.plugins.get('rexTCRP').addRecorder(gameObject);\n
    "},{"location":"tcrp-recoder/#start-recording","title":"Start recording","text":"
    recorder.start();\n// recorder.start(startAt);  // start-at time in ms\n
    "},{"location":"tcrp-recoder/#push-commands","title":"Push commands","text":"
    recorder.addCommand([fnName, param0, param1, ...]);\n// recorder.addCommand([command0, command1, ...]);\n// recorder.addCommand([fnName, param0, param1, ...], offset);  // time-offset in ms\n

    See also Run commands

    "},{"location":"tcrp-recoder/#get-commands","title":"Get commands","text":"
    var commands = recorder.getCommands();        // Get a shallow copy of commands\n// var commands = recorder.getCommands(true); // Get reference of commands\n

    Format of return commands:

    [\n[time, [command]],\n[time, [command0,command1]],\n...\n]\n
    "},{"location":"tcrp-recoder/#clear-commands","title":"Clear commands","text":"
    recorder.clear();\n
    "},{"location":"tcrp-recoder/#pause-resume-stop-recording","title":"Pause, Resume, stop recording","text":"
    recorder.pause();\nrecorder.resume();\nrecorder.stop();\n
    "},{"location":"tcrp-recoder/#seek-elapsed-time","title":"Seek elapsed time","text":"
    recorder.seek(time);   // elapsed time in ms\n
    "},{"location":"tcrp-recoder/#state-of-recorder","title":"State of recorder","text":"
    var isRecording = recorder.isRecording;\nvar now = recorder.now;\n
    "},{"location":"tcrp-recoder/#time-scale","title":"Time-scale","text":""},{"location":"tcrp-recoder/#events","title":"Events","text":""},{"location":"text/","title":"Text","text":""},{"location":"text/#introduction","title":"Introduction","text":"

    Drawing text on canvas, built-in game object of phaser.

    "},{"location":"text/#usage","title":"Usage","text":""},{"location":"text/#add-text-object","title":"Add text object","text":"
    var txt = scene.add.text(x, y, 'hello');\n// var txt = scene.add.text(x, y, 'hello', { fontFamily: 'Arial', fontSize: 64, color: '#00ff00' });\n

    Default style

    {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},\nalign: 'left',  // 'left'|'center'|'right'|'justify'\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\nmaxLines: 0,\nlineSpacing: 0,\nfixedWidth: 0,\nfixedHeight: 0,\nrtl: false,\ntestString: '|M\u00c9qgy',\nwordWrap: {\nwidth: null,\ncallback: null,\ncallbackScope: null,\nuseAdvancedWrap: false\n},\nmetrics: false,\n// metrics: {\n//     ascent: 0,\n//     descent: 0,\n//     fontSize: 0\n// },\n}\n

    Add text from JSON

    var txt = scene.make.text({\nx: 100,\ny: 100,\npadding: {\nleft: 64,\nright: 16,\ntop: 20,\nbottom: 40\n//x: 32,    // 32px padding on the left/right\n//y: 16     // 16px padding on the top/bottom\n},\ntext: 'Text\\nGame Object\\nCreated from config',\nstyle: {\nfontSize: '64px',\nfontFamily: 'Arial',\ncolor: '#ffffff',\nalign: 'center',  // 'left'|'center'|'right'|'justify'\nbackgroundColor: '#ff00ff'\n},\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"text/#custom-class","title":"Custom class","text":""},{"location":"text/#word-wrap","title":"Word wrap","text":""},{"location":"text/#content","title":"Content","text":""},{"location":"text/#set-style","title":"Set style","text":"
    txt.setStyle(style);\ntxt.setFont(font);\ntxt.setFontFamily(family);\ntxt.setFontSize(size);\ntxt.setFontStyle(style);\n
    "},{"location":"text/#set-align","title":"Set align","text":"
    txt.setAlign(align);\n
    "},{"location":"text/#color","title":"Color","text":""},{"location":"text/#line-spacing","title":"Line spacing","text":"

    This value is added to the height of the font when calculating the overall line height.

    "},{"location":"text/#padding","title":"Padding","text":""},{"location":"text/#max-lines","title":"Max lines","text":""},{"location":"text/#fixed-size","title":"Fixed size","text":""},{"location":"text/#test-string","title":"Test string","text":"

    Set the test string to use when measuring the font.

    txt.style.setTestString(text);\n
    "},{"location":"text/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"text/#create-mask","title":"Create mask","text":"
    var mask = txt.createBitmapMask();\n

    See mask

    "},{"location":"text/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"textedit/","title":"Edit","text":""},{"location":"textedit/#introduction","title":"Introduction","text":"

    Create an input text object above a text object to edit string content.

    "},{"location":"textedit/#live-demos","title":"Live demos","text":""},{"location":"textedit/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"textedit/#install-plugin","title":"Install plugin","text":""},{"location":"textedit/#load-minify-file","title":"Load minify file","text":""},{"location":"textedit/#import-plugin","title":"Import plugin","text":""},{"location":"textedit/#import-class","title":"Import class","text":""},{"location":"textedit/#open-text-editor","title":"Open text editor","text":"

    Open editor directly.

    var editor = scene.plugins.get('rexTextEdit').edit(textObject, {\n// inputType: 'text',   // 'text'|'password'|'textarea'|...\n// type: 'text',    // 'text'|'password'|'textarea'|...\n\n// enterClose: true,\n// selectAll: false,\n\n// onOpen: undefined,\n// onTextChanged: undefined,\n// onClose: undefined,\n\n// text: '',\n});\n// var editor = scene.plugins.get('rexTextEdit').edit(textObject, config, onClose);\n

    Create a text editor (input element) above text object.

    Limitation of text game object

    Don't assign height property of text game object. Because that text input element does not have vertical align setting, text will always align to middle/center.

    "},{"location":"textedit/#create-instance","title":"Create instance","text":"

    Add text-edit behavior, will open editor under 'pointerdown' event.

    var editor = scene.plugins.get('rexTextEdit').add(textGameObject, {\n// type: 'text',   //'text','password','number'\n// enterClose: true,\n// selectAll: false,\n\n// onOpen: undefined,\n// onTextChanged: undefined,\n// onClose: undefined,\n\n// text: '',\n});\n
    "},{"location":"textedit/#open-editor","title":"Open editor","text":"
    editor.open(config);\n// editor.open(config, onClose);\n

    Create a text editor (input element) above text object.

    "},{"location":"textedit/#is-opened","title":"Is opened","text":"
    var isOpened = editor.isOpened;\n
    "},{"location":"textedit/#close-editor","title":"Close editor","text":"
    editor.close();\n

    Text editor will be closed when

    "},{"location":"textedit/#get-dom","title":"Get DOM","text":"
    var inputText = editor.inputText.node;\n
    "},{"location":"textedit/#bypass-key-input","title":"Bypass key input","text":"

    See InputText/Bypass key input

    "},{"location":"textedit/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"

    See dom-element's Interactive with other game objects

    "},{"location":"textpage/","title":"Page","text":""},{"location":"textpage/#introduction","title":"Introduction","text":"

    Display text page by page on text object, bbcode text object, or tag text object.

    "},{"location":"textpage/#live-demos","title":"Live demos","text":""},{"location":"textpage/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"textpage/#install-plugin","title":"Install plugin","text":""},{"location":"textpage/#load-minify-file","title":"Load minify file","text":""},{"location":"textpage/#import-plugin","title":"Import plugin","text":""},{"location":"textpage/#import-class","title":"Import class","text":""},{"location":"textpage/#create-instance","title":"Create instance","text":"
    var page = scene.plugins.get('rexTextPage').add(textGameObject, {\n// text: '',              // content in string or array\n// maxLines: undefined,\n// pageBreak: '\\f\\n',\n});\n
    "},{"location":"textpage/#set-content","title":"Set content","text":""},{"location":"textpage/#show-page","title":"Show page","text":"

    Note

    Initial page index is -1, so user could call page.showNextPage() to display first page.

    "},{"location":"textpage/#get-lines-of-page","title":"Get lines of page","text":""},{"location":"textpage/#other-properties","title":"Other properties","text":""},{"location":"textplayer/","title":"Text player","text":""},{"location":"textplayer/#introduction","title":"Introduction","text":"

    Typing characters on dynamic text, waiting click or key enter, play sound effect or backgroun music.

    "},{"location":"textplayer/#live-demos","title":"Live demos","text":""},{"location":"textplayer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"textplayer/#install-plugin","title":"Install plugin","text":""},{"location":"textplayer/#load-minify-file","title":"Load minify file","text":""},{"location":"textplayer/#import-plugin","title":"Import plugin","text":""},{"location":"textplayer/#import-class","title":"Import class","text":""},{"location":"textplayer/#create-instance","title":"Create instance","text":"
    var txt = scene.add.rexTextPlayer({\nx: 0, y: 0,\nwidth: undefined, height: undefined,\n\npadding: 0,  // {left: 0, right: 0, top: 0, bottom: 0}\n\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null\n},\n\ninnerBounds: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\noffsetX: 0,\noffsetY: 0,\nleftSpace: 0,\nrightSpace: 0,\n},\n\nparser: {\ndelimiters: '[]',\ncomment: '//',\n// translateTagNameCallback: undefined,\n}\n\nwrap: {\ncallback: undefined, // Default wrapping callback is dynamicText.runWordWrap()\nlineHeight:\n// maxLines: \npadding: { top: 0, left: 0, right: 0, bottom: 0 },\nletterSpacing: 0,\nhAlign: 0, // 0|'left'|1|'center'|2|'right'\nvAlign: 0, // 0|'top'|1|'center'|2|'bottom'\ncharWrap: false\n},\n\ntyping: {\nspeed: 250,\nonTypingStart: function (children) {\nfor (var i = 0, cnt = children.length; i < cnt; i++) {\nchildren[i].setVisible(false);\n}\n},  // Default: set all children invisible\nanimation: undefined,  // Default: no typing animation, only invoke onStart callback\nanimation: {\nduration: 1000,\nyoyo: false,\nonStart: function(child) {\nchild.setVisible();\n},\nonProgress: function(child, t) {\n\n},\nonComplete: function(child) {\n\n}\n},\n\n// skipSpace: false,\n\n// minSizeEnable: false,\n\nfadeOutPage: undefined,  // Default: no fade-out-page animation\nfadeOutPage: function(children) {\nreturn eventEmitter;\nreturn promise;\n},\n\n},\n\nimages: {\n// key: {width, height}\n// key: {key, frame, width, height}\n},\n\nsprites: {\n// createCallback: 'sprite',\n// createCallback: function(scene, ...) { return gameObject; },\n\n// fade: 500,\n// fade: {mode: 'tint', time: 500},\n\n// viewportCoordinate: false,\n// viewportCoordinate: { viewport: new Phaser.Geom.Rectangle() },\n\n}, sounds: {\nbgm: {\ninitial: undefinied,\nloop: true,\nfade: 500\n},\nbgm2: {\ninitial: undefinied,\nloop: true,\nfade: 500\n}\n},\n\nclickTarget: this,  // This text player    \nnextPageInput: null,\n// ignoreNextPageInput: false,\n\ntext: undefined\n});\n

    or

    var txt = scene.add.rexTextPlayer(x, y, width, height, config);\n

    or

    var txt = scene.add.rexTextPlayer(x, y, config);\n

    Add textplayer from JSON

    var txt = scene.make.rexTextPlayer({\nx: 0,\ny: 0,\n\n// origin: {x: 0.5, y: 0.5},\n// fill: null,\n\nadd: true\n});\n
    "},{"location":"textplayer/#custom-class","title":"Custom class","text":""},{"location":"textplayer/#game-object-manager","title":"Game object manager","text":"
    txt.addGameObjectManager({\nname: goType,\ncreateGameObject: function(scene, ...) {\nreturn gameObject\n},\n\n// fade: 500,\n// fade: {mode: 'tint', time: 500},\n\n// viewportCoordinate: false,\n// viewportCoordinate: { viewport: new Phaser.Geom.Rectangle() }\n\n// symbols: undefined,  // { key:value },\n})\n
    "},{"location":"textplayer/#built-in-commands","title":"Built-in commands","text":"

    goType : name parameter in config of txt.addGameObjectManager method

    "},{"location":"textplayer/#typing-content","title":"Typing content","text":"
    txt.play(content);\n

    or

    txt.playPromise(content)\n.then(function(){\n// Typing content complete\n})\n
    "},{"location":"textplayer/#show-current-page","title":"Show current page","text":"
    txt.showPage();\n
    "},{"location":"textplayer/#typing-next-page","title":"Typing next page","text":"
    txt.typingNextPage();\n
    "},{"location":"textplayer/#ignore-next-page-input","title":"Ignore next page input","text":""},{"location":"textplayer/#pause","title":"Pause","text":""},{"location":"textplayer/#resume","title":"Resume","text":""},{"location":"textplayer/#typing-speed","title":"Typing speed","text":""},{"location":"textplayer/#time-scale","title":"Time scale","text":"

    Time scale of typing, typing animation, sprite animation and easing of sprite's properties.

    "},{"location":"textplayer/#status","title":"Status","text":""},{"location":"textplayer/#events","title":"Events","text":""},{"location":"textplayer/#tags-of-content","title":"Tags of content","text":""},{"location":"textplayer/#content","title":"Content","text":"

    These lines will be skipped :

    New line symbol '\\n' will be removed, use [r] to insert a new line character.

    "},{"location":"textplayer/#content-output-switch","title":"Content output switch","text":""},{"location":"textplayer/#content-output-enable","title":"Content output enable","text":""},{"location":"textplayer/#text-style","title":"Text style","text":""},{"location":"textplayer/#new-line","title":"New line","text":""},{"location":"textplayer/#page-break","title":"Page break","text":""},{"location":"textplayer/#image","title":"Image","text":"

    [img=key]

    "},{"location":"textplayer/#render-size","title":"Render size","text":""},{"location":"textplayer/#space","title":"Space","text":"

    [space=width]

    "},{"location":"textplayer/#typing-speed_1","title":"Typing speed","text":""},{"location":"textplayer/#sprite","title":"Sprite","text":""},{"location":"textplayer/#sound-effect","title":"Sound effect","text":""},{"location":"textplayer/#background-music","title":"Background music","text":""},{"location":"textplayer/#camera","title":"Camera","text":""},{"location":"textplayer/#wait-conditions","title":"Wait conditions","text":""},{"location":"textplayer/#custom-tag","title":"Custom tag","text":"

    Assume that adding a custom tag : [custom=10,20][/custom]

    "},{"location":"textplayer/#size","title":"Size","text":""},{"location":"textplayer/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"textplayer/#create-mask","title":"Create mask","text":"
    var mask = txt.createBitmapMask();\n

    See mask

    "},{"location":"textplayer/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"texttranslation/","title":"Translation","text":""},{"location":"texttranslation/#introduction","title":"Introduction","text":"

    Apply translated string (i18next) to text object, bbcode text object, tag text object, bitmap text object, or label game object

    "},{"location":"texttranslation/#live-demos","title":"Live demos","text":""},{"location":"texttranslation/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"texttranslation/#install-plugin","title":"Install plugin","text":""},{"location":"texttranslation/#load-minify-file","title":"Load minify file","text":""},{"location":"texttranslation/#import-plugin","title":"Import plugin","text":""},{"location":"texttranslation/#import-class","title":"Import class","text":""},{"location":"texttranslation/#initialize-i18next","title":"Initialize i18next","text":"
    scene.plugins.get('rexTextTranslation').initI18Next(scene, {\nlng: 'dev',\nns: 'translation',\n\n// resources: {\n//     'dev': {\n//         'translation': {\n//             key: value,  \n//         }\n//     }\n// }\n\n// debug: true,\n\n// backend: {\n//     loadPath: '',\n//     parse: function(data) { return JSON.parse(data); }\n// },\n})\n

    or

    i18next\n.use(Backend)\n.init(config, onComplete);\n

    See also Configuration Options, and Backend Options

    "},{"location":"texttranslation/#create-instance","title":"Create instance","text":"
    var translation = scene.plugins.get('rexTextTranslation').add(textGameObject, {\n// translationKey: '',\n// interpolation: {},\n\n// updateText: true,\n\n// setText: function(gameObject, text) { \n//     gameObject.setText(text); \n// }\n});\n
    "},{"location":"texttranslation/#set-translation-key","title":"Set translation key","text":"
    translation\n.setTranslationKey(key)\n.updateText()\n
    "},{"location":"texttranslation/#set-interpolation","title":"Set interpolation","text":""},{"location":"texttranslation/#update-text","title":"Update text","text":"

    Update text object via translationKey, and interpolation.

    translation.updateText()\n
    "},{"location":"texttranslation/#change-language","title":"Change language","text":"
    scene.plugins.get('rexTextTranslation').changeLanguage(language);\n// scene.plugins.get('rexTextTranslation').changeLanguage(language, onComplete);\n

    or

    i18next.changeLanguage(language, onComplete);\n

    All translation behavior will update text object after changing language.

    "},{"location":"texttranslation/#set-default-namespace","title":"Set default namespace","text":"
    scene.plugins.get('rexTextTranslation').setDefaultNamespace(namespace);\n

    or

    i18next.setDefaultNamespace(namespace);\n
    "},{"location":"texttranslation/#translate-string","title":"Translate string","text":"
    var result = scene.plugins.get('rexTextTranslation').t(translationKey, interpolation);\n

    or

    var result = i18next.t(translationKey, interpolation);\n
    "},{"location":"texttranslation/#events","title":"Events","text":""},{"location":"texttyping/","title":"Typing","text":""},{"location":"texttyping/#introduction","title":"Introduction","text":"

    Typing text on text object, bbcode text object, or tag text object.

    "},{"location":"texttyping/#live-demos","title":"Live demos","text":""},{"location":"texttyping/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"texttyping/#install-plugin","title":"Install plugin","text":""},{"location":"texttyping/#load-minify-file","title":"Load minify file","text":""},{"location":"texttyping/#import-plugin","title":"Import plugin","text":""},{"location":"texttyping/#import-class","title":"Import class","text":""},{"location":"texttyping/#create-instance","title":"Create instance","text":"
    var typing = scene.plugins.get('rexTextTyping').add(textGameObject, {\n// wrap: false,\n// speed: 333,       // typing speed in ms\n// typeMode: 0,      //0|'left-to-right'|1|'right-to-left'|2|'middle-to-sides'|3|'sides-to-middle'\n// setTextCallback: function(text, isLastChar, insertIdx){ return text; }  // callback before set-text\n// setTextCallbackScope: null,   \n});\n
    "},{"location":"texttyping/#start-typing","title":"Start typing","text":"
    typing.start(text);\n// typing.start(text, speed); \n
    "},{"location":"texttyping/#typing-more-text","title":"Typing more text","text":"
    typing.appendText(text);\n
    "},{"location":"texttyping/#stop-typing","title":"Stop typing","text":"
    typing.stop();\n// typing.stop(true);;  // stop and show all text\n
    "},{"location":"texttyping/#pauseresume-typing","title":"Pause/Resume typing","text":""},{"location":"texttyping/#set-typing-speed","title":"Set typing speed","text":"
    typing.setTypingSpeed(speed);  // speed in ms\n// typing.speed = speed;\n

    Set speed in typing event or setTextCallback to change typing speed of remaining text.

    "},{"location":"texttyping/#set-typing-mode","title":"Set typing mode","text":"
    typing.setTypeMode(mode);\n
    "},{"location":"texttyping/#events","title":"Events","text":""},{"location":"texttyping/#status","title":"Status","text":""},{"location":"textures/","title":"Textures","text":""},{"location":"textures/#introduction","title":"Introduction","text":"

    Textures cache, built-in object of phaser.

    "},{"location":"textures/#usage","title":"Usage","text":""},{"location":"textures/#image-texture","title":"Image texture","text":""},{"location":"textures/#get-pixel","title":"Get pixel","text":"
    var color = scene.textures.getPixel(x, y, key);\n// var color = scene.textures.getPixel(x, y, key, frame);\n

    Properties of color

    var alpha = scene.textures.getPixelAlpha(x, y, key);\n// var alpha = scene.textures.getPixelAlpha(x, y, key, frame);\n

    alpha : 0 ~ 255

    Return null if the coordinates were out of bounds.

    "},{"location":"textures/#generate-texture-from-array","title":"Generate texture from array","text":"
    var config = {\ndata: data,\n// 3x3:\n// [ '...',\n//   '...',\n//   '...' ]\npixelWidth: 1,    // pixel width of each data\npixelHeight: 1,   // pixel height of each data\npreRender: null,  // callback, function(canvas, ctx) {}\npostRender: null, // callback, function(canvas, ctx) {}\n\ncanvas: null,  // create a canvas if null\nresizeCanvas: true,\nclearCanvas: true\n};\nvar texture = scene.textures.generate(key, config);\n
    "},{"location":"textures/#has-key","title":"Has key","text":"
    var hasKey = scene.textures.exists(key);\n
    "},{"location":"textures/#remove-texture","title":"Remove texture","text":"

    Remove texture stored in texture cache.

    scene.textures.remove(key);\n
    "},{"location":"textures/#get-base64","title":"Get base64","text":"
    var s = scene.textures.getBase64(key);  // type= 'image/png', encoderOptions= 0.92\n// var s = scene.textures.getBase64(key, frame, type, encoderOptions);\n
    "},{"location":"textures/#texture","title":"Texture","text":""},{"location":"textures/#get-texture","title":"Get texture","text":"
    var texture = scene.textures.get(key);\n
    "},{"location":"textures/#has-frame","title":"Has frame","text":"
    var hasFrame = texture.has(frameName);\n
    "},{"location":"textures/#add-frame","title":"Add frame","text":"
    var frame = texture.add(frameName, sourceIndex, x, y, width, height);\n
    "},{"location":"textures/#remove-frame","title":"Remove frame","text":"
    var removed = texture.remove(frameName);\n
    "},{"location":"textures/#default-textures","title":"Default textures","text":""},{"location":"textures/#get-key-list-of-all-textures","title":"Get key list of all textures","text":"
    var keys = scene.textures.getTextureKeys();\n
    "},{"location":"textures/#frame-object","title":"Frame object","text":""},{"location":"textures/#get-frame","title":"Get frame","text":"
    var frame = scene.textures.getFrame(key, frame);\n
    "},{"location":"textures/#properties","title":"Properties","text":""},{"location":"textures/#add-atlas","title":"Add atlas","text":"
    scene.textures.addAtlas(key, HTMLImageElement, data);\n// scene.textures.addAtlas(key, HTMLImageElement, data, dataSource);\n

    or

    scene.textures.addAtlas(undefined, texture, data);\n// scene.textures.addAtlas(undefined, texture, data, dataSource);\n
    "},{"location":"textures/#add-sprite-sheet","title":"Add sprite sheet","text":"
    scene.textures.addSpriteSheet(key, HTMLImageElement, config);\n// scene.textures.addAtlas(key, HTMLImageElement, config, dataSource);\n

    or

    scene.textures.addSpriteSheet(undefined, texture, config);\n// scene.textures.addSpriteSheet(undefined, texture, config, dataSource);\n
    "},{"location":"textures/#events","title":"Events","text":""},{"location":"tiledmapdata/","title":"Tiled map data","text":""},{"location":"tiledmapdata/#introduction","title":"Introduction","text":"

    Parses a Tiled JSON object into a new MapData object.

    "},{"location":"tiledmapdata/#usage","title":"Usage","text":"
    var mapData = Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled(name, json, insertNull);\n
    "},{"location":"tiledmapdata/#map-data","title":"Map data","text":""},{"location":"tiledmapdata/#map-type","title":"Map type","text":"
    var mapType = mapData.orientation;\n
    "},{"location":"tiledmapdata/#map-size","title":"Map size","text":""},{"location":"tiledmapdata/#tile-size","title":"Tile size","text":"
    var tileWidth = mapData.tileWidth;\nvar tileHeight = mapData.tileHeight;\n
    "},{"location":"tiledmapdata/#layer","title":"Layer","text":"
    var layers = mapData.layers;\n
    mapData.layers.forEach(function(layer){\nvar name = layer.name;\n\n\nvar alpha = layer.alpha;\nvar visible = layer.visible;\n\nvar x = layer.x;\nvar y = layer.y;\nvar width = layer.width;\nvar height = layer.height;\nvar data = layer.data;\n\nlayer.data.forEach(function(gid, index){\nvar tileX = index % width;\nvar tileY = Math.floor(index / width);\nif (gid === -1) { // Empty\n\n} else {\n\n}\n})\n})\n
    "},{"location":"tilemap/","title":"Tile map","text":""},{"location":"tilemap/#introduction","title":"Introduction","text":"

    Display of tiles map, built-in game object of phaser.

    "},{"location":"tilemap/#usage","title":"Usage","text":""},{"location":"tilemap/#hierarchy","title":"Hierarchy","text":"
    graph TB\n\ntilemap --> layerA[\"layerA<br>(Game object)\"]\ntilemap --> layerB\n\nlayerA --> tilesA[\"tiles<br>(layer.data[x][y])\"]\nlayerB --> tilesB[\"tiles\"]
    "},{"location":"tilemap/#load-tile-map","title":"Load tile map","text":"
    scene.load.tilemapTiledJSON(key, url);   // JSON\nscene.load.tilemapCSV(key, url);         // CSV\n
    "},{"location":"tilemap/#add-tile-map-object","title":"Add tile map object","text":"
    1. Create map
    2. Add tileset image
      var tileset = map.addTilesetImage(tilesetName, key); // key: texture key\n// var tileset = map.addTilesetImage(tilesetName);  // key = tilesetName\n// var tileset = map.addTilesetImage(tilesetName, key, tileWidth, tileHeight, tileMargin, tileSpacing, gid, tileOffset);\n
    3. Create layer
    4. Create game objects (optional)
    "},{"location":"tilemap/#map","title":"Map","text":""},{"location":"tilemap/#map-size","title":"Map size","text":"
    var mapWidth = map.width;\nvar mapHeight = map.height;\n
    "},{"location":"tilemap/#tile-size","title":"Tile size","text":""},{"location":"tilemap/#tileworld-position","title":"Tile/world position","text":""},{"location":"tilemap/#tile-at-world-xy","title":"Tile at world XY","text":"
    var hasTile = map.hasTileAtWorldXY(worldX, worldY);\n

    or

    var hasTile = map.hasTileAtWorldXY(worldX, worldY, camera, layer);\n
    "},{"location":"tilemap/#draw-on-graphics","title":"Draw on graphics","text":"
    map.renderDebug(graphics);\n

    or

    map.renderDebug(graphics, {\ntileColor: new Phaser.Display.Color(105, 210, 231, 150),         // null\ncollidingTileColor: new Phaser.Display.Color(243, 134, 48, 200), // null\nfaceColor: new Phaser.Display.Color(40, 39, 37, 150)             // null\n});\n

    or

    map.renderDebug(graphics, styleConfig, layer);\n
    "},{"location":"tilemap/#layer","title":"Layer","text":"

    A Game Object that renders LayerData from a map when used in combination with one or more tileset.

    "},{"location":"tilemap/#get-layer","title":"Get layer","text":""},{"location":"tilemap/#render-pipeline","title":"Render pipeline","text":"
    layer.setPipeline(pipelineName);\n
    layer.setPostPipeline(pipelineName);\n

    See Render pipeline section of Game object.

    "},{"location":"tilemap/#render-order","title":"Render order","text":"
    layer.setRenderOrder(renderOrder);\n
    "},{"location":"tilemap/#fill-tiles","title":"Fill tiles","text":""},{"location":"tilemap/#randomize","title":"Randomize","text":""},{"location":"tilemap/#copy-tiles","title":"Copy tiles","text":""},{"location":"tilemap/#put-tile-at","title":"Put tile at","text":""},{"location":"tilemap/#put-tiles-at","title":"Put tiles at","text":""},{"location":"tilemap/#replace-tiles","title":"Replace tiles","text":""},{"location":"tilemap/#swap-tiles","title":"Swap tiles","text":""},{"location":"tilemap/#shuffle-tiles","title":"Shuffle tiles","text":""},{"location":"tilemap/#shader-effects","title":"Shader effects","text":"

    `layer`` support postFX effects

    Note

    No preFX effect support

    "},{"location":"tilemap/#tile","title":"Tile","text":""},{"location":"tilemap/#get-tile","title":"Get tile","text":"
    var tile = map.getTileAt(tileX, tileY);\n// var tile = map.getTileAtWorldXY(worldX, worldY);\n

    or

    var tile = map.getTileAt(tileX, tileY, true, layer);  // Return a Tile object with an index of -1 for empty tile\n// var tile = map.getTileAtWorldXY(worldX, worldY, true, camera, layer);\n
    "},{"location":"tilemap/#get-tiles-within-a-rectangle-area","title":"Get tiles within a rectangle area","text":"
    var tiles = map.getTilesWithin(tileX, tileY, width, height);\n

    or

    var tiles = map.getTilesWithin(tileX, tileY, width, height, {\n// isNotEmpty: false,\n// isColliding: false,\n// hasInterestingFace: false\n}, layer);\n
    "},{"location":"tilemap/#get-tiles-within-world-xy","title":"Get tiles within world XY","text":"
    var tiles = map.getTilesWithinWorldXY(worldX, worldY, width, height);\n

    or

    var tiles = map.getTilesWithinWorldXY(worldX, worldY, width, height,  {\n// isNotEmpty: false,\n// isColliding: false,\n// hasInterestingFace: false\n}, camera, layer);\n
    "},{"location":"tilemap/#get-tiles-within-shape","title":"Get tiles within shape","text":"
    vat tiles = map.getTilesWithinShape(shape);\n

    or

    vat tiles = map.getTilesWithinShape(shape, {\n// isNotEmpty: false,\n// isColliding: false,\n// hasInterestingFace: false\n}, camera, layer);\n

    Shape:

    "},{"location":"tilemap/#for-each-tile-in-layer","title":"For each tile in layer","text":"
    map.forEachTile(function(tile, index, tileArray) { /* ... */ }, context);\n

    or

    map.forEachTile(function(tile, index, tileArray) { /* ... */ }, context,\ntileX, tileY, width, height, {\n// isNotEmpty: false,\n// isColliding: false,\n// hasInterestingFace: false\n}, layer);\n
    "},{"location":"tilemap/#tile-index","title":"Tile index","text":""},{"location":"tilemap/#tile-position","title":"Tile position","text":"
    var x = tile.x;\nvar y = tile.y;\n
    "},{"location":"tilemap/#tile-corners","title":"Tile corners","text":"
    var points = map.getTileCorners(tileX, tileY, camera, layer);\n
    "},{"location":"tilemap/#alpha","title":"Alpha","text":""},{"location":"tilemap/#visible","title":"Visible","text":""},{"location":"tilemap/#flip","title":"Flip","text":""},{"location":"tilemap/#bounds","title":"Bounds","text":""},{"location":"tilemap/#properties","title":"Properties","text":"
    var properties = tile.properties;  // object or null\nvar value = properties[key];\n
    tile.properties[key] = value;\n
    "},{"location":"tilemap/#collision","title":"Collision","text":""},{"location":"tilemap/#enable-collision","title":"Enable collision","text":""},{"location":"tilemap/#disable-collision","title":"Disable collision","text":""},{"location":"tilemap/#get-collision-group","title":"Get collision group","text":"
    var collisionGroup = tile.getCollisionGroup();\n

    or

    var collisionGroup = tileset.getTileCollisionGroup(tile.index); // array of collision shapes, or null\n

    Types of collision shape (collisionGroup.objects[i])

    "},{"location":"tilemap/#arcade-collision","title":"Arcade collision","text":"
    scene.physics.add.collider(arcadeGO, layer);\n

    or, in update stage:

    scene.physics.world.collide(arcadeGO, layer);\n

    See Collision section of Arcade-world.

    "},{"location":"tilemap/#matter-collision","title":"Matter collision","text":""},{"location":"tilemap/#tileset","title":"Tileset","text":""},{"location":"tilemap/#get-tileset","title":"Get tileset","text":"
    var tileset = map.getTileset(name);\n
    "},{"location":"tilemap/#change-texture-of-tileset","title":"Change texture of tileset","text":"
    var texture = scene.sys.textures.get(key);\ntileset.setImage(texture);\n
    "},{"location":"tilesprite/","title":"Tile sprite","text":""},{"location":"tilesprite/#introduction","title":"Introduction","text":"

    Display of repeating texture, built-in game object of phaser.

    "},{"location":"tilesprite/#usage","title":"Usage","text":""},{"location":"tilesprite/#load-texture","title":"Load texture","text":"
    scene.load.image(key, url);\n

    Reference: load image

    "},{"location":"tilesprite/#add-tile-sprite-object","title":"Add tile sprite object","text":"
    var image = scene.add.tileSprite(x, y, width, height, textureKey);\n

    Add tile sprite from JSON

    var image = scene.make.tileSprite({\nx: 0,\ny: 0,\nwidth: 512,\nheight: 512,\nkey: '',\n\n// angle: 0,\n// alpha: 1\n// flipX: true,\n// flipY: true,\n// scale : {\n//    x: 1,\n//    y: 1\n//},\n// origin: {x: 0.5, y: 0.5},\n\nadd: true\n});\n
    "},{"location":"tilesprite/#custom-class","title":"Custom class","text":""},{"location":"tilesprite/#properties-of-tiles","title":"Properties of tiles","text":""},{"location":"tilesprite/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"tilesprite/#create-mask","title":"Create mask","text":"
    var mask = image.createBitmapMask();\n

    See mask

    "},{"location":"tilesprite/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"timeline/","title":"Timeline","text":""},{"location":"timeline/#introduction","title":"Introduction","text":"

    Schedule events to happen at specific times in the future, built-in object of phaser.

    "},{"location":"timeline/#usage","title":"Usage","text":""},{"location":"timeline/#create-timeline","title":"Create timeline","text":"
    var timeline = scene.add.timeline([    {\nat: 0,\nin:\nfrom:\n\nset: {\nkey: value,\n},\n\ntween: {\ntargets: gameObject,\nalpha: 1,\nease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\nrepeat: 0,            // -1: infinity\nyoyo: false\n},\n\nrun(target){ },\n\nsound: '',\n\nevent: '',\n\n// target: this,\n\n// once: false,\n// stop: false,\n},\n\n// ...\n])\n

    The Timeline always starts paused.

    "},{"location":"timeline/#start","title":"Start","text":"
    timeline.play();\n

    Restart

    timeline.play(true);\n
    "},{"location":"timeline/#stop","title":"Stop","text":"
    timeline.stop();\n
    "},{"location":"timeline/#pause-resume","title":"Pause / Resume","text":"
    timeline.pause();\n// timeline.paused = true;\n
    timeline.resume();\n// timeline.paused = false;\n
    "},{"location":"timeline/#is-playing","title":"Is playing","text":"

    Timeline is currently playing, not paused or not complete.

    var isPlaying = timeline.isPlaying()\n
    "},{"location":"timeline/#add-event","title":"Add event","text":"
    timeline.add(config);\n

    or

    timeline.add([config0, config1, ...]);\n
    "},{"location":"timeline/#clear-all-events","title":"Clear all events","text":"
    timeline.clear();\n
    "},{"location":"timeline/#destroy","title":"Destroy","text":"

    Also remove updating.

    timeline.destroy();\n
    "},{"location":"timer/","title":"Timer","text":""},{"location":"timer/#introduction","title":"Introduction","text":"

    Execute callback when time-out, built-in object of phaser.

    "},{"location":"timer/#usage","title":"Usage","text":""},{"location":"timer/#start-timer","title":"Start timer","text":"

    Note

    Throw error message if delay : 0 with (repeat > 0 or loop: true)

    "},{"location":"timer/#pauseresume","title":"Pause/resume","text":""},{"location":"timer/#stop","title":"Stop","text":""},{"location":"timer/#time-scale","title":"Time scale","text":""},{"location":"timer/#other-properties","title":"Other properties","text":""},{"location":"tintrgb/","title":"TintRGB","text":""},{"location":"tintrgb/#introduction","title":"Introduction","text":"

    Attach tintR, tintG, tintB, and tintGray properties to a game object.

    Note

    This behavior will override default tint property

    "},{"location":"tintrgb/#live-demos","title":"Live demos","text":""},{"location":"tintrgb/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"tintrgb/#install-plugin","title":"Install plugin","text":""},{"location":"tintrgb/#load-minify-file","title":"Load minify file","text":""},{"location":"tintrgb/#import-plugin","title":"Import plugin","text":""},{"location":"tintrgb/#import-method","title":"Import method","text":""},{"location":"tintrgb/#attach-properties","title":"Attach properties","text":"
    scene.plugins.get('rexTintRGB').add(gameObject, tintRGB);\ngameObject.tintGray = 128;\n// gameObject.tintR = 128;\n// gameObject.tintG = 128;\n// gameObject.tintB = 128;\n
    "},{"location":"tintrgb/#fade","title":"Fade","text":"
    scene.tweens.add({\ntargets: gameObject,\ntintR: 0,\ntintG: 0,\ntintB: 0,\n// tintGray: 0,\nduration: 3000\n})\n
    "},{"location":"tools/","title":"Tools","text":""},{"location":"tools/#texture-atlas","title":"Texture atlas","text":""},{"location":"tools/#texture-packer","title":"Texture-packer","text":"

    Texture-packer

    "},{"location":"tools/#free-texture-packer","title":"Free texture packer","text":"

    Free texture packer, Web app

    "},{"location":"tools/#leshy-spritesheet-tool","title":"Leshy SpriteSheet Tool","text":"

    Leshy SpriteSheet Tool

    Export to JSON-TP-Hash

    "},{"location":"tools/#aseprite","title":"Aseprite","text":"

    Aseprite

    1. Go to \"File - Export Sprite Sheet\"
    2. On the Layout tab:
    3. Set the \"Sheet type\" to \"Packed\"
    4. Set the \"Constraints\" to \"None\"
    5. Check the \"Merge Duplicates\" checkbox
    6. On the Sprite tab:
      1. Set \"Layers\" to \"Visible layers\"
      2. Set \"Frames\" to \"All frames\", unless you only wish to export a sub-set of tags
    7. On the Borders tab:
      1. Check the \"Trim Sprite\" and \"Trim Cells\" options
      2. Ensure \"Border Padding\", \"Spacing\" and \"Inner Padding\" are all > 0 (1 is usually enough)
    8. On the Output tab:
      1. Check \"Output File\", give your image a name and make sure you choose \"png files\" as the file type
      2. Check \"JSON Data\" and give your json file a name
      3. The JSON Data type can be either a Hash or Array, Phaser doesn't mind.
      4. Make sure \"Tags\" is checked in the Meta options
      5. In the \"Item Filename\" input box, make sure it says just \"{frame}\" and nothing more.
    9. Click export

    Tested with Aseprite 1.2.25

    "},{"location":"tools/#atlas-packer","title":"Atlas-packer","text":""},{"location":"tools/#animation","title":"Animation","text":""},{"location":"tools/#bitmap-font","title":"Bitmap font","text":""},{"location":"touchevents/","title":"Touch events","text":""},{"location":"touchevents/#introduction","title":"Introduction","text":"

    Built-in touch/mouse events of phaser.

    Note

    No touch input event fired in preload stage.

    "},{"location":"touchevents/#usage","title":"Usage","text":""},{"location":"touchevents/#quick-start","title":"Quick start","text":"

    Reference : Properties of point

    "},{"location":"touchevents/#register-interactive","title":"Register interactive","text":"

    Call gameObject.setInteractive(...) to register touch input of Game Object before listening touching events.

    Pixel perfect hit-testing

    This is an expensive process, should only be enabled on Game Objects that really need it.

    "},{"location":"touchevents/#disable-interactive","title":"Disable interactive","text":""},{"location":"touchevents/#top-only","title":"Top only","text":"

    When set to true this Input Plugin will emulate DOM behavior by only emitting events from the top-most Game Objects in the Display List. If set to false it will emit events from all Game Objects below a Pointer, not just the top one.

    Each scene can has its own scene.input.topOnly setting.

    "},{"location":"touchevents/#touch-events","title":"Touch events","text":"

    Trigger these events from top scene to bottom scene.

    1. Events on touched Game object
      gameObject.on('pointerdown', function(pointer, localX, localY, event){ /* ... */ }, scope);\ngameObject.on('pointerup', function(pointer, localX, localY, event){ /* ... */ }, scope);\ngameObject.on('pointermove', function(pointer, localX, localY, event){ /* ... */ }, scope);\ngameObject.on('pointerover', function(pointer, localX, localY, event){ /* ... */ }, scope);\ngameObject.on('pointerout', function(pointer, event){ /* ... */ }, scope);\n
    2. Event on input plugin for each touched Game object
      scene.input.on('gameobjectdown', function(pointer, gameObject, event){ /* ... */ }, scope);\nscene.input.on('gameobjectup', function(pointer, gameObject, event){ /* ... */ }, scope);\nscene.input.on('gameobjectmove', function(pointer, gameObject, event){ /* ... */ }, scope);\nscene.input.on('gameobjectover', function(pointer, gameObject, event){ /* ... */ }, scope);\nscene.input.on('gameobjectout', function(pointer, gameObject, event){ /* ... */ }, scope);\n
    3. Events to get all touched Game Objects
      scene.input.on('pointerdown', function(pointer, currentlyOver){ /* ... */ }, scope);\nscene.input.on('pointerdownoutside', function(pointer){ /* ... */ }, scope);\nscene.input.on('pointerup', function(pointer, currentlyOver){ /* ... */ }, scope);\nscene.input.on('pointerupoutside', function(pointer){ /* ... */ }, scope);\nscene.input.on('pointermove', function(pointer, currentlyOver){ /* ... */ }, scope);\nscene.input.on('pointerover', function(pointer, justOver){ /* ... */ }, scope);\nscene.input.on('pointerout', function(pointer, justOut){ /* ... */ }, scope);\nscene.input.on('gameout', function(timeStamp, domEvent){ /* ... */ }, scope);\nscene.input.on('gameover', function(timeStamp, domEvent){ /* ... */ }, scope);\n
    "},{"location":"touchevents/#game-canvas","title":"Game canvas","text":"
    scene.input.on('gameout', function(timeStamp, event){ /* ... */ }, scope);\nscene.input.on('gameover', function(timeStamp, event){ /* ... */ }, scope);\n
    "},{"location":"touchevents/#dragging","title":"Dragging","text":""},{"location":"touchevents/#enable-dragging","title":"Enable dragging","text":""},{"location":"touchevents/#disable-dragging","title":"Disable dragging","text":""},{"location":"touchevents/#dragging-events","title":"Dragging events","text":"
    gameObject.on('dragstart', function(pointer, dragX, dragY){ /* ... */ }, scope);\ngameObject.on('drag', function(pointer, dragX, dragY){ /* ... */ }, scope);\ngameObject.on('dragend', function(pointer, dragX, dragY, dropped){ /* ... */ }, scope);\n
    scene.input.on('dragstart', function(pointer, gameObject){ /* ... */ }, scope);\nscene.input.on('drag', function(pointer, gameObject, dragX, dragY){ /* ... */ }, scope);\nscene.input.on('dragend', function(pointer, gameObject, dropped){ /* ... */ }, scope);\n
    "},{"location":"touchevents/#dragging-properties","title":"Dragging properties","text":"
    scene.input.dragDistanceThreshold = 16;\nscene.input.dragTimeThreshold = 500;\n
    "},{"location":"touchevents/#drop-zone","title":"Drop zone","text":""},{"location":"touchevents/#enable-drop-zone","title":"Enable drop zone","text":""},{"location":"touchevents/#disable-drop-zone","title":"Disable drop zone","text":"
    gameObject.input.dropZone = false;\n
    "},{"location":"touchevents/#dropping-events","title":"Dropping events","text":"
    gameObject.on('drop', function(pointer, target){ /* ... */ }, scope);\n\ngameObject.on('dragenter', function(pointer, target){ /* ... */ }, scope);\ngameObject.on('dragover', function(pointer, target){ /* ... */ }, scope);\ngameObject.on('dragleave', function(pointer, target){ /* ... */ }, scope);\n
    scene.input.on('drop', function(pointer, gameObject, target){ /* ... */ }, scope);\n\nscene.input.on('dragenter', function(pointer, gameObject, target){ /* ... */ }, scope);\nscene.input.on('dragover', function(pointer, gameObject, target){ /* ... */ }, scope);\nscene.input.on('dragleave', function(pointer, gameObject, target){ /* ... */ }, scope);\n
    "},{"location":"touchevents/#first-event-of-all","title":"First event of all","text":"
    scene.input.on('preupdate', function() { /* ... */ }, scope);\n
    "},{"location":"touchevents/#single-touch","title":"Single touch","text":""},{"location":"touchevents/#pointer","title":"Pointer","text":"
    var pointer = scene.input.activePointer;\n
    "},{"location":"touchevents/#multi-touch","title":"Multi-touch","text":""},{"location":"touchevents/#amount-of-active-pointers","title":"Amount of active pointers","text":"

    Set amount of active pointers in game configuration

    var config = {\n// ...\ninput: {\nactivePointers: 1,\n// ...\n}\n};\nvar game = new Phaser.Game(config);\n

    Or add pointers in run-time.

    scene.input.addPointer(num);  // total points = num + 1\n
    "},{"location":"touchevents/#pointers","title":"Pointers","text":""},{"location":"touchevents/#pointer_1","title":"Pointer","text":""},{"location":"touchevents/#input-object","title":"Input object","text":""},{"location":"touchevents/#smooth","title":"Smooth","text":"

    Get touch position from interpolation of previous touch position and current touch position.

    Touch-position = (current-touch-position * smooth-factor) + (previous-touch-position * (1 - smooth-factor))\n
    1. Set smooth factor. In game configuration
      var config = {\n// ....\ninput: {\nsmoothFactor: 0\n}\n}\n
    2. Get touch position
      var x = pointer.x;\nvar y = pointer.y;\nvar worldX = pointer.worldX;\nvar worldY = pointer.worldY;\n
    "},{"location":"touchevents/#debug","title":"Debug","text":""},{"location":"touchevents/#poll-rate","title":"Poll rate","text":""},{"location":"toucheventstop/","title":"Touch event stop","text":""},{"location":"toucheventstop/#introduction","title":"Introduction","text":"

    Stop touch events propagation.

    "},{"location":"toucheventstop/#live-demos","title":"Live demos","text":""},{"location":"toucheventstop/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"toucheventstop/#install-plugin","title":"Install plugin","text":""},{"location":"toucheventstop/#load-minify-file","title":"Load minify file","text":""},{"location":"toucheventstop/#import-plugin","title":"Import plugin","text":""},{"location":"toucheventstop/#import-method","title":"Import method","text":""},{"location":"toucheventstop/#create-instance","title":"Create instance","text":"
    var touchEventStop = scene.plugins.get('rexTouchEventStop').add(gameObject, {\n// hitAreaMode: 0,    // 0|1|'default'|'fullWindow'\n// enable: true\n});\n
    "},{"location":"toucheventstop/#enable","title":"Enable","text":""},{"location":"touchstate/","title":"Touch state","text":""},{"location":"touchstate/#introduction","title":"Introduction","text":"

    Store current touch input properties.

    "},{"location":"touchstate/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"touchstate/#install-plugin","title":"Install plugin","text":""},{"location":"touchstate/#load-minify-file","title":"Load minify file","text":""},{"location":"touchstate/#import-plugin","title":"Import plugin","text":""},{"location":"touchstate/#import-class","title":"Import class","text":""},{"location":"touchstate/#create-instance","title":"Create instance","text":"
    var touchState = scene.plugins.get('rexTouchState').add(gameObject, {\n// enable: true,\n});\n
    "},{"location":"touchstate/#properties","title":"Properties","text":""},{"location":"touchstate/#events","title":"Events","text":""},{"location":"touchstate/#enable","title":"Enable","text":""},{"location":"transitionimage/","title":"Transition image","text":""},{"location":"transitionimage/#introduction","title":"Introduction","text":"

    Transit texture to another one. A containerLite game object with 2 image game objects.

    "},{"location":"transitionimage/#live-demos","title":"Live demos","text":""},{"location":"transitionimage/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"transitionimage/#install-plugin","title":"Install plugin","text":""},{"location":"transitionimage/#load-minify-file","title":"Load minify file","text":""},{"location":"transitionimage/#import-plugin","title":"Import plugin","text":""},{"location":"transitionimage/#import-class","title":"Import class","text":""},{"location":"transitionimage/#create-instance","title":"Create instance","text":"

    var image = scene.add.rexTransitionImage(x, y, texture, frame, {\n// dir: 0,\n// onStart: function(parent, currentImage, nextImage, t) { },\n// onStartScope: undefined,\n// onProgress: function(parent, currentImage, nextImage, t) { },\n// onProgressScope: undefined,\n// onComplete: function(parent, currentImage, nextImage, t) { },\n// onCompleteScope: undefined,    \n// duration: 1000,\n// ease: 'Linear',\n// mask: undefined,\n});\n
    or

    var image = scene.add.rexTransitionImage(x, y, texture, frame, {\n// x: 0,\n// y: 0,\n// key: \n// frame: \n// dir: 0,\n// onStart: function(parent, currentImage, nextImage, t) { },\n// onStartScope: undefined,\n// onProgress: function(parent, currentImage, nextImage, t) { },\n// onProgressScope: undefined,\n// onComplete: function(parent, currentImage, nextImage, t) { },\n// onCompleteScope: undefined,    \n// duration: 1000,\n// ease: 'Linear',\n// mask: undefined,\n});\n

    If onStart, onProgress and onComplete are all undefined, it will use cross-fade as default transition callbacks.

    Add transitionimage from JSON

    var image = scene.make.rexTransitionImage({\nx: 0,\ny: 0,\nkey: null,\nframe: null,\n\n// dir: 0,\n// onStart: function(parent, currentImage, nextImage, t) { },\n// onStartScope: undefined,\n// onProgress: function(parent, currentImage, nextImage, t) { },\n// onProgressScope: undefined,\n// onComplete: function(parent, currentImage, nextImage, t) { },\n// onCompleteScope: undefined,\n// duration: 1000,\n// ease: 'Linear',\n// mask: undefined,\n\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"transitionimage/#custom-class","title":"Custom class","text":""},{"location":"transitionimage/#transit","title":"Transit","text":"
    image\n// .setTransitionDirection(dir)\n// .setTransitionStartCallback(onStart, onStartScope)\n// .setTransitionProgressCallback(onProgress, onProgressScope)\n// .setTransitionCompleteCallback(onComplete, onCompleteScope)\n// .setDuration(duration)\n// .setEaseFunction(ease)\n// .setMaskEnable(enable)\n.transit(texture, frame)\n

    or

    image.transit({\nkey: undefined,\n// frame: undefined,\n// dir: 0,\n// onStart: function(parent, currentImage, nextImage, t) { },\n// onStartScope: undefined,\n// onProgress: function(parent, currentImage, nextImage, t) { },\n// onProgressScope: undefined,\n// onComplete: function(parent, currentImage, nextImage, t) { },\n// onCompleteScope: undefined,\n// duration: 1000,\n// ease: 'Linear',\n// mask: undefined,\n})\n

    Fire 'complete' event when transition completed.

    "},{"location":"transitionimage/#register-transtion-mode","title":"Register transtion mode","text":""},{"location":"transitionimage/#current-texture","title":"Current texture","text":"
    var textureKey = image.texture.key;\nvar frameName = image.frame.name;\n
    "},{"location":"transitionimage/#transition-callbacks","title":"Transition callbacks","text":""},{"location":"transitionimage/#transition-duration","title":"Transition duration","text":""},{"location":"transitionimage/#ease-function","title":"Ease function","text":""},{"location":"transitionimage/#mask","title":"Mask","text":""},{"location":"transitionimage/#grid-cut","title":"Grid cut","text":"

    Grid cut texture to cells.

    Cut cell image game objects will be set to invisible after transition complete.

    "},{"location":"transitionimage/#pauseresume","title":"Pause/Resume","text":"
    image.pause();\n
    image.resume();\n
    "},{"location":"transitionimage/#stop","title":"Stop","text":"
    image.stop();\n

    Also will fire 'complete' event.

    "},{"location":"transitionimage/#events","title":"Events","text":""},{"location":"transitionimage/#flip","title":"Flip","text":""},{"location":"transitionimage/#use-cases","title":"Use cases","text":""},{"location":"transitionimage/#internal-image-game-object","title":"Internal image game object","text":""},{"location":"transitionimage/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"transitionimage/#shader-effects","title":"Shader effects","text":"

    Internal image game objects (image.currentImage, image.nextImage) support preFX and postFX effects

    "},{"location":"transitionimagepack/","title":"Transition image pack","text":""},{"location":"transitionimagepack/#introduction","title":"Introduction","text":"

    Transit texture to another one, with some pre-build effects, extended from TransitionImage

    "},{"location":"transitionimagepack/#live-demos","title":"Live demos","text":""},{"location":"transitionimagepack/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"transitionimagepack/#install-plugin","title":"Install plugin","text":""},{"location":"transitionimagepack/#load-minify-file","title":"Load minify file","text":""},{"location":"transitionimagepack/#import-plugin","title":"Import plugin","text":""},{"location":"transitionimagepack/#import-class","title":"Import class","text":""},{"location":"transitionimagepack/#create-instance","title":"Create instance","text":"

    var image = scene.add.rexTransitionImagePack(x, y, texture, frame, {   // duration: 1000,\n});\n
    or

    var image = scene.add.rexTransitionImagePack(x, y, texture, frame, {\n// x: 0,\n// y: 0,\n// key: \n// frame: \n// duration: 1000,\n});\n

    Add transitionimage from JSON

    var image = scene.make.rexTransitionImagePack({\nx: 0,\ny: 0,\nkey: null,\nframe: null,\n\n// duration: 1000,\n\n// origin: {x: 0.5, y: 0.5},\nadd: true\n});\n
    "},{"location":"transitionimagepack/#custom-class","title":"Custom class","text":""},{"location":"transitionimagepack/#transit","title":"Transit","text":"
    image\n// .setDuration(duration)\n// .setEaseFunction(ease)\n.transit(texture, frame, modeName)\n

    or

    image.transit({\nkey: undefined,\n// frame: undefined,\n// duration: 1000,\n// ease: 'Linear',\nmode: modeName\n})\n
    "},{"location":"transitionimagepack/#current-texture","title":"Current texture","text":"
    var textureKey = image.texture.key;\nvar frameName = image.frame.name;\n
    "},{"location":"transitionimagepack/#transition-duration","title":"Transition duration","text":""},{"location":"transitionimagepack/#ease-function","title":"Ease function","text":""},{"location":"transitionimagepack/#pauseresume","title":"Pause/Resume","text":"
    image.pause();\n
    image.resume();\n
    "},{"location":"transitionimagepack/#stop","title":"Stop","text":"
    image.stop();\n

    Also will fire 'complete' event.

    "},{"location":"transitionimagepack/#events","title":"Events","text":""},{"location":"transitionimagepack/#flip","title":"Flip","text":""},{"location":"transitionimagepack/#other-properties","title":"Other properties","text":"

    See transition image object, game object

    "},{"location":"tween-timeline/","title":"Timeline","text":""},{"location":"tween-timeline/#introduction","title":"Introduction","text":"

    Chain a series of tween tasks, built-in object of phaser.

    "},{"location":"tween-timeline/#usage","title":"Usage","text":""},{"location":"tween-timeline/#create-timeline-then-chain-tween-tasks","title":"Create timeline, then chain tween tasks","text":"
    1. Create timeline
      var timeline = scene.tweens.createTimeline();\n
    2. Add tween task configuration
      timeline.add({\ntargets: gameObject,\nx: 400,               // '+=100'\nease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\nrepeat: 0,            // -1: infinity\nyoyo: false,\n// offset: '-=500',   // starts 500ms before previous tween ends\n})\n
    3. Start tween tasks
      timeline.play();\n
    "},{"location":"tween-timeline/#create-timeline-included-tween-tasks","title":"Create timeline, included tween tasks","text":"
    var timeline = scene.tweens.timeline({\ntargets: gameObject,\nease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\neaseParams:\n\nduration: 1000,\ndelay: 0,\nloop: 0,\nhold: 0,\nrepeat: 0,\nloopDelay: 0,\ncompleteDelay: 0,\nyoyo: false,\n\npaused: false,\nuseFrames: false,\nflipX: false,\nflipY: false,\n\n\ntweens: [\n{\ntargets: gameObject,\nx: 400,               // '+=100'\n// ease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\n// duration: 1000,\n// repeat: 0,            // -1: infinity\n// yoyo: false,\n// offset: '-=500',   // starts 500ms before previous tween ends\n},\n// ...\n],\n\n\ncallbackScope: timeline,\n\nonStart: function () {},\nonStartScope: onStartParams: [],\n\nonUpdate: function () {},\nonUpdateScope:\nonUpdateParams: [],\n\nonLoop: function () {},\nonLoopScope:\nonLoopParams: [],\n\nonYoyo: function () {},\nonYoyoScope:\nonYoyoParams: [],\n\nonComplete: function () {},\nonCompleteScope:\nonCompleteParams: [],\n\ntotalDuration: 0,\n\n});\n
    "},{"location":"tween/","title":"Tween task","text":""},{"location":"tween/#introduction","title":"Introduction","text":"

    Change properties by tween equations, built-in object of phaser.

    "},{"location":"tween/#usage","title":"Usage","text":""},{"location":"tween/#create-tween-task","title":"Create tween task","text":"
    var tween = scene.tweens.add({\ntargets: gameObject,\nx: 1,\n// x: '+=1',\n// x: '-=1',\n// x: '*=1',\n// x: '/=1',\n// x: 'random(0.25, 0.75)',\n// x: 'int(10, 100)',\n// x: [100, 300, 200, 600],\n// x: { from: 0, to: 1 },\n// x: { start: 0, to: 1 },  \n// x: { start: value0, from: value1, to: value2 },  \n// x: {\n//      getActive: function (target, key, value, targetIndex, totalTargets, tween) { return newValue; },\n//      getStart: function (target, key, value, targetIndex, totalTargets, tween) { return newValue; },\n//      getEnd: function (target, key, value, targetIndex, totalTargets, tween) { return newValue; }\n// },\nease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\nrepeat: 0,            // -1: infinity\nyoyo: false,\n\n// interpolation: null,\n});\n

    or

    var tween = scene.tweens.add({\ntargets: gameObject,\npaused: false,\ncallbackScope: tween,\n\n// timming/callback of each state\nonStart: function () {},\nonStartParams: [],\n\n// initial delay\ndelay: 0,  // function(target, targetKey, value, targetIndex, totalTargets, tween) { },\n\n// tween duration\nduration: 1000,\nease: 'Linear',\neaseParams: null,\n\nonActive: function () {},\nonUpdate: function (tween, target, key, current, previous, param) {},\nonUpdateParams: [],\n\n// delay between tween and yoyo\nhold: 0,\nyoyo: false,  // true to tween backward\nflipX: false,\nflipY: false,\nonYoyo: function (tween, target, key, current, previous, param) {},\nonYoyoParams: [],\n\n// repeat count (-1: infinite)\nrepeat: 0,\nonRepeat: function (tween, target, key, current, previous, param) {},\nonRepeatParams: [],\n// delay to next pass\nrepeatDelay: 0,\n\n// loop count (-1: infinite)\nloop: 0,\nonLoop: function () {},\nonLoopParams: [],\n// delay to next loop\nloopDelay: 0,\n\n// delay to onComplete callback\ncompleteDelay: 0,\nonComplete: function () {},\nonCompleteParams: [],\n// timming/callback of each state\n\nonStop: function () {}, onPause: function () {}, onResume: function () {}, // properties:\nx: '+=600',        // start from current value\ny: 500,\nrotation: ...\nangle: ...\nalpha: ...\n// ...\n\n// or\nprops: {\nx: { value: '+=600', duration: 3000, ease: 'Power2' },\ny: { value: '500', duration: 1500, ease: 'Bounce.easeOut' }\n},\n\n// or\nprops: {\nx: {\nduration: 400,\nyoyo: true,\nrepeat: 8,\nease: 'Sine.easeInOut',\nvalue: {\ngetActive: function (target, key, value, targetIndex, totalTargets, tween)\n{\nreturn value;\n},\ngetStart: function (target, key, value, targetIndex, totalTargets, tween)\n{\nreturn value + 30;\n},\ngetEnd: function (target, key, value, targetIndex, totalTargets, tween)\n{\ndestX -= 30;\nreturn destX;\n}\n}\n},\n....\n},\n\npersist: false,\n\ninterpolation: null,\ninterpolationData: null,\n\n});\n

    Note

    Tween task will not manipulate any property that begins with an underscore.

    "},{"location":"tween/#ease-equations","title":"Ease equations","text":"

    Demo

    "},{"location":"tween/#pause-resume-task","title":"Pause / Resume task","text":"
    tween.pause();\n
    tween.resume();\n
    "},{"location":"tween/#stop-task","title":"Stop task","text":"
    tween.stop();\n
    "},{"location":"tween/#play-task","title":"Play task","text":"
    tween.play();\n
    "},{"location":"tween/#restart-task","title":"Restart task","text":"
    tween.restart();\n
    "},{"location":"tween/#seek","title":"Seek","text":"
    tween.seek(amount);\n// tween.seek(amount, delta, emit);\n
    "},{"location":"tween/#remove-task","title":"Remove task","text":"

    Removes this Tween from the TweenManager

    tween.remove();\n
    "},{"location":"tween/#destroy-task","title":"Destroy task","text":"

    Free tween task from memory

    tween.destroy();\n

    Note

    A Tween that has been destroyed cannot ever be played or used again.

    "},{"location":"tween/#get-tweens","title":"Get tweens","text":""},{"location":"tween/#destroy-task-of-a-target","title":"Destroy task of a target","text":"
    scene.tweens.killTweensOf(target);\n
    "},{"location":"tween/#time-scale","title":"Time-scale","text":"
    tween.setTimeScale(v);\n// tween.timeScale = timescale;\n
    var timeScale = tween.getTimeScale();\n// var timeScale = tween.timeScale;\n
    "},{"location":"tween/#global-time-scale","title":"Global time-scale","text":"
    var timeScale = scene.tweens.timeScale;\n
    scene.tweens.timeScale = timescale;\n
    "},{"location":"tween/#events","title":"Events","text":""},{"location":"tween/#set-callbacks","title":"Set callbacks","text":"
    tween.setCallback(type, callback, param);\n
    "},{"location":"tween/#state","title":"State","text":""},{"location":"tween/#custom-ease-function","title":"Custom ease function","text":"
    var tween = scene.tweens.add({\ntargets: gameObject,\n// ...\nease: function (t) {  // t: 0~1\nreturn value;     // value: 0~1\n},\n// ...\n});\n
    "},{"location":"tween/#has-target","title":"Has target","text":"
    var hasTarget = tween.hasTarget(gameObject);\n
    "},{"location":"tween/#tween-value","title":"Tween value","text":""},{"location":"tween/#chain","title":"Chain","text":""},{"location":"tween/#create-chain","title":"Create chain","text":"
    var chain = scene.tweens.chain({\ntargets: null,\ntweens: [\n{\n// targets: gameObject,\nalpha: 1,            ease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\nrepeat: 0,            // -1: infinity\nyoyo: false\n},        // ...\n],\n\ndelay: 0,\ncompleteDelay: 0,\nloop: 0,  // repeat: 0,\nrepeatDelay: 0,\npaused: false,\npersist: true,\n// callbackScope: this,\n})\n
    "},{"location":"tween/#pause-resume-chain","title":"Pause / Resume chain","text":"
    chain.pause();\n
    chain.resume();\n
    "},{"location":"tween/#restart-chain","title":"Restart chain","text":"
    chain.restart();\n
    "},{"location":"tween/#add-tween-task","title":"Add tween task","text":"
    chain.add({\ntargets: gameObject,\nalpha: 1,\nease: 'Linear',       // 'Cubic', 'Elastic', 'Bounce', 'Back'\nduration: 1000,\nrepeat: 0,            // -1: infinity\nyoyo: false\n})\n

    or

    chain.add([tweenConfig0, tweenConfig1, ...]);\n
    "},{"location":"tween/#remove-tween-task","title":"Remove tween task","text":"
    chain.remove(tweenTask);\n
    "},{"location":"tween/#has-target_1","title":"Has target","text":"
    var hasTarget = chain.hasTarget(gameObject);\n
    "},{"location":"tween/#flow-chart","title":"Flow chart","text":"
    graph TB\n\nStart((Start)) --> CallbackOnStart\nCallbackOnStart>\"Callback: onStart\"] --> ActiveDelay((\"delay\"))\nActiveDelay --> DurationForward\n\nDurationForward((\"Tween forward<br>Callback: onUpdate<br>(duration)\")) --> Hold[\"hold\"]\nHold((hold)) --> IsYoyo{Is yoyo}\nIsYoyo --> |Yes| CallbackOnYoyo>\"Callback: onYoyo\"]\nCallbackOnYoyo --> DurationBackward((\"Tween backword<br>Callback: onUpdate<br>(duration)\"))\nDurationBackward --> IsRepeat{\"Repeat count > 0\"}\nIsYoyo --> |No| IsRepeat\nIsRepeat --> |Yes| CallbackOnRepeat>\"Callback: onRepeat\"]\nCallbackOnRepeat --> RepeatDelay((\"repeatDelay\"))\nRepeatDelay --> DurationForward\n\nIsRepeat --> |No| IsLoop{\"Loop count > 0\"}\n\nIsLoop --> |Yes| CallbackOnLoop\nCallbackOnLoop>\"Callback: onLoop\"] --> LoopDelay((\"loopDelay\"))\nLoopDelay --> DurationForward\n\nIsLoop --> |No| CompleteDelay\nCompleteDelay((\"completeDelay\")) --> CallbackOnComplete>\"Callback: onComplete\"]\nCallbackOnComplete --> End((End))
    "},{"location":"tween/#tween-data","title":"Tween data","text":""},{"location":"ui-badgelabel/","title":"Badge label","text":""},{"location":"ui-badgelabel/#introduction","title":"Introduction","text":"

    A container with badges above a main item.

    "},{"location":"ui-badgelabel/#live-demos","title":"Live demos","text":""},{"location":"ui-badgelabel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-badgelabel/#install-plugin","title":"Install plugin","text":""},{"location":"ui-badgelabel/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-badgelabel/#import-plugin","title":"Import plugin","text":""},{"location":"ui-badgelabel/#import-class","title":"Import class","text":""},{"location":"ui-badgelabel/#add-badgelabel-object","title":"Add badgeLabel object","text":"
    var badgeLabel = scene.rexUI.add.badgeLabel({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nbackground: backgroundGameObject,\nmain: mainItemGameObject,\n\nleftTop: leftTopBadgeGameObject,\ncenterTop: centerTopBadgeGameObject,\nrightTop: rightTopBadgeGameObject,\nleftCenter: leftCenterBadgeGameObject,\ncenter: centerBadgeGameObject,\nrightCenter: rightCenterBadgeGameObject,\nleftBottom: leftBottomBadgeGameObject,\ncenterBottom: centerBottomBadgeGameObject,\nrightBottom: rightBottomBadgeGameObject,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-badgelabel/#custom-class","title":"Custom class","text":""},{"location":"ui-badgelabel/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    badgeLabel.layout();\n

    See also - dirty

    "},{"location":"ui-badgelabel/#get-element","title":"Get element","text":""},{"location":"ui-badgelabel/#other-properties","title":"Other properties","text":"

    See overlap sizer object, base sizer object, container-lite.

    "},{"location":"ui-basesizer/","title":"Base sizer","text":""},{"location":"ui-basesizer/#introduction","title":"Introduction","text":"

    Base class of all ui plugins.

    "},{"location":"ui-basesizer/#usage","title":"Usage","text":""},{"location":"ui-basesizer/#background","title":"Background","text":"
    sizer.addBackground(gameObject);\n// sizer.addBackground(gameObject, key);\n// sizer.addBackground(gameObject, paddingConfig, key);\n
    "},{"location":"ui-basesizer/#remove-background","title":"Remove background","text":""},{"location":"ui-basesizer/#depth-of-background","title":"Depth of background","text":"

    Send this background child to bottom of sizer.

    sizer.sendChildToBack(gameObject);\n
    "},{"location":"ui-basesizer/#minimum-size","title":"Minimum size","text":"

    Resize top-most sizer

    sizer.setMinSize(width, height).layout()\n
    "},{"location":"ui-basesizer/#dirty","title":"Dirty","text":"

    Don't layout this sizer if sizer.dirty is false. i.e. Size of this sizer won't be changed, but won't layout children neither.

    Default value is true.

    "},{"location":"ui-basesizer/#bounds-of-sizer","title":"Bounds of sizer","text":""},{"location":"ui-basesizer/#size-of-sizer","title":"Size of sizer","text":""},{"location":"ui-basesizer/#push-into-bounds","title":"Push into bounds","text":"

    Align sizer to bound if overlapping it.

    sizer.pushIntoBounds();\n

    or

    sizer.pushIntoBounds(bounds);\n
    "},{"location":"ui-basesizer/#scale","title":"Scale","text":""},{"location":"ui-basesizer/#fade","title":"Fade","text":""},{"location":"ui-basesizer/#ease-move","title":"Ease move","text":""},{"location":"ui-basesizer/#shake","title":"Shake","text":""},{"location":"ui-basesizer/#ease-data","title":"Ease data","text":""},{"location":"ui-basesizer/#modal","title":"Modal","text":"
    1. Assign sizer.onCreateModalBehavior callback, or register events to close modal sizer directly.
    2. Pop this modal sizer
      sizer.modal({\n// cover: {\n//     color: 0x0,\n//     alpha: 0.8,\n//     transitIn: function(gameObject, duration) { },\n//     transitOut: function(gameObject, duration) { },\n// },\n// cover: false, \n\n// When to close modal dialog?\n// touchOutsideClose: false,\n// anyTouchClose: false,\n// timeOutClose: false,\n// manualClose: false,\n\n// duration: {\n//     in: 200,\n//     hold: 2000,\n//     out: 200\n// }\n\n// transitIn: 0,\n// transitOut: 0,\n\n// destroy: true\n});\n// sizer.modal(config, onClose);\n
      or
      sizer\n.modalPromise(config)\n.then(function(data){\n\n})\n
    "},{"location":"ui-basesizer/#set-properties-of-child","title":"Set properties of child","text":"
    sizer.setChildPosition(child, x, y);\nsizer.setChildRotation(child, rotation);\nsizer.setChildScale(child, scaleX, scaleY);\nsizer.setChildDisplaySize(child, width, height);\nsizer.setChildVisible(child, visible);\nsizer.setChildAlpha(child, alpha);\n
    "},{"location":"ui-basesizer/#depth","title":"Depth","text":""},{"location":"ui-basesizer/#scroll-factor","title":"Scroll factor","text":""},{"location":"ui-basesizer/#change-origin","title":"Change origin","text":"
    sizer.changeOrigin(originX, originY);\n

    This method also will reset all local state of children.

    "},{"location":"ui-basesizer/#destroy","title":"Destroy","text":"
    sizer.destroy();\n
    "},{"location":"ui-basesizer/#drag-top-most-sizer","title":"Drag top-most sizer","text":""},{"location":"ui-basesizer/#click","title":"Click","text":"

    Equal to

    var click = scene.rexUI.add.click(sizer, config);\nclick.on('click', callback, scope);\n
    "},{"location":"ui-basesizer/#click-child","title":"Click child","text":""},{"location":"ui-basesizer/#click-outside","title":"Click outside","text":"

    Equal to

    var clickOutside = scene.rexUI.add.clickOutside(sizer, config);\nclickOutside.on('clickoutside', callback, scope);\n
    "},{"location":"ui-basesizer/#click-outside-of-child","title":"Click outside of child","text":""},{"location":"ui-basesizer/#is-pointer-in-bounds","title":"Is pointer in bounds","text":""},{"location":"ui-basesizer/#in-touching","title":"In touching","text":"

    Invoke callbeack if pointer is inside hitarea every tick.

    Equal to

    var inTouching = scene.rexUI.add.inTouching(sizer, config);\ninTouching.on('intouch', callback, scope);\n
    "},{"location":"ui-basesizer/#in-touching-child","title":"In touching child","text":""},{"location":"ui-basesizer/#set-children-interactive","title":"Set children interactive","text":"

    Applies click, tap, press, swipe behaviors on this sizer, to detect input events of children.

    sizer.setChildrenInteractive({\n// down: undefined,\n// up: undefined,\n// over: undefined,\n\n// click: {mode: 'release', clickInterval: 100},\n\n// press: {time: 251, threshold: 9},\n\n// tap: {time: 250, tapInterval: 200, threshold: 9, tapOffset: 10, \n//       taps: undefined, minTaps: undefined, maxTaps: undefined,},\n\n// swipe: {threshold: 10, velocityThreshold: 1000, dir: '8dir'},\n\n// inputEventPrefix: 'child.',\n})\n

    Note

    Input behaviors are installed to this Sizer game object, not each child. And it assumes that all children are not overlapped. Use Button if user needs to enable/disable input behaviors of each child individually.

    "},{"location":"ui-basesizer/#events","title":"Events","text":""},{"location":"ui-basesizer/#pin-game-object","title":"Pin game object","text":"
    sizer.pin(gameObject);\n

    Note

    Method sizer.add is override in each sizer class usually.

    "},{"location":"ui-basesizer/#un-pin-game-object","title":"Un-pin game object","text":"

    sizer.unpin(child);\n// sizer.unpin(child, destroyChild);\n
    - destroyChild : Set true to destroy child. Default is false.

    Note

    Method sizer.remove is override in each sizer class usually.

    "},{"location":"ui-basesizer/#draw-bounds","title":"Draw bounds","text":""},{"location":"ui-basesizer/#hide","title":"Hide","text":""},{"location":"ui-basesizer/#padding","title":"Padding","text":""},{"location":"ui-basesizer/#anchor","title":"Anchor","text":"
    sizer.setAnchor({\n// left: '0%+0',\n// right: '0%+0',\n// centerX: '0%+0',\n// x: '0%+0',\n\n// top: '0%+0',\n// bottom: '0%+0',\n// centerY: '0%+0',\n// y: '0%+0'\n})\n

    For example, anchor game object's left bound to viewport's left+10, and centerY to viewport's center :

    {\nleft: 'left+10',\ncenterY: 'center'\n}\n
    "},{"location":"ui-basesizer/#get-child","title":"Get child","text":""},{"location":"ui-basesizer/#get-parent","title":"Get parent","text":""},{"location":"ui-basesizer/#has-parentchild","title":"Has parent/child","text":""},{"location":"ui-basesizer/#is-in-touching","title":"Is in touching","text":""},{"location":"ui-basesizer/#change-properties-of-child","title":"Change properties of child","text":""},{"location":"ui-basesizer/#add-to-container","title":"Add to container","text":"

    Note

    container.add(sizer), or layer.add(sizer) won't add children of sizer.

    "},{"location":"ui-basesizer/#layer","title":"Layer","text":"

    A sizer can have a layer. Current children and new children will draw on this layer, instead of display list of scene.

    "},{"location":"ui-basesizer/#shader-effects","title":"Shader effects","text":"

    Apply post-fx pipeline on layer of sizer.

    "},{"location":"ui-basesizer/#snapshot","title":"Snapshot","text":""},{"location":"ui-basesizer/#events_1","title":"Events","text":""},{"location":"ui-basesizer/#dragging","title":"Dragging","text":""},{"location":"ui-basesizer/#layout-children","title":"Layout children","text":"

    Note

    Enable sizer events by set sizerEvents to true in config.

    "},{"location":"ui-basesizer/#remove-child","title":"Remove child","text":"

    Note

    Enable sizer events by set sizerEvents to true in config.

    "},{"location":"ui-basesizer/#add-child","title":"Add child","text":"

    Note

    Enable sizer events by set sizerEvents to true in config.

    "},{"location":"ui-basesizer/#broadcast-event","title":"Broadcast event","text":"

    Fire event to sizer itself and all children

    sizer.broadcastEvent(eventName, parameter0, parameter1, ...);\n

    Receive event

    child.on(eventName, function(parameter0, parameter1, ...) {\n\n}, scope);\n
    "},{"location":"ui-basesizer/#other-properties","title":"Other properties","text":"

    This game object inherits from ContainerLite.

    "},{"location":"ui-buttons/","title":"Buttons","text":""},{"location":"ui-buttons/#introduction","title":"Introduction","text":"

    A container with a group of buttons.

    "},{"location":"ui-buttons/#live-demos","title":"Live demos","text":""},{"location":"ui-buttons/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-buttons/#install-plugin","title":"Install plugin","text":""},{"location":"ui-buttons/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-buttons/#import-plugin","title":"Import plugin","text":""},{"location":"ui-buttons/#import-class","title":"Import class","text":""},{"location":"ui-buttons/#add-buttons-object","title":"Add Buttons object","text":"
    var buttons = scene.rexUI.add.buttons({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n// buttonsType: undefined,\n\n// Elements\n// background: backgroundGameObject,\n\nbuttons: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\nexpand: false,\nalign: undefined,\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n},\n\n// space: 0,\n// space: { left: 0, right:0, top:0, bottom:0, item:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n// eventEmitter: this,\n// groupName: undefined,\n\n// setValueCallback: undefined,  // or setButtonStateCallback: undefined\n// setValueCallbackScope: undefined  // or setButtonStateCallbackScope: undefined\n});\n
    "},{"location":"ui-buttons/#custom-class","title":"Custom class","text":""},{"location":"ui-buttons/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    buttons.layout();\n

    See also - dirty

    "},{"location":"ui-buttons/#other-properties","title":"Other properties","text":"

    See sizer object

    "},{"location":"ui-buttons/#events","title":"Events","text":""},{"location":"ui-buttons/#emit-button-click-event","title":"Emit button click event","text":"
    buttons.emitButtonClick(index);\n
    "},{"location":"ui-buttons/#enabledisable-input-of-button","title":"Enable/disable input of button","text":""},{"location":"ui-buttons/#get-element","title":"Get element","text":""},{"location":"ui-buttons/#add-child","title":"Add child","text":""},{"location":"ui-buttons/#remove-child","title":"Remove child","text":""},{"location":"ui-buttons/#showhide-button","title":"Show/hide button","text":"

    Hidden elements won't be counted when layouting. Call buttons.layout(), or topSizer.layout() after show/hide any button.

    "},{"location":"ui-buttons/#for-each-button","title":"For each button","text":"
    buttons.forEachButtton(callback, scope);\n
    "},{"location":"ui-buttons/#checkboxesradio","title":"Checkboxes/radio","text":""},{"location":"ui-buttons/#checkboxes","title":"Checkboxes","text":""},{"location":"ui-buttons/#radio","title":"Radio","text":""},{"location":"ui-buttons/#events_1","title":"Events","text":""},{"location":"ui-chart/","title":"Chart","text":""},{"location":"ui-chart/#introduction","title":"Introduction","text":"

    Draw chart on canvas.

    "},{"location":"ui-chart/#live-demos","title":"Live demos","text":""},{"location":"ui-chart/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-chart/#install-plugin","title":"Install plugin","text":""},{"location":"ui-chart/#install-chartjs","title":"Install chart.js","text":"

    Chart.js is not included in rexUI, installs it before creating any chart.

    scene.load.script('chartjs', 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.8.0/chart.min.js');\n
    or
    scene.load.script('chartjs', 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js');\n

    "},{"location":"ui-chart/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-chart/#import-plugin","title":"Import plugin","text":""},{"location":"ui-chart/#import-class","title":"Import class","text":""},{"location":"ui-chart/#add-chart-object","title":"Add chart object","text":"
    var chart = scene.rexUI.add.chart(x, y, width, height, config);\n
    "},{"location":"ui-chart/#custom-class","title":"Custom class","text":""},{"location":"ui-chart/#create-chart","title":"Create chart","text":"

    Create chart (if not creating at beginning).

    chart.setChart(config);\n
    "},{"location":"ui-chart/#chart-data","title":"Chart data","text":""},{"location":"ui-chart/#manipulate-chart-object","title":"Manipulate chart object","text":"
    1. Get chart object
      var chart = chart.chart;\n
    2. Set properties of chart
    3. Update chart
      chart.update();\n
    "},{"location":"ui-colorcomponents/","title":"Color components","text":""},{"location":"ui-colorcomponents/#introduction","title":"Introduction","text":"

    Edit color value by RGB, or HSV input fields. Clicking fist label can switch color format between RGB and HSV

    "},{"location":"ui-colorcomponents/#live-demos","title":"Live demos","text":""},{"location":"ui-colorcomponents/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-colorcomponents/#install-plugin","title":"Install plugin","text":""},{"location":"ui-colorcomponents/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-colorcomponents/#import-plugin","title":"Import plugin","text":""},{"location":"ui-colorcomponents/#import-class","title":"Import class","text":""},{"location":"ui-colorcomponents/#add-colorcomponents-object","title":"Add colorComponents object","text":"
    var colorComponents = scene.rexUI.add.colorComponents({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nbackground: backgroundGameObject,\n\nformatLabel: {\nbackground: {\nradius: 0,\ncolor: undefined, alpha: undefined,\nstrokeColor: undefined, strokeAlpha: undefined, strokeWidth: 2\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},\nalign: 'left',  // 'left'|'center'|'right'|'justify'\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n},\n\nspace: {left: 0, right: 0, top: 0, bottom: 0}\n},\n\n// formatLabel: labelGameObject,\n\ninputText: {\nwidth: undefined, height: undefined,\n\npadding: 0,  // {left: 0, right: 0, top: 0, bottom: 0}\n\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null,\n\n// Style when focus\n// 'focus.color': ...\n// 'focus.color2': ...\n// 'focus.stroke': ...\n},\nfocusStyle: undefined,\n\ninnerBounds: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBY: undefined,\noffsetX: 0,\noffsetY: 0,\n\n// Style when cursor move on\n// 'cursor.color': ...\n// 'cursor.backgroundColor': ...\n// 'cursor.xxx': ...\n},\ncursorStyle: undefined,\n\nwrap: {\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0\n},\nlineHeight: undefined,\nmaxLines: undefined,\nwrapWidth: undefined,\nletterSpacing: 0,\nhAlign: 0,\nvAlign: 'center',  // For single line text input\ncharWrap: true,    // For single line text input\n},\n\n// enterClose: true,\n// readOnly: false,\n\n// Callbacks\n// onOpen: function (textObject, hiddenInputText) {\n// },\n\n// onClose: function (textObject, hiddenInputText) {\n// },\n\n// onUpdate: function (text, textObject, hiddenInputText) {\n//     return text;\n// },   \n\n// onAddChar: function(child, index, canvasInput) {\n//    child.modifyStyle({...})\n// },\n\n// onCursorOut: function(child, cursorIndex, canvasInput) {\n//     child.modifyStyle({\n//         \n//     });\n// },\n\n// onCursorIn: function(child, cursorIndex, canvasInput) {\n//     child.modifyStyle({\n//         \n//     });\n// },\n},\n\n// inputText0: canvasInputGameObject,\n// inputText1: canvasInputGameObject,\n// inputText2: canvasInputGameObject,\n\n// proportion: { formatLabel: 0 },\n\nvaluechangeCallback: function(newValue, oldValue, knob) {\n},\nvaluechangeCallbackScope: undefined,\n\nvalue: 0xffffff,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\nitem: 0\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,    \n});\n
    "},{"location":"ui-colorcomponents/#custom-class","title":"Custom class","text":""},{"location":"ui-colorcomponents/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    colorComponents.layout();\n

    See also - dirty

    "},{"location":"ui-colorcomponents/#get-element","title":"Get element","text":""},{"location":"ui-colorcomponents/#value","title":"Value","text":"

    Change value will also change the position of marker on H-palette and SV-palette

    "},{"location":"ui-colorcomponents/#events","title":"Events","text":""},{"location":"ui-colorcomponents/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-colorinput/","title":"Color input","text":""},{"location":"ui-colorinput/#introduction","title":"Introduction","text":"

    Color number (0x0~0xffffff) or color string ('#000000'~'#ffffff', or 'red') input field.

    "},{"location":"ui-colorinput/#live-demos","title":"Live demos","text":""},{"location":"ui-colorinput/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-colorinput/#install-plugin","title":"Install plugin","text":""},{"location":"ui-colorinput/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-colorinput/#import-plugin","title":"Import plugin","text":""},{"location":"ui-colorinput/#import-class","title":"Import class","text":""},{"location":"ui-colorinput/#add-colorinput-object","title":"Add colorInput object","text":"
    var colorInput = scene.rexUI.add.colorInput({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nbackground: backgroundGameObject,\n\nswatch: undefined,\n// swatch: { shape: 'circle' },\n// swatch: { size: 30 },\n// swatch: swatchGameObject,\n// swatch: false,\n\n// swatchSize: undefined,  // or swatch: { size }\n// squareExpandSwatch: true,\n\ninputText: inputTextConfig,\n// inputText: false,\n\ncolorPicker : {\nwidth: 160, height: 170,\n\nbackground: {\nradius: 0,\ncolor: undefined, alpha: undefined,\nstrokeColor: undefined, strokeAlpha: undefined, strokeWidth: 2\n},\n// createBackgroundCallback: function(scene) {\n//     return gameObject;\n// }\n\n// hPalettePosition: 'bottom',\n\n// space: { left: 10, right: 10, top: 10, bottom: 10, item: 8 }\n},\n\ncolorComponents: {\n// height: undefined,\n\n// formatLabel: undefined,\n\n// inputText: undefined,\n\n// space: { item: 8 }\n},\n// colorComponents: false,\n\nvaluechangeCallback: function(newValue, oldValue, colorInput) {\n},\nvaluechangeCallbackScope: undefined,\n\nvalue: 0xffffff,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0,\ntext: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,    \n});\n
    "},{"location":"ui-colorinput/#custom-class","title":"Custom class","text":""},{"location":"ui-colorinput/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    colorInput.layout();\n

    See also - dirty

    "},{"location":"ui-colorinput/#get-element","title":"Get element","text":""},{"location":"ui-colorinput/#value","title":"Value","text":"

    Change value will also change the position of marker on H-palette and SV-palette

    "},{"location":"ui-colorinput/#events","title":"Events","text":""},{"location":"ui-colorinput/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-colorpicker/","title":"Color picker","text":""},{"location":"ui-colorpicker/#introduction","title":"Introduction","text":"

    Pick color value from H and SV palettes.

    "},{"location":"ui-colorpicker/#live-demos","title":"Live demos","text":""},{"location":"ui-colorpicker/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-colorpicker/#install-plugin","title":"Install plugin","text":""},{"location":"ui-colorpicker/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-colorpicker/#import-plugin","title":"Import plugin","text":""},{"location":"ui-colorpicker/#import-class","title":"Import class","text":""},{"location":"ui-colorpicker/#add-colorpicker-object","title":"Add colorPicker object","text":"
    var colorPicker = scene.rexUI.add.colorPicker({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nbackground: backgroundGameObject,\n\nhPalette: {\nposition: 'bottom',\nsize: 10,\nwidth: undefined,\nheight: undefined,       },\n\nsvPalette: {\nwidth: undefined,\nheight: undefined,\n},\n\nvaluechangeCallback: function(newValue, oldValue, knob) {\n},\nvaluechangeCallbackScope: undefined,\n\nvalue: 0xffffff,\n\n// space: { left: 0, right:0, top:0, bottom:0, item:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,    \n});\n
    "},{"location":"ui-colorpicker/#custom-class","title":"Custom class","text":""},{"location":"ui-colorpicker/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    colorPicker.layout();\n

    See also - dirty

    "},{"location":"ui-colorpicker/#get-element","title":"Get element","text":""},{"location":"ui-colorpicker/#value","title":"Value","text":"

    Change value will also change the position of marker on H-palette and SV-palette

    "},{"location":"ui-colorpicker/#events","title":"Events","text":""},{"location":"ui-colorpicker/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-confirmdialog/","title":"Confirm dialog","text":""},{"location":"ui-confirmdialog/#introduction","title":"Introduction","text":"

    Using json style to create confirm dialog, composed of simple-label title, simple-label content, with simple-label 0, 1, or 2 action button(s).

    "},{"location":"ui-confirmdialog/#live-demos","title":"Live demos","text":""},{"location":"ui-confirmdialog/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-confirmdialog/#install-plugin","title":"Install plugin","text":""},{"location":"ui-confirmdialog/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-confirmdialog/#import-plugin","title":"Import plugin","text":""},{"location":"ui-confirmdialog/#import-class","title":"Import class","text":""},{"location":"ui-confirmdialog/#add-dialog-object","title":"Add dialog object","text":"
    var dialog = scene.rexUI.add.confirmDialog({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// Elements\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\n// SimpleLabelConfig\ntitle: {\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\n// iconMask: false,\n// squareFitIcon: false,\n// iconSize: undefined, iconWidth: undefined, iconHeight: undefined,\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n// expandTextWidth: false,\n// expandTextHeight: false,\n\n// squareFitAction: false,\n// actionMask: false,\n// actionSize: undefined, actionWidth: undefined, actionHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n\nalign: undefined,  // 'left' | 'top' | 'right' | 'bottom' | 'center        \n},\n\ncontent: SimpleLabelConfig,\n\n/* TextArea\n    content: {\n        space: { left: 0, right: 0, top: 0, bottom: 0, text: 0, },\n\n        background: {\n            radius: 0,\n            // radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\n            color: undefined,\n            alpha: undefined,\n            strokeColor: undefined,\n            strokeAlpha: undefined,\n            strokeWidth: undefined,\n        },\n\n        text: {\n            fontFamily: 'Courier',\n            fontSize: '16px',\n            fontStyle: '',\n            backgroundColor: null,\n            color: '#fff',\n            stroke: '#fff',\n            strokeThickness: 0,\n            shadow: {\n                offsetX: 0,\n                offsetY: 0,\n                color: '#000',\n                blur: 0,\n                stroke: false,\n                fill: false\n            },                  \n            padding: {\n                left: 0,\n                right: 0,\n                top: 0,\n                bottom: 0,\n            },\n            // more text styles\n        },\n\n        // textWidth: undefined,\n        // textHeight: undefined,\n        // textMask: false,\n        // alwaysScrollable: false,\n\n        slider: {\n            track: { \n                width: 1, height: 1,\n                radius: 0, \n                color: undefined, alpha: 1,\n                strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n                shape: undefined\n            },\n\n            thumb: { \n                width: 1, height: 1,\n                radius: 0, \n                color: undefined, alpha: 1,\n                strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n                shape: undefined\n            },\n\n            // input: 'drag',\n            // position: 'right',\n\n            // hideUnscrollableSlider: false,\n            // adaptThumbSize: false,\n            // minThumbSize: undefined,\n        },\n\n        // scroller: {\n        //     threshold: 10,\n        //     slidingDeceleration: 5000,\n        //     backDeceleration: 2000,\n        //     pointerOutRelease: true,\n        //     dragRate: 1,\n        // },\n\n        mouseWheelScroller: false,\n        // mouseWheelScroller: {\n        //     focus: false,\n        //     speed: 0.1\n        // },\n\n        clamplChildOY: false,\n    }\n    */\n\nbuttonMode: 0,  // 0|1|2\n\nbutton: SimpleLabelConfig,\n// buttonA: SimpleLabelConfig\n// buttonB: SimpleLabelConfig\n\n// choice: SimpleLabelConfig,\n// choicesType\n// choicesWidth: undefined,\n// choicesHeight: undefined,\n\n// Space\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\ntitle: 0,\ntitleLeft: 0,\ntitleRight: 0,\n\ncontent: 0,\ncontentLeft: 0,\ncontentRight: 0,\n\nactionsLeft: 0,\nactionsRight: 0,\naction: 0,\n\nchoices: 0,\nchoicesLeft: 0,\nchoicesRight: 0,\nchoice: 0,\nchoiceLine: 0,\nchoiceColumn: 0, choiceRow: 0,\nchoicesBackgroundLeft: 0,\nchoicesBackgroundRight: 0,\nchoicesBackgroundTop: 0,\nchoicesBackgroundBottom: 0,\n},\n\nproportion: {\ntitle: 0,\ncontent: 0,\nactions: 0,\nchoices: 0,\n},\n\nexpand: {\ntitle: true,\ncontent: true,\nactions: false,\nchoices: true,\n},\n\nalign: {\ntitle: 'center',\ncontent: 'center',\nactions: 'center',\nchoices: 'center',\n},\n\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n}\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n}, creators);\n
    "},{"location":"ui-confirmdialog/#custom-class","title":"Custom class","text":""},{"location":"ui-confirmdialog/#reset-display-content","title":"Reset display content","text":"
    dialog.resetDisplayContent({\ntitle: '',\ncontent: '',\nbuttonA: '',\nbuttonB: '',\n});\n

    or

    dialog.resetDisplayContent({\ntitle: {\ntext: '',\n\nicon: undefined, iconFrame: undefined,\niconSize: undefined,\n\naction: undefined, actionFrame: undefined,\nactionSize: undefined,\n\n},\n\ncontent: {\ntext: '',\n\nicon: undefined, iconFrame: undefined,\niconSize: undefined,\n\naction: undefined, actionFrame: undefined,\nactionSize: undefined,\n\n},\n\nbuttonA: {\ntext: '',\n\nicon: undefined, iconFrame: undefined,\niconSize: undefined,\n\naction: undefined, actionFrame: undefined,\nactionSize: undefined,\n\n},\n\nbuttonB: {\ntext: '',\n\nicon: undefined, iconFrame: undefined,\niconSize: undefined,\n\naction: undefined, actionFrame: undefined,\nactionSize: undefined,\n\n},\n\nchoices: [\n{\ntext: '', value: undefined,\n\nicon: undefined, iconFrame: undefined,\niconSize: undefined,\n\naction: undefined, actionFrame: undefined,\nactionSize: undefined,\n},        // ...\n]\n});\n

    Run dialog.layout() after this method, to layout children again.

    "},{"location":"ui-confirmdialog/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    dialog.layout();\n

    See also - dirty

    "},{"location":"ui-confirmdialog/#modal","title":"Modal","text":"

    Pop this dialog as modal dialog, clicking any action button to close this modal dialog.

    dialog.modal({\n// cover: {\n//     color: 0x0,\n//     alpha: 0.8,\n//     transitIn: function(gameObject, duration) { },\n//     transitOut: function(gameObject, duration) { },\n// },\n// cover: false, \n\n// When to close modal dialog?\n// touchOutsideClose: false,\n// anyTouchClose: false,\n// timeOutClose: false,\n// manualClose: false,\n\n// duration: {\n//     in: 200,\n//     hold: 2000,\n//     out: 200\n// }\n\n// transitIn: 0,\n// transitOut: 0,\n\n// destroy: true\n});\n// dialog.modal(config, onClose);\n

    or

    dialog\n.modalPromise(config)\n.then(function(data){\n\n})\n
    "},{"location":"ui-confirmdialog/#get-element","title":"Get element","text":""},{"location":"ui-confirmdialog/#other-properties","title":"Other properties","text":"

    See dialog, sizer object, base sizer object, container-lite.

    "},{"location":"ui-dialog/","title":"Dialog","text":""},{"location":"ui-dialog/#introduction","title":"Introduction","text":"

    A container with a title, content, buttons and background.

    "},{"location":"ui-dialog/#live-demos","title":"Live demos","text":""},{"location":"ui-dialog/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-dialog/#install-plugin","title":"Install plugin","text":""},{"location":"ui-dialog/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-dialog/#import-plugin","title":"Import plugin","text":""},{"location":"ui-dialog/#import-class","title":"Import class","text":""},{"location":"ui-dialog/#add-dialog-object","title":"Add dialog object","text":"
    var dialog = scene.rexUI.add.dialog({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// Elements\nbackground: backgroundGameObject,\n\ntitle: titleGameObject,\n\ntoolbarBackground: toolbarBackgroundGameObject,\ntoolbar: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\n\nleftToolbarBackground: leftToolbarBackgroundGameObject,\nleftToolbar: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\n\ncontent: contentGameObject,\n\ndescription: descriptionGameObject,\n\nchoicesType: '',\n// choicesWidth: undefined,\n// choicesHeight: undefined,  // Used when choicesType is `'grid'`, `'grid-radio'`, or `'grid-checkboxes'`\nchoicesBackground: choicesBackgroundGameObject,\nchoices: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\n\nactionsBackground: actionsBackgroundGameObject,\nactions: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\n\n// Space\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\ntitle: 0,\ntitleLeft: 0,\ntitleRight: 0,\ncontent: 0,\ncontentLeft: 0,\ncontentRight: 0,\ndescription: 0,\ndescriptionLeft: 0,\ndescriptionRight: 0\nchoices: 0,\nchoicesLeft: 0,\nchoicesRight: 0,\nactionsLeft: 0,\nactionsRight: 0,\n\ntoolbarItem: 0,\nleftToolbarItem: 0,\n\nchoice: 0,\n// choiceLine: 0,   // Used when choicesType is `'wrap'`, `'wrap-radio'`, or `'wrap-checkboxes'`\n// choiceColumn: 0, // Used when choicesType is `'grid'`, `'grid-radio'`, or `'grid-checkboxes'`\n// choiceRow: 0,    // Used when choicesType is `'grid'`, `'grid-radio'`, or `'grid-checkboxes'`\nchoicesBackgroundLeft: 0,\nchoicesBackgroundRight: 0,\nchoicesBackgroundTop: 0,\nchoicesBackgroundBottom: 0,\n\naction: 0,\n},\n\nproportion: {\ntitle: 0,\ncontent: 0,\ndescription: 0,\nchoices: 0,\nactions: 0,\n},\n\nexpand: {\ntitle: true,\ncontent: true,\ndescription: true,\nchoices: true,\nactions: false,\n},\n\nalign: {\ntitle: 'center',\ncontent: 'center',\ndescription: 'center',\nchoices: 'center',\nactions: 'center',\n},\n\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n}\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-dialog/#custom-class","title":"Custom class","text":""},{"location":"ui-dialog/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    dialog.layout();\n

    See also - dirty

    "},{"location":"ui-dialog/#modal","title":"Modal","text":"

    Pop this dialog as modal dialog, clicking any action button to close this modal dialog.

    dialog.modal({\n// cover: {\n//     color: 0x0,\n//     alpha: 0.8,\n//     transitIn: function(gameObject, duration) { },\n//     transitOut: function(gameObject, duration) { },\n// },\n// cover: false, \n\n// When to close modal dialog?\n// touchOutsideClose: false,\n// anyTouchClose: false,\n// timeOutClose: false,\n// manualClose: false,\n\n// duration: {\n//     in: 200,\n//     hold: 2000,\n//     out: 200\n// }\n\n// transitIn: 0,\n// transitOut: 0,\n\n// destroy: true,\n\n// defaultBehavior: true,\n});\n// dialog.modal(config, onClose);\n

    or

    dialog\n.modalPromise(config)\n.then(function(data){\n\n})\n
    "},{"location":"ui-dialog/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-dialog/#events","title":"Events","text":""},{"location":"ui-dialog/#emit-button-click-event","title":"Emit button click event","text":""},{"location":"ui-dialog/#get-element","title":"Get element","text":""},{"location":"ui-dialog/#add-button","title":"Add button","text":"

    Add choice/action/toolbar/left-toolbar button

    dialog.addChoice(gameObject);\ndialog.addAction(gameObject);\ndialog.addToolbar(gameObject);\ndialog.addLeftToolbar(gameObject);\n
    "},{"location":"ui-dialog/#remove-button","title":"Remove button","text":""},{"location":"ui-dialog/#enabledisable-input-of-button","title":"Enable/disable input of button","text":""},{"location":"ui-dialog/#showhide-button","title":"Show/hide button","text":"

    Hidden elements won't be counted when layouting. Call dialog.layout(), or topSizer.layout() after show/hide any button.

    "},{"location":"ui-dialog/#for-each-button","title":"For each button","text":"
    dialog.forEachChoice(callback, scope);\ndialog.forEachAction(callback, scope);\ndialog.forEachToolbar(callback, scope);\ndialog.forEachLeftToolbar(callback, scope);\n
    "},{"location":"ui-dialog/#state-of-choices-buttons","title":"State of choices buttons","text":""},{"location":"ui-dialog/#radio","title":"Radio","text":""},{"location":"ui-dialog/#checkboxes","title":"Checkboxes","text":""},{"location":"ui-dialog/#events_1","title":"Events","text":""},{"location":"ui-dropdownlist/","title":"Drop down list","text":""},{"location":"ui-dropdownlist/#introduction","title":"Introduction","text":"

    A label can open a drop-down list panel.

    "},{"location":"ui-dropdownlist/#live-demos","title":"Live demos","text":""},{"location":"ui-dropdownlist/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-dropdownlist/#install-plugin","title":"Install plugin","text":""},{"location":"ui-dropdownlist/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-dropdownlist/#import-plugin","title":"Import plugin","text":""},{"location":"ui-dropdownlist/#import-class","title":"Import class","text":""},{"location":"ui-dropdownlist/#add-drop-down-list-object","title":"Add drop-down list object","text":"
    var dropDownList = scene.rexUI.add.dropDownList({\noptions: [\noption0,\noption1,\n// ...\n],\n\nlist: {\n// createBackgroundCallback: function(scene) {\n//     // this : dropDownList\n//     return gameObject;\n// },\n\ncreateButtonCallback: function(scene, option, index, options) {\n// this : dropDownList\nreturn gameObject;\n},\n\nonButtonClick: function(button, index, pointer, event) {\n// this : dropDownList\n},\n\n// onButtonOver: function(button, index, pointer, event) {\n//     // this : dropDownList\n// },\n\n// onButtonOut: function(button, index, pointer, event) {\n//     // this : dropDownList\n// },\n\n// easeIn: 500,\n// transitIn: undefined,\n// transitIn: function(listPanel, duration) {  },\n\n// easeOut: 100,\n// transitOut: undefined,\n// transitOut: function(listPanel, duration) {  },\n\n// wrap: false,\n// width: undefined, \n// height: undefined,\n// alignParent: 'text',\n// alignSide: '',\n// expandDirection: 0,\n// bounds: undefined,\n\n// space: {\n//     left: 0, right: 0, top: 0, bottom: 0, item: 0,\n//     line: 0\n// },\n\n// draggable: false\n},\n\nsetValueCallback: function(dropDownList, value, previousValue) {\n\n},\nsetValueCallbackScope: undefined,\nvalue: undefined,\n\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\nbackground: backgroundGameObject,\nicon: iconGameObject,\niconMask: false,\ntext: textGameObject,\nexpandTextWidth: false,\nexpandTextHeight: false,\naction: actionGameObject,\nactionMask: false,\nalign: undefined,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0,\ntext: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-dropdownlist/#custom-class","title":"Custom class","text":""},{"location":"ui-dropdownlist/#options","title":"Options","text":""},{"location":"ui-dropdownlist/#clicking","title":"Clicking","text":""},{"location":"ui-dropdownlist/#emit-button-click-event","title":"Emit button click event","text":"
    dropDownList.emitButtonClick(index);\n

    Will fire 'button.click' event

    dropDownList.on('button.click', function(dropDownList, listPanel, button, index, pointer, event) {\n// ...\n}, scope);\n
    "},{"location":"ui-dropdownlist/#value","title":"Value","text":""},{"location":"ui-dropdownlist/#openclose-list-panel","title":"Open/close list panel","text":""},{"location":"ui-dropdownlist/#open-list-panel","title":"Open list panel","text":""},{"location":"ui-dropdownlist/#close-list-panel","title":"Close list panel","text":""},{"location":"ui-dropdownlist/#toggle-list-panel","title":"Toggle list panel","text":""},{"location":"ui-dropdownlist/#other-properties","title":"Other properties","text":"

    See label object, sizer object, base sizer object, container-lite.

    "},{"location":"ui-dropdownlist/#events","title":"Events","text":""},{"location":"ui-fileselectorbutton/","title":"File selector button","text":""},{"location":"ui-fileselectorbutton/#introduction","title":"Introduction","text":"

    A transparent file chooser button (<input type=\"file\">) above a Label.

    "},{"location":"ui-fileselectorbutton/#live-demos","title":"Live demos","text":""},{"location":"ui-fileselectorbutton/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-fileselectorbutton/#install-plugin","title":"Install plugin","text":""},{"location":"ui-fileselectorbutton/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-fileselectorbutton/#import-plugin","title":"Import plugin","text":""},{"location":"ui-fileselectorbutton/#import-class","title":"Import class","text":""},{"location":"ui-fileselectorbutton/#add-file-chooser-object","title":"Add file chooser object","text":"
    var button = scene.add.fileSelectorButton({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\nbackground: backgroundGameObject,\n\nicon: iconGameObject,\n// iconMask: false,\n// squareFitIcon: false,\n// iconSize: undefined, iconWidth: undefined, iconHeight: undefined,\n\ntext: textGameObject,\nexpandTextWidth: false,\nexpandTextHeight: false,\n\naction: actionGameObject,\n// actionMask: false,\n// squareFitAction: false,\n// actionSize: undefined, actionWidth: undefined, actionHeight: undefined,\n\nalign: undefined,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0,\ntext: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n\n// accept: '',\n// multiple: false,\n});\n// var fileChooser = scene.add.fileSelectorButton(x, y, width, height, config);\n
    "},{"location":"ui-fileselectorbutton/#custom-class","title":"Custom class","text":""},{"location":"ui-fileselectorbutton/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    label.layout();\n

    See also - dirty

    "},{"location":"ui-fileselectorbutton/#get-element","title":"Get element","text":""},{"location":"ui-fileselectorbutton/#selected-files","title":"Selected files","text":"
    var files = fileChooser.files;\n
    "},{"location":"ui-fileselectorbutton/#set-accept-filter","title":"Set accept filter","text":"
    fileChooser.setAccept(accept);\n
    "},{"location":"ui-fileselectorbutton/#multiple-files","title":"Multiple files","text":""},{"location":"ui-fileselectorbutton/#events","title":"Events","text":""},{"location":"ui-fileselectorbutton/#load-file-to-cache","title":"Load file to cache","text":"
    fileChooser.loadFile(file, loaderType, key);\n// fileChooser.loadFile(file, loaderType, key, cahceType);\n

    or

    fileChooser.loadFilePromise(file, loaderType, key, cahceType)\n.then(function(content) {\n\n})\n
    "},{"location":"ui-fileselectorbutton/#create-object-url","title":"Create object URL","text":""},{"location":"ui-fileselectorbutton/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"

    See dom-element's Interactive with other game objects

    "},{"location":"ui-fileselectorbutton/#other-properties","title":"Other properties","text":"

    See label object, sizer object, base sizer object, container-lite.

    "},{"location":"ui-fixwidthbuttons/","title":"Fix-width buttons","text":""},{"location":"ui-fixwidthbuttons/#introduction","title":"Introduction","text":"

    A container with a group of fix-width buttons.

    "},{"location":"ui-fixwidthbuttons/#live-demos","title":"Live demos","text":""},{"location":"ui-fixwidthbuttons/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-fixwidthbuttons/#install-plugin","title":"Install plugin","text":""},{"location":"ui-fixwidthbuttons/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-fixwidthbuttons/#import-plugin","title":"Import plugin","text":""},{"location":"ui-fixwidthbuttons/#import-class","title":"Import class","text":""},{"location":"ui-fixwidthbuttons/#add-buttons-object","title":"Add Buttons object","text":"
    var buttons = scene.rexUI.add.fixWidthButtons({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// Elements\n// background: backgroundGameObject,\n\nbuttons: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\n// rtl: false,\nalign: 0,\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n},\n\n// space: 0,\n// space: {\n//     left: 0, right: 0, top: 0, bottom: 0,\n//     item: 0, line: 0,\n//     indentLeftOdd: 0, indentLeftEven: 0,\n//     indentTopOdd: 0, indentTopEven: 0,\n// },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n// eventEmitter: this,\n// groupName: undefined,\n\n// buttonsType: undefined,\n// setValueCallback: undefined,  // or setButtonStateCallback: undefined\n// setValueCallbackScope: undefined  // or setButtonStateCallbackScope: undefined\n});\n
    "},{"location":"ui-fixwidthbuttons/#custom-class","title":"Custom class","text":""},{"location":"ui-fixwidthbuttons/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    buttons.layout();\n

    See also - dirty

    "},{"location":"ui-fixwidthbuttons/#other-properties","title":"Other properties","text":"

    See sizer object

    "},{"location":"ui-fixwidthbuttons/#events","title":"Events","text":""},{"location":"ui-fixwidthbuttons/#emit-button-click-event","title":"Emit button click event","text":"
    buttons.emitButtonClick(index);\n
    "},{"location":"ui-fixwidthbuttons/#enabledisable-input-of-button","title":"Enable/disable input of button","text":""},{"location":"ui-fixwidthbuttons/#get-element","title":"Get element","text":""},{"location":"ui-fixwidthbuttons/#add-child","title":"Add child","text":""},{"location":"ui-fixwidthbuttons/#remove-child","title":"Remove child","text":""},{"location":"ui-fixwidthbuttons/#showhide-button","title":"Show/hide button","text":"

    The same as for each button of buttons.

    "},{"location":"ui-fixwidthbuttons/#for-each-button","title":"For each button","text":"

    The same as for each button of buttons.

    "},{"location":"ui-fixwidthbuttons/#checkboxesradio","title":"Checkboxes/radio","text":"

    The same as checkboxes/radio of buttons.

    "},{"location":"ui-fixwidthsizer/","title":"Fix-width sizer","text":""},{"location":"ui-fixwidthsizer/#introduction","title":"Introduction","text":"

    Layout children game objects into lines.

    "},{"location":"ui-fixwidthsizer/#live-demos","title":"Live demos","text":""},{"location":"ui-fixwidthsizer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-fixwidthsizer/#install-plugin","title":"Install plugin","text":""},{"location":"ui-fixwidthsizer/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-fixwidthsizer/#import-plugin","title":"Import plugin","text":""},{"location":"ui-fixwidthsizer/#import-class","title":"Import class","text":""},{"location":"ui-fixwidthsizer/#add-sizer-object","title":"Add sizer object","text":"
    var sizer = scene.rexUI.add.fixWidthSizer({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// space: {\n//     left: 0, right: 0, top: 0, bottom: 0,\n//     item: 0, line: 0, \n//     indentLeftOdd: 0, indentLeftEven: 0,\n// },\n\n// rtl: false,\n// align: 0,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    or

    var sizer = scene.rexUI.add.fixWidthSizer(x, y, {\n// width: 2,\n// height: 2\n// space: {\n//     left: 0, right: 0, top: 0, bottom: 0,\n//     item: 0, line: 0,\n//     indentLeftOdd: 0, indentLeftEven: 0,\n//     indentTopOdd: 0, indentTopEven: 0,\n// },\n\n// rtl: false,\n// align: 0,\n\n// name: '',\n// draggable: false\n});\n

    or

    var sizer = scene.rexUI.add.fixWidthSizer(x, y, width, height, {\n// space: {\n//     left: 0, right: 0, top: 0, bottom: 0,\n//     item: 0, line: 0\n// },\n\n// rtl: false,\n// align: 0,\n\n// name: '',\n// draggable: false\n});\n
    "},{"location":"ui-fixwidthsizer/#custom-class","title":"Custom class","text":""},{"location":"ui-fixwidthsizer/#add-background","title":"Add background","text":"
    sizer.addBackground(child);\n

    or

    sizer.addBackground(child, {left: 0, right: 0, top: 0, bottom: 0}, key);\n
    "},{"location":"ui-fixwidthsizer/#add-child","title":"Add child","text":"

    Add a game obejct to sizer

    sizer.add(child);\n

    or

    sizer.add(child,\n{\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nkey: undefined,\nindex: undefined\n}\n);\n

    or

    sizer.add(child, padding, key, index);\n
    "},{"location":"ui-fixwidthsizer/#insert-child","title":"Insert child","text":"
    sizer.insert(index, child, {\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nkey: undefined,\n}\n);\n

    or

    sizer.insert(index, child, padding, key);\n
    "},{"location":"ui-fixwidthsizer/#insert-at-position","title":"Insert at position","text":"
    sizer.insertAtPosition(x, y, child, {\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nkey: undefined,\n}\n);\n

    or

    sizer.insertAtPosition(x, y, index, child, padding, key);\n
    "},{"location":"ui-fixwidthsizer/#add-new-line","title":"Add new line","text":"
    sizer.addNewLine();\n
    "},{"location":"ui-fixwidthsizer/#layout-children","title":"Layout children","text":"

    Arrange position of all children.

    sizer.layout();\n

    See also - dirty

    "},{"location":"ui-fixwidthsizer/#remove-child","title":"Remove child","text":""},{"location":"ui-fixwidthsizer/#get-element","title":"Get element","text":""},{"location":"ui-fixwidthsizer/#other-properties","title":"Other properties","text":"

    See base-sizer object.

    "},{"location":"ui-folder/","title":"Folder","text":""},{"location":"ui-folder/#introduction","title":"Introduction","text":"

    A container with a title, foldable child, and background.

    "},{"location":"ui-folder/#live-demos","title":"Live demos","text":""},{"location":"ui-folder/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-folder/#install-plugin","title":"Install plugin","text":""},{"location":"ui-folder/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-folder/#import-plugin","title":"Import plugin","text":""},{"location":"ui-folder/#import-class","title":"Import class","text":""},{"location":"ui-folder/#add-folder-object","title":"Add folder object","text":"
    var folder = scene.rexUI.add.folder({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\nbackground: backgroundGameObject,\n\ntitle: titleGameObject,    child: childGameObject,\n// customChildOrigin: false,\n\ntoggleByTarget: undefined,\ntoggleClickConfig: {\nmode:'pointerup',\nclickInterval: 100,\nthreshold: undefined,\n},\n\nalign: {\ntitle: 'left',\nchild: 'left',\n},\n\nexpand: {\ntitle: true,\nchild: true,\n},\n\ntransition: {\nduration: 200,\nexpandCallback: undefined,\ncollapseCallback: undefined,\n},\n\nreLayoutTarget: undefined,\n\nonExpandStart: undefined,\nonExpandComplete: undefined,\nonCollapseStart: undefined,\nonCollapseComplete: undefined,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nitem: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-folder/#custom-class","title":"Custom class","text":""},{"location":"ui-folder/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    folder.layout();\n

    See also - dirty

    Note

    Layout topmost sizer when expanding/collapsing start.

    "},{"location":"ui-folder/#get-element","title":"Get element","text":""},{"location":"ui-folder/#expandcollapse","title":"Expand/collapse","text":""},{"location":"ui-folder/#transition-callbacks","title":"Transition callbacks","text":""},{"location":"ui-folder/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-folder/#events","title":"Events","text":""},{"location":"ui-gridbuttons/","title":"Grid buttons","text":""},{"location":"ui-gridbuttons/#introduction","title":"Introduction","text":"

    A container with a group of buttons in grids.

    "},{"location":"ui-gridbuttons/#live-demos","title":"Live demos","text":""},{"location":"ui-gridbuttons/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-gridbuttons/#install-plugin","title":"Install plugin","text":""},{"location":"ui-gridbuttons/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-gridbuttons/#import-plugin","title":"Import plugin","text":""},{"location":"ui-gridbuttons/#import-class","title":"Import class","text":""},{"location":"ui-gridbuttons/#add-grid-sizer-object","title":"Add grid sizer object","text":"
    var buttons = scene.rexUI.add.gridButtons({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// Elements\n// background: backgroundGameObject,\n\nbuttons: [\n[buttonGameObject, buttonGameObject, buttonGameObject, ...],\n[buttonGameObject, buttonGameObject, buttonGameObject, ...],\n[buttonGameObject, buttonGameObject, buttonGameObject, ...],\n...\n],\n// row: 0, \n// column: 0,   // col: 0\n// createCellContainerCallback: function(scene, x, y) {\n//       return cellContainer;\n// },    \nexpand: true,\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n},\n\n// space: {\n//     left: 0, right: 0, top: 0, bottom:0,\n//     column: 0, // [0, 0, 0]\n//     row: 0     // [0, 0, 0]\n// },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n// eventEmitter: this,\n// groupName: undefined,\n\n// buttonsType: undefined,\n// setValueCallback: undefined,  // or setButtonStateCallback: undefined\n// setValueCallbackScope: undefined  // or setButtonStateCallbackScope: undefined\n});\n
    "},{"location":"ui-gridbuttons/#custom-class","title":"Custom class","text":""},{"location":"ui-gridbuttons/#layout-children","title":"Layout children","text":"

    Arrange position of all children.

    buttons.layout();\n

    See also - dirty

    "},{"location":"ui-gridbuttons/#other-properties","title":"Other properties","text":"

    See grid sizer object.

    "},{"location":"ui-gridbuttons/#events","title":"Events","text":"

    The same as events of buttons.

    "},{"location":"ui-gridbuttons/#get-element","title":"Get element","text":""},{"location":"ui-gridbuttons/#showhide-button","title":"Show/hide button","text":"

    The same as for each button of buttons.

    "},{"location":"ui-gridbuttons/#for-each-button","title":"For each button","text":"

    The same as for each button of buttons.

    "},{"location":"ui-gridbuttons/#checkboxesradio","title":"Checkboxes/radio","text":"

    The same as checkboxes/radio of buttons.

    "},{"location":"ui-gridsizer/","title":"Grid sizer","text":""},{"location":"ui-gridsizer/#introduction","title":"Introduction","text":"

    Layout children game objects in grids.

    "},{"location":"ui-gridsizer/#live-demos","title":"Live demos","text":""},{"location":"ui-gridsizer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-gridsizer/#install-plugin","title":"Install plugin","text":""},{"location":"ui-gridsizer/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-gridsizer/#import-plugin","title":"Import plugin","text":""},{"location":"ui-gridsizer/#import-class","title":"Import class","text":""},{"location":"ui-gridsizer/#add-grid-sizer-object","title":"Add grid sizer object","text":"
    var gridSizer = scene.rexUI.add.gridSizer({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\ncolumn: 0,  // col: 0\nrow: 0,\n// columnProportions: undefined,\n// rowProportions: undefined,\n// space: {\n//     left: 0, right: 0, top: 0, bottom:0,\n//     column: 0, // [0, 0, 0]\n//     row: 0,    // [0, 0, 0]\n//     indentLeftOdd: 0, indentLeftEven: 0,\n//     indentTopOdd: 0, indentTopEven: 0,\n// },\n\n// createCellContainerCallback: function(scene, x, y, config) {\n//     config.expand = true;\n//     return cellContainer;\n// },\n\n// name: '',\n// draggable: false\n});\n

    or

    var gridSizer = scene.rexUI.add.gridSizer(x, y, {\ncolumn: 0,  // col: 0\nrow: 0,\n// columnProportions: undefined,\n// rowProportions: undefined,\n\n// space: {\n//     left: 0, right: 0, top: 0, bottom:0,\n//     column: 0, // [0, 0, 0]\n//     row: 0,    // [0, 0, 0]\n//     indentLeftOdd: 0, indentLeftEven: 0,\n//     indentTopOdd: 0, indentTopEven: 0,\n// },\n\n// createCellContainerCallback: function(scene, x, y, config) {\n//     config.expand = true;\n//     return cellContainer;\n// },\n\n// width: undefined,\n// height: undefined\n});\n

    or

    var gridSizer = scene.rexUI.add.gridSizer(x, y, width, height, {\ncolumn: 0,   // col: 0\nrow: 0,\n// columnProportions: undefined,\n// rowProportions: undefined,\n\n// space: {\n//     left: 0, right: 0, top: 0, bottom:0,\n//     column: 0, // [0, 0, 0]\n//     row: 0,    // [0, 0, 0]\n//     indentLeftOdd: 0, indentLeftEven: 0,\n//     indentTopOdd: 0, indentTopEven: 0,\n// },\n\n// createCellContainerCallback: function(scene, x, y, config) {\n//     config.expand = true;\n//     return cellContainer;\n// },\n});\n

    or

    var gridSizer = scene.rexUI.add.gridSizer(x, y, width, height, column, row, {\n// space: {\n//     left: 0, right: 0, top: 0, bottom:0,\n//     column: 0, // [0, 0, 0]\n//     row: 0,    // [0, 0, 0]\n//     indentLeftOdd: 0, indentLeftEven: 0,\n//     indentTopOdd: 0, indentTopEven: 0,\n// },\n\n// createCellContainerCallback: function(scene, x, y, config, gridSizer) {\n//     config.expand = true;\n//     return cellContainer;\n// },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-gridsizer/#custom-class","title":"Custom class","text":""},{"location":"ui-gridsizer/#add-background","title":"Add background","text":"
    gridSizer.addBackground(child);\n

    or

    gridSizer.addBackground(child, {left: 0, right: 0, top: 0, bottom: 0}, key);\n
    "},{"location":"ui-gridsizer/#add-child","title":"Add child","text":"

    Add a game obejct to grid sizer

    gridSizer.add(child, column, row);\n

    or

    gridSizer.add(child,\n{\ncolumn: 0,\nrow: 0,\nalign: 'center',\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nexpand: false,\nkey: undefined\n}\n);\n

    or

    gridSizer.add(child, column, row, align, padding, expand, key);\n
    "},{"location":"ui-gridsizer/#insert-empty-rowcolumn","title":"Insert empty row/column","text":""},{"location":"ui-gridsizer/#proportion","title":"Proportion","text":"

    Set proportion of each column or row via

    gridSizer.setColumnProportion(columnIndex, proportion);\ngridSizer.setRowProportion(rowIndex, proportion);\n
    "},{"location":"ui-gridsizer/#layout-children","title":"Layout children","text":"

    Arrange position of all children.

    gridSizer.layout();\n

    See also - dirty

    "},{"location":"ui-gridsizer/#grid-index-child","title":"Grid index <-> child","text":""},{"location":"ui-gridsizer/#remove-child","title":"Remove child","text":""},{"location":"ui-gridsizer/#grid-size","title":"Grid size","text":""},{"location":"ui-gridsizer/#get-element","title":"Get element","text":""},{"location":"ui-gridsizer/#reset-grid","title":"Reset grid","text":"
    sizer.resetGrid(column, row, columnProportions, rowProportions, space);\n

    Note

    Children game objects will be removed without destroyed.

    Note

    Will invoke createCellContainerCallback to create cellContainer of each cell.

    "},{"location":"ui-gridsizer/#other-properties","title":"Other properties","text":"

    See base sizer object, container-lite.

    "},{"location":"ui-gridtable/","title":"Grid table","text":""},{"location":"ui-gridtable/#introduction","title":"Introduction","text":"

    A container with a grid table, slider, and scroller.

    "},{"location":"ui-gridtable/#live-demos","title":"Live demos","text":""},{"location":"ui-gridtable/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-gridtable/#install-plugin","title":"Install plugin","text":""},{"location":"ui-gridtable/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-gridtable/#import-plugin","title":"Import plugin","text":""},{"location":"ui-gridtable/#import-class","title":"Import class","text":""},{"location":"ui-gridtable/#add-table-object","title":"Add table object","text":"
    var table = scene.rexUI.add.gridTable({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nscrollMode: 0,\n\n// Elements\nbackground: backgroundGameObject,\n\ntable: {\nwidth: undefined,\nheight: undefined,\n\ncellWidth: undefined,\ncellHeight: undefined,\ncolumns: 1,\n// rows: 1,\nmask: {\npadding: 0,\n// updateMode: 0,\n},\n// enableLayer: false,\ninteractive: true,\nreuseCellContainer: false,\n\n// click: undefined,\n// tap: undefined,\n// press: undefined,\n// swipe: undefined,\n},\n\nslider: {\n// background: sliderBackgroundGameObject,\ntrack: trackGameObject,\n/* \n        track: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\nthumb: thumbGameObject,\n/* \n        thumb: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\n// input: 'drag',\n// position: 'right',\n\n// hideUnscrollableSlider: false,\n// adaptThumbSize: false,\n// minThumbSize: undefined,\n\n// buttons: {\n//     top: topButtonGameObject, bottom: bottomButtonGameObject,\n//     left: leftButtonGameObject, right: rightButtonGameObject,\n//     step: 0.01,\n// }\n},\n\n// scroller: {\n//     threshold: 10,\n//     slidingDeceleration: 5000,\n//     backDeceleration: 2000,\n//     pointerOutRelease: true,\n//     dragRate: 1,\n// },\n\nmouseWheelScroller: false,\n// mouseWheelScroller: {\n//     focus: false,\n//     speed: 0.1\n// }.\n\nclamplChildOY: false,\n\nheader: headerGameObject,\nfooter: footerGameObject,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\ntable: 0,\n// table: {\n//    top: 0,\n//    bottom: 0,\n//    left: 0,\n//    right: 0,\n//},\n\nslider: 0,\n// slider: {\n//     top: 0,\n//     bottom: 0,\n//     left: 0,\n//     right: 0,\n// },\n\nheader: 0,\nfooter: 0,\n},\n\nexpand: {\nheader: true,\nfooter: true,\n},\n\nalign: {\nheader: 'center',\nfooter: 'center',\n},\n\ncreateCellContainerCallback: function(cell, cellContainer) {\nvar scene = cell.scene,\nwidth = cell.width,\nheight = cell.height,\nitem = cell.item,\nitems = cell.items,\nindex = cell.index;\nif (cellContainer === null) { // No reusable cell container, create a new one\n// cellContainer = scene.rexUI.add.label();\n}\n// Set child properties of cell container ...\n\n// cell.setCellContainerAlign();  // Set alignment of cellContainer\n\nreturn cellContainer; // or null\n},\n\nitems: [],\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n});\n
    "},{"location":"ui-gridtable/#custom-class","title":"Custom class","text":""},{"location":"ui-gridtable/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    table.layout();\n

    See also - dirty

    "},{"location":"ui-gridtable/#items","title":"Items","text":""},{"location":"ui-gridtable/#cell-container","title":"Cell container","text":""},{"location":"ui-gridtable/#scroll-content","title":"Scroll content","text":""},{"location":"ui-gridtable/#scroll-by-percentage","title":"Scroll by percentage","text":""},{"location":"ui-gridtable/#scroll-to-topbottom","title":"Scroll to top/bottom","text":""},{"location":"ui-gridtable/#scroll-to-row","title":"Scroll to row","text":""},{"location":"ui-gridtable/#enabledisable-scrolling","title":"Enable/disable scrolling","text":""},{"location":"ui-gridtable/#refresh-table-cells","title":"Refresh table cells","text":""},{"location":"ui-gridtable/#table-size","title":"Table size","text":""},{"location":"ui-gridtable/#other-properties","title":"Other properties","text":"

    See base sizer object, container-lite.

    "},{"location":"ui-gridtable/#events","title":"Events","text":""},{"location":"ui-gridtable/#get-element","title":"Get element","text":""},{"location":"ui-holygrail/","title":"Holy grail","text":""},{"location":"ui-holygrail/#introduction","title":"Introduction","text":"

    Layout elements in Holy grail style.

    "},{"location":"ui-holygrail/#live-demos","title":"Live demos","text":""},{"location":"ui-holygrail/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-holygrail/#install-plugin","title":"Install plugin","text":""},{"location":"ui-holygrail/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-holygrail/#import-plugin","title":"Import plugin","text":""},{"location":"ui-holygrail/#import-class","title":"Import class","text":""},{"location":"ui-holygrail/#add-holygrail-object","title":"Add holyGrail object","text":"
    var holyGrail = scene.rexUI.add.holyGrail({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nlayoutMode: 0,\n\n// Elements\nbackground: backgroundGameObject,\n\nheader: headerGameObject,\n\nleftSide: leftSideGameObject,\n\ncontent: contentGameObject,\n\nrightSide: rightSideGameObject,\n\nfooter: footerGameObject,\n\n// Space\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nheader: 0,  // {left, right, top, bottom}\nfooter: 0,  // {left, right, top, bottom}\nleftSide: 0, // {left, right, top, bottom}\nrightSide: 0, // {left, right, top, bottom}\n},\n\n// proportion: {\n//     header: 0,\n//     footer: 0,\n//     leftSide: 0,\n//     rightSide: 0,\n//     content: 1,\n// },\n\n// expand: {\n//     header: true,\n//     footer: true,\n//     leftSide: true,\n//     rightSide: true,\n//     content: false,\n// },\n\n// align: {\n//     header: 'center',\n//     footer: 'center',\n//     leftSide: 'center',\n//     rightSide: 'center',\n//     content: 'center',\n// },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-holygrail/#custom-class","title":"Custom class","text":""},{"location":"ui-holygrail/#layout-modes","title":"Layout modes","text":""},{"location":"ui-holygrail/#mode-0","title":"Mode 0","text":"

    Bottom row is footer. Default behavior.

    Header Left side Content Right side Footer"},{"location":"ui-holygrail/#mode-1","title":"Mode 1","text":"

    Left side will expand down to bottom row.

    Header Left side Content Right side Footer"},{"location":"ui-holygrail/#mode-2","title":"Mode 2","text":"

    Right side will expand down to bottom row.

    Header Left side Content Right side Footer"},{"location":"ui-holygrail/#mode-3","title":"Mode 3","text":"

    Left side and right side will expand down to bottom row.

    Header Left side Content Right side Footer"},{"location":"ui-holygrail/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    holyGrail.layout();\n

    See also - dirty

    "},{"location":"ui-holygrail/#re-build","title":"Re-build","text":"

    Destroy current elements then add elements with new config.

    holyGrail.build({\n// Elements\nbackground: backgroundGameObject,\n\nheader: headerGameObject,\n\nleftSide: leftSideGameObject,\n\ncontent: contentGameObject,\n\nrightSide: rightSideGameObject,\n\nfooter: footerGameObject,\n\nlayoutMode: 0,\n\n// Space\nspace: {        header: 0,  // {left, right, top, bottom}\nfooter: 0,  // {left, right, top, bottom}\nleftSide: 0, // {left, right, top, bottom}\nrightSide: 0, // {left, right, top, bottom}\n},\n\n// proportion: {\n//     header: 0,\n//     footer: 0,\n//     leftSide: 0,\n//     rightSide: 0,\n//     content: 1,\n// },\n\n// expand: {\n//     header: true,\n//     footer: true,\n//     leftSide: true,\n//     rightSide: true,\n//     content: false,\n// },\n\n// align: {\n//     header: 'center',\n//     footer: 'center',\n//     leftSide: 'center',\n//     rightSide: 'center',\n//     content: 'center',\n// },\n})\n
    "},{"location":"ui-holygrail/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-holygrail/#get-element","title":"Get element","text":""},{"location":"ui-knob/","title":"Knob","text":""},{"location":"ui-knob/#introduction","title":"Introduction","text":"

    A knob button based on circular progress shape.

    "},{"location":"ui-knob/#live-demos","title":"Live demos","text":""},{"location":"ui-knob/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-knob/#install-plugin","title":"Install plugin","text":""},{"location":"ui-knob/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-knob/#import-plugin","title":"Import plugin","text":""},{"location":"ui-knob/#import-class","title":"Import class","text":""},{"location":"ui-knob/#add-knob-object","title":"Add knob object","text":"
    var knob = scene.rexUI.add.knob({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nbackground: backgroundGameObject,\n\nbarColor: undefined,\ntrackColor: undefined,\ncenterColor: undefined,\nthickness: 0.2,\nstartAngle: Phaser.Math.DegToRad(270),\nanticlockwise: false,\nknobDepth: 0,\n\ntext: undefined,\ntextFormatCallback: undefined,\ntextFormatCallbackScope: undefined,\n\ninput: 'pan',\n\nvalue: 0,\ngap: undefined,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},\nvaluechangeCallback: function(newValue, oldValue, knob) {\n},\nvaluechangeCallbackScope: undefined,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n\nenable: true,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-knob/#custom-class","title":"Custom class","text":""},{"location":"ui-knob/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    knob.layout();\n

    See also - dirty

    "},{"location":"ui-knob/#get-element","title":"Get element","text":""},{"location":"ui-knob/#enable","title":"Enable","text":""},{"location":"ui-knob/#value","title":"Value","text":"

    Change value will also change the position of knob thumb and width of knob indicator.

    "},{"location":"ui-knob/#ease-value","title":"Ease value","text":""},{"location":"ui-knob/#other-properties","title":"Other properties","text":"

    See overlap sizer object, base sizer object, container-lite.

    "},{"location":"ui-knob/#events","title":"Events","text":""},{"location":"ui-label/","title":"Label","text":""},{"location":"ui-label/#introduction","title":"Introduction","text":"

    A container with an icon, text, and background.

    "},{"location":"ui-label/#live-demos","title":"Live demos","text":""},{"location":"ui-label/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-label/#install-plugin","title":"Install plugin","text":""},{"location":"ui-label/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-label/#import-plugin","title":"Import plugin","text":""},{"location":"ui-label/#import-class","title":"Import class","text":""},{"location":"ui-label/#add-label-object","title":"Add label object","text":"
    var label = scene.rexUI.add.label({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\nbackground: backgroundGameObject,\n\nicon: iconGameObject,\n// iconMask: false,\n// squareFitIcon: false,\n// iconSize: undefined, iconWidth: undefined, iconHeight: undefined,\n\ntext: textGameObject,\nexpandTextWidth: false,\nexpandTextHeight: false,\n\naction: actionGameObject,\n// actionMask: false,\n// squareFitAction: false,\n// actionSize: undefined, actionWidth: undefined, actionHeight: undefined,\n\nalign: undefined,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0, iconTop: 0, iconBottom: 0, iconLeft: 0, iconRight: 0,\n\ntext: 0,\nactionTop: 0, actionBottom: 0, actionLeft: 0, actionRight: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-label/#expand-size-of-text","title":"Expand size of text","text":"

    Expand width/height of text when expandTextWidth/expandTextHeight is true

    To resize text object, text object should have resize method. For example

    class MyText extends Phaser.GameObjects.Text {\nconstructor(scene, x, y, text, style) {\nsuper(scene, x, y, text, style);\nscene.add.existing(this);\n}\nresize(width, height) {\nthis.setFixedSize(width, height);\nreturn this;\n}\n}\n

    Or uses bbcode text object, or tag text object

    "},{"location":"ui-label/#custom-class","title":"Custom class","text":""},{"location":"ui-label/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    label.layout();\n

    See also - dirty

    "},{"location":"ui-label/#get-element","title":"Get element","text":""},{"location":"ui-label/#text","title":"Text","text":""},{"location":"ui-label/#icon-texture","title":"Icon texture","text":""},{"location":"ui-label/#reset-display-content","title":"Reset display content","text":"
    label.resetDisplayContent({\ntext: '',\n\nicon: undefined, iconFrame: undefined,\niconSize: undefined,\n\naction: undefined, actionFrame: undefined,\nactionSize: undefined,\n\n})\n

    Run label.layout() after this method, to layout children again.

    "},{"location":"ui-label/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-menu/","title":"Menu","text":""},{"location":"ui-menu/#introduction","title":"Introduction","text":"

    A container with buttons and sub-menu.

    "},{"location":"ui-menu/#live-demos","title":"Live demos","text":""},{"location":"ui-menu/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-menu/#install-plugin","title":"Install plugin","text":""},{"location":"ui-menu/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-menu/#import-plugin","title":"Import plugin","text":""},{"location":"ui-menu/#import-class","title":"Import class","text":""},{"location":"ui-menu/#add-menu-object","title":"Add menu object","text":"
    var menu = scene.rexUI.add.menu({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n\n// popup: true,\n// orientation: 1,\n// subMenuSide: undefined,\nitems: [],\n\ncreateBackgroundCallback: function(items) {\nvar scene = items.scene;\n// background = ...\nreturn background;\n},\ncreateBackgroundCallbackScope: undefined,\n\ncreateButtonCallback: function(item, index, items) {\nvar scene = item.scene;\n// var isFirstButton = (index === 0);\n// var isLastButton = (index === (items.length - 1));\n// container = ...\nreturn container;\n},\ncreateButtonCallbackScope: undefined,\n\neaseIn: 0,\n// easeIn: {\n//     duration: 500,\n//     orientation: undefined,\n//     ease: 'Cubic'\n// },\ntransitIn: undefined,\n// transitIn: function(menu, duration) {  },\n\neaseOut: 0,\n// easeOut: {\n//     duration: 100,\n//     orientation: undefined,\n//     ease: 'Linear'\n// },\ntransitOut: undefined,\n// transitOut: function(menu, duration) {  },\n\n// expandEvent: 'button.click',\n\n// pointerDownOutsideCollapsing: true,\n\n// childrenKey: 'children',\n\nname: '',\n// draggable: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-menu/#custom-class","title":"Custom class","text":""},{"location":"ui-menu/#collapse","title":"Collapse","text":""},{"location":"ui-menu/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-menu/#events","title":"Events","text":""},{"location":"ui-namevaluelabel/","title":"Name value label","text":""},{"location":"ui-namevaluelabel/#introduction","title":"Introduction","text":"

    A container with name text, value text in a row, with a horizontal line progress bar, and an icon, background.

    "},{"location":"ui-namevaluelabel/#live-demos","title":"Live demos","text":""},{"location":"ui-namevaluelabel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-namevaluelabel/#install-plugin","title":"Install plugin","text":""},{"location":"ui-namevaluelabel/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-namevaluelabel/#import-plugin","title":"Import plugin","text":""},{"location":"ui-namevaluelabel/#import-class","title":"Import class","text":""},{"location":"ui-namevaluelabel/#add-label-object","title":"Add label object","text":"
    var label = scene.rexUI.add.nameValueLabel({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\nbackground: backgroundGameObject,\nicon: iconGameObject,\niconMask: false,\n\nnameText: nameTextGameObject,\nvalueText: valueTextGameObject,\n// valueTextFormatCallback: function(value, min, max) {\n//     return `${value}/${max}`;\n// },\nbar: {\ntrackColor: undefined,\ntrackThickness: 2,\ntrackStrokeColor: undefined,\nbarColor: undefined,\nbarColor2: undefined,\n\nskewX: 0,\n\nrtl: false,\n\neaseValue: {\nduration: 0,\nease: 'linear'\n},\n}, // bar: undefined,\n\naction: actionGameObject,\nactionMask: false,\n\nalign: {        text: 'bottom',  // 'top', 'center', 'bottom'\n},\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0, iconTop: 0, iconBottom: 0,\nname: 0, value: 0,\nbar:0, barBottom: 0, barLeft: 0, barRight: 0,\ntext: 0,\nactionTop: 0, actionBottom: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-namevaluelabel/#custom-class","title":"Custom class","text":""},{"location":"ui-namevaluelabel/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    label.layout();\n

    See also - dirty

    "},{"location":"ui-namevaluelabel/#get-element","title":"Get element","text":""},{"location":"ui-namevaluelabel/#name-text","title":"Name text","text":""},{"location":"ui-namevaluelabel/#value-text","title":"Value text","text":""},{"location":"ui-namevaluelabel/#bar","title":"Bar","text":""},{"location":"ui-namevaluelabel/#icon-texture","title":"Icon texture","text":""},{"location":"ui-namevaluelabel/#set-value","title":"Set value","text":"

    Set valueText game object and bar game object.

    label.setValue(value, min, max);\n

    Will invoke valueTextFormatCallback callback.

    "},{"location":"ui-namevaluelabel/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-numberbar/","title":"Number bar","text":""},{"location":"ui-numberbar/#introduction","title":"Introduction","text":"

    A container with an icon, slider, text, and background.

    "},{"location":"ui-numberbar/#live-demos","title":"Live demos","text":""},{"location":"ui-numberbar/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-numberbar/#install-plugin","title":"Install plugin","text":""},{"location":"ui-numberbar/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-numberbar/#import-plugin","title":"Import plugin","text":""},{"location":"ui-numberbar/#import-class","title":"Import class","text":""},{"location":"ui-numberbar/#add-number-bar-object","title":"Add number bar object","text":"
    var numberBar = scene.rexUI.add.numberBar({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nbackground: backgroundGameObject,\nicon: iconGameObject,\niconMask: false,\nslider: {\nbackground: backgroundGameObject,\n/* \n        background: { \n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\ntrack: trackGameObject,\n/* \n        track: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */    indicator: indicatorGameObject,\n/* \n        indicator: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\nthumb: thumbGameObject,\n/* \n        thumb: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\ninput: 'drag',\ngap: undefined,        easeValue: {\nduration: 0,\nease: 'Linear'\n},\n}\ntext: textGameObject,\n\nvaluechangeCallback: function(newValue, oldValue, numberBar) {\n// numberBar.text = Math.round(Phaser.Math.Linear(0, 100, newValue));\n}\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0,\nslider: 0,\n},\n\nenable: true,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-numberbar/#custom-class","title":"Custom class","text":""},{"location":"ui-numberbar/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    numberBar.layout();\n

    See also - dirty

    "},{"location":"ui-numberbar/#get-element","title":"Get element","text":""},{"location":"ui-numberbar/#enable","title":"Enable","text":""},{"location":"ui-numberbar/#value","title":"Value","text":"

    Change value will also change the position of slider thumb and width of slider indicator.

    "},{"location":"ui-numberbar/#ease-value","title":"Ease value","text":""},{"location":"ui-numberbar/#text","title":"Text","text":""},{"location":"ui-numberbar/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-numberbar/#events","title":"Events","text":""},{"location":"ui-overlapsizer/","title":"Overlap sizer","text":""},{"location":"ui-overlapsizer/#introduction","title":"Introduction","text":"

    Layout children game objects overlapped.

    "},{"location":"ui-overlapsizer/#live-demos","title":"Live demos","text":""},{"location":"ui-overlapsizer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-overlapsizer/#install-plugin","title":"Install plugin","text":""},{"location":"ui-overlapsizer/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-overlapsizer/#import-plugin","title":"Import plugin","text":""},{"location":"ui-overlapsizer/#import-class","title":"Import class","text":""},{"location":"ui-overlapsizer/#add-sizer-object","title":"Add sizer object","text":"
    var sizer = scene.rexUI.add.overlapSizer({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n// space: { left: 0, right:0, top:0, bottom:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    or

    var sizer = scene.rexUI.add.overlapSizer(x, y, {\n// width: undefined,\n// height: undefined,\n// anchor: undefined,\n// space: { left: 0, right:0, top:0, bottom:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    or

    var sizer = scene.rexUI.add.overlapSizer(x, y, width, height, {\n// anchor: undefined,\n// space: { left: 0, right:0, top:0, bottom:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-overlapsizer/#custom-class","title":"Custom class","text":""},{"location":"ui-overlapsizer/#add-background","title":"Add background","text":"
    sizer.addBackground(child);\n

    or

    sizer.addBackground(child, {left: 0, right: 0, top: 0, bottom: 0}, key);\n
    "},{"location":"ui-overlapsizer/#add-child","title":"Add child","text":"

    Add a game obejct to sizer

    sizer.add(child);\n

    or

    sizer.add(child,\n{\nkey: undefined,\nalign: 'center',\noffsetX: 0,\noffsetY: 0,\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nexpand: true,        minWidth: undefined,\nminHeight: undefined\n}\n);\n

    or

    sizer.add(child, key, align, padding, expand, minWidth, minHeight, offsetX, offsetY);\n
    "},{"location":"ui-overlapsizer/#layout-children","title":"Layout children","text":"

    Arrange position of all children.

    sizer.layout();\n

    See also - dirty

    "},{"location":"ui-overlapsizer/#remove-child","title":"Remove child","text":""},{"location":"ui-overlapsizer/#get-element","title":"Get element","text":""},{"location":"ui-overlapsizer/#other-properties","title":"Other properties","text":"

    See base sizer object, container-lite.

    "},{"location":"ui-overview/","title":"Overview","text":""},{"location":"ui-overview/#install-ui-plugins","title":"Install ui plugins","text":""},{"location":"ui-overview/#install-from-minify-file","title":"Install from minify file","text":"
    1. Download minify file (link).
    2. Install ui plugin in preload stage
      scene.load.scenePlugin({\nkey: 'rexuiplugin',\nurl: filePath,\nsceneKey: 'rexUI'\n});\n
    "},{"location":"ui-overview/#install-from-npm-package","title":"Install from npm package","text":"
    1. Install rex plugins
      npm i phaser3-rex-plugins\n
    2. Install ui plugin in configuration of game
      import RexUIPlugin from 'phaser3-rex-plugins/templates/ui/ui-plugin.js';\n\nvar config = {\n// ...\nplugins: {\nscene: [{\nkey: 'rexUI',\nplugin: RexUIPlugin,\nmapping: 'rexUI'\n},\n// ...\n]\n}\n// ...\n};\nvar game = new Phaser.Game(config);\n
    "},{"location":"ui-overview/#using-typescript-declaration-file","title":"Using typescript declaration file","text":"
    import RexUIPlugin from 'phaser3-rex-plugins/templates/ui/ui-plugin.js';\n\nclass Game extends Phaser.Scene {\nrexUI: RexUIPlugin;  // Declare scene property 'rexUI' as RexUIPlugin type\n\ncreate() {\nvar sizer = this.rexUI.add.sizer({\n// ...\n})\n}\n}\n\nvar game = new Phaser.Game({\nscene: Game,\n// ...\nplugins: {\nscene: [{\nkey: 'rexUI',\nplugin: RexUIPlugin,\nmapping: 'rexUI'\n},\n// ...\n]\n}\n// ...\n});\n

    See this example

    "},{"location":"ui-overview/#list-of-ui-plugins","title":"List of ui plugins","text":""},{"location":"ui-overview/#ui-components","title":"UI components","text":"
    1. Badge label: A container with badges above a main item.
    2. Buttons: A container with a group of buttons.
    3. Color componets: Edit color value by RGB, or HSV input fields.
    4. Color input: Color number or color string input field.
    5. Color picker: Pick color value from H and SV palettes.
    6. Confirm dialog: Using json style to create confirm dialog.
    7. Dialog: A container with a title, content, buttons and background.
    8. Drop down list: A label can open a drop-down list panel.
    9. File selector button: A transparent file chooser button above a Label.
    10. Fix-width-buttons: A container with a group of fix-width buttons.
    11. Fix-width-sizer: Layout children game objects into lines.
    12. Folder: A container with a title, foldable child, and background.
    13. Grid-buttons: A container with a group of buttons in grids.
    14. Grid-sizer: Layout children game objects in grids.
    15. Grid-table: A container with a grid table, slider, and scroller.
    16. Holy grail: Layout elements in Holy grail style.
    17. Knob: A knob button based on circular progress.
    18. Label: A container with an icon, text, and background.
    19. Menu: A container with buttons and sub-menu.
    20. Name-value label: A container with name text, value text in a row, with a horizontal line progress bar, and an icon, background.
    21. Number-bar: A container with an icon, slider, text, and background.
    22. Overlap sizer: Layout children game objects overlapped.
    23. Pages: A container with pages, only current page is visible.
    24. Perspective card: A container with front and back faces.
    25. Scroll-able panel: A container with a panel, slider, and scroller.
    26. Simple drop down list: Using plain object to create drop down list.
    27. Simple label: Using json style to create label.
    28. Sizer: Layout children game objects.
    29. Slider: A container with a track, indicator, thumb and background.
    30. Tab-pages: A container with tabs and pages, only current page is visible.
    31. Tabs: A container with 4 groups of buttons around a center panel.
    32. TextArea: A container with a text, slider, and scroller.
    33. Textbox: A container with an icon, (typing and paging) text, and background.
    34. Title label: A container with title, text in two rows, and an icon, background.
    35. Toast: Show text message for a short while.
    36. Tweaker: Fine-tuning properties of target object.

    Scroll-able table

    There are 3 kinds of scroll-able tables :

    "},{"location":"ui-overview/#basic-container","title":"Basic container","text":"
    1. ContainerLite: Control the position and angle of children game objects.
      var container = scene.rexUI.add.container(x, y);\n
      or
      class MyContainer extends RexPlugins.UI.Container {\nconstructor(scene, x, y, width, height, children) {\nsuper(scene, x, y, width, height, children);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#background-objects","title":"Background objects","text":"
    1. Round-rectangle: Round rectangle shape.
      var shape = scene.rexUI.add.roundRectangle(x, y, width, height, radius, fillColor);\n
      or
      class MyRoundRectangle extends RexPlugins.UI.RoundRectangle {\nconstructor(scene, x, y, width, height, radius, fillColor, fillAlpha) {\nsuper(scene, x, y, width, height, radius, fillColor, fillAlpha);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    2. Nine-patch: Stretchable imaage.
      var ninePatch = scene.rexUI.add.ninePatch(x, y, width, height, key, columns, rows, config);\n
      var ninePatch = scene.rexUI.add.ninePatch2(x, y, width, height, key, columns, rows, config);\n
      or
      class MyNinePatch extends RexPlugins.UI.NinePatch {\nconstructor(scene, x, y, width, height, key, columns, rows, config) {\nsuper(scene, x, y, width, height, key, columns, rows, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
      class MyNinePatch extends RexPlugins.UI.NinePatch2 {\nconstructor(scene, x, y, width, height, key, columns, rows, config) {\nsuper(scene, x, y, width, height, key, columns, rows, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    3. Custom shapes: Custom shapes on shape.
      var customShapes = scene.rexUI.add.customShapes(x, y, width, height, config);\n
      or
      class MyCustomShapes extends RexPlugins.UI.CustomShapes {\nconstructor(scene, x, y, width, height, config) {\nsuper(scene, x, y, width, height, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    4. Custom progress: Custom progress on shape.
      var customProgress = scene.rexUI.add.customProgress(x, y, width, height, config);\n
      or
      class MyCustomProgress extends RexPlugins.UI.CustomProgress {\nconstructor(scene, x, y, width, height, config) {\nsuper(scene, x, y, width, height, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}    
    5. Canvas-round-rectangle: Round rectangle on canvas.
      var shape = scene.rexUI.add.roundRectangleCanvas(x, y, width, height, radiusConfig, fillStyle, strokeStyle, lineWidth, fillColor2, isHorizontalGradient);\n
      or
      class MyRoundRectangleCanvas extends RexPlugins.UI.RoundRectangleCanvas {\nconstructor(scene, x, y, width, height, radiusConfig, fillStyle, strokeStyle, lineWidth, fillColor2, isHorizontalGradient) {\nsuper(scene, x, y, width, height, radiusConfig, fillStyle, strokeStyle, lineWidth, fillColor2, isHorizontalGradient);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    6. Cover: Rectangle shape covered full window, and block all touch events.
      var shape = scene.rexUI.add.cover(config);\n
      or
      class MyCover extends RexPlugins.UI.Cover {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#canvasshape-objects","title":"Canvas/Shape objects","text":"
    1. Canvas: Drawing on canvas.
      var canvas = scene.rexUI.add.canvas(x, y, width, height);\n// var canvas = scene.rexUI.add.canvas(x, y, width, height);\n
      or
      class MyCanvas extends RexPlugins.UI.Canvas {\nconstructor(scene, x, y, width, height) {\nsuper(scene, x, y, width, height);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    2. Circle mask image: Load a texture, then apply a circle mask.
      var image = scene.rexUI.add.circleMaskImage(x, y, key, frame, config);\n
      or
      class MyImage extends RexPlugins.UI.CircleMaskImage {\nconstructor(scene, x, y, key, frame, config) {\nsuper(scene, x, y, key, frame, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    3. Alpha mask image: Load a texture, then apply an alpha mask from another texture.
      var image = scene.rexUI.add.alphaMaskImage(x, y, key, frame, config);\n
      or
      class MyImage extends RexPlugins.UI.AlphaMaskImage {\nconstructor(scene, x, y, key, frame, config) {\nsuper(scene, x, y, key, frame, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    4. Circular progress shape: Circular progress bar shape.
      var circularProgress = scene.rexUI.add.circularProgress(x, y, radius, barColor, value, config);\n
      or
      class MyCircularProgress extends RexPlugins.UI.CircularProgress {\nconstructor(scene, x, y, radius, barColor, value, config) {\nsuper(scene, x, y, radius, barColor, value, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    5. Circular progress canvas: Circular progress bar on canvas
      var circularProgress = scene.rexUI.add.circularProgressCanvas(x, y, radius, barColor, value, config);\n
      or
      class MyCircularProgress extends RexPlugins.UI.CircularProgressCanvas {\nconstructor(scene, x, y, radius, barColor, value, config) {\nsuper(scene, x, y, radius, barColor, value, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    6. Line progress shape: Horizontal line progress bar shape.
      var lineProgress = scene.rexUI.add.lineProgress(x, y, width, height, barColor, value, config);\n
      or
      class MyLineProgress extends RexPlugins.UI.LinerProgress {\nconstructor(scene, x, y, width, height, barColor, value, config) {\nsuper(scene, x, y, width, height, barColor, value, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    7. Line progress canvas: Horizontal line progress bar filled with gradient color on canvas.
      var lineProgress = scene.rexUI.add.lineProgressCanvas(x, y, width, height, barColor, value, config);\n
      or
      class MyLineProgress extends RexPlugins.UI.LinerProgressCanvas {\nconstructor(scene, x, y, width, height, barColor, value, config) {\nsuper(scene, x, y, width, height, barColor, value, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    8. Checkbox: Checkbox input with drawing checker path animation.
      var checkbox = scene.rexUI.add.checkbox(x, y, width, height, color, config);\n
      or
      class MyCheckbox extends RexPlugins.UI.Checkbox {\nconstructor(scene, x, y, width, height, color, config) {\nsuper(scene, x, y, width, height, color, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    9. Toggle switch: Toggle-switch input.
      var toggleSwitch = scene.rexUI.add.toggleSwitch(x, y, width, height, color, config);\n
      or
      class MyToggleSwitch extends RexPlugins.UI.ToggleSwitch {\nconstructor(scene, x, y, width, height, color, config) {\nsuper(scene, x, y, width, height, color, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    10. Triangle: Trangle shape inside a rectangle bounds.
      var triangle = scene.rexUI.add.triangle(x, y, width, height, fillColor, fillAlpha);\n
      or
      class MyTriangle extends RexPlugins.UI.Triangle {\nconstructor(scene, x, y, width, height, fillColor, fillAlpha) {\nsuper(scene, x, y, width, height, fillColor, fillAlpha);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    11. Chart: Draw chart on canvas.
    "},{"location":"ui-overview/#colored-text-objects","title":"Colored text objects","text":"
    1. BBCode text: Drawing text with BBCode protocol.
      var txt = scene.rexUI.add.BBCodeText(x, y, text, style);\n
      or
      class MyText extends RexPlugins.UI.BBCodeText {\nconstructor(scene, x, y, text, style) {\nsuper(scene, x, y, text, style);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    2. Tag text: Displays text with multi-color, font face, or font size with tags.
      var txt = scene.rexUI.add.tagText(x, y, text, style);\n
      or
      class MyText extends RexPlugins.UI.TagText {\nconstructor(scene, x, y, text, style) {\nsuper(scene, x, y, text, style);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    3. Dynamic text: Control position, angle of each character drawn on a canvas.
      var txt = scene.rexUI.add.dynamicText(config);\n
      or
      class MyText extends RexPlugins.UI.DynamicText {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    4. Text player: Typing characters on dynamic text, waiting click or key enter, play sound effect or backgroun music.
      var txt = scene.rexUI.add.textPlayer(config);\n
      or
      class MyText extends RexPlugins.UI.TextPlayer {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    5. Canvas input: An invisible Input DOM element to receive character input and display on DynamicText.
      var txt = scene.rexUI.add.canvasInput(config);\n
      or
      class MyText extends RexPlugins.UI.CanvasInput {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#behaviors-of-text","title":"Behaviors of text","text":"
    1. Hidden text edit: Create an invisible Input DOM element to edit string content.
      var hiddenEdit = this.rexUI.add.hiddenEdit(textObject, config);\n
    2. Text edit: Create an input text object above a text object to edit string content.
      scene.rexUI.edit(textObject, config);\n// scene.rexUI.edit(textObject, config, onClose);\n
    3. Wrap-expand text
      var textObject = scene.rexUI.wrapExpandText(textObject);\n// var textObject = scene.rexUI.wrapExpandText(textObject, minWidth);\n
    4. Font-size-expand text
      var textObject = scene.rexUI.fontSizeExpandText(textObject);    
      or
      var textObject = scene.rexUI.fontSizeExpandText(textObject, {\nfitHeight: true\n});\n
    5. Set font-size to fit width
      var textObject = scene.rexUI.setFontSizeFitToWidth(textObject, width);\n
    6. Text typing
      var textTyping = scene.rexUI.textTyping(textObject, config);\n
    7. Text page
      var textPage = scene.rexUI.textPage(textObject, config);\n
    "},{"location":"ui-overview/#scaled-image","title":"Scaled image","text":"
    1. Image box: Keep aspect ratio of image game object after scale-down resizing.
      var image = scene.rexUI.add.imageBox(x, y, texture, frame, config);\n
      or
      class MyTransitionImage extends RexPlugins.UI.ImageBox {\nconstructor(scene, x, y, texture, frame, config) {\nsuper(scene, x, y, texture, frame, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#transition-image","title":"Transition image","text":"
    1. Transition image: Transit texture to another one.
      var image = scene.rexUI.add.transitionImage(x, y, texture, frame, config);\n
      or
      class MyTransitionImage extends RexPlugins.UI.TransitionImage {\nconstructor(scene, x, y, texture, frame, config) {\nsuper(scene, x, y, texture, frame, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    2. Transition image pack: Transit texture to another one, with some pre-build effects, extended from TransitionImage.
      var image = scene.rexUI.add.transitionImagePack(x, y, texture, frame, config);\n
      or
      class MyTransitionImagePack extends RexPlugins.UI.TransitionImagePack {\nconstructor(scene, x, y, texture, frame, config) {\nsuper(scene, x, y, texture, frame, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#states-game-objects","title":"States game objects","text":"
    1. States image: Using plain object to create Image game object, with active, hover, disable styles.
      var image = scene.rexUI.add.statesImage(config);\n
      or
      class MyStatesImage extends RexPlugins.UI.StatesImage {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    2. States text: Using plain object to create Text game object, with active, hover, disable styles.
      var txt = scene.rexUI.add.statesText(config);\n
      or
      class MyStatesText extends RexPlugins.UI.StatesText {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    3. States round-rectangle: Using plain object to create round rectangle game object, with active, hover, disable styles.
      var rect = scene.rexUI.add.statesRoundRectangle(config);\n
      or
      class MyStatesRoundRectangle extends RexPlugins.UI.StatesRoundRectangle {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#dom-game-objects","title":"Dom game objects","text":"
    1. Input text: Input DOM element.
      var image = scene.rexUI.add.inputText(config);\n
      or
      class MyInputText extends RexPlugins.UI.InputText {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    2. File chooser: Create a transparent file chooser button (<input type=\"file\">).
      var image = scene.rexUI.add.fileChooser(config);\n
      or
      class MyFileChooser extends RexPlugins.UI.FileChooser {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    3. File drop zone: Create a div element for dropping file(s).
      var image = scene.rexUI.add.fileDropZone(config);\n
      or
      class MyFileDropZpne extends RexPlugins.UI.FileDropZpne {\nconstructor(scene, config) {\nsuper(scene, config);\n// ...\nscene.add.existing(this);\n}\n// ...\n}\n
    "},{"location":"ui-overview/#touch-input","title":"Touch input","text":"
    1. Click: Fires 'click' event when touch releasd after pressed.
      var click = scene.rexUI.add.click(gameObject, config);\n
      or
      var click = new RexPlugins.UI.Click(gameObject, config);\n
    2. Click-Outside: Fires 'clickoutside' event when pointer-down or pointer-up outside of game object.
      var clickOutside = scene.rexUI.add.clickOutside(gameObject, config);\n
      or
      var clickOutside = new RexPlugins.UI.ClickOutside(gameObject, config);\n
    3. In touching: Fires 'intouch' event every tick when pressing on a game object.
      var inTouching = scene.rexUI.add.inTouching(gameObject, config);\n
      or
      var inTouching = new RexPlugins.UI.inTouching(gameObject, config);\n
    4. Tap: Get tap/multi-taps events of a game object.
      var tap = scene.rexUI.add.tap(gameObject, config);\n
      or
      var tap = new RexPlugins.UI.Tap(gameObject, config);\n
    5. Press: Get press events of a game object.
      var press = scene.rexUI.add.press(gameObject, config);\n
      or
      var press = new RexPlugins.UI.Press(gameObject, config);\n
    6. Swipe: Get swipe events of a game object.
      var swipe = scene.rexUI.add.swipe(gameObject, config);\n
      or
      var swipe = new RexPlugins.UI.Swipe(gameObject, config);\n
    7. Pan: Get pan events of a game object.
      var pan = scene.rexUI.add.pan(gameObject, config);\n
      or
      var pan = new RexPlugins.UI.Pan(gameObject, config);\n
    8. Pinch: Get scale factor from 2 dragging touch pointers.
      var pinch = scene.rexUI.add.pinch(config);\n
      or
      var pinch = new RexPlugins.UI.Pinch(config);\n
    9. Rotste: Get spin angle from 2 dragging touch pointers.
      var rotate = scene.rexUI.add.rotate(config);\n
      or
      var rotate = new RexPlugins.UI.Rotate(config);\n
    10. Touch event stop: Stop touch events propagation.
      var touchEventStop = scene.rexUI.add.touchEventStop(gameObject, config);\n
      or
      var touchEventStop = new RexPlugins.UI.TouchEventStop(gameObject, config);\n
    "},{"location":"ui-overview/#behaviors","title":"Behaviors","text":"
    1. Modal promise: Modal behavior wrapped into promise.
      scene.rexUI.modalPromise(gameObject, config)\n.then(function(closeEventData){ })\n
    2. Flip: Flip game object to another face by scaling width/height.
      var flip = scene.rexUI.add.flip(gameObject, config);\n
      or
      var flip = new RexPlugins.UI.Flip(gameObject, config);\n
    3. Fade in, fade out destroy
      scene.rexUI.fadeIn(gameObject, duration);\n// scene.rexUI.fadeIn(gameObject, duration, alpha);\n
      scene.rexUI.fadeOutDestroy(gameObject, duration);\n
    4. Ease-move to, ease-move from
      scene.rexUI.easeMoveTo(gameObject, duration, x, y);\n// scene.rexUI.easeMoveTo(gameObject, duration, x, y, ease);\n
      scene.rexUI.easeMoveFrom(gameObject, duration, x, y);\n// scene.rexUI.easeMoveFrom(gameObject, duration, x, y, ease);\n
    5. Shake
      scene.rexUI.shake(gameObject, config);\n
    6. Perspective: Snapshot children of containerlite, to a perspective render texture.
      var perspective = scene.rexUI.add.perspective(gameObject, config);\n
      or
      var perspective = new RexPlugins.UI.Perspective(gameObject, config);\n
    7. Skew: Snapshot children of containerlite, to a skew render texture.
      var skew = scene.rexUI.add.skew(gameObject, config);\n
      or
      var skew = new RexPlugins.UI.Skew(gameObject, config);\n
    "},{"location":"ui-overview/#helper-methods","title":"Helper methods","text":""},{"location":"ui-overview/#get-parent","title":"Get parent","text":""},{"location":"ui-overview/#showhide","title":"Show/hide","text":""},{"location":"ui-overview/#is-pointer-in-bounds","title":"Is pointer in bounds","text":"
    var isInBounds = scene.rexUI.isInTouching(gameObject);\n// var isInBounds = scene.rexUI.isInTouching(gameObject, pointer);\n
    "},{"location":"ui-overview/#event-promise","title":"Event promise","text":""},{"location":"ui-overview/#view-port","title":"View port","text":"

    View port is a rectangle of current visible area.

    var viewport = scene.rexUI.viewport;\n

    Which will be changed after resizing

    scene.scale.on('resize', function() {\nvar viewport = scene.rexUI.viewport;\n/*\n    sizer\n        .setPosition(viewport.centerX, viewport.centerY)\n        .setMinSize(viewport.width, viewport.height)\n        .layout();\n    */\n});\n
    "},{"location":"ui-overview/#yaml","title":"YAML","text":"

    js-yaml

    try {\nconst doc = scene.rexUI.yaml.load(yamlStrinig);\n} catch (e) {\n// ...\n}\n
    scene.rexUI.yaml.loadAll(data, function (doc) {\n// ...\n});\n
    "},{"location":"ui-overview/#demos","title":"Demos","text":""},{"location":"ui-pages/","title":"Pages","text":""},{"location":"ui-pages/#introduction","title":"Introduction","text":"

    A container with pages, only current page is visible.

    "},{"location":"ui-pages/#live-demos","title":"Live demos","text":""},{"location":"ui-pages/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-pages/#install-plugin","title":"Install plugin","text":""},{"location":"ui-pages/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-pages/#import-plugin","title":"Import plugin","text":""},{"location":"ui-pages/#import-class","title":"Import class","text":""},{"location":"ui-pages/#add-pages-object","title":"Add pages object","text":"
    var pages = scene.rexUI.add.pages({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n// space: { left: 0, right:0, top:0, bottom:0 },\n// swapMode: 0,\n// fadeIn: 0,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-pages/#custom-class","title":"Custom class","text":""},{"location":"ui-pages/#add-background","title":"Add background","text":"
    pages.addBackground(child);\n

    or

    pages.addBackground(child, {left: 0, right: 0, top: 0, bottom: 0}, key);\n
    "},{"location":"ui-pages/#add-page","title":"Add page","text":"
    pages.addPage(child, key, align, padding, expand);\n// pages.add(child, key, align, padding, expand);\n

    or

    pages.addPage(child, {\nkey: 0,\nalign: Phaser.Display.Align.TOP_LEFT,\npadding: {left: 0, right: 0, top: 0, bottom: 0}, expand: true\n}\n);\n// pages.add(child, config);\n
    "},{"location":"ui-pages/#swap-to-page","title":"Swap to page","text":"
    pages.swapPage(key);\n// pages.swapPage(key, fadeInDuration);\n

    Note

    This method will run pages.layout() to arrange position of current page.

    "},{"location":"ui-pages/#page-name","title":"Page name","text":""},{"location":"ui-pages/#page-object","title":"Page object","text":""},{"location":"ui-pages/#fade-in-duration","title":"Fade in duration","text":"
    pages.setFadeInDuration(duration);\n
    "},{"location":"ui-pages/#get-element","title":"Get element","text":""},{"location":"ui-pages/#other-properties","title":"Other properties","text":"

    See base sizer object, container-lite.

    "},{"location":"ui-pages/#events","title":"Events","text":""},{"location":"ui-perspectivecard/","title":"Perspective card","text":""},{"location":"ui-perspectivecard/#introduction","title":"Introduction","text":"

    A container with front and back faces.

    WebGL only

    It only works in WebGL render mode.

    "},{"location":"ui-perspectivecard/#live-demos","title":"Live demos","text":""},{"location":"ui-perspectivecard/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-perspectivecard/#install-plugin","title":"Install plugin","text":""},{"location":"ui-perspectivecard/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-perspectivecard/#import-plugin","title":"Import plugin","text":""},{"location":"ui-perspectivecard/#import-class","title":"Import class","text":""},{"location":"ui-perspectivecard/#add-card-object","title":"Add card object","text":"
    var sizer = scene.rexUI.add.perspectiveCard({    // x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nback: backGameObject,\nfront: frontGameObject,\n// face: 0,\n// orientation: 0,\n// snapshotPadding: 0,\n\n// flip : {\n//     frontToBack: 0,\n//     backToFront: 1,\n//     duration: 1000,\n//     ease: 'Cubic',\n//     delay: 0,\n// }\n\n// space: { left: 0, right:0, top:0, bottom:0 },\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n\n});\n
    "},{"location":"ui-perspectivecard/#custom-class","title":"Custom class","text":""},{"location":"ui-perspectivecard/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    card.layout();\n

    See also - dirty

    "},{"location":"ui-perspectivecard/#get-element","title":"Get element","text":""},{"location":"ui-perspectivecard/#face","title":"Face","text":""},{"location":"ui-perspectivecard/#face-instances","title":"Face instances","text":""},{"location":"ui-perspectivecard/#flip-behavior","title":"Flip behavior","text":""},{"location":"ui-perspectivecard/#start-flipping","title":"Start flipping","text":"
    card.flip.flip();\n// card.flip.flip(duration, repeat);\n

    or

    Note

    "},{"location":"ui-perspectivecard/#stop-flipping","title":"Stop flipping","text":"
    card.flip.stop();\n
    "},{"location":"ui-perspectivecard/#set-duration","title":"Set duration","text":"
    card.flip.setDuration(duration);\n// card.flip.duration = duration;\n
    "},{"location":"ui-perspectivecard/#set-ease","title":"Set ease","text":"
    card.flip.setEase(ease);\n// card.flip.ease = ease;\n
    "},{"location":"ui-perspectivecard/#events","title":"Events","text":""},{"location":"ui-perspectivecard/#status","title":"Status","text":""},{"location":"ui-perspectivecard/#rotation","title":"Rotation","text":"

    Warning

    Can't be used with flipping mode.

    "},{"location":"ui-perspectivecard/#other-properties","title":"Other properties","text":"

    See overlapSizer.

    "},{"location":"ui-scrollablepanel/","title":"Scroll-able panel","text":""},{"location":"ui-scrollablepanel/#introduction","title":"Introduction","text":"

    A container with a panel, slider, and scroller.

    "},{"location":"ui-scrollablepanel/#live-demos","title":"Live demos","text":""},{"location":"ui-scrollablepanel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-scrollablepanel/#install-plugin","title":"Install plugin","text":""},{"location":"ui-scrollablepanel/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-scrollablepanel/#import-plugin","title":"Import plugin","text":""},{"location":"ui-scrollablepanel/#import-class","title":"Import class","text":""},{"location":"ui-scrollablepanel/#add-scroll-able-panel-object","title":"Add scroll-able panel object","text":"
    var panel = scene.rexUI.add.scrollablePanel({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nscrollMode: 0,\n\n// Elements\nbackground: backgroundGameObject,\n\npanel: {\nchild: panelGameObject,\nmask: {\npadding: 0,\n// updateMode: 0,\n}\n}.\n\nslider: {\n// background: sliderBackgroundGameObject,\ntrack: trackGameObject,\n/* \n        track: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\nthumb: thumbGameObject,\n/* \n        thumb: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\n// input: 'drag',\n// position: 'right',\n\n// hideUnscrollableSlider: false,\n// adaptThumbSize: false,\n// minThumbSize: undefined,\n\n// buttons: {\n//     top: topButtonGameObject, \n//     bottom: bottomButtonGameObject,\n//     left: leftButtonGameObject, \n//     right: rightButtonGameObject,\n//     step: 0.01,\n// }\n},\n\n// scroller: {\n//     threshold: 10,\n//     slidingDeceleration: 5000,\n//     backDeceleration: 2000,\n//     pointerOutRelease: true,\n//     dragRate: 1,\n// },\n\nmouseWheelScroller: false,\n// mouseWheelScroller: {\n//     focus: false,\n//     speed: 0.1\n// },\n\nclamplChildOY: false,\n\nheader: headerGameObject,\nfooter: footerGameObject,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\npanel: 0,\n// panel: {\n//    top: 0,\n//    bottom: 0,\n//    left: 0,\n//    right: 0,\n//},\n\nslider: 0,\n// slider: {\n//     top: 0,\n//     bottom: 0,\n//     left: 0,\n//     right: 0,\n// },\n\nheader: 0,\nfooter: 0,\n},\n\nexpand: {\nheader: true,\nfooter: true,\n},\n\nalign: {\nheader: 'center',\nfooter: 'center',\n},\n\n// name: '',\n// draggable: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-scrollablepanel/#child-bounds","title":"Child bounds","text":"

    Scrollable panel will mask child if child's bounds (child.getBounds()) is across mask area.

    Bitmaptext game object does not have getBounds method. User can inject it by

    const Components = Phaser.GameObjects.Components;\nPhaser.Class.mixin(\nPhaser.GameObjects.BitmapText,\n[\nComponents.ComputedSize,\nComponents.GetBounds\n]\n);\n
    "},{"location":"ui-scrollablepanel/#custom-class","title":"Custom class","text":""},{"location":"ui-scrollablepanel/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    panel.layout();\n

    See also - dirty

    "},{"location":"ui-scrollablepanel/#scroll-content","title":"Scroll content","text":""},{"location":"ui-scrollablepanel/#scroll-by-percentage","title":"Scroll by percentage","text":""},{"location":"ui-scrollablepanel/#scroll-to-topbottom","title":"Scroll to top/bottom","text":""},{"location":"ui-scrollablepanel/#scroll-to-child","title":"Scroll to child","text":"
    panel.scrollToChild(child, align);\n
    "},{"location":"ui-scrollablepanel/#enabledisable-scrolling","title":"Enable/disable scrolling","text":""},{"location":"ui-scrollablepanel/#event","title":"Event","text":""},{"location":"ui-scrollablepanel/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-scrollablepanel/#get-element","title":"Get element","text":""},{"location":"ui-scrollablepanel/#input-events","title":"Input events","text":"

    Two possible solution to register input events to children of scrollable panel.

    "},{"location":"ui-scrollablepanel/#set-children-interactive","title":"Set children interactive","text":"

    Applies click, tap, press, swipe behaviors on this scrollable panel, to detect input events of children.

    panel.setChildrenInteractive({\ntargets: targetSizers,\n\n// click: {mode: 'release', clickInterval: 100},\n\n// over: undefined,\n\n// press: {time: 251, threshold: 9},\n\n// tap: {time: 250, tapInterval: 200, threshold: 9, tapOffset: 10, \n//       taps: undefined, minTaps: undefined, maxTaps: undefined,},\n\n// swipe: {threshold: 10, velocityThreshold: 1000, dir: '8dir'},\n\n// inputEventPrefix: 'child.',\n})\n

    See Base-sizer/Set children interactive

    "},{"location":"ui-scrollablepanel/#events","title":"Events","text":"

    See Base-sizer/Set children interactive/Events

    "},{"location":"ui-scrollablepanel/#individual-input-events","title":"Individual input events","text":"

    When scene.input.topOnly is true (default value), input events of children elements will block the drag-scrolling of scrollable panel. (Assmue that the children elememts are above scrollable panel)

    "},{"location":"ui-scrollablepanel/#steps-of-building-a-scrollable-panel","title":"Steps of building a scrollable panel","text":"
    1. Build child panel from bottom to top
    2. Build scrollable panel
    3. Add interactive events
    "},{"location":"ui-scrollbar/","title":"Scroll bar","text":""},{"location":"ui-scrollbar/#introduction","title":"Introduction","text":"

    A container with slider, two buttons, and background.

    "},{"location":"ui-scrollbar/#live-demos","title":"Live demos","text":""},{"location":"ui-scrollbar/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-scrollbar/#install-plugin","title":"Install plugin","text":""},{"location":"ui-scrollbar/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-scrollbar/#import-plugin","title":"Import plugin","text":""},{"location":"ui-scrollbar/#import-class","title":"Import class","text":""},{"location":"ui-scrollbar/#add-scroll-bar-object","title":"Add scroll bar object","text":"
    var scrollBar = scene.rexUI.add.scrollBar({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\norientation: 0,\n\nbackground: backgroundGameObject,    slider: {\nbackground: backgroundGameObject,\n/* \n        background: { \n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\ntrack: trackGameObject,\n/* \n        track: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */    indicator: indicatorGameObject,\n/* \n        indicator: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\nthumb: thumbGameObject,\n/* \n        thumb: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\ninput: 'drag',\ngap: undefined,        easeValue: {\nduration: 0,\nease: 'Linear'\n},\n},\n\nbuttons: {\ntop: topButtonGameObject, bottom: bottomButtonGameObject,\nleft: leftButtonGameObject, right: rightButtonGameObject,\nstep: 0.01,\n}\n\nvaluechangeCallback: function(newValue, oldValue, scrollBar) {\n// scrollBar.text = Math.round(Phaser.Math.Linear(0, 100, newValue));\n}\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\nitem: 0\n},\n\nenable: true,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-scrollbar/#custom-class","title":"Custom class","text":""},{"location":"ui-scrollbar/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    scrollBar.layout();\n

    See also - dirty

    "},{"location":"ui-scrollbar/#get-element","title":"Get element","text":""},{"location":"ui-scrollbar/#enable","title":"Enable","text":""},{"location":"ui-scrollbar/#value","title":"Value","text":"

    Change value will also change the position of slider thumb and width of slider indicator.

    "},{"location":"ui-scrollbar/#ease-value","title":"Ease value","text":""},{"location":"ui-scrollbar/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-scrollbar/#events","title":"Events","text":""},{"location":"ui-simpledropdownlist/","title":"Simple drop down list","text":""},{"location":"ui-simpledropdownlist/#introduction","title":"Introduction","text":"

    Using plain object to create drop down list.

    "},{"location":"ui-simpledropdownlist/#live-demos","title":"Live demos","text":""},{"location":"ui-simpledropdownlist/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-simpledropdownlist/#install-plugin","title":"Install plugin","text":""},{"location":"ui-simpledropdownlist/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-simpledropdownlist/#import-plugin","title":"Import plugin","text":""},{"location":"ui-simpledropdownlist/#import-class","title":"Import class","text":""},{"location":"ui-simpledropdownlist/#add-drop-down-list-object","title":"Add drop-down list object","text":"
    var dropDownList = scene.rexUI.add.simpleDropDownList({\nlabel: SimpleLabelConfig,\n\nbutton: SimpleLabelConfig,\n\nlist: {\n// easeIn: 500,\n// transitIn: undefined,\n// transitIn: function(listPanel, duration) {  },\n\n// easeOut: 100,\n// transitOut: undefined,\n// transitOut: function(listPanel, duration) {  },\n\n// wrap: false,\n// width: undefined, \n// height: undefined,\n// alignParent: 'text',\n// alignSide: '',\n// expandDirection: 0,\n// bounds: undefined,\n\n// space: {\n//     left: 0, right: 0, top: 0, bottom: 0, item: 0,\n//     line: 0\n// },\n\n// draggable: false        \n}\n\n}, creators);\n
    "},{"location":"ui-simpledropdownlist/#custom-class","title":"Custom class","text":""},{"location":"ui-simpledropdownlist/#options","title":"Options","text":""},{"location":"ui-simpledropdownlist/#other-properties","title":"Other properties","text":"

    See drop-down list, label, sizer object, base sizer object, container-lite.

    "},{"location":"ui-simpledropdownlist/#events","title":"Events","text":"

    See Events section of drop-down list

    "},{"location":"ui-simplelabel/","title":"Simple label","text":""},{"location":"ui-simplelabel/#introduction","title":"Introduction","text":"

    Using plain object to create label.

    "},{"location":"ui-simplelabel/#live-demos","title":"Live demos","text":""},{"location":"ui-simplelabel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-simplelabel/#install-plugin","title":"Install plugin","text":""},{"location":"ui-simplelabel/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-simplelabel/#import-plugin","title":"Import plugin","text":""},{"location":"ui-simplelabel/#import-class","title":"Import class","text":""},{"location":"ui-simplelabel/#add-label-object","title":"Add label object","text":"
    var label = scene.rexUI.add.simpleLabel({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n// rtl: false,\n\n// States-Round-rectangle background\nbackground: {...},\n\n// Nine-slice background\nbackground: {\nkey: ,\nframe: ,\nleftWidth: , rightWidth: ,\ntopHeight: , bottomHeight: }\n\n// States-Image\nicon: {...},\n\n// iconMask: false,\n// squareFitIcon: false,\n// iconSize: undefined, iconWidth: undefined, iconHeight: undefined,\n\n// States-Text\ntext: {...},\n// text: {\n//     $type: 'text',\n//     ...\n// }\n\n// Create bbcodetext\n// text: {\n//     $type: 'bbcodetext',\n//     ...\n// },\n\n// Create bitmaptext\n// text: {\n//     $type: 'bitmaptext',\n//     key: '',\n//     size: undefined,\n//     color: undefined,\n// },\n\n// wrapText: false,\n\n// expandTextWidth: false,\n// expandTextHeight: false,\n\n// States-Image\naction: {...},\n\n// squareFitAction: false,\n// actionMask: false,\n// actionSize: undefined, actionWidth: undefined, actionHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n\nalign: undefined,  // 'left' | 'top' | 'right' | 'bottom' | 'center\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n}, creators);\n
    "},{"location":"ui-simplelabel/#custom-class","title":"Custom class","text":""},{"location":"ui-simplelabel/#reset-display-content","title":"Reset display content","text":"

    See label

    "},{"location":"ui-simplelabel/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    label.layout();\n

    See also - dirty

    "},{"location":"ui-simplelabel/#set-state","title":"Set state","text":"

    Override/restore properties of background game object.

    Note

    Assume that background game object is states round rectangle game object.)

    "},{"location":"ui-simplelabel/#active-state","title":"Active state","text":""},{"location":"ui-simplelabel/#hover-state","title":"Hover state","text":""},{"location":"ui-simplelabel/#disable-state","title":"Disable state","text":""},{"location":"ui-simplelabel/#other-properties","title":"Other properties","text":"

    See label, sizer object, base sizer object, container-lite.

    "},{"location":"ui-sizer/","title":"Sizer","text":""},{"location":"ui-sizer/#introduction","title":"Introduction","text":"

    Layout children game objects.

    It is inspired from wxSizer.

    "},{"location":"ui-sizer/#live-demos","title":"Live demos","text":""},{"location":"ui-sizer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-sizer/#install-plugin","title":"Install plugin","text":""},{"location":"ui-sizer/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-sizer/#import-plugin","title":"Import plugin","text":""},{"location":"ui-sizer/#import-class","title":"Import class","text":""},{"location":"ui-sizer/#add-sizer-object","title":"Add sizer object","text":"
    var sizer = scene.rexUI.add.sizer({\norientation: 0,\n// rtl: false,\n// startChildIndex: 0,\n\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n// space: { left: 0, right:0, top:0, bottom:0, item:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    or

    var sizer = scene.rexUI.add.sizer(x, y, {\norientation: 0,\n// rtl: false,\n// startChildIndex: 0,\n\n// width: undefined,\n// height: undefined,\n// anchor: undefined,\n// space: { left: 0, right:0, top:0, bottom:0, item:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    or

    var sizer = scene.rexUI.add.sizer(x, y, width, height, {\norientation: 0,\n// rtl: false,\n// startChildIndex: 0,\n// anchor: undefined,\n// space: { left: 0, right:0, top:0, bottom:0, item:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    or

    var sizer = scene.rexUI.add.sizer(x, y, width, height, orientation, {\n// rtl: false,\n// startChildIndex: 0,\n// anchor: undefined,\n// space: { left: 0, right:0, top:0, bottom:0, item:0 }\n});\n
    "},{"location":"ui-sizer/#custom-class","title":"Custom class","text":""},{"location":"ui-sizer/#add-background","title":"Add background","text":"
    sizer.addBackground(child);\n

    or

    sizer.addBackground(child, {left: 0, right: 0, top: 0, bottom: 0}, key);\n
    "},{"location":"ui-sizer/#add-child","title":"Add child","text":"

    Add a game obejct to sizer

    sizer.add(child);\n

    or

    sizer.add(child,\n{\nproportion: 0,\nalign: 'center',\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nexpand: false,\nkey: undefined,\nindex: undefined,\nminWidth: undefined,\nminHeight: undefined,\nfitRatio: 0,\n}\n);\n

    or

    sizer.add(child, proportion, align, padding, expand, key, index);\n// sizer.add(child, proportion, align, padding, expand, key, index);\n
    "},{"location":"ui-sizer/#insert-child","title":"Insert child","text":"
    sizer.insert(index, child, {\nproportion: 0,\nalign: 'center',\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nexpand: false,\nkey: undefined,\nminWidth: undefined,\nminHeight: undefined,\nfitRatio: 0,\n}\n);\n

    or

    sizer.insert(index, child, proportion, align, padding, expand, key);\n
    "},{"location":"ui-sizer/#insert-at-position","title":"Insert at position","text":"
    sizer.insertAtPosition(x, y, child, {\nproportion: 0,\nalign: 'center',\npadding: {left: 0, right: 0, top: 0, bottom: 0},\nexpand: false,\nkey: undefined,\nminWidth: undefined,\nminHeight: undefined,\nfitRatio: 0,\n}\n);\n

    or

    sizer.insertAtPosition(x, y, index, child, proportion, align, padding, expand, key);\n
    "},{"location":"ui-sizer/#add-space","title":"Add space","text":""},{"location":"ui-sizer/#layout-children","title":"Layout children","text":"

    Arrange position of all children.

    sizer.layout();\n

    See also - dirty

    "},{"location":"ui-sizer/#remove-child","title":"Remove child","text":""},{"location":"ui-sizer/#get-element","title":"Get element","text":""},{"location":"ui-sizer/#rtl","title":"RTL","text":""},{"location":"ui-sizer/#alignment-of-child","title":"Alignment of child","text":""},{"location":"ui-sizer/#proportion-of-child","title":"Proportion of child","text":""},{"location":"ui-sizer/#expand-of-child","title":"Expand of child","text":""},{"location":"ui-sizer/#other-properties","title":"Other properties","text":"

    See base sizer object, container-lite.

    "},{"location":"ui-slider/","title":"Slider","text":""},{"location":"ui-slider/#introduction","title":"Introduction","text":"

    A container with a track, indicator, thumb and background.

    "},{"location":"ui-slider/#live-demos","title":"Live demos","text":""},{"location":"ui-slider/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-slider/#install-plugin","title":"Install plugin","text":""},{"location":"ui-slider/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-slider/#import-plugin","title":"Import plugin","text":""},{"location":"ui-slider/#import-class","title":"Import class","text":""},{"location":"ui-slider/#add-slider-object","title":"Add slider object","text":"
    var slider = scene.rexUI.add.slider({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\nreverseAxis: false,\n\nbackground: backgroundGameObject,\n/* \n    background: { \n        radius: 0, \n        color: undefined, alpha: 1,\n        strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n        shape: undefined\n    }\n    */\n\ntrack: trackGameObject,\n/* \n    track: { \n        width: 1, height: 1,\n        radius: 0, \n        color: undefined, alpha: 1,\n        strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n        shape: undefined\n    }\n    */    indicator: indicatorGameObject,\n/* \n    indicator: { \n        width: 1, height: 1,\n        radius: 0, \n        color: undefined, alpha: 1,\n        strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n        shape: undefined\n    }\n    */\n\nthumb: thumbGameObject,\n/* \n    thumb: { \n        width: 1, height: 1,\n        radius: 0, \n        color: undefined, alpha: 1,\n        strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n        shape: undefined\n    }\n    */\n\ninput: 'drag',\n\nvalue: 0,\ngap: undefined,\neaseValue: {\nduration: 0,\nease: 'Linear'\n},    valuechangeCallback: function(newValue, oldValue, slider) {\n},\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n\nenable: true,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-slider/#custom-class","title":"Custom class","text":""},{"location":"ui-slider/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    slider.layout();\n

    See also - dirty

    "},{"location":"ui-slider/#get-element","title":"Get element","text":""},{"location":"ui-slider/#enable","title":"Enable","text":""},{"location":"ui-slider/#value","title":"Value","text":"

    Change value will also change the position of slider thumb and width of slider indicator.

    "},{"location":"ui-slider/#ease-value","title":"Ease value","text":""},{"location":"ui-slider/#gap","title":"Gap","text":""},{"location":"ui-slider/#events","title":"Events","text":""},{"location":"ui-slider/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-statesimage/","title":"States image","text":""},{"location":"ui-statesimage/#introduction","title":"Introduction","text":"

    Using plain object to create image game object, with active, hover, disable styles.

    "},{"location":"ui-statesimage/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-statesimage/#install-plugin","title":"Install plugin","text":""},{"location":"ui-statesimage/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-statesimage/#import-plugin","title":"Import plugin","text":""},{"location":"ui-statesimage/#import-class","title":"Import class","text":""},{"location":"ui-statesimage/#create-image-object","title":"Create image object","text":"
    var image = scene.rexUI.add.statesImage({\nx: 0,\ny: 0,\nkey:\n// frame:\n// tint: 0xffffff,\n// alpha: 1,\n// scale: 1,\n\n// Style override in active state\n// 'active.key': undefined,\n// 'active.frame': undefined,\n// 'active.tint': undefined,\n// 'active.alpha': undefined,\n// 'active.scale': undefined,\n\n// Style override in hover state\n// 'hover.key': undefined,\n// 'hover.frame': undefined,\n// 'hover.tint': undefined,\n// 'hover.alpha': undefined,\n// 'hover.scale': undefined,\n\n// Style override in disable state\n// 'disable.key': undefined,\n// 'disable.frame': undefined,\n// 'disable.tint': undefined,\n// 'disable.alpha': undefined,\n// 'disable.scale': undefined,\n\n});\n
    "},{"location":"ui-statesimage/#custom-class","title":"Custom class","text":""},{"location":"ui-statesimage/#set-state","title":"Set state","text":""},{"location":"ui-statesimage/#active-state","title":"Active state","text":""},{"location":"ui-statesimage/#hover-state","title":"Hover state","text":""},{"location":"ui-statesimage/#disable-state","title":"Disable state","text":""},{"location":"ui-statesimage/#other-properties","title":"Other properties","text":"

    See Image, game object

    "},{"location":"ui-statesroundrectangle/","title":"States round rectangle","text":""},{"location":"ui-statesroundrectangle/#introduction","title":"Introduction","text":"

    Using plain object to create round rectangle game object, with active, hover, disable styles.

    "},{"location":"ui-statesroundrectangle/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-statesroundrectangle/#install-plugin","title":"Install plugin","text":""},{"location":"ui-statesroundrectangle/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-statesroundrectangle/#import-plugin","title":"Import plugin","text":""},{"location":"ui-statesroundrectangle/#import-class","title":"Import class","text":""},{"location":"ui-statesroundrectangle/#create-shape-object","title":"Create shape object","text":"
    var rect = scene.rexUI.add.statesRoundRectangle({\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\n\n// color: 0xffffff,\n// alpha: 1,\n// strokeColor: 0xffffff,\n// strokeAlpha: 1,\n// strokeWidth: 2,\n// radius: 0,\n\n// Style override in active state\n// 'active.color': undefined,\n// 'active.alpha': undefined,\n// 'active.strokeColor': undefined,\n// 'active.strokeAlpha': undefined,\n// 'active.strokeWidth': undefined,\n// 'active.radius': undefined,\n// 'active.xxx': ...\n\n// Style override in hover state\n// 'hover.color': undefined,\n// 'hover.alpha': undefined,\n// 'hover.strokeColor': undefined,\n// 'hover.strokeAlpha': undefined,\n// 'hover.strokeWidth': undefined,\n// 'hover.radius': undefined,\n// 'hover.xxx': ...\n\n// Style override in disable state\n// 'disable.color': undefined,\n// 'disable.alpha': undefined,\n// 'disable.strokeColor': undefined,\n// 'disable.strokeAlpha': undefined,\n// 'disable.strokeWidth': undefined,\n// 'disable.radius': undefined,\n// 'disable.xxx': ...\n\n});\n
    "},{"location":"ui-statesroundrectangle/#custom-class","title":"Custom class","text":""},{"location":"ui-statesroundrectangle/#set-state","title":"Set state","text":""},{"location":"ui-statesroundrectangle/#active-state","title":"Active state","text":""},{"location":"ui-statesroundrectangle/#hover-state","title":"Hover state","text":""},{"location":"ui-statesroundrectangle/#disable-state","title":"Disable state","text":""},{"location":"ui-statesroundrectangle/#other-properties","title":"Other properties","text":"

    See Round rectangle, game object

    "},{"location":"ui-statestext/","title":"States text","text":""},{"location":"ui-statestext/#introduction","title":"Introduction","text":"

    Using plain object to create text game object, with active, hover, disable styles.

    "},{"location":"ui-statestext/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-statestext/#install-plugin","title":"Install plugin","text":""},{"location":"ui-statestext/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-statestext/#import-plugin","title":"Import plugin","text":""},{"location":"ui-statestext/#import-class","title":"Import class","text":""},{"location":"ui-statestext/#create-text-object","title":"Create text object","text":"
    var txt = scene.rexUI.add.statesText({\nx: 0,\ny: 0,\n\n// Normal text-style\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},\nalign: 'left',  // 'left'|'center'|'right'|'justify'\npadding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\nmaxLines: 0,\nlineSpacing: 0,\nfixedWidth: 0,\nfixedHeight: 0,\nrtl: false,\ntestString: '|M\u00c9qgy',\nwordWrap: {\nwidth: null,\ncallback: null,\ncallbackScope: null,\nuseAdvancedWrap: false\n},\nmetrics: false,\n// metrics: {\n//     ascent: 0,\n//     descent: 0,\n//     fontSize: 0\n// },\n\n// Style override in active state\n'active.fontFamily': undefined,\n'active.fontSize': undefined,\n'active.fontStyle': undefined,\n'active.backgroundColor': undefined,\n'active.color': undefined,\n'active.fill': undefined,\n'active.stroke': undefined,\n'active.strokeThickness': undefined,\n\n// Style override in hover state\n'hover.fontFamily': undefined,\n'hover.fontSize': undefined,\n'hover.fontStyle': undefined,\n'hover.backgroundColor': undefined,\n'hover.color': undefined,\n'hover.fill': undefined,\n'hover.stroke': undefined,\n'hover.strokeThickness': undefined,\n\n// Style override in disable state\n'disable.fontFamily': undefined,\n'disable.fontSize': undefined,\n'disable.fontStyle': undefined,\n'disable.backgroundColor': undefined,\n'disable.color': undefined,\n'disable.fill': undefined,\n'disable.stroke': undefined,\n'disable.strokeThickness': undefined,\n});\n
    "},{"location":"ui-statestext/#custom-class","title":"Custom class","text":""},{"location":"ui-statestext/#set-state","title":"Set state","text":""},{"location":"ui-statestext/#active-state","title":"Active state","text":""},{"location":"ui-statestext/#hover-state","title":"Hover state","text":""},{"location":"ui-statestext/#disable-state","title":"Disable state","text":""},{"location":"ui-statestext/#other-properties","title":"Other properties","text":"

    See Text, game object

    "},{"location":"ui-tabpages/","title":"Tab pages","text":""},{"location":"ui-tabpages/#introduction","title":"Introduction","text":"

    A container with tabs and pages, only current page is visible.

    "},{"location":"ui-tabpages/#live-demos","title":"Live demos","text":""},{"location":"ui-tabpages/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-tabpages/#install-plugin","title":"Install plugin","text":""},{"location":"ui-tabpages/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-tabpages/#import-plugin","title":"Import plugin","text":""},{"location":"ui-tabpages/#import-class","title":"Import class","text":""},{"location":"ui-tabpages/#add-tab-pages-object","title":"Add tab-pages object","text":"
    var tabPages = scene.rexUI.add.tabPages({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// background: backgroundGameObject,\n\ntabPosition: 'top',\nwrapTabs: false,\ntabs: {\n// width:\n// height:\n// rtl:\n\n// background: backgroundGameObject,\nexpand:\nalign:\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n},\nspace: { left: 0, right:0, top:0, bottom:0, item:0 }\n},\n\npages: {\nspace: { left: 0, right:0, top:0, bottom:0 },\nfadeIn: 0,\n},\n\nexpand: {\ntabs: false,\n},\n\nalign: {\ntabs: 'left',\n},\n\n// space: { left:0, right:0, top:0, bottom:0, item:0 },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-tabpages/#custom-class","title":"Custom class","text":""},{"location":"ui-tabpages/#add-page","title":"Add page","text":"

    Add a tab/page to last of tabs/pages.

    tabPages.addPage(key, tabGameObject, pageGameObject).layout();\n

    or

    tabPages.addPage({\n// key: undefined,\ntab: tabGameObject,\npage: pageGameObject\n}).layout();\n

    Note

    Invoke tabPages.layout() after adding pages.

    "},{"location":"ui-tabpages/#swap-to-page","title":"Swap to page","text":""},{"location":"ui-tabpages/#remove-page","title":"Remove page","text":""},{"location":"ui-tabpages/#get-element","title":"Get element","text":""},{"location":"ui-tabpages/#other-properties","title":"Other properties","text":"

    See base sizer object, container-lite, Pages, Buttons

    "},{"location":"ui-tabpages/#events","title":"Events","text":""},{"location":"ui-tabs/","title":"Tabs","text":""},{"location":"ui-tabs/#introduction","title":"Introduction","text":"

    A container with 4 groups of buttons around a center panel.

    "},{"location":"ui-tabs/#live-demos","title":"Live demos","text":""},{"location":"ui-tabs/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-tabs/#install-plugin","title":"Install plugin","text":""},{"location":"ui-tabs/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-tabs/#import-plugin","title":"Import plugin","text":""},{"location":"ui-tabs/#import-class","title":"Import class","text":""},{"location":"ui-tabs/#add-tabs-object","title":"Add Tabs object","text":"
    var tabs = scene.rexUI.add.tabs({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// Elements\nbackground: backgroundGameObject,\npanel: panelGameObject,\n\nleftButtons: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\nrightButtons: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\ntopButtons: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\nbottomButtons: [\nbuttonGameObject,\nbuttonGameObject,\n// ...\n],\nleftButtonsBackground: leftButtonsBackgroundGameObject,\nrightButtonsBackground: rightButtonsBackgroundGameObject,\ntopButtonsBackground: topButtonsBackgroundGameObject,\nbottomButtonsBackground: bottomButtonsBackgroundGameObject,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nleftButtonsOffset: 0,\nrightButtonsOffset: 0,\ntopButtonsOffset: 0,\nbottomButtonsOffset: 0,\n\nleftButton: 0,\nrightButton: 0,\ntopButton: 0,\nbottomButton: 0\n},\n\nclick: {\nmode: 'pointerup',\nclickInterval: 100\n}\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-tabs/#custom-class","title":"Custom class","text":""},{"location":"ui-tabs/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    tabs.layout();\n

    See also - dirty

    "},{"location":"ui-tabs/#other-properties","title":"Other properties","text":"

    See grid sizer object, base-sizer object.

    "},{"location":"ui-tabs/#events","title":"Events","text":""},{"location":"ui-tabs/#emit-button-click-event","title":"Emit button click event","text":""},{"location":"ui-tabs/#enabledisable-input-of-button","title":"Enable/disable input of button","text":""},{"location":"ui-tabs/#get-element","title":"Get element","text":""},{"location":"ui-tabs/#add-button","title":"Add button","text":""},{"location":"ui-tabs/#remove-button","title":"Remove button","text":""},{"location":"ui-tabs/#showhide-button","title":"Show/hide button","text":"

    Hidden elements won't be counted when layouting. Call tabs.layout(), or topSizer.layout() after show/hide any button.

    "},{"location":"ui-tabs/#for-each-button","title":"For each button","text":""},{"location":"ui-textarea/","title":"Text area","text":""},{"location":"ui-textarea/#introduction","title":"Introduction","text":"

    A container with a text, slider, and scroller.

    "},{"location":"ui-textarea/#live-demos","title":"Live demos","text":""},{"location":"ui-textarea/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-textarea/#install-plugin","title":"Install plugin","text":""},{"location":"ui-textarea/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-textarea/#import-plugin","title":"Import plugin","text":""},{"location":"ui-textarea/#import-class","title":"Import class","text":""},{"location":"ui-textarea/#add-text-area-object","title":"Add text-area object","text":"
    var textArea = scene.rexUI.add.textArea({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\n// Elements\nbackground: backgroundGameObject,\n\ntext: textGameObject,\n// textWidth: undefined,\n// textHeight: undefined,\n// textMask: false,\n// alwaysScrollable: false,\n\nslider: {\n// background: sliderBackgroundGameObject,\ntrack: trackGameObject,\n/* \n        track: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\n\n// indicator: indicatorGameObject,\nthumb: thumbGameObject,\n/* \n        thumb: { \n            width: 1, height: 1,\n            radius: 0, \n            color: undefined, alpha: 1,\n            strokeColor: undefined, strokeAlpha: 1, strokeWidth: 2,\n            shape: undefined\n        }\n        */\n\n// input: 'drag',\n// position: 'right',\n\n// hideUnscrollableSlider: false,\n// adaptThumbSize: false,\n// minThumbSize: undefined,\n\n// buttons: {\n//     top: topButtonGameObject, bottom: bottomButtonGameObject,\n//     left: leftButtonGameObject, right: rightButtonGameObject,\n//     step: 0.01,\n// }\n},\n\n// scroller: {\n//     threshold: 10,\n//     slidingDeceleration: 5000,\n//     backDeceleration: 2000,\n//     pointerOutRelease: true,\n//     dragRate: 1,\n// },\n\nmouseWheelScroller: false,\n// mouseWheelScroller: {\n//     focus: false,\n//     speed: 0.1\n// },\n\nclamplChildOY: false,\n\nheader: headerGameObject,\nfooter: footerGameObject,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\ntext: 0,\n// text: {\n//    top: 0,\n//    bottom: 0,\n//    left: 0,\n//    right: 0,\n//},\n\nslider: 0,\n// slider: {\n//     top: 0,\n//     bottom: 0,\n//     left: 0,\n//     right: 0,\n// },\n\nheader: 0,\nfooter: 0,\n},\n\nexpand: {\nheader: true,\nfooter: true,\n},\n\nalign: {\nheader: 'center',\nfooter: 'center',\n},\n\ncontent: '',\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-textarea/#custom-class","title":"Custom class","text":""},{"location":"ui-textarea/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    textArea.layout();\n

    See also - dirty

    "},{"location":"ui-textarea/#content","title":"Content","text":""},{"location":"ui-textarea/#scroll-content","title":"Scroll content","text":""},{"location":"ui-textarea/#scroll-by-percentage","title":"Scroll by percentage","text":""},{"location":"ui-textarea/#scroll-to-topbottom","title":"Scroll to top/bottom","text":""},{"location":"ui-textarea/#scroll-to-line","title":"Scroll to line","text":""},{"location":"ui-textarea/#enabledisable-scrolling","title":"Enable/disable scrolling","text":""},{"location":"ui-textarea/#event","title":"Event","text":""},{"location":"ui-textarea/#lines-count","title":"Lines count","text":"
    var linesCount = textArea.linesCount;\n
    "},{"location":"ui-textarea/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-textarea/#get-element","title":"Get element","text":""},{"location":"ui-textbox/","title":"Text box","text":""},{"location":"ui-textbox/#introduction","title":"Introduction","text":"

    A container with an icon, (typing and paging) text, and background.

    "},{"location":"ui-textbox/#live-demos","title":"Live demos","text":""},{"location":"ui-textbox/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-textbox/#install-plugin","title":"Install plugin","text":""},{"location":"ui-textbox/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-textbox/#import-plugin","title":"Import plugin","text":""},{"location":"ui-textbox/#import-class","title":"Import class","text":""},{"location":"ui-textbox/#add-textbox-object","title":"Add textbox object","text":"
    var textBox = scene.rexUI.add.textBox({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nlayoutMode: 0,\n\nrtl: false,\n\nbackground: backgroundGameObject,\n\ninnerBackground: backgroundGameObject,\n\ntitle: titleGameObject,\n\nseparator: separatorGameObject,\n\nicon: iconGameObject,\niconMask: false,\n\ntext: textGameObject,\n\naction: actionGameObject,\nactionMask: false,\n\nalign: {\ntitle: 'left',\ntext: 'left',\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ninnerLeft: 0, innerRight: 0, innerTop: 0, innerBottom: 0,\n\ntitle: 0, titleLeft: 0, titleRight: 0,\nicon: 0, iconTop: 0, iconBottom: 0,\ntext: 0, textLeft: 0, textRight: 0,\nactionTop: 0, actionBottom: 0,\n},\n\n// page: { \n//    maxLines: undefined,\n//    pageBreak: '\\f\\n',\n// },\n// typing: { \n//    wrap: false,\n//    speed: 333,    \n// },\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-textbox/#custom-class","title":"Custom class","text":""},{"location":"ui-textbox/#typing","title":"Typing","text":""},{"location":"ui-textbox/#typing-speed","title":"Typing speed","text":""},{"location":"ui-textbox/#page","title":"Page","text":""},{"location":"ui-textbox/#icon-texture","title":"Icon texture","text":""},{"location":"ui-textbox/#get-element","title":"Get element","text":""},{"location":"ui-textbox/#events","title":"Events","text":""},{"location":"ui-textbox/#other-properties","title":"Other properties","text":"

    See title label, sizer object, base sizer object, container-lite.

    "},{"location":"ui-titlelabel/","title":"Title label","text":""},{"location":"ui-titlelabel/#introduction","title":"Introduction","text":"

    A container with title, text in two rows, and an icon, background.

    "},{"location":"ui-titlelabel/#live-demos","title":"Live demos","text":""},{"location":"ui-titlelabel/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-titlelabel/#install-plugin","title":"Install plugin","text":""},{"location":"ui-titlelabel/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-titlelabel/#import-plugin","title":"Import plugin","text":""},{"location":"ui-titlelabel/#import-class","title":"Import class","text":""},{"location":"ui-titlelabel/#add-label-object","title":"Add label object","text":"
    var label = scene.rexUI.add.titleLabel({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\nlayoutMode: 0,\n\nrtl: false,\n\nbackground: backgroundGameObject,\n\ninnerBackground: backgroundGameObject,\n\ntitle: titleGameObject,\n\nseparator: separatorGameObject,\n\nicon: iconGameObject,\niconMask: false,\n\ntext: textGameObject,\n\naction: actionGameObject,\nactionMask: false,\n\nalign: {\ntitle: 'left',\ntext: 'left',\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ninnerLeft: 0, innerRight: 0, innerTop: 0, innerBottom: 0,\n\ntitle: 0, titleLeft: 0, titleRight: 0,\nicon: 0, iconTop: 0, iconBottom: 0,\ntext: 0, textLeft: 0, textRight: 0,\nactionTop: 0, actionBottom: 0,\n},\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-titlelabel/#custom-class","title":"Custom class","text":""},{"location":"ui-titlelabel/#layout-modes","title":"Layout modes","text":""},{"location":"ui-titlelabel/#mode-0","title":"Mode 0","text":"

    title, separator, and text will be layout vertically inside innerSizer, then layout with icon, action horizontally.

    Icon Title Action Separator Text"},{"location":"ui-titlelabel/#mode-1","title":"Mode 1","text":"

    icon, text, and action will be layout horizontally inside innerSizer, then layout with title, separator vertically.

    Title Separator Icon Text Action"},{"location":"ui-titlelabel/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    label.layout();\n

    See also - dirty

    "},{"location":"ui-titlelabel/#get-element","title":"Get element","text":""},{"location":"ui-titlelabel/#title","title":"Title","text":""},{"location":"ui-titlelabel/#text","title":"Text","text":""},{"location":"ui-titlelabel/#icon-texture","title":"Icon texture","text":""},{"location":"ui-titlelabel/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"ui-toast/","title":"Toast","text":""},{"location":"ui-toast/#introduction","title":"Introduction","text":"

    Show text message for a short while.

    "},{"location":"ui-toast/#live-demos","title":"Live demos","text":""},{"location":"ui-toast/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-toast/#install-plugin","title":"Install plugin","text":""},{"location":"ui-toast/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-toast/#import-plugin","title":"Import plugin","text":""},{"location":"ui-toast/#import-class","title":"Import class","text":""},{"location":"ui-toast/#add-toast-object","title":"Add toast object","text":"
    var toast = scene.rexUI.add.toast({\nx: 0,\ny: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n\norientation: 0,\n\nbackground: backgroundGameObject,\nicon: iconGameObject,\niconMask: false,\ntext: textGameObject,\naction: actionGameObject,\nactionMask: false,\n\nspace: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n\nicon: 0,\ntext: 0,\n},\n\nduration: {\nin: 200,\nhold: 1200,\nout: 200,\n},\n\n// transitIn: 0,\n// transitOut: 0,\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n

    Toast object will be invisible at beginning.

    "},{"location":"ui-toast/#custom-class","title":"Custom class","text":""},{"location":"ui-toast/#show-message","title":"Show message","text":"
    toast.showMessage(message);\n

    Toast displays message follows these steps : transit-in, hold, transit-out. New message will be pending until toast is back to idle.

    "},{"location":"ui-toast/#display-time","title":"Display time","text":""},{"location":"ui-toast/#transit-action","title":"Transit action","text":""},{"location":"ui-toast/#other-properties","title":"Other properties","text":"

    See label object, sizer object, base sizer object, container-lite.

    "},{"location":"ui-tweaker/","title":"Tweaker","text":""},{"location":"ui-tweaker/#introduction","title":"Introduction","text":"

    Fine-tuning properties of target object. Reference

    "},{"location":"ui-tweaker/#live-demos","title":"Live demos","text":""},{"location":"ui-tweaker/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ui-tweaker/#install-plugin","title":"Install plugin","text":""},{"location":"ui-tweaker/#load-minify-file","title":"Load minify file","text":""},{"location":"ui-tweaker/#import-plugin","title":"Import plugin","text":""},{"location":"ui-tweaker/#import-class","title":"Import class","text":""},{"location":"ui-tweaker/#add-tweaker-object","title":"Add tweaker object","text":"
    var tweaker = scene.rexUI.add.tweaker({\n// x: 0,\n// y: 0,\n// anchor: undefined,\n// width: undefined,\n// height: undefined,\n// orientation: 0,\n\nstyles : {\nitemWidth : 0,\n\ninputRow: {\nbackground: {\n\n},\n\ntitle: {\n\n},\n\ninputText: {\n\n},\n\nlist: {\nlabel: {\n\n},\n\nbutton: {\n\n}\n},\n\nbutton: {\n\n},\n\nslider: {\ntrack: {\n\n},\n\nindicator: {\n\n},\n\nthumb: {\n\n}\n},\n\ncolorInput: {\ncolorPicker: {\n\n},\n\ncolorComponents: {\ninputText: {\n\n}\n}\n},\n\ncheckbox: {\n\n},\n\ntoggleSwitch: {\n\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n},\n\nseparator: {\n\n},\n\nfolder: {\n},\n\ntab: {\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0, item: 0\n},\n},\n\n\n// name: '',\n// draggable: false,\n// sizerEvents: false,\n// enableLayer: false,\n});\n
    "},{"location":"ui-tweaker/#custom-class","title":"Custom class","text":""},{"location":"ui-tweaker/#add-input-row","title":"Add input row","text":"

    An input row can fine-tuning properties of target object.

    "},{"location":"ui-tweaker/#text-input-row","title":"Text input row","text":"

    object[key] is a text value.

    tweaker.addInput(object, key, {    // view: 'string',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n\n// autoUpdate: true,\n// onValidate: undefined,\n// onValueChange: undefined,    \n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\n// view: 'string',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n\n// autoUpdate: true,\n// onValidate: undefined,\n// onValueChange: undefined,    \n})\n

    See Styles of text input

    "},{"location":"ui-tweaker/#text-input-from-list","title":"Text input from list","text":"

    object[key] is a text value.

    tweaker.addInput(object, key, {\n// view: 'list',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\n// view: 'list',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of list input

    "},{"location":"ui-tweaker/#text-input-from-buttons","title":"Text input from buttons","text":"

    object[key] is a text value.

    tweaker.addInput(object, key, {\nview: 'buttons',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\nview: 'buttons',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of buttons input

    "},{"location":"ui-tweaker/#number-input-row","title":"Number input row","text":"

    object[key] is a number value.

    tweaker.addInput(object, key, {\n// view: 'number',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\n// view: 'number',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of text input

    "},{"location":"ui-tweaker/#number-input-in-a-range","title":"Number input in a range","text":"

    object[key] is a number value.

    tweaker.addInput(object, key, {\n// view: 'range',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\nmin: minValue, max: maxValue,\n\n// format: function(value) { return s; },\n// inputTextReadOnly: false,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\n// view: 'range',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\nmin: minValue, max: maxValue,\n\n// format: function(value) { return s; },\n// inputTextReadOnly: false,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of range input

    "},{"location":"ui-tweaker/#number-input-from-list","title":"Number input from list","text":"

    object[key] is a number value.

    tweaker.addInput(object, key, {\n// view: 'list',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\n// view: 'list',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of list input

    "},{"location":"ui-tweaker/#number-input-from-buttons","title":"Number input from buttons","text":"

    object[key] is a number value.

    tweaker.addInput(object, key, {\nview: 'buttons',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\nview: 'buttons',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\noptions: [\n{text: text0, value: value0},\n{text: text1, value: value1},\n// ...\n],\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of buttons input

    "},{"location":"ui-tweaker/#color-input","title":"Color input","text":"

    object[key] is a number value.

    tweaker.addInput(object, key, {\nview: 'color',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\nview: 'color',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of color input

    "},{"location":"ui-tweaker/#boolean-input-row","title":"Boolean input row","text":"

    object[key] is a boolean value.

    tweaker.addInput(object, key, {\n// view: 'boolean',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    or

    tweaker.addInput({\nbindingTarget: object,\nbindingKey: key,\n// view: 'boolean',\n// view: 'toggleSwitch',\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\n// title: undefined,\n\n// monitor: false,\n\n// key: undefined,\n})\n

    See Styles of boolean input

    "},{"location":"ui-tweaker/#add-button","title":"Add button","text":"
    tweaker.addButton({\n// bindingTarget: object,\n\n// icon: undefined,\n// iconFrame: undefined,\n// iconSize: undefined,\n\ntitle: undefined,\n\nlabel: undefined,\n\ncallback: function(target) {},\n\n// key: undefined,\n})\n

    See Styles of botton

    "},{"location":"ui-tweaker/#add-separator","title":"Add separator","text":"
    tweaker.addSeparator();\n

    See Styles of separator

    "},{"location":"ui-tweaker/#add-folder","title":"Add folder","text":"

    Folder contains collapsible child tweaker game object.

    var childTweaker = tweaker.addFolder({\ntitle: titleA,\n\n// expanded: true,\n});\n\n// childTweaker.addInput(...)\n

    See Styles of folder

    "},{"location":"ui-tweaker/#add-tab","title":"Add tab","text":"

    Tab containes pages. Each page is a tweaker game object.

    var childrenTweakers = tweaker.addTab({\npages: [\n{\ntitle: titleA, // show: false\n},\n{\ntitle: titleB\n// show: false\n},\n// ...\n]\n});\n\n// childrenTweakers[0].addInput(...)\n// childrenTweakers[1].addInput(...)\n

    See Styles of tab

    "},{"location":"ui-tweaker/#layout-children","title":"Layout children","text":"

    Arrange position of all elements.

    tweaker.layout();\n

    See also - dirty

    "},{"location":"ui-tweaker/#styles","title":"Styles","text":""},{"location":"ui-tweaker/#styles-of-text-input","title":"Styles of text input","text":"

    Style of text/number input is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\ninputText: {\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null\n},\nfocusStyle: {\n// color:\n// color2:\n// horizontalGradient:\n\n// stroke:\n// strokeThickness:\n\n// cornerRadius:\n// cornerIteration:\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBottomY: undefined,\noffsetX: 0,\noffsetY: 0\n},\ncursorStyle: {\n// bold:\n// italic:\n// fontSize:\n// fontFamily:\n// color:\n// stroke:\n// strokeThickness:\n// shadowColor:\n// shadowOffsetX:\n// shadowOffsetY:\n// shadowBlur:\n// backgroundColor:\n// backgroundHeight:\n// backgroundBottomY:\n// offsetX:\n// offsetY:\n}\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-list-input","title":"Styles of list input","text":"

    Style of text/number list input is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\nlist: {\nlabel: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n\n},\n\nbutton: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n\n'hover.color': undefined,\n'hover.alpha': undefined,\n'hover.strokeColor': undefined,\n'hover.strokeAlpha': undefined,\n'hover.strokeWidth': undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n}\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-buttons-input","title":"Styles of buttons input","text":"

    Style of buttons input is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\nbutton: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n},\n\nexpand: true\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-range-input","title":"Styles of range input","text":"

    Style of range input is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\nslider: {\ntrack: {\nheight: 0,\n\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\nindicator: {\nheight: 0,\n\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\nthumb: {\nwidth: 0, height: 0,\n\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n}\n}\n\ninputText: {\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null\n},\nfocusStyle: {\n// color:\n// color2:\n// horizontalGradient:\n\n// stroke:\n// strokeThickness:\n\n// cornerRadius:\n// cornerIteration:\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBottomY: undefined,\noffsetX: 0,\noffsetY: 0\n},\ncursorStyle: {\n// bold:\n// italic:\n// fontSize:\n// fontFamily:\n// color:\n// stroke:\n// strokeThickness:\n// shadowColor:\n// shadowOffsetX:\n// shadowOffsetY:\n// shadowBlur:\n// backgroundColor:\n// backgroundHeight:\n// backgroundBottomY:\n// offsetX:\n// offsetY:\n}\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-color-input","title":"Styles of color input","text":"

    Style of color input is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\ncolorInput: {\nswatch: {\nradius: 0,\nsize: undefined,\n},\n\ninputText: {\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null\n},\nfocusStyle: {\n// color:\n// color2:\n// horizontalGradient:\n\n// stroke:\n// strokeThickness:\n\n// cornerRadius:\n// cornerIteration:\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBottomY: undefined,\noffsetX: 0,\noffsetY: 0\n},\ncursorStyle: {\n// bold:\n// italic:\n// fontSize:\n// fontFamily:\n// color:\n// stroke:\n// strokeThickness:\n// shadowColor:\n// shadowOffsetX:\n// shadowOffsetY:\n// shadowBlur:\n// backgroundColor:\n// backgroundHeight:\n// backgroundBottomY:\n// offsetX:\n// offsetY:\n}\n},                // inputText: false,\n\ncolorPicker: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n}\n},\n\ncolorComponents: {\ninputText: {\nbackground: {\ncolor: null,\ncolor2: null,\nhorizontalGradient: true,\n\nstroke: null,\nstrokeThickness: 2,\n\ncornerRadius: 0,\ncornerIteration: null\n},\nfocusStyle: {\n// color:\n// color2:\n// horizontalGradient:\n\n// stroke:\n// strokeThickness:\n\n// cornerRadius:\n// cornerIteration:\n},\n\nstyle: {\nbold: false,\nitalic: false,\nfontSize: '16px',\nfontFamily: 'Courier',\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadowColor: null,\nshadowOffsetX: 0,\nshadowOffsetY: 0,\nshadowBlur: 0,\nbackgroundColor: null,\nbackgroundHeight: undefined,\nbackgroundBottomY: undefined,\noffsetX: 0,\noffsetY: 0\n},\ncursorStyle: {\n// bold:\n// italic:\n// fontSize:\n// fontFamily:\n// color:\n// stroke:\n// strokeThickness:\n// shadowColor:\n// shadowOffsetX:\n// shadowOffsetY:\n// shadowBlur:\n// backgroundColor:\n// backgroundHeight:\n// backgroundBottomY:\n// offsetX:\n// offsetY:\n}\n\n}\n}\n\n// colorComponents: false,\n\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-boolean-input","title":"Styles of boolean input","text":"

    Style of boolean input is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\n// For checkbox view\ncheckbox: {\n// size: undefined,\n\ncolor: 0x005cb2,\nboxFillAlpha: 1,\nuncheckedColor: null,\nuncheckedBoxFillAlpha: 1,\n\nboxLineWidth: 4,\nboxStrokeColor: 0x005cb2,\nboxStrokeAlpha: 1,\nuncheckedBoxStrokeColor: 0x005cb2,\nuncheckedBoxStrokeAlpha: 1,\n\ncheckerColor: 0xffffff,\ncheckerAlpha: 1,\n\ncircleBox: false\n\nanimationDuration: 150,\n\nreadOnly: false,\n},\n\n// For toggle switch view\ntoggleSwitch: {\n// size: undefined,\n\ncolor: 0x005cb2,\ntrackFillAlpha: 1,\nfalseValueTrackColor: undefined,\nfalseValueTrackFillAlpha: 1,\n\nthumbColor: 0xffffff,\nthumbAlpha: 1,\n\ntrackWidth: 0.9,\ntrackHeight: 0.5,\ntrackCornerRadius: (trackHeight * 0.5),\n\nthumbHeight: (trackHeight * 0.9),\nthumbWidth: (thumbHeight),\nthumbCornerRadius: (thumbHeight * 0.5),\n\nthumbLeft: 0.3,\nthumbRight: (1 - thumbLeft),\nrtl: false,\n\nanimationDuration: 150,\n\nreadOnly: false,\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-botton","title":"Styles of botton","text":"

    Style of button is defined in

    {\nstyles: {\ninputRow: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\nbutton: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom: 0,\ntitle: 0\n}\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-separator","title":"Styles of separator","text":"

    Style of separator is defined in

    {\nstyles: {\nseparator: {\nheight: 0,\n\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-folder","title":"Styles of folder","text":"

    Style of folder is defined in

    {\nstyles: {\nfolder: {\ntitle: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n},\n\nexpandedIcon: {\ncolor: undefined,\nalpha: 1,\n\nstrokeColor: undefined,\nstrokeAlpha: 1,\nstrokeWidth: 1,\narrowOnly: false,\n\neaseDuration: 0,\n}\n},\n\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n},\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, }\n}\n}\n}\n
    "},{"location":"ui-tweaker/#styles-of-tab","title":"Styles of tab","text":"

    Style of tab is defined in

    {\nstyles: {\ntab: {\ntab: {\nbackground: {\nradius: 0,\n// radius: {tl: {x,y}, tr: {x,y}, bl: {x,y}, br: {x,y}}\n\ncolor: undefined,\nalpha: undefined,\nstrokeColor: undefined,\nstrokeAlpha: undefined,\nstrokeWidth: undefined,\n\n'active.color': undefined,\n'active.alpha': undefined,\n'active.strokeColor': undefined,\n'active.strokeAlpha': undefined,\n'active.strokeWidth': undefined,\n},\n\ntext: {\nfontFamily: 'Courier',\nfontSize: '16px',\nfontStyle: '',\nbackgroundColor: null,\ncolor: '#fff',\nstroke: '#fff',\nstrokeThickness: 0,\nshadow: {\noffsetX: 0,\noffsetY: 0,\ncolor: '#000',\nblur: 0,\nstroke: false,\nfill: false\n},                  padding: {\nleft: 0,\nright: 0,\ntop: 0,\nbottom: 0,\n},\n// more text styles\n},\n\niconSize: undefined,\niconWidth: undefined, iconHeight: undefined,\n\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, icon: 0, text: 0\n}\n},\n\nwrapTabs: false,\n\ntabs: {\nspace: {\nleft: 0, right: 0, top: 0, bottom:0, item: 0,\n}\n},\n\npages: {\nfadeIn: 0,\n}\n}\n}\n}\n
    "},{"location":"ui-tweaker/#bind-target","title":"Bind target","text":"

    All input rows will bind to this new target, and update display status.

    tweaker.setBindingTarget(object);\n
    "},{"location":"ui-tweaker/#get-element","title":"Get element","text":""},{"location":"ui-tweaker/#other-properties","title":"Other properties","text":"

    See sizer object, base sizer object, container-lite.

    "},{"location":"uniqueitemlist/","title":"Unique item list","text":""},{"location":"uniqueitemlist/#introduction","title":"Introduction","text":"

    List of unique items. Support array and set methods.

    "},{"location":"uniqueitemlist/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"uniqueitemlist/#install-plugin","title":"Install plugin","text":""},{"location":"uniqueitemlist/#load-minify-file","title":"Load minify file","text":""},{"location":"uniqueitemlist/#import-plugin","title":"Import plugin","text":""},{"location":"uniqueitemlist/#import-class","title":"Import class","text":""},{"location":"uniqueitemlist/#create-instance","title":"Create instance","text":"
    var listA = scene.plugins.get('rexUniqueItemList').add({\n// items: undefined,\n// autoCleanup: true\n});\n

    or

    var listA = scene.plugins.get('rexUniqueItemList').add(items);\n
    "},{"location":"uniqueitemlist/#items","title":"Items","text":""},{"location":"uniqueitemlist/#item-count","title":"Item count","text":""},{"location":"uniqueitemlist/#contains","title":"Contains","text":""},{"location":"uniqueitemlist/#array-operations","title":"Array operations","text":""},{"location":"uniqueitemlist/#add","title":"Add","text":""},{"location":"uniqueitemlist/#remove","title":"Remove","text":""},{"location":"uniqueitemlist/#pop","title":"Pop","text":""},{"location":"uniqueitemlist/#slice","title":"Slice","text":""},{"location":"uniqueitemlist/#sort","title":"Sort","text":""},{"location":"uniqueitemlist/#set-operations","title":"Set operations","text":""},{"location":"uniqueitemlist/#call-method","title":"Call method","text":"

    Apply method of each item.

    listA.call(fnName, arg0, arg1, arg2, ...);\n

    Warning

    Don't add or remove any item during this method.

    listA.call(function(item, i) {\n// ....\n}, scope);\n
    "},{"location":"uuid/","title":"UUID","text":""},{"location":"uuid/#introduction","title":"Introduction","text":"

    Creates and returns an RFC4122 version 4 compliant UUID, built-in method of phaser.

    "},{"location":"uuid/#usage","title":"Usage","text":"
    var uuid = Phaser.Utils.String.UUID();\n
    "},{"location":"vector2/","title":"Vector2","text":""},{"location":"vector2/#introduction","title":"Introduction","text":"

    A representation of a vector in 2D space ({x, y}), built-in object of phaser.

    "},{"location":"vector2/#usage","title":"Usage","text":""},{"location":"vector2/#create-object","title":"Create object","text":"
    var vector = new Phaser.Math.Vector2();\n// var vector = new Phaser.Math.Vector2(x, y);\n// var vector = new Phaser.Math.Vector2({x, y});\n
    "},{"location":"vector2/#clone","title":"Clone","text":"
    var newVector = vector.clone();\n
    "},{"location":"vector2/#set-components","title":"Set components","text":""},{"location":"vector2/#get-componments","title":"Get componments","text":""},{"location":"vector2/#methods","title":"Methods","text":""},{"location":"vector2/#vector-methods","title":"Vector methods","text":""},{"location":"vector2/#points-method","title":"Points method","text":""},{"location":"vector2/#constant","title":"Constant","text":""},{"location":"video/","title":"Video","text":""},{"location":"video/#introduction","title":"Introduction","text":"

    Handling playback of a video file, video stream or media stream.

    "},{"location":"video/#usage","title":"Usage","text":""},{"location":"video/#load-video","title":"Load video","text":"
    scene.load.video(key, url, noAudio);\n

    Reference: load video

    Cross-origin

    Can't load video cross-origin via scene.load.video(...). Using scene.add.video(x, y).loadURL(urls, noAudio, crossOrigin) to load video cross-origin.

    "},{"location":"video/#add-video-object","title":"Add video object","text":""},{"location":"video/#reference-video-from-video-cache","title":"Reference video from Video Cache","text":"
    var video = scene.add.video(x, y, key);\n
    "},{"location":"video/#load-video-from-url","title":"Load video from URL","text":"
    1. Add video object
      var video = scene.add.video(x, y);\n
    2. Play video from URL
      video.loadURL(url);\n// video.loadURL(urls, noAudio, crossOrigin);\n
    "},{"location":"video/#load-video-from-mediastream","title":"Load video from MediaStream","text":"
    video.loadMediaStream(stream);\n// video.loadMediaStream(stream, noAudio, crossOrigin);\n
    navigator.mediaDevices.getUserMedia({ video: true, audio: false })\n.then(function(stream) {\nvideo.loadMediaStream(stream, true);\nvideo.play();\n})\n.catch(function(err) {\n\n})\n
    "},{"location":"video/#play","title":"Play","text":"
    video.play();\n// video.play(loop, markerIn, markerOut);\n

    Play video first time

    Call video.play() when playing video first time.

    Note

    If you need audio in your videos, then you'll have to consider the fact that the video cannot start playing until the user has interacted with the browser, into your game flow.

    "},{"location":"video/#pause","title":"Pause","text":"

    Play video after paused

    Call video.setPaused(false) to resume playing.

    "},{"location":"video/#stop","title":"Stop","text":"

    Stops the video playing and clears all internal event listeners.

    video.stop();\n
    "},{"location":"video/#is-playing","title":"Is playing","text":""},{"location":"video/#playback-time","title":"Playback time","text":""},{"location":"video/#playback-rate","title":"Playback rate","text":""},{"location":"video/#duration","title":"Duration","text":"
    var duration = video.getDuration();  // time in seconds\n
    "},{"location":"video/#volume","title":"Volume","text":""},{"location":"video/#mute","title":"Mute","text":""},{"location":"video/#loop","title":"Loop","text":""},{"location":"video/#video-key","title":"Video key","text":""},{"location":"video/#marks","title":"Marks","text":""},{"location":"video/#snapshot","title":"Snapshot","text":"
    1. Allocate a canvas texrure
      video.saveSnapshotTexture(key);\n
    2. Take a snapshot
      var canvasTexture = video.video.snapshot();\n// var canvasTexture = video.snapshot(width, height);\n
      or
      var canvasTexture = video.snapshotArea(x, y, srcWidth, srcHeight);\n// var canvasTexture = video.snapshotArea(x, y, srcWidth, srcHeight, destWidth, destHeight);\n
    "},{"location":"video/#save-texture","title":"Save texture","text":"

    The saved texture is automatically updated as the video plays. If you pause this video, or change its source, then the saved texture updates instantly.

    var texture = video.saveTexture(key);\n// var texture = video.saveTexture(key, flipY);\n
    "},{"location":"video/#events","title":"Events","text":""},{"location":"video/#other-properties","title":"Other properties","text":"

    See game object

    "},{"location":"video/#create-mask","title":"Create mask","text":"
    var mask = video.createBitmapMask();\n

    See mask

    "},{"location":"video/#shader-effects","title":"Shader effects","text":"

    Support preFX and postFX effects

    "},{"location":"viewport-coordinate/","title":"Viewport-coordinate","text":""},{"location":"viewport-coordinate/#introduction","title":"Introduction","text":"

    Attach vpx, vpy properties to a game object, to set position according to proportion (vpx, vpy) of viewport, a rectangle).

    "},{"location":"viewport-coordinate/#live-demos","title":"Live demos","text":""},{"location":"viewport-coordinate/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"viewport-coordinate/#install-plugin","title":"Install plugin","text":""},{"location":"viewport-coordinate/#load-minify-file","title":"Load minify file","text":""},{"location":"viewport-coordinate/#import-plugin","title":"Import plugin","text":""},{"location":"viewport-coordinate/#import-method","title":"Import method","text":""},{"location":"viewport-coordinate/#attach-properties","title":"Attach properties","text":"
    scene.plugins.get('rexViewportCoordinate').add(gameObject, viewport, vpx, vpy, transformCallback);\n

    Changing

    Will change position (x , y) of game object.

    "},{"location":"virtualjoystick/","title":"Virtual joystick","text":""},{"location":"virtualjoystick/#introduction","title":"Introduction","text":"

    Simulate cursor keys according to touch events.

    "},{"location":"virtualjoystick/#live-demos","title":"Live demos","text":""},{"location":"virtualjoystick/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"virtualjoystick/#install-plugin","title":"Install plugin","text":""},{"location":"virtualjoystick/#load-minify-file","title":"Load minify file","text":""},{"location":"virtualjoystick/#import-plugin","title":"Import plugin","text":""},{"location":"virtualjoystick/#import-class","title":"Import class","text":""},{"location":"virtualjoystick/#create-instance","title":"Create instance","text":"
    var joystick = scene.plugins.get('rexVirtualJoystick').add(scene, {\nx: x,\ny: y,\nradius: 100,\nbase: baseGameObject,\nthumb: thumbGameObject,\n// dir: '8dir',\n// forceMin: 16,\n// fixed: true,\n// enable: true\n});\n
    "},{"location":"virtualjoystick/#state-of-cursor-keys","title":"State of cursor keys","text":"
    var cursorKeys = joystick.createCursorKeys();\n\nvar leftKeyDown = cursorKeys.left.isDown;\nvar rightKeyDown = cursorKeys.right.isDown;\nvar upKeyDown = cursorKeys.up.isDown;\nvar downKeyDown = cursorKeys.down.isDown;\n

    Or

    var leftKeyDown = joystick.left;\nvar rightKeyDown = joystick.right;\nvar upKeyDown = joystick.up;\nvar downKeyDown = joystick.down;\nvar noKeyDown = joystick.noKey;\n
    "},{"location":"virtualjoystick/#force-angle","title":"Force & Angle","text":"

    Force : Distance between position of base game object to touch pointer.

    var force = joystick.force;\nvar forceX = joystick.forceX;\nvar forceY = joystick.forceY;\n\nvar angle = joystick.angle;  // degree between -180 to 180\nvar rotation = joystick.rotation; // radians\n
    "},{"location":"virtualjoystick/#visible","title":"Visible","text":"

    Visible of base game object.

    "},{"location":"virtualjoystick/#enable","title":"Enable","text":""},{"location":"virtualjoystick/#position","title":"Position","text":"

    Position of base game object.

    "},{"location":"virtualjoystick/#scroll-factor","title":"Scroll factor","text":""},{"location":"virtualjoystick/#touch-pointer","title":"Touch pointer","text":""},{"location":"virtualjoystick/#destroy","title":"Destroy","text":"

    Destroy base & thumb game object.

    joystick.destroy();\n
    "},{"location":"virtualjoystick/#events","title":"Events","text":""},{"location":"virtualjoystick/#elements","title":"Elements","text":""},{"location":"waitevents/","title":"Wait events","text":""},{"location":"waitevents/#introduction","title":"Introduction","text":"

    Wait fired events or callbacks.

    "},{"location":"waitevents/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"waitevents/#install-plugin","title":"Install plugin","text":""},{"location":"waitevents/#load-minify-file","title":"Load minify file","text":""},{"location":"waitevents/#import-plugin","title":"Import plugin","text":""},{"location":"waitevents/#import-class","title":"Import class","text":""},{"location":"waitevents/#create-instance","title":"Create instance","text":"
    var waitEvents = scene.plugins.get('rexWaitEvents').add(completeCallback, completeCallbackScope);\n
    "},{"location":"waitevents/#set-complete-callback","title":"Set complete callback","text":"
    waitEvents.setCompleteCallback(completeCallback, completeCallbackScope);\n
    "},{"location":"waitevents/#add-waiting-event","title":"Add waiting event","text":""},{"location":"waitevents/#callback","title":"Callback","text":"
    var callback = waitEvents.waitCallback();\n

    For example, invokes completeCallback when all timers are time-out.

    scene.time.delayedCall(500, waitEvents.waitCallback());\nscene.time.delayedCall(1000, waitEvents.waitCallback());\nscene.time.delayedCall(1500, waitEvents.waitCallback());\n
    "},{"location":"waitevents/#callback-from-event-emitter","title":"Callback from event emitter","text":"
    waitEvents.waitEvent(eventEmitter, eventName);\n
    "},{"location":"waitevents/#remove-waiting-event","title":"Remove waiting event","text":"
    callback();\n

    or

    waitEvents.remove(callback);\n
    "},{"location":"waitevents/#clear-all-waiting-events","title":"Clear all waiting events","text":"
    waitEvents.clear();\n
    "},{"location":"waitevents/#no-wait-event","title":"No wait event","text":"
    var noWaitEvent = waitEvents.noWaitEvent;\n
    "},{"location":"webfontloader/","title":"Webfont loader","text":""},{"location":"webfontloader/#introduction","title":"Introduction","text":"

    Load web font by google webfont loader in payload or preload stage.

    "},{"location":"webfontloader/#live-demos","title":"Live demos","text":""},{"location":"webfontloader/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"webfontloader/#install-plugin","title":"Install plugin","text":""},{"location":"webfontloader/#load-minify-file","title":"Load minify file","text":""},{"location":"webfontloader/#import-plugin","title":"Import plugin","text":""},{"location":"webfontloader/#import-class","title":"Import class","text":""},{"location":"webfontloader/#load-webfont","title":"Load webfont","text":"

    In preload stage:

    this.load.rexWebFont({\ngoogle: {\nfamilies: ['Bangers']\n},\n// testString: undefined,\n// testInterval: 20,\n});\n

    or load font in pack

    var sceneConfig = {\nkey: '...',\npack: {\nfiles: [{\ntype: 'rexWebFont',\nkey: 'webfont',\nconfig: {\ngoogle: {\nfamilies: ['Bangers']\n},\n// testString: undefined,\n// testInterval: 20,\n}\n}\n]\n}\n};\n

    Configuration of loading fonts

    "},{"location":"webfontloader/#events","title":"Events","text":""},{"location":"webfontloader/#test-string","title":"Test string","text":"

    Add string parameter testString into config, to test if the font is loaded completed or not.

    1. Fill 0 within an internal canvas.
    2. Draw testString.
    3. Check if any pixel has non-zero value.
    "},{"location":"wrap/","title":"Wrap","text":""},{"location":"wrap/#introduction","title":"Introduction","text":"

    Wrap the given value between min and max, built-in method of phaser.

    "},{"location":"wrap/#usage","title":"Usage","text":"
    var result = Phaser.Math.Wrap(value, min, max);\n
    "},{"location":"xor/","title":"XOR","text":""},{"location":"xor/#introduction","title":"Introduction","text":"

    Encrypt or decrypt string by XOR algorithm.

    "},{"location":"xor/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"xor/#install-plugin","title":"Install plugin","text":""},{"location":"xor/#load-minify-file","title":"Load minify file","text":""},{"location":"xor/#import-plugin","title":"Import plugin","text":""},{"location":"xor/#import-class","title":"Import class","text":""},{"location":"xor/#encrypt","title":"Encrypt","text":"
    var encResult = scene.plugins.get('rexXOR').Encrypt(src, pwd);\n
    "},{"location":"xor/#decrypt","title":"Decrypt","text":"
    var decResult = scene.plugins.get('rexXOR').Decrypt(encResult, pwd);\n
    "},{"location":"ymlachievements/","title":"YAML Achievements","text":""},{"location":"ymlachievements/#introduction","title":"Introduction","text":"

    Achievements in a YAML table.

    "},{"location":"ymlachievements/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ymlachievements/#install-plugin","title":"Install plugin","text":""},{"location":"ymlachievements/#load-minify-file","title":"Load minify file","text":""},{"location":"ymlachievements/#import-plugin","title":"Import plugin","text":""},{"location":"ymlachievements/#import-class","title":"Import class","text":""},{"location":"ymlachievements/#create-instance","title":"Create instance","text":"
    var achievements = scene.plugins.get('rexAchievements').add();\n
    "},{"location":"ymlachievements/#load-table-from-yaml-string","title":"Load table from YAML string","text":"
    achievements.loadYML(ymlString);\n

    For exameple

    Lv1 :\nAch1 : (A >= 10) && (A < 20)\nAch2 : (A >= 20) && (A < 50)\nAch3 : A >= 50\n

    Equations will be parsed by expression-parser.

    "},{"location":"ymlachievements/#test","title":"Test","text":"
    1. Run test
      var achievements.runTest(levelName, values);\n
    2. Get obtained states
      var states = achievements.getObtainedState(levelName);\n

    or

    var states = achievements.getTestResults(levelName, values);\n
    "},{"location":"ymlachievements/#get-obtained-states","title":"Get obtained states","text":""},{"location":"ymlachievements/#get-name","title":"Get name","text":""},{"location":"ymlachievements/#save-load-obtained-states","title":"Save & load obtained states","text":""},{"location":"ymlachievements/#set-obtained-state","title":"Set obtained state","text":""},{"location":"ymlconditionstable/","title":"YAML Conditions table","text":""},{"location":"ymlconditionstable/#introduction","title":"Introduction","text":"

    Check conditions to find passed tests listed in a YAML table.

    "},{"location":"ymlconditionstable/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"ymlconditionstable/#install-plugin","title":"Install plugin","text":""},{"location":"ymlconditionstable/#load-minify-file","title":"Load minify file","text":""},{"location":"ymlconditionstable/#import-plugin","title":"Import plugin","text":""},{"location":"ymlconditionstable/#import-class","title":"Import class","text":""},{"location":"ymlconditionstable/#create-instance","title":"Create instance","text":"
    var table = scene.plugins.get('rexConditionsTable').add();\n
    "},{"location":"ymlconditionstable/#load-table-from-yaml-string","title":"Load table from YAML string","text":"
    table.loadYML(ymlString);\n

    For exameple

    Test1 : (A >= 10) && (A <= 20)\nTest2 : B == 3\n

    Equations will be parsed by expression-parser.

    "},{"location":"ymlconditionstable/#test","title":"Test","text":""},{"location":"ymlconditionstable/#get-test-results","title":"Get test results","text":"
    var results = table.getTestResults(context);\n
    "},{"location":"ymlconditionstable/#get-first-pass-test-name","title":"Get first pass test name","text":"
    var testName = table.anyPassTest(context);\n
    "},{"location":"youtubeplayer/","title":"Youtube player","text":""},{"location":"youtubeplayer/#introduction","title":"Introduction","text":"

    Play youtube video on iframe.

    "},{"location":"youtubeplayer/#live-demos","title":"Live demos","text":""},{"location":"youtubeplayer/#usage","title":"Usage","text":"

    Sample code

    "},{"location":"youtubeplayer/#install-plugin","title":"Install plugin","text":""},{"location":"youtubeplayer/#load-minify-file","title":"Load minify file","text":""},{"location":"youtubeplayer/#import-plugin","title":"Import plugin","text":""},{"location":"youtubeplayer/#import-class","title":"Import class","text":""},{"location":"youtubeplayer/#add-youtube-player-object","title":"Add youtube player object","text":"

    Default configuration

    {\nx: 0,\ny: 0,\nwidth: undefined,\nheight: undefined,\n\nvideoId: '',\nautoPlay: true,\ncontrols: false,\nkeyboardControl: true,\nmodestBranding: false,\nloop: false,\n}\n
    "},{"location":"youtubeplayer/#custom-class","title":"Custom class","text":""},{"location":"youtubeplayer/#load","title":"Load","text":"
    player.load(videoId);\n// player.load(videoId, autoPlay);\n
    "},{"location":"youtubeplayer/#play","title":"Play","text":"
    player.play();\n
    "},{"location":"youtubeplayer/#pause","title":"Pause","text":"
    player.pause();\n
    "},{"location":"youtubeplayer/#playback-time","title":"Playback time","text":""},{"location":"youtubeplayer/#duration","title":"Duration","text":"
    var duration = player.duration;  // time in seconds\n
    "},{"location":"youtubeplayer/#volume","title":"Volume","text":""},{"location":"youtubeplayer/#mute","title":"Mute","text":""},{"location":"youtubeplayer/#loop","title":"Loop","text":""},{"location":"youtubeplayer/#resize","title":"Resize","text":"
    player.resize(width, height);\n
    "},{"location":"youtubeplayer/#status","title":"Status","text":""},{"location":"youtubeplayer/#events","title":"Events","text":"

    No Playback time changed event

    Get playback time every tick might cause playing video lagging.

    "},{"location":"youtubeplayer/#other-properties","title":"Other properties","text":"

    See dom game object, game object

    "},{"location":"youtubeplayer/#interactive-with-other-game-objects","title":"Interactive with other game objects","text":"

    See dom-element's Interactive with other game objects

    "},{"location":"zone/","title":"Zone","text":""},{"location":"zone/#introduction","title":"Introduction","text":"

    Non-rendering rectangular game object for creating drop zones and input hit areas, built-in game object of phaser.

    "},{"location":"zone/#usage","title":"Usage","text":""},{"location":"zone/#add-zone-object","title":"Add zone object","text":"
    var zone = scene.add.zone(x, y, width, height);\n

    Add zone from JSON

    var zone = scene.make.zone({\nx: 0,\ny: 0,\n//width: 1,\n//height: 1,\n// origin: {x: 0.5, y: 0.5},\n});\n
    "},{"location":"zone/#custom-class","title":"Custom class","text":""},{"location":"zone/#input-hit-zone","title":"Input hit zone","text":"
    zone.setInteractive();\n

    See touch events

    "},{"location":"zone/#drop-zones","title":"Drop zones","text":"

    See drop zone

    "},{"location":"zone/#other-properties","title":"Other properties","text":"

    See game object

    "}]} \ No newline at end of file diff --git a/docs/site/shader/index.html b/docs/site/shader/index.html index 3a3916580d..6c678f1e5a 100644 --- a/docs/site/shader/index.html +++ b/docs/site/shader/index.html @@ -1197,6 +1197,13 @@ Other properties + + +
  • + + Create mask + +
  • @@ -9484,6 +9491,13 @@ Other properties +
  • + +
  • + + Create mask + +
  • @@ -9754,6 +9768,10 @@

    Texture routingOther properties

    See game object

    +

    Create mask

    +
    var mask = shader.createBitmapMask();
    +
    +

    See mask

    BaseShader

    var baseShader = new Phaser.Display.BaseShader(key, fragmentSrc, vertexSrc, uniforms);
     
    diff --git a/docs/site/shape-arc/index.html b/docs/site/shape-arc/index.html index 773287c2e1..69270355f2 100644 --- a/docs/site/shape-arc/index.html +++ b/docs/site/shape-arc/index.html @@ -2042,6 +2042,20 @@ Other properties +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9479,6 +9493,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9660,6 +9688,16 @@

    Display size

    Other properties

    See game object

    +

    Create mask

    +
    var mask = arc.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-checkbox/index.html b/docs/site/shape-checkbox/index.html index d2aa1733f8..c7010375e1 100644 --- a/docs/site/shape-checkbox/index.html +++ b/docs/site/shape-checkbox/index.html @@ -2370,6 +2370,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9631,6 +9645,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -10003,6 +10031,16 @@

    EventsOther properties

    See game object

    +

    Create mask

    +
    var mask = checkbox.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-circle/index.html b/docs/site/shape-circle/index.html index c6d7fa66ef..a98f8e92ef 100644 --- a/docs/site/shape-circle/index.html +++ b/docs/site/shape-circle/index.html @@ -2021,6 +2021,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9465,6 +9479,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9609,6 +9637,16 @@

    Display size

    Other properties

    See game object

    +

    Create mask

    +
    var mask = circle.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-circularprogress/index.html b/docs/site/shape-circularprogress/index.html index c7dba23ff9..208c86bfb2 100644 --- a/docs/site/shape-circularprogress/index.html +++ b/docs/site/shape-circularprogress/index.html @@ -2258,6 +2258,27 @@ Alpha + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9610,6 +9631,27 @@ Alpha +
  • + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9985,6 +10027,18 @@

    Alpha& // circularProgress.alpha = alpha;

  • +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = circularProgress.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +

    Compare with Circular-progress canvas

    @@ -9505,6 +9519,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9664,6 +9692,16 @@

    Color&

    Other properties

    See game object

    +

    Create mask

    +
    var mask = cover.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-curve/index.html b/docs/site/shape-curve/index.html index 701b7930b7..d6dc77823b 100644 --- a/docs/site/shape-curve/index.html +++ b/docs/site/shape-curve/index.html @@ -2091,6 +2091,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9465,6 +9479,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9595,6 +9623,16 @@

    Display size

    Other properties

    See game object

    +

    Create mask

    +
    var mask = curve.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-custom-progress/index.html b/docs/site/shape-custom-progress/index.html index 68ae9d9308..1925a52c26 100644 --- a/docs/site/shape-custom-progress/index.html +++ b/docs/site/shape-custom-progress/index.html @@ -2326,6 +2326,27 @@ Alpha + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9627,6 +9648,27 @@ Alpha + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9962,6 +10004,18 @@

    Alpha& // customProgress.alpha = alpha; +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = customProgress.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-custom-shapes/index.html b/docs/site/shape-custom-shapes/index.html index fc604499e6..cc911c4f27 100644 --- a/docs/site/shape-custom-shapes/index.html +++ b/docs/site/shape-custom-shapes/index.html @@ -2402,6 +2402,27 @@ Alpha + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9814,6 +9835,27 @@ Alpha +
  • + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -10606,6 +10648,18 @@

    Alpha& // shape.alpha = alpha;

  • +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = shape.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +

    Compare with similar plugins

    @@ -9479,6 +9493,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9616,6 +9644,16 @@

    SmoothnessOther properties

    See game object

    +

    Create mask

    +
    var mask = ellipse.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-fullwindowrectangle/index.html b/docs/site/shape-fullwindowrectangle/index.html index b3f1011836..c32badc9c3 100644 --- a/docs/site/shape-fullwindowrectangle/index.html +++ b/docs/site/shape-fullwindowrectangle/index.html @@ -2279,6 +2279,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9505,6 +9519,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9657,6 +9685,16 @@

    Color&

    Other properties

    See game object

    +

    Create mask

    +
    var mask = rect.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-grid/index.html b/docs/site/shape-grid/index.html index f15a6d496c..c94cd26aba 100644 --- a/docs/site/shape-grid/index.html +++ b/docs/site/shape-grid/index.html @@ -2126,6 +2126,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9451,6 +9465,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9594,6 +9622,16 @@

    Display size

    Other properties

    See game object

    +

    Create mask

    +
    var mask = grid.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-isobox/index.html b/docs/site/shape-isobox/index.html index 9be2b96ae3..be66afa9bd 100644 --- a/docs/site/shape-isobox/index.html +++ b/docs/site/shape-isobox/index.html @@ -2147,6 +2147,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9465,6 +9479,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9580,6 +9608,16 @@

    Display size

    Other properties

    See game object

    +

    Create mask

    +
    var mask = isoBox.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-isotriangle/index.html b/docs/site/shape-isotriangle/index.html index eb38307358..1a0bd5b2e3 100644 --- a/docs/site/shape-isotriangle/index.html +++ b/docs/site/shape-isotriangle/index.html @@ -2168,6 +2168,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9479,6 +9493,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9607,6 +9635,16 @@

    Display size

    Other properties

    See game object

    +

    Create mask

    +
    var mask = isoTriangle.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-line/index.html b/docs/site/shape-line/index.html index 1323b2798c..9cee25a7cb 100644 --- a/docs/site/shape-line/index.html +++ b/docs/site/shape-line/index.html @@ -2056,6 +2056,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9479,6 +9493,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9608,6 +9636,16 @@

    Display size

    Other properties

    See game object

    +

    Create mask

    +
    var mask = line.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-lineprogress/index.html b/docs/site/shape-lineprogress/index.html index 302a10534d..37ec980440 100644 --- a/docs/site/shape-lineprogress/index.html +++ b/docs/site/shape-lineprogress/index.html @@ -2272,6 +2272,27 @@ Alpha + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9603,6 +9624,27 @@ Alpha + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9950,6 +9992,18 @@

    Alpha& // lineProgress.alpha = alpha; +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = lineProgress.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-polygon/index.html b/docs/site/shape-polygon/index.html index 72d83e79be..e266b7d563 100644 --- a/docs/site/shape-polygon/index.html +++ b/docs/site/shape-polygon/index.html @@ -2084,6 +2084,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9479,6 +9493,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9628,6 +9656,16 @@

    Display size

    Other properties

    See game object

    +

    Create mask

    +
    var mask = polygon.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-rectangle/index.html b/docs/site/shape-rectangle/index.html index 863e02c5aa..324e8aac90 100644 --- a/docs/site/shape-rectangle/index.html +++ b/docs/site/shape-rectangle/index.html @@ -2007,6 +2007,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9465,6 +9479,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9599,6 +9627,16 @@

    Display size

    Other properties

    See game object

    +

    Create mask

    +
    var mask = rect.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-roundrectangle/index.html b/docs/site/shape-roundrectangle/index.html index 1c68d060ff..24966f5704 100644 --- a/docs/site/shape-roundrectangle/index.html +++ b/docs/site/shape-roundrectangle/index.html @@ -2243,6 +2243,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9601,6 +9615,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9990,6 +10018,16 @@

    IterationOther properties

    See game object

    +

    Create mask

    +
    var mask = rect.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-spinner/index.html b/docs/site/shape-spinner/index.html index 6602d00175..3c210213e5 100644 --- a/docs/site/shape-spinner/index.html +++ b/docs/site/shape-spinner/index.html @@ -2319,6 +2319,27 @@ + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9669,6 +9690,27 @@ + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9998,6 +10040,18 @@

    Custom spinnerShape class

    See Shape class

    +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = customSpinner.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-star/index.html b/docs/site/shape-star/index.html index b7512d1b21..842f225730 100644 --- a/docs/site/shape-star/index.html +++ b/docs/site/shape-star/index.html @@ -2105,6 +2105,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9465,6 +9479,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9629,6 +9657,16 @@

    Display size

    Other properties

    See game object

    +

    Create mask

    +
    var mask = star.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-toggleswitch/index.html b/docs/site/shape-toggleswitch/index.html index 8d7b8547b0..58d5a6cf11 100644 --- a/docs/site/shape-toggleswitch/index.html +++ b/docs/site/shape-toggleswitch/index.html @@ -2405,6 +2405,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9673,6 +9687,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -10083,6 +10111,16 @@

    EventsOther properties

    See game object

    +

    Create mask

    +
    var mask = toggleSwitch.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-triangle/index.html b/docs/site/shape-triangle/index.html index c3ffd161c1..b2995858f8 100644 --- a/docs/site/shape-triangle/index.html +++ b/docs/site/shape-triangle/index.html @@ -2126,6 +2126,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9479,6 +9493,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9608,6 +9636,16 @@

    Display size

    Other properties

    See game object

    +

    Create mask

    +
    var mask = triangle.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shape-triangle2/index.html b/docs/site/shape-triangle2/index.html index e9fdbbf129..cfe82996c7 100644 --- a/docs/site/shape-triangle2/index.html +++ b/docs/site/shape-triangle2/index.html @@ -2384,6 +2384,27 @@ Arrow only + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9603,6 +9624,27 @@ Arrow only + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9948,6 +9990,18 @@

    Arrow only// triangle.arrowOnly = enable; +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = triangle.createGeometryMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shatter-image/index.html b/docs/site/shatter-image/index.html index bbc099facc..963d57c12b 100644 --- a/docs/site/shatter-image/index.html +++ b/docs/site/shatter-image/index.html @@ -1617,6 +1617,27 @@ Tint color + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9625,6 +9646,27 @@ Tint color + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9949,6 +9991,18 @@

    Tint color
    image.setTint(color);
     
    +

    Other properties

    +

    See Mesh game object, game object

    +

    Create mask

    +
    var mask = image.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/shatter-rendertexture/index.html b/docs/site/shatter-rendertexture/index.html index e1b9c87e55..316be3f586 100644 --- a/docs/site/shatter-rendertexture/index.html +++ b/docs/site/shatter-rendertexture/index.html @@ -1605,6 +1605,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9573,6 +9587,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9768,7 +9796,17 @@

    Fill&par // image.rt.fill(rgb, alpha, x, y, width, height);

    Other properties

    -

    See Shatter image game object.

    +

    See Shatter image game object, Mesh game object, game object

    +

    Create mask

    +
    var mask = image.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/sitemap.xml.gz b/docs/site/sitemap.xml.gz index 65ca0d30df..118cf7a95b 100644 Binary files a/docs/site/sitemap.xml.gz and b/docs/site/sitemap.xml.gz differ diff --git a/docs/site/skew-image/index.html b/docs/site/skew-image/index.html index ceb70dcbba..19f9db170d 100644 --- a/docs/site/skew-image/index.html +++ b/docs/site/skew-image/index.html @@ -1495,6 +1495,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9505,6 +9519,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9673,7 +9701,17 @@

    Skew&par

    Other properties

    -

    See Mesh game object.

    +

    See Mesh game object, game object

    +

    Create mask

    +
    var mask = image.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/skew-rendertexture/index.html b/docs/site/skew-rendertexture/index.html index e364efd1f3..b8996d8771 100644 --- a/docs/site/skew-rendertexture/index.html +++ b/docs/site/skew-rendertexture/index.html @@ -1543,6 +1543,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9573,6 +9587,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9756,7 +9784,17 @@

    Fill&par // image.rt.fill(rgb, alpha, x, y, width, height);

    Other properties

    -

    See Skew image game object.

    +

    See Skew image game object, Mesh game object, game object

    +

    Create mask

    +
    var mask = image.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +
    diff --git a/docs/site/sprite/index.html b/docs/site/sprite/index.html index 669b012f91..f624d5df9b 100644 --- a/docs/site/sprite/index.html +++ b/docs/site/sprite/index.html @@ -852,6 +852,20 @@ Other properties + + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9547,6 +9561,20 @@ Other properties +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9767,6 +9795,12 @@

    Texturegame object - texture

    Other properties

    See game object

    +

    Create mask

    +
    var mask = sprite.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    Animation

    Create animation

    @@ -9795,6 +9816,27 @@ RTL +
  • + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -10451,6 +10493,14 @@

    RTL¶< +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = txt.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    diff --git a/docs/site/text/index.html b/docs/site/text/index.html index b0fe2516c3..3eccebfdfd 100644 --- a/docs/site/text/index.html +++ b/docs/site/text/index.html @@ -1682,6 +1682,27 @@ Test string + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9535,6 +9556,27 @@ Test string + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9864,6 +9906,14 @@

    Test stringSet the test string to use when measuring the font.

    txt.style.setTestString(text);
     
    +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = txt.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    diff --git a/docs/site/textplayer/index.html b/docs/site/textplayer/index.html index 8fb52d6853..fcbba3c9a2 100644 --- a/docs/site/textplayer/index.html +++ b/docs/site/textplayer/index.html @@ -1949,6 +1949,27 @@ Size + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9957,6 +9978,27 @@ Size + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -11075,6 +11117,14 @@

    Size&par
    txt.setToMinSize();
     
    +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = txt.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    diff --git a/docs/site/tilemap/index.html b/docs/site/tilemap/index.html index 255cb6866e..2f21ff7bd2 100644 --- a/docs/site/tilemap/index.html +++ b/docs/site/tilemap/index.html @@ -2568,6 +2568,13 @@ + + +
  • + + Shader effects + +
  • @@ -9862,6 +9869,13 @@ +
  • + +
  • + + Shader effects + +
  • @@ -10477,6 +10491,12 @@

    Shuffle tiles
    layer.shuffle(tileX, tileY, width, height);
     

  • +

    Shader effects

    +

    `layer`` support postFX effects

    +
    +

    Note

    +

    No preFX effect support

    +

    Tile

    Get tile

    var tile = map.getTileAt(tileX, tileY);
    diff --git a/docs/site/tilesprite/index.html b/docs/site/tilesprite/index.html
    index 4250dcb803..d727c64f89 100644
    --- a/docs/site/tilesprite/index.html
    +++ b/docs/site/tilesprite/index.html
    @@ -1108,6 +1108,13 @@
         Create mask
       
       
    +
    +        
    +          
  • + + Shader effects + +
  • @@ -9451,6 +9458,13 @@ Create mask + + +
  • + + Shader effects + +
  • @@ -9560,6 +9574,8 @@

    Create mask
    var mask = image.createBitmapMask();
     

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    diff --git a/docs/site/transitionimage/index.html b/docs/site/transitionimage/index.html index 9d47dcf6d5..a2cb247bae 100644 --- a/docs/site/transitionimage/index.html +++ b/docs/site/transitionimage/index.html @@ -1075,6 +1075,27 @@ Use cases + + +
  • + + Internal image game object + + +
  • + +
  • + + Other properties + + +
  • + +
  • + + Shader effects + +
  • @@ -9673,6 +9694,27 @@ Use cases + + +
  • + + Internal image game object + + +
  • + +
  • + + Other properties + + +
  • + +
  • + + Shader effects + +
  • @@ -9701,7 +9743,7 @@

    Transition image

    Introduction

    -

    Transit texture to another one. A containerLite game object with 2 image game objects.

    +

    Transit texture to another one. A containerLite game object with 2 image game objects.

    @@ -9603,6 +9610,13 @@ Flip + + +
  • + + Other properties + +
  • @@ -9839,6 +9853,8 @@

    Flip&par image.toggleFlipY(); +

    Other properties

    +

    See transition image object, game object

    diff --git a/docs/site/video/index.html b/docs/site/video/index.html index d0b9a71c0a..201a537a85 100644 --- a/docs/site/video/index.html +++ b/docs/site/video/index.html @@ -984,6 +984,27 @@ Events + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -9659,6 +9680,27 @@ Events + + +
  • + + Other properties + + +
  • + +
  • + + Create mask + + +
  • + +
  • + + Shader effects + +
  • @@ -10013,6 +10055,14 @@

    Events}, scope); +

    Other properties

    +

    See game object

    +

    Create mask

    +
    var mask = video.createBitmapMask();
    +
    +

    See mask

    +

    Shader effects

    +

    Support preFX and postFX effects

    diff --git a/docs/site/youtubeplayer/index.html b/docs/site/youtubeplayer/index.html index e4b7b7e2e3..14d89c43d0 100644 --- a/docs/site/youtubeplayer/index.html +++ b/docs/site/youtubeplayer/index.html @@ -2989,6 +2989,13 @@ Events + + +
  • + + Other properties + +
  • @@ -9648,6 +9655,13 @@ Events +
  • + +
  • + + Other properties + +
  • @@ -9990,6 +10004,8 @@

    EventsNo Playback time changed event

    Get playback time every tick might cause playing video lagging.

    +

    Other properties

    +

    See dom game object, game object

    Interactive with other game objects

    See dom-element's Interactive with other game objects

    diff --git a/docs/site/zone/index.html b/docs/site/zone/index.html index 1dce04a63d..25a451d4d9 100644 --- a/docs/site/zone/index.html +++ b/docs/site/zone/index.html @@ -2583,22 +2583,22 @@
  • - - Other properties + + Input hit zone
  • - - Input hit zone + + Drop zones
  • - - Drop zones + + Other properties
  • @@ -9415,22 +9415,22 @@
  • - - Other properties + + Input hit zone
  • - - Input hit zone + + Drop zones
  • - - Drop zones + + Other properties
  • @@ -9503,8 +9503,6 @@

    Custom class
    var zone = new MyZone(x, y, width, height);
     
    -

    Other properties

    -

    See game object

    Input hit zone

    zone.setInteractive();
     
    @@ -9532,6 +9530,8 @@

    Drop zonesdrop zone

    +

    Other properties

    +

    See game object