- Source: src/textures/typedefs/index.js (Line 7)
Type Definitions
-
PixelConfig
-
An object containing the position and color data for a single pixel in a CanvasTexture.
Type:
- object
- Since: 3.16.0
- Source: src/textures/typedefs/PixelConfig.js (Line 1)
Properties:
Name Type Description xnumber The x-coordinate of the pixel.
ynumber The y-coordinate of the pixel.
colornumber The color of the pixel, not including the alpha channel.
alphanumber The alpha of the pixel, between 0 and 1.
-
SpriteSheetConfig
-
Type:
- object
- Since: 3.0.0
- Source: src/textures/typedefs/SpriteSheetConfig.js (Line 1)
Properties:
Name Type Argument Default Description frameWidthnumber The fixed width of each frame.
frameHeightnumber <optional>
The fixed height of each frame. If not set it will use the frameWidth as the height.
startFramenumber <optional>
0 Skip a number of frames. Useful when there are multiple sprite sheets in one Texture.
endFramenumber <optional>
-1 The total number of frames to extract from the Sprite Sheet. The default value of -1 means "extract all frames".
marginnumber <optional>
0 If the frames have been drawn with a margin, specify the amount here.
spacingnumber <optional>
0 If the frames have been drawn with spacing between them, specify the amount here.
-
SpriteSheetFromAtlasConfig
-
Type:
- object
- Since: 3.0.0
- Source: src/textures/typedefs/SpriteSheetFromAtlasConfig.js (Line 1)
Properties:
Name Type Argument Default Description atlasstring The key of the Texture Atlas in which this Sprite Sheet can be found.
framestring The key of the Texture Atlas Frame in which this Sprite Sheet can be found.
frameWidthnumber The fixed width of each frame.
frameHeightnumber <optional>
The fixed height of each frame. If not set it will use the frameWidth as the height.
startFramenumber <optional>
0 Skip a number of frames. Useful when there are multiple sprite sheets in one Texture.
endFramenumber <optional>
-1 The total number of frames to extract from the Sprite Sheet. The default value of -1 means "extract all frames".
marginnumber <optional>
0 If the frames have been drawn with a margin, specify the amount here.
spacingnumber <optional>
0 If the frames have been drawn with spacing between them, specify the amount here.
