wwtcontrol.md: massive shortlinking effort
This commit is contained in:
Родитель
46765d7e45
Коммит
c374dc19a5
128
wwtcontrol.md
128
wwtcontrol.md
|
@ -2,9 +2,8 @@
|
||||||
description: Reference documentation of the WWTControl class.
|
description: Reference documentation of the WWTControl class.
|
||||||
---
|
---
|
||||||
|
|
||||||
The [**WWTControl**](#wwtcontrol-object) object is the principal object in a
|
The **WWTControl** object is the principal object in a webpage using the WebGL
|
||||||
webpage using the WebGL engine. WWTControl objects do not inherit from any
|
engine. WWTControl objects do not inherit from any other public objects.
|
||||||
other public objects.
|
|
||||||
|
|
||||||
Note that the code examples below will not run on their own; more scaffolding
|
Note that the code examples below will not run on their own; more scaffolding
|
||||||
is needed. Live samples are collected on the [WebGL Engine Examples] page and
|
is needed. Live samples are collected on the [WebGL Engine Examples] page and
|
||||||
|
@ -12,40 +11,75 @@ cross-linked below.
|
||||||
|
|
||||||
| Property | Description |
|
| Property | Description |
|
||||||
| :-- |
|
| :-- |
|
||||||
| [**Fov**](#wwtcontrol-fov-property) | Contains the field of view in degrees. |
|
| [**Fov**] | Contains the field of view in degrees. |
|
||||||
| [**Settings**](#wwtcontrol-settings-property) | Reference to the [**Settings**](#settings-object) object for the WWTControl. Note this object is created when the WWTControl object is created, so there is no specific call to create a Settings object. |
|
| [**Settings**] | Reference to the [**Settings** class] for the WWTControl. Note this object is created when the WWTControl object is created, so there is no specific call to create a Settings object. |
|
||||||
| [**SmoothAnimation**](#wwtcontrol-smoothanimation-property) | Specifies whether to pan smoothly or quickly to the new location. |
|
| [**SmoothAnimation**] | Specifies whether to pan smoothly or quickly to the new location. |
|
||||||
|
|
||||||
| Method | Description |
|
| Method | Description |
|
||||||
| :-- |
|
| :-- |
|
||||||
| [**AddAnnotation**](#wwtcontrol-addannotation-method) | Adds an [**Annotation**](#annotation-object) object to the view. |
|
| [**AddAnnotation**] | Adds an [**Annotation** class] to the view. |
|
||||||
| [**ClearAnnotations**](#wwtcontrol-clearannotations-method) | Removes all annotations from the view. |
|
| [**ClearAnnotations**] | Removes all annotations from the view. |
|
||||||
| [**CreateCircle**](#wwtcontrol-createcircle-method) | Creates a [**Circle**](#circle-object) object, and returns a reference to the created object. |
|
| [**CreateCircle**] | Creates a [**Circle** class], and returns a reference to the created object. |
|
||||||
| [**CreatePolygon**](#wwtcontrol-createpolygon-method) | Creates a [**Poly**](#poly-object) object (a polygon), and returns a reference to the created object. |
|
| [**CreatePolygon**] | Creates a [**Poly** class] (a polygon), and returns a reference to the created object. |
|
||||||
| [**CreatePolyLine**](#wwtcontrol-createpolyline-method) | Creates a [**PolyLine**](#polyline-object) object, and returns a reference to the created object. |
|
| [**CreatePolyLine**] | Creates a [**PolyLine** class], and returns a reference to the created object. |
|
||||||
| [**GetDec**](#wwtcontrol-getdec-method) | Retrieves the declination for the view. |
|
| [**GetDec**] | Retrieves the declination for the view. |
|
||||||
| [**GetRA**](#wwtcontrol-getra-method) | Retrieves the right ascension for the view. |
|
| [**GetRA**] | Retrieves the right ascension for the view. |
|
||||||
| [**GotoRaDecZoom**](#wwtcontrol-gotoradeczoom-method) | Used to go to a new viewing position. |
|
| [**GotoRaDecZoom**] | Used to go to a new viewing position. |
|
||||||
| [**HideUI**](#wwtcontrol-hideui-method) | Specifies whether to hide the UI for the view. |
|
| [**HideUI**] | Specifies whether to hide the UI for the view. |
|
||||||
| [**LoadImageCollection**](#wwtcontrol-loadimagecollection-method) | Used to load a WTML collection file, containing links to foreground and background images. |
|
| [**LoadImageCollection**] | Used to load a WTML collection file, containing links to foreground and background images. |
|
||||||
| [**LoadTour**](#wwtcontrol-loadtour-method) | Used to load and start a tour. |
|
| [**LoadTour**] | Used to load and start a tour. |
|
||||||
| [**LoadVOTable**](#wwtcontrol-loadvotable-method) | Used to load a VO (Virtual Observatory) table. |
|
| [**LoadVOTable**] | Used to load a VO (Virtual Observatory) table. |
|
||||||
| [**PlayTour**](#wwtcontrol-playtour-method) | Used to restart a tour from the beginning. |
|
| [**PlayTour**] | Used to restart a tour from the beginning. |
|
||||||
| [**RemoveAnnotation**](#wwtcontrol-removeannotation-method) | Removes the specified annotation from the view. |
|
| [**RemoveAnnotation**] | Removes the specified annotation from the view. |
|
||||||
| [**SetBackgroundImageByName**](#wwtcontrol-setbackgroundimagebyname-method) | Loads an image to use as the view background. |
|
| [**SetBackgroundImageByName**] | Loads an image to use as the view background. |
|
||||||
| [**SetForegroundImageByName**](#wwtcontrol-setforegroundimagebyname-method) | Loads an image to use as the view foreground. |
|
| [**SetForegroundImageByName**] | Loads an image to use as the view foreground. |
|
||||||
| [**SetForegroundOpacity**](#wwtcontrol-setforegroundopacity-method) | Specifies the opacity of the entire foreground image, which can be useful when visually comparing the foreground and background images. |
|
| [**SetForegroundOpacity**] | Specifies the opacity of the entire foreground image, which can be useful when visually comparing the foreground and background images. |
|
||||||
| [**StopTour**](#wwtcontrol-stoptour-method) | Used to stop and exit a tour. |
|
| [**StopTour**] | Used to stop and exit a tour. |
|
||||||
|
|
||||||
| Event | Description |
|
| Event | Description |
|
||||||
| :-- |
|
| :-- |
|
||||||
| [**AnnotationClicked**](#wwtcontrol-annotationclicked-event) | Fired when an Annotation object is clicked on. Note the spelling error! |
|
| [**AnnotationClicked**] | Fired when an Annotation object is clicked on. |
|
||||||
| [**wwtArrived**](#wwtcontrol-arrived-event) | Fired when a change to the view from a drag, zoom, or goto comes to a halt. |
|
| [**wwtArrived**] | Fired when a change to the view from a drag, zoom, or goto comes to a halt. |
|
||||||
| [**wwtClick**](#wwtcontrol-click-event) | Fired when the left mouse button is clicked. |
|
| [**wwtClick**] | Fired when the left mouse button is clicked. |
|
||||||
| [**wwtReady**](#wwtcontrol-ready-event) | Fired when the web client is initialized. |
|
| [**wwtReady**] | Fired when the web client is initialized. |
|
||||||
|
|
||||||
[WebGL Engine Examples]: http://webhosted.wwt-forum.org/webengine-examples/
|
[WebGL Engine Examples]: http://webhosted.wwt-forum.org/webengine-examples/
|
||||||
|
|
||||||
|
[**Settings** class]: ./settings.md
|
||||||
|
[**Annotation** class]: ./annotation.md
|
||||||
|
[**Circle** class]: ./circle.md
|
||||||
|
[**Poly** class]: ./poly.md
|
||||||
|
[**PolyLine** class]: ./polyline.md
|
||||||
|
|
||||||
|
[**Fov**]: #fov-property
|
||||||
|
[**Settings**]: #settings-property
|
||||||
|
[**SmoothAnimation**]: #smoothanimation-property
|
||||||
|
|
||||||
|
[**AddAnnotation**]: #addannotation-method
|
||||||
|
[**ClearAnnotations**]: #clearannotations-method
|
||||||
|
[**CreateCircle**]: #createcircle-method
|
||||||
|
[**CreatePolygon**]: #createpolygon-method
|
||||||
|
[**CreatePolyLine**]: #createpolyline-method
|
||||||
|
[**GetDec**]: #getdec-method
|
||||||
|
[**GetRA**]: #getra-method
|
||||||
|
[**GotoRaDecZoom**]: #gotoradeczoom-method
|
||||||
|
[**HideUI**]: #hideui-method
|
||||||
|
[**LoadImageCollection**]: #loadimagecollection-method
|
||||||
|
[**LoadTour**]: #loadtour-method
|
||||||
|
[**LoadVOTable**]: #loadvotable-method
|
||||||
|
[**PlayTour**]: #playtour-method
|
||||||
|
[**RemoveAnnotation**]: #removeannotation-method
|
||||||
|
[**SetBackgroundImageByName**]: #setbackgroundimagebyname-method
|
||||||
|
[**SetForegroundImageByName**]: #setforegroundimagebyname-method
|
||||||
|
[**SetForegroundOpacity**]: #setforegroundopacity-method
|
||||||
|
[**StopTour**]: #stoptour-method
|
||||||
|
|
||||||
|
[**AnnotationClicked**]: #annotationclicked-event
|
||||||
|
[**wwtArrived**]: #arrived-event
|
||||||
|
[**wwtClick**]: #click-event
|
||||||
|
[**wwtReady**]: #ready-event
|
||||||
|
|
||||||
|
|
||||||
### WWTControl Fov Property
|
### WWTControl Fov Property
|
||||||
|
|
||||||
Note: This feature is not implemented.
|
Note: This feature is not implemented.
|
||||||
|
@ -97,7 +131,7 @@ object for the WWTControl.
|
||||||
|
|
||||||
#### Remarks
|
#### Remarks
|
||||||
This property is read-only, though individual settings can have their values
|
This property is read-only, though individual settings can have their values
|
||||||
set (refer to the [**Settings**](#settings-object) object).
|
set (refer to the [**Settings** class]).
|
||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
```js
|
```js
|
||||||
|
@ -158,8 +192,8 @@ _annotation_
|
||||||
This method does not return a value.
|
This method does not return a value.
|
||||||
|
|
||||||
#### Remarks
|
#### Remarks
|
||||||
An Annotation Object is inherited by the [**Circle**](#circle-object) object,
|
An Annotation Object is inherited by the [**Circle** class],
|
||||||
the [**Poly**](#poly-object) object, and the [**PolyLine**](#polyline-object)
|
the [**Poly** class], and the [**PolyLine**](#polyline-object)
|
||||||
object, so adding an annotation will add one of these graphics to the view, in
|
object, so adding an annotation will add one of these graphics to the view, in
|
||||||
addition to providing the annotation text.
|
addition to providing the annotation text.
|
||||||
|
|
||||||
|
@ -238,7 +272,7 @@ wwtControl.clearAnnotations();
|
||||||
|
|
||||||
### WWTControl CreateCircle Method
|
### WWTControl CreateCircle Method
|
||||||
|
|
||||||
The **CreateCircle** method creates a [**Circle**](#circle-object) object, and
|
The **CreateCircle** method creates a [**Circle** class], and
|
||||||
returns a reference to the created object.
|
returns a reference to the created object.
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
|
@ -246,7 +280,7 @@ _fill_
|
||||||
True indicates the circle should be filled.
|
True indicates the circle should be filled.
|
||||||
|
|
||||||
#### Return Values
|
#### Return Values
|
||||||
This method returns a reference to a [**Circle**](#circle-object) object.
|
This method returns a reference to a [**Circle** class].
|
||||||
|
|
||||||
#### Remarks
|
#### Remarks
|
||||||
In addition to creating the circle an [**Annotation**](#annotation-object)
|
In addition to creating the circle an [**Annotation**](#annotation-object)
|
||||||
|
@ -291,7 +325,7 @@ to identify point sources of light.
|
||||||
|
|
||||||
### WWTControl CreatePolygon Method
|
### WWTControl CreatePolygon Method
|
||||||
|
|
||||||
The **CreatePolygon** method creates a [**Poly**](#poly-object) object (a
|
The **CreatePolygon** method creates a [**Poly** class] (a
|
||||||
polygon), and returns a reference to the created object.
|
polygon), and returns a reference to the created object.
|
||||||
|
|
||||||
|
|
||||||
|
@ -300,7 +334,7 @@ _fill_
|
||||||
True specifies the polygon should be filled.
|
True specifies the polygon should be filled.
|
||||||
|
|
||||||
#### Return Values
|
#### Return Values
|
||||||
This method returns a reference to the created [**Poly**](#poly-object) object.
|
This method returns a reference to the created [**Poly** class].
|
||||||
|
|
||||||
#### Remarks
|
#### Remarks
|
||||||
In addition to creating the polygon an [**Annotation**](#annotation-object)
|
In addition to creating the polygon an [**Annotation**](#annotation-object)
|
||||||
|
@ -357,7 +391,7 @@ _fill_
|
||||||
This parameter should be removed, has no effect.
|
This parameter should be removed, has no effect.
|
||||||
|
|
||||||
#### Return Values
|
#### Return Values
|
||||||
This method returns a reference to a [**PolyLine**](#polyline-object) object.
|
This method returns a reference to a [**PolyLine** class].
|
||||||
|
|
||||||
#### Remarks
|
#### Remarks
|
||||||
In addition to creating the polyline, an [**Annotation**](#annotation-object)
|
In addition to creating the polyline, an [**Annotation**](#annotation-object)
|
||||||
|
@ -465,7 +499,7 @@ This method takes no parameters.
|
||||||
This method returns a double containing the right ascension in decimal degrees.
|
This method returns a double containing the right ascension in decimal degrees.
|
||||||
|
|
||||||
#### Remarks
|
#### Remarks
|
||||||
Refer to the remarks for [**GetDec**](#wwtcontrol-getdec-method).
|
Refer to the remarks for [**GetDec**].
|
||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
```js
|
```js
|
||||||
|
@ -612,9 +646,9 @@ document.
|
||||||
|
|
||||||
After the collection is loaded, the images can be referenced by their string
|
After the collection is loaded, the images can be referenced by their string
|
||||||
name using the
|
name using the
|
||||||
[**SetBackgroundImageByName**](#wwtcontrol-setbackgroundimagebyname-method)
|
[**SetBackgroundImageByName**]
|
||||||
and
|
and
|
||||||
[**SetForegroundImageByName**](#wwtcontrol-setforegroundimagebyname-method)
|
[**SetForegroundImageByName**]
|
||||||
methods.
|
methods.
|
||||||
|
|
||||||
|
|
||||||
|
@ -726,7 +760,7 @@ This method takes no parameters.
|
||||||
This method does not return a value.
|
This method does not return a value.
|
||||||
|
|
||||||
#### Remarks
|
#### Remarks
|
||||||
Refer to the remarks for the [**LoadTour**](#wwtcontrol-loadtour-method) method.
|
Refer to the remarks for the [**LoadTour**] method.
|
||||||
|
|
||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
|
@ -752,7 +786,7 @@ The **RemoveAnnotation** method removes the specified annotation from the view.
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
_annotation_
|
_annotation_
|
||||||
The [**Annotation**](#annotation-object) object to be removed.
|
The [**Annotation** class] to be removed.
|
||||||
|
|
||||||
#### Return Values
|
#### Return Values
|
||||||
This method does not return a value.
|
This method does not return a value.
|
||||||
|
@ -815,7 +849,7 @@ This method does not return a value.
|
||||||
#### Remarks
|
#### Remarks
|
||||||
The string used as the name parameter for this method should be present as a
|
The string used as the name parameter for this method should be present as a
|
||||||
**Place** name in the .WTML file loaded by the
|
**Place** name in the .WTML file loaded by the
|
||||||
[**LoadImageCollection**](#wwtcontrol-loadimagecollection-method) method.
|
[**LoadImageCollection**] method.
|
||||||
Typically background images come from _Survey_ data, such as visible light,
|
Typically background images come from _Survey_ data, such as visible light,
|
||||||
x-ray, infrared, ultraviolet, gamma, and so on. In the UI of WorldWide
|
x-ray, infrared, ultraviolet, gamma, and so on. In the UI of WorldWide
|
||||||
Telescope, the background image is selected with the **Imagery** entry, and if
|
Telescope, the background image is selected with the **Imagery** entry, and if
|
||||||
|
@ -861,14 +895,14 @@ This method does not return a value.
|
||||||
#### Remarks
|
#### Remarks
|
||||||
The string used as the name parameter for this method should be present as a
|
The string used as the name parameter for this method should be present as a
|
||||||
**Place** name in the .WTML file loaded by the
|
**Place** name in the .WTML file loaded by the
|
||||||
[**LoadImageCollection**](#wwtcontrol-loadimagecollection-method) method.
|
[**LoadImageCollection**] method.
|
||||||
There can be only one foreground image and only one background image rendered
|
There can be only one foreground image and only one background image rendered
|
||||||
at any one time. The _typical_ use is to render studies as foreground images
|
at any one time. The _typical_ use is to render studies as foreground images
|
||||||
on top of a survey as a background image.
|
on top of a survey as a background image.
|
||||||
|
|
||||||
If the opacity of the foreground image is solid, the background image will not
|
If the opacity of the foreground image is solid, the background image will not
|
||||||
be visible underneath. However if the
|
be visible underneath. However if the
|
||||||
[**SetForegroundOpacity**](#wwtcontrol-setforegroundopacity-method) method is
|
[**SetForegroundOpacity**] method is
|
||||||
used to add some transparency, then both foreground and background images will
|
used to add some transparency, then both foreground and background images will
|
||||||
be visible, and can be compared. Typical use of these two layers is to load a
|
be visible, and can be compared. Typical use of these two layers is to load a
|
||||||
visual survey as either foreground or background, and then to compare it with
|
visual survey as either foreground or background, and then to compare it with
|
||||||
|
@ -1033,7 +1067,7 @@ This setting enables some see-through in the foreground image, to enable a
|
||||||
comparison with the background image. Note that if the foreground image is a
|
comparison with the background image. Note that if the foreground image is a
|
||||||
.png file, then some transparency information is usually held within the file.
|
.png file, then some transparency information is usually held within the file.
|
||||||
The
|
The
|
||||||
[**SetForegroundImageByName**](#wwtcontrol-setforegroundimagebyname-method)
|
[**SetForegroundImageByName**]
|
||||||
method sets the foreground opacity to 1.0 each time a new image is loaded.
|
method sets the foreground opacity to 1.0 each time a new image is loaded.
|
||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
|
@ -1064,9 +1098,9 @@ This method does not return a value.
|
||||||
|
|
||||||
#### Remarks
|
#### Remarks
|
||||||
After a tour has been stopped with this call, it cannot be restarted from the
|
After a tour has been stopped with this call, it cannot be restarted from the
|
||||||
position it was stopped at. [**PlayTour**](#wwtcontrol-playtour-method) (which
|
position it was stopped at. [**PlayTour**] (which
|
||||||
restarts a tour) will not work after a tour has been stopped. Also refer to
|
restarts a tour) will not work after a tour has been stopped. Also refer to
|
||||||
the remarks for [**LoadTour**](#wwtcontrol-loadtour-method).
|
the remarks for [**LoadTour**].
|
||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
```js
|
```js
|
||||||
|
|
Загрузка…
Ссылка в новой задаче