Difference between revisions of "TexturePack.new"

From GiderosMobile
Line 8: Line 8:
 
  TexturePack.new(textures,padding,filtering,options)
 
  TexturePack.new(textures,padding,filtering,options)
 
</source>
 
</source>
'''textures''': (table) file names of textures. ''''''<br/>
+
=== Parameters ===
'''padding''': (number) the spacing between textures in pixels ''''''<br/>
+
'''textures''': (table) file names of textures. <br/>
'''filtering''': (boolean, default = false) Whether or not the texture is filtered. ''''''<br/>
+
'''padding''': (number) the spacing between textures in pixels <br/>
'''options''': (table, optional) A table that specifies optional paramaters. Currently, &quot;transparentColor&quot; and &quot;format&quot fields are supported. ''''''<br/>
+
'''filtering''': (boolean, default = false) Whether or not the texture is filtered. <br/>
 +
'''options''': (table, optional) A table that specifies optional paramaters. Currently, &quot;transparentColor&quot; and &quot;format&quot fields are supported. <br/>
 
__NOTOC__
 
__NOTOC__
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
Line 21: Line 22:
 
  TexturePack.new(txtfile,imagefile,filtering,options)
 
  TexturePack.new(txtfile,imagefile,filtering,options)
 
</source>
 
</source>
'''txtfile''': (string)  ''''''<br/>
+
=== Parameters ===
'''imagefile''': (string)  ''''''<br/>
+
'''txtfile''': (string)  <br/>
'''filtering''': (boolean, default = false) Whether or not the texture is filtered. ''''''<br/>
+
'''imagefile''': (string)  <br/>
'''options''': (table, optional) A table that specifies optional paramaters. Currently, &quot;transparentColor&quot; and &quot;format&quot fields are supported. ''''''<br/>
+
'''filtering''': (boolean, default = false) Whether or not the texture is filtered. <br/>
 +
'''options''': (table, optional) A table that specifies optional paramaters. Currently, &quot;transparentColor&quot; and &quot;format&quot fields are supported. <br/>

Revision as of 11:39, 23 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.