openspace.pathnavigation
Functions overview
Name |
Documentation |
---|---|
Continue playing a paused camera path |
|
Create a camera path as described by the instruction in the input argument |
|
Move the camera to the node with the specified identifier |
|
Move the camera to the node with the specified identifier |
|
Create a path to the navigation state described by the input table |
|
Returns true if a camera path is currently running, and false otherwise |
|
Fade rendering to black, jump to the specified navigation state, and then fade in |
|
Fade rendering to black, jump to the specified node, and then fade in |
|
Pause a playing camera path |
|
Immediately skips to the end of the current camera path, if one is being played |
|
Stops a path, if one is being played |
|
Fly linearly to a specific distance in relation to the focus node |
|
Fly linearly to a specific distance in relation to the focus node, given as a relative value based on the size of the object rather than in meters |
|
Zoom linearly to the current focus node, using the default distance |
Functions
continuePath
Continue playing a paused camera path.
Return type: void
openspace.pathnavigation.continuePath()
createPath
Create a camera path as described by the instruction in the input argument.
pathInstruction
Table
A table representing a PathInstruction that describes a camera path to be created
Return type: void
openspace.pathnavigation.createPath(pathInstruction)
flyTo
Move the camera to the node with the specified identifier. The optional double specifies the duration of the motion, in seconds. If the optional bool is set to true the target up vector for camera is set based on the target node. Either of the optional parameters can be left out.
nodeIdentifier
String
useUpFromTargetOrDuration
Boolean | Number?
duration
Number?
Return type: void
openspace.pathnavigation.flyTo(nodeIdentifier, useUpFromTargetOrDuration, duration)
flyToHeight
Move the camera to the node with the specified identifier. The second argument is the desired target height above the target node’s bounding sphere, in meters. The optional double specifies the duration of the motion, in seconds. If the optional bool is set to true, the target up vector for camera is set based on the target node. Either of the optional parameters can be left out.
nodeIdentifier
String
height
Number
useUpFromTargetOrDuration
Boolean | Number?
duration
Number?
Return type: void
openspace.pathnavigation.flyToHeight(nodeIdentifier, height, useUpFromTargetOrDuration, duration)
flyToNavigationState
Create a path to the navigation state described by the input table. Note that roll must be included for the target up direction in the navigation state to be taken into account.
navigationState
Table
A NavigationState to fly to
duration
Number?
An optional duration for the motion to take, in seconds. For example, a value of 5 means “fly to this position over a duration of 5 seconds”
Return type: void
openspace.pathnavigation.flyToNavigationState(navigationState, duration)
isFlying
Returns true if a camera path is currently running, and false otherwise.
Return type: Boolean
openspace.pathnavigation.isFlying()
jumpTo
Fade rendering to black, jump to the specified navigation state, and then fade in. This is done by triggering another script that handles the logic.
nodeIdentifier
String
The identifier of the scene graph node to jump to
fadeDuration
Number?
An optional duration for the fading. If not included, the property in Navigation Handler will be used
Return type: void
openspace.pathnavigation.jumpTo(nodeIdentifier, fadeDuration)
jumpToNavigationState
Fade rendering to black, jump to the specified node, and then fade in. This is done by triggering another script that handles the logic.
navigationState
Table
A NavigationState to jump to
fadeDuration
Number?
An optional duration for the fading. If not included, the property in Navigation Handler will be used
Return type: void
openspace.pathnavigation.jumpToNavigationState(navigationState, fadeDuration)
pausePath
Pause a playing camera path.
Return type: void
openspace.pathnavigation.pausePath()
skipToEnd
Immediately skips to the end of the current camera path, if one is being played.
Return type: void
openspace.pathnavigation.skipToEnd()
stopPath
Stops a path, if one is being played.
Return type: void
openspace.pathnavigation.stopPath()
zoomToDistance
Fly linearly to a specific distance in relation to the focus node.
distance
Number
The distance to fly to, in meters above the bounding sphere.
duration
Number?
An optional duration for the motion to take, in seconds.
Return type: void
openspace.pathnavigation.zoomToDistance(distance, duration)
zoomToDistanceRelative
Fly linearly to a specific distance in relation to the focus node, given as a relative value based on the size of the object rather than in meters.
distance
Number
The distance to fly to, given as a multiple of the bounding sphere of the current focus node bounding sphere. A value of 1 will result in a position at a distance of one times the size of the bounding sphere away from the object.
duration
Number?
An optional duration for the motion, in seconds.
Return type: void
openspace.pathnavigation.zoomToDistanceRelative(distance, duration)
zoomToFocus
Zoom linearly to the current focus node, using the default distance.
duration
Number?
An optional duration for the motion to take, in seconds. For example, a value of 5 means “zoom in over 5 seconds”
Return type: void
openspace.pathnavigation.zoomToFocus(duration)