Package util

Class Assets

java.lang.Object
util.Assets

public class Assets extends Object
  • Constructor Details

    • Assets

      public Assets()
  • Method Details

    • getShader

      public static Shader getShader(String path)
      Loads a shader from the filesystem, compiles it, then returns type Shader.
      Parameters:
      path - to GLSL shader resource
      Returns:
      returns type Shader
    • getTexture

      public static Texture getTexture(String path)
      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 sprite
      spriteHeight - of each sprite
      numSprites - of sprites in the sheet
      spacing - spacing between sprites (0 if no spacing)
      Returns:
      returns type Spritesheet