Options to apply to the control.
Compared to the underlying library, this class provides a more JavaScript-y API.
A callback to be invoked when a tour completes playing.
Add a new HiPS catalog to the view, by name.
The promise will resolve when the catalog metadata have fully downloaded. It will reject if the name is unrecognized.
HiPS catalogs are something of an awkward hybrid. They are managed like
imagesets, but rendered like spreadsheet layers. To get the
SpreadSheetLayer
associated with a HiPS catalog imageset, access:
imgset.get_hipsProperties().get_catalogSpreadSheetLayer()
You can use methods like applyTableLayerSettings to modify the settings
of this layer by extracting its ID string with layer.id.toString()
.
The contents of this catalog will update dynamically as the user navigates the WWT view.
Load an image set or a remote FITS file into a data layer and display it.
The FITS file must be downloaded and processed, so this API is asynchronous, and is not appropriate for files that might be large.
The image set must have previously been created with loadImageCollection
Apply settings to a FITS image layer.
Apply settings to a tabular data layer.
If the tour playback mode is active, get the active TourPlayer object.
Fetch the subset of catalog HiPS data contained within the current view.
The imageset should have been loaded with the addCatalogHipsByName call. The limit option should almost always be true, since if it is false the data-fetch operation can potentially attempt to download and return gigabytes of data.
Find out how far we have progressed into the 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.
Find out whether a tour is playing.
For obscure reasons, this is a static method in WWT that is not attached to a TourPlayer instance. We take one as an argument for future-proofiness.
Navigate the camera to the specified position, asynchronously.
This wraps the underlying engine function of the same name, but homogenizing some of the angular arguments to use radians.
The RA to seek to, in radians
The declination to seek to, in radians
The zoom setting, in degrees
Whether to snap the camera instantly, or pan it
If specified, the roll of the target camera position, in radians
A void promise that resolves when the camera arrives at the target position.
Command the view to show a Place.
The options for the goto command.
Load a tour from a URL and start playing it.
The URL of the tour to load and play.
A promise that resolves when the tour has loaded and started playing.
Load a WTML collection and the imagesets that it contains.
This function triggers a download of the specified URL, which should return
an XML document in the WTML collection format. Any ImageSet
entries in the collection, or Place
entries containing image sets, will
be added to the WWT instance’s list of available imagery. Subsequent calls
to functions like setForegroundImageByName will be able to locate the
new imagesets and display them to the user.
Each unique URL is only requested once. Once a given URL has been successfully loaded, the promise returned by additional calls will resolve immediately. URL uniqueness is tested with simple string equality, so if you really want to load the same URL more than once you could add a fragment specifier.
If the URL is not accessible due to CORS restrictions, the request will automatically be routed through the WWT’s CORS proxying service.
When true, this method will recursively download and unpack the content of all Folders contained in the WTML file.
Load a tour from a URL.
Once the tour has loaded, you can use getActiveTourPlayer to get the tour player controller and the underlying tour document.
The URL of the tour to load and play.
A promise that resolves when the tour has loaded.
"Seek" tour playback to approximately the specified timecode (in seconds).
The tour will start playing back.
This operation is approximate because WWT can only resume playback from the beginning of a "tour stop". So, if the desired timecode is in the middle of such a stop, playback will start there, not at the exact value that was commanded. This can be a little annoying when a slide is long.
If no tour or tour player is active, nothing happens.
Change the colormap settings of a FITS image layer.
Set the opacity with which the foreground imageset is rendered.
The opacity, between 0 (invisible) and 100 (fully opaque).
Change the ImageSetLayer position in the layer stack.
Set up the view to instantaneously display the specified imageset.
This function aspires to provide a one-stop shop for configuring the engine to show one arbitrary imageset. It aims to automatically choose the right, or at least justifiable, values for things like the background imageset, the camera position, and the zoom level.
Because this function makes instantaneous changes, it is not appropriate for interactive use. It is intended to be used as a WWT view is being initialized.
Change the "stretch" settings of a FITS image layer.
Update the data within a tabular data layer.
Generated using TypeDoc
Create a WWT control, attaching it to a DOM element.