Difference between revisions of "TexturePack.new"

From GiderosMobile
Line 11: Line 11:
 
=== Parameters ===
 
=== Parameters ===
 
'''textures''': (table) file names of textures<br/>
 
'''textures''': (table) file names of textures<br/>
'''padding''': (number) the spacing between textures in pixels<br/>
+
'''padding''': (number) the spacing between textures in pixels '''optional'''<br/>
'''filtering''': (boolean, default = false) whether or not the texture is filtered<br/>
+
'''filtering''': (boolean, default = false) whether or not the texture is filtered, that is smoothing the image '''optional'''<br/>
'''options''': (table, optional) a table that specifies optional parameters. Currently, "transparentColor" and "format" fields are supported<br/>
+
'''options''': (table) a table that specifies optional parameters '''optional'''. Currently, "transparentColor" and "format" fields are supported<br/>
  
  
Line 29: Line 29:
  
 
=== Parameters ===
 
=== Parameters ===
'''txtfile''': (string) '''Gideros Texture Packer''' text file<br/>
+
'''txtfile''': (string) '''Gideros Texture Packer''' text file path<br/>
'''imagefile''': (string) '''Gideros Texture Packer''' image file<br/>
+
'''imagefile''': (string) '''Gideros Texture Packer''' image file path<br/>
'''filtering''': (boolean, default = false) whether or not the texture is filtered<br/>
+
'''filtering''': (boolean, default = false) whether or not the texture is filtered, that is smoothing the image '''optional'''<br/>
'''options''': (table, optional) a table that specifies optional parameters. Currently, "transparentColor" and "format" fields are supported<br/>
+
'''options''': (table) a table that specifies optional parameters '''optional'''. Currently, "transparentColor" and "format" fields are supported<br/>
  
 
{{TexturePack}}
 
{{TexturePack}}

Revision as of 00:30, 30 January 2023

Available since: Gideros 2011.6
Class: TexturePack

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 optional
filtering: (boolean, default = false) whether or not the texture is filtered, that is smoothing the image optional
options: (table) a table that specifies optional parameters optional. Currently, "transparentColor" and "format" fields are supported




Available since: Gideros 2011.6
Class: TexturePack

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) Gideros Texture Packer text file path
imagefile: (string) Gideros Texture Packer image file path
filtering: (boolean, default = false) whether or not the texture is filtered, that is smoothing the image optional
options: (table) a table that specifies optional parameters optional. Currently, "transparentColor" and "format" fields are supported