-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
142 lines (122 loc) · 4.6 KB
/
index.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
135
136
137
138
139
140
141
142
<html>
<head>
<title>Spherical maps viewer</title>
<meta charset="UTF-8"/>
<meta name="revised" content="April 26th 2016">
<style>
body {font-size: 110%;}
fieldset { background: #E0E8F0; box-shadow: inset 0px 2px 2px -1px rgba(255,127,0,1);
min-width: 280px; border-radius:7px; margin-top: -1px; padding:5px;}
input[type="text"] {
width: 80px;
}
</style>
<script type="text/javascript" src="gl-matrix.js"></script>
<script type="text/javascript" src="sphere-map-viewer.js"></script>
</head>
<body>
<table>
<td>
<canvas id="ze-canvas" width="600" height="600"></canvas>
</td>
<td>
<fieldset>
<label>Sphere mesh resolution:</label><br/>
<input id="imax-field" type="text"></input> meridians,
<input id="jmax-field" type="text"></input> parallels
</fieldset>
<fieldset>
<label>Size of view frame:</label>
<input id="size-field" type="text"></input> pixels
</fieldset>
<fieldset>
<label>Filename:</label>
<input id="file-select" type="file"></input>
</fieldset>
<fieldset>
<label>Map type:</label><br/>
<input type="radio" name="type" value="Cube"> Cubemap</input><br/>
<input type="radio" name="type" value="Sphe"> Spheremap (Lambert azimuthal equal-area)</input><br/>
<input type="radio" name="type" value="Ster" checked> Stereographic</input><br/>
<input type="radio" name="type" value="Merc" checked> Mercator</input><br/>
<input type="radio" name="type" value="Equi"> Equirectangular</input><br/>
<input type="radio" name="type" value="Cyl"> Cylindric (Lambert cylindrical equal-area)</input><br/>
<!--<input type="radio" name="type" value="Ster"> Stereographic</input><br/>-->
<input type="radio" name="type" value="Azi"> Azimuthal equidistant</input>
</fieldset>
<fieldset>
<label>Turn/flip map:</label>
<input type="radio" name="turn" value="0" checked> 0°</input>
<input type="radio" name="turn" value="90"> 90°</input>
<input type="radio" name="turn" value="180"> 180°</input>
<input type="radio" name="turn" value="270"> 270°</input>
<input type="checkbox" id="flip-box"> flip</input>
</fieldset>
<fieldset>
<label>Control method:</label>
<input type="radio" name="ctrl" value="planet" checked> Planetary</input>
<input type="radio" name="ctrl" value="free"> Free</input>
<br/>
<input type="checkbox" id="anim-box"></input> Animate
<br/>
Pole (planet mode):
<input id="pole-theta" type="text"></input> θ,
<input id="pole-phi" type="text"></input> φ (deg)<br/>
Speed (planet mode): <input type="text" id="anim-speed"></input> deg/sec
</fieldset>
<fieldset>
<label>Mousewheel:</label>
Sensitivity: <input id="mwsens-field" type="text"></input>
<br/>
<input type="radio" name="mwheel" value="persp"> Perspective / F.O.V</input>
<br/>
Persp. p=<input id="persp-field" type="text"></input>, 0≤p<1
<br/>
or F.O.V.=<input type="text" id="fov-field"></input> deg, if <input type="checkbox" id="infinity-box"> Sphere at infinity.</input>
<br/>
<input type="radio" name="mwheel" value="mob"> Mobius.</input>
<button id="reset-mob">reset Mobius</button>
</fieldset>
<fieldset>
<label>Shading:</label>
<input type="radio" name="shad" value="front"> Front</input>,
<input type="radio" name="shad" value="oblique"> Oblique</input><br/>
<input type="radio" name="shad-model" value="Lambert"> Lambert</input>,
<input type="radio" name="shad-model" value="Oren-Nayar"> Oren-Nayar</input><br/>
<input id="shad-field" type="text"></input> ambient between 0 and 1<br/>
<input id="shad-angle" type="text"></input> angle (degrees, oblique mode)<br/>
<input id="shad-sigma" type="text"></input> roughness (Oren-Nayar mode)
<br/>
</fieldset>
<fieldset>
<label>Background color:</label>
<input type="color" id="bg-chooser"></input>
</fieldset>
<fieldset>
<label>Show grid:</label>
<input type="checkbox" id="grid-box"></input> Enable
</fieldset>
<fieldset>
<label>Enable mousewheel:</label>
<input type="checkbox" id="wheel-box"></input>
</fieldset>
<fieldset>
<label>Enable mipmap:</label>
<input type="checkbox" id="mipmap-box"></input>
</fieldset>
</td>
</table>
<script>
var smv=sphereMapViewer();
var canvas=document.getElementById("ze-canvas");
var options={ filename: "planet_Klendathu1200.png", projection: "Equi"};
smv(canvas,options);
</script>
Spheremap viewer using WebGL.<br/>
Sample map "planet Klendathu" CC-BY Robert Stein III (2010).<br/>
Matrix toolset by Brandon Jones, Colin MacKenzie IV.<br/>
The rest is CC-BY-SA Arnaud Chéritat (2016).<br/>
If you're lucky, you can save the image by right-clicking it.<br/>
Source code on <a href="https://github.com/Arnache/de-tabula-orbem">GitHub</a>
</body>
</html>