This is a helper base class for Vue components that wish to interact with a WWTComponent through the Pinia state management system. It is only recommended for using using Vue’s “options API”. If you are instead using the “composition API”, it is recommended to use engineStore directly.

This class doesn’t implement any special functionality itself. All it does is provide a set of state variables and methods that are pre-connected to the WWT Pinia interface. A component inheriting from this class can use whichever ones it needs without having to set up that integration itself. For that reason, the detailed API associated with this class is intentionally undocumented, so that the in-depth documentation can be centralized in one place: see the API summary associated with the engineStore function.

Example

Say that you are creating a simple WWT-powered app with a main App.vue component that includes a WWT sub-component and a readout of the current coordinates of the WWT view center. Your app Vue file might look like this:

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

<script lang="ts">
import { defineComponent } from "vue";
import { fmtDegLat, fmtHours } from "@wwtelescope/astro";
import { WWTAwareComponent } from "@wwtelescope/engine-pinia";

export default App = defineComponent({
extends: WWTAwareComponent, // <== we are extending WWTAwareComponent

computed: {
coordText() {
// We don't have to define `wwtRARad` and `wwtDecRad` ourselves:
return `${fmtHours(this.wwtRARad)} ${fmtDegLat(this.wwtDecRad)}`;
}
}
});
</script>

Because this component extends WWTAwareComponent, it automatically has getters for wwtRARad and wwtDecRad that can be used to set up the coordinate readout easily.

Note that the extends option is not recommended (or easily used) in the Composition API, which is why it is recommended to use engineStore directly instead.

Hierarchy

  • WWTAwareComponent

Properties

Methods

Properties

$: ComponentInternalInstance
$attrs: Data
$data: {}

Type declaration

    $el: any
    $emit: ((event, ...args) => void)

    Type declaration

      • (event, ...args): void
      • Parameters

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

        Returns void

    $forceUpdate: (() => void)

    Type declaration

      • (): void
      • Returns void

    $nextTick: (<T, R>(this, fn?) => Promise<Awaited<R>>)

    Type declaration

      • <T, R>(this, fn?): Promise<Awaited<R>>
      • Type Parameters

        • T = void

        • R = void

        Parameters

        • this: T
        • Optional fn: ((this) => R)
            • (this): R
            • Parameters

              • this: T

              Returns R

        Returns Promise<Awaited<R>>

    $options: ComponentOptionsBase<Readonly<ExtractPropTypes<{
        wwtNamespace: {
            default: string;
            required: false;
            type: StringConstructor;
        };
    }>>, unknown, unknown, {
        activeImagesetLayerStates: (() => ImageSetLayerState[]);
        findRADecForScreenPoint: (() => ((pt) => {
            dec: number;
            ra: number;
        }));
        findScreenPointForRADec: (() => ((pt) => {
            x: number;
            y: number;
        }));
        imagesetForLayer: (() => ((guidtext) => null | Imageset));
        imagesetLayerById: (() => ((id) => null | ImageSetLayer));
        imagesetStateForLayer: (() => ((guidtext) => null | ImageSetLayerState));
        layerById: (() => ((id) => null | Layer));
        layerForHipsCatalog: (() => ((name) => null | SpreadSheetLayer));
        lookupImageset: (() => ((imagesetName) => null | Imageset));
        spreadSheetLayer: (() => ((catalog) => null | SpreadSheetLayer));
        spreadSheetLayerById: (() => ((id) => null | SpreadSheetLayer));
        spreadsheetState: (() => ((catalog) => null | SpreadSheetLayerSettingsInterfaceRO));
        spreadsheetStateById: (() => ((id) => null | SpreadSheetLayerSettingsInterfaceRO));
        spreadsheetStateForHipsCatalog: (() => ((name) => null | SpreadSheetLayerSettingsInterfaceRO));
        wwtActiveLayers: (() => string[]);
        wwtAvailableImagesets: (() => {
            description: string;
            extension: string;
            id: null | string;
            name: string;
            type: ImageSetType;
            url: string;
        }[]);
        wwtBackgroundImageset: (() => null | {
            getHashCode() => number;
            get_altUrl() => string;
            get_bandPass() => BandPass;
            get_baseLevel() => number;
            get_baseTileDegrees() => number;
            get_bottomsUp() => boolean;
            get_centerX() => number;
            get_centerY() => number;
            get_children() => Thumbnail[];
            get_creditsText() => string;
            get_creditsUrl() => string;
            get_dataSetType() => ImageSetType;
            get_defaultSet() => boolean;
            get_demUrl() => string;
            get_elevationModel() => boolean;
            get_extension() => string;
            get_fitsProperties() => FitsProperties;
            get_generic() => boolean;
            get_hipsProperties() => null | HipsProperties;
            get_imageSetID() => number;
            get_isCloudCommunityItem() => boolean;
            get_isFolder() => boolean;
            get_isImage() => boolean;
            get_isTour() => boolean;
            get_levels() => number;
            get_meanRadius() => number;
            get_mercator() => boolean;
            get_name() => string;
            get_offsetX() => number;
            get_offsetY() => number;
            get_projection() => ProjectionType;
            get_quadTreeTileMap() => string;
            get_readOnly() => boolean;
            get_referenceFrame() => string;
            get_rotation() => number;
            get_singleImage() => boolean;
            get_sparse() => boolean;
            get_thumbnailUrl() => string;
            get_url() => string;
            get_wcsImage() => null | WcsImage;
            get_widthFactor() => number;
            set_altUrl(url) => string;
            set_bandPass(bp) => BandPass;
            set_baseLevel(bl) => number;
            set_baseTileDegrees(v) => number;
            set_bottomsUp(bu) => boolean;
            set_centerX(cx) => number;
            set_centerY(cy) => number;
            set_creditsText(ct) => string;
            set_creditsUrl(cu) => string;
            set_dataSetType(st) => ImageSetType;
            set_defaultSet(ds) => boolean;
            set_demUrl(url) => string;
            set_elevationModel(em) => boolean;
            set_extension(ext) => string;
            set_generic(g) => boolean;
            set_imageSetID(id) => number;
            set_levels(levels) => number;
            set_meanRadius(mr) => number;
            set_mercator(m) => boolean;
            set_name(name) => string;
            set_offsetX(ox) => number;
            set_offsetY(oy) => number;
            set_projection(pt) => ProjectionType;
            set_quadTreeTileMap(qttm) => string;
            set_referenceFrame(rf) => string;
            set_rotation(r) => number;
            set_singleImage(si) => boolean;
            set_sparse(s) => boolean;
            set_thumbnailUrl(url) => string;
            set_url(url) => string;
            set_wcsImage(w) => null | WcsImage;
            set_widthFactor(f) => number;
        });
        wwtClockDiscontinuities: (() => number);
        wwtClockRate: (() => number);
        wwtCurrentTime: (() => {
            getVarDate: (() => VarDate);
            [toPrimitive](hint) => string;
            [toPrimitive](hint) => string;
            [toPrimitive](hint) => number;
            [toPrimitive](hint) => string | number;
            getDate() => number;
            getDay() => number;
            getFullYear() => number;
            getHours() => number;
            getMilliseconds() => number;
            getMinutes() => number;
            getMonth() => number;
            getSeconds() => number;
            getTime() => number;
            getTimezoneOffset() => number;
            getUTCDate() => number;
            getUTCDay() => number;
            getUTCFullYear() => number;
            getUTCHours() => number;
            getUTCMilliseconds() => number;
            getUTCMinutes() => number;
            getUTCMonth() => number;
            getUTCSeconds() => number;
            setDate(date) => number;
            setFullYear(year, month?, date?) => number;
            setHours(hours, min?, sec?, ms?) => number;
            setMilliseconds(ms) => number;
            setMinutes(min, sec?, ms?) => number;
            setMonth(month, date?) => number;
            setSeconds(sec, ms?) => number;
            setTime(time) => number;
            setUTCDate(date) => number;
            setUTCFullYear(year, month?, date?) => number;
            setUTCHours(hours, min?, sec?, ms?) => number;
            setUTCMilliseconds(ms) => number;
            setUTCMinutes(min, sec?, ms?) => number;
            setUTCMonth(month, date?) => number;
            setUTCSeconds(sec, ms?) => number;
            toDateString() => string;
            toISOString() => string;
            toJSON(key?) => string;
            toLocaleDateString() => string;
            toLocaleDateString(locales?, options?) => string;
            toLocaleDateString(locales?, options?) => string;
            toLocaleString() => string;
            toLocaleString(locales?, options?) => string;
            toLocaleString(locales?, options?) => string;
            toLocaleTimeString() => string;
            toLocaleTimeString(locales?, options?) => string;
            toLocaleTimeString(locales?, options?) => string;
            toString() => string;
            toTimeString() => string;
            toUTCString() => string;
            valueOf() => number;
        });
        wwtDecRad: (() => number);
        wwtForegroundImageset: (() => null | {
            getHashCode() => number;
            get_altUrl() => string;
            get_bandPass() => BandPass;
            get_baseLevel() => number;
            get_baseTileDegrees() => number;
            get_bottomsUp() => boolean;
            get_centerX() => number;
            get_centerY() => number;
            get_children() => Thumbnail[];
            get_creditsText() => string;
            get_creditsUrl() => string;
            get_dataSetType() => ImageSetType;
            get_defaultSet() => boolean;
            get_demUrl() => string;
            get_elevationModel() => boolean;
            get_extension() => string;
            get_fitsProperties() => FitsProperties;
            get_generic() => boolean;
            get_hipsProperties() => null | HipsProperties;
            get_imageSetID() => number;
            get_isCloudCommunityItem() => boolean;
            get_isFolder() => boolean;
            get_isImage() => boolean;
            get_isTour() => boolean;
            get_levels() => number;
            get_meanRadius() => number;
            get_mercator() => boolean;
            get_name() => string;
            get_offsetX() => number;
            get_offsetY() => number;
            get_projection() => ProjectionType;
            get_quadTreeTileMap() => string;
            get_readOnly() => boolean;
            get_referenceFrame() => string;
            get_rotation() => number;
            get_singleImage() => boolean;
            get_sparse() => boolean;
            get_thumbnailUrl() => string;
            get_url() => string;
            get_wcsImage() => null | WcsImage;
            get_widthFactor() => number;
            set_altUrl(url) => string;
            set_bandPass(bp) => BandPass;
            set_baseLevel(bl) => number;
            set_baseTileDegrees(v) => number;
            set_bottomsUp(bu) => boolean;
            set_centerX(cx) => number;
            set_centerY(cy) => number;
            set_creditsText(ct) => string;
            set_creditsUrl(cu) => string;
            set_dataSetType(st) => ImageSetType;
            set_defaultSet(ds) => boolean;
            set_demUrl(url) => string;
            set_elevationModel(em) => boolean;
            set_extension(ext) => string;
            set_generic(g) => boolean;
            set_imageSetID(id) => number;
            set_levels(levels) => number;
            set_meanRadius(mr) => number;
            set_mercator(m) => boolean;
            set_name(name) => string;
            set_offsetX(ox) => number;
            set_offsetY(oy) => number;
            set_projection(pt) => ProjectionType;
            set_quadTreeTileMap(qttm) => string;
            set_referenceFrame(rf) => string;
            set_rotation(r) => number;
            set_singleImage(si) => boolean;
            set_sparse(s) => boolean;
            set_thumbnailUrl(url) => string;
            set_url(url) => string;
            set_wcsImage(w) => null | WcsImage;
            set_widthFactor(f) => number;
        });
        wwtForegroundOpacity: (() => number);
        wwtImagesetLayers: (() => {
            [guidtext: string]: ImageSetLayerState;
        });
        wwtIsTourPlayerActive: (() => boolean);
        wwtIsTourPlaying: (() => boolean);
        wwtRARad: (() => number);
        wwtRenderType: (() => ImageSetType);
        wwtRollRad: (() => number);
        wwtShowWebGl2Warning: (() => boolean);
        wwtSpreadSheetLayers: (() => {
            [guidtext: string]: SpreadSheetLayerState;
        });
        wwtTourCompletions: (() => number);
        wwtTourRunTime: (() => null | number);
        wwtTourStopStartTimes: (() => number[]);
        wwtTourTimecode: (() => number);
        wwtZoomDeg: (() => number);
    }, {
        addAnnotation(ann) => void;
        addCatalogHipsByName(options) => Promise<Imageset>;
        addImageSetLayer(options) => Promise<ImageSetLayer>;
        addImagesetToRepository(imgset) => Imageset;
        applyFitsLayerSettings(options) => void;
        applySetting(setting) => void;
        applyTableLayerSettings(options) => void;
        captureFrame(options) => Promise<null | Blob>;
        captureVideo(options) => ReadableStream<null | Blob>;
        clearAnnotations() => void;
        clearTileCache() => void;
        closeTourPlayer() => void;
        createTableLayer(options) => Promise<SpreadSheetLayer>;
        deleteLayer(id) => void;
        getCatalogHipsDataInView(options) => Promise<InViewReturnMessage>;
        gotoRADecZoom(__namedParameters) => Promise<void>;
        gotoTarget(options) => Promise<void>;
        loadFitsLayer(options) => Promise<ImageSetLayer>;
        loadImageCollection(__namedParameters) => Promise<Folder>;
        loadTour(__namedParameters) => Promise<void>;
        move(args) => void;
        removeAnnotation(ann) => void;
        removeCatalogHipsByName(name) => void;
        seekToTourTimecode(value) => void;
        setBackgroundImageByName(imagesetName) => void;
        setClockRate(rate) => void;
        setClockSync(isSynced) => void;
        setFitsLayerColormap(options) => void;
        setForegroundImageByName(imagesetName) => void;
        setForegroundOpacity(opacity) => void;
        setImageSetLayerOrder(options) => void;
        setTime(time) => void;
        setTourPlayerLeaveSettingsWhenStopped(value) => void;
        setTrackedObject(obj) => void;
        setupForImageset(options) => void;
        startTour() => void;
        stopTour() => void;
        stretchFitsLayer(options) => void;
        tilt(args) => void;
        timeToRADecZoom(__namedParameters) => number;
        toggleTourPlayPauseState() => void;
        updateTableLayer(options) => void;
        viewAsTourXml(name) => Promise<null | string>;
        waitForReady() => Promise<void>;
        zoom(factor) => void;
    }, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
        wwtNamespace: string;
    }, {}, string, {}> & MergedComponentOptionsOverride
    $parent: null | ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>
    $pinia: Pinia

    Access to the application's Pinia

    $props: Partial<{
        wwtNamespace: string;
    }> & Omit<{
        wwtNamespace: string;
    } & VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly<ExtractPropTypes<{
        wwtNamespace: {
            default: string;
            required: false;
            type: StringConstructor;
        };
    }>>, "wwtNamespace">
    $refs: Data
    $root: null | ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>
    $slots: Readonly<InternalSlots>
    _pStores?: Record<string, StoreGeneric>

    Cache of stores instantiated by the current instance. Used by devtools to list currently used stores. Used internally by Pinia.

    activeImagesetLayerStates: ImageSetLayerState[]
    findRADecForScreenPoint: ((pt) => {
        dec: number;
        ra: number;
    })

    Type declaration

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

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

        Returns {
            dec: number;
            ra: number;
        }

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

    Type declaration

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

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

        Returns {
            x: number;
            y: number;
        }

        • x: number
        • y: number
    imagesetForLayer: ((guidtext) => null | Imageset)

    Type declaration

      • (guidtext): null | Imageset
      • Parameters

        • guidtext: string

        Returns null | Imageset

    imagesetLayerById: ((id) => null | ImageSetLayer)

    Type declaration

      • (id): null | ImageSetLayer
      • Parameters

        • id: string

        Returns null | ImageSetLayer

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

    Type declaration

    layerById: ((id) => null | Layer)

    Type declaration

      • (id): null | Layer
      • Parameters

        • id: string

        Returns null | Layer

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

    Type declaration

      • (name): null | SpreadSheetLayer
      • Parameters

        • name: string

        Returns null | SpreadSheetLayer

    lookupImageset: ((imagesetName) => null | Imageset)

    Type declaration

      • (imagesetName): null | Imageset
      • Parameters

        • imagesetName: string

        Returns null | Imageset

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

    Type declaration

      • (catalog): null | SpreadSheetLayer
      • Parameters

        Returns null | SpreadSheetLayer

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

    Type declaration

      • (id): null | SpreadSheetLayer
      • Parameters

        • id: string

        Returns null | SpreadSheetLayer

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

    Type declaration

      • (catalog): null | SpreadSheetLayerSettingsInterfaceRO
      • Parameters

        Returns null | SpreadSheetLayerSettingsInterfaceRO

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

    Type declaration

      • (id): null | SpreadSheetLayerSettingsInterfaceRO
      • Parameters

        • id: string

        Returns null | SpreadSheetLayerSettingsInterfaceRO

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

    Type declaration

      • (name): null | SpreadSheetLayerSettingsInterfaceRO
      • Parameters

        • name: string

        Returns null | SpreadSheetLayerSettingsInterfaceRO

    wwtActiveLayers: string[] = 'activeLayers'
    wwtAvailableImagesets: {
        description: string;
        extension: string;
        id: null | string;
        name: string;
        type: ImageSetType;
        url: string;
    }[] = 'availableImagesets'

    Type declaration

    • description: string

      An (application-specific) string giving some additional information about the imageset.

    • extension: string

      The image filename extension(s) associated with this imageset.

      May include multiple extensions separated by spaces. May also start with a leading period.

    • id: null | string

      The internal GUID of the layer, if it is a HiPS layer

    • name: string

      The user-facing name of the imageset.

    • type: ImageSetType

      The type of the imageset: panorama, sky, ...

    • url: string

      The URL of the image data.

    wwtBackgroundImageset: null | {
        getHashCode() => number;
        get_altUrl() => string;
        get_bandPass() => BandPass;
        get_baseLevel() => number;
        get_baseTileDegrees() => number;
        get_bottomsUp() => boolean;
        get_centerX() => number;
        get_centerY() => number;
        get_children() => Thumbnail[];
        get_creditsText() => string;
        get_creditsUrl() => string;
        get_dataSetType() => ImageSetType;
        get_defaultSet() => boolean;
        get_demUrl() => string;
        get_elevationModel() => boolean;
        get_extension() => string;
        get_fitsProperties() => FitsProperties;
        get_generic() => boolean;
        get_hipsProperties() => null | HipsProperties;
        get_imageSetID() => number;
        get_isCloudCommunityItem() => boolean;
        get_isFolder() => boolean;
        get_isImage() => boolean;
        get_isTour() => boolean;
        get_levels() => number;
        get_meanRadius() => number;
        get_mercator() => boolean;
        get_name() => string;
        get_offsetX() => number;
        get_offsetY() => number;
        get_projection() => ProjectionType;
        get_quadTreeTileMap() => string;
        get_readOnly() => boolean;
        get_referenceFrame() => string;
        get_rotation() => number;
        get_singleImage() => boolean;
        get_sparse() => boolean;
        get_thumbnailUrl() => string;
        get_url() => string;
        get_wcsImage() => null | WcsImage;
        get_widthFactor() => number;
        set_altUrl(url) => string;
        set_bandPass(bp) => BandPass;
        set_baseLevel(bl) => number;
        set_baseTileDegrees(v) => number;
        set_bottomsUp(bu) => boolean;
        set_centerX(cx) => number;
        set_centerY(cy) => number;
        set_creditsText(ct) => string;
        set_creditsUrl(cu) => string;
        set_dataSetType(st) => ImageSetType;
        set_defaultSet(ds) => boolean;
        set_demUrl(url) => string;
        set_elevationModel(em) => boolean;
        set_extension(ext) => string;
        set_generic(g) => boolean;
        set_imageSetID(id) => number;
        set_levels(levels) => number;
        set_meanRadius(mr) => number;
        set_mercator(m) => boolean;
        set_name(name) => string;
        set_offsetX(ox) => number;
        set_offsetY(oy) => number;
        set_projection(pt) => ProjectionType;
        set_quadTreeTileMap(qttm) => string;
        set_referenceFrame(rf) => string;
        set_rotation(r) => number;
        set_singleImage(si) => boolean;
        set_sparse(s) => boolean;
        set_thumbnailUrl(url) => string;
        set_url(url) => string;
        set_wcsImage(w) => null | WcsImage;
        set_widthFactor(f) => number;
    } = 'backgroundImageset'

    Type declaration

    wwtClockDiscontinuities: number = 'clockDiscontinuities'
    wwtClockRate: number = 'clockRate'
    wwtCurrentTime: {
        getVarDate: (() => VarDate);
        [toPrimitive](hint) => string;
        [toPrimitive](hint) => string;
        [toPrimitive](hint) => number;
        [toPrimitive](hint) => string | number;
        getDate() => number;
        getDay() => number;
        getFullYear() => number;
        getHours() => number;
        getMilliseconds() => number;
        getMinutes() => number;
        getMonth() => number;
        getSeconds() => number;
        getTime() => number;
        getTimezoneOffset() => number;
        getUTCDate() => number;
        getUTCDay() => number;
        getUTCFullYear() => number;
        getUTCHours() => number;
        getUTCMilliseconds() => number;
        getUTCMinutes() => number;
        getUTCMonth() => number;
        getUTCSeconds() => number;
        setDate(date) => number;
        setFullYear(year, month?, date?) => number;
        setHours(hours, min?, sec?, ms?) => number;
        setMilliseconds(ms) => number;
        setMinutes(min, sec?, ms?) => number;
        setMonth(month, date?) => number;
        setSeconds(sec, ms?) => number;
        setTime(time) => number;
        setUTCDate(date) => number;
        setUTCFullYear(year, month?, date?) => number;
        setUTCHours(hours, min?, sec?, ms?) => number;
        setUTCMilliseconds(ms) => number;
        setUTCMinutes(min, sec?, ms?) => number;
        setUTCMonth(month, date?) => number;
        setUTCSeconds(sec, ms?) => number;
        toDateString() => string;
        toISOString() => string;
        toJSON(key?) => string;
        toLocaleDateString() => string;
        toLocaleDateString(locales?, options?) => string;
        toLocaleDateString(locales?, options?) => string;
        toLocaleString() => string;
        toLocaleString(locales?, options?) => string;
        toLocaleString(locales?, options?) => string;
        toLocaleTimeString() => string;
        toLocaleTimeString(locales?, options?) => string;
        toLocaleTimeString(locales?, options?) => string;
        toString() => string;
        toTimeString() => string;
        toUTCString() => string;
        valueOf() => number;
    } = 'currentTime'

    Type declaration

    • getVarDate: (() => VarDate)
        • (): VarDate
        • Returns VarDate

    • [toPrimitive]:function
      • Converts a Date object to a string.

        Parameters

        • hint: "default"

        Returns string

      • Converts a Date object to a string.

        Parameters

        • hint: "string"

        Returns string

      • Converts a Date object to a number.

        Parameters

        • hint: "number"

        Returns number

      • Converts a Date object to a string or number.

        Parameters

        • hint: string

          The strings "number", "string", or "default" to specify what primitive to return.

        Returns string | number

        A number if 'hint' was "number", a string if 'hint' was "string" or "default".

        Throws

        If 'hint' was given something other than "number", "string", or "default".

    • getDate:function
      • Gets the day-of-the-month, using local time.

        Returns number

    • getDay:function
      • Gets the day of the week, using local time.

        Returns number

    • getFullYear:function
      • Gets the year, using local time.

        Returns number

    • getHours:function
      • Gets the hours in a date, using local time.

        Returns number

    • getMilliseconds:function
      • Gets the milliseconds of a Date, using local time.

        Returns number

    • getMinutes:function
      • Gets the minutes of a Date object, using local time.

        Returns number

    • getMonth:function
      • Gets the month, using local time.

        Returns number

    • getSeconds:function
      • Gets the seconds of a Date object, using local time.

        Returns number

    • getTime:function
      • Gets the time value in milliseconds.

        Returns number

    • getTimezoneOffset:function
      • Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC).

        Returns number

    • getUTCDate:function
      • Gets the day-of-the-month, using Universal Coordinated Time (UTC).

        Returns number

    • getUTCDay:function
      • Gets the day of the week using Universal Coordinated Time (UTC).

        Returns number

    • getUTCFullYear:function
      • Gets the year using Universal Coordinated Time (UTC).

        Returns number

    • getUTCHours:function
      • Gets the hours value in a Date object using Universal Coordinated Time (UTC).

        Returns number

    • getUTCMilliseconds:function
      • Gets the milliseconds of a Date object using Universal Coordinated Time (UTC).

        Returns number

    • getUTCMinutes:function
      • Gets the minutes of a Date object using Universal Coordinated Time (UTC).

        Returns number

    • getUTCMonth:function
      • Gets the month of a Date object using Universal Coordinated Time (UTC).

        Returns number

    • getUTCSeconds:function
      • Gets the seconds of a Date object using Universal Coordinated Time (UTC).

        Returns number

    • setDate:function
      • Sets the numeric day-of-the-month value of the Date object using local time.

        Parameters

        • date: number

          A numeric value equal to the day of the month.

        Returns number

    • setFullYear:function
      • Sets the year of the Date object using local time.

        Parameters

        • year: number

          A numeric value for the year.

        • Optional month: number

          A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.

        • Optional date: number

          A numeric value equal for the day of the month.

        Returns number

    • setHours:function
      • Sets the hour value in the Date object using local time.

        Parameters

        • hours: number

          A numeric value equal to the hours value.

        • Optional min: number

          A numeric value equal to the minutes value.

        • Optional sec: number

          A numeric value equal to the seconds value.

        • Optional ms: number

          A numeric value equal to the milliseconds value.

        Returns number

    • setMilliseconds:function
      • Sets the milliseconds value in the Date object using local time.

        Parameters

        • ms: number

          A numeric value equal to the millisecond value.

        Returns number

    • setMinutes:function
      • Sets the minutes value in the Date object using local time.

        Parameters

        • min: number

          A numeric value equal to the minutes value.

        • Optional sec: number

          A numeric value equal to the seconds value.

        • Optional ms: number

          A numeric value equal to the milliseconds value.

        Returns number

    • setMonth:function
      • Sets the month value in the Date object using local time.

        Parameters

        • month: number

          A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.

        • Optional date: number

          A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.

        Returns number

    • setSeconds:function
      • Sets the seconds value in the Date object using local time.

        Parameters

        • sec: number

          A numeric value equal to the seconds value.

        • Optional ms: number

          A numeric value equal to the milliseconds value.

        Returns number

    • setTime:function
      • Sets the date and time value in the Date object.

        Parameters

        • time: number

          A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.

        Returns number

    • setUTCDate:function
      • Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).

        Parameters

        • date: number

          A numeric value equal to the day of the month.

        Returns number

    • setUTCFullYear:function
      • Sets the year value in the Date object using Universal Coordinated Time (UTC).

        Parameters

        • year: number

          A numeric value equal to the year.

        • Optional month: number

          A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.

        • Optional date: number

          A numeric value equal to the day of the month.

        Returns number

    • setUTCHours:function
      • Sets the hours value in the Date object using Universal Coordinated Time (UTC).

        Parameters

        • hours: number

          A numeric value equal to the hours value.

        • Optional min: number

          A numeric value equal to the minutes value.

        • Optional sec: number

          A numeric value equal to the seconds value.

        • Optional ms: number

          A numeric value equal to the milliseconds value.

        Returns number

    • setUTCMilliseconds:function
      • Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).

        Parameters

        • ms: number

          A numeric value equal to the millisecond value.

        Returns number

    • setUTCMinutes:function
      • Sets the minutes value in the Date object using Universal Coordinated Time (UTC).

        Parameters

        • min: number

          A numeric value equal to the minutes value.

        • Optional sec: number

          A numeric value equal to the seconds value.

        • Optional ms: number

          A numeric value equal to the milliseconds value.

        Returns number

    • setUTCMonth:function
      • Sets the month value in the Date object using Universal Coordinated Time (UTC).

        Parameters

        • month: number

          A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.

        • Optional date: number

          A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.

        Returns number

    • setUTCSeconds:function
      • Sets the seconds value in the Date object using Universal Coordinated Time (UTC).

        Parameters

        • sec: number

          A numeric value equal to the seconds value.

        • Optional ms: number

          A numeric value equal to the milliseconds value.

        Returns number

    • toDateString:function
      • Returns a date as a string value.

        Returns string

    • toISOString:function
      • Returns a date as a string value in ISO format.

        Returns string

    • toJSON:function
      • Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization.

        Parameters

        • Optional key: any

        Returns string

    • toLocaleDateString:function
      • Returns a date as a string value appropriate to the host environment's current locale.

        Returns string

      • Converts a date to a string by using the current or specified locale.

        Parameters

        • Optional locales: string | string[]

          A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

        • Optional options: DateTimeFormatOptions

          An object that contains one or more properties that specify comparison options.

        Returns string

      • Converts a date to a string by using the current or specified locale.

        Parameters

        • Optional locales: LocalesArgument

          A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

        • Optional options: DateTimeFormatOptions

          An object that contains one or more properties that specify comparison options.

        Returns string

    • toLocaleString:function
      • Returns a value as a string value appropriate to the host environment's current locale.

        Returns string

      • Converts a date and time to a string by using the current or specified locale.

        Parameters

        • Optional locales: string | string[]

          A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

        • Optional options: DateTimeFormatOptions

          An object that contains one or more properties that specify comparison options.

        Returns string

      • Converts a date and time to a string by using the current or specified locale.

        Parameters

        • Optional locales: LocalesArgument

          A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

        • Optional options: DateTimeFormatOptions

          An object that contains one or more properties that specify comparison options.

        Returns string

    • toLocaleTimeString:function
      • Returns a time as a string value appropriate to the host environment's current locale.

        Returns string

      • Converts a time to a string by using the current or specified locale.

        Parameters

        • Optional locales: string | string[]

          A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

        • Optional options: DateTimeFormatOptions

          An object that contains one or more properties that specify comparison options.

        Returns string

      • Converts a time to a string by using the current or specified locale.

        Parameters

        • Optional locales: LocalesArgument

          A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

        • Optional options: DateTimeFormatOptions

          An object that contains one or more properties that specify comparison options.

        Returns string

    • toString:function
      • Returns a string representation of a date. The format of the string depends on the locale.

        Returns string

    • toTimeString:function
      • Returns a time as a string value.

        Returns string

    • toUTCString:function
      • Returns a date converted to a string using Universal Coordinated Time (UTC).

        Returns string

    • valueOf:function
      • Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC.

        Returns number

    wwtDecRad: number = 'decRad'
    wwtForegroundImageset: null | {
        getHashCode() => number;
        get_altUrl() => string;
        get_bandPass() => BandPass;
        get_baseLevel() => number;
        get_baseTileDegrees() => number;
        get_bottomsUp() => boolean;
        get_centerX() => number;
        get_centerY() => number;
        get_children() => Thumbnail[];
        get_creditsText() => string;
        get_creditsUrl() => string;
        get_dataSetType() => ImageSetType;
        get_defaultSet() => boolean;
        get_demUrl() => string;
        get_elevationModel() => boolean;
        get_extension() => string;
        get_fitsProperties() => FitsProperties;
        get_generic() => boolean;
        get_hipsProperties() => null | HipsProperties;
        get_imageSetID() => number;
        get_isCloudCommunityItem() => boolean;
        get_isFolder() => boolean;
        get_isImage() => boolean;
        get_isTour() => boolean;
        get_levels() => number;
        get_meanRadius() => number;
        get_mercator() => boolean;
        get_name() => string;
        get_offsetX() => number;
        get_offsetY() => number;
        get_projection() => ProjectionType;
        get_quadTreeTileMap() => string;
        get_readOnly() => boolean;
        get_referenceFrame() => string;
        get_rotation() => number;
        get_singleImage() => boolean;
        get_sparse() => boolean;
        get_thumbnailUrl() => string;
        get_url() => string;
        get_wcsImage() => null | WcsImage;
        get_widthFactor() => number;
        set_altUrl(url) => string;
        set_bandPass(bp) => BandPass;
        set_baseLevel(bl) => number;
        set_baseTileDegrees(v) => number;
        set_bottomsUp(bu) => boolean;
        set_centerX(cx) => number;
        set_centerY(cy) => number;
        set_creditsText(ct) => string;
        set_creditsUrl(cu) => string;
        set_dataSetType(st) => ImageSetType;
        set_defaultSet(ds) => boolean;
        set_demUrl(url) => string;
        set_elevationModel(em) => boolean;
        set_extension(ext) => string;
        set_generic(g) => boolean;
        set_imageSetID(id) => number;
        set_levels(levels) => number;
        set_meanRadius(mr) => number;
        set_mercator(m) => boolean;
        set_name(name) => string;
        set_offsetX(ox) => number;
        set_offsetY(oy) => number;
        set_projection(pt) => ProjectionType;
        set_quadTreeTileMap(qttm) => string;
        set_referenceFrame(rf) => string;
        set_rotation(r) => number;
        set_singleImage(si) => boolean;
        set_sparse(s) => boolean;
        set_thumbnailUrl(url) => string;
        set_url(url) => string;
        set_wcsImage(w) => null | WcsImage;
        set_widthFactor(f) => number;
    } = 'foregroundImageset'

    Type declaration

    wwtForegroundOpacity: number = 'foregroundOpacity'
    wwtImagesetLayers: {
        [guidtext: string]: ImageSetLayerState;
    } = 'imagesetLayers'

    Type declaration

    wwtIsTourPlayerActive: boolean = 'isTourPlayerActive'
    wwtIsTourPlaying: boolean = 'isTourPlaying'
    wwtNamespace: string = ...

    This property is unused. It is retained for API compatibility from the days of Vuex.

    wwtRARad: number = 'raRad'
    wwtRenderType: ImageSetType = 'renderType'
    wwtRollRad: number = 'rollRad'
    wwtShowWebGl2Warning: boolean = 'showWebGl2Warning'
    wwtSpreadSheetLayers: {
        [guidtext: string]: SpreadSheetLayerState;
    } = 'spreadSheetLayers'

    Type declaration

    • [guidtext: string]: SpreadSheetLayerState
    wwtTourCompletions: number = 'tourCompletions'
    wwtTourRunTime: null | number = 'tourRunTime'
    wwtTourStopStartTimes: number[] = 'tourStopStartTimes'
    wwtTourTimecode: number = 'tourTimecode'
    wwtZoomDeg: number = 'zoomDeg'

    Methods

    • Type Parameters

      • T extends string | ((...args) => any)

      Parameters

      • source: T
      • cb: T extends ((...args) => R)
            ? ((...args) => any)
            : ((...args) => any)
      • Optional options: WatchOptions<boolean>

      Returns WatchStopHandle

    • 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.

      Parameters

      • options: AddCatalogHipsByNameOptions

      Returns Promise<Imageset>

    • 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.

      Parameters

      • options: AddImageSetLayerOptions

      Returns Promise<ImageSetLayer>

    • 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.

      This returns the imageset that ultimately resides in the engine's database. It could either be the input argument, if it was newly added, or a pre-existing imageset in the no-op condition.

      Parameters

      • imgset: Imageset

      Returns Imageset

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

      Parameters

      • options: ApplyFitsLayerSettingsOptions

      Returns void

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

      Parameters

      • options: ApplyTableLayerSettingsOptions

      Returns void

    • Capture the current frame as an image Blob with the desired width, height, and format. The first argument is a callback function to execute on the created Blob.

      Parameters

      • options: CaptureFrameOptions

      Returns Promise<null | Blob>

    • Capture a video as a stream of image Blobs with the desired width, height and format. The number of frames per second and total frame count are specified as well.

      Parameters

      • options: CaptureVideoOptions

      Returns ReadableStream<null | Blob>

    • Clear the current cache of tiles. The intended use case here is if a network issue caused a necessary tile to not load. This should only be used when necessary, as any previously downloaded tiles will need to be re-fetched.

      Returns void

    • Close the active tour player, if there is one active.

      Any tour that is currently playing will be stopped.

      Returns void

    • Delete the specified layer from the layer manager.

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

      Parameters

      • id: string | Guid

      Returns void

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

      Parameters

      • options: GetCatalogHipsDataInViewOptions

      Returns Promise<InViewReturnMessage>

    • 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!

      Parameters

      Returns 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.

      Parameters

      • options: GotoTargetOptions

      Returns Promise<void>

    • 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.

      Parameters

      • options: LoadFitsLayerOptions

      Returns Promise<ImageSetLayer>

    • 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.

      Parameters

      Returns Promise<Folder>

    • 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.

      Parameters

      Returns Promise<void>

    • Moves the position of the view

      Parameters

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

      Returns void

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

      Parameters

      • name: string

      Returns void

    • Seek tour playback to the specified timecode.

      See tourTimecode 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.

      Parameters

      • value: number

      Returns 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 renderType, and the overall "mode" of the WWT renderer.

      Parameters

      • imagesetName: string

      Returns 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 clockDiscontinuities.

      Parameters

      • rate: number

      Returns 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 clockDiscontinuities.

      Parameters

      • isSynced: boolean

      Returns void

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

      Parameters

      • options: SetFitsLayerColormapOptions

      Returns 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.

      Parameters

      • imagesetName: string

      Returns void

    • Set the opacity of the foreground imageset.

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

      Parameters

      • opacity: number

      Returns void

    • Set the current time of WWT's internal clock.

      Altering this causes an increment in clockDiscontinuities.

      Parameters

      • time: Date

      Returns 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.

      Parameters

      • value: boolean

      Returns 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.

      Parameters

      Returns void

    • Start playback of the currently loaded tour.

      Nothing happens if no tour is loaded.

      Returns void

    • Stop playing the currently loaded tour.

      Nothing happens if no tour is currently playing.

      Returns void

    • Tilts the position of the view

      Parameters

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

      Returns void

    • Toggle the play/pause state of the current tour.

      Nothing happens if no tour is loaded.

      Returns void

    • Get the current view as a one-slide tour, serialized to XML

      Parameters

      • name: string

      Returns Promise<null | string>

    • 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.

      Returns Promise<void>

    • Set the zoom level of the view.

      This action 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.

      Parameters

      • factor: number

      Returns void

    Generated using TypeDoc