Package | alternativa.engine3d.core |
Class | public class View |
Inheritance | View ![]() |
Stage3D
only, View still extends DisplayObject
and should be in DisplayList
.
Since 8 version of Alternativa3D view used as wrapper for configuring Stage3D
properties for first. Main task of view
is defining
rectangular field of screen to which image will be rendered. Another opportunity is render image to Bitmap
. In this case the view
will have this Bitmap
as a child. The size of View
should be 50x50 at least.
In case of size will be more than 2048 and anti-aliasing is turned on, usage of MouseEvents will cause of crash.
See also
Property | Defined By | ||
---|---|---|---|
antiAlias : int
Level of anti-aliasing. | View | ||
backgroundAlpha : Number
Background transparency. | View | ||
backgroundColor : uint
Background color. | View | ||
canvas : BitmapData [read-only]
BitmapData with rendered image in case of renderToBitmap turned on. | View | ||
height : Number [override]
Height of this View. | View | ||
logoAlign : String
Alinging the logo. | View | ||
logoHorizontalMargin : Number
Horizontal margin. | View | ||
logoVerticalMargin : Number
Vertical margin. | View | ||
renderToBitmap : Boolean
If true, image will render to Bitmap object which will included into the view as a child. | View | ||
rightClick3DEnabled : Boolean
If true, you will able to handle following events MouseEvent3D.RIGHT_CLICK,
MouseEvent3D.RIGHT_MOUSE_DOWN, MouseEvent3D.RIGHT_MOUSE_UP. | View | ||
width : Number [override]
Width of this View. | View |
Method | Defined By | ||
---|---|---|---|
View(width:int, height:int, renderToBitmap:Boolean = false, backgroundColor:uint = 0, backgroundAlpha:Number = 1, antiAlias:int = 0)
Creates a View object. | View | ||
hideLogo():void
Places Alternativa3D logo from the view. | View | ||
showLogo():void
Places Alternativa3D logo into the view. | View |
antiAlias | property |
public var antiAlias:int
Level of anti-aliasing.
backgroundAlpha | property |
public var backgroundAlpha:Number
Background transparency.
backgroundColor | property |
public var backgroundColor:uint
Background color.
canvas | property |
canvas:BitmapData
[read-only]
BitmapData
with rendered image in case of renderToBitmap
turned on.
public function get canvas():BitmapData
See also
height | property |
height:Number
[override]
Height of this View
. Should be 50 at least.
public function get height():Number
public function set height(value:Number):void
logoAlign | property |
logoAlign:String
Alinging the logo. Constants of StageAlign
class can be used as a value to set.
public function get logoAlign():String
public function set logoAlign(value:String):void
logoHorizontalMargin | property |
logoHorizontalMargin:Number
Horizontal margin.
public function get logoHorizontalMargin():Number
public function set logoHorizontalMargin(value:Number):void
logoVerticalMargin | property |
logoVerticalMargin:Number
Vertical margin.
public function get logoVerticalMargin():Number
public function set logoVerticalMargin(value:Number):void
renderToBitmap | property |
renderToBitmap:Boolean
If true
, image will render to Bitmap
object which will included into the view as a child. It also will available through canvas
property.
public function get renderToBitmap():Boolean
public function set renderToBitmap(value:Boolean):void
See also
rightClick3DEnabled | property |
rightClick3DEnabled:Boolean
If true
, you will able to handle following events MouseEvent3D.RIGHT_CLICK
,
MouseEvent3D.RIGHT_MOUSE_DOWN
, MouseEvent3D.RIGHT_MOUSE_UP
.
The context menu will no longer open on clicking right mouse button.
public function get rightClick3DEnabled():Boolean
public function set rightClick3DEnabled(value:Boolean):void
width | property |
width:Number
[override]
Width of this View
. Should be 50 at least.
public function get width():Number
public function set width(value:Number):void
View | () | Constructor |
public function View(width:int, height:int, renderToBitmap:Boolean = false, backgroundColor:uint = 0, backgroundAlpha:Number = 1, antiAlias:int = 0)
Creates a View
object.
width:int — Width of a view, should be 50 at least.
| |
height:int — Height of a view, should be 50 at least.
| |
renderToBitmap:Boolean (default = false ) — If true , image will render to Bitmap object which will included into the view as a child. It also will available through canvas property.
| |
backgroundColor:uint (default = 0 ) — Background color.
| |
backgroundAlpha:Number (default = 1 ) — BAckground transparency.
| |
antiAlias:int (default = 0 ) — Level of anti-aliasing.
|
See also
hideLogo | () | method |
public function hideLogo():void
Places Alternativa3D logo from the view
.
showLogo | () | method |
public function showLogo():void
Places Alternativa3D logo into the view
.