Options to apply to the control.
Compared to the underlying library, this class provides a more JavaScript-y API.
Readonly
ctlThe WWTControl
associated with this instance.
Readonly
lmThe LayerManager
associated with this instance.
Readonly
siThe ScriptInterface
associated with this instance.
Readonly
stcThe SpaceTimeController
associated with this instance.
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
Add an imageset directly into the engine's database.
If an imageset with the same URL has already been loaded, this is a no-op.
The imageset to add
Either the input argument, if it was added to the engine's database, or the pre-existing imageset. The pre-existing imageset will have the same URL but might differ in other respects, such as its name.
Apply settings to a FITS image layer.
Apply settings to a tabular data layer.
Capture the current frame as an image.
This function returns a Promise whose resolved value is the image
represented as a Blob
.
Capture a video as a sequence of frames using the given parameters
This function returns a readable stream whose values are the exported frames.
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.
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
Optional
rollRad: numberIf 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 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.
Optional
loadChildFolders: booleanWhen true, this method will recursively download and unpack the content of all Folders contained in the WTML file. @returns: A promise that resolves to an initialized Folder object.
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.
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.
Returns how long moving to a given position will take, in seconds.
This wraps the underlying engine function of the same name, but homogenizing some of the angular arguments to use radians.
The RA of the target position, in radians
The declination of the target position, in radians
The zoom setting, in degrees
Optional
rollRad: numberIf specified, the roll of the target camera position, in radians
The amount of time, in seconds, that moving to the given position would take.
Update the data within a tabular data layer.
Generated using TypeDoc
Create a WWT control, attaching it to a DOM element.