-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
213 lines (183 loc) · 4.9 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JSFractal Viewer</title>
<style>
body {
background: #333;
color: white;
}
canvas {
background: black;
padding: 5px;
border: 2px solid white;
}
.control-box {
background-color: black;
padding: 5px;
border: 2px solid white;
float: right;
display: flex;
flex-direction: column;
}
button {
margin-top: 5px;
background-color: transparent;
color: white;
border: 1px solid white;
transition: color 250ms, border-color 250ms;
}
button:hover {
color: rgb(166, 225, 255);
border-color: rgb(110, 201, 247);
}
input {
border-radius: 0px;
border: 1px solid white;
background-color: rgb(20, 20, 20);
color: white;
transition: color 250ms, border-color 250ms;
}
input:not([type="range"]):hover {
color:rgb(166, 225, 255);
border-color: rgb(110, 201, 247);
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
appearance: none;
-webkit-appearance: none;
}
input[type="range"] {
-webkit-appearance: none;
appearance: none;
border: none;
background-color: transparent;
--height: 12px;
height: var(--height);
position: relative;
}
input[type="range"]::before {
position: absolute;
content: "";
left: 0;
top: 4px;
right: 0;
bottom: 4px;
border-radius: 2px;
background-color: gray;
z-index: 0;
}
input[type="range"]::-webkit-slider-thumb {
position: relative;
-webkit-appearance: none;
appearance: none;
background-color: white;
border-radius: 50%;
width: var(--height);
height: var(--height);
z-index: 999 !important;
transition: background-color 250ms;
}
input[type="range"]:hover::-webkit-slider-thumb {
background-color: rgb(110, 201, 247);
}
div:has(input[type="checkbox"]) > label {
float: left;
width: 70%;
}
div:has(input[type="checkbox"]) > input[type="checkbox"] {
float: right;
width: 20%;
}
select {
border: 1px solid white;
background-color: rgb(20, 20, 20);
color: white;
transition: color 250ms, border-color 250ms;
}
select:hover {
color:rgb(166, 225, 255);
border-color: rgb(110, 201, 247);
}
#parameters {
display: flex;
flex-direction: column;
}
.divider {
border-bottom: 1px solid white;
margin: 5px auto;
width: 100%;
}
button#rerender::before {
position: absolute;
left: 0;
top: 0;
bottom: 0;
content: "";
z-index: -1;
background-color: var(--sub-color);
width: var(--sub-width);
}
button#rerender {
--sub-width: 0%;
--sub-color:rgb(78, 124, 225);
position: relative;
z-index: 999 !important;
}
#timer, #fps-counter {
font-family: sans-serif;
font-style: italic;
font-weight: bold;
font-size: 12px;
margin-top: 5px;
}
#fps-counter { margin-top: 0; }
.pos-wrapper {
display: flex;
flex-direction: row;
max-width: 250px;
}
.pos-inputs {
padding-left: 5px;
}
.pos-inputs input {
width: 40px;
}
</style>
<script src="scripts/index_async.js" defer></script>
</head>
<body>
<canvas id="main" style="width: 80%;"></canvas>
<div class="control-box">
<label title="The resolution of the render" for="resolution">Resolution (<span id="resx"></span>, <span id="resy"></span>)</label>
<input type="range" id="resolution" name="resolution" min="100" max="1080">
<label title="fine tune this to get the best render speed" for="iteration">Iterations/frame (<span id="iter"></span>)</label>
<input type="range" id="iteration" name="iteration" min="0" max="2160">
<label title="alter the colors of the fractal" for="hue">Hue Shift</label>
<input type="range" id="hue" name="hue" min="0" max="360" value="0">
<label title="The maximum iterations per point, higher will be more accurate" for="itr2">Max Iterations</label>
<input type="number" id="itr2" name="itr2" min="30" max="1000" value="100">
<label for="fractals">Fractal</label>
<select name="fractals" id="fractals"></select>
<label for="render-mode" title="Sets the render mode">Render Mode</label>
<select name="render-mode" id="render-mode">
<option value="0" selected>Iterative</option>
<option value="1">Orbit Trap (Point)</option>
<option value="2">Orbit Trap (Axis)</option>
<option value="3">Orbit Trap (All Points)</option>
</select>
<label title="X offset for orbit rendering" for="ox">X Pos (Orbit Render)</label>
<input type="number" id="ox" name="ox" min="-5" max="5" value="0">
<label title="Y offset for orbit rendering" for="oy">Y Pos</label>
<input type="number" id="oy" name="oy" min="-5" max="5" value="0">
<div class="divider"></div>
<div id="parameters">
</div>
<button id="rerender">Render</button>
<span id="timer"></span>
</div>
</body>
</html>