jasy.asset package¶
Subpackages¶
Submodules¶
jasy.asset.ImageInfo module¶
-
class
jasy.asset.ImageInfo.GifFile(filename)[source]¶ Bases:
jasy.asset.ImageInfo.ImgFileClass for parsing GIF files.
-
class
jasy.asset.ImageInfo.ImgFile(filename)[source]¶ Bases:
objectAbstract base class for all image types.
-
class
jasy.asset.ImageInfo.ImgInfo(filename)[source]¶ Bases:
object-
classes= [<class 'jasy.asset.ImageInfo.PngFile'>, <class 'jasy.asset.ImageInfo.GifFile'>, <class 'jasy.asset.ImageInfo.JpegFile'>]¶
-
-
class
jasy.asset.ImageInfo.JpegFile(filename)[source]¶ Bases:
jasy.asset.ImageInfo.ImgFile
jasy.asset.Manager module¶
-
class
jasy.asset.Manager.AssetManager(profile)[source]¶ Bases:
object-
copyAssets()[source]¶ Copies assets from their source folder to the configured destination folder.
Does apply file name transformations during copying when requested.
-
exportToJson(items=None)[source]¶ Exports asset data for usage at the client side.
Utilizes JavaScript class jasy.Asset to inject data into the client at runtime.
-
getAssetUrl(fileId)[source]¶ Returns the asset URL for the given item relative to the current working path.
-
getSpriteHeight(fileId)[source]¶ Returns the height of the sprite sheet which contains the given single image.
-
getSpriteUrl(fileId)[source]¶ Returns the url of the sprite sheet which contains the given single image.
-
getSpriteWidth(fileId)[source]¶ Returns the width of the sprite sheet which contains the given single image.
-
jasy.asset.SpritePacker module¶
-
class
jasy.asset.SpritePacker.SpritePacker(base, types='png', width=1024, height=1024)[source]¶ Bases:
objectPacks single images into sprite images automatically.
-
addDir(directory, recursive=False)[source]¶ Adds all images within a directory to the sprite packer.
-