SaladoPlayer:Exposed functions
From PanoZona
Type | Description | Function description |
---|---|---|
S | message | Prints given message in trace window. This function can be usefull if you want to be sure if some specific action is executed. In order to read these messages you need to run SaladoPlayer in debug mode. |
loadPano
Type | Description | Function description |
---|---|---|
S | panorama id | Loads panorama with given id. This function can be called again only if previous panorama is done loading, otherwise function will be ignored. |
waitThen
Type | Description | Function description |
---|---|---|
N | time | Waits time given in seconds, after timeout executes action with given id. |
S | action id |
jumpToView
Type | Description | Function description |
---|---|---|
N | pan | Moves camera direclty to given pan, tilt and field of view values. All arguments can be NaN (Not a Number), in which case values are not changed with function execution. For instance jumpToView(90,NaN,NaN) makes camera get new horizontal position but keeps its initial tilt and field of view values. |
N | tilt | |
N | field of view |
moveToView
Type | Description | Function description |
---|---|---|
N | pan | Moves camera to given pan, tilt and field of view. Camera is moved with default speed in degrees per second (30) and transition function (Linear.easeNone). All arguments can be NaN (Not a Number), so that values are not changed with function execution. For instance moveToView(90,NaN,NaN) makes camera move horizontally but keeps its initial tilt and field of view values. |
N | tilt | |
N | field of view |
moveToViewThen
Type | Description | Function description |
---|---|---|
N | pan | Same as moveToView, but with additional parameter of action id execuded after camera finishes moving. |
N | tilt | |
N | field of view | |
S | action id |
advancedMoveToView
Type | Description | Function description |
---|---|---|
N | pan | Same as moveToView, but with additional parameters. You can set camera target field of view, or pass NaN (Not a Number) as value to keep current camera field of view. You can also set movement speed in degrees per second and transition function. For instance advancedMoveToView(90,10,30,20,Expo.easeIn) would couse camera to move to pan 90, tilt 10 with zooming in, using speed 20 degrees per second and transiton function Expo.easeIn |
N | tilt | |
N | field of view | |
N | speed | |
F | transition type |
advancedMoveToViewThen
Type | Description | Function description |
---|---|---|
N | pan | Same as advancedMoveToView, but with additional parameter of action id execuded when camera finishes moving. |
N | tilt | |
N | field of view | |
N | speed | |
F | transition type | |
S | action id |
moveToHotspot
Type | Description | Function description |
---|---|---|
S | hotspot id | Moves camera to pan and tilt of given hotspot in current panorama, with default field of view (NaN), speed in degrees per second (30) and transition function (Linear.easeNone). |
N | field of view |
moveToHotspotThen
Type | Description | Function description |
---|---|---|
S | hotspot id | Same as moveToHotspot, but with additional parameter of action id execuded after camera finishes moving. |
N | field of view | |
S | action id |
advancedMoveToHotspot
Type | Description | Function description |
---|---|---|
S | hotspot id | Same as moveToHotspot, but with additional parameters. You can set camera target field of view, or pass NaN (Not a Number) as value to keep current camera field of view. You can also set movement speed in degrees per second and transition function. For instance advancedMoveToHotspot(hs1,30,20,Expo.easeIn) would couse camera to move over hotspot "hs1" with zooming in, using speed 20 degrees per second and transiton function Expo.easeIn |
N | field of view | |
N | speed | |
F | transition type |
advancedMoveToHotspotThen
Type | Description | Function description |
---|---|---|
S | hotspot id | Same as advancedMoveToHotspot, but with additional parameter of action id execuded after camera finishes moving. |
N | field of view | |
N | speed | |
F | transition type | |
S | action id |
startMoving
Type | Description | Function description |
---|---|---|
N | pan speed | Starts inertial swing with given pan and tilt speeds. It uses default values for sensitivity (0.0003), friction (0.3) and threshold (0.0001). Any of arguments can be NaN (Not a Number), which means that value will not be affected. For instance calling startMoving(20,NaN) will affect only pan value. |
N | tilt speed |
advancedStartMoving
Type | Description | Function description |
---|---|---|
N | pan speed | Same as startMoving, but with additional parameters. |
N | tilt speed | |
N | sensitivity | |
N | friction | |
N | threshold |
stopMoving
Type | Description | Function description |
---|---|---|
- | - | Stops camera movement coused by startMoving or by advancedStartMoving. |
runAction
Type | Description | Function description |
---|---|---|
S | action id | Function executes action of given id. It can be usefull in case when many actions contain same sequence of functions - sequence can be extracted to separate action, and replaced with call to this action. |