class ResManager
package nb
A resource manager.
Available since
0.1.0
.Static variables
staticfinalread onlysavedAtlases:MapArray<Atlas> = new MapArray()
Contains stored nb.Atlas
instances.
staticfinalread onlysavedTextures:MapArray<Texture> = new MapArray()
Contains stored h3d.mat.Texture
instances.
Static methods
staticinlineaddTexture(tex:Texture, ?name:String):String
Stores a texture under a unique name, the instance name is ignored.
Parameters:
tex | The |
---|---|
name | A unique name to give to the stored texture. If |
Returns:
The name tex
is stored under.
staticinlinegetTextureByName(name:String):Texture
Returns a stored texture with the unique name given.
staticinlinegetTexturePart(tex:Texture, x:Float, y:Float, w:Float, h:Float):Texture
Returns a part of a texture as a new texture or a cached texture.
staticinlinegetWhiteTex():Texture
Returns a new white texture, or a cached one if one was already made by this class.
staticinit(onFinished:() ‑> Void):Void
Initalizes this class. Should be called once, at the start of the app.
staticonFileChanged(file:FileEntry):Void
Gets called when any file changes to trigger the file listeners.