Module textureutil
Util for various functions regarding textures.
Functions
cube (textures) | Creates a texture like for an unwrapped cube, see the cube_texture.png file in the textures directory for an example. |
dummy (inner_color, border_color) | Creates a dummy texture with the two given colors. |
get_name (tile) | Gets the name from the given tile. |
tileable (tile, horizontal, vertical) | Creates a tile with the given tileable parameters. |
Functions
- cube (textures)
-
Creates a texture like for an unwrapped cube, see the cube_texture.png file
in the textures directory for an example.
Parameters:
- textures The textures or tiles.
Returns:
-
The cube texture.
- dummy (inner_color, border_color)
-
Creates a dummy texture with the two given colors.
Parameters:
- inner_color Optional. The color for the inner part, either a string with leading "#" or a Color, defaults to a red.
- border_color Optional. The color for the border, either a string with leading "#" or a Color, defauls to gray.
Returns:
-
The dummy texture (string).
- get_name (tile)
-
Gets the name from the given tile.
Parameters:
- tile The tile.
Returns:
-
The name of the tile.
- tileable (tile, horizontal, vertical)
-
Creates a tile with the given tileable parameters.
Parameters:
- tile The name of the tile.
- horizontal If the tile is horizontally tileable.
- vertical If the tile is vertically tileable.
Returns:
-
A tile with tileable information.