TexturePack.new: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
=== Description ===
=== <translate>Description</translate> ===
<translate><br />
<translate><br />
Creates a new [[Special:MyLanguage/TexturePack|TexturePack]] object. This function creates the texture pack at runtime.<br />
Creates a new [[Special:MyLanguage/TexturePack|TexturePack]] object. This function creates the texture pack at runtime.<br />
Line 8: Line 8:
  TexturePack.new(textures,padding,filtering,options)
  TexturePack.new(textures,padding,filtering,options)
</source>
</source>
=== Parameters ===
=== <translate>Parameters</translate> ===
'''textures''': (table) <translate>file names of textures.</translate> <br/>
'''textures''': (table) <translate>file names of textures.</translate> <br/>
'''padding''': (number) <translate>the spacing between textures in pixels</translate> <br/>
'''padding''': (number) <translate>the spacing between textures in pixels</translate> <br/>
Line 14: Line 14:
'''options''': (table, optional) <translate>A table that specifies optional paramaters. Currently, &quot;transparentColor&quot; and &quot;format&quot fields are supported.</translate> <br/>
'''options''': (table, optional) <translate>A table that specifies optional paramaters. Currently, &quot;transparentColor&quot; and &quot;format&quot fields are supported.</translate> <br/>
__NOTOC__
__NOTOC__
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
=== Description ===
=== <translate>Description</translate> ===
<translate><br />
<translate><br />
Creates a new [[Special:MyLanguage/TexturePack|TexturePack]] object. This function loads the pre-packed texture atlas created by &quot;Gideros Texture Packer&quot; tool.<br />
Creates a new [[Special:MyLanguage/TexturePack|TexturePack]] object. This function loads the pre-packed texture atlas created by &quot;Gideros Texture Packer&quot; tool.<br />
Line 22: Line 22:
  TexturePack.new(txtfile,imagefile,filtering,options)
  TexturePack.new(txtfile,imagefile,filtering,options)
</source>
</source>
=== Parameters ===
=== <translate>Parameters</translate> ===
'''txtfile''': (string) <translate></translate> <br/>
'''txtfile''': (string) <translate></translate> <br/>
'''imagefile''': (string) <translate></translate> <br/>
'''imagefile''': (string) <translate></translate> <br/>
'''filtering''': (boolean, default = false) <translate>Whether or not the texture is filtered.</translate> <br/>
'''filtering''': (boolean, default = false) <translate>Whether or not the texture is filtered.</translate> <br/>
'''options''': (table, optional) <translate>A table that specifies optional paramaters. Currently, &quot;transparentColor&quot; and &quot;format&quot fields are supported.</translate> <br/>
'''options''': (table, optional) <translate>A table that specifies optional paramaters. Currently, &quot;transparentColor&quot; and &quot;format&quot fields are supported.</translate> <br/>

Revision as of 06:30, 24 August 2018

Available since: Gideros 2011.6

Description


Creates a new TexturePack object. This function creates the texture pack at runtime.

 TexturePack.new(textures,padding,filtering,options)

Parameters

textures: (table) file names of textures.
padding: (number) the spacing between textures in pixels
filtering: (boolean, default = false) Whether or not the texture is filtered.
options: (table, optional) A table that specifies optional paramaters. Currently, "transparentColor" and "format&quot fields are supported.

Available since: Gideros 2011.6

Description


Creates a new TexturePack object. This function loads the pre-packed texture atlas created by "Gideros Texture Packer" tool.

 TexturePack.new(txtfile,imagefile,filtering,options)

Parameters

txtfile: (string)
imagefile: (string)
filtering: (boolean, default = false) Whether or not the texture is filtered.
options: (table, optional) A table that specifies optional paramaters. Currently, "transparentColor" and "format&quot fields are supported.