feat: Add 19 visualizer shapes (headphones, invader, gamepad, saturn, etc.)

This commit is contained in:
Jannik committed 2026-09-07 18:16:33 +02:00
1 parent 6a1801ed92
commit b83cf678d0
4 files changed
+643

No files matched your search

+348
View File
@@ -807,6 +807,354 @@
const a = start + i * step;
verts.push({ x: Math.cos(a) * r, y: Math.sin(a) * r });
}
} else if (shape === 'headphones') {
verts = [
{ x: 0, y: -0.88 },
{ x: 0.35, y: -0.84 },
{ x: 0.65, y: -0.65 },
{ x: 0.72, y: -0.35 },
{ x: 0.92, y: -0.10 },
{ x: 0.92, y: 0.40 },
{ x: 0.72, y: 0.65 },
{ x: 0.52, y: 0.55 },
{ x: 0.46, y: 0.15 },
{ x: 0.50, y: -0.22 },
{ x: 0.25, y: -0.65 },
{ x: 0, y: -0.72 },
{ x: -0.25, y: -0.65 },
{ x: -0.50, y: -0.22 },
{ x: -0.46, y: 0.15 },
{ x: -0.52, y: 0.55 },
{ x: -0.72, y: 0.65 },
{ x: -0.92, y: 0.40 },
{ x: -0.92, y: -0.10 },
{ x: -0.72, y: -0.35 },
{ x: -0.65, y: -0.65 },
{ x: -0.35, y: -0.84 }
];
} else if (shape === 'speaker') {
verts = [
{ x: -0.75, y: -0.30 },
{ x: 0.68, y: -0.75 },
{ x: 0.85, y: -0.45 },
{ x: 0.92, y: 0 },
{ x: 0.85, y: 0.45 },
{ x: 0.68, y: 0.75 },
{ x: -0.42, y: 0.30 },
{ x: -0.42, y: 0.85 },
{ x: -0.65, y: 0.85 },
{ x: -0.65, y: 0.30 },
{ x: -0.75, y: 0.30 }
];
} else if (shape === 'cassette') {
verts = [
{ x: -0.88, y: -0.62 },
{ x: 0.88, y: -0.62 },
{ x: 0.88, y: 0.48 },
{ x: 0.58, y: 0.48 },
{ x: 0.42, y: 0.72 },
{ x: -0.42, y: 0.72 },
{ x: -0.58, y: 0.48 },
{ x: -0.88, y: 0.48 }
];
} else if (shape === 'invader') {
verts = [
{ x: -0.32, y: -0.90 },
{ x: -0.16, y: -0.90 },
{ x: -0.16, y: -0.68 },
{ x: 0.16, y: -0.68 },
{ x: 0.16, y: -0.90 },
{ x: 0.32, y: -0.90 },
{ x: 0.32, y: -0.68 },
{ x: 0.64, y: -0.68 },
{ x: 0.64, y: -0.45 },
{ x: 0.85, y: -0.45 },
{ x: 0.85, y: 0.0 },
{ x: 0.64, y: 0.0 },
{ x: 0.64, y: 0.25 },
{ x: 0.85, y: 0.25 },
{ x: 0.85, y: 0.70 },
{ x: 0.58, y: 0.70 },
{ x: 0.58, y: 0.48 },
{ x: 0.28, y: 0.48 },
{ x: 0.28, y: 0.82 },
{ x: 0.08, y: 0.82 },
{ x: 0.08, y: 0.55 },
{ x: -0.08, y: 0.55 },
{ x: -0.08, y: 0.82 },
{ x: -0.28, y: 0.82 },
{ x: -0.28, y: 0.48 },
{ x: -0.58, y: 0.48 },
{ x: -0.58, y: 0.70 },
{ x: -0.85, y: 0.70 },
{ x: -0.85, y: 0.25 },
{ x: -0.64, y: 0.25 },
{ x: -0.64, y: 0.0 },
{ x: -0.85, y: 0.0 },
{ x: -0.85, y: -0.45 },
{ x: -0.64, y: -0.45 },
{ x: -0.64, y: -0.68 },
{ x: -0.32, y: -0.68 }
];
} else if (shape === 'gamepad') {
verts = [
{ x: 0, y: -0.32 },
{ x: 0.35, y: -0.48 },
{ x: 0.70, y: -0.48 },
{ x: 0.88, y: -0.15 },
{ x: 0.92, y: 0.25 },
{ x: 0.72, y: 0.85 },
{ x: 0.45, y: 0.75 },
{ x: 0.30, y: 0.28 },
{ x: 0, y: 0.18 },
{ x: -0.30, y: 0.28 },
{ x: -0.45, y: 0.75 },
{ x: -0.72, y: 0.85 },
{ x: -0.92, y: 0.25 },
{ x: -0.88, y: -0.15 },
{ x: -0.70, y: -0.48 },
{ x: -0.35, y: -0.48 }
];
} else if (shape === 'saturn') {
const count = 48;
for (let i = 0; i < count; i++) {
const a = (i / count) * Math.PI * 2;
const sphereR = 0.58;
const ringFactor = Math.pow(Math.cos(a), 4);
const r = sphereR + (0.95 - sphereR) * ringFactor;
const rot = -0.22;
const rawX = Math.cos(a) * r;
const rawY = Math.sin(a) * (r * (0.55 + 0.45 * (1 - ringFactor)));
const px = rawX * Math.cos(rot) - rawY * Math.sin(rot);
const py = rawX * Math.sin(rot) + rawY * Math.cos(rot);
verts.push({ x: px, y: py });
}
} else if (shape === 'rocket') {
verts = [
{ x: 0, y: -0.96 },
{ x: 0.22, y: -0.55 },
{ x: 0.36, y: -0.05 },
{ x: 0.40, y: 0.35 },
{ x: 0.82, y: 0.72 },
{ x: 0.52, y: 0.72 },
{ x: 0.24, y: 0.72 },
{ x: 0.16, y: 0.92 },
{ x: -0.16, y: 0.92 },
{ x: -0.24, y: 0.72 },
{ x: -0.52, y: 0.72 },
{ x: -0.82, y: 0.72 },
{ x: -0.40, y: 0.35 },
{ x: -0.36, y: -0.05 },
{ x: -0.22, y: -0.55 }
];
} else if (shape === 'snowflake') {
const arms = 6;
for (let i = 0; i < arms; i++) {
const baseAngle = (i / arms) * Math.PI * 2 - Math.PI / 2;
verts.push({ x: Math.cos(baseAngle) * 0.98, y: Math.sin(baseAngle) * 0.98 });
verts.push({ x: Math.cos(baseAngle + 0.15) * 0.70, y: Math.sin(baseAngle + 0.15) * 0.70 });
verts.push({ x: Math.cos(baseAngle + 0.08) * 0.52, y: Math.sin(baseAngle + 0.08) * 0.52 });
verts.push({ x: Math.cos(baseAngle + Math.PI / arms) * 0.30, y: Math.sin(baseAngle + Math.PI / arms) * 0.30 });
verts.push({ x: Math.cos(baseAngle + (Math.PI * 2 / arms) - 0.08) * 0.52, y: Math.sin(baseAngle + (Math.PI * 2 / arms) - 0.08) * 0.52 });
verts.push({ x: Math.cos(baseAngle + (Math.PI * 2 / arms) - 0.15) * 0.70, y: Math.sin(baseAngle + (Math.PI * 2 / arms) - 0.15) * 0.70 });
}
} else if (shape === 'leaf') {
verts = [
{ x: 0, y: -0.96 },
{ x: 0.15, y: -0.55 },
{ x: 0.48, y: -0.72 },
{ x: 0.28, y: -0.25 },
{ x: 0.85, y: -0.22 },
{ x: 0.35, y: 0.08 },
{ x: 0.70, y: 0.35 },
{ x: 0.16, y: 0.38 },
{ x: 0.06, y: 0.88 },
{ x: -0.06, y: 0.88 },
{ x: -0.16, y: 0.38 },
{ x: -0.70, y: 0.35 },
{ x: -0.35, y: 0.08 },
{ x: -0.85, y: -0.22 },
{ x: -0.28, y: -0.25 },
{ x: -0.48, y: -0.72 },
{ x: -0.15, y: -0.55 }
];
} else if (shape === 'wave') {
verts = [
{ x: -0.88, y: 0.75 },
{ x: -0.65, y: 0.45 },
{ x: -0.30, y: 0.20 },
{ x: 0.15, y: -0.15 },
{ x: 0.55, y: -0.55 },
{ x: 0.72, y: -0.90 },
{ x: 0.50, y: -0.92 },
{ x: 0.25, y: -0.72 },
{ x: 0.38, y: -0.48 },
{ x: 0.20, y: -0.20 },
{ x: 0.10, y: 0.15 },
{ x: 0.45, y: 0.50 },
{ x: 0.88, y: 0.75 }
];
} else if (shape === 'tornado') {
verts = [
{ x: -0.88, y: -0.88 },
{ x: 0.88, y: -0.88 },
{ x: 0.75, y: -0.52 },
{ x: 0.58, y: -0.50 },
{ x: 0.65, y: -0.15 },
{ x: 0.45, y: -0.12 },
{ x: 0.48, y: 0.25 },
{ x: 0.28, y: 0.28 },
{ x: 0.25, y: 0.65 },
{ x: 0.05, y: 0.95 },
{ x: -0.05, y: 0.95 },
{ x: -0.25, y: 0.65 },
{ x: -0.28, y: 0.28 },
{ x: -0.48, y: 0.25 },
{ x: -0.45, y: -0.12 },
{ x: -0.65, y: -0.15 },
{ x: -0.58, y: -0.50 },
{ x: -0.75, y: -0.52 }
];
} else if (shape === 'sword') {
verts = [
{ x: 0, y: -0.98 },
{ x: 0.14, y: -0.75 },
{ x: 0.14, y: 0.22 },
{ x: 0.75, y: 0.24 },
{ x: 0.75, y: 0.34 },
{ x: 0.10, y: 0.34 },
{ x: 0.09, y: 0.72 },
{ x: 0.20, y: 0.78 },
{ x: 0, y: 0.94 },
{ x: -0.20, y: 0.78 },
{ x: -0.09, y: 0.72 },
{ x: -0.10, y: 0.34 },
{ x: -0.75, y: 0.34 },
{ x: -0.75, y: 0.24 },
{ x: -0.14, y: 0.22 },
{ x: -0.14, y: -0.75 }
];
} else if (shape === 'bat') {
verts = [
{ x: 0, y: -0.45 },
{ x: 0.12, y: -0.68 },
{ x: 0.22, y: -0.45 },
{ x: 0.55, y: -0.78 },
{ x: 0.96, y: -0.42 },
{ x: 0.76, y: -0.05 },
{ x: 0.74, y: 0.28 },
{ x: 0.48, y: 0.32 },
{ x: 0.38, y: 0.58 },
{ x: 0.18, y: 0.48 },
{ x: 0, y: 0.78 },
{ x: -0.18, y: 0.48 },
{ x: -0.38, y: 0.58 },
{ x: -0.48, y: 0.32 },
{ x: -0.74, y: 0.28 },
{ x: -0.76, y: -0.05 },
{ x: -0.96, y: -0.42 },
{ x: -0.55, y: -0.78 },
{ x: -0.22, y: -0.45 },
{ x: -0.12, y: -0.68 }
];
} else if (shape === 'wolf') {
verts = [
{ x: 0, y: -0.52 },
{ x: 0.35, y: -0.50 },
{ x: 0.62, y: -0.92 },
{ x: 0.68, y: -0.45 },
{ x: 0.92, y: -0.05 },
{ x: 0.68, y: 0.18 },
{ x: 0.78, y: 0.42 },
{ x: 0.42, y: 0.50 },
{ x: 0.28, y: 0.88 },
{ x: 0, y: 0.95 },
{ x: -0.28, y: 0.88 },
{ x: -0.42, y: 0.50 },
{ x: -0.78, y: 0.42 },
{ x: -0.68, y: 0.18 },
{ x: -0.92, y: -0.05 },
{ x: -0.68, y: -0.45 },
{ x: -0.62, y: -0.92 },
{ x: -0.35, y: -0.50 }
];
} else if (shape === 'axe') {
verts = [
{ x: 0, y: -0.92 },
{ x: 0.18, y: -0.65 },
{ x: 0.88, y: -0.68 },
{ x: 0.94, y: -0.15 },
{ x: 0.88, y: 0.38 },
{ x: 0.20, y: 0.20 },
{ x: 0.12, y: 0.92 },
{ x: -0.12, y: 0.92 },
{ x: -0.20, y: 0.20 },
{ x: -0.88, y: 0.38 },
{ x: -0.94, y: -0.15 },
{ x: -0.88, y: -0.68 },
{ x: -0.18, y: -0.65 }
];
} else if (shape === 'peace') {
const count = 48;
for (let i = 0; i < count; i++) {
const a = (i / count) * Math.PI * 2 - Math.PI / 2;
let r = 0.88;
const dTop = Math.abs(a - (-Math.PI / 2));
const dBot = Math.abs(a - (Math.PI / 2));
const dDiagR = Math.abs(a - (Math.PI * 0.25));
const dDiagL = Math.abs(a - (Math.PI * 0.75));
if (dTop < 0.18 || dBot < 0.18 || dDiagR < 0.18 || dDiagL < 0.18) {
r = 0.98;
}
verts.push({ x: Math.cos(a) * r, y: Math.sin(a) * r });
}
} else if (shape === 'yinyang') {
const count = 64;
for (let i = 0; i < count; i++) {
const a = (i / count) * Math.PI * 2;
const r = 0.74 + 0.22 * Math.sin(a) + 0.08 * Math.cos(2 * a);
verts.push({ x: Math.cos(a) * r, y: Math.sin(a) * r });
}
} else if (shape === 'anchor') {
verts = [
{ x: 0, y: -0.94 },
{ x: 0.18, y: -0.82 },
{ x: 0.08, y: -0.70 },
{ x: 0.65, y: -0.65 },
{ x: 0.65, y: -0.52 },
{ x: 0.12, y: -0.52 },
{ x: 0.12, y: 0.35 },
{ x: 0.88, y: 0.22 },
{ x: 0.78, y: 0.58 },
{ x: 0.38, y: 0.82 },
{ x: 0, y: 0.92 },
{ x: -0.38, y: 0.82 },
{ x: -0.78, y: 0.58 },
{ x: -0.88, y: 0.22 },
{ x: -0.12, y: 0.35 },
{ x: -0.12, y: -0.52 },
{ x: -0.65, y: -0.52 },
{ x: -0.65, y: -0.65 },
{ x: -0.08, y: -0.70 },
{ x: -0.18, y: -0.82 }
];
} else if (shape === 'cat') {
verts = [
{ x: 0, y: -0.48 },
{ x: 0.30, y: -0.48 },
{ x: 0.68, y: -0.92 },
{ x: 0.72, y: -0.35 },
{ x: 0.94, y: 0.05 },
{ x: 0.88, y: 0.48 },
{ x: 0.45, y: 0.82 },
{ x: 0, y: 0.86 },
{ x: -0.45, y: 0.82 },
{ x: -0.88, y: 0.48 },
{ x: -0.94, y: 0.05 },
{ x: -0.72, y: -0.35 },
{ x: -0.68, y: -0.92 },
{ x: -0.30, y: -0.48 }
];
}
SHAPE_VERTICES_CACHE[shape] = verts;
+133
View File
@@ -469,6 +469,139 @@
<span class="shape-label">Hexagramm</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="headphones">
<div class="shape-card-inner">
<span class="shape-icon">🎧</span>
<span class="shape-label">Kopfhörer</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="speaker">
<div class="shape-card-inner">
<span class="shape-icon">📢</span>
<span class="shape-label">Speaker</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="cassette">
<div class="shape-card-inner">
<span class="shape-icon">📼</span>
<span class="shape-label">Kassette</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="invader">
<div class="shape-card-inner">
<span class="shape-icon">👾</span>
<span class="shape-label">Invader</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="gamepad">
<div class="shape-card-inner">
<span class="shape-icon">🎮</span>
<span class="shape-label">Gamepad</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="saturn">
<div class="shape-card-inner">
<span class="shape-icon">🪐</span>
<span class="shape-label">Saturn</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="rocket">
<div class="shape-card-inner">
<span class="shape-icon">🚀</span>
<span class="shape-label">Rakete</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="snowflake">
<div class="shape-card-inner">
<span class="shape-icon">❄️</span>
<span class="shape-label">Schneeflocke</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="leaf">
<div class="shape-card-inner">
<span class="shape-icon">🍃</span>
<span class="shape-label">Blatt</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="wave">
<div class="shape-card-inner">
<span class="shape-icon">🌊</span>
<span class="shape-label">Welle</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="tornado">
<div class="shape-card-inner">
<span class="shape-icon">🌪️</span>
<span class="shape-label">Tornado</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="sword">
<div class="shape-card-inner">
<span class="shape-icon">🗡️</span>
<span class="shape-label">Schwert</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="bat">
<div class="shape-card-inner">
<span class="shape-icon">🦇</span>
<span class="shape-label">Fledermaus</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="wolf">
<div class="shape-card-inner">
<span class="shape-icon">🐺</span>
<span class="shape-label">Wolf</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="axe">
<div class="shape-card-inner">
<span class="shape-icon">🪓</span>
<span class="shape-label">Doppelaxt</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="peace">
<div class="shape-card-inner">
<span class="shape-icon">☮️</span>
<span class="shape-label">Peace</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="yinyang">
<div class="shape-card-inner">
<span class="shape-icon">☯️</span>
<span class="shape-label">Yin Yang</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="anchor">
<div class="shape-card-inner">
<span class="shape-icon">⚓</span>
<span class="shape-label">Anker</span>
</div>
</label>
<label class="shape-card">
<input type="radio" name="shapeType" value="cat">
<div class="shape-card-inner">
<span class="shape-icon">🐱</span>
<span class="shape-label">Katze</span>
</div>
</label>
</div>
</div>
+81
View File
@@ -0,0 +1,81 @@
{
"name": "DJ Studio Headphones",
"icon": "🎧",
"shapeType": "headphones",
"showCover": true,
"coverShape": "circle",
"circleRadius": 155,
"pulseIntensity": 0.6,
"pulseDecay": 0.82,
"showBorder": true,
"borderWidth": 4,
"borderColor": "#bd00ff",
"showProgressRing": true,
"progressRingColor": "#00f0ff",
"progressRingWidth": 4,
"rotationSpeed": 0.6,
"beatSpinImpulse": true,
"showSpectrum": true,
"spectrumMode": "radial_bars",
"linearAlignment": "center_mirrored",
"barCount": 110,
"spectrumMaxHeight": 145,
"barWidth": 3.5,
"barSpacing": 8,
"barCornerRadius": 2,
"freqSensitivity": 1.35,
"freqFocus": "bass_heavy",
"mirrorSpectrum": true,
"stereoSplit": true,
"stereoMode": "split_hemisphere",
"routePulse": "sub_bass",
"routeParticles": "treble",
"routeShake": "sub_bass",
"bpmSync": false,
"bpmValue": 128,
"bpmSyncRotation": false,
"bpmSyncGrid": false,
"enableParticles": true,
"particleType": "sparks",
"particleCount": 120,
"particleSpeed": 1.2,
"particleWarp": 2.0,
"enableGrid": true,
"colorGrid": "#bd00ff",
"gridPerspective": 0.65,
"gridAudioReactive": 0.5,
"enableShake": true,
"camShakeIntensity": 0.35,
"enableGlitch": false,
"rgbSplitIntensity": 0.18,
"beatFlash": true,
"enableBassZoom": true,
"enableVhs": false,
"vhsScanlineIntensity": 0.2,
"vhsNoiseIntensity": 0.1,
"vhsCrtCurvature": false,
"enableAfterglow": true,
"afterglowDecay": 0.8,
"afterglowMode": "magenta_dream",
"colorMode": "gradient_3",
"colorGrad1": "#bd00ff",
"colorGrad2": "#ff007f",
"colorGrad3": "#00f0ff",
"colorParticle": "#e4a4ff",
"gradientStyle": "angular",
"enableGlow": true,
"glowIntensity": 0.88,
"glowBlur": 26,
"laserCore": true,
"backgroundMode": "transparent",
"showTextOverlay": true,
"fontFamily": "'Outfit', sans-serif",
"textPosition": "below_circle",
"titleFontSize": 40,
"artistFontSize": 24,
"textPulseWithBeat": true,
"textGlow": true,
"titleColor": "#ffffff",
"artistColor": "#bd00ff",
"timecodeColor": "#00f0ff"
}
+81
View File
@@ -0,0 +1,81 @@
{
"name": "8-Bit Space Invader",
"icon": "👾",
"shapeType": "invader",
"showCover": true,
"coverShape": "circle",
"circleRadius": 150,
"pulseIntensity": 0.55,
"pulseDecay": 0.8,
"showBorder": true,
"borderWidth": 4,
"borderColor": "#00ff66",
"showProgressRing": true,
"progressRingColor": "#00f0ff",
"progressRingWidth": 4,
"rotationSpeed": 0.5,
"beatSpinImpulse": true,
"showSpectrum": true,
"spectrumMode": "radial_bars",
"linearAlignment": "center_mirrored",
"barCount": 96,
"spectrumMaxHeight": 140,
"barWidth": 4,
"barSpacing": 8,
"barCornerRadius": 0,
"freqSensitivity": 1.3,
"freqFocus": "flat",
"mirrorSpectrum": true,
"stereoSplit": true,
"stereoMode": "split_hemisphere",
"routePulse": "sub_bass",
"routeParticles": "treble",
"routeShake": "sub_bass",
"bpmSync": false,
"bpmValue": 130,
"bpmSyncRotation": false,
"bpmSyncGrid": false,
"enableParticles": true,
"particleType": "starfield",
"particleCount": 110,
"particleSpeed": 1.2,
"particleWarp": 2.2,
"enableGrid": true,
"colorGrid": "#00ff66",
"gridPerspective": 0.7,
"gridAudioReactive": 0.5,
"enableShake": true,
"camShakeIntensity": 0.35,
"enableGlitch": true,
"rgbSplitIntensity": 0.25,
"beatFlash": false,
"enableBassZoom": true,
"enableVhs": true,
"vhsScanlineIntensity": 0.25,
"vhsNoiseIntensity": 0.12,
"vhsCrtCurvature": false,
"enableAfterglow": true,
"afterglowDecay": 0.78,
"afterglowMode": "green_matrix",
"colorMode": "gradient_3",
"colorGrad1": "#00ff66",
"colorGrad2": "#00f0ff",
"colorGrad3": "#ffff00",
"colorParticle": "#00ff88",
"gradientStyle": "angular",
"enableGlow": true,
"glowIntensity": 0.85,
"glowBlur": 24,
"laserCore": true,
"backgroundMode": "transparent",
"showTextOverlay": true,
"fontFamily": "'Outfit', sans-serif",
"textPosition": "below_circle",
"titleFontSize": 38,
"artistFontSize": 22,
"textPulseWithBeat": true,
"textGlow": true,
"titleColor": "#ffffff",
"artistColor": "#00ff66",
"timecodeColor": "#00f0ff"
}