File: sky_image1.ssc

package info (click to toggle)
stellarium 24.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 911,396 kB
  • sloc: ansic: 317,377; cpp: 204,602; xml: 48,590; javascript: 26,348; python: 1,254; perl: 1,108; sh: 207; makefile: 190; pascal: 169
file content (49 lines) | stat: -rw-r--r-- 1,449 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Name: Sky Image load test script
// License: Public Domain
// Author: Matthew Gates
// Description: This script demonstrates adding and manipulating sky images
//

include("status_label.inc");

useStatusLabel("Sky Images Test 1: ", 50, core.getScreenHeight() - 50, 16, "#ff0000");

status("First lets look at the place we will load our image...");
core.clear("starchart");
core.selectObjectByName("M31", false);
StelMovementMgr.setFlagTracking(true);
StelMovementMgr.zoomTo(2,1);
core.wait(2);

status("loading image...");
core.loadSkyImage("image", "../textures/earthmap.png", 
                  11.5, 41,   // ra, dec first corner
                  11.5, 41.17,  // ra, dec second corner
                  11.75, 41.17, // ra, dec third corner
                  11.75, 41,    // ra, dec fourth corner
                  2.5, 14,      // minRes, maxBright
                  false);       // visible on load?

core.wait(1.5);

status("showing image (should fade in)");
StelSkyLayerMgr.showLayer("image", true); 
core.wait(1.5);

status("hiding image (should fade out)");
StelSkyLayerMgr.showLayer("image", false); 
core.wait(1.5);

status("showing image (should fade in)");
StelSkyLayerMgr.showLayer("image", true); 
core.wait(1.5);

status("hiding image (should fade out)");
StelSkyLayerMgr.showLayer("image", false); 
core.wait(1.5);

status("removing image, kthxbye");
core.removeSkyImage("image");
core.wait(1.5);
LabelMgr.deleteAllLabels();