Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WWTEngineVuexState

This interface expresses the properties exposed by the WWT Engine’s Vuex store module.

See WWTAwareComponent for an organized overview of the different aspects of WWT state that are exposed in the Vuex framework, along with associated getters, actions, and mutations.

Much of this interface duplicates state that is already stored within the WWT engine itself (i.e., the WWTInstance). Due to the way that the Vue/Vuex reactivity framework works, we need to mirror the engine state into Vuex. The first reason to do this is that, as far as I can tell, there's no good way to integrate the "external" state of the WWT instance into the reactivity framework so that dependencies can be mapped correctly. And we can't just integrate the WWT instance into the reactivity framework -- well, I haven't tried, but I'm 99% sure that it won't work with all of the WebGL textures and whatnot. I.e., the WWT types that hold state are not "plain old data".

The second reason is that it is recommended for app state to be flattened and normalized when expressed in Vuex, as in this post. The WWT engine certainly does not express its state in such a manner.

The duplication of WWT's data structures is annoying, but the actual amount of mirrored data isn't very big.

Hierarchy

  • WWTEngineVuexState

Implemented by

Index

Properties

activeLayers

activeLayers: string[]

The GUIDs of all rendered layers, in their draw order.

availableImagesets

availableImagesets: ImagesetInfo[]

Info about the imagesets that are available in the engine to be used as backgrounds

backgroundImageset

backgroundImageset: null | Imageset

The current imageset acting as the background imagery, if defined.

clockDiscontinuities

clockDiscontinuities: number

The number of times that the WWT engine clock has been changed in a discontinuous manner.

The point of this property is that one can watch() it and get alerted to when this happens.

clockRate

clockRate: number

The rate at which the WWT engine clock progresses, compared to real time.

currentTime

currentTime: Date

The current WWT clock time of the view, as a UTC Date.

decRad

decRad: number

The current declination of the view, in radians.

TODO: define this properly for planetary lat/lng views!

foregroundImageset

foregroundImageset: null | Imageset

The current imageset acting as the foreground imagery, if defined.

foregroundOpacity

foregroundOpacity: number

The opacity with which the foreground imageset is rendered; valid values are between 0 and 100 (inclusive).

imagesetLayers

imagesetLayers: {}

Settings for all registered imageset layers.

Type declaration

isTourPlayerActive

isTourPlayerActive: boolean

Whether the tour playback mode is active.

Specifically, this is true if the WWTControl has a uiController item that is a TourPlayer item. See also isTourPlaying.

isTourPlaying

isTourPlaying: boolean

Whether a tour is actively playing righ now.

It might be the case that a tour player is active, but the tour is paused.

raRad

raRad: number

The current right ascension of the view, in radians.

TODO: define this properly for planetary lat/lng views!

renderType

renderType: ImageSetType

The current mode of the renderer

rollRad

rollRad: number

The current roll of the view camera, in radians

showWebGl2Warning

showWebGl2Warning: boolean

spreadSheetLayers

spreadSheetLayers: {}

Settings for all registered WWT spreadsheet layers.

Type declaration

  • [guidtext: string]: SpreadSheetLayerState

tourCompletions

tourCompletions: number

The number of times that a tour has played through to the end.

The point of this property is that one can watch() it and get alerted to tour completion.

tourRunTime

tourRunTime: null | number

The total run-time of the current tour, if there is one, measured in seconds.

tourStopStartTimes

tourStopStartTimes: number[]

The start times of the stops in the tour, measured in seconds.

It is possible for tour stops to be linked in a non-linear order, such that actual playback won't proceed linearly in the way that this API would imply.

tourTimecode

tourTimecode: number

How far we have progressed into the current tour, in seconds.

This number does not necessarily progress monotonically due to the way that WWT measures tour playback progress. We associate a start time with each "stop" in the tour, and can measure progress through a stop, but stops do not necessarily transition from one to another in linear fashion.

That being said, this number should range between 0 and the runtime of the current tour. If no tour is loaded, it will be zero.

zoomDeg

zoomDeg: number

The current zoom level of the view, in degrees.

The zoom level is the angular height of the viewport, times size.

TODO: define this properly for 3D modes!

Generated using TypeDoc