Options
All
  • Public
  • Public/Protected
  • All
Menu

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:

<template>
  <div id="app">
    <WorldWideTelescope wwt-namespace="mywwt"></WorldWideTelescope>
    <p class="coord-overlay">{{ coordText }}</p>
  </div>
</template>

<script lang="ts">
  import { Component } from "vue-property-decorator";
  import { fmtDegLat, fmtHours } from "@wwtelescope/astro";
  import { WWTAwareComponent } from "@wwtelescope/engine-vuex";

  @Component
  export default class App extends WWTAwareComponent {
    get coordText() {
      return `${fmtHours(this.wwtRARad)} ${fmtDegLat(this.wwtDecRad)}`;
    }
  }
</script>

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 own wwtNamespace 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:

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    • Optional options: ThisTypedComponentOptionsWithArrayProps<WWTComponent, object, object, object, never>

    Returns WWTAwareComponent

  • Parameters

    • Optional options: ThisTypedComponentOptionsWithRecordProps<WWTComponent, object, object, object, object>

    Returns WWTAwareComponent

  • Parameters

    • Optional options: ComponentOptions<WWTComponent, DefaultData<WWTComponent>, DefaultMethods<WWTComponent>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>>

    Returns WWTAwareComponent

Properties

Readonly $attrs

$attrs: Record<string, string>

Readonly $children

$children: WWTComponent[]

$createElement

$createElement: CreateElement

Readonly $data

$data: Record<string, any>

$delete

$delete: { (object: object, key: string | number): void; <T>(array: T[], key: number): void }

Type declaration

    • (object: object, key: string | number): void
    • <T>(array: T[], key: number): void
    • Parameters

      • object: object
      • key: string | number

      Returns void

    • Type parameters

      • T

      Parameters

      • array: T[]
      • key: number

      Returns void

Readonly $el

$el: Element

Readonly $isServer

$isServer: boolean

Readonly $listeners

$listeners: Record<string, Function | Function[]>

Readonly $options

$options: ComponentOptions<WWTComponent, DefaultData<WWTComponent>, DefaultMethods<WWTComponent>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>>

Readonly $parent

$parent: WWTComponent

Readonly $props

$props: Record<string, any>

Readonly $refs

$refs: {}

Type declaration

Readonly $root

Readonly $scopedSlots

$scopedSlots: {}

Type declaration

  • [key: string]: NormalizedScopedSlot | undefined

$set

$set: { <T>(object: object, key: string | number, value: T): T; <T>(array: T[], key: number, value: T): T }

Type declaration

    • <T>(object: object, key: string | number, value: T): T
    • <T>(array: T[], key: number, value: T): T
    • Type parameters

      • T

      Parameters

      • object: object
      • key: string | number
      • value: T

      Returns T

    • Type parameters

      • T

      Parameters

      • array: T[]
      • key: number
      • value: T

      Returns T

Readonly $slots

$slots: {}

Type declaration

  • [key: string]: VNode[] | undefined

Readonly $ssrContext

$ssrContext: any

$store

$store: Store<any>

Readonly $vnode

$vnode: VNode

$wwt

$wwt: WWTGlobalState

activeImagesetLayerStates

activeImagesetLayerStates: ImageSetLayerState[]

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.

returns

The layer states

addAnnotation

addAnnotation: (_a: Annotation) => void

Add an Annotation to the view.

Type declaration

    • (_a: Annotation): void
    • Parameters

      • _a: Annotation

      Returns void

addCatalogHipsByName

addCatalogHipsByName: (_o: AddCatalogHipsByNameOptions) => Promise<Imageset>

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.

Type declaration

    • (_o: AddCatalogHipsByNameOptions): Promise<Imageset>
    • Parameters

      • _o: AddCatalogHipsByNameOptions

      Returns Promise<Imageset>

addImageSetLayer

addImageSetLayer: (_o: AddImageSetLayerOptions) => Promise<ImageSetLayer>

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.

Type declaration

    • (_o: AddImageSetLayerOptions): Promise<ImageSetLayer>
    • Parameters

      • _o: AddImageSetLayerOptions

      Returns Promise<ImageSetLayer>

applyFitsLayerSettings

applyFitsLayerSettings: (_o: ApplyFitsLayerSettingsOptions) => void

Alter one or more settings of the specified FITS image layer as specified in the options.

Type declaration

    • (_o: ApplyFitsLayerSettingsOptions): void
    • Parameters

      • _o: ApplyFitsLayerSettingsOptions

      Returns void

applySetting

applySetting: (_s: EngineSetting) => void

Alter one WWT engine setting.

Type declaration

    • (_s: EngineSetting): void
    • Parameters

      • _s: EngineSetting

      Returns void

applyTableLayerSettings

applyTableLayerSettings: (_o: ApplyTableLayerSettingsOptions) => void

Alter one or more settings of the specified tabular data layers as specified in the options.

Type declaration

    • (_o: ApplyTableLayerSettingsOptions): void
    • Parameters

      • _o: ApplyTableLayerSettingsOptions

      Returns void

clearAnnotations

clearAnnotations: () => void

Clear all Annotations from the view.

Type declaration

    • (): void
    • Returns void

createTableLayer

createTableLayer: (_o: CreateTableLayerParams) => Promise<SpreadSheetLayer>

Request the creation of a tabular data layer.

The action resolves to a new SpreadSheetLayer instance.

Type declaration

deleteLayer

deleteLayer: (id: string | Guid) => void

Delete the specified layer from the layer manager.

A layer may be identified by either its name or its id.

Type declaration

    • (id: string | Guid): void
    • Parameters

      • id: string | Guid

      Returns void

findRADecForScreenPoint

findRADecForScreenPoint: (pt: { x: number; y: number }) => { dec: number; ra: number }

Get the right ascension and declination, in degrees, for x, y coordinates on the screen

Type declaration

    • (pt: { x: number; y: number }): { dec: number; ra: number }
    • Parameters

      • pt: { x: number; y: number }
        • x: number
        • y: number

      Returns { dec: number; ra: number }

      • dec: number
      • ra: number

findScreenPointForRADec

findScreenPointForRADec: (pt: { dec: number; ra: number }) => { x: number; y: number }

Given an RA and Dec position, return the x, y coordinates of the screen point

Type declaration

    • (pt: { dec: number; ra: number }): { x: number; y: number }
    • Parameters

      • pt: { dec: number; ra: number }
        • dec: number
        • ra: number

      Returns { x: number; y: number }

      • x: number
      • y: number

getCatalogHipsDataInView

getCatalogHipsDataInView: (o: GetCatalogHipsDataInViewOptions) => Promise<InViewReturnMessage>

Request an export of the catalog HiPS data within the current viewport.

Type declaration

    • (o: GetCatalogHipsDataInViewOptions): Promise<InViewReturnMessage>
    • Parameters

      • o: GetCatalogHipsDataInViewOptions

      Returns Promise<InViewReturnMessage>

gotoRADecZoom

gotoRADecZoom: (_o: GotoRADecZoomParams) => Promise<void>

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!

Type declaration

gotoTarget

gotoTarget: (o: GotoTargetOptions) => Promise<void>

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.

Type declaration

    • (o: GotoTargetOptions): Promise<void>
    • Parameters

      • o: GotoTargetOptions

      Returns Promise<void>

imagesetForLayer

imagesetForLayer: (guidtext: string) => null | Imageset

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.

param

The GUID of the layer to query, as a string

returns

The layer's underlying imageset, or null if the GUID is unrecognized

Type declaration

    • (guidtext: string): null | Imageset
    • Parameters

      • guidtext: string

      Returns null | Imageset

imagesetStateForLayer

imagesetStateForLayer: (guidtext: string) => null | ImageSetLayerState

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.

param

The GUID of the layer to query, as a string

returns

The layer state, or null if the GUID is unrecognized

Type declaration

layerForHipsCatalog

layerForHipsCatalog: (name: string) => null | SpreadSheetLayer

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.

param

The datasetName of the HiPS catalog

Type declaration

    • (name: string): null | SpreadSheetLayer
    • Parameters

      • name: string

      Returns null | SpreadSheetLayer

loadFitsLayer

loadFitsLayer: (_o: LoadFitsLayerOptions) => Promise<ImageSetLayer>

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.

Type declaration

    • (_o: LoadFitsLayerOptions): Promise<ImageSetLayer>
    • Parameters

      • _o: LoadFitsLayerOptions

      Returns Promise<ImageSetLayer>

loadImageCollection

loadImageCollection: (_o: LoadImageCollectionParams) => Promise<Folder>

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.

Type declaration

loadTour

loadTour: (o: LoadTourParams) => Promise<void>

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.

Type declaration

lookupImageset

lookupImageset: (_n: string) => null | Imageset

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.

Type declaration

    • (_n: string): null | Imageset
    • Parameters

      • _n: string

      Returns null | Imageset

move

move: (args: { x: number; y: number }) => void

Moves the position of the view

Type declaration

    • (args: { x: number; y: number }): void
    • Parameters

      • args: { x: number; y: number }
        • x: number
        • y: number

      Returns void

removeAnnotation

removeAnnotation: (_a: Annotation) => void

Remove the specified Annotation from the view.

Type declaration

    • (_a: Annotation): void
    • Parameters

      • _a: Annotation

      Returns void

removeCatalogHipsByName

removeCatalogHipsByName: (name: string) => void

Remove a "catalog HiPS" dataset to the current view, by name.

Type declaration

    • (name: string): void
    • Parameters

      • name: string

      Returns void

seekToTourTimecode

seekToTourTimecode: (value: number) => void

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.

Type declaration

    • (value: number): void
    • Parameters

      • value: number

      Returns void

setBackgroundImageByName

setBackgroundImageByName: (_n: string) => void

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.

Type declaration

    • (_n: string): void
    • Parameters

      • _n: string

      Returns void

setClockRate

setClockRate: (_r: number) => void

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.

Type declaration

    • (_r: number): void
    • Parameters

      • _r: number

      Returns void

setClockSync

setClockSync: (_s: boolean) => void

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.

Type declaration

    • (_s: boolean): void
    • Parameters

      • _s: boolean

      Returns void

setFitsLayerColormap

setFitsLayerColormap: (_o: SetFitsLayerColormapOptions) => void

Set the colormap used for a FITS image layer according to the options.

Type declaration

    • (_o: SetFitsLayerColormapOptions): void
    • Parameters

      • _o: SetFitsLayerColormapOptions

      Returns void

setForegroundImageByName

setForegroundImageByName: (_n: string) => void

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.

Type declaration

    • (_n: string): void
    • Parameters

      • _n: string

      Returns void

setForegroundOpacity

setForegroundOpacity: (o: number) => void

Set the opacity of the foreground imageset.

Valid values are between 0 (invisible) and 100 (fully opaque).

Type declaration

    • (o: number): void
    • Parameters

      • o: number

      Returns void

setImageSetLayerOrder

setImageSetLayerOrder: (_o: SetLayerOrderOptions) => void

Change the ImageSetLayer position in the draw cycle.

Type declaration

    • (_o: SetLayerOrderOptions): void
    • Parameters

      • _o: SetLayerOrderOptions

      Returns void

setTime

setTime: (d: Date) => void

Set the current time of WWT's internal clock.

Altering this causes an increment in wwtClockDiscontinuities.

Type declaration

    • (d: Date): void
    • Parameters

      • d: Date

      Returns void

setTourPlayerLeaveSettingsWhenStopped

setTourPlayerLeaveSettingsWhenStopped: (v: boolean) => void

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.

Type declaration

    • (v: boolean): void
    • Parameters

      • v: boolean

      Returns void

setTrackedObject

setTrackedObject: (o: SolarSystemObjects) => void

Set the "tracked object" in the 3D solar system view.

Allowed values are defined in @wwtelescope/engine-types.

Type declaration

    • (o: SolarSystemObjects): void
    • Parameters

      • o: SolarSystemObjects

      Returns void

setupForImageset

setupForImageset: (o: SetupForImagesetOptions) => void

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.

Type declaration

spreadSheetLayer

spreadSheetLayer: (catalog: CatalogLayerInfo) => null | SpreadSheetLayer

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.

param

The table layer's identifier.

Type declaration

spreadSheetLayerById

spreadSheetLayerById: (id: string) => null | SpreadSheetLayer

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.

param

The table layer's identifier.

Type declaration

    • (id: string): null | SpreadSheetLayer
    • Parameters

      • id: string

      Returns null | SpreadSheetLayer

spreadsheetState

spreadsheetState: (catalog: CatalogLayerInfo) => null | SpreadSheetLayerSettingsInterfaceRO

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.

param

A CatalogLayerInfo object corresponding to the layer.

Type declaration

    • Parameters

      Returns null | SpreadSheetLayerSettingsInterfaceRO

spreadsheetStateById

spreadsheetStateById: (id: string) => null | SpreadSheetLayerSettingsInterfaceRO

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.

param

The identifier of the table layer.

Type declaration

    • (id: string): null | SpreadSheetLayerSettingsInterfaceRO
    • Parameters

      • id: string

      Returns null | SpreadSheetLayerSettingsInterfaceRO

spreadsheetStateForHipsCatalog

spreadsheetStateForHipsCatalog: (name: string) => null | SpreadSheetLayerSettingsInterfaceRO

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.

param

The datasetName of the HiPS catalog

Type declaration

    • (name: string): null | SpreadSheetLayerSettingsInterfaceRO
    • Parameters

      • name: string

      Returns null | SpreadSheetLayerSettingsInterfaceRO

startTour

startTour: () => void

Start playback of the currently loaded tour.

Nothing hppanes if no tour is loaded.

Type declaration

    • (): void
    • Returns void

stretchFitsLayer

stretchFitsLayer: (o: StretchFitsLayerOptions) => void

Alter the "stretch" of a FITS image layer according to the options.

Type declaration

    • (o: StretchFitsLayerOptions): void
    • Parameters

      • o: StretchFitsLayerOptions

      Returns void

tilt

tilt: (args: { x: number; y: number }) => void

Tilts the position of the view

Type declaration

    • (args: { x: number; y: number }): void
    • Parameters

      • args: { x: number; y: number }
        • x: number
        • y: number

      Returns void

toggleTourPlayPauseState

toggleTourPlayPauseState: () => void

Toggle the play/pause state of the current tour.

Nothing happens if no tour is loaded.

Type declaration

    • (): void
    • Returns void

updateTableLayer

updateTableLayer: (o: UpdateTableLayerOptions) => void

Update the contents of a tabular data layer according to the options.

Type declaration

    • (o: UpdateTableLayerOptions): void
    • Parameters

      • o: UpdateTableLayerOptions

      Returns void

viewAsTourXml

viewAsTourXml: () => Promise<null | string>

Type declaration

    • (): Promise<null | string>
    • Returns Promise<null | string>

waitForReady

waitForReady: () => Promise<void>

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.

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

wwtActiveLayers

wwtActiveLayers: string[]

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.

wwtAvailableImagesets

wwtAvailableImagesets: ImagesetInfo[]

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.

wwtBackgroundImageset

wwtBackgroundImageset: null | Imageset

The current background Imageset, or null if it is undefined.

You can cause this state variable to change using the setBackgroundImageByName mutation.

wwtClockDiscontinuities

wwtClockDiscontinuities: number

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.

wwtClockRate

wwtClockRate: number

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.

wwtCurrentTime

wwtCurrentTime: Date

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.

wwtDecRad

wwtDecRad: number

The current declination of the center of the WWT view, in radians.

TODO: define the meaning here for view modes other than "sky."

wwtForegroundImageset

wwtForegroundImageset: null | Imageset

The current foreground Imageset, or null if it is undefined.

You can cause this state variable to change using the setForegroundImageByName mutation.

wwtForegroundOpacity

wwtForegroundOpacity: number

The opacity of the foreground imageset. Values range between 0 (invisible) and 100 (fully opaque).

wwtImagesetLayers

wwtImagesetLayers: {}

A table of activated imageset layers.

Use imagesetStateForLayer to access information about a particular layer.

Type declaration

wwtIsTourPlayerActive

wwtIsTourPlayerActive: boolean

Whether a tour has been loaded up and is available for playback.

wwtIsTourPlaying

wwtIsTourPlaying: boolean

Whether a tour is actively playing back right now. This can spontaneously become false if the tour completes playing.

Readonly wwtNamespace

wwtNamespace: string

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.

wwtRARad

wwtRARad: number

The current right ascension of the center of the WWT view, in radians.

TODO: define the meaning here for view modes other than "sky."

wwtRenderType

wwtRenderType: ImageSetType

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.

wwtRollRad

wwtRollRad: number

The current roll of the view camera, in radians

wwtShowWebGl2Warning

wwtShowWebGl2Warning: boolean

wwtSpreadSheetLayers

wwtSpreadSheetLayers: {}

A table of activated imageset layers.

Use imagesetStateForLayer to access information about a particular layer.

Type declaration

  • [guidtext: string]: SpreadSheetLayerState

wwtTourCompletions

wwtTourCompletions: number

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.

wwtTourRunTime

wwtTourRunTime: null | number

The total runtime of the current tour, in seconds, if there is one.

wwtTourStopStartTimes

wwtTourStopStartTimes: number[]

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.

wwtTourTimecode

wwtTourTimecode: number

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.

wwtZoomDeg

wwtZoomDeg: number

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.

zoom

zoom: (f: number) => void

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.

Type declaration

    • (f: number): void
    • Parameters

      • f: number

      Returns void

Static $wwt

$wwt: WWTGlobalState

Static config

config: VueConfiguration

Static util

util: { warn: any }

Type declaration

  • warn: function
    • warn(msg: string, vm?: CombinedVueInstance<WWTComponent, object, object, object, Record<never, any>>): void
    • Parameters

      • msg: string
      • Optional vm: CombinedVueInstance<WWTComponent, object, object, object, Record<never, any>>

      Returns void

Static version

version: string

Methods

$destroy

  • $destroy(): void
  • Returns void

$emit

  • Parameters

    • event: string
    • Rest ...args: any[]

    Returns WWTAwareComponent

$forceUpdate

  • $forceUpdate(): void
  • Returns void

$mount

  • $mount(elementOrSelector?: string | Element, hydrating?: boolean): WWTAwareComponent
  • Parameters

    • Optional elementOrSelector: string | Element
    • Optional hydrating: boolean

    Returns WWTAwareComponent

$nextTick

  • $nextTick(callback: () => void): void
  • $nextTick(): Promise<void>
  • Parameters

    • callback: () => void
        • (): void
        • Returns void

    Returns void

  • Returns Promise<void>

$off

  • Parameters

    • Optional event: string | string[]
    • Optional callback: Function

    Returns WWTAwareComponent

$on

  • Parameters

    • event: string | string[]
    • callback: Function

    Returns WWTAwareComponent

$once

  • Parameters

    • event: string | string[]
    • callback: Function

    Returns WWTAwareComponent

$watch

  • $watch(expOrFn: string, callback: (n: any, o: any) => void, options?: WatchOptions): () => void
  • $watch<T>(expOrFn: () => T, callback: (n: T, o: T) => void, options?: WatchOptions): () => void
  • Parameters

    • expOrFn: string
    • callback: (n: any, o: any) => void
        • (n: any, o: any): void
        • Parameters

          • n: any
          • o: any

          Returns void

    • Optional options: WatchOptions

    Returns () => void

      • (): void
      • Returns void

  • Type parameters

    • T

    Parameters

    • expOrFn: () => T
        • (): T
        • Returns T

    • callback: (n: T, o: T) => void
        • (n: T, o: T): void
        • Parameters

          • n: T
          • o: T

          Returns void

    • Optional options: WatchOptions

    Returns () => void

      • (): void
      • Returns void

beforeCreate

  • beforeCreate(): void

Static compile

  • compile(template: string): { staticRenderFns: (() => VNode)[]; render: any }
  • Parameters

    • template: string

    Returns { staticRenderFns: (() => VNode)[]; render: any }

    • staticRenderFns: (() => VNode)[]
    • render: function
      • render(createElement: any): VNode
      • Parameters

        • createElement: any

        Returns VNode

Static component

  • component(id: string): VueConstructor<WWTComponent>
  • component<VC>(id: string, constructor: VC): VC
  • component<Data, Methods, Computed, Props>(id: string, definition: AsyncComponent<Data, Methods, Computed, Props>): ExtendedVue<WWTComponent, Data, Methods, Computed, Props>
  • component<Data, Methods, Computed, PropNames>(id: string, definition?: ThisTypedComponentOptionsWithArrayProps<WWTComponent, Data, Methods, Computed, PropNames>): ExtendedVue<WWTComponent, Data, Methods, Computed, Record<PropNames, any>>
  • component<Data, Methods, Computed, Props>(id: string, definition?: ThisTypedComponentOptionsWithRecordProps<WWTComponent, Data, Methods, Computed, Props>): ExtendedVue<WWTComponent, Data, Methods, Computed, Props>
  • component<PropNames>(id: string, definition: FunctionalComponentOptions<Record<PropNames, any>, PropNames[]>): ExtendedVue<WWTComponent, {}, {}, {}, Record<PropNames, any>>
  • component<Props>(id: string, definition: FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>): ExtendedVue<WWTComponent, {}, {}, {}, Props>
  • component(id: string, definition?: ComponentOptions<WWTComponent, DefaultData<WWTComponent>, DefaultMethods<WWTComponent>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>>): ExtendedVue<WWTComponent, {}, {}, {}, {}>
  • Parameters

    • id: string

    Returns VueConstructor<WWTComponent>

  • Type parameters

    Parameters

    • id: string
    • constructor: VC

    Returns VC

  • Type parameters

    • Data

    • Methods

    • Computed

    • Props

    Parameters

    • id: string
    • definition: AsyncComponent<Data, Methods, Computed, Props>

    Returns ExtendedVue<WWTComponent, Data, Methods, Computed, Props>

  • Type parameters

    • Data

    • Methods

    • Computed

    • PropNames: string = never

    Parameters

    • id: string
    • Optional definition: ThisTypedComponentOptionsWithArrayProps<WWTComponent, Data, Methods, Computed, PropNames>

    Returns ExtendedVue<WWTComponent, Data, Methods, Computed, Record<PropNames, any>>

  • Type parameters

    • Data

    • Methods

    • Computed

    • Props

    Parameters

    • id: string
    • Optional definition: ThisTypedComponentOptionsWithRecordProps<WWTComponent, Data, Methods, Computed, Props>

    Returns ExtendedVue<WWTComponent, Data, Methods, Computed, Props>

  • Type parameters

    • PropNames: string

    Parameters

    • id: string
    • definition: FunctionalComponentOptions<Record<PropNames, any>, PropNames[]>

    Returns ExtendedVue<WWTComponent, {}, {}, {}, Record<PropNames, any>>

  • Type parameters

    • Props

    Parameters

    • id: string
    • definition: FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>

    Returns ExtendedVue<WWTComponent, {}, {}, {}, Props>

  • Parameters

    • id: string
    • Optional definition: ComponentOptions<WWTComponent, DefaultData<WWTComponent>, DefaultMethods<WWTComponent>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>>

    Returns ExtendedVue<WWTComponent, {}, {}, {}, {}>

Static delete

  • delete(object: object, key: string | number): void
  • delete<T>(array: T[], key: number): void
  • Parameters

    • object: object
    • key: string | number

    Returns void

  • Type parameters

    • T

    Parameters

    • array: T[]
    • key: number

    Returns void

Static directive

  • directive(id: string, definition?: DirectiveOptions | DirectiveFunction): DirectiveOptions
  • Parameters

    • id: string
    • Optional definition: DirectiveOptions | DirectiveFunction

    Returns DirectiveOptions

Static extend

  • extend<Data, Methods, Computed, PropNames>(options?: ThisTypedComponentOptionsWithArrayProps<WWTComponent, Data, Methods, Computed, PropNames>): ExtendedVue<WWTComponent, Data, Methods, Computed, Record<PropNames, any>>
  • extend<Data, Methods, Computed, Props>(options?: ThisTypedComponentOptionsWithRecordProps<WWTComponent, Data, Methods, Computed, Props>): ExtendedVue<WWTComponent, Data, Methods, Computed, Props>
  • extend<PropNames>(definition: FunctionalComponentOptions<Record<PropNames, any>, PropNames[]>): ExtendedVue<WWTComponent, {}, {}, {}, Record<PropNames, any>>
  • extend<Props>(definition: FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>): ExtendedVue<WWTComponent, {}, {}, {}, Props>
  • extend(options?: ComponentOptions<WWTComponent, DefaultData<WWTComponent>, DefaultMethods<WWTComponent>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>>): ExtendedVue<WWTComponent, {}, {}, {}, {}>
  • Type parameters

    • Data

    • Methods

    • Computed

    • PropNames: string = never

    Parameters

    • Optional options: ThisTypedComponentOptionsWithArrayProps<WWTComponent, Data, Methods, Computed, PropNames>

    Returns ExtendedVue<WWTComponent, Data, Methods, Computed, Record<PropNames, any>>

  • Type parameters

    • Data

    • Methods

    • Computed

    • Props

    Parameters

    • Optional options: ThisTypedComponentOptionsWithRecordProps<WWTComponent, Data, Methods, Computed, Props>

    Returns ExtendedVue<WWTComponent, Data, Methods, Computed, Props>

  • Type parameters

    • PropNames: string = never

    Parameters

    • definition: FunctionalComponentOptions<Record<PropNames, any>, PropNames[]>

    Returns ExtendedVue<WWTComponent, {}, {}, {}, Record<PropNames, any>>

  • Type parameters

    • Props

    Parameters

    • definition: FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>

    Returns ExtendedVue<WWTComponent, {}, {}, {}, Props>

  • Parameters

    • Optional options: ComponentOptions<WWTComponent, DefaultData<WWTComponent>, DefaultMethods<WWTComponent>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<string, any>>

    Returns ExtendedVue<WWTComponent, {}, {}, {}, {}>

Static filter

  • filter(id: string, definition?: Function): Function
  • Parameters

    • id: string
    • Optional definition: Function

    Returns Function

Static mixin

  • Parameters

    Returns VueConstructor<WWTComponent>

Static nextTick

  • nextTick<T>(callback: () => void, context?: T): void
  • nextTick(): Promise<void>
  • Type parameters

    • T

    Parameters

    • callback: () => void
        • (): void
        • Returns void

    • Optional context: T

    Returns void

  • Returns Promise<void>

Static observable

  • observable<T>(obj: T): T
  • Type parameters

    • T

    Parameters

    • obj: T

    Returns T

Static set

  • set<T>(object: object, key: string | number, value: T): T
  • set<T>(array: T[], key: number, value: T): T
  • Type parameters

    • T

    Parameters

    • object: object
    • key: string | number
    • value: T

    Returns T

  • Type parameters

    • T

    Parameters

    • array: T[]
    • key: number
    • value: T

    Returns T

Static use

  • use<T>(plugin: PluginObject<T> | PluginFunction<T>, options?: T): VueConstructor<WWTComponent>
  • use(plugin: PluginObject<any> | PluginFunction<any>, ...options: any[]): VueConstructor<WWTComponent>
  • Type parameters

    • T

    Parameters

    • plugin: PluginObject<T> | PluginFunction<T>
    • Optional options: T

    Returns VueConstructor<WWTComponent>

  • Parameters

    • plugin: PluginObject<any> | PluginFunction<any>
    • Rest ...options: any[]

    Returns VueConstructor<WWTComponent>

Generated using TypeDoc