Package | com.panosalado.core |
Class | public class PanoSalado |
Inheritance | PanoSalado ![]() ![]() |
Implements | ICamera |
Property | Defined by | ||
---|---|---|---|
![]() | _boundsHeight : Number
Height of panorama.
| ViewData | |
![]() | boundsHeight : Number
Height of rendered panorama.
| ViewData | |
![]() | _boundsWidth : Number
Width of panorama.
| ViewData | |
![]() | boundsWidth : Number
Width of rendered panorama.
| ViewData | |
canvas : Sprite [read-only]
The Sprite whose x,y values can be used to move the primary panorama.
| PanoSalado | ||
canvasInternal : Sprite [read-only]
The Sprite whose graphics object is used to draw the primary panorama.
| PanoSalado | ||
children : Sprite [read-only]
The Sprite which is the container for all children which do NOT extend ManagedChild.
| PanoSalado | ||
![]() | _fieldOfView : Number
Field of view.
| ViewData | |
![]() | fieldOfView : Number
Field of view.
| ViewData | |
![]() | frustumBottom : Vector3D
Bottom frustum plane as determined by field of view.
| ViewData | |
![]() | frustumLeft : Vector3D
Left frustum plane as determined by field of view.
| ViewData | |
![]() | frustumRight : Vector3D
Right frustum plane as determined by field of view.
| ViewData | |
![]() | frustumTop : Vector3D
Top frustum plane as determined by field of view.
| ViewData | |
![]() | invalid : Boolean
Invalidation flag for all properties.
| ViewData | |
![]() | invalidPerspective : Boolean
Invalidation flag for field of view, boundsWidth and boundsHeight, which determine perspectiveProjection and perspectiveMatrix3D
| ViewData | |
![]() | invalidTransform : Boolean
Invalidation flag for pan and tilt, which determine the transformMatrix3D
| ViewData | |
managedChildren : Sprite [read-only]
The Sprite which is the container for all ManagedChild extending children of the primary panorama (hotspots usually).
| PanoSalado | ||
![]() | _maximumFieldOfView : Number
Maximum field of view.
| ViewData | |
![]() | maximumFieldOfView : Number
maximumFieldOfView
| ViewData | |
![]() | _maximumPan : Number
Maximum pan.
| ViewData | |
![]() | maximumPan : Number
maximumPan
| ViewData | |
![]() | _maximumTilt : Number
Maximum tilt.
| ViewData | |
![]() | maximumTilt : Number
maximumTilt
| ViewData | |
![]() | _minimumFieldOfView : Number
Minimum field of view.
| ViewData | |
![]() | minimumFieldOfView : Number
minimumFieldOfView
| ViewData | |
![]() | _minimumPan : Number
Minimum pan.
| ViewData | |
![]() | minimumPan : Number
minimumPan
| ViewData | |
![]() | _minimumTilt : Number
Minimum tilt.
| ViewData | |
![]() | minimumTilt : Number
minimumTilt
| ViewData | |
numChildren : int [read-only]
| PanoSalado | ||
![]() | _pan : Number
Pan angle.
| ViewData | |
![]() | pan : Number
Pan angle.
| ViewData | |
![]() | _path : String
Path for panorama.
| ViewData | |
![]() | path : String
Path.
| ViewData | |
![]() | perspectiveMatrix3D : Matrix3D
Matrix3D from perspectiveProjection.toMatrix3d().
| ViewData | |
![]() | perspectiveProjection : PerspectiveProjection
PerspectiveProjection set from field of view, boundsWidth and boundsHeight.
| ViewData | |
![]() | pixelsPerDegree : Number
Pixels per degree as determined from field of view, boundsWidth and boundsHeight.
| ViewData | |
secondaryCanvas : Sprite [read-only]
The Sprite whose x,y values can be used to move the secondary, outgoing panorama.
| PanoSalado | ||
secondaryCanvasInternal : Sprite [read-only]
The Sprite whose graphics object is used to draw the secondary panorama.
| PanoSalado | ||
secondaryManagedChildren : Sprite [read-only]
The Sprite which is the container for all ManagedChild extending children of the secondary panorama (hotspots).
| PanoSalado | ||
![]() | secondaryViewData : DependentViewData
Secondary ViewData, which is used for the secondary (outgoing) panorama.
| ViewData | |
![]() | _tierThreshold : Number
Tier threshold.
| ViewData | |
![]() | tierThreshold : Number
Tier Threshold.
| ViewData | |
![]() | _tile : Tile
Tile.
| ViewData | |
![]() | tile : Tile
The root tile in the tile linked list data structure.
| ViewData | |
![]() | _tilt : Number
Tilt angle.
| ViewData | |
![]() | tilt : Number
Tilt angle.
| ViewData | |
![]() | transformMatrix3D : Matrix3D
Matrix3D recomposed from pan and tilt angles.
| ViewData |
Property | Defined by | ||
---|---|---|---|
_canvas : Sprite | PanoSalado | ||
_canvasInternal : Sprite | PanoSalado | ||
_children : Sprite | PanoSalado | ||
![]() | constructed : Boolean | ViewData | |
_deltaPan : Number | PanoSalado | ||
_deltaTilt : Number | PanoSalado | ||
_dependencyRelay : DependencyRelay | PanoSalado | ||
_friction : Number | PanoSalado | ||
_managedChildren : Sprite | PanoSalado | ||
_now : int | PanoSalado | ||
_panSpeed : Number | PanoSalado | ||
_params : Object | PanoSalado | ||
_render : Function | PanoSalado | ||
_secondaryCanvas : Sprite | PanoSalado | ||
_secondaryCanvasInternal : Sprite | PanoSalado | ||
_secondaryManagedChildren : Sprite | PanoSalado | ||
_sensitivity : Number | PanoSalado | ||
_stageReference : StageReference | PanoSalado | ||
_threshold : Number | PanoSalado | ||
_tiltSpeed : Number | PanoSalado |
Method | Defined by | ||
---|---|---|---|
Constructor.
| PanoSalado | ||
_getChildAt(index:int, managed:Boolean):DisplayObject
Allows access to getChildAt() to get a managed or normal child depending on the managed switch
| PanoSalado | ||
_getChildByName(name:String, managed:Boolean):DisplayObject
Allows access to getChildByName() to get a managed or normal child depending on the managed switch
| PanoSalado | ||
_removeChildAt(index:int, managed:Boolean):DisplayObject
Allows access to removeChildAt() for a managed or normal child depending on the managed switch
| PanoSalado | ||
_swapChildrenAt(index1:int, index2:int, managed:Boolean):void
Allows access to swapChildrenAt() for managed or normal children depending on the managed switch
| PanoSalado | ||
addChild(child:DisplayObject):DisplayObject
| PanoSalado | ||
addChildAt(child:DisplayObject, index:int):DisplayObject
| PanoSalado | ||
![]() |
Clones the properties of this view data object into another.
| ViewData | |
contains(child:DisplayObject):Boolean
| PanoSalado | ||
getChildIndex(child:DisplayObject):int
| PanoSalado | ||
initialize(dependencies:Array):void
PanoSalado accepts an Array of Objects as dependencies for itself and for the other dependencies in the list.
| PanoSalado | ||
loadPanorama(params:Params):void
Loads a new panorama.
| PanoSalado | ||
processDependency(reference:Object, characteristics:*):void
| PanoSalado | ||
removeChild(child:DisplayObject):DisplayObject
| PanoSalado | ||
function that draws the panorama.
| PanoSalado | ||
renderAt(pan:Number, tilt:Number, fieldOfView:Number):void
Renders the panorama at the specified pan,tilt,fieldOfView.
| PanoSalado | ||
setChildIndex(child:DisplayObject, index:int):void
| PanoSalado | ||
startInertialSwing(panSpeed:Number, tiltSpeed:Number, sensitivity:Number = 0.0003, friction:Number = 0.3, threshold:Number = 0.0001):void
Starts inertial motion (like the InertialMouseCamera) with the specified panSpeed, tiltSpeed using
the specified sensitivity, friction, and threshold.
| PanoSalado | ||
stopInertialSwing():void
Stops the inertial motion caused by a call to startInertialSwing().
| PanoSalado | ||
swapChildren(child1:DisplayObject, child2:DisplayObject):void
| PanoSalado | ||
swingTo(pan:Number, tilt:Number, fieldOfView:Number, time:Number = 2.5, tween:Function = null):void
Swings the camera to the specified pan,tilt,fieldOfView over the specified time (in seconds) using the specified tween
function (with a standard Robert Penner tween function signature).
| PanoSalado | ||
swingToChild(child:ManagedChild, fieldOfView:Number, time:Number = 2.5, tween:Function = null):void
Swings the camera to the specified ManagedChild, fieldOfView, over the specified time in seconds using the
specified tween function (standard Robert Penner style signature).
| PanoSalado |
Method | Defined by | ||
---|---|---|---|
clearGraphics(e:Event):void
Clears the graphics objects if path or secondaryPath are null.
| PanoSalado | ||
commitPath(e:ReadyEvent, updateFOV:Boolean = true):void
Copies all the properties in the Params object received in loadPanorama to the current panorama.
| PanoSalado | ||
swingToChildComplete(e:Event):void
| PanoSalado | ||
updateChildren(container:Sprite, viewData:ViewData):void
Updates the position of all managedChildren of PanoSalado
| PanoSalado |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched before PanoSalado begins to change view properties as a result of API calls: loadPanorama, renderAt, swingTo, swingToChild, startInertialSwing/stopInertialSwing. | PanoSalado | |||
Dispatched when a new panorama has loaded. | PanoSalado | |||
Dispatched after PanoSalado finishes changing view properties as a result of API calls: loadPanorama, renderAt, swingTo, swingToChild, startInertialSwing/stopInertialSwing. | PanoSalado | |||
Dispatched after a swingToChild is complete | PanoSalado | |||
Dispatched after a swingTo is complete | PanoSalado |
_canvas | property |
protected var _canvas:Sprite
canvas | property |
canvas:Sprite
[read-only]The Sprite whose x,y values can be used to move the primary panorama. Also the Sprite on which the BlendMode is set to LAYER.
Implementation public function get canvas():Sprite
_canvasInternal | property |
protected var _canvasInternal:Sprite
canvasInternal | property |
canvasInternal:Sprite
[read-only]The Sprite whose graphics object is used to draw the primary panorama. It's x,y is always at half the panorama's width, height.
Implementation public function get canvasInternal():Sprite
_children | property |
protected var _children:Sprite
children | property |
children:Sprite
[read-only]The Sprite which is the container for all children which do NOT extend ManagedChild.
Implementation public function get children():Sprite
_deltaPan | property |
protected var _deltaPan:Number
_deltaTilt | property |
protected var _deltaTilt:Number
_dependencyRelay | property |
protected var _dependencyRelay:DependencyRelay
_friction | property |
protected var _friction:Number
_managedChildren | property |
protected var _managedChildren:Sprite
managedChildren | property |
managedChildren:Sprite
[read-only]The Sprite which is the container for all ManagedChild extending children of the primary panorama (hotspots usually). When a new panorama has loaded all current children will be re-parented to the secondaryManagedChildren Sprite. When a child is added to PanoSalado, its class is checked for ManagedChild and if true, it will be added to this Sprite and managed as part of the current panorama.
Implementation public function get managedChildren():Sprite
_now | property |
protected var _now:int
numChildren | property |
numChildren:int
[read-only]Implementation
public function get numChildren():int
_panSpeed | property |
protected var _panSpeed:Number
_params | property |
protected var _params:Object
_render | property |
protected var _render:Function
_secondaryCanvas | property |
protected var _secondaryCanvas:Sprite
secondaryCanvas | property |
secondaryCanvas:Sprite
[read-only]The Sprite whose x,y values can be used to move the secondary, outgoing panorama. Also the Sprite on which the BlendMode is set to LAYER.
Implementation public function get secondaryCanvas():Sprite
_secondaryCanvasInternal | property |
protected var _secondaryCanvasInternal:Sprite
secondaryCanvasInternal | property |
secondaryCanvasInternal:Sprite
[read-only]The Sprite whose graphics object is used to draw the secondary panorama. It's x,y is always at half the panorama's width, height.
Implementation public function get secondaryCanvasInternal():Sprite
_secondaryManagedChildren | property |
protected var _secondaryManagedChildren:Sprite
secondaryManagedChildren | property |
secondaryManagedChildren:Sprite
[read-only]The Sprite which is the container for all ManagedChild extending children of the secondary panorama (hotspots). When a new panorama has loaded all children will be removed from this Sprite, making them eligible for garbage collection if there are not other outstanding references to them.
Implementation public function get secondaryManagedChildren():Sprite
_sensitivity | property |
protected var _sensitivity:Number
_stageReference | property |
protected var _stageReference:StageReference
_threshold | property |
protected var _threshold:Number
_tiltSpeed | property |
protected var _tiltSpeed:Number
PanoSalado | () | constructor |
public function PanoSalado()
Constructor.
_getChildAt | () | method |
public function _getChildAt(index:int, managed:Boolean):DisplayObject
Allows access to getChildAt() to get a managed or normal child depending on the managed switch
Parametersindex:int — int
|
|
managed:Boolean — Boolean
|
DisplayObject |
_getChildByName | () | method |
public function _getChildByName(name:String, managed:Boolean):DisplayObject
Allows access to getChildByName() to get a managed or normal child depending on the managed switch
Parametersname:String — String
|
|
managed:Boolean — Boolean
|
DisplayObject |
_removeChildAt | () | method |
public function _removeChildAt(index:int, managed:Boolean):DisplayObject
Allows access to removeChildAt() for a managed or normal child depending on the managed switch
Parametersindex:int — int
|
|
managed:Boolean — Boolean
|
DisplayObject |
_swapChildrenAt | () | method |
public function _swapChildrenAt(index1:int, index2:int, managed:Boolean):void
Allows access to swapChildrenAt() for managed or normal children depending on the managed switch
Parametersindex1:int — int
|
|
index2:int — int
|
|
managed:Boolean — Boolean
|
addChild | () | method |
public override function addChild(child:DisplayObject):DisplayObject
Parameters
child:DisplayObject |
DisplayObject |
addChildAt | () | method |
public override function addChildAt(child:DisplayObject, index:int):DisplayObject
Parameters
child:DisplayObject |
|
index:int |
DisplayObject |
clearGraphics | () | method |
protected function clearGraphics(e:Event):void
Clears the graphics objects if path or secondaryPath are null.
Parameterse:Event |
commitPath | () | method |
protected override function commitPath(e:ReadyEvent, updateFOV:Boolean = true):void
Copies all the properties in the Params object received in loadPanorama to the current panorama.
Parameterse:ReadyEvent |
|
updateFOV:Boolean (default = true )
|
See also
contains | () | method |
public override function contains(child:DisplayObject):Boolean
Parameters
child:DisplayObject |
Boolean |
getChildIndex | () | method |
public override function getChildIndex(child:DisplayObject):int
Parameters
child:DisplayObject |
int |
initialize | () | method |
public function initialize(dependencies:Array):void
PanoSalado accepts an Array of Objects as dependencies for itself and for the other dependencies in the list. This offers a means for any instance of a class passed in to the array to store a reference to any other instance of a class passed in to the array. PanoSalado uses flash.utils.getQualifiedClassName() on each dependency to create the characteristics object which provides an auxiliary means for the dependency to identify itself to other dependencies looking for it. (This is in addition to the actual reference to the dependency). Each dependency will be checked for a "processDependency" function, and if found the function will be invoked with each dependency in the order of the dependencies Array.
Parametersdependencies:Array — Array of Objects
|
See also
loadPanorama | () | method |
public function loadPanorama(params:Params):void
Loads a new panorama. This operation is asynchronous. The new panorama does not exist until PanoSalado dispatches a COMPLETE event, at which time, all the properties of the Params arg will be copied the the superclass ViewData. Any properties not specified in the Params object will be untouched. If you wish a panorama to open with pan, tilt, fieldOfView of 0,0,120 create a Params object with those values, and all other values will be inherited as they are. The only property of Params that must be set is the path.
Parametersparams:Params |
processDependency | () | method |
public function processDependency(reference:Object, characteristics:*):void
Parameters
reference:Object — Object
|
|
characteristics:* |
removeChild | () | method |
public override function removeChild(child:DisplayObject):DisplayObject
Parameters
child:DisplayObject |
DisplayObject |
render | () | method |
public final function render(event:Event = null, viewData:ViewData = null):void
function that draws the panorama. Normally it is not necessary to call this function at all; normally the function is called to handle a RENDER event caused by setting a property on the ViewData instance with invalidates the stage. However, this function can be called WITHOUT an event arg, and WITH a viewData arg in order to predict and start loading images for the values in the viewData arg. Calling it with a null Event will not cause any drawing.
Parametersevent:Event (default = null ) — Event non-null value will result in drawing using the superclass ViewData's properties
|
|
viewData:ViewData (default = null ) — ViewData non-null value will result in using this ViewData's properties
|
renderAt | () | method |
public function renderAt(pan:Number, tilt:Number, fieldOfView:Number):void
Renders the panorama at the specified pan,tilt,fieldOfView. This is a convenience method for directly setting pan,tilt,fieldOfView. Any of the values will be untouched if NaN is passed. It also dispatches CameraEvent.ACTIVE and CameraEvent.INACTIVE before and after the changes to stop autorotation for the benefit of any listening objects (AutorotationCamera).
Parameterspan:Number — Number (optional) pass NaN to use the current value
|
|
tilt:Number — Number (optional) pass NaN to use the current value
|
|
fieldOfView:Number — Number (optional) pass NaN to use the current value
|
setChildIndex | () | method |
public override function setChildIndex(child:DisplayObject, index:int):void
Parameters
child:DisplayObject |
|
index:int |
startInertialSwing | () | method |
public function startInertialSwing(panSpeed:Number, tiltSpeed:Number, sensitivity:Number = 0.0003, friction:Number = 0.3, threshold:Number = 0.0001):void
Starts inertial motion (like the InertialMouseCamera) with the specified panSpeed, tiltSpeed using the specified sensitivity, friction, and threshold. For a panning motion (horizontal) pass a positive or negative non-zero (positive = right) panSpeed value. For tilt, pass a non-zero tiltSpeed value (positive = up). Calling stopInertialSwing() will zero out panSpeed and tiltSpeed, and slow the motion to a stop once the delta motion is under the threshold value. Subsequent calls to this function, but prior to calling stopInertialSwing() will modified the values but continue the motion. Calling stopInertialSwing() is identical in function to calling startInertialSwing(0,0). This function dispatches CameraEvent.ACTIVE and CameraEvent.INACTIVE before the motion starts and after it ceases, respectively.
ParameterspanSpeed:Number — Number (< 0 = left; > 0 right) the larger the absolute value, the faster the motion
|
|
tiltSpeed:Number — Number (< 0 = down; > 0 up) the larger the absolute value, the faster the motion
|
|
sensitivity:Number (default = 0.0003 ) — Number (optional) defaults to 0.0003
|
|
friction:Number (default = 0.3 ) — Number (optional) defaults to 0.3
|
|
threshold:Number (default = 0.0001 ) — Number (optional) defaults to 0.0001
|
stopInertialSwing | () | method |
public function stopInertialSwing():void
Stops the inertial motion caused by a call to startInertialSwing(). This is identical to calling startInertialSwing(0,0). Motion does not cease immediately; it slows until it is under the threshold specified in startInertialSwing().
swapChildren | () | method |
public override function swapChildren(child1:DisplayObject, child2:DisplayObject):void
Parameters
child1:DisplayObject |
|
child2:DisplayObject |
swingTo | () | method |
public function swingTo(pan:Number, tilt:Number, fieldOfView:Number, time:Number = 2.5, tween:Function = null):void
Swings the camera to the specified pan,tilt,fieldOfView over the specified time (in seconds) using the specified tween function (with a standard Robert Penner tween function signature). NaN passed for pan, tilt, or fieldOfView will not changed the current value. It also dispatches CameraEvent.ACTIVE and CameraEvent.INACTIVE before and after the changes to stop autorotation for the benefit of any listening objects (AutorotationCamera).
Parameterspan:Number — Number (optional) pass NaN to use the current value
|
|
tilt:Number — Number (optional) pass NaN to use the current value
|
|
fieldOfView:Number — Number (optional) pass NaN to use the current value
|
|
time:Number (default = 2.5 ) — Number (optional) defaults to 2.5 seconds
|
|
tween:Function (default = null ) — Function (optional) defaults to Linear.easeNone. Function must have signature: function name (t:Number, b:Number, c:Number, d:Number):Number
|
swingToChild | () | method |
public function swingToChild(child:ManagedChild, fieldOfView:Number, time:Number = 2.5, tween:Function = null):void
Swings the camera to the specified ManagedChild, fieldOfView, over the specified time in seconds using the specified tween function (standard Robert Penner style signature). This function dispatches CameraEvent.ACTIVE and CameraEvent.INACTIVE before the motion starts and after it ceases, respectively.
Parameterschild:ManagedChild — ManagedChild
|
|
fieldOfView:Number — Number (optional) pass NaN to use the current value
|
|
time:Number (default = 2.5 ) — Number (optional) defaults to 2.5 seconds
|
|
tween:Function (default = null ) — Function (optional) defaults to Linear.easeNone. Function must have signature: function name (t:Number, b:Number, c:Number, d:Number):Number
|
swingToChildComplete | () | method |
protected function swingToChildComplete(e:Event):void
Parameters
e:Event |
updateChildren | () | method |
protected final function updateChildren(container:Sprite, viewData:ViewData):void
Updates the position of all managedChildren of PanoSalado
Parameterscontainer:Sprite |
|
viewData:ViewData |
See also
active | event |
com.panosalado.events.CameraEvent
com.panosalado.events.CameraEvent.ACTIVE
Dispatched before PanoSalado begins to change view properties as a result of API calls: loadPanorama, renderAt, swingTo, swingToChild, startInertialSwing/stopInertialSwing.
The CameraEvent.ACTIVE constant defines the value of the
type
property of the event object
for an active
event.
complete | event |
inactive | event |
com.panosalado.events.CameraEvent
com.panosalado.events.CameraEvent.INACTIVE
Dispatched after PanoSalado finishes changing view properties as a result of API calls: loadPanorama, renderAt, swingTo, swingToChild, startInertialSwing/stopInertialSwing. With
The CameraEvent.INACTIVE constant defines the value of the
type
property of the event object
for an inactive
event.
swingToChildComplete | event |
com.panosalado.events.PanoSaladoEvent
com.panosalado.events.PanoSaladoEvent.SWING_TO_CHILD_COMPLETE
Dispatched after a swingToChild is complete
The PanoSaladoEvent.SWING_TO_CHILD_COMPLETE constant defines the value of the
type
property of the event object
for an swingToChildComplete
event.
swingToComplete | event |
com.panosalado.events.PanoSaladoEvent
com.panosalado.events.PanoSaladoEvent.SWING_TO_COMPLETE
Dispatched after a swingTo is complete
The PanoSaladoEvent.SWING_TO_COMPLETE constant defines the value of the
type
property of the event object
for an swingToComplete
event.