-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
386 lines (350 loc) · 10.4 KB
/
index.html
File metadata and controls
386 lines (350 loc) · 10.4 KB
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ASCII Sketch</title>
<style>
body {
font-family: sans-serif;
text-align: center;
margin: 0;
padding: 1rem;
background: #202124;
color: #eee;
overflow-x: hidden;
}
h1 {
margin-top: 0;
padding-top: 1rem
}
canvas {
border: 1px solid #555;
background: #111;
cursor: crosshair;
}
#board {
position: relative;
}
canvas.erasing {
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="none" stroke="white" stroke-width="2"/><line x1="6" y1="10" x2="14" y2="10" stroke="white" stroke-width="2"/></svg>') 10 10, auto;
}
.toolbar {
margin-top: .8rem;
display: flex;
justify-content: center;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
}
button {
padding: 0.5rem 1rem;
background: #333;
color: #eee;
border: 1px solid #555;
cursor: pointer;
transition: background 0.2s;
}
button:hover {
background: #444;
}
button.active {
background: #0a84ff;
border-color: #0a84ff;
}
input[type=range] {
margin: 0 .5rem
}
/* Color wheel styles */
.color-picker-wrapper {
position: relative;
display: inline-block;
}
#colorWheel {
width: 150px;
height: 150px;
border-radius: 50%;
cursor: crosshair;
border: 2px solid #444;
}
.color-preview {
width: 30px;
height: 30px;
border-radius: 50%;
border: 2px solid #666;
display: inline-block;
vertical-align: middle;
margin-left: 10px;
}
.tool-group {
display: flex;
gap: 0.5rem;
align-items: center;
}
/* Effects Panel */
.effects-panel {
margin-top: 1rem;
background: #2a2a2a;
padding: 1rem;
border-radius: 8px;
border: 1px solid #444;
max-width: 900px;
margin-left: auto;
margin-right: auto;
}
.effects-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 0.8rem;
margin-top: 0.5rem;
}
.effect-category {
margin-bottom: 1rem;
}
.effect-category h3 {
margin: 0 0 0.5rem 0;
color: #888;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 1px;
}
.effect-toggle {
display: flex;
align-items: center;
gap: 0.5rem;
background: #1a1a1a;
padding: 0.5rem;
border-radius: 4px;
border: 1px solid #333;
transition: all 0.2s;
}
.effect-toggle:hover {
background: #222;
border-color: #555;
}
.effect-toggle.active {
background: #0a84ff22;
border-color: #0a84ff;
}
.effect-toggle input[type="checkbox"] {
width: 16px;
height: 16px;
cursor: pointer;
}
.effect-toggle label {
cursor: pointer;
user-select: none;
font-size: 0.9rem;
flex: 1;
}
/* Canvas container for overlay effects */
.canvas-container {
position: relative;
display: inline-block;
}
#effectsCanvas {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
background: none;
}
#effectsCanvas {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
z-index: 2;
}
</style>
</head>
<body>
<h1>🖋️ sketch 🖋️</h1>
<p>Draw by dragging — every stroke prints a random ASCII char.</p>
<div class="canvas-container">
<canvas id="board" width="800" height="600"></canvas>
<canvas id="effectsCanvas" width="800" height="600"></canvas>
</div>
<div class="toolbar">
<div class="tool-group">
<button id="drawTool" class="active">✏️ Draw</button>
<button id="eraseTool">🧹 Erase</button>
</div>
<button id="clear">Clear All</button>
<button id="download">💾 Save Image</button>
<label>Size
<input type="range" id="size" min="12" max="64" value="24">
</label>
<div class="color-picker-wrapper">
<canvas id="colorWheel"></canvas>
<div class="color-preview" id="colorPreview"></div>
</div>
</div>
<div class="effects-panel">
<h2>Visual Effects</h2>
<div class="effect-category">
<h3>Basic Effects</h3>
<div class="effects-grid">
<div class="effect-toggle">
<input type="checkbox" id="glowEffect">
<label for="glowEffect">✨ Glow</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="embossEffect">
<label for="embossEffect">🗿 Emboss</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="outlineEffect">
<label for="outlineEffect">⭕ Outline</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="shadowEffect">
<label for="shadowEffect">🌑 Shadow</label>
</div>
</div>
</div>
<div class="effect-category">
<h3>Animation Effects</h3>
<div class="effects-grid">
<div class="effect-toggle">
<input type="checkbox" id="pulseEffect">
<label for="pulseEffect">💗 Pulse</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="fadeInEffect">
<label for="fadeInEffect">👻 Fade In</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="typewriterEffect">
<label for="typewriterEffect">⌨️ Typewriter</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="jitterEffect">
<label for="jitterEffect">📳 Jitter</label>
</div>
</div>
</div>
<div class="effect-category">
<h3>Style Effects</h3>
<div class="effects-grid">
<div class="effect-toggle">
<input type="checkbox" id="rainbowEffect">
<label for="rainbowEffect">🌈 Rainbow</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="gradientEffect">
<label for="gradientEffect">🎨 Gradient</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="doubleVisionEffect">
<label for="doubleVisionEffect">👀 Double Vision</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="mirrorEffect">
<label for="mirrorEffect">🪞 Mirror</label>
</div>
</div>
</div>
<div class="effect-category">
<h3>Particle Effects</h3>
<div class="effects-grid">
<div class="effect-toggle">
<input type="checkbox" id="sparklesEffect">
<label for="sparklesEffect">✨ Sparkles</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="dripEffect">
<label for="dripEffect">💧 Drip</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="explodeEffect">
<label for="explodeEffect">💥 Explode</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="smokeEffect">
<label for="smokeEffect">💨 Smoke Trail</label>
</div>
</div>
</div>
<div class="effect-category">
<h3>Transform Effects</h3>
<div class="effects-grid">
<div class="effect-toggle">
<input type="checkbox" id="rotationEffect">
<label for="rotationEffect">🔄 Rotation</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="waveEffect">
<label for="waveEffect">🌊 Wave</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="scatterEffect">
<label for="scatterEffect">🎲 Scatter</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="sizeVarianceEffect">
<label for="sizeVarianceEffect">📏 Size Variance</label>
</div>
</div>
</div>
<div class="effect-category">
<h3>Special Effects</h3>
<div class="effects-grid">
<div class="effect-toggle">
<input type="checkbox" id="matrixEffect">
<label for="matrixEffect">💊 Matrix Rain</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="glitchEffect">
<label for="glitchEffect">📺 Glitch</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="neonFlickerEffect">
<label for="neonFlickerEffect">💡 Neon Flicker</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="echoEffect">
<label for="echoEffect">🔊 Echo</label>
</div>
</div>
</div>
<div class="effect-category">
<h3>Motion Effects</h3>
<div class="effects-grid">
<div class="effect-toggle">
<input type="checkbox" id="spiralEffect">
<label for="spiralEffect">🌪️ Spiral</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="orbitEffect">
<label for="orbitEffect">💫 Orbit</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="magneticEffect">
<label for="magneticEffect">🎯 Magnetic</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="vortexEffect">
<label for="vortexEffect">🌀 Vortex</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="snowEffect">
<label for="snowEffect">❄️ Snow</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="fireworksEffect">
<label for="fireworksEffect">🎆 Fireworks</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="lightningEffect">
<label for="lightningEffect">⚡ Lightning</label>
</div>
<div class="effect-toggle">
<input type="checkbox" id="pixelDissolveEffect">
<label for="pixelDissolveEffect">👾 Pixel Dissolve</label>
</div>
</div>
</div>
</div>
<script src="js/app.js"></script>
</body>
</html>