forked from ofrohn/d3-celestial
-
Notifications
You must be signed in to change notification settings - Fork 1
/
language.html
134 lines (127 loc) · 8.85 KB
/
language.html
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>D3-Celestial Language Options</title>
<script type="text/javascript" src="../lib/d3.min.js"></script>
<script type="text/javascript" src="../lib/d3.geo.projection.min.js"></script>
<script type="text/javascript" src="../celestial.min.js"></script>
<link rel="stylesheet" href="../celestial.css">
</head>
<body>
<div style="overflow:hidden;"><div id="celestial-map"></div></div>
<div id="celestial-form"></div>
<script type="text/javascript">
/* D3-Celestial sky map
Copyright 2015 Olaf Frohn https://github.com/ofrohn, see LICENSE
Edit configuration to your liking and display in browser.
Data files in folder data for stars and DSOs, number indicates limit magnitude,
or roll your own with the format template in templ.json
*/
var config = {
width: 0, // Default width, 0 = full parent width; height is determined by projection
projection: "airy", // Map projection used: airy, aitoff, armadillo, august, azimuthalEqualArea, azimuthalEquidistant, baker, berghaus, boggs, bonne, bromley, collignon, craig, craster, cylindricalEqualArea, cylindricalStereographic, eckert1, eckert2, eckert3, eckert4, eckert5, eckert6, eisenlohr, equirectangular, fahey, foucaut, ginzburg4, ginzburg5, ginzburg6, ginzburg8, ginzburg9, gringorten, hammer, hatano, healpix, hill, homolosine, kavrayskiy7, lagrange, larrivee, laskowski, loximuthal, mercator, miller, mollweide, mtFlatPolarParabolic, mtFlatPolarQuartic, mtFlatPolarSinusoidal, naturalEarth, nellHammer, orthographic, patterson, polyconic, rectangularPolyconic, robinson, sinusoidal, stereographic, times, twoPointEquidistant, vanDerGrinten, vanDerGrinten2, vanDerGrinten3, vanDerGrinten4, wagner4, wagner6, wagner7, wiechel, winkel3
transform: "equatorial", // Coordinate transformation: equatorial (default), ecliptic, galactic, supergalactic
center: null, // Initial center coordinates in equatorial transformation [hours, degrees, degrees],
// otherwise [degrees, degrees, degrees], 3rd parameter is orientation, null = default center
orientationfixed: true, // Keep orientation angle the same as center[2]
background: { fill: "#000000", stroke: "#000000", opacity: 1 }, // Background style
adaptable: true, // Sizes are increased with higher zoom-levels
interactive: true, // Enable zooming and rotation with mousewheel and dragging
form: true, // Display settings form
location: false, // Display location settings
formFields: {"location": true, "general": false, "stars": false, "dsos": false, "constellations": false, "lines": false, "other": true},
advanced: false,
controls: true, // Display zoom controls
lang: "", // Language for names, so far only for constellations: de: german, es: spanish
// Default:en or empty string for english
container: "celestial-map", // ID of parent element, e.g. div
datapath: "../data/", // Path/URL to data files, empty = subfolder 'data'
stars: {
show: true, // Show stars
limit: 6, // Show only stars brighter than limit magnitude
colors: true, // Show stars in spectral colors, if not use "color"
style: { fill: "#ffffff", opacity: 1 }, // Default style for stars
names: true, // Show star names (Bayer, Flamsteed, Variable star, Gliese, whichever applies first)
proper: false, // Show proper name (if present)
desig: true, // Show all names, including Draper and Hipparcos
namelimit: 2.5, // Show only names for stars brighter than namelimit
namestyle: { fill: "#ddddbb", font: "11px Georgia, Times, 'Times Roman', serif", align: "left", baseline: "top" },
propernamestyle: { fill: "#ddddbb", font: "11px Georgia, Times, 'Times Roman', serif", align: "right", baseline: "bottom" },
propernamelimit: 1.5, // Show proper names for stars brighter than propernamelimit
size: 7, // Maximum size (radius) of star circle in pixels
exponent: -0.28, // Scale exponent for star size, larger = more linear
data: 'stars.6.json' // Data source for stellar data
//data: 'stars.8.json' // Alternative deeper data source for stellar data
},
dsos: {
show: false, // Show Deep Space Objects
limit: 6, // Show only DSOs brighter than limit magnitude
names: true, // Show DSO names
desig: true, // Show short DSO names
namelimit: 4, // Show only names for DSOs brighter than namelimit
namestyle: { fill: "#cccccc", font: "11px Helvetica, Arial, serif", align: "left", baseline: "top" },
size: null, // Optional seperate scale size for DSOs, null = stars.size
exponent: 1.4, // Scale exponent for DSO size, larger = more non-linear
data: 'dsos.bright.json', // Data source for DSOs
//data: 'dsos.6.json' // Alternative broader data source for DSOs
//data: 'dsos.14.json' // Alternative deeper data source for DSOs
symbols: { //DSO symbol styles
gg: {shape: "circle", fill: "#ff0000"}, // Galaxy cluster
g: {shape: "ellipse", fill: "#ff0000"}, // Generic galaxy
s: {shape: "ellipse", fill: "#ff0000"}, // Spiral galaxy
s0: {shape: "ellipse", fill: "#ff0000"}, // Lenticular galaxy
sd: {shape: "ellipse", fill: "#ff0000"}, // Dwarf galaxy
e: {shape: "ellipse", fill: "#ff0000"}, // Elliptical galaxy
i: {shape: "ellipse", fill: "#ff0000"}, // Irregular galaxy
oc: {shape: "circle", fill: "#ffcc00", stroke: "#ffcc00", width: 1.5}, // Open cluster
gc: {shape: "circle", fill: "#ff9900"}, // Globular cluster
en: {shape: "square", fill: "#ff00cc"}, // Emission nebula
bn: {shape: "square", fill: "#ff00cc", stroke: "#ff00cc", width: 2}, // Generic bright nebula
sfr:{shape: "square", fill: "#cc00ff", stroke: "#cc00ff", width: 2}, // Star forming region
rn: {shape: "square", fill: "#00ooff"}, // Reflection nebula
pn: {shape: "diamond", fill: "#00cccc"}, // Planetary nebula
snr:{shape: "diamond", fill: "#ff00cc"}, // Supernova remnant
dn: {shape: "square", fill: "#999999", stroke: "#999999", width: 2}, // Dark nebula grey
pos:{shape: "marker", fill: "#cccccc", stroke: "#cccccc", width: 1.5} // Generic marker
}
},
constellations: {
show: true, // Show constellations
names: true, // Show constellation names
desig: true, // Show short constellation names (3 letter designations)
nameStyle: { fill:"#cccc99", align: "center", baseline: "middle", opacity:0.8,
font: ["bold 18px Helvetica, Arial, sans-serif", // Different fonts for brighter &
"bold 16px Helvetica, Arial, sans-serif", // sdarker constellations
"bold 15px Helvetica, Arial, sans-serif"]},
lines: true, // Show constellation lines
linestyle: { stroke: "#cccccc", width: 1, opacity: 0.6 },
bounds: false, // Show constellation boundaries
boundstyle: { stroke: "#cccc00", width: 0.5, opacity: 0.8, dash: [2, 4] }
},
planets: { show: true,
names: true,
nameStyle: { fill: "#00ccff", font: "16px 'Lucida Sans Unicode', Consolas, sans-serif", align: "right", baseline: "top" },
namesType: "desig" },
mw: {
show: true, // Show Milky Way as filled polygons
style: { fill: "#ffffff", opacity: "0.15" }
},
lines: {
graticule: { show: true, stroke: "#cccccc", width: 0.6, opacity: 0.8, // Show graticule lines
// grid values: "outline", "center", or [lat,...] specific position
lon: {pos: ["center"], fill: "#eee", font: "10px Helvetica, Arial, sans-serif"},
// grid values: "outline", "center", or [lon,...] specific position
lat: {pos: ["center"], fill: "#eee", font: "10px Helvetica, Arial, sans-serif"}},
equatorial: { show: true, stroke: "#aaaaaa", width: 1.3, opacity: 0.7 }, // Show equatorial plane
ecliptic: { show: true, stroke: "#66cc66", width: 1.3, opacity: 0.7 }, // Show ecliptic plane
galactic: { show: false, stroke: "#cc6666", width: 1.3, opacity: 0.7 }, // Show galactic plane
supergalactic: { show: false, stroke: "#cc66cc", width: 1.3, opacity: 0.7 } // Show supergalactic plane
}};
Celestial.display(config);
</script>
<footer id="d3-celestial-footer" style="position:relative; bottom:0; width:99%">
<p><a href="https://github.com/ofrohn/d3-celestial"><b>D3-Celestial</b></a> released under <a href="http://opensource.org/licenses/BSD-3-Clause">BSD license</a>. Copyright 2015-19 <a href="http://armchairastronautics.blogspot.com/" rel="author">Olaf Frohn</a>.</p>
</footer>
</body>
</html>