Texture Class
A texture stores the information that represents an image or part of an image. It cannot be added to the display list directly. To do this use PIXI.Sprite. If no frame is provided then the whole image is used
Constructor
Item Index
Methods
Properties
Methods
addTextureToCache
-
texture
-
id
Adds a texture to the textureCache.
Parameters:
-
texture
Texture -
id
Stringthe id that the texture will be stored against.
fromFrame
-
frameId
Helper function that returns a texture based on a frame id If the frame id is not in the texture cache an error will be thrown
Parameters:
-
frameId
StringThe frame id of the texture
Returns:
fromImage
-
imageUrl
Helper function that returns a texture based on an image url If the image is not in the texture cache it will be created and loaded
Parameters:
-
imageUrl
StringThe image url of the texture
Returns:
removeTextureFromCache
-
id
Remove a texture from the textureCache.
Parameters:
-
id
Stringthe id of the texture to be removed
Properties
frame
#Rectangle
The frame specifies the region of the base texture that this texture uses