-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
242 lines (217 loc) · 8.31 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
237
238
239
240
241
242
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stim Webtoys Library</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;500;700&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<style>
:root {
--bg-color: #0d0d0d;
--text-color: #e0ffe0;
--accent-color: #4ceea7;
--card-bg: rgba(255, 255, 255, 0.05);
--hover-bg: rgba(255, 255, 255, 0.1);
}
body, html {
margin: 0;
padding: 0;
font-family: 'Space Grotesk', sans-serif;
background: linear-gradient(135deg, #0d0d0d 0%, #1c1c1c 100%);
color: var(--text-color);
overflow-x: hidden;
}
#bg-canvas {
position: fixed;
top: 0;
left: 0;
z-index: -1;
}
.content {
position: relative;
z-index: 1;
padding: 2rem;
}
header {
text-align: center;
margin-bottom: 2rem;
}
h1 {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 1rem;
background: linear-gradient(45deg, var(--accent-color), #ff77ff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.webtoy-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
max-width: 1400px;
margin: 0 auto;
}
.webtoy-card {
background: var(--card-bg);
border-radius: 15px;
padding: 2rem;
transition: all 0.3s ease;
text-align: center;
cursor: pointer;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.webtoy-card:hover {
background: var(--hover-bg);
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0, 255, 170, 0.2);
}
.webtoy-card h3 {
font-size: 1.5rem;
margin-bottom: 1rem;
color: var(--accent-color);
}
.webtoy-card p {
font-size: 0.9rem;
opacity: 0.8;
}
footer {
text-align: center;
margin-top: 3rem;
padding: 1rem;
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(5px);
}
.cursor, .cursor-follower {
pointer-events: none;
position: fixed;
border-radius: 50%;
z-index: 9999;
}
.cursor {
width: 20px;
height: 20px;
border: 2px solid var(--accent-color);
transition: all 0.1s ease;
}
.cursor-follower {
width: 40px;
height: 40px;
background: rgba(0, 255, 170, 0.2);
transition: all 0.3s ease;
}
@media (max-width: 768px) {
h1 {
font-size: 2rem;
}
.webtoy-container {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<canvas id="bg-canvas"></canvas>
<div class="cursor"></div>
<div class="cursor-follower"></div>
<div class="content">
<header>
<h1>Stim Webtoys Library</h1>
<p>Explore a collection of interactive visual experiences to engage your senses and spark creativity.</p>
</header>
<main class="webtoy-container">
<div class="webtoy-card">
<h3><a href="3dtoy.html">3D Toy</a></h3>
<p>Dive into a twisting 3D tunnel that responds to sound.</p>
</div>
<div class="webtoy-card">
<h3><a href="brand.html">Star Guitar Visualizer</a></h3>
<p>A visual journey inspired by an iconic music video, synced to your music.</p>
</div>
<div class="webtoy-card">
<h3><a href="defrag.html">Defrag Visualizer</a></h3>
<p>A nostalgic, sound-reactive visualizer evoking old defragmentation screens.</p>
</div>
<div class="webtoy-card">
<h3><a href="evol.html">Evolutionary Weirdcore</a></h3>
<p>Watch surreal landscapes evolve with fractals and glitches that react to music.</p>
</div>
<div class="webtoy-card">
<h3><a href="multi.html">Multi-Capability Visualizer</a></h3>
<p>Shapes and lights move with both sound and device motion.</p>
</div>
<div class="webtoy-card">
<h3><a href="seary.html">Trippy Synesthetic Visualizer</a></h3>
<p>Blend audio and visuals in a rich synesthetic experience.</p>
</div>
<div class="webtoy-card">
<h3><a href="sgpat.html">Pattern Recognition Visualizer</a></h3>
<p>See patterns form dynamically in response to sound.</p>
</div>
<div class="webtoy-card">
<h3><a href="svgtest.html">SVG + Three.js Visualizer</a></h3>
<p>A hybrid visualizer blending 2D and 3D elements, reacting in real time.</p>
</div>
<div class="webtoy-card">
<h3><a href="symph.html">Dreamy Spectrograph</a></h3>
<p>A relaxing spectrograph that moves gently with your audio.</p>
</div>
<div class="webtoy-card">
<h3><a href="words.html">Interactive Word Cloud</a></h3>
<p>Speak and watch the word cloud react and shift with your voice.</p>
</div>
</main>
<footer>
<p>Curious about how these work? <a href="https://github.com/zz-plant/stims" target="_blank" rel="noopener noreferrer">Check out our open-source project.</a></p>
</footer>
</div>
<script>
// Three.js background
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
const renderer = new THREE.WebGLRenderer({ canvas: document.getElementById('bg-canvas'), alpha: true });
renderer.setSize(window.innerWidth, window.innerHeight);
const geometry = new THREE.TorusKnotGeometry(10, 3, 100, 16);
const material = new THREE.MeshBasicMaterial({ color: 0x00ffaa, wireframe: true });
const torusKnot = new THREE.Mesh(geometry, material);
scene.add(torusKnot);
camera.position.z = 30;
function animate() {
requestAnimationFrame(animate);
torusKnot.rotation.x += 0.01;
torusKnot.rotation.y += 0.01;
renderer.render(scene, camera);
}
animate();
// Custom cursor
const cursor = document.querySelector('.cursor');
const cursorFollower = document.querySelector('.cursor-follower');
document.addEventListener('mousemove', (e) => {
cursor.style.left = e.clientX + 'px';
cursor.style.top = e.clientY + 'px';
setTimeout(() => {
cursorFollower.style.left = e.clientX + 'px';
cursorFollower.style.top = e.clientY + 'px';
}, 100);
});
// Hover effect for cards
document.querySelectorAll('.webtoy-card').forEach(card => {
card.addEventListener('mouseenter', () => {
cursor.style.transform = 'scale(1.5)';
cursorFollower.style.transform = 'scale(1.5)';
});
card.addEventListener('mouseleave', () => {
cursor.style.transform = 'scale(1)';
cursorFollower.style.transform = 'scale(1)';
});
});
// Responsive canvas
window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});
</script>
</body>
</html>