Difference between revisions of "TexturePack.new"
(corrected some typos) |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | + | '''Available since:''' Gideros 2011.6<br/> | |
− | ''' | + | '''Class:''' [[TexturePack]]<br/> |
− | ''' | ||
=== Description === | === Description === | ||
− | Creates a new | + | Creates a new '''TexturePack''' object. This function creates the texture pack at runtime. |
<source lang="lua"> | <source lang="lua"> | ||
TexturePack.new(textures,padding,filtering,options) | TexturePack.new(textures,padding,filtering,options) | ||
Line 15: | Line 14: | ||
'''filtering''': (boolean, default = false) whether or not the texture is filtered<br/> | '''filtering''': (boolean, default = false) whether or not the texture is filtered<br/> | ||
'''options''': (table, optional) a table that specifies optional parameters. Currently, "transparentColor" and "format" fields are supported<br/> | '''options''': (table, optional) a table that specifies optional parameters. Currently, "transparentColor" and "format" fields are supported<br/> | ||
+ | |||
+ | |||
+ | ---- | ||
__NOTOC__ | __NOTOC__ | ||
− | ''' | + | '''Available since:''' Gideros 2011.6<br/> |
− | ''' | + | '''Class:''' [[TexturePack]]<br/> |
=== Description === | === Description === | ||
− | Creates a new | + | Creates a new '''TexturePack''' object. This function loads the pre-packed texture atlas created by "'''Gideros Texture Packer'''" tool. |
<source lang="lua"> | <source lang="lua"> | ||
TexturePack.new(txtfile,imagefile,filtering,options) | TexturePack.new(txtfile,imagefile,filtering,options) | ||
Line 27: | Line 29: | ||
=== Parameters === | === Parameters === | ||
− | '''txtfile''': (string) | + | '''txtfile''': (string) '''Gideros Texture Packer''' text file<br/> |
− | '''imagefile''': (string) | + | '''imagefile''': (string) '''Gideros Texture Packer''' image file<br/> |
− | '''filtering''': (boolean, default = false) | + | '''filtering''': (boolean, default = false) whether or not the texture is filtered<br/> |
− | '''options''': (table, optional) | + | '''options''': (table, optional) a table that specifies optional parameters. Currently, "transparentColor" and "format" fields are supported<br/> |
{{TexturePack}} | {{TexturePack}} |
Revision as of 00:01, 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
filtering: (boolean, default = false) whether or not the texture is filtered
options: (table, optional) a table that specifies optional parameters. 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
imagefile: (string) Gideros Texture Packer image file
filtering: (boolean, default = false) whether or not the texture is filtered
options: (table, optional) a table that specifies optional parameters. Currently, "transparentColor" and "format" fields are supported