Package util
Class Assets
java.lang.Object
util.Assets
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ShaderLoads a shader from the filesystem, compiles it, then returns type Shader.static TexturegetTexture(String path) Loads a image from the filesystem, and returns a Texture.static SpritesheetloadSpritesheet(String path, int spriteWidth, int spriteHeight, int numSprites, int spacing) Loads a image from the filesystem, and returns a Spritesheet object.
-
Constructor Details
-
Assets
public Assets()
-
-
Method Details
-
getShader
Loads a shader from the filesystem, compiles it, then returns type Shader.- Parameters:
path- to GLSL shader resource- Returns:
- returns type Shader
-
getTexture
Loads a image from the filesystem, and returns a Texture.- Parameters:
path- to Texture resource (usually a .png file)- Returns:
- returns type Texture
-
loadSpritesheet
public static Spritesheet loadSpritesheet(String path, int spriteWidth, int spriteHeight, int numSprites, int spacing) Loads a image from the filesystem, and returns a Spritesheet object.- Parameters:
path- to Texture resource (usually a .png file)spriteWidth- of each spritespriteHeight- of each spritenumSprites- of sprites in the sheetspacing- spacing between sprites (0 if no spacing)- Returns:
- returns type Spritesheet
-