State of the WWT rendering engine.
The current mode that the renderer is in.
This value tracks the type of the background imageset. It is updated at the beginning of renderOneFrame, not immediately upon alteration of the background image set.
TourEditTab
Special UI state that may be active such as a TourPlayer.
Add a "catalog HiPS" dataset to the current view.
The SpreadSheetLayer of data associated with this special imageset will be added to the LayerManager. The caller must know a priori that the named imageset indeed corresponds to a catalog HiPS dataset.
See also addCatalogHipsByName, addCatalogHipsByNameWithCallback.
Add a "catalog HiPS" dataset to the current view, by name.
The catalog HiPS is loaded from the engine’s listing of recognized imagesets using the getImagesetByName mechanism. The SpreadSheetLayer of data associated with this special imageset will be added to the LayerManager. The caller must know a priori that the named imageset indeed corresponds to a catalog HiPS dataset.
See also addCatalogHips, addCatalogHipsByNameWithCallback.
Add a "catalog HiPS" dataset to the current view, by name, with a callback.
Same as addCatalogHipsByName, with the addition that the onLoad callback will be called once the initial data loading of the catalog HiPS data has completed. See also addCatalogHips.
Capture the current frame as an image.
A callback function to execute on the Blob
representing
the captured image.
The desired image width.
The desired image height.
The desired image format (e.g. "image/jpeg"
)
Capture a video as a sequence of images
A callback function to execute on each Blob
representing
a captured frame.
The desired frame width.
The desired frame height.
The number of frames captured per second.
The total number of frames to capture.
The desired image format (e.g. "image/jpeg"
)
Create a new tour
Get the name of the reference frame associated with the current view.
The current reference frame defines the physical coordinates of the view and the list of layers that are included in the current rendering process. The return value of this function can be indexed into LayerManager.get_allMaps to find the root LayerMap that is used to determine what gets rendered in the current view.
In standard 2D sky mode, the return value will be "Sky"
.
The name of the current reference frame.
Find a "default" imageset for the specified type and bandpass.
This function searches the control’s database of imagery and returns a
"default" imageset for the given settings. First preference is given to an
imageset with matching type
and bandpass
that has a
Imageset.get_defaultSet of true (corresponding to the StockSet
XML
attribute). If no such set exists, the first set with matching type
and
bandpass
is returned, regardless of its defaultSet
setting. If there is
still no such result, the first imageset with the same type
, ignoring
bandpass
, is returned. Finally if all else fails, the first imageset in
the database is returned.
The type of imageset to search.
The bandpass to prefer.
The chosen default imageset.
Look up an imageset by its name.
The name matching is case-insensitive, matches on substrings, and moves through a list of imagesets that may be populated in an unpredictable order. Therefore even if you provide a name that is an exact match for an existing imageset, you might get a different one than you expect.
The name to look up.
An imageset with a matching name, or null if none was found.
Start navigating the view to the specified position.
The target right ascension, in hours.
The target declination, in degrees.
The target zoom level (see below)
Whether to snap the view instantly or move gradually.
Optional
roll_deg: numberOptional, The roll of the camera, in degrees.
If instant
is true or the commanded camera position is extremely close to the
current camera position, the view will update instantly. Otherwise it will
scroll there smoothly, taking an unpredictable amount of time to arrive.
The zoom level is the height of the viewport in degrees, times six.
Navigating the view in this way ends any "tracking" status of the current view.
Start navigating the view to the specified Place.
The destination of the view
If true, the zoom, angle, and rotation of the target camera position will be set to match the current camera position. Otherwise, these parameters will be reset to reasonable defaults.
If true, the view camera will immediately snap to the destination position. Otherwise, it will gradually move.
If true, the camera will continue tracking the view target as it moves with the progression of the WWT internal clock.
Start loading the tour stored at the specified URL.
When loading is complete, a tourReady
event will be issued, which you can
listen for using the ScriptInterface.add_tourReady method. You can
then get access to a TourPlayer by casting the uiController
property of this WWTControl:
if (ctl.uiController !== null && ctl.uiController instanceof TourPlayer) {
const player: TourPlayer = ctl.uiController;
// ...
}
Load the tour stored at the specified URL and start playing it.
When loading is complete, a tourReady
event will be issued, which you can
listen for using the ScriptInterface.add_tourReady method.
See also loadTour, which provides more flexibility to the caller.
Set the background imageset using a name-based lookup.
This function may change the viewer mode (e.g. sky, panorama, 3D solar system, etc.). To avoid display artifacts when switching to a planetary mode, set the foreground imageset to the same value using setForegroundImageByName.
The imageset lookup is done using getImagesetByName. If the imageset is not found, this function silently does nothing.
Set the foreground imageset using a name-based lookup.
The imageset lookup is done using getImagesetByName. If the imageset is not found, this function silently does nothing.
Note that this function does not alter the camera in any way. You will need to use additional API calls if you want to navigate the view to the imageset in question.
Set the maximum allowed user zoom level in 3D ("solar system") mode.
The new zoom limit.
This sets how far the user can zoom out when operating in the 3D mode. XXX: I do not know what units this value is measured in! The default value is 10^16.
Set the minimum allowed user zoom level in 3D ("solar system") mode.
The new zoom limit.
This sets how far the user can zoom in when operating in the 3D mode. XXX: I do not know what units this value is measured in! The default value is 10^-8.
Set the maximum allowed user zoom level in 2D modes.
The new zoom limit.
This sets how far the user can zoom out when operating in a 2D mode such as Sky mode. The zoom number is the angular height of the viewport, measured in degrees, times 6. The default value is 360, corresponding to a viewport height of 60 degrees.
Set the minimum allowed user zoom level in 2D modes.
The new zoom limit.
Note, this limit is not enforced when the user is manually zooming the view in and out. It is only enforced for programmatic moves such a loading a new Place.
This sets how far the user can zoom in when operating in a 2D mode such as Sky mode. The zoom number is the angular height of the viewport, measured in degrees, times 6. The default value corresponds to a viewport height of 47 arcseconds.
Returns how long moving to the given position will take, in seconds.
The target right ascension, in hours.
The target declination, in degrees.
The target zoom level (see below)
Optional
roll_deg: numberOptional, The roll of the camera, in degrees.
Change the zoom of the current view. The change is not necessarily instantaneous, depending on whether the "smooth pan" setting is activated.
The multiplicative factor by which to change the zoom level. A number larger than one causes the field of view to increase, i.e. a zoom out.
Static
addAdd an imageset directly into the engine's database.
If another imageset with the same image URL is already loaded, this is a no-op, and the pre-existing imageset is returned. The difference might matter for future name-based lookups.
Either the input imageset, or the pre-existing imageset in the no-op condition.
Static
getGenerated using TypeDoc
The primary WWT engine state object.
The main state of the WWT rendering engine is stored in a global WWTControl singleton object. As such, this class has APIs relating to nearly every single feature offered by WWT. The ScriptInterface object adds a few additional features, but it primarily delegates its work to this class.
Rendering
UI Plumbing
Basic Camera Controls
Core Datasets
Tours
Other Settings