Kiwi.Textures.TextureLibrary Class
Holds a reference to all of the image files (jpg, png, e.t.c) that are accessible on the State this TextureLibrary is on.
Constructor
Kiwi.Textures.TextureLibrary
-
game
Parameters:
-
game
GameThe game that this texture library belongs to.
Returns:
Item Index
Methods
Methods
_buildImage
-
imageFile
Builds a single image atlas from a image file that is provided.
Parameters:
-
imageFile
FileThe image file that is to be used.
Returns:
The SingleImage that was created.
_buildSpriteSheet
-
imageFile
Builds a spritesheet atlas from the an image file that is provided.
Parameters:
-
imageFile
Kiwi.FileThe image file that is to be used.
Returns:
The SpriteSheet that was just created.
_buildTextureAtlas
-
imageFile
Used to build a new texture atlas based on the image file provided. Internal use only.
Parameters:
-
imageFile
Kiwi.FileThe image file that is to be used.
Returns:
The new texture atlas that is created.
_rebuildImage
-
imageFile
Used to rebuild a Texture from the FileStore into a base2 size if it doesn't have it already.
Parameters:
-
imageFile
Kiwi.FileThe image file that is to be rebuilt.
Returns:
The new image file.
add
-
atlas
Adds a texture atlas to the library.
Parameters:
addFromFile
-
imageFile
Adds a new image file to the texture library.
Parameters:
-
imageFile
Kiwi.File
clear
()
public
Resets the texture library.
objType
()
String
public
The type of object that this is.
Returns:
rebuild
-
fileStore
-
state
Rebuild the library from a fileStore. Clears the library and repopulates it.
Parameters:
-
fileStore
Kiwi.Files.FileStore -
state
Kiwi.State
Properties
_game
Game
private
The game that this texture library is on.
textures
Unknown
public
Contains all of the textures that are available.