Package | flare.core |
Class | public class Texture3D |
Inheritance | Texture3D flash.events.EventDispatcher |
Implements | ILibraryExternalItem |
Property | Defined By | ||
---|---|---|---|
allowRuntimeCompression : int
Enables runtime compression for RGBA textures in Web and Desktop platforms. | Texture3D | ||
bias : int = 0
Defines how the mip levels will be applied over the texture. | Texture3D | ||
bitmapData : BitmapData
BitmapData object that contains the texture data. | Texture3D | ||
byteFormat : int | Texture3D | ||
bytes : ByteArray [read-only]
Gets the loaded bytes when these are available, otherwise null. | Texture3D | ||
bytesLoaded : uint [read-only] | Texture3D | ||
bytesTotal : uint [read-only] | Texture3D | ||
filterMode : int = 1
Defines how the texture will be sampled when it needs to be streched on the screen. | Texture3D | ||
format : int
Defines the format in which the texture will be uploaded. | Texture3D | ||
height : int | Texture3D | ||
isATF : Boolean [read-only] | Texture3D | ||
loaded : Boolean
Returns if the texture was succesfull loaded and ready to use. | Texture3D | ||
mipMode : int = 2
Defines if the texture will use mip mapping and how it will be applyied. | Texture3D | ||
name : String
The name of the texture. | Texture3D | ||
optimizeForRenderToTexture : Boolean [read-only]
Returns whatever the texture is optimized for dynamic rendering. | Texture3D | ||
releaseBitmapData : Boolean
Allow for loaded texture bitmaps to be disposed after uploading those to the GPU to save memory usage. | Texture3D | ||
request : *
Gets a reference to the request object. | Texture3D | ||
scene : Scene3D
Gets the scene context of the texture. | Texture3D | ||
stringFormat : String [read-only] | Texture3D | ||
texture : TextureBase
Texture object that contains the texture data on graphics card. | Texture3D | ||
typeMode : int
Defines the type of the texture (2d/cube). | Texture3D | ||
width : int | Texture3D | ||
wrapMode : int = 1
Defines how the texture will be sampled outside the normalized coordinates (0-1). | Texture3D |
Method | Defined By | ||
---|---|---|---|
Texture3D(request:* = null, optimizeForRenderToTexture:Boolean = false, format:int, type:int)
Creates a new texture. | Texture3D | ||
Texture3D | |||
close():void
Terminates the loading proccess. | Texture3D | ||
dispose():void
Eliminates all the resources associated to the texture. | Texture3D | ||
download():void
Download the texture from the graphics card. | Texture3D | ||
load():void
Loads the texture if it is an external resource.. | Texture3D | ||
toString():String [override] | Texture3D | ||
Upload the texture to the graphics card. | Texture3D | ||
uploadTexture(source:BitmapData = null, side:int = 0):void | Texture3D |
Constant | Defined By | ||
---|---|---|---|
FILTER_ANISOTROPIC16X : int = 5 [static] | Texture3D | ||
FILTER_ANISOTROPIC2X : int = 2 [static] | Texture3D | ||
FILTER_ANISOTROPIC4X : int = 3 [static] | Texture3D | ||
FILTER_ANISOTROPIC8X : int = 4 [static] | Texture3D | ||
FILTER_LINEAR : int = 1 [static] | Texture3D | ||
FILTER_NEAREST : int = 0 [static] | Texture3D | ||
FORMAT_BGRA_PACKED : int = 4 [static] | Texture3D | ||
FORMAT_BGR_PACKED : int = 3 [static] | Texture3D | ||
FORMAT_COMPRESSED : int = 1 [static] | Texture3D | ||
FORMAT_COMPRESSED_ALPHA : int = 2 [static] | Texture3D | ||
FORMAT_RGBA : int = 0 [static] | Texture3D | ||
FORMAT_RGBA_HALF_FLOAT : int = 5 [static] | Texture3D | ||
MIP_LINEAR : int = 2 [static] | Texture3D | ||
MIP_NEAREST : int = 1 [static] | Texture3D | ||
MIP_NONE : int = 0 [static] | Texture3D | ||
TYPE_2D : int = 0 [static] | Texture3D | ||
TYPE_CUBE : int = 1 [static] | Texture3D | ||
TYPE_RECTANGLE : int = 2 [static] | Texture3D | ||
WRAP_CLAMP : int = 0 [static] | Texture3D | ||
WRAP_CLAMP_U : int = 2 [static] | Texture3D | ||
WRAP_CLAMP_V : int = 3 [static] | Texture3D | ||
WRAP_REPEAT : int = 1 [static] | Texture3D |
allowRuntimeCompression | property |
public var allowRuntimeCompression:int
Enables runtime compression for RGBA textures in Web and Desktop platforms. A value of 1 uses a standard compressed format, a value of 2, uses a compressed with alpha format. Runtime compression it is not supported on mobile yet.
bias | property |
public var bias:int = 0
Defines how the mip levels will be applied over the texture. Value should be between -127 and 127.
bitmapData | property |
public var bitmapData:BitmapData
BitmapData object that contains the texture data.
byteFormat | property |
public var byteFormat:int
bytes | property |
bytes:ByteArray
[read-only] Gets the loaded bytes when these are available, otherwise null.
public function get bytes():ByteArray
bytesLoaded | property |
bytesLoaded:uint
[read-only] public function get bytesLoaded():uint
bytesTotal | property |
bytesTotal:uint
[read-only] public function get bytesTotal():uint
filterMode | property |
public var filterMode:int = 1
Defines how the texture will be sampled when it needs to be streched on the screen. This property should be defined before the shader compilation. Setting to Texture3D.FILTER_NEAREST will take the nearest pixel. Setting to Texture3D.FILTER_LINEAR will take an interpolation between the nearest pixels.
format | property |
format:int
Defines the format in which the texture will be uploaded. Should be one of the folowing constants. Texture3D.FORMAT_RGBA, Texture3D.FORMAT_COMPRESSED, Texture3D.FORMAT_COMPRESSED_ALPHA, Texture3D.FORMAT_BGR_PACKED, Texture3D.FORMAT_BGRA_PACKED.
public function get format():int
public function set format(value:int):void
height | property |
height:int
public function get height():int
public function set height(value:int):void
isATF | property |
isATF:Boolean
[read-only] public function get isATF():Boolean
loaded | property |
loaded:Boolean
Returns if the texture was succesfull loaded and ready to use.
public function get loaded():Boolean
public function set loaded(value:Boolean):void
mipMode | property |
public var mipMode:int = 2
Defines if the texture will use mip mapping and how it will be applyied. This property should be defined before the shader compilation. Setting to Texture3D.MIP_NEAREST, uses the pixel from the nearest mipmap level. Setting to Texture3D.MIP_LINEAR uses the pixel from two nearest mipmap levels, and interpolates linearly. Setting to Texture3D.MIP_NONE will disable mip mode for the texture.
name | property |
public var name:String
The name of the texture.
optimizeForRenderToTexture | property |
optimizeForRenderToTexture:Boolean
[read-only] Returns whatever the texture is optimized for dynamic rendering.
public function get optimizeForRenderToTexture():Boolean
releaseBitmapData | property |
public var releaseBitmapData:Boolean
Allow for loaded texture bitmaps to be disposed after uploading those to the GPU to save memory usage.
See also
request | property |
request:*
Gets a reference to the request object.
public function get request():*
public function set request(value:any):void
scene | property |
public var scene:Scene3D
Gets the scene context of the texture. Do not change this property manually, to change the scene context, call to download() and then to upload() methods.
stringFormat | property |
stringFormat:String
[read-only] public function get stringFormat():String
texture | property |
public var texture:TextureBase
Texture object that contains the texture data on graphics card.
typeMode | property |
typeMode:int
Defines the type of the texture (2d/cube).
public function get typeMode():int
public function set typeMode(value:int):void
width | property |
width:int
public function get width():int
public function set width(value:int):void
wrapMode | property |
public var wrapMode:int = 1
Defines how the texture will be sampled outside the normalized coordinates (0-1). This property should be defined before the shader compilation. Setting to WRAP_REPEAT, the texture will repeat to the infinity. Setting to WRAP_CLAMP, the last pixel of the texture image stretches to the infinity.
Texture3D | () | Constructor |
public function Texture3D(request:* = null, optimizeForRenderToTexture:Boolean = false, format:int, type:int)
Creates a new texture. The 'request' parameter can be a url string path, URLRequest, BitmapData or a Point object to create a dynamic texture. If a path is set for the texture, the Texture3D object will start its loading process. If no path is set for the texture, a BitmapData object that has been directly loaded can be specified.
Parametersrequest:* (default = null ) — It can be texture file path or BitmapData object.
| |
optimizeForRenderToTexture:Boolean (default = false )
| |
format:int (default = NaN )
| |
type:int (default = NaN )
|
clone | () | method |
close | () | method |
public function close():void
Terminates the loading proccess.
dispose | () | method |
public function dispose():void
Eliminates all the resources associated to the texture. The texture will be unusable after dispose.
download | () | method |
public function download():void
Download the texture from the graphics card.
load | () | method |
public function load():void
Loads the texture if it is an external resource..
toString | () | method |
override public function toString():String
ReturnsString |
upload | () | method |
public function upload(scene:Scene3D):void
Upload the texture to the graphics card.
Parameters
scene:Scene3D — The scene to use as a context.
|
uploadTexture | () | method |
public function uploadTexture(source:BitmapData = null, side:int = 0):void
Parameters
source:BitmapData (default = null )
| |
side:int (default = 0 )
|
FILTER_ANISOTROPIC16X | Constant |
public static const FILTER_ANISOTROPIC16X:int = 5
FILTER_ANISOTROPIC2X | Constant |
public static const FILTER_ANISOTROPIC2X:int = 2
FILTER_ANISOTROPIC4X | Constant |
public static const FILTER_ANISOTROPIC4X:int = 3
FILTER_ANISOTROPIC8X | Constant |
public static const FILTER_ANISOTROPIC8X:int = 4
FILTER_LINEAR | Constant |
public static const FILTER_LINEAR:int = 1
FILTER_NEAREST | Constant |
public static const FILTER_NEAREST:int = 0
FORMAT_BGR_PACKED | Constant |
public static const FORMAT_BGR_PACKED:int = 3
FORMAT_BGRA_PACKED | Constant |
public static const FORMAT_BGRA_PACKED:int = 4
FORMAT_COMPRESSED | Constant |
public static const FORMAT_COMPRESSED:int = 1
FORMAT_COMPRESSED_ALPHA | Constant |
public static const FORMAT_COMPRESSED_ALPHA:int = 2
FORMAT_RGBA | Constant |
public static const FORMAT_RGBA:int = 0
FORMAT_RGBA_HALF_FLOAT | Constant |
public static const FORMAT_RGBA_HALF_FLOAT:int = 5
MIP_LINEAR | Constant |
public static const MIP_LINEAR:int = 2
MIP_NEAREST | Constant |
public static const MIP_NEAREST:int = 1
MIP_NONE | Constant |
public static const MIP_NONE:int = 0
TYPE_2D | Constant |
public static const TYPE_2D:int = 0
TYPE_CUBE | Constant |
public static const TYPE_CUBE:int = 1
TYPE_RECTANGLE | Constant |
public static const TYPE_RECTANGLE:int = 2
WRAP_CLAMP | Constant |
public static const WRAP_CLAMP:int = 0
WRAP_CLAMP_U | Constant |
public static const WRAP_CLAMP_U:int = 2
WRAP_CLAMP_V | Constant |
public static const WRAP_CLAMP_V:int = 3
WRAP_REPEAT | Constant |
public static const WRAP_REPEAT:int = 1