Difference between revisions of "TexturePack.new"
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Creates a new `TexturePack` object. This function creates the texture pack at runtime.<br /> <b...") |
|||
Line 6: | Line 6: | ||
<br /> | <br /> | ||
<source lang="lua"> | <source lang="lua"> | ||
− | + | TexturePack.new(textures,padding,filtering,options) | |
</source> | </source> | ||
− | '''textures | + | '''textures''': (table) file names of textures. ''''''<br/> |
− | '''padding | + | '''padding''': (number) the spacing between textures in pixels ''''''<br/> |
− | '''filtering | + | '''filtering''': (boolean, default = false) Whether or not the texture is filtered. ''''''<br/> |
− | '''options | + | '''options''': (table, optional) A table that specifies optional paramaters. Currently, "transparentColor" and "format" fields are supported. ''''''<br/> |
__NOTOC__ | __NOTOC__ | ||
'''Available since:''' Gideros 2011.6<br/> | '''Available since:''' Gideros 2011.6<br/> | ||
Line 19: | Line 19: | ||
<br /> | <br /> | ||
<source lang="lua"> | <source lang="lua"> | ||
− | + | TexturePack.new(txtfile,imagefile,filtering,options) | |
</source> | </source> | ||
− | '''txtfile | + | '''txtfile''': (string) ''''''<br/> |
− | '''imagefile | + | '''imagefile''': (string) ''''''<br/> |
− | '''filtering | + | '''filtering''': (boolean, default = false) Whether or not the texture is filtered. ''''''<br/> |
− | '''options | + | '''options''': (table, optional) A table that specifies optional paramaters. Currently, "transparentColor" and "format" fields are supported. ''''''<br/> |
Revision as of 10:16, 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)
'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" 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)
'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" fields are supported. '