Package | flare.core |
Class | public class Texture3D |
Inheritance | Texture3D ![]() |
Implements | ILibraryExternalItem |
Property | Defined By | ||
---|---|---|---|
bitmapData : BitmapData
BitmapData object that contains the texture data. | Texture3D | ||
bytesLoaded : uint [read-only] | Texture3D | ||
bytesTotal : uint [read-only] | Texture3D | ||
filterMode : String = linear
Defines how the texture will be sampled when it needs to be streched on the screen. | Texture3D | ||
loaded : Boolean
Returns if the texture was succesfull loaded. | Texture3D | ||
mipLevelsCallback : Function
Allow you to define a custom function to generate and upload the MIP levels. | Texture3D | ||
mipMode : String = miplinear
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 | ||
request : *
Gets a reference to the request object. | Texture3D | ||
scene : Scene3D
Returns a reference where the texture context is. | Texture3D | ||
texture : TextureBase
Texture object that contains the texture data on graphics card. | Texture3D | ||
typeMode : String = 2d
Defines the type of the texture. | Texture3D | ||
wrapMode : String = repeat
Defines how the texture will be sampled outside the normalized coordinates (0-1). | Texture3D |
Method | Defined By | ||
---|---|---|---|
Texture3D(request:*, optimizeForRenderToTexture:Boolean = false, format:String)
Creates a new texture. | 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 | ||
Upload the texture to the graphics card. | Texture3D |
Constant | Defined By | ||
---|---|---|---|
FILTER_LINEAR : String = linear [static] | Texture3D | ||
FILTER_NEAREST : String = nearest [static] | Texture3D | ||
FORMAT_CUBEMAP : String = cubemap [static] | Texture3D | ||
FORMAT_RGBA : String = rgba [static] | Texture3D | ||
MIP_LINEAR : String = miplinear [static] | Texture3D | ||
MIP_NEAREST : String = mipnearest [static] | Texture3D | ||
MIP_NONE : String = mipnone [static] | Texture3D | ||
TYPE_2D : String = 2d [static] | Texture3D | ||
TYPE_CUBE : String = cube [static] | Texture3D | ||
WRAP_CLAMP : String = clamp [static] | Texture3D | ||
WRAP_REPEAT : String = repeat [static] | Texture3D |
bitmapData | property |
public var bitmapData:BitmapData
BitmapData object that contains the texture data.
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:String = linear
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.
loaded | property |
loaded:Boolean
Returns if the texture was succesfull loaded.
public function get loaded():Boolean
public function set loaded(value:Boolean):void
mipLevelsCallback | property |
public var mipLevelsCallback:Function
Allow you to define a custom function to generate and upload the MIP levels.
mipMode | property |
public var mipMode:String = miplinear
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
request | property |
request:*
Gets a reference to the request object.
public function get request():*
public function set request(value:any):void
scene | property |
scene:Scene3D
Returns a reference where the texture context is.
public function get scene():Scene3D
public function set scene(value:Scene3D):void
texture | property |
public var texture:TextureBase
Texture object that contains the texture data on graphics card.
typeMode | property |
public var typeMode:String = 2d
Defines the type of the texture.
wrapMode | property |
public var wrapMode:String = repeat
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:*, optimizeForRenderToTexture:Boolean = false, format:String)
Creates a new texture. The 'request' parameter can be a url string path, URLRequest, or BitmapData. 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:* — It can be texture file path or BitmapData object.
| |
optimizeForRenderToTexture:Boolean (default = false )
| |
format:String (default = NaN )
|
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..
upload | () | method |
public function upload(scene:Scene3D = null):Boolean
Upload the texture to the graphics card.
Parameters
scene:Scene3D (default = null ) — The scene to use as a context.
|
Boolean — true if was uploaded, false otherwise.
|
FILTER_LINEAR | Constant |
public static const FILTER_LINEAR:String = linear
FILTER_NEAREST | Constant |
public static const FILTER_NEAREST:String = nearest
FORMAT_CUBEMAP | Constant |
public static const FORMAT_CUBEMAP:String = cubemap
FORMAT_RGBA | Constant |
public static const FORMAT_RGBA:String = rgba
MIP_LINEAR | Constant |
public static const MIP_LINEAR:String = miplinear
MIP_NEAREST | Constant |
public static const MIP_NEAREST:String = mipnearest
MIP_NONE | Constant |
public static const MIP_NONE:String = mipnone
TYPE_2D | Constant |
public static const TYPE_2D:String = 2d
TYPE_CUBE | Constant |
public static const TYPE_CUBE:String = cube
WRAP_CLAMP | Constant |
public static const WRAP_CLAMP:String = clamp
WRAP_REPEAT | Constant |
public static const WRAP_REPEAT:String = repeat