Packagestarling.textures
Classpublic class TextureOptions
InheritanceTextureOptions Inheritance Object

The TextureOptions class specifies options for loading textures with the 'Texture.fromData' method.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
Property Detail
formatproperty
format:String

The Context3DTextureFormat of the underlying texture data.


Implementation
    public function get format():String
    public function set format(value:String):void
mipMappingproperty 
mipMapping:Boolean

Indicates if the texture contains mip maps.


Implementation
    public function get mipMapping():Boolean
    public function set mipMapping(value:Boolean):void
onReadyproperty 
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;


Implementation
    public function get onReady():Function
    public function set onReady(value:Function):void
optimizeForRenderToTextureproperty 
optimizeForRenderToTexture:Boolean

Indicates if the texture will be used as render target.


Implementation
    public function get optimizeForRenderToTexture():Boolean
    public function set optimizeForRenderToTexture(value:Boolean):void
repeatproperty 
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.


Implementation
    public function get repeat():Boolean
    public function set repeat(value:Boolean):void
scaleproperty 
scale:Number

The scale factor, which influences width and height properties. If you pass '-1', the current global content scale factor will be used.


Implementation
    public function get scale():Number
    public function set scale(value:Number):void
Constructor Detail
TextureOptions()Constructor
public function TextureOptions(scale:Number = 1.0, mipMapping:Boolean = false, format:String = bgra, repeat:Boolean = false)



Parameters
scale:Number (default = 1.0)
 
mipMapping:Boolean (default = false)
 
format:String (default = bgra)
 
repeat:Boolean (default = false)
Method Detail
clone()method
public function clone():TextureOptions

Creates a clone of the TextureOptions object with the exact same properties.

Returns
TextureOptions