Package | sekati.ui |
Class | public class RotationPlane |
Inheritance | RotationPlane InteractiveSprite CoreSprite flash.display.Sprite |
DisplayObject
's
which can be manipulated via rotateX, rotateY
.
Property | Defined by | ||
---|---|---|---|
enabled : Boolean
Enabled property defines whether interactive eventing is available or not.
| InteractiveSprite | ||
focalLength : Number
Determines the amount of focal distortion: the higher the value the less distortion.
| RotationPlane | ||
interactiveMode : Boolean
Specifies the mouse cursors modal state in the object as an interactive
target via:
buttonMode, mouseChildren & tabChildren . | CoreSprite | ||
isInvertBackPlane : Boolean
Determines the orientation of the back material (
material1 ) to the front material (material0 )
must be set manually after initialization. | RotationPlane | ||
isReversePlaneVisible : Boolean
Determines whether the reverse plane material will always be visible (
true ) or not (false ). | RotationPlane | ||
material0 : DisplayObject
The
DisplayObject "material" used on the first (front) side of the plane. | RotationPlane | ||
material1 : DisplayObject
The
DisplayObject "material" used on the second (reverse) side of the plane. | RotationPlane | ||
rotateX : Number
Rotation of the plane on the X-axis (vertical movement).
| RotationPlane | ||
rotateY : Number
Rotation of the plane on the Y-axis (horizontal movement).
| RotationPlane | ||
scale : Number
The
scale value. | CoreSprite | ||
smoothing : Boolean
Determines whether the
BitmapData smoothing is applied to the plane rotations or not. | RotationPlane |
Property | Defined by | ||
---|---|---|---|
_backBitmapTransform : BitmapTransform | RotationPlane | ||
_bmpd0 : CoreBitmapData | RotationPlane | ||
_bmpd1 : CoreBitmapData | RotationPlane | ||
_btArray : Array | RotationPlane | ||
_facesArray : Array | RotationPlane | ||
_focalLength : Number | RotationPlane | ||
_frontBitmapTransform : BitmapTransform | RotationPlane | ||
_hSegments : int | RotationPlane | ||
_isInvertBackPlane : Boolean | RotationPlane | ||
_isReversePlaneVisible : Number | RotationPlane | ||
_masterHeight : Number | RotationPlane | ||
_masterWidth : Number | RotationPlane | ||
_material0 : DisplayObject | RotationPlane | ||
_material1 : DisplayObject | RotationPlane | ||
_numFaces : uint | RotationPlane | ||
_numVertices : uint | RotationPlane | ||
_orientation : String | RotationPlane | ||
_renderReady : Boolean | RotationPlane | ||
_rotationX : Number | RotationPlane | ||
_rotationY : Number | RotationPlane | ||
_side0 : Sprite | RotationPlane | ||
_side1 : Sprite | RotationPlane | ||
_smoothing : Boolean | RotationPlane | ||
_spCube : Sprite | RotationPlane | ||
_vertsArray : Array | RotationPlane | ||
_wSegments : int | RotationPlane |
Method | Defined by | ||
---|---|---|---|
RotationPlane(material0:DisplayObject, material1:DisplayObject, focalLength:uint = 1500, wsegments:int = 5, hsegments:int = 5, smoothing:Boolean = false)
RotationPlane Constructor
| RotationPlane | ||
addChildren(... args):void
Add multiple child
DisplayObject 's. | CoreSprite | ||
destroy():void
Clean up after thy self.
| InteractiveSprite | ||
toString():String
Return reflective output.
| CoreSprite | ||
updateMaterial0():void
Update the
BitmapData for material0 . | RotationPlane | ||
updateMaterial1():void
Update the
BitmapData for material1 . | RotationPlane | ||
updateMaterials():void
Update the
BitmapData for both materials on the plane. | RotationPlane |
Method | Defined by | ||
---|---|---|---|
alignMaterials():void
Align the materials.
| RotationPlane | ||
calculateMasterDimensions():void
Determine
width : height relationships. | RotationPlane | ||
click(e:MouseEvent = null):void
Stub: click event handler.
| InteractiveSprite | ||
configBackPlane():void
Configure the back plane (
material1 ). | RotationPlane | ||
configFrontPlane():void
Configure the front plane (
material0 ). | RotationPlane | ||
configListeners(isAdd:Boolean = false):void
Event listener management.
| InteractiveSprite | ||
init3D():void
Initialize 3D logic.
| RotationPlane | ||
invalidate():void
Request a redraw, use for deferred rendering.
| CoreSprite | ||
offStage(e:Event = null):void
Remove the listeners when removed from the stage.
| InteractiveSprite | ||
onStage(e:Event = null):void
Add listeners when added to stage.
| InteractiveSprite | ||
out(e:MouseEvent = null):void
Stub: mouse out event handler.
| InteractiveSprite | ||
over(e:MouseEvent = null):void
Stub: mouse over event handler.
| InteractiveSprite | ||
pointNewView(v:Array, theta:Number, phi:Number):Array
Aquire the new view coordinates.
| RotationPlane | ||
press(e:MouseEvent = null):void
Stub: press event handler.
| InteractiveSprite | ||
release(e:MouseEvent = null):void
Stub: release event handler.
| InteractiveSprite | ||
releaseOutside(e:Event = null):void
Stub: release outside event handler.
| InteractiveSprite | ||
renderView(t:Number, p:Number):void
Render the view.
| RotationPlane | ||
swapDisplayObjects():void
Swap display objects.
| RotationPlane |
Constant | Defined by | ||
---|---|---|---|
X_ORIENTED : String = "x" [static]
| RotationPlane | ||
Y_ORIENTED : String = "y" [static]
| RotationPlane |
_backBitmapTransform | property |
protected var _backBitmapTransform:BitmapTransform
_bmpd0 | property |
protected var _bmpd0:CoreBitmapData
_bmpd1 | property |
protected var _bmpd1:CoreBitmapData
_btArray | property |
protected var _btArray:Array
_facesArray | property |
protected var _facesArray:Array
_focalLength | property |
protected var _focalLength:Number
focalLength | property |
focalLength:Number
[read-write]
Determines the amount of focal distortion: the higher the value the less distortion. (Recommended value: 1000-2000
).
public function get focalLength():Number
public function set focalLength(value:Number):void
_frontBitmapTransform | property |
protected var _frontBitmapTransform:BitmapTransform
_hSegments | property |
protected var _hSegments:int
_isInvertBackPlane | property |
protected var _isInvertBackPlane:Boolean
isInvertBackPlane | property |
isInvertBackPlane:Boolean
[read-write]
Determines the orientation of the back material (material1
) to the front material (material0
)
must be set manually after initialization.
Note: this is a totally new usage that will break existing implementations of rotationplane.
Implementation public function get isInvertBackPlane():Boolean
public function set isInvertBackPlane(value:Boolean):void
_isReversePlaneVisible | property |
protected var _isReversePlaneVisible:Number
isReversePlaneVisible | property |
isReversePlaneVisible:Boolean
[read-write]
Determines whether the reverse plane material will always be visible (true
) or not (false
).
public function get isReversePlaneVisible():Boolean
public function set isReversePlaneVisible(value:Boolean):void
_masterHeight | property |
protected var _masterHeight:Number
_masterWidth | property |
protected var _masterWidth:Number
_material0 | property |
protected var _material0:DisplayObject
material0 | property |
material0:DisplayObject
[read-write]
The DisplayObject
"material" used on the first (front) side of the plane.
public function get material0():DisplayObject
public function set material0(value:DisplayObject):void
_material1 | property |
protected var _material1:DisplayObject
material1 | property |
material1:DisplayObject
[read-write]
The DisplayObject
"material" used on the second (reverse) side of the plane.
public function get material1():DisplayObject
public function set material1(value:DisplayObject):void
_numFaces | property |
protected var _numFaces:uint
_numVertices | property |
protected var _numVertices:uint
_orientation | property |
protected var _orientation:String
_renderReady | property |
protected var _renderReady:Boolean
rotateX | property |
rotateX:Number
[read-write]Rotation of the plane on the X-axis (vertical movement).
Note: rotateX
is used instead of rotationX
for compatability
purposes between FP9 and FP10's inherited rotationX
public function get rotateX():Number
public function set rotateX(value:Number):void
rotateY | property |
rotateY:Number
[read-write]Rotation of the plane on the Y-axis (horizontal movement).
Note: rotateY
is used instead of rotationY
for compatability
purposes between FP9 and FP10's inherited rotationY
public function get rotateY():Number
public function set rotateY(value:Number):void
_rotationX | property |
protected var _rotationX:Number
_rotationY | property |
protected var _rotationY:Number
_side0 | property |
protected var _side0:Sprite
_side1 | property |
protected var _side1:Sprite
_smoothing | property |
protected var _smoothing:Boolean
smoothing | property |
smoothing:Boolean
[read-write]
Determines whether the BitmapData
smoothing is applied to the plane rotations or not.
public function get smoothing():Boolean
public function set smoothing(value:Boolean):void
_spCube | property |
protected var _spCube:Sprite
_vertsArray | property |
protected var _vertsArray:Array
_wSegments | property |
protected var _wSegments:int
RotationPlane | () | constructor |
public function RotationPlane(material0:DisplayObject, material1:DisplayObject, focalLength:uint = 1500, wsegments:int = 5, hsegments:int = 5, smoothing:Boolean = false)
RotationPlane Constructor
Parametersmaterial0:DisplayObject — the first (front) DisplayObject .
|
|
material1:DisplayObject — the second (back) DisplayObject .
|
|
focalLength:uint (default = 1500 ) — the amount of focal distortion: the higher the value the less distortion. (Recommended value: 1000-2000 ).
|
|
wsegments:int (default = 5 ) — the number of horizontal segments (divisons) to slice the materials (effects distortion).
|
|
hsegments:int (default = 5 ) — the number of vertical segments (divisons) to slice the materials (effects distortion).
|
|
smoothing:Boolean (default = false ) — determines whether the rotational transformation BitmapData is smoothed or not (effects performance).
|
See also
var plane : RotationPlane = new RotationPlane( loader0.content, loader1.content, RotationPlane.X_ORIENTED ); plane.addEventListener( MouseEvent.MOUSE_OVER, rotationBack ); plane.addEventListener( MouseEvent.MOUSE_OUT, rotationFront ); addChild( plane ); private function rotationBack(e : MouseEvent) : void { Tweener.addTween( plane, { rotateX:180, time:0.7 } ); } private function rotationFront(e : MouseEvent) : void { Tweener.addTween( plane, { rotateY:0, time:0.7 } ); }
alignMaterials | () | method |
protected function alignMaterials():void
Align the materials.
calculateMasterDimensions | () | method |
protected function calculateMasterDimensions():void
Determine width : height
relationships.
configBackPlane | () | method |
protected function configBackPlane():void
Configure the back plane (material1
).
configFrontPlane | () | method |
protected function configFrontPlane():void
Configure the front plane (material0
).
init3D | () | method |
protected function init3D():void
Initialize 3D logic.
pointNewView | () | method |
protected function pointNewView(v:Array, theta:Number, phi:Number):Array
Aquire the new view coordinates.
Parametersv:Array |
|
theta:Number |
|
phi:Number |
Array |
renderView | () | method |
protected function renderView(t:Number, p:Number):void
Render the view.
Parameterst:Number |
|
p:Number |
swapDisplayObjects | () | method |
protected function swapDisplayObjects():void
Swap display objects.
updateMaterial0 | () | method |
public function updateMaterial0():void
Update the BitmapData
for material0
.
updateMaterial1 | () | method |
public function updateMaterial1():void
Update the BitmapData
for material1
.
updateMaterials | () | method |
public function updateMaterials():void
Update the BitmapData
for both materials on the plane.
X_ORIENTED | constant |
protected static const X_ORIENTED:String = "x"
Y_ORIENTED | constant |
protected static const Y_ORIENTED:String = "y"