-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
236 lines (227 loc) · 8.99 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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<link rel="icon" href="https://tommycs127.github.io/orbiticon/web/orbiticon-favicon.svg" sizes="any" type="image/svg+xml">
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
/>
<link rel="stylesheet" href="https://tommycs127.github.io/orbiticon/web/base.css" />
<script type="application/javascript" src="https://tommycs127.github.io/orbiticon/web/playground.js"></script>
<title>Orbiticon</title>
</head>
<body>
<main class="container">
<nav>
<ul>
<li><a href="https://tommycs127.github.io/orbiticon"><strong>Orbiticon</strong></a></li>
</ul>
<ul>
<li><a href="https://github.com/tommycs127/orbiticon">GitHub</a></li>
</ul>
</nav>
<h1>Orbiticon</h1>
<p>Animated sci-fi style circular identicon inspired by <a href="https://github.com/ea7ababe/identicon" target="_blank">identicon</a> by <a href="https://github.com/ea7ababe" target="_blank">ea7ababe</a>.</p>
<hr/>
<h2>Playground</h2>
<div class="sticky-container">
<div class="orbiticon sticky-item">
<article id="orbiticon-container">
<header class="grid">
<button id="save-as-svg" type="button" class="outline">Save as SVG</button>
</header>
<div id="orbiticon-result"></div>
<footer id="orbiticon-seed"></footer>
</article>
</form>
</div>
<div class="sticky-item control">
<form id="control">
<fieldset class="grid">
<label>
Seed
<input
id="data-seed"
name="data-seed"
type="text"
placeholder="Orbiticon"
autocomplete="off"
/>
<small><code>data-seed</code></small>
</label>
</fieldset>
<fieldset class="grid">
<legend>Rings</legend>
<label>
Draw from radius
<input
id="data-from-radius"
name="data-from-radius"
type="number"
placeholder="4"
autocomplete="off"
/>
<small><code>data-from-radius</code></small>
</label>
<label>
Amount of <span data-tooltip="Equal segments within each ring">sectors</span>
<input
id="data-sectors"
name="data-sectors"
type="number"
placeholder="8"
autocomplete="off"
/>
<small><code>data-sectors</code></small>
</label>
<label>
<span data-tooltip="Not between generated strokes">Margin between orbits</span>
<input
id="data-margin-between-orbits"
name="data-margin-between-orbits"
type="number"
placeholder="2"
autocomplete="off"
/>
<small><code>data-margin-between-orbits</code></small>
</label>
</fieldset>
<fieldset class="grid">
<legend>Stroke</legend>
<label>
Default width
<input
id="data-stroke-width"
name="data-stroke-width"
type="number"
placeholder="4"
autocomplete="off"
/>
<small><code>data-stroke-width</code></small>
</label>
<label>
Minimum opacity
<input
id="data-min-opacity"
name="data-min-opacity"
type="number"
placeholder="0.4"
min="0"
max="1"
step="0.01"
autocomplete="off"
/>
<small><code>data-min-opacity</code></small>
</label>
</fieldset>
<fieldset class="grid">
<legend>Range of random stroke width</legend>
<label>
From
<input
id="data-min-random-stroke-width"
name="data-min-random-stroke-width"
type="number"
placeholder="-16"
autocomplete="off"
/>
<small><code>data-min-random-stroke-width</code></small>
</label>
<label>
To
<input
id="data-max-random-stroke-width"
name="data-max-random-stroke-width"
type="number"
placeholder="16"
autocomplete="off"
/>
<small><code>data-max-random-stroke-width</code></small>
</label>
</fieldset>
<fieldset class="grid">
<legend>Animation</legend>
<label>
<input
id="data-animated"
name="data-animated"
type="checkbox"
role="switch"
checked
/>
Animated <code>data-animated</code>
</label>
<label>
Shortest rotation time
<input
id="data-min-rotation-time"
name="data-min-rotation-time"
type="number"
placeholder="10 (ms)"
autocomplete="off"
/>
<small><code>data-min-rotation-time</code></small>
</label>
<label>
Longest rotation time
<input
id="data-max-rotation-time"
name="data-max-rotation-time"
type="number"
placeholder="20 (ms)"
autocomplete="off"
/>
<small><code>data-max-rotation-time</code></small>
</label>
</fieldset>
<fieldset class="grid">
<legend>Display</legend>
<label>
Colors <small>(random if unset)</small>
<input
id="data-colors"
name="data-colors"
type="text"
placeholder="#c39,#9c3,#39c"
autocomplete="off"
/>
<small><code>data-colors</code></small>
</label>
<label>
RGB hex finder
<input type="color" />
</label>
</fieldset>
</form>
</div>
</div>
<hr/>
<h2>Never Asked Questions</h2>
<h3>What is "Draw from radius"?</h3>
<p><b>"Draw from radius"</b> defines the distance from the center of the circle where the rings begin to be drawn. This option helps create space for placing a circular image at the center, enhancing its uniqueness.</p>
<p>Note that the script inside the SVG file modifies the viewBox (not the width and height) when (re)generating the pattern. Because of this, increasing this value moves the rings outward, gradually making them appear thinner due to scaling effects.</p>
<h3>What are sectors?</h3>
<p>Sectors are equal segments within each ring. For example, if a ring is divided into 8 sectors, it is split into 8 equal parts. The bits derived from the hash binary string determine which sectors will be filled.</p>
<h3>How to disable random stroke width?</h3>
<p>Set both inputs in <b>"Range of random stroke width"</b> to the same value as the default width will do the trick.</p>
<h3>What does opacity do here?</h3>
<p>Opacity not only enhances visual appeal but also serves as an indicator of stroke width randomization. The greater the deviation from the default stroke width, the more transparent the stroke becomes.</p>
<p>The <b>"Minimum opacity"</b> option sets a lower limit for opacity—lower values make strokes with greater width variations less visible, while setting it to <code>0</code> can make highly fluctuating strokes difficult or impossible to see. Conversely, setting it to <code>1</code> ensures that every ring remains fully opaque.</p>
<h3>How can you make it even cooler?</h3>
<p>Try applying the CSS rule <code>filter: drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.2))</code> to add a subtle glowing effect.</p>
</main>
<footer>
<small>
<ul class="footer">
<li>tommycs127</li>
<li><a href="https://github.com/tommycs127" target="_blank"><img src="https://tommycs127.github.io/orbiticon/web/orbiticon-github-link.svg" style="height: 5ex;" class="glow" /></a></li>
<li>2025</li>
<li><a href="https://picocss.com/">Pico CSS</a></li>
</ul>
</small>
</footer>
</body>
</html>