Class ScriptInterface

Hierarchy

  • ScriptInterface

Constructors

Properties

settings: Settings

The rendering settings associated with the viewer.

Methods

  • Initiate the loading of a image set or single-file FITS layer.

    If the specified URL already exists in the image set collection, i.e. it has previously been created with loadImageCollection, then this image set is added to the view.

    If the specified URL is pointing to a FITS file, it will be downloaded and parsed. This API is therefore insufficient for large datasets, since they become impractical to download as whole files.

    Although this function will return an ImageSetLayer object immediately, the FITS / image set information won't be ready until the FITS file / image set is downloaded and parsed. The callback will be called after this completes.

    Parameters

    • url: string

      The URL of a single-file FITS or the URL of an image set as specified in the WTML used in loadImageCollection.

    • mode: string

      Tell WWT what type of layer you are Adding. OR let WWT try to autodetect the type of the data.

    • name: string

      The name of the image set layer.

    • goto: boolean

      If true, camera will move to the center position of the image.

    • callback: ImagesetLoadedCallback

    Returns ImageSetLayer

  • Check whether the engine is using the most optimal rendering technology (WebGL 2.0).

    Returns boolean

  • Load a WTML collection and the imagesets that it contains.

    This function triggers a download of the specified URL, which should return an XML document in the WTML collection format. Any ImageSet entries in the collection, or Place entries containing image sets, will be added to the WWT instance’s list of available imagery. Subsequent calls to functions like WWTControl.setForegroundImageByName will be able to locate the new imagesets and display them to the user.

    If the URL is not accessible due to CORS restrictions, the request will automatically be routed through the WWT’s CORS proxying service.

    After the collection is successfully loaded, a collectionLoaded event will be issued, which you can listen for using the add_collectionLoaded method.

    Parameters

    • url: string

      The URL of the WTML collection file to load.

    • Optional loadChildFolders: boolean

      Optional, Recursively load any child folders. Defaults to False

    Returns void

  • Deregister an "arrive" callback.

    The deregistration is performed by object equality check. Since the callback in question is a function, if you want to use this function you probably need to save the callback in some kind of variable for future retrieval.

    Parameters

    Returns void

  • Deregister a "collectionLoaded" callback.

    The deregistration is performed by object equality check. Since the callback in question is a function, if you want to use this function you probably need to save the callback in some kind of variable for future retrieval.

    Parameters

    Returns void

  • Set the opacity with which the foreground imageset is rendered.

    Parameters

    • opacity: number

      The opacity, between 0 (invisible) and 100 (fully opaque).

    Returns void

  • Change the ImageSetLayer position in the layer stack.

    Parameters

    • id: string
    • order: number

    Returns void

Generated using TypeDoc