Get the reactive state for the active imageset layers
These layers are created using the addImageSetLayer action. The state structures returned by this function are part of the reactive Vuex store, so you can wire them up to your UI and they will update correctly. The list is returned in the engine's render order.
Add an Annotation to the view.
Add a "catalog HiPS" dataset to the current view, by name.
If the catalog name is not in the engine's registry, the promise rejects.
Request the creation of a image layer. Either a single FITS or an image set.
The action resolves to a new ImageSetLayer instance. It’s asynchronous because the requested url has to be downloaded.
Alter one or more settings of the specified FITS image layer as specified in the options.
Alter one WWT engine setting.
Alter one or more settings of the specified tabular data layers as specified in the options.
Clear all Annotations from the view.
Request the creation of a tabular data layer.
The action resolves to a new SpreadSheetLayer instance.
Delete the specified layer from the layer manager.
A layer may be identified by either its name or its id.
Get the right ascension and declination, in degrees, for x, y coordinates on the screen
Given an RA and Dec position, return the x, y coordinates of the screen point
Request an export of the catalog HiPS data within the current viewport.
Command the view to steer to a specific configuration.
The async action completes when the view arrives, or when a subsequent view command overrides this one.
TODO: document semantics when not in 2D sky mode!
Command the view to steer as specified in the options.
The async action completes when the view arrives, or when a subsequent view command overrides this one.
Look up the WWT engine object for an active imageset layer.
This getter gets the WWT Imageset
object associated with an imageset
layer. The returned object is not part of the Vue(x) reactivity system,
so you shouldn't use it to set up UI elements, but you can obtain more
detailed information about the imageset than is stored in the state
management system. For UI purposes, use imagesetStateForLayer.
Look up the reactive state for an active imageset layer.
These layers are created using the addImageSetLayer action. The state returned by this function is part of the reactive Vuex store, so you can wire it up to your UI and it will update as the layer settings are changed. If you need "runtime" state not captured in the reactivity system, you may need to use imagesetForLayer instead.
Get the actual WWT SpreadSheetLayer
for the named HiPS catalog.
Do not use this function for UI purposes -- the WWT layer object is not integrated into the reactive state system, and so if you use it as a basis for UI elements, those elements will not be updated properly if/when the layer's settings change. Use spreadsheetStateForHipsCatalog instead.
Deprecated. Use addImageSetLayer instead. Request the creation of a FITS image layer.
The action resolves to a new ImageSetLayer instance. It’s asynchronous because the requested FITS file has to be downloaded.
Request the engine to load the specified image collection.
The image collection is a WTML file Images in collections loaded this way become usable for name-based lookup by interfaces such as setForegroundImageByName.
The action resolves to a Folder instance. It’s asynchronous because the specified WTML file has to be downloaded.
Request the engine to load a tour file.
The action resolves when the load is complete. It’s asynchronous because the full WTT tour file has to be downloaded.
Look up an Imageset in the engine’s table of ones with registered names.
This delegates to WWTControl.getImagesetByName(), which has very eager name-matching rules. But if nothing matches, null is returned.
Imagesets are not added to the engine’s list of names automatically. In order for an imageset to be findable by this function, its containing folder must have been loaded using the loadImageCollection action.
Moves the position of the view
Remove the specified Annotation from the view.
Remove a "catalog HiPS" dataset to the current view, by name.
Seek tour playback to the specified timecode.
See wwtTourTimecode for a definition of the tour timecode.
An important limitation is that the engine can only seek to the very beginning of a tour stop. If you request a timecode in the middle of a slide, the seek will actually occur to the start time of that slide.
Set the current background Imageset based on its name.
The name lookup here is effectively done using lookupImageset. If the name is not found, the current background imageset remains unchanged.
Changing the background imageset may change the value of wwtRenderType, and the overall "mode" of the WWT renderer.
Set the rate at which the WWT clock progresses compared to wall-clock time.
A value of 10 means that the WWT clock progresses ten times faster than real time. A value of -0.1 means that the WWT clock moves backwards, ten times slower than real time.
Altering this causes an increment in wwtClockDiscontinuities.
Set whether the WWT clock should progress with real time.
See SpaceTimeController.set_syncToClock(). This interface effectively allows you to pause the WWT clock.
Altering this causes an increment in wwtClockDiscontinuities.
Set the colormap used for a FITS image layer according to the options.
Set the current foreground Imageset based on its name.
The name lookup here is effectively done using lookupImageset. If the name is not found, the current foreground imageset remains unchanged.
Set the opacity of the foreground imageset.
Valid values are between 0 (invisible) and 100 (fully opaque).
Change the ImageSetLayer position in the draw cycle.
Set the current time of WWT's internal clock.
Altering this causes an increment in wwtClockDiscontinuities.
Set whether the renderer settings of tours should remain applied after those tours finish playing back.
This specialized option helps avoid jarring visual effects when tours finish playing. If a tour activates a renderer option like "local horizon mode", by default that option will turn off when the tour finishes, causing the view to suddenly change. If this option is set to True, that setting will remain active, preventing the sudden change.
Set the "tracked object" in the 3D solar system view.
Allowed values are defined in @wwtelescope/engine-types.
Set up the background and foreground imagesets according to the options
The main use of this interface is that it provides a mechanism to guess the appropriate background imageset given a foreground imageset that you want to show.
Get the actual WWT SpreadSheetLayer
for the table layer corresponding
to the given CatalogLayerInfo.
Do not use this function for UI purposes -- the WWT layer object is not integrated into the reactive state system, and so if you use it as a basis for UI elements, those elements will not be updated properly if/when the layer's settings change. Use spreadsheetState instead.
Get the actual WWT SpreadSheetLayer
for the table layer with the given ID.
Do not use this function for UI purposes -- the WWT layer object is not integrated into the reactive state system, and so if you use it as a basis for UI elements, those elements will not be updated properly if/when the layer's settings change. Use spreadsheetState instead.
Get reactive SpreadSheetLayer
settings for the table layer corresponding to
the given CatalogLayerInfo.
The returned data structure is a component of the app's Vuex state. You can therefore use the settings to construct UI elements, and they will update reactively as the state evolves. The actual data structures used by WWT are separate, but the two mirror each other.
Get reactive SpreadSheetLayer
settings for the table layer with the given ID.
The returned data structure is a component of the app's Vuex state. You can therefore use the settings to construct UI elements, and they will update reactively as the state evolves. The actual data structures used by WWT are separate, but the two mirror each other.
Get reactive SpreadSheetLayer
settings for the named HiPS catalog.
The returned data structure is a component of the app's Vuex state. You can therefore use the settings to construct UI elements, and they will update reactively as the state evolves. The actual data structures used by WWT are separate, but the two mirror each other.
Start playback of the currently loaded tour.
Nothing hppanes if no tour is loaded.
Alter the "stretch" of a FITS image layer according to the options.
Tilts the position of the view
Toggle the play/pause state of the current tour.
Nothing happens if no tour is loaded.
Update the contents of a tabular data layer according to the options.
Wait for the WWT engine to become ready for usage.
You should invoke this action and wait for is completion before trying to do anything else with a WWT-aware component. The action resolves when the WWT engine has completed its initialization, which involes the download of some supporting data files.
The GUIDs of all rendered layers, in their draw order.
This list gives the GUIDs of the layers that are currently candidates for
rendering. This list is determined by the hierarchy of "layer maps"
registered with the engine and its current rendering mode. Layers in this
list might not be actually rendered if their enabled
flag is false, if
they are fully transparent, and so on.
Information about the imagesets that are available to be used as a background.
The info includes the name, which can then be used to set the background image via the setBackgroundImageByName mutation.
The current background Imageset, or null if it is undefined.
You can cause this state variable to change using the setBackgroundImageByName mutation.
The number of times that the progression of the WWT internal clock has been changed discontinuously.
The main use of this state variable is that you can watch for changes to it and be alerted when the clock has been altered.
The rate at which the WWT internal clock progresses compared to real time. If the WWT clock is paused, this will be zero. Negative and fractional values are both possible.
The current time of WWT internal clock. In normal operation this variable will change with every rendered WWT frame, or every 30 ms or so.
The current declination of the center of the WWT view, in radians.
TODO: define the meaning here for view modes other than "sky."
The current foreground Imageset, or null if it is undefined.
You can cause this state variable to change using the setForegroundImageByName mutation.
The opacity of the foreground imageset. Values range between 0 (invisible) and 100 (fully opaque).
A table of activated imageset layers.
Use imagesetStateForLayer to access information about a particular layer.
Whether a tour has been loaded up and is available for playback.
Whether a tour is actively playing back right now. This can spontaneously become false if the tour completes playing.
The namespace of the Vuex module used to track the WWT component’s state. This prop should have the same value in all components in the app that reference WWT.
The current right ascension of the center of the WWT view, in radians.
TODO: define the meaning here for view modes other than "sky."
The current mode of the WWT renderer.
This is derived from the "type" of the active background imageset. To change the mode, change the background imageset with setBackgroundImageByName.
The current roll of the view camera, in radians
A table of activated imageset layers.
Use imagesetStateForLayer to access information about a particular layer.
The number of times that a WWT tour has completed playing.
The main use of this state variable is that you can watch for changes to it and be alerted when a tour finishes. Watching wwtIsTourPlaying doesn't suffice because that will trigger when a tour is paused.
The total runtime of the current tour, in seconds, if there is one.
The timecodes at which the current tour’s "stops" begin, in seconds.
Each WWT tour is composed of one or more "stops", each of which has a fixed wall-clock duration. This variable gives the start times of the stops under the assumption that they all follow one another in sequence. It is possible to have nonlinear flow from one stop to the next.
If no tour is loaded, this is an empty array.
The "timecode" of the current tour playback progression.
The "timecode" is approximately the number of seconds elapsed since tour playback began. More precisely, however, it is the start time of the current tour stop, plus however much wall-clock time has elapsed while at that stop. Because it is possible for stops to link to each other non-linearly, it is also possible for the timecode to progress non-linearly even when the tour plays back without user interaction.
In combination with wwtTourStopStartTimes, you can use this value to determine the index number of the currently active tour stop.
If no tour is loaded, this is zero.
The WWT zoom level, in degrees.
TODO: define the semantics here in 3D and other modes.
In 2D sky mode, the zoom level is the angular height of the viewport, times six.
Set the zoom level of the view.
This mutation may result in an action that takes a perceptible amount of time to resolve, if the "smooth pan" renderer option is enabled. To have proper asynchronous feedback about when the zoom operation completes, use gotoRADecZoom.
Generated using TypeDoc
A class for Vue components that wish to interact with a WWTComponent through the Vuex state management system.
Skip to The WWT Vuex Interface for a quick summary of how WWT's state is exposed and controlled in Vuex.
Introduction
Vue applications are composed of multiple components. In a WWT-powered app, one of those components will be a
<WorldWideTelescope>
component containing the actual WWT rendering window. The other components of the app will wish to monitor or alter the state of the WWT rendering window. The WWTAwareComponent class provides a convenient framework for doing so.In particular, if your component’s TypeScript class extends this class, it will automatically be set up with fields and methods allowing you to interact with the WWT engine’s state. A minimal example:
This simple
App
component will display the coordinates of the current center of the WWT view, and the coordinate readout will update automagically as the user interacts with the view.Props
Classes inheriting from WWTAwareComponent automatically define a prop named wwtNamespace. This should be set to the namespace of the Vuex module used to track the
<WorldWideTelescope>
component’s state — that is, it should have the same value as that component’s ownwwtNamespace
prop. The default value is"wwt"
.The WWT Vuex Interface
Your WWTAwareComponent can monitor or manipulate the state of the WWT renderer using the following interfaces, grouped by category. As a reminder, in the Vuex paradigm, state is expressed in state variables and getters, and modified through instantaneous mutations and asynchronous actions.
Initialization
Mutations:
Actions:
Basic View Information
State:
Getters:
Mutations:
Actions:
Image Sets
State:
Getters:
Mutations:
Actions:
Imageset Layers (including FITS imagery)
State:
Getters:
Mutations:
Actions:
Tabular Data Layers
State:
Mutations:
Actions:
Annotations
Mutations:
Progressive HiPS Catalogs
These have some characteristics of both imagesets and tabular ("spreadsheet") data layers.
Getters:
Mutations:
Actions:
Tours
State:
Mutations:
Actions:
Miscellaneous
State:
Mutations: