diff --git a/functions/Arc.html b/functions/Arc.html index 2d7bcf57..c61409b7 100644 --- a/functions/Arc.html +++ b/functions/Arc.html @@ -1,9 +1,9 @@ -Arc | phaser-jsx

Function Arc

The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

+Arc | phaser-jsx

Function Arc

The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

When it renders it displays an arc shape. You can control the start and end angles of the arc, as well as if the angles are winding clockwise or anti-clockwise. With the default settings it renders as a complete circle. By changing the angles you can create other arc shapes, such as half-circles.

Arcs also have an iterations property and corresponding setIterations method. This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations that take place during construction.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/BitmapText.html b/functions/BitmapText.html index 72aff2e3..38216989 100644 --- a/functions/BitmapText.html +++ b/functions/BitmapText.html @@ -1,4 +1,4 @@ -BitmapText | phaser-jsx

Function BitmapText

BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.

+BitmapText | phaser-jsx

Function BitmapText

BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.

During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to match the font structure.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor, applying fills and any other effects required.

To create multi-line text insert \r, \n or \r\n escape codes into the text string.

@@ -6,7 +6,7 @@

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Blitter.html b/functions/Blitter.html index b78ab7cf..bff8d143 100644 --- a/functions/Blitter.html +++ b/functions/Blitter.html @@ -1,9 +1,9 @@ -Blitter | phaser-jsx

Function Blitter

A Blitter Game Object.

+Blitter | phaser-jsx

Function Blitter

A Blitter Game Object.

The Blitter Game Object is a special kind of container that creates, updates and manages Bob objects. Bobs are designed for rendering speed rather than flexibility. They consist of a texture, or frame from a texture, a position and an alpha value. You cannot scale or rotate them. They use a batched drawing method for speed during rendering.

A Blitter Game Object has one texture bound to it. Bobs created by the Blitter can use any Frame from this Texture to render with, but they cannot use any other Texture. It is this single texture-bind that allows them their speed.

If you have a need to blast a large volume of frames around the screen then Blitter objects are well worth investigating. They are especially useful for using as a base for your own special effects systems.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Bob.html b/functions/Bob.html index 73c351e5..482e5805 100644 --- a/functions/Bob.html +++ b/functions/Bob.html @@ -1,10 +1,10 @@ -Bob | phaser-jsx

Function Bob

A Bob Game Object.

+Bob | phaser-jsx

Function Bob

A Bob Game Object.

A Bob belongs to a Blitter Game Object. The Blitter is responsible for managing and rendering this object.

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. The Frame the Bob uses to render can be changed dynamically, but it must be a Frame within the Texture used by the parent Blitter.

Bob positions are relative to the Blitter parent. So if you move the Blitter parent, all Bob children will have their positions impacted by this change as well.

You can manipulate Bob objects directly from your game code, but the creation and destruction of them should be handled via the Blitter parent.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Container.html b/functions/Container.html index ad437b2d..9bde0ba6 100644 --- a/functions/Container.html +++ b/functions/Container.html @@ -1,4 +1,4 @@ -Container | phaser-jsx

Function Container

A Container Game Object.

+Container | phaser-jsx

Function Container

A Container Game Object.

A Container, as the name implies, can 'contain' other types of Game Object. When a Game Object is added to a Container, the Container becomes responsible for the rendering of it. By default it will be removed from the Display List and instead added to the Containers own internal list.

The position of the Game Object automatically becomes relative to the position of the Container.

The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of the Container, and position children positively and negative around it as required.

@@ -11,7 +11,7 @@

Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However, if Container children are enabled for physics you may get unexpected results, such as offset bodies, if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children with physics do not factor in the Container due to the excessive extra calculations needed. Please structure your game to work around this.

It's important to understand the impact of using Containers. They add additional processing overhead into every one of their children. The deeper you nest them, the more the cost escalates. This is especially true for input events. You also loose the ability to set the display depth of Container children in the same flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost every time you create one, try to structure your game around avoiding that where possible.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Curve.html b/functions/Curve.html index 062d0e29..b71e3322 100644 --- a/functions/Curve.html +++ b/functions/Curve.html @@ -1,9 +1,9 @@ -Curve | phaser-jsx

Function Curve

The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

+Curve | phaser-jsx

Function Curve

The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

To render a Curve Shape you must first create a Phaser.Curves.Curve object, then pass it to the Curve Shape in the constructor.

The Curve shape also has a smoothness property and corresponding setSmoothness method. This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations that take place during construction. Increase and decrease the default value for smoother, or more jagged, shapes.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/DOMElement.html b/functions/DOMElement.html index d73eedc1..010654b7 100644 --- a/functions/DOMElement.html +++ b/functions/DOMElement.html @@ -1,4 +1,4 @@ -DOMElement | phaser-jsx

Function DOMElement

DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game.

+DOMElement | phaser-jsx

Function DOMElement

DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game.

In order for DOM Elements to display you have to enable them by adding the following to your game configuration object:

dom {
createContainer: true
}
@@ -18,7 +18,7 @@

Note that you should only have DOM Elements in a Scene with a single Camera. If you require multiple cameras, use parallel scenes to achieve this.

DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table. Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top of your game, and should treat it accordingly.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/DisplayList.html b/functions/DisplayList.html index 039f7682..8129c9af 100644 --- a/functions/DisplayList.html +++ b/functions/DisplayList.html @@ -1,8 +1,8 @@ -DisplayList | phaser-jsx

Function DisplayList

The Display List plugin.

+DisplayList | phaser-jsx

Function DisplayList

The Display List plugin.

Display Lists belong to a Scene and maintain the list of Game Objects to render every frame.

Some of these Game Objects may also be part of the Scene's Update List, for updating.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/DynamicBitmapText.html b/functions/DynamicBitmapText.html index a99e12af..e34b0397 100644 --- a/functions/DynamicBitmapText.html +++ b/functions/DynamicBitmapText.html @@ -1,4 +1,4 @@ -DynamicBitmapText | phaser-jsx

Function DynamicBitmapText

BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.

+DynamicBitmapText | phaser-jsx

Function DynamicBitmapText

BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.

During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to match the font structure.

Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each letter being rendered during the render pass. This callback allows you to manipulate the properties of each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing time, so only use them if you require the callback ability they have.

BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor, applying fills and any other effects required.

@@ -7,7 +7,7 @@

BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner Littera (Web-based, free): http://kvazars.com/littera/

For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Ellipse.html b/functions/Ellipse.html index 0db818ec..afe69044 100644 --- a/functions/Ellipse.html +++ b/functions/Ellipse.html @@ -1,9 +1,9 @@ -Ellipse | phaser-jsx

Function Ellipse

The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

+Ellipse | phaser-jsx

Function Ellipse

The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

When it renders it displays an ellipse shape. You can control the width and height of the ellipse. If the width and height match it will render as a circle. If the width is less than the height, it will look more like an egg shape.

The Ellipse shape also has a smoothness property and corresponding setSmoothness method. This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations that take place during construction. Increase and decrease the default value for smoother, or more jagged, shapes.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Extern.html b/functions/Extern.html index 71d7b96d..a7574328 100644 --- a/functions/Extern.html +++ b/functions/Extern.html @@ -1,9 +1,9 @@ -Extern | phaser-jsx

Function Extern

An Extern Game Object is a special type of Game Object that allows you to pass rendering off to a 3rd party.

+Extern | phaser-jsx

Function Extern

An Extern Game Object is a special type of Game Object that allows you to pass rendering off to a 3rd party.

When you create an Extern and place it in the display list of a Scene, the renderer will process the list as usual. When it finds an Extern it will flush the current batch, clear down the pipeline and prepare a transform matrix which your render function can take advantage of, if required.

The WebGL context is then left is a 'clean' state, ready for you to bind your own shaders, or draw to it, whatever you wish to do. Once you've finished, you should free-up any of your resources. The Extern will then rebind the Phaser pipeline and carry on rendering the display list.

Although this object has lots of properties such as Alpha, Blend Mode and Tint, none of them are used during rendering unless you take advantage of them in your own render code.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/GameObject.html b/functions/GameObject.html index 43158adf..90e7531a 100644 --- a/functions/GameObject.html +++ b/functions/GameObject.html @@ -1,6 +1,6 @@ -GameObject | phaser-jsx

Function GameObject

The base class that all Game Objects extend. You don't create GameObjects directly and they cannot be added to the display list. Instead, use them as the base for your own custom classes.

+GameObject | phaser-jsx

Function GameObject

The base class that all Game Objects extend. You don't create GameObjects directly and they cannot be added to the display list. Instead, use them as the base for your own custom classes.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/GameObjectCreator.html b/functions/GameObjectCreator.html index f4ac3e16..9f90f613 100644 --- a/functions/GameObjectCreator.html +++ b/functions/GameObjectCreator.html @@ -1,7 +1,7 @@ -GameObjectCreator | phaser-jsx

Function GameObjectCreator

The Game Object Creator is a Scene plugin that allows you to quickly create many common types of Game Objects and return them using a configuration object, rather than having to specify a limited set of parameters such as with the GameObjectFactory.

+GameObjectCreator | phaser-jsx

Function GameObjectCreator

The Game Object Creator is a Scene plugin that allows you to quickly create many common types of Game Objects and return them using a configuration object, rather than having to specify a limited set of parameters such as with the GameObjectFactory.

Game Objects made via this class are automatically added to the Scene and Update List unless you explicitly set the add property in the configuration object to false.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/GameObjectFactory.html b/functions/GameObjectFactory.html index 241442ef..4cf66d0a 100644 --- a/functions/GameObjectFactory.html +++ b/functions/GameObjectFactory.html @@ -1,7 +1,7 @@ -GameObjectFactory | phaser-jsx

Function GameObjectFactory

The Game Object Factory is a Scene plugin that allows you to quickly create many common types of Game Objects and have them automatically registered with the Scene.

+GameObjectFactory | phaser-jsx

Function GameObjectFactory

The Game Object Factory is a Scene plugin that allows you to quickly create many common types of Game Objects and have them automatically registered with the Scene.

Game Objects directly register themselves with the Factory and inject their own creation methods into the class.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Graphics.html b/functions/Graphics.html index a129e12f..7cfd9411 100644 --- a/functions/Graphics.html +++ b/functions/Graphics.html @@ -1,4 +1,4 @@ -Graphics | phaser-jsx

Function Graphics

A Graphics object is a way to draw primitive shapes to your game. Primitives include forms of geometry, such as Rectangles, Circles, and Polygons. They also include lines, arcs and curves. When you initially create a Graphics object it will be empty.

+Graphics | phaser-jsx

Function Graphics

A Graphics object is a way to draw primitive shapes to your game. Primitives include forms of geometry, such as Rectangles, Circles, and Polygons. They also include lines, arcs and curves. When you initially create a Graphics object it will be empty.

To draw to it you must first specify a line style or fill style (or both), draw shapes using paths, and finally fill or stroke them. For example:

graphics.lineStyle(5, 0xFF00FF, 1.0);
graphics.beginPath();
graphics.moveTo(100, 100);
graphics.lineTo(200, 200);
graphics.closePath();
graphics.strokePath();
@@ -11,7 +11,7 @@

If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help performance by calling Phaser.GameObjects.Graphics#generateTexture. This will 'bake' the Graphics object into a Texture, and return it. You can then use this Texture for Sprites or other display objects. If your Graphics object updates frequently then you should avoid doing this, as it will constantly generate new textures, which will consume memory.

As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful in their complexity and quantity of them in your game.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Grid.html b/functions/Grid.html index 112a4a68..10482afa 100644 --- a/functions/Grid.html +++ b/functions/Grid.html @@ -1,8 +1,8 @@ -Grid | phaser-jsx

Function Grid

The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

+Grid | phaser-jsx

Function Grid

The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports only fill colors and cannot be stroked.

A Grid Shape allows you to display a grid in your game, where you can control the size of the grid as well as the width and height of the grid cells. You can set a fill color for each grid cell as well as an alternate fill color. When the alternate fill color is set then the grid cells will alternate the fill colors as they render, creating a chess-board effect. You can also optionally have an outline fill color. If set, this draws lines between the grid cells in the given color. If you specify an outline color with an alpha of zero, then it will draw the cells spaced out, but without the lines between them.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Group.html b/functions/Group.html index e3eafece..be5ad3c0 100644 --- a/functions/Group.html +++ b/functions/Group.html @@ -1,8 +1,8 @@ -Group | phaser-jsx

Function Group

A Group is a way for you to create, manipulate, or recycle similar Game Objects.

+Group | phaser-jsx

Function Group

A Group is a way for you to create, manipulate, or recycle similar Game Objects.

Group membership is non-exclusive. A Game Object can belong to several groups, one group, or none.

Groups themselves aren't displayable, and can't be positioned, rotated, scaled, or hidden.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Image.html b/functions/Image.html index 3089f577..d528b9aa 100644 --- a/functions/Image.html +++ b/functions/Image.html @@ -1,7 +1,7 @@ -Image | phaser-jsx

Function Image

An Image Game Object.

+Image | phaser-jsx

Function Image

An Image Game Object.

An Image is a light-weight Game Object useful for the display of static images in your game, such as logos, backgrounds, scenery or other non-animated elements. Images can have input events and physics bodies, or be tweened, tinted or scrolled. The main difference between an Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/IsoBox.html b/functions/IsoBox.html index b78bf32a..5dd3d016 100644 --- a/functions/IsoBox.html +++ b/functions/IsoBox.html @@ -1,9 +1,9 @@ -IsoBox | phaser-jsx

Function IsoBox

The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

+IsoBox | phaser-jsx

Function IsoBox

The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports only fill colors and cannot be stroked.

An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set the color of the top, left and right faces of the rectangle respectively. You can also choose which of the faces are rendered via the showTop, showLeft and showRight properties.

You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting the projection property.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/IsoTriangle.html b/functions/IsoTriangle.html index ed2544d5..3eb6abe6 100644 --- a/functions/IsoTriangle.html +++ b/functions/IsoTriangle.html @@ -1,9 +1,9 @@ -IsoTriangle | phaser-jsx

Function IsoTriangle

The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

+IsoTriangle | phaser-jsx

Function IsoTriangle

The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports only fill colors and cannot be stroked.

An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different fill color. You can set the color of the top, left and right faces of the triangle respectively You can also choose which of the faces are rendered via the showTop, showLeft and showRight properties.

You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting the projection property. The reversed property controls if the IsoTriangle is rendered upside down or not.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Layer.html b/functions/Layer.html index 66ff5f15..8be244cb 100644 --- a/functions/Layer.html +++ b/functions/Layer.html @@ -1,4 +1,4 @@ -Layer | phaser-jsx

Function Layer

A Layer Game Object.

+Layer | phaser-jsx

Function Layer

A Layer Game Object.

A Layer is a special type of Game Object that acts as a Display List. You can add any type of Game Object to a Layer, just as you would to a Scene. Layers can be used to visually group together 'layers' of Game Objects:

const spaceman = this.add.sprite(150, 300, 'spaceman');
const bunny = this.add.sprite(400, 300, 'bunny');
const elephant = this.add.sprite(650, 300, 'elephant');

const layer = this.add.layer();

layer.add([ spaceman, bunny, elephant ]);
@@ -11,7 +11,7 @@

If you need those kind of features then you should use a Container instead. Containers can be added to Layers, but Layers cannot be added to Containers.

However, you can set the Alpha, Blend Mode, Depth, Mask and Visible state of a Layer. These settings will impact all children being rendered by the Layer.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Light.html b/functions/Light.html index 5f5d37f1..b44a10b1 100644 --- a/functions/Light.html +++ b/functions/Light.html @@ -1,6 +1,6 @@ -Light | phaser-jsx

Function Light

A Scene plugin that provides a Phaser.GameObjects.LightsManager for the Light2D pipeline.

+Light | phaser-jsx

Function Light

A Scene plugin that provides a Phaser.GameObjects.LightsManager for the Light2D pipeline.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/LightsManager.html b/functions/LightsManager.html index 3383ac49..9aa36d9b 100644 --- a/functions/LightsManager.html +++ b/functions/LightsManager.html @@ -1,7 +1,7 @@ -LightsManager | phaser-jsx

Function LightsManager

Manages Lights for a Scene.

+LightsManager | phaser-jsx

Function LightsManager

Manages Lights for a Scene.

Affects the rendering of Game Objects using the Light2D pipeline.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/LightsPlugin.html b/functions/LightsPlugin.html index c5299f6b..570d9d93 100644 --- a/functions/LightsPlugin.html +++ b/functions/LightsPlugin.html @@ -1,4 +1,4 @@ -LightsPlugin | phaser-jsx

Function LightsPlugin

A Scene plugin that provides a Phaser.GameObjects.LightsManager for the Light2D pipeline.

+LightsPlugin | phaser-jsx

Function LightsPlugin

A Scene plugin that provides a Phaser.GameObjects.LightsManager for the Light2D pipeline.

Available from within a Scene via this.lights.

Add Lights using the Phaser.GameObjects.LightsManager#addLight method:

// Enable the Lights Manager because it is disabled by default
this.lights.enable();

// Create a Light at [400, 300] with a radius of 200
this.lights.addLight(400, 300, 200); @@ -10,7 +10,7 @@

Note that you cannot use this pipeline on Graphics Game Objects or Shape Game Objects.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Line.html b/functions/Line.html index 158e3c85..4c1c2266 100644 --- a/functions/Line.html +++ b/functions/Line.html @@ -1,10 +1,10 @@ -Line | phaser-jsx

Function Line

The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

+Line | phaser-jsx

Function Line

The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports only stroke colors and cannot be filled.

A Line Shape allows you to draw a line between two points in your game. You can control the stroke color and thickness of the line. In WebGL only you can also specify a different thickness for the start and end of the line, allowing you to render lines that taper-off.

If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead.

Be aware that as with all Game Objects the default origin is 0.5. If you need to draw a Line between two points and want the x1/y1 values to match the x/y values, then set the origin to 0.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Mesh.html b/functions/Mesh.html index 7c3b3f57..c00e9848 100644 --- a/functions/Mesh.html +++ b/functions/Mesh.html @@ -1,4 +1,4 @@ -Mesh | phaser-jsx

Function Mesh

A Mesh Game Object.

+Mesh | phaser-jsx

Function Mesh

A Mesh Game Object.

The Mesh Game Object allows you to render a group of textured vertices and manipulate the view of those vertices, such as rotation, translation or scaling.

Support for generating mesh data from grids, model data or Wavefront OBJ Files is included.

Although you can use this to render 3D objects, its primary use is for displaying more complex Sprites, or Sprites where you need fine-grained control over the vertice positions in order to achieve special effects in your games. Note that rendering still takes place using Phasers orthographic camera. As a result, all depth and face tests are done in orthographic space.

@@ -7,7 +7,7 @@

Note that the Mesh object is WebGL only and does not have a Canvas counterpart.

The Mesh origin is always 0.5 x 0.5 and cannot be changed.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/NineSlice.html b/functions/NineSlice.html index f9a5a25f..fe364ab1 100644 --- a/functions/NineSlice.html +++ b/functions/NineSlice.html @@ -1,4 +1,4 @@ -NineSlice | phaser-jsx

Function NineSlice

A Nine Slice Game Object allows you to display a texture-based object that +NineSlice | phaser-jsx

Function NineSlice

A Nine Slice Game Object allows you to display a texture-based object that can be stretched both horizontally and vertically, but that retains fixed-sized corners. The dimensions of the corners are set via the parameters to this class.

@@ -45,7 +45,7 @@ specifying anything more than the texture key and frame and it will pull the area data from the atlas.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/ParticleEmitter.html b/functions/ParticleEmitter.html index b3807f88..9ba12108 100644 --- a/functions/ParticleEmitter.html +++ b/functions/ParticleEmitter.html @@ -1,6 +1,6 @@ -ParticleEmitter | phaser-jsx

Function ParticleEmitter

A particle emitter represents a single particle stream. It controls a pool of Particles and is controlled by a Particle Emitter Manager.

+ParticleEmitter | phaser-jsx

Function ParticleEmitter

A particle emitter represents a single particle stream. It controls a pool of Particles and is controlled by a Particle Emitter Manager.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/PathFollower.html b/functions/PathFollower.html index 44956ee4..40a53e6b 100644 --- a/functions/PathFollower.html +++ b/functions/PathFollower.html @@ -1,9 +1,9 @@ -PathFollower | phaser-jsx

Function PathFollower

A PathFollower Game Object.

+PathFollower | phaser-jsx

Function PathFollower

A PathFollower Game Object.

A PathFollower is a Sprite Game Object with some extra helpers to allow it to follow a Path automatically.

Anything you can do with a standard Sprite can be done with this PathFollower, such as animate it, tint it, scale it and so on.

PathFollowers are bound to a single Path at any one time and can traverse the length of the Path, from start to finish, forwards or backwards, or from any given point on the Path to its end. They can optionally rotate to face the direction of the path, be offset from the path coordinates or rotate independently of the Path.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Plane.html b/functions/Plane.html index bac2f5e7..48dafbaf 100644 --- a/functions/Plane.html +++ b/functions/Plane.html @@ -1,4 +1,4 @@ -Plane | phaser-jsx

Function Plane

A Plane Game Object.

+Plane | phaser-jsx

Function Plane

A Plane Game Object.

The Plane Game Object is a helper class that takes the Mesh Game Object and extends it, allowing for fast and easy creation of Planes. A Plane is a one-sided grid of cells, where you specify the number of cells in each dimension. The Plane can have a texture that is either repeated (tiled) across each cell, or applied to the full Plane.

The Plane can then be manipulated in 3D space, with rotation across all 3 axis.

This allows you to create effects not possible with regular Sprites, such as perspective distortion. You can also adjust the vertices on a per-vertex basis. Plane data becomes part of the WebGL batch, just like standard Sprites, so doesn't introduce any additional shader overhead. Because the Plane just generates vertices into the WebGL batch, like any other Sprite, you can use all of the common Game Object components on a Plane too, such as a custom pipeline, mask, blend mode or texture.

@@ -7,7 +7,7 @@

Note that the Plane object is WebGL only and does not have a Canvas counterpart.

The Plane origin is always 0.5 x 0.5 and cannot be changed.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/PointLight.html b/functions/PointLight.html index f92aec47..9feb7dc3 100644 --- a/functions/PointLight.html +++ b/functions/PointLight.html @@ -1,11 +1,11 @@ -PointLight | phaser-jsx

Function PointLight

The Point Light Game Object provides a way to add a point light effect into your game, without the expensive shader processing requirements of the traditional Light Game Object.

+PointLight | phaser-jsx

Function PointLight

The Point Light Game Object provides a way to add a point light effect into your game, without the expensive shader processing requirements of the traditional Light Game Object.

The difference is that the Point Light renders using a custom shader, designed to give the impression of a point light source, of variable radius, intensity and color, in your game. However, unlike the Light Game Object, it does not impact any other Game Objects, or use their normal maps for calcuations. This makes them extremely fast to render compared to Lights and perfect for special effects, such as flickering torches or muzzle flashes.

For maximum performance you should batch Point Light Game Objects together. This means ensuring they follow each other consecutively on the display list. Ideally, use a Layer Game Object and then add just Point Lights to it, so that it can batch together the rendering of the lights. You don't have to do this, and if you've only a handful of Point Lights in your game then it's perfectly safe to mix them into the dislay list as normal. However, if you're using a large number of them, please consider how they are mixed into the display list.

The renderer will automatically cull Point Lights. Those with a radius that does not intersect with the Camera will be skipped in the rendering list. This happens automatically and the culled state is refreshed every frame, for every camera.

The origin of a Point Light is always 0.5 and it cannot be changed.

Point Lights are a WebGL only feature and do not have a Canvas counterpart.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Polygon.html b/functions/Polygon.html index 4e1f0482..a7cd1cb3 100644 --- a/functions/Polygon.html +++ b/functions/Polygon.html @@ -1,4 +1,4 @@ -Polygon | phaser-jsx

Function Polygon

The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

+Polygon | phaser-jsx

Function Polygon

The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

The Polygon Shape is created by providing a list of points, which are then used to create an internal Polygon geometry object. The points can be set from a variety of formats:

    @@ -10,7 +10,7 @@

By default the x and y coordinates of this Shape refer to the center of it. However, depending on the coordinates of the points provided, the final shape may be rendered offset from its origin.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Rectangle.html b/functions/Rectangle.html index f2d31b04..da9bf054 100644 --- a/functions/Rectangle.html +++ b/functions/Rectangle.html @@ -1,8 +1,8 @@ -Rectangle | phaser-jsx

Function Rectangle

The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

+Rectangle | phaser-jsx

Function Rectangle

The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

You can change the size of the rectangle by changing the width and height properties.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/RenderTexture.html b/functions/RenderTexture.html index 4e9a1a3f..950d602d 100644 --- a/functions/RenderTexture.html +++ b/functions/RenderTexture.html @@ -1,8 +1,8 @@ -RenderTexture | phaser-jsx

Function RenderTexture

A Render Texture.

+RenderTexture | phaser-jsx

Function RenderTexture

A Render Texture.

A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads.

Note that under WebGL a FrameBuffer, which is what the Render Texture uses internally, cannot be anti-aliased. This means that when drawing objects such as Shapes to a Render Texture they will appear to be drawn with no aliasing, however this is a technical limitation of WebGL. To get around it, create your shape as a texture in an art package, then draw that to the Render Texture.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Rope.html b/functions/Rope.html index 6172ace7..00650330 100644 --- a/functions/Rope.html +++ b/functions/Rope.html @@ -1,9 +1,9 @@ -Rope | phaser-jsx

Function Rope

A Rope Game Object.

+Rope | phaser-jsx

Function Rope

A Rope Game Object.

The Rope object is WebGL only and does not have a Canvas counterpart.

A Rope is a special kind of Game Object that has a texture that repeats along its entire length. Unlike a Sprite, it isn't restricted to using just a quad and can have as many vertices as you define when creating it. The vertices can be arranged in a horizontal or vertical strip and have their own color and alpha values as well.

A Ropes origin is always 0.5 x 0.5 and cannot be changed.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Shader.html b/functions/Shader.html index 55d3af01..d9bdb7cf 100644 --- a/functions/Shader.html +++ b/functions/Shader.html @@ -1,7 +1,7 @@ -Shader | phaser-jsx

Function Shader

A Shader Game Object.

+Shader | phaser-jsx

Function Shader

A Shader Game Object.

This Game Object allows you to easily add a quad with its own shader into the display list, and manipulate it as you would any other Game Object, including scaling, rotating, positioning and adding to Containers. Shaders can be masked with either Bitmap or Geometry masks and can also be used as a Bitmap Mask for a Camera or other Game Object. They can also be made interactive and used for input events.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Shape.html b/functions/Shape.html index a954fb8f..8436d7e7 100644 --- a/functions/Shape.html +++ b/functions/Shape.html @@ -1,6 +1,6 @@ -Shape | phaser-jsx

Function Shape

The Shape Game Object is a base class for the various different shapes, such as the Arc, Star or Polygon. You cannot add a Shape directly to your Scene, it is meant as a base for your own custom Shape classes.

+Shape | phaser-jsx

Function Shape

The Shape Game Object is a base class for the various different shapes, such as the Arc, Star or Polygon. You cannot add a Shape directly to your Scene, it is meant as a base for your own custom Shape classes.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Sprite.html b/functions/Sprite.html index 6326cfc5..8ce7fb9f 100644 --- a/functions/Sprite.html +++ b/functions/Sprite.html @@ -1,8 +1,8 @@ -Sprite | phaser-jsx

Function Sprite

A Sprite Game Object.

+Sprite | phaser-jsx

Function Sprite

A Sprite Game Object.

A Sprite Game Object is used for the display of both static and animated images in your game. Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled and animated.

The main difference between a Sprite and an Image Game Object is that you cannot animate Images. As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Star.html b/functions/Star.html index 9517fb6b..5babf92d 100644 --- a/functions/Star.html +++ b/functions/Star.html @@ -1,9 +1,9 @@ -Star | phaser-jsx

Function Star

The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

+Star | phaser-jsx

Function Star

The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

As the name implies, the Star shape will display a star in your game. You can control several aspects of it including the number of points that constitute the star. The default is 5. If you change it to 4 it will render as a diamond. If you increase them, you'll get a more spiky star shape.

You can also control the inner and outer radius, which is how 'long' each point of the star is. Modify these values to create more interesting shapes.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Text.html b/functions/Text.html index 024b8c82..d5e9d624 100644 --- a/functions/Text.html +++ b/functions/Text.html @@ -1,4 +1,4 @@ -Text | phaser-jsx

Function Text

A Text Game Object.

+Text | phaser-jsx

Function Text

A Text Game Object.

Text objects work by creating their own internal hidden Canvas and then renders text to it using the standard Canvas fillText API. It then creates a texture from this canvas which is rendered to your game during the render pass.

Because it uses the Canvas API you can take advantage of all the features this offers, such as applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts loaded externally, such as Google or TypeKit Web fonts.

Important: The font name must be quoted if it contains certain combinations of digits or special characters, either when creating the Text object, or when setting the font via setFont or setFontFamily, e.g.:

@@ -12,7 +12,7 @@

See this compatibility table for the available default fonts across mobile browsers.

A note on performance: Every time the contents of a Text object changes, i.e. changing the text being displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the new texture to the GPU. This can be an expensive operation if used often, or with large quantities of Text objects in your game. If you run into performance issues you would be better off using Bitmap Text instead, as it benefits from batching and avoids expensive Canvas API calls.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/TextStyle.html b/functions/TextStyle.html index 43b43556..89277b49 100644 --- a/functions/TextStyle.html +++ b/functions/TextStyle.html @@ -1,7 +1,7 @@ -TextStyle | phaser-jsx

Function TextStyle

A TextStyle class manages all of the style settings for a Text object.

+TextStyle | phaser-jsx

Function TextStyle

A TextStyle class manages all of the style settings for a Text object.

Text Game Objects create a TextStyle instance automatically, which is accessed via the Text.style property. You do not normally need to instantiate one yourself.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/TileSprite.html b/functions/TileSprite.html index a8ebf081..7baa6a76 100644 --- a/functions/TileSprite.html +++ b/functions/TileSprite.html @@ -1,9 +1,9 @@ -TileSprite | phaser-jsx

Function TileSprite

A TileSprite is a Sprite that has a repeating texture.

+TileSprite | phaser-jsx

Function TileSprite

A TileSprite is a Sprite that has a repeating texture.

The texture can be scrolled and scaled independently of the TileSprite itself. Textures will automatically wrap and are designed so that you can create game backdrops using seamless textures as a source.

You shouldn't ever create a TileSprite any larger than your actual canvas size. If you want to create a large repeating background that scrolls across the whole map of your game, then you create a TileSprite that fits the canvas size and then use the tilePosition property to scroll the texture as the player moves. If you create a TileSprite that is thousands of pixels in size then it will consume huge amounts of memory and cause performance issues. Remember: use tilePosition to scroll your texture and tileScale to adjust the scale of the texture - don't resize the sprite itself or make it larger than it needs.

An important note about Tile Sprites and NPOT textures: Internally, TileSprite textures use GL_REPEAT to provide seamless repeating of the textures. This, combined with the way in which the textures are handled in WebGL, means they need to be POT (power-of-two) sizes in order to wrap. If you provide a NPOT (non power-of-two) texture to a TileSprite it will generate a POT sized canvas and draw your texture to it, scaled up to the POT size. It's then scaled back down again during rendering to the original dimensions. While this works, in that it allows you to use any size texture for a Tile Sprite, it does mean that NPOT textures are going to appear anti-aliased when rendered, due to the interpolation that took place when it was resized into a POT texture. This is especially visible in pixel art graphics. If you notice it and it becomes an issue, the only way to avoid it is to ensure that you provide POT textures for Tile Sprites.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Triangle.html b/functions/Triangle.html index ef2b470b..cd24e8a8 100644 --- a/functions/Triangle.html +++ b/functions/Triangle.html @@ -1,8 +1,8 @@ -Triangle | phaser-jsx

Function Triangle

The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

+Triangle | phaser-jsx

Function Triangle

The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling it for input or physics. It provides a quick and easy way for you to render this shape in your game without using a texture, while still taking advantage of being fully batched in WebGL.

This shape supports both fill and stroke colors.

The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the position of each point of these lines. The triangle is always closed and cannot have an open face. If you require that, consider using a Polygon instead.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/UpdateList.html b/functions/UpdateList.html index bb87772d..0702b6cd 100644 --- a/functions/UpdateList.html +++ b/functions/UpdateList.html @@ -1,8 +1,8 @@ -UpdateList | phaser-jsx

Function UpdateList

The Update List plugin.

+UpdateList | phaser-jsx

Function UpdateList

The Update List plugin.

Update Lists belong to a Scene and maintain the list Game Objects to be updated every frame.

Some or all of these Game Objects may also be part of the Scene's Display List, for Rendering.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Video.html b/functions/Video.html index 31df0683..e69001d4 100644 --- a/functions/Video.html +++ b/functions/Video.html @@ -1,7 +1,7 @@ -Video | phaser-jsx

Function Video

A Video Game Object.

+Video | phaser-jsx

Function Video

A Video Game Object.

This Game Object is capable of handling playback of a previously loaded video from the Phaser Video Cache, or playing a video based on a given URL. Videos can be either local, or streamed.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/Zone.html b/functions/Zone.html index f77a8472..68230dd8 100644 --- a/functions/Zone.html +++ b/functions/Zone.html @@ -1,8 +1,8 @@ -Zone | phaser-jsx

Function Zone

A Zone Game Object.

+Zone | phaser-jsx

Function Zone

A Zone Game Object.

A Zone is a non-rendering rectangular Game Object that has a position and size. It has no texture and never displays, but does live on the display list and can be moved, scaled and rotated like any other Game Object.

Its primary use is for creating Drop Zones and Input Hit Areas and it has a couple of helper methods specifically for this. It is also useful for object overlap checks, or as a base for your own non-displaying Game Objects. The default origin is 0.5, the center of the Zone, the same as with Game Objects.

Properties

Returns ReactNode

Properties

contextTypes? defaultProps? displayName? propTypes? diff --git a/functions/createElement.html b/functions/createElement.html index cb0d983d..517bc3d3 100644 --- a/functions/createElement.html +++ b/functions/createElement.html @@ -1,8 +1,8 @@ -createElement | phaser-jsx

Function createElement

  • Creates an element.

    +createElement | phaser-jsx

    Function createElement

    • Creates an element.

      Parameters

      • type: ComponentClass<{}, any> | FC

        The type argument must be a valid component type.

      • Optionalprops: null | Props

        The props argument must either be an object or null.

      • Rest...children: Element[]

        Zero or more child elements.

      Returns JSX.Element

      • Element object with properties type and props.
      -
    \ No newline at end of file +
\ No newline at end of file diff --git a/functions/createRef.html b/functions/createRef.html index ebc66f3d..886af788 100644 --- a/functions/createRef.html +++ b/functions/createRef.html @@ -1,5 +1,5 @@ -createRef | phaser-jsx

Function createRef

  • Creates a ref object which can contain arbitrary value.

    +createRef | phaser-jsx

    Function createRef

    • Creates a ref object which can contain arbitrary value.

      Type Parameters

      • Type

      Returns Ref<Type>

      • Creates an object with a single property current (initially set to null).
      -
    \ No newline at end of file +
\ No newline at end of file diff --git a/functions/render.html b/functions/render.html index 73ba82ee..38382b72 100644 --- a/functions/render.html +++ b/functions/render.html @@ -1,4 +1,4 @@ -render | phaser-jsx

Function render

  • Renders a piece of JSX into a Phaser scene.

    +render | phaser-jsx

    Function render

    • Renders a piece of JSX into a Phaser scene.

      Parameters

      • element: Element

        Element that you want to display.

      • scene: Scene

        Phaser scene.

        -

      Returns void

    \ No newline at end of file +

Returns void

\ No newline at end of file diff --git a/functions/useScene.html b/functions/useScene.html index 9969c302..dce87e87 100644 --- a/functions/useScene.html +++ b/functions/useScene.html @@ -1,4 +1,4 @@ -useScene | phaser-jsx

Function useScene

  • useScene is a hook that retrieves the current Scene.

    +useScene | phaser-jsx

    Function useScene

    • useScene is a hook that retrieves the current Scene.

      Don't use this hook if you start multiple Scenes.

      Type Parameters

      • Type = Scene

      Returns Type

      Phaser.Scene

      -
    \ No newline at end of file +
\ No newline at end of file diff --git a/index.html b/index.html index 6332f33a..3ce0139c 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ -phaser-jsx

phaser-jsx

+phaser-jsx

phaser-jsx

[!NOTE] This package is under development so expect breaking changes in future releases.

diff --git a/interfaces/Ref.html b/interfaces/Ref.html index 03756782..1ff82806 100644 --- a/interfaces/Ref.html +++ b/interfaces/Ref.html @@ -1,2 +1,2 @@ -Ref | phaser-jsx

Interface Ref<Type>

interface Ref<Type> {
    current: null | Type;
}

Type Parameters

  • Type

Properties

Properties

current: null | Type
\ No newline at end of file +Ref | phaser-jsx

Interface Ref<Type>

interface Ref<Type> {
    current: null | Type;
}

Type Parameters

  • Type

Properties

Properties

current: null | Type
\ No newline at end of file diff --git a/modules.html b/modules.html index f4d97a75..474909e4 100644 --- a/modules.html +++ b/modules.html @@ -1,4 +1,4 @@ -phaser-jsx

phaser-jsx

References

jsx +phaser-jsx

phaser-jsx

References

Interfaces

Type Aliases

Functions

Arc diff --git a/types/GameObjectProps.html b/types/GameObjectProps.html index a89689b1..60f61af7 100644 --- a/types/GameObjectProps.html +++ b/types/GameObjectProps.html @@ -1 +1 @@ -GameObjectProps | phaser-jsx

Type Alias GameObjectProps<Type>

GameObjectProps<Type>: ObjectProps<Type> & RecursivePartial<Type>

Type Parameters

  • Type = GameObject
\ No newline at end of file +GameObjectProps | phaser-jsx

Type Alias GameObjectProps<Type>

GameObjectProps<Type>: ObjectProps<Type> & RecursivePartial<Type>

Type Parameters

  • Type = GameObject
\ No newline at end of file