| Package | flare.core |
| Class | public dynamic class Canvas3D |
| Inheritance | Canvas3D Object |
| Property | Defined By | ||
|---|---|---|---|
| centerX : Number [read-only]
Returns the canvas center on the x axis. | Canvas3D | ||
| centerY : Number [read-only]
Returns the canvas center on the Y axis. | Canvas3D | ||
| container : Sprite [read-only]
Returns the container in which rendering is performed. | Canvas3D | ||
| graphics : Graphics
Refers to the Graphics object that is used for rendering. | Canvas3D | ||
| height : Number [read-only]
Returns the canvas height. | Canvas3D | ||
| numLayers : int [read-only]
Returns the number of layers that have been used in the last render. | Canvas3D | ||
| polysRendered : int [read-only]
Returns the number of objects that were rendered by the canvas. | Canvas3D | ||
| showMenu : Boolean [write-only]
Show or hide About Flare3D contextual menu. | Canvas3D | ||
| sortFunction : Function | Canvas3D | ||
| useMask : Boolean
Returns or sets whether a mask will be used to crop the canvas edges. | Canvas3D | ||
| width : Number [read-only]
Returns the canvas width. | Canvas3D | ||
| x : Number [read-only]
Returns the canvas position on the x axis. | Canvas3D | ||
| y : Number [read-only]
Returns the canvas position on the y axis. | Canvas3D | ||
| Method | Defined By | ||
|---|---|---|---|
Canvas3D(container:Sprite, width:int = 640, height:int = 480)
Creates a new Canvas3D. | Canvas3D | ||
addLayer(layer:Shape):void
Adds a new layer. | Canvas3D | ||
clear():void
Clears the canvas. | Canvas3D | ||
createLayer():Shape
Creates a new layer. | Canvas3D | ||
dispose():void
Eliminates the object and releases the associated resources. | Canvas3D | ||
flip():void
Flips all the polygons prepared for rendering. | Canvas3D | ||
setResolution(width:int, height:int):void
Sets canvas resolution. | Canvas3D | ||
setViewport(width:int, height:int, x:int = 0, y:int = 0):void
Sets the dimensions of the canvas rendering area. | Canvas3D | ||
| centerX | property |
centerX:Number [read-only] Returns the canvas center on the x axis.
public function get centerX():NumberSee also
| centerY | property |
centerY:Number [read-only] Returns the canvas center on the Y axis.
public function get centerY():NumberSee also
| container | property |
container:Sprite [read-only] Returns the container in which rendering is performed.
public function get container():Sprite| graphics | property |
public var graphics:GraphicsRefers to the Graphics object that is used for rendering. Materials will have to access this object to render on the corresponding layer.
See also
| height | property |
height:Number [read-only] Returns the canvas height.
public function get height():NumberSee also
| numLayers | property |
numLayers:int [read-only] Returns the number of layers that have been used in the last render. Layers are used by materials either to make use alpha or blending or in complex materials such as MultiMaterial. This value is only meant for statistical purposes.
public function get numLayers():intSee also
| polysRendered | property |
polysRendered:int [read-only] Returns the number of objects that were rendered by the canvas.
public function get polysRendered():int| showMenu | property |
showMenu:Boolean [write-only] Show or hide About Flare3D contextual menu.
public function set showMenu(value:Boolean):void| sortFunction | property |
sortFunction:Function public function get sortFunction():Function public function set sortFunction(value:Function):void| useMask | property |
useMask:BooleanReturns or sets whether a mask will be used to crop the canvas edges. The default value is true.
public function get useMask():Boolean public function set useMask(value:Boolean):voidSee also
| width | property |
width:Number [read-only] Returns the canvas width.
public function get width():NumberSee also
| x | property |
x:Number [read-only] Returns the canvas position on the x axis.
public function get x():NumberSee also
| y | property |
y:Number [read-only] Returns the canvas position on the y axis.
public function get y():NumberSee also
| Canvas3D | () | Constructor |
public function Canvas3D(container:Sprite, width:int = 640, height:int = 480)Creates a new Canvas3D.
Parameterscontainer:Sprite — Container in which rendering will be performed.
| |
width:int (default = 640) — Canvas width in pixels.
| |
height:int (default = 480) — Canvas height in pixels.
|
| addLayer | () | method |
public function addLayer(layer:Shape):voidAdds a new layer. This method is usually used by materials to make use of alpha or blending.
Parameters
layer:Shape — Refers to the layer to be added.
|
| clear | () | method |
public function clear():voidClears the canvas.
| createLayer | () | method |
public function createLayer():ShapeCreates a new layer. This method is usually used by materials to make use of alpha or blending.
ReturnsShape — Returns the crated layer.
|
| dispose | () | method |
public function dispose():voidEliminates the object and releases the associated resources. Once eliminated, it cannot be accessed again.
| flip | () | method |
public function flip():voidFlips all the polygons prepared for rendering.
| setResolution | () | method |
public function setResolution(width:int, height:int):voidSets canvas resolution. The canvas can have lower resolution than its own size in order to accelerate rendering processes. This will result in faster performance but lower quality. It can make a significant contribution, though, in less powerful machines where high speeds are required in real time. Resolution can be modified at any time without affecting the other scene components.
Parameters
width:int — Width in pixels that will be used. Its value cannot be higher the canvas width.
| |
height:int — Height in pixels that will be used. Its value cannot be higher than canvas height.
|
See also
| setViewport | () | method |
public function setViewport(width:int, height:int, x:int = 0, y:int = 0):voidSets the dimensions of the canvas rendering area.
Parameters
width:int — Canvas width
| |
height:int — Canvas height.
| |
x:int (default = 0) | |
y:int (default = 0) |
See also