TexturePack.new: Difference between revisions
No edit summary |
corrected some typos |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | ||
'''<translate>Class</translate>:''' [[Special:MyLanguage/TexturePack|TexturePack]]<br/> | '''<translate>Class</translate>:''' [[Special:MyLanguage/TexturePack|TexturePack]]<br/> | ||
=== | |||
=== Description === | |||
Creates a new [[ | Creates a new [[TexturePack|TexturePack]] object. This function creates the texture pack at runtime. | ||
<source lang="lua"> | <source lang="lua"> | ||
TexturePack.new(textures,padding,filtering,options) | |||
</source> | </source> | ||
=== | |||
'''textures''': (table) | === Parameters === | ||
'''padding''': (number) | '''textures''': (table) file names of textures<br/> | ||
'''filtering''': (boolean, default = false) | '''padding''': (number) the spacing between textures in pixels<br/> | ||
'''options''': (table, optional) | '''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/> | |||
__NOTOC__ | __NOTOC__ | ||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | ||
'''<translate>Class</translate>:''' [[Special:MyLanguage/TexturePack|TexturePack]]<br/> | '''<translate>Class</translate>:''' [[Special:MyLanguage/TexturePack|TexturePack]]<br/> | ||
=== | === Description === | ||
Creates a new [[TexturePack|TexturePack]] object. This function loads the pre-packed texture atlas created by "Gideros Texture Packer" tool. | |||
Creates a new [[ | |||
<source lang="lua"> | <source lang="lua"> | ||
TexturePack.new(txtfile,imagefile,filtering,options) | |||
</source> | </source> | ||
=== | |||
=== Parameters === | |||
'''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> | '''filtering''': (boolean, default = false) <translate>whether or not the texture is filtered</translate> <br/> | ||
'''options''': (table, optional) <translate> | '''options''': (table, optional) <translate>a table that specifies optional parameters. Currently, "transparentColor" and "format" fields are supported</translate> <br/> | ||
{{TexturePack}} | {{TexturePack}} | ||
Revision as of 21:03, 22 March 2020
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)
imagefile: (string)
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