-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhero_gen.html
More file actions
128 lines (113 loc) · 3.23 KB
/
Copy pathhero_gen.html
File metadata and controls
128 lines (113 loc) · 3.23 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hero Generator</title>
<script>p5.disableFriendlyErrors = true;</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.3/p5.min.js"></script>
<style>
html, body { margin: 0; padding: 0; overflow: hidden; background: #0a0a0f; }
canvas { display: block; }
</style>
</head>
<body>
<script>
const CONFIG = { seed: 42, particles: 180 };
const PALETTE = {
neon1: '#00f0ff',
neon2: '#bf00ff',
neon3: '#00ff88',
accent: '#ff0080'
};
let particles = [];
let t = 0;
function setup() {
createCanvas(1200, 630);
randomSeed(CONFIG.seed);
noiseSeed(CONFIG.seed);
colorMode(RGB, 255, 255, 255, 255);
noStroke();
for (let i = 0; i < CONFIG.particles; i++) {
particles.push({
x: random(width),
y: random(height),
vx: random(-0.3, 0.3),
vy: random(-0.3, 0.3),
size: random(1.5, 4),
hue: random([PALETTE.neon1, PALETTE.neon2, PALETTE.neon3, PALETTE.accent]),
phase: random(TWO_PI),
});
}
}
function draw() {
// Dark background
background(10, 10, 15);
t += 0.008;
// Draw connections
for (let i = 0; i < particles.length; i++) {
let p = particles[i];
for (let j = i + 1; j < particles.length; j++) {
let q = particles[j];
let dx = p.x - q.x;
let dy = p.y - q.y;
let dist = Math.sqrt(dx * dx + dy * dy);
if (dist < 120) {
let alpha = map(dist, 0, 120, 80, 0);
let n = noise((p.x + q.x) * 0.005, (p.y + q.y) * 0.005, t);
let c = n > 0.5 ? color(0, 240, 255, alpha) : n > 0.3 ? color(191, 0, 255, alpha) : color(0, 255, 136, alpha);
stroke(c);
strokeWeight(0.5);
line(p.x, p.y, q.x, q.y);
}
}
}
// Draw particles
noStroke();
for (let p of particles) {
let n = noise(p.x * 0.003, p.y * 0.003, t + p.phase);
let pulse = Math.sin(t * 2 + p.phase) * 0.3 + 0.7;
let sz = p.size * pulse;
// Glow layers
fill(red(p.hue), green(p.hue), blue(p.hue), 30);
ellipse(p.x, p.y, sz * 6);
fill(red(p.hue), green(p.hue), blue(p.hue), 60);
ellipse(p.x, p.y, sz * 3);
fill(red(p.hue), green(p.hue), blue(p.hue), 200);
ellipse(p.x, p.y, sz);
fill(255);
ellipse(p.x, p.y, sz * 0.5);
// Move
p.x += p.vx + Math.sin(t + p.phase) * 0.2;
p.y += p.vy + Math.cos(t + p.phase) * 0.15;
if (p.x < -10) p.x = width + 10;
if (p.x > width + 10) p.x = -10;
if (p.y < -10) p.y = height + 10;
if (p.y > height + 10) p.y = -10;
}
// Center text
textAlign(CENTER, CENTER);
textFont('Georgia');
// Glow text
drawingContext.filter = 'blur(6px)';
fill(0, 240, 255, 150);
textSize(80);
text('DAILY', width / 2, height / 2 - 15);
drawingContext.filter = 'none';
fill(255, 255, 255, 240);
textSize(80);
text('DAILY', width / 2, height / 2 - 15);
fill(0, 240, 255, 200);
textSize(14);
textFont('Arial');
text('AI · Web3 · Claw · OPC · GitHub Trending', width / 2, height / 2 + 50);
if (frameCount === 3) {
setTimeout(() => {
saveCanvas('hero_output', 'png');
window._done = true;
}, 200);
}
}
</script>
</body>
</html>