openspace.pathnavigation

Functions overview

Name

Documentation

continuePath

Continue playing a paused camera path

createPath

Create a camera path as described by the instruction in the input argument

flyTo

Move the camera to the node with the specified identifier

flyToHeight

Move the camera to the node with the specified identifier

flyToNavigationState

Create a path to the navigation state described by the input table

isFlying

Returns true if a camera path is currently running, and false otherwise

jumpTo

Fade rendering to black, jump to the specified navigation state, and then fade in

jumpToNavigationState

Fade rendering to black, jump to the specified node, and then fade in

pausePath

Pause a playing camera path

skipToEnd

Immediately skips to the end of the current camera path, if one is being played

stopPath

Stops a path, if one is being played

zoomToDistance

Fly linearly to a specific distance in relation to the focus node

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

zoomToFocus

Zoom linearly to the current focus node, using the default distance

Functions

continuePath

Continue playing a paused camera path.

Return type: void

Signature
openspace.pathnavigation.continuePath()

createPath

Create a camera path as described by the instruction in the input argument.

Parameters
  • pathInstruction Table

    • A table representing a PathInstruction that describes a camera path to be created

Return type: void

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

Parameters
  • nodeIdentifier String

  • useUpFromTargetOrDuration Boolean | Number?

  • duration Number?

Return type: void

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

Parameters
  • nodeIdentifier String

  • height Number

  • useUpFromTargetOrDuration Boolean | Number?

  • duration Number?

Return type: void

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

Parameters
  • navigationState Table

  • 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

Signature
openspace.pathnavigation.flyToNavigationState(navigationState, duration)

isFlying

Returns true if a camera path is currently running, and false otherwise.

Return type: Boolean

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

Parameters
  • 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

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

Parameters
  • navigationState Table

  • fadeDuration Number?

    • An optional duration for the fading. If not included, the property in Navigation Handler will be used

Return type: void

Signature
openspace.pathnavigation.jumpToNavigationState(navigationState, fadeDuration)

pausePath

Pause a playing camera path.

Return type: void

Signature
openspace.pathnavigation.pausePath()

skipToEnd

Immediately skips to the end of the current camera path, if one is being played.

Return type: void

Signature
openspace.pathnavigation.skipToEnd()

stopPath

Stops a path, if one is being played.

Return type: void

Signature
openspace.pathnavigation.stopPath()

zoomToDistance

Fly linearly to a specific distance in relation to the focus node.

Parameters
  • 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

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

Parameters
  • 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

Signature
openspace.pathnavigation.zoomToDistanceRelative(distance, duration)

zoomToFocus

Zoom linearly to the current focus node, using the default distance.

Parameters
  • 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

Signature
openspace.pathnavigation.zoomToFocus(duration)