Class Fz2D.TextureAtlas

Defined in: src/renderer/texture_atlas.coffee

Overview

Public: Texture Atlas

Instance Method Summary

Constructor Details

::constructor(texture = null) Source

Public: Constructor. texture - Fz2D.Texture (default: null)

Parameters:

Instance Method Details

Fz2D.Texture ::addTexture(tag, x, y, w, h) Source

Public: Defines a texture. tag - name of the texture x - source position on the X axis y - source position on the Y axis w - source width h - source height Returns a Fz2D.Texture.

Parameters:

  • tagname of the texture
  • xsource position on the X axis
  • ysource position on the Y axis
  • wsource width
  • hsource height

Returns:

Fz2D.Texture ::getTexture(tag) Source

Public: Gets a texture by tag name. tag - name of the texture Returns a Fz2D.Texture.

Parameters:

  • tagname of the texture

Returns:

Fz2D.Texture ::setTexture(texture) Source

Public: Sets the texture. texture - Fz2D.Texture Returns a Fz2D.Texture.

Parameters:

Returns: