- Source: src/create/typedefs/index.js (Line 7)
Type Definitions
-
GenerateTextureCallback(canvas, context)
-
Parameters:
Name Type Description canvasHTMLCanvasElement The HTML Canvas element to operate on.
contextCanvasRenderingContext2D The context of the HTML Canvas element.
- Since: 3.0.0
- Source: src/create/typedefs/GenerateTextureConfig.js (Line 1)
-
GenerateTextureConfig
-
Type:
- object
- Since: 3.0.0
- Source: src/create/typedefs/GenerateTextureConfig.js (Line 9)
Properties:
Name Type Argument Default Description dataarray <optional>
[] An array of data, where each row is a string of single values 0-9A-F, or the period character.
canvasHTMLCanvasElement <optional>
null The HTML Canvas to draw the texture to.
palettePhaser.Types.Create.Palette <optional>
Arne16 The indexed palette that the data cell values map to.
pixelWidthnumber <optional>
1 The width of each 'pixel' in the generated texture.
pixelHeightnumber <optional>
1 The height of each 'pixel' in the generated texture.
resizeCanvasboolean <optional>
true Should the canvas be resized before the texture is drawn?
clearCanvasboolean <optional>
true Should the canvas be cleared before the texture is drawn?
preRenderPhaser.Types.Create.GenerateTextureCallback <optional>
A callback to send the canvas to prior to the texture being drawn.
postRenderPhaser.Types.Create.GenerateTextureCallback <optional>
A callback to send the canvas to after the texture has been drawn.
-
Palette
-
Type:
- object
- Since: 3.0.0
- Source: src/create/typedefs/Palette.js (Line 1)
Properties:
Name Type Description 0string Color value 1.
1string Color value 2.
2string Color value 3.
3string Color value 4.
4string Color value 5.
5string Color value 6.
6string Color value 7.
7string Color value 8.
8string Color value 9.
9string Color value 10.
Astring Color value 11.
Bstring Color value 12.
Cstring Color value 13.
Dstring Color value 14.
Estring Color value 15.
Fstring Color value 16.
