Namespace: Create

Phaser.Types. Create

Type Definitions


GenerateTextureCallback(canvas, context)

Parameters:
Name Type Description
canvas HTMLCanvasElement

[description]

context CanvasRenderingContext2D

[description]

Since: 3.0.0
Source: src/create/typedefs/GenerateTextureConfig.js (Line 1)

GenerateTextureConfig

Type:
  • object
Properties:
Name Type Argument Default Description
data array <optional>
[]

[description]

canvas HTMLCanvasElement <optional>
null

[description]

palette Phaser.Types.Create.Palette <optional>
Arne16

[description]

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

[description]

clearCanvas boolean <optional>
true

[description]

preRender Phaser.Types.Create.GenerateTextureCallback <optional>

[description]

postRender Phaser.Types.Create.GenerateTextureCallback <optional>

[description]

Since: 3.0.0
Source: src/create/typedefs/GenerateTextureConfig.js (Line 9)

Palette

Type:
  • object
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.

Since: 3.0.0
Source: src/create/typedefs/Palette.js (Line 1)