Skip to content

sh-dave/kex-assetpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kex-assetpack License: Zlib Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

A small utility library for dealing with assets.

usage

using kex.AssetPackExtension;

final preload = [
	ImageAsset('loading', 'preloader/loading-screen.png'),
	ImageAsset('progress', 'preloader/progess-bar.png'),
	FontAsset('sys', 'inconsolata-bold.ttf'),
];

kha.Assets.loadAssetPack(preload, r -> {
	if (r.failures.length > 0) {
		trace('failed to preload assets');
		return;
	}

	final bg  = r.assets.images.get('loading');
	final progress = r.assets.images.get('progress');
	final fnt = r.assets.fonts.get('sys');
	...
});

About

a small utility library for dealing with assets

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published