Packagealternativa.engine3d.core
Classpublic class View
InheritanceView Inheritance flash.display.Sprite

A viewport. Though GPU can render to one of 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

alternativa.engine3d.core.Camera3D


Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
Property Detail
antiAliasproperty
public var antiAlias:int

Level of anti-aliasing.

backgroundAlphaproperty 
public var backgroundAlpha:Number

Background transparency.

backgroundColorproperty 
public var backgroundColor:uint

Background color.

canvasproperty 
canvas:BitmapData  [read-only]

BitmapData with rendered image in case of renderToBitmap turned on.


Implementation
    public function get canvas():BitmapData

See also

heightproperty 
height:Number[override]

Height of this View. Should be 50 at least.


Implementation
    public function get height():Number
    public function set height(value:Number):void
logoAlignproperty 
logoAlign:String

Alinging the logo. Constants of StageAlign class can be used as a value to set.


Implementation
    public function get logoAlign():String
    public function set logoAlign(value:String):void
logoHorizontalMarginproperty 
logoHorizontalMargin:Number

Horizontal margin.


Implementation
    public function get logoHorizontalMargin():Number
    public function set logoHorizontalMargin(value:Number):void
logoVerticalMarginproperty 
logoVerticalMargin:Number

Vertical margin.


Implementation
    public function get logoVerticalMargin():Number
    public function set logoVerticalMargin(value:Number):void
renderToBitmapproperty 
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.


Implementation
    public function get renderToBitmap():Boolean
    public function set renderToBitmap(value:Boolean):void

See also

rightClick3DEnabledproperty 
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.


Implementation
    public function get rightClick3DEnabled():Boolean
    public function set rightClick3DEnabled(value:Boolean):void
widthproperty 
width:Number[override]

Width of this View. Should be 50 at least.


Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor Detail
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.

Parameters
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

Method Detail
hideLogo()method
public function hideLogo():void

Places Alternativa3D logo from the view.

showLogo()method 
public function showLogo():void

Places Alternativa3D logo into the view.