| Package | starling.textures |
| Class | public class TextureOptions |
| Inheritance | TextureOptions Object |
Texture.fromData and Texture.fromTextureBase methods. | Property | Defined By | ||
|---|---|---|---|
| forcePotTexture : Boolean Indicates if the underlying Stage3D texture should be created as the power-of-two based
Texture class instead of the more memory efficient RectangleTexture. | TextureOptions | ||
| format : String The Context3DTextureFormat of the underlying texture data. | TextureOptions | ||
| mipMapping : Boolean Indicates if the texture contains mip maps. | TextureOptions | ||
| onReady : Function If this value is set, the texture will be loaded asynchronously (if possible). | TextureOptions | ||
| optimizeForRenderToTexture : Boolean Indicates if the texture will be used as render target. | TextureOptions | ||
| premultipliedAlpha : Boolean Indicates if the alpha values are premultiplied into the RGB values. | 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, premultipliedAlpha:Boolean = true, forcePotTexture:Boolean = false) Creates a new instance with the given options. | TextureOptions | ||
Creates a clone of the TextureOptions object with the exact same properties. | TextureOptions | ||
| forcePotTexture | property |
forcePotTexture:Boolean Indicates if the underlying Stage3D texture should be created as the power-of-two based
Texture class instead of the more memory efficient RectangleTexture.
That might be useful when you need to render the texture with wrap mode repeat.
The default value is false.
public function get forcePotTexture():Boolean public function set forcePotTexture(value:Boolean):void| format | property |
format:String The Context3DTextureFormat of the underlying texture data. Only used
for textures that are created from Bitmaps; the format of ATF files is set when they
are created.
The default value is BGRA.
public function get format():String public function set format(value:String):void| mipMapping | property |
mipMapping:BooleanIndicates if the texture contains mip maps.
The default value is false.
public function get mipMapping():Boolean public function set mipMapping(value:Boolean):void| onReady | property |
onReady:FunctionIf this value is set, the texture will be loaded asynchronously (if possible). The texture can only be used when the callback has been executed.
This is the expected function definition:
function(texture:Texture):void;
The default value is null.
public function get onReady():Function public function set onReady(value:Function):void| optimizeForRenderToTexture | property |
optimizeForRenderToTexture:BooleanIndicates if the texture will be used as render target.
public function get optimizeForRenderToTexture():Boolean public function set optimizeForRenderToTexture(value:Boolean):void| premultipliedAlpha | property |
premultipliedAlpha:Boolean Indicates if the alpha values are premultiplied into the RGB values. This is typically
true for textures created from BitmapData and false for textures created from ATF data.
This property will only be read by the Texture.fromTextureBase factory
method.
The default value is true.
public function get premultipliedAlpha():Boolean public function set premultipliedAlpha(value:Boolean):void| scale | property |
scale:NumberThe scale factor, which influences width and height properties. If you pass '-1', the current global content scale factor will be used.
The default value is 1.0.
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, premultipliedAlpha:Boolean = true, forcePotTexture:Boolean = false)Creates a new instance with the given options.
Parametersscale:Number (default = 1.0) | |
mipMapping:Boolean (default = false) | |
format:String (default = bgra) | |
premultipliedAlpha:Boolean (default = true) | |
forcePotTexture:Boolean (default = false) |
| clone | () | method |
public function clone():TextureOptionsCreates a clone of the TextureOptions object with the exact same properties.
ReturnsTextureOptions |