- Source: src/create/typedefs/index.js (Line 7)
Type Definitions
-
GenerateTextureCallback(canvas, context)
-
Parameters:
Name Type Description canvas
HTMLCanvasElement The HTML Canvas element to operate on.
context
CanvasRenderingContext2D 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 data
array <optional>
[] An array of data, where each row is a string of single values 0-9A-F, or the period character.
canvas
HTMLCanvasElement <optional>
null The HTML Canvas to draw the texture to.
palette
Phaser.Types.Create.Palette <optional>
Arne16 The indexed palette that the data cell values map to.
pixelWidth
number <optional>
1 The width of each 'pixel' in the generated texture.
pixelHeight
number <optional>
1 The height of each 'pixel' in the generated texture.
resizeCanvas
boolean <optional>
true Should the canvas be resized before the texture is drawn?
clearCanvas
boolean <optional>
true Should the canvas be cleared before the texture is drawn?
preRender
Phaser.Types.Create.GenerateTextureCallback <optional>
A callback to send the canvas to prior to the texture being drawn.
postRender
Phaser.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 0
string Color value 1.
1
string Color value 2.
2
string Color value 3.
3
string Color value 4.
4
string Color value 5.
5
string Color value 6.
6
string Color value 7.
7
string Color value 8.
8
string Color value 9.
9
string Color value 10.
A
string Color value 11.
B
string Color value 12.
C
string Color value 13.
D
string Color value 14.
E
string Color value 15.
F
string Color value 16.