Package | starling.textures |
Class | public class TextureOptions |
Inheritance | TextureOptions Object |
Property | Defined By | ||
---|---|---|---|
format : String The Context3DTextureFormat of the underlying texture data. | TextureOptions | ||
mipMapping : Boolean Indicates if the texture contains mip maps. | TextureOptions | ||
onReady : Function A callback that is used only for ATF textures; if it is set, the ATF data will be
decoded asynchronously. | TextureOptions | ||
optimizeForRenderToTexture : Boolean Indicates if the texture will be used as render target. | TextureOptions | ||
repeat : Boolean Indicates if the texture should repeat like a wallpaper or stretch the outermost pixels. | TextureOptions | ||
scale : Number The scale factor, which influences width and height properties. | TextureOptions |
Method | Defined By | ||
---|---|---|---|
TextureOptions(scale:Number = 1.0, mipMapping:Boolean = false, format:String = bgra, repeat:Boolean = false) | TextureOptions | ||
Creates a clone of the TextureOptions object with the exact same properties. | TextureOptions |
format | property |
format:String
The Context3DTextureFormat
of the underlying texture data.
public function get format():String
public function set format(value:String):void
mipMapping | property |
mipMapping:Boolean
Indicates if the texture contains mip maps.
public function get mipMapping():Boolean
public function set mipMapping(value:Boolean):void
onReady | property |
onReady:Function
A callback that is used only for ATF textures; if it is set, the ATF data will be decoded asynchronously. The texture can only be used when the callback has been executed. This property is ignored for all other texture types (they are ready immediately when the 'Texture.from...' method returns, anyway).
This is the expected function definition:
function(texture:Texture):void;
public function get onReady():Function
public function set onReady(value:Function):void
optimizeForRenderToTexture | property |
optimizeForRenderToTexture:Boolean
Indicates if the texture will be used as render target.
public function get optimizeForRenderToTexture():Boolean
public function set optimizeForRenderToTexture(value:Boolean):void
repeat | property |
repeat:Boolean
Indicates if the texture should repeat like a wallpaper or stretch the outermost pixels. Note: this only works in textures with sidelengths that are powers of two and that are not loaded from a texture atlas (i.e. no subtextures).
The default value is false
.
public function get repeat():Boolean
public function set repeat(value:Boolean):void
scale | property |
scale:Number
The scale factor, which influences width and height properties. If you pass '-1', the current global content scale factor will be used.
public function get scale():Number
public function set scale(value:Number):void
TextureOptions | () | Constructor |
public function TextureOptions(scale:Number = 1.0, mipMapping:Boolean = false, format:String = bgra, repeat:Boolean = false)
scale:Number (default = 1.0 )
| |
mipMapping:Boolean (default = false )
| |
format:String (default = bgra )
| |
repeat:Boolean (default = false )
|
clone | () | method |
public function clone():TextureOptions
Creates a clone of the TextureOptions object with the exact same properties.
ReturnsTextureOptions |