Reaperxxxx commited on
Commit
b8e67a5
·
verified ·
1 Parent(s): 276a6d5

Create Can.html

Browse files
Files changed (1) hide show
  1. Can.html +482 -0
Can.html ADDED
@@ -0,0 +1,482 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
6
+ <title>Reiker Gamer — Logo Maker</title>
7
+
8
+ <!-- Google Fonts (Orbitron is nice for gamer logos) -->
9
+ <link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Poppins:wght@400;700&family=Bangers&display=swap" rel="stylesheet">
10
+
11
+ <style>
12
+ :root{
13
+ --bg:#0f1724;
14
+ --card:#0b1220;
15
+ --muted:#94a3b8;
16
+ --accent:#7c3aed;
17
+ --glass: rgba(255,255,255,0.03);
18
+ }
19
+ *{box-sizing:border-box}
20
+ body{
21
+ margin:0;
22
+ font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto;
23
+ background: linear-gradient(180deg,#071029 0%, #081428 50%, #071129 100%);
24
+ color:#e6eef8;
25
+ min-height:100vh;
26
+ display:flex;
27
+ align-items:center;
28
+ justify-content:center;
29
+ padding:28px;
30
+ }
31
+ .wrap{
32
+ width:100%;
33
+ max-width:1100px;
34
+ display:grid;
35
+ grid-template-columns:420px 1fr;
36
+ gap:20px;
37
+ align-items:start;
38
+ }
39
+ .panel{
40
+ background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
41
+ border-radius:12px;
42
+ padding:18px;
43
+ box-shadow: 0 6px 24px rgba(2,6,23,0.6);
44
+ border:1px solid rgba(255,255,255,0.03);
45
+ }
46
+ h1{font-size:18px;margin:0 0 12px 0}
47
+ label{display:block;font-size:13px;color:var(--muted);margin-top:8px}
48
+ .row{display:flex;gap:8px;align-items:center}
49
+ input[type="text"], select, input[type="number"]{
50
+ width:100%;
51
+ padding:8px 10px;
52
+ border-radius:8px;
53
+ border:1px solid rgba(255,255,255,0.04);
54
+ background:var(--glass);
55
+ color:inherit;
56
+ font-size:14px;
57
+ }
58
+ input[type="color"]{width:48px;height:42px;padding:0;border-radius:8px;border:0}
59
+ .controls{display:grid;grid-template-columns:1fr 1fr;gap:10px}
60
+ canvas{
61
+ width:100%;
62
+ height:380px;
63
+ display:block;
64
+ background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02));
65
+ border-radius:10px;
66
+ border:1px solid rgba(255,255,255,0.03);
67
+ }
68
+ .actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
69
+ button{
70
+ background:linear-gradient(90deg,var(--accent),#4c1d95);
71
+ color:white;padding:10px 14px;border-radius:10px;border:0;font-weight:600;cursor:pointer;
72
+ box-shadow: 0 6px 18px rgba(124,58,237,0.12);
73
+ }
74
+ .muted{color:var(--muted);font-size:13px;margin-top:6px}
75
+ .small{font-size:13px;padding:6px 8px;border-radius:8px;background:rgba(255,255,255,0.02);border:1px solid rgba(255,255,255,0.02)}
76
+ footer{font-size:12px;color:var(--muted);margin-top:10px}
77
+ @media (max-width:980px){
78
+ .wrap{grid-template-columns:1fr; padding-bottom:30px}
79
+ canvas{height:320px}
80
+ }
81
+ </style>
82
+ </head>
83
+ <body>
84
+ <div class="wrap">
85
+ <!-- Left: Controls -->
86
+ <div class="panel">
87
+ <h1>Reiker Gamer — Logo Generator</h1>
88
+ <div>
89
+ <label>Brand Text</label>
90
+ <input id="brandText" type="text" value="Reiker Gamer" maxlength="24">
91
+
92
+ <label>Font</label>
93
+ <select id="fontSelect" class="small">
94
+ <option value="Orbitron, sans-serif">Orbitron (Gamer)</option>
95
+ <option value="Bangers, cursive">Bangers (Bold)</option>
96
+ <option value="Poppins, sans-serif">Poppins (Modern)</option>
97
+ </select>
98
+
99
+ <label class="row">Gradient Colors <span style="margin-left:auto;font-size:12px;color:var(--muted)">Left → Right</span></label>
100
+ <div class="row">
101
+ <input id="colorA" type="color" value="#7c3aed">
102
+ <input id="colorB" type="color" value="#06b6d4">
103
+ <input id="bgColor" type="color" value="#071129" title="Background color" style="margin-left:8px">
104
+ </div>
105
+
106
+ <label class="row">Badge Shape</label>
107
+ <div class="row" style="margin-top:6px">
108
+ <select id="shape" class="small">
109
+ <option value="none">No Badge</option>
110
+ <option value="circle">Circle</option>
111
+ <option value="shield">Shield</option>
112
+ <option value="hex">Hexagon</option>
113
+ </select>
114
+ <select id="iconStyle" class="small">
115
+ <option value="none">No Icon</option>
116
+ <option value="headset">Headset</option>
117
+ <option value="controller">Controller</option>
118
+ <option value="eye">Fierce Eye</option>
119
+ </select>
120
+ </div>
121
+
122
+ <label class="row">Effects</label>
123
+ <div class="controls">
124
+ <div>
125
+ <label>Glow Intensity <span class="muted" id="glowLabel">0.8</span></label>
126
+ <input id="glow" type="range" min="0" max="2" step="0.05" value="0.8">
127
+ </div>
128
+ <div>
129
+ <label>Shadow Blur <span class="muted" id="shLabel">10</span></label>
130
+ <input id="shadow" type="range" min="0" max="40" step="1" value="10">
131
+ </div>
132
+ </div>
133
+
134
+ <label class="row">Sizes / Export</label>
135
+ <div class="row" style="margin-top:6px">
136
+ <input id="canvasW" type="number" value="1200" min="400" class="small" style="width:120px" />
137
+ <input id="canvasH" type="number" value="600" min="200" class="small" style="width:120px" />
138
+ <button id="resizeBtn" style="background:#0ea5a4">Resize</button>
139
+ </div>
140
+
141
+ <div class="actions">
142
+ <button id="downloadPng">Download PNG</button>
143
+ <button id="downloadSvg">Download SVG</button>
144
+ <button id="randomBtn" style="background:#f59e0b">Surprise Me</button>
145
+ <button id="resetBtn" style="background:#334155">Reset</button>
146
+ </div>
147
+
148
+ <div class="muted">
149
+ Tip: Use "VIP" or "Gamer Tag" as text. SVG preserves vector quality for large prints.
150
+ </div>
151
+ <footer>Made for <strong>Reiker Gamer</strong> — tweak colors, shapes, and download. 🎮</footer>
152
+ </div>
153
+ </div>
154
+
155
+ <!-- Right: Canvas preview -->
156
+ <div class="panel" style="display:flex;flex-direction:column;gap:12px">
157
+ <canvas id="preview" width="1200" height="600"></canvas>
158
+ <div class="row" style="justify-content:space-between;align-items:center">
159
+ <div class="muted">Preview — live render</div>
160
+ <div class="muted">Canvas: <span id="csize">1200×600</span></div>
161
+ </div>
162
+ </div>
163
+ </div>
164
+
165
+ <script>
166
+ // Helpers and UI elements
167
+ const canvas = document.getElementById('preview');
168
+ const ctx = canvas.getContext('2d', { alpha: false });
169
+ const brandText = document.getElementById('brandText');
170
+ const colorA = document.getElementById('colorA');
171
+ const colorB = document.getElementById('colorB');
172
+ const bgColor = document.getElementById('bgColor');
173
+ const fontSelect = document.getElementById('fontSelect');
174
+ const glow = document.getElementById('glow');
175
+ const shadow = document.getElementById('shadow');
176
+ const shape = document.getElementById('shape');
177
+ const iconStyle = document.getElementById('iconStyle');
178
+ const downloadPng = document.getElementById('downloadPng');
179
+ const downloadSvg = document.getElementById('downloadSvg');
180
+ const randomBtn = document.getElementById('randomBtn');
181
+ const resetBtn = document.getElementById('resetBtn');
182
+ const resizeBtn = document.getElementById('resizeBtn');
183
+ const canvasW = document.getElementById('canvasW');
184
+ const canvasH = document.getElementById('canvasH');
185
+ const csize = document.getElementById('csize');
186
+ const glowLabel = document.getElementById('glowLabel');
187
+ const shLabel = document.getElementById('shLabel');
188
+
189
+ // Retina scaling function
190
+ function setCanvasSize(w,h){
191
+ const dpr = Math.max(1, window.devicePixelRatio || 1);
192
+ canvas.width = Math.round(w * dpr);
193
+ canvas.height = Math.round(h * dpr);
194
+ canvas.style.width = w + 'px';
195
+ canvas.style.height = h + 'px';
196
+ ctx.setTransform(dpr,0,0,dpr,0,0);
197
+ csize.textContent = `${w}×${h}`;
198
+ }
199
+ setCanvasSize(1200,600);
200
+
201
+ // Default render
202
+ function drawLogo(){
203
+ const w = canvas.width / (window.devicePixelRatio || 1);
204
+ const h = canvas.height / (window.devicePixelRatio || 1);
205
+
206
+ // background
207
+ ctx.fillStyle = bgColor.value;
208
+ ctx.fillRect(0,0,w,h);
209
+
210
+ // gradient text and badge
211
+ const grad = ctx.createLinearGradient(0,0,w,0);
212
+ grad.addColorStop(0, colorA.value);
213
+ grad.addColorStop(1, colorB.value);
214
+
215
+ // Badge drawing
216
+ if(shape.value !== 'none'){
217
+ drawBadge(shape.value, w, h);
218
+ }
219
+
220
+ // glow/shadow settings
221
+ const g = parseFloat(glow.value);
222
+ const sh = parseFloat(shadow.value);
223
+
224
+ // big brand text
225
+ const fontFamily = fontSelect.value;
226
+ const baseSize = Math.round(Math.min(w, h) * 0.18);
227
+ ctx.font = `900 ${baseSize}px ${fontFamily}`;
228
+ ctx.textAlign = 'center';
229
+ ctx.textBaseline = 'middle';
230
+
231
+ // text shadow (glow)
232
+ ctx.shadowColor = hexToRgba(colorB.value, 0.85);
233
+ ctx.shadowBlur = g * 32 + sh * 0.3;
234
+ ctx.fillStyle = grad;
235
+
236
+ // stroke for separation
237
+ ctx.lineWidth = Math.max(2, Math.floor(baseSize * 0.04));
238
+ ctx.strokeStyle = 'rgba(0,0,0,0.45)';
239
+ ctx.strokeText(brandText.value, w*0.63, h*0.52);
240
+ ctx.fillText(brandText.value, w*0.63, h*0.52);
241
+
242
+ // small tagline
243
+ ctx.shadowBlur = 0;
244
+ ctx.font = `600 ${Math.round(baseSize*0.28)}px ${fontFamily}`;
245
+ ctx.fillStyle = 'rgba(255,255,255,0.88)';
246
+ ctx.fillText('GAMER', w*0.63, h*0.68);
247
+
248
+ // optional icon overlay (on left badge)
249
+ if(iconStyle.value !== 'none' && shape.value !== 'none'){
250
+ drawIcon(iconStyle.value, w, h);
251
+ }
252
+ }
253
+
254
+ // Badge shapes
255
+ function drawBadge(type, w, h){
256
+ const cx = w*0.25;
257
+ const cy = h*0.5;
258
+ const radius = Math.min(w,h)*0.28;
259
+ ctx.save();
260
+ ctx.translate(cx,cy);
261
+
262
+ // background radial glow
263
+ const rg = ctx.createRadialGradient(0,0,radius*0.1,0,0,radius*1.1);
264
+ rg.addColorStop(0, hexToRgba(colorA.value,0.45));
265
+ rg.addColorStop(1, hexToRgba(colorB.value,0.05));
266
+ ctx.fillStyle = rg;
267
+ ctx.beginPath();
268
+ ctx.ellipse(0,0,radius*1.15,radius*0.8,0,0,Math.PI*2);
269
+ ctx.fill();
270
+
271
+ // shape
272
+ ctx.fillStyle = hexToRgba('#0b1220', 0.85);
273
+ ctx.strokeStyle = hexToRgba('#ffffff', 0.06);
274
+ ctx.lineWidth = 2;
275
+
276
+ if(type === 'circle'){
277
+ ctx.beginPath(); ctx.arc(0,0,radius,0,Math.PI*2); ctx.fill(); ctx.stroke();
278
+ } else if(type === 'shield'){
279
+ // simple shield
280
+ const w2 = radius*0.9;
281
+ ctx.beginPath();
282
+ ctx.moveTo(-w2*0.9, -radius*0.7);
283
+ ctx.lineTo(w2*0.9, -radius*0.7);
284
+ ctx.lineTo(w2*0.9, radius*0.1);
285
+ ctx.quadraticCurveTo(0, radius*1.1, -w2*0.9, radius*0.1);
286
+ ctx.closePath();
287
+ ctx.fill(); ctx.stroke();
288
+ } else if(type === 'hex'){
289
+ ctx.beginPath();
290
+ for(let i=0;i<6;i++){
291
+ const a = Math.PI/3 * i - Math.PI/6;
292
+ const x = Math.cos(a)*radius;
293
+ const y = Math.sin(a)*radius*0.8;
294
+ if(i===0) ctx.moveTo(x,y); else ctx.lineTo(x,y);
295
+ }
296
+ ctx.closePath(); ctx.fill(); ctx.stroke();
297
+ }
298
+
299
+ ctx.restore();
300
+ }
301
+
302
+ // Simple icons (vector-like)
303
+ function drawIcon(name, w, h){
304
+ const cx = w*0.25;
305
+ const cy = h*0.5;
306
+ const size = Math.min(w,h)*0.14;
307
+ ctx.save();
308
+ ctx.translate(cx,cy);
309
+ ctx.fillStyle = colorB.value;
310
+ ctx.strokeStyle = hexToRgba('#000',0.45);
311
+ ctx.lineWidth = Math.max(2, Math.floor(size*0.06));
312
+ if(name === 'headset'){
313
+ // ear cups
314
+ ctx.beginPath();
315
+ ctx.ellipse(-size*0.4,0,size*0.36,size*0.46,0,0,Math.PI*2);
316
+ ctx.ellipse(size*0.4,0,size*0.36,size*0.46,0,0,Math.PI*2);
317
+ ctx.fill();
318
+ // band
319
+ ctx.beginPath(); ctx.moveTo(-size, -size*0.45); ctx.quadraticCurveTo(0, -size*0.95, size, -size*0.45); ctx.stroke();
320
+ // mic
321
+ ctx.beginPath(); ctx.moveTo(size*0.6,size*0.2); ctx.lineTo(size*1.05,size*0.45); ctx.stroke();
322
+ } else if(name === 'controller'){
323
+ // base shape
324
+ ctx.beginPath();
325
+ ctx.moveTo(-size*0.9,0);
326
+ ctx.quadraticCurveTo(-size*0.6,-size*0.6, -size*0.1,-size*0.5);
327
+ ctx.quadraticCurveTo(size*0.1,-size*0.6, size*0.4,-size*0.35);
328
+ ctx.quadraticCurveTo(size*0.9,-size*0.05, size*0.9,size*0.35);
329
+ ctx.quadraticCurveTo(size*0.6,size*0.7, 0,size*0.6);
330
+ ctx.quadraticCurveTo(-size*0.25,size*0.75, -size*0.6,size*0.45);
331
+ ctx.closePath();
332
+ ctx.fill();
333
+ // buttons
334
+ ctx.fillStyle = '#fff';
335
+ ctx.beginPath(); ctx.arc(size*0.45,-size*0.05,size*0.06,0,Math.PI*2); ctx.fill();
336
+ ctx.beginPath(); ctx.arc(size*0.2, size*0.06,size*0.06,0,Math.PI*2); ctx.fill();
337
+ ctx.fillStyle = colorB.value;
338
+ } else if(name === 'eye'){
339
+ ctx.beginPath();
340
+ ctx.ellipse(0,0,size*0.9,size*0.5,0,0,Math.PI*2);
341
+ ctx.fill();
342
+ ctx.fillStyle = '#fff';
343
+ ctx.beginPath(); ctx.ellipse(0,0,size*0.36,size*0.36,0,0,Math.PI*2); ctx.fill();
344
+ ctx.fillStyle = '#000';
345
+ ctx.beginPath(); ctx.ellipse(0,0,size*0.12,size*0.12,0,0,Math.PI*2); ctx.fill();
346
+ }
347
+ ctx.restore();
348
+ }
349
+
350
+ // tiny util
351
+ function hexToRgba(hex, alpha=1){
352
+ const c = hex.replace('#','');
353
+ const bigint = parseInt(c, 16);
354
+ const r = (bigint >> 16) & 255;
355
+ const g = (bigint >> 8) & 255;
356
+ const b = bigint & 255;
357
+ return `rgba(${r},${g},${b},${alpha})`;
358
+ }
359
+
360
+ // SVG generation - builds a simple SVG that approximates the canvas look
361
+ function buildSVG(){
362
+ const w = parseInt(canvas.style.width);
363
+ const h = parseInt(canvas.style.height);
364
+
365
+ const fontFamily = fontSelect.options[fontSelect.selectedIndex].text;
366
+ const brand = escapeXml(brandText.value);
367
+ const gradId = 'g1';
368
+ const svg = [];
369
+ svg.push(`<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}" viewBox="0 0 ${w} ${h}">`);
370
+ svg.push(`<defs>`);
371
+ svg.push(`<linearGradient id="${gradId}" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" stop-color="${colorA.value}"/><stop offset="100%" stop-color="${colorB.value}"/></linearGradient>`);
372
+ svg.push(`</defs>`);
373
+ svg.push(`<rect width="${w}" height="${h}" fill="${bgColor.value}"/>`);
374
+
375
+ // badge (simple circle/shield/hex)
376
+ if(shape.value !== 'none'){
377
+ const cx = Math.round(w*0.25), cy = Math.round(h*0.5);
378
+ const r = Math.round(Math.min(w,h)*0.28);
379
+ if(shape.value === 'circle'){
380
+ svg.push(`<circle cx="${cx}" cy="${cy}" r="${r}" fill="#0b1220" stroke="rgba(255,255,255,0.06)" stroke-width="2"/>`);
381
+ } else if(shape.value === 'shield'){
382
+ // approximate shield path
383
+ const p = `${cx - r*0.9},${cy - r*0.7} ${cx + r*0.9},${cy - r*0.7} ${cx + r*0.9},${cy + r*0.1} ${cx},${cy + r*1.1} ${cx - r*0.9},${cy + r*0.1}`;
384
+ svg.push(`<path d="M ${p} Z" fill="#0b1220" stroke="rgba(255,255,255,0.06)" stroke-width="2"/>`);
385
+ } else if(shape.value === 'hex'){
386
+ let pts = [];
387
+ for(let i=0;i<6;i++){
388
+ const a = Math.PI/3 * i - Math.PI/6;
389
+ const x = Math.cos(a)*r + cx;
390
+ const y = Math.sin(a)*r*0.8 + cy;
391
+ pts.push(`${x},${y}`);
392
+ }
393
+ svg.push(`<polygon points="${pts.join(' ')}" fill="#0b1220" stroke="rgba(255,255,255,0.06)" stroke-width="2"/>`);
394
+ }
395
+ }
396
+
397
+ // text (center-right)
398
+ const fontFamilyCss = (fontSelect.value.split(',')[0]);
399
+ const fontSize = Math.round(Math.min(w,h)*0.18);
400
+ svg.push(`<text x="${Math.round(w*0.63)}" y="${Math.round(h*0.52)}" text-anchor="middle" dominant-baseline="middle" font-family="${fontFamilyCss}" font-weight="900" font-size="${fontSize}" fill="url(#${gradId})" stroke="rgba(0,0,0,0.45)" stroke-width="${Math.max(1,Math.floor(fontSize*0.04))}">${brand}</text>`);
401
+ svg.push(`<text x="${Math.round(w*0.63)}" y="${Math.round(h*0.68)}" text-anchor="middle" dominant-baseline="middle" font-family="${fontFamilyCss}" font-weight="600" font-size="${Math.round(fontSize*0.28)}" fill="rgba(255,255,255,0.9)">GAMER</text>`);
402
+
403
+ svg.push(`</svg>`);
404
+ return svg.join('');
405
+ }
406
+
407
+ function escapeXml(str){ return str.replace(/[<&>'"]/g, function(c){ return {'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&apos;'}[c]; }); }
408
+
409
+ // download helpers
410
+ function downloadBlob(blob, filename){
411
+ const url = URL.createObjectURL(blob);
412
+ const a = document.createElement('a');
413
+ a.href = url; a.download = filename; document.body.appendChild(a); a.click();
414
+ setTimeout(()=>{ URL.revokeObjectURL(url); a.remove(); }, 500);
415
+ }
416
+
417
+ // Draw initial
418
+ drawLogo();
419
+
420
+ // UI events
421
+ [brandText, colorA, colorB, bgColor, fontSelect, glow, shadow, shape, iconStyle].forEach(el=>{
422
+ el.addEventListener('input', () => { drawLogo(); glowLabel.textContent = glow.value; shLabel.textContent = shadow.value; });
423
+ });
424
+
425
+ downloadPng.addEventListener('click', ()=>{
426
+ // create a PNG from canvas
427
+ const dataUrl = canvas.toDataURL('image/png');
428
+ fetch(dataUrl).then(res=>res.blob()).then(blob=>downloadBlob(blob, `reiker_gamer.png`));
429
+ });
430
+
431
+ downloadSvg.addEventListener('click', ()=>{
432
+ const svg = buildSVG();
433
+ const blob = new Blob([svg], {type:'image/svg+xml;charset=utf-8'});
434
+ downloadBlob(blob, 'reiker_gamer.svg');
435
+ });
436
+
437
+ randomBtn.addEventListener('click', ()=>{
438
+ // randomize a few settings
439
+ const colors = ['#ef4444','#f97316','#f59e0b','#06b6d4','#7c3aed','#06b6d4','#06b6d4','#ef4444','#14b8a6'];
440
+ colorA.value = colors[Math.floor(Math.random()*colors.length)];
441
+ colorB.value = colors[Math.floor(Math.random()*colors.length)];
442
+ shape.value = ['none','circle','shield','hex'][Math.floor(Math.random()*4)];
443
+ iconStyle.value = ['none','headset','controller','eye'][Math.floor(Math.random()*4)];
444
+ brandText.value = ['Reiker','ReikerG','REIKER','Reiker Gamer','Reik3r'][Math.floor(Math.random()*5)];
445
+ fontSelect.value = ['Orbitron, sans-serif','Bangers, cursive','Poppins, sans-serif'][Math.floor(Math.random()*3)];
446
+ glow.value = (Math.random()*1.2+0.2).toFixed(2);
447
+ shadow.value = Math.floor(Math.random()*28);
448
+ drawLogo();
449
+ });
450
+
451
+ resetBtn.addEventListener('click', ()=>{
452
+ brandText.value = 'Reiker Gamer';
453
+ colorA.value = '#7c3aed';
454
+ colorB.value = '#06b6d4';
455
+ bgColor.value = '#071129';
456
+ fontSelect.value = 'Orbitron, sans-serif';
457
+ glow.value = 0.8;
458
+ shadow.value = 10;
459
+ shape.value = 'circle';
460
+ iconStyle.value = 'headset';
461
+ canvasW.value = 1200; canvasH.value = 600;
462
+ setCanvasSize(1200,600);
463
+ drawLogo();
464
+ });
465
+
466
+ resizeBtn.addEventListener('click', ()=>{
467
+ const w = Math.max(400, parseInt(canvasW.value) || 1200);
468
+ const h = Math.max(200, parseInt(canvasH.value) || 600);
469
+ setCanvasSize(w,h);
470
+ drawLogo();
471
+ });
472
+
473
+ // keep canvas responsive on window resize (scale only display size)
474
+ window.addEventListener('resize', () => {
475
+ // no auto-resize of actual canvas to retain export size
476
+ });
477
+
478
+ // initial defaults
479
+ resetBtn.click();
480
+ </script>
481
+ </body>
482
+ </html>