-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
115 lines (99 loc) · 3.91 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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Lens Toy</title>
<script type="text/javascript" src="https://rawgithub.com/slowe/lensjs/master/lens.js"></script>
<script type="text/javascript" src="https://rawgithub.com/slowe/lensjs/master/canvas.js"></script>
<script type="text/javascript" src="https://rawgithub.com/jasondavies/conrec.js/master/conrec.js"></script>
<script type="text/javascript" src="lenstoy.js"></script>
<!--[if lt IE 9]><script src="excanvas.min.js"></script><![endif]-->
<script type="text/javascript">
window.onload = function(e){
// Create a LensToy object. The ID is that of the <div>, while the
// pixel scale of the canvas is needed to set up the model correctly.
// At the moment, several things need to be changed at the same time
// to switch between models. Search this file for the string EDIT.
// Example, pixscale = 0.186/4.0
// SW_field, pixscale = 0.186,
// CFHTLS_field, pixscale = 0.186,
// CFHTLS_group, pixscale = 0.186/2.0,
// CFHTLS_galaxy, pixscale = 0.186/4.0
// EDIT:
var toy = new LensToy({id:'lenstoy', pixscale:0.186});
var offmsg = "Try putting a small blue galaxy behind these massive yellow ones...";
// Attach a function to the load event
toy.bind("mouseout",function(){
this.setStatus(offmsg);
}).bind("loadimage",function(){
this.setStatus(offmsg);
});
// EDIT to load a particular model
// toy.init('Example');
// toy.init('CFHTLS_field');
// toy.init('CFHTLS_group');
// toy.init('CFHTLS_galaxy');
toy.init('SW_field');
//lens.init();
}
</script>
<style>
body {
font-family: 'Myriad Pro',Calibri,Helvetica,Arial,sans-serif;
background-color: black;
color: white;
}
h1, h2, h3, h4 { font-family: 'Lucida Grande','Calibri',Helvetica,Arial,sans-serif; }
h1 { margin-bottom: 0.5em; }
a { color: #5555aa; }
#lenstoy { border: 2px solid #606060; }
#lensimg { border: 2px solid #606060; }
code { color: #5555aa; }
pre { color: #5555aa; }
#main { position: relative; height:480px; cursor: crosshair; }
#status { width:440px; margin-bottom: 0.5em; height: 1em; margin-bottom: 1em; }
#lenstoy, #lensimg { position: relative; top:10px; width:440px; height:440px; }
#forkme_banner {
background: url("http://slowe.github.com/graph/images/blacktocat.png") no-repeat scroll 95% 50% #0090FF;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
color: #FFFFFF;
display: block;
font-weight: 700;
padding: 10px 50px 10px 10px;
position: absolute;
right: 10px;
top: 0;
z-index: 10;
text-decoration: none;
}
#page {
margin: 20px;
}
</style>
</head>
<body>
<div id="page">
<header class="inner">
<a id="forkme_banner" href="https://github.com/slowe/LensToy">Fork Me on GitHub</a>
<h1>Lens Toy</h1>
</header>
<div id="status">Loading model...</div>
<div id="main">
<!-- EDIT to choose appropriate background image: -->
<!-- BUG: the background image should be loaded by the LensToy itself! -->
<!-- <img id="lensimg" src="SL2SJ140156+554446_irg_100x100.png" style="z-index:10;position:absolute;"/> -->
<img id="lensimg" src="SW_field_440x440.png" style="z-index:10;position:absolute;"/>
<!-- <img id="lensimg" src="CFHTLS_field_440x440.png" style="z-index:10;position:absolute;"/> -->
<!-- <img id="lensimg" src="CFHTLS_group_220x220.png" style="z-index:10;position:absolute;"/> -->
<!-- <img id="lensimg" src="CFHTLS_galaxy_110x110.png" style="z-index:10;position:absolute;"/> -->
<div id="lenstoy" style="z-index:10;position:absolute;"></div>
</div>
<div id="options">
<button id="criticalcurve">Toggle Critical Curves</button>
</div>
<p align="left"><font size=-1><a href="https://github.com/slowe/LensToy">https://github.com/slowe/LensToy</a></p>
</div>
</body>
</html>