diff options
author | Indrajith K L | 2025-07-01 00:59:26 +0530 |
---|---|---|
committer | Indrajith K L | 2025-07-01 00:59:26 +0530 |
commit | b304a682e8545d8b2458c23963ebe7addd924321 (patch) | |
tree | ca9d839037aafddecce3f04a2bfbb0a8e959abb7 /player.js | |
parent | 849215137a162f2fa6525f7ae56806dff1e77a91 (diff) | |
download | retrowave-player-b304a682e8545d8b2458c23963ebe7addd924321.tar.gz retrowave-player-b304a682e8545d8b2458c23963ebe7addd924321.tar.bz2 retrowave-player-b304a682e8545d8b2458c23963ebe7addd924321.zip |
Adds More Hydra Effects
Diffstat (limited to 'player.js')
-rw-r--r-- | player.js | 696 |
1 files changed, 671 insertions, 25 deletions
@@ -513,41 +513,77 @@ https://retrowave.ru/${musicData.streamUrl} const retroSun = () => { setTimeout(() => { - shape(16, 0.6, 0.02) - .color(1.0, 0.5, 0.0) // Orange/yellow sun - .scale(0.8) + + solid(0.05, 0.0, 0.15) .add( - shape(8, 0.4, 0.05) - .color(1.0, 0.16, 0.46) // Pink inner glow - .scale(0.6), + // Horizontal grid lines + osc(40, 0, 1) + .thresh(0.95) + .color(0.0, 1.0, 1.0) + .rotate(Math.PI / 2) + .scrollY(() => time * 0.2) + .mult( + gradient(1) + .rotate(Math.PI) + .scale(1.3) + ), 0.6 ) .add( - osc(20, 0.01, 0.2) - .color(0.0, 1.0, 1.0) // Cyan horizontal lines - .rotate(Math.PI / 2), - 0.3 + // Vertical perspective grid + osc(20, 0, 1) + .thresh(0.95) + .color(0.0, 0.8, 1.0) + .scrollX(() => time * 0.05) + .mult( + gradient(0.5) + .scale(1.5) + ), + 0.4 ) - .modulateScale( - osc(2, 0.1), - 0.1 + .add( + shape(32, 0.8, 0.01) + .color(1.0, 0.8, 0.2) + .scale(() => 0.12 + Math.sin(time) * 0.015) + .scrollY(-0.25) + .add( + // Sun outer glow + shape(32, 0.9, 0.03) + .color(1.0, 0.4, 0.1) + .scale(() => 0.2 + Math.sin(time * 1.2) * 0.02) + .scrollY(-0.25), + 0.5 + ), + 0.8 ) .add( - gradient(1.0) - .color(0.2, 0.0, 0.4) // Dark purple gradient - .rotate(Math.PI) - .scale(2.0), + // Horizon line glow + solid(1.0, 0.2, 0.6) + .mask( + solid(1) + .scale(1, 0.003) + .scrollY(0.1) + ), + 0.7 + ) + .add( + // Mountain silhouette + noise(0.8, 0.15) + .thresh(0.65) + .color(0.1, 0.05, 0.2) + .scale(2, 0.25) + .scrollY(0.25), 0.4 ) - .contrast(1.8) + .contrast(1.6) .brightness(0.15) + .saturate(1.3) .out(); }, 100); }; const synthWave = () => { setTimeout(() => { - // Animated synthwave with moving grid lines and pulsing elements osc(30, 0, 1) .thresh(0.9) .color(0.0, 1.0, 1.0) // Cyan horizontal lines @@ -592,7 +628,581 @@ https://retrowave.ru/${musicData.streamUrl} }, 100); }; - const hydraEffects = [vernoi, waveyzz, oscRotate, retroSun, synthWave]; + const galaxy = () => { + setTimeout(() => { + noise(3, 0.1) + .rotate(() => time * 0.05) // Slow galaxy rotation + .color(0.6, 0.2, 1.0) // Purple nebula base + .add( + // Bright galaxy core + osc(0.5, 0, 0.8) + .color(1.0, 0.9, 0.6) // Warm golden core + .scale(0.3) + .mult( + shape(32, 0.9, 0.1) + .scale(() => 0.15 + Math.sin(time * 0.8) * 0.05) // Pulsing core + ), + 0.8 + ) + .add( + noise(8, 0.2) + .rotate(() => time * 0.02) + .color(0.2, 0.5, 1.0) // Blue spiral arms + .modulateRotate( + osc(1, 0, 1) + .rotate(() => time * 0.03), // Creates spiral pattern + 2.0 + ) + .mult( + gradient(1.2) + .rotate(() => time * 0.01) + .scale(1.5) + ), + 0.6 + ) + .add( + + noise(50, 0.05) + .thresh(0.92) + .color(1.0, 1.0, 0.9) // Bright white stars + .add( + // Larger brighter stars + noise(25, 0.03) + .thresh(0.95) + .color(0.9, 0.9, 1.0) // Slightly blue-white + .scale(() => 1.0 + Math.sin(time * 3) * 0.1), // Twinkling + 0.7 + ), + 0.4 + ) + .add( + // Pink/red nebula regions + voronoi(8, 0.3) + .color(1.0, 0.3, 0.5) // Pink nebula + .modulateScale( + osc(2, 0.1) + .rotate(() => time * 0.02), + 0.3 + ), + 0.3 + ) + .add( + // Cyan gas clouds + noise(4, 0.15) + .color(0.2, 0.8, 1.0) // Cyan gas + .modulateRotate( + osc(0.8, 0, 1) + .rotate(() => -time * 0.025), + 1.5 + ), + 0.25 + ) + .contrast(1.4) + .brightness(0.1) + .saturate(1.2) + .out(); + }, 100); + }; + + const electricSheep = () => { + setTimeout(() => { + + noise(10, 0.1) + .color(0.2, 0.8, 1.0) // Electric blue + .add( + // Synthetic neural patterns + osc(30, 0.02, 0.6) + .color(1.0, 0.3, 0.8) // Electric pink + .modulateRotate( + osc(4, 0, 1) + .rotate(() => time * 0.1), + Math.PI + ), + 0.7 + ) + .add( + // Memory fragments - geometric shapes + shape(6, 0.8, 0.02) + .color(1.0, 1.0, 0.2) // Electric yellow + .scale(() => 0.3 + Math.sin(time * 2) * 0.2) + .repeat(3, 3) + .modulateKaleid( + osc(1, 0, 1) + .rotate(() => time * 0.05), + 4 + ), + 0.5 + ) + .add( + // Digital rain/glitch lines + osc(100, 0, 1) + .thresh(0.9) + .color(0.0, 1.0, 0.3) // Matrix green + .scrollY(() => time * 2) + .mult( + gradient(1) + .rotate(Math.PI / 2) + ), + 0.4 + ) + .modulatePixelate( + noise(8, 0.1) + .thresh(0.6), + () => 20 + Math.sin(time) * 10 // Glitch pixelation + ) + .contrast(2.0) + .brightness(0.2) + .out(); + }, 100); + }; + + const cyberpunkCity = () => { + setTimeout(() => { + // Neon-soaked cyberpunk cityscape + + // Building silhouettes + solid(0.05, 0.0, 0.15) + .add( + // Neon advertising signs + osc(20, 0, 1) + .thresh(0.8) + .color(1.0, 0.0, 0.5) // Hot pink neon + .scrollY(() => time * 0.5) + .add( + osc(25, 0, 1) + .thresh(0.85) + .color(0.0, 1.0, 1.0) // Cyan neon + .scrollY(() => -time * 0.3) + .scrollX(() => time * 0.2), + 0.6 + ), + 0.8 + ) + .add( + // Holographic displays + voronoi(15, 0.2) + .color(0.2, 1.0, 0.3) // Green hologram + .modulateScale( + osc(3, 0.1) + .rotate(() => time * 0.1), + 0.5 + ) + .mult( + gradient(0.8) + .rotate(() => time * 0.02) + ), + 0.4 + ) + .add( + // Rain/atmosphere + noise(80, 0.05) + .thresh(0.95) + .color(0.6, 0.8, 1.0) // Blue rain + .scrollY(() => time * 3) + .scale(1, 2), + 0.3 + ) + .add( + // Street lights glow + shape(32, 0.9, 0.1) + .color(1.0, 0.6, 0.0) // Orange street light + .scale(() => 0.05 + Math.sin(time * 4) * 0.02) + .repeat(8, 6) + .scrollY(() => time * 0.1), + 0.5 + ) + .contrast(1.8) + .brightness(0.15) + .saturate(1.4) + .out(); + }, 100); + }; + + const digitalDreams = () => { + setTimeout(() => { + // Abstract digital consciousness patterns + + // Neural network base + noise(5, 0.2) + .color(0.8, 0.2, 1.0) // Purple mind + .modulateRotate( + osc(2, 0, 1) + .rotate(() => time * 0.08), + 2.0 + ) + .add( + // Synaptic connections + osc(40, 0.01, 0.3) + .color(0.0, 1.0, 1.0) // Cyan connections + .thresh(0.7) + .modulateKaleid( + osc(1.5, 0, 1), + 8 + ), + 0.7 + ) + .add( + // Memory bubbles + shape(32, 0.8, 0.05) + .color(1.0, 1.0, 0.6) // Golden memories + .scale(() => 0.1 + Math.sin(time * 1.5) * 0.08) + .repeat(4, 4) + .modulateScale( + osc(3, 0.1) + .rotate(() => time * 0.05), + 0.3 + ), + 0.5 + ) + .add( + // Thought streams + osc(15, 0.02, 0.8) + .color(1.0, 0.4, 0.8) // Pink thoughts + .rotate(() => time * 0.1) + .modulateScrollY( + osc(2, 0.1), + 0.5 + ), + 0.4 + ) + .modulateHue( + osc(0.5, 0.2), + 0.3 + ) + .contrast(1.6) + .brightness(0.2) + .out(); + }, 100); + }; + + const quantumStatic = () => { + setTimeout(() => { + // Quantum interference patterns and static + + // Quantum field fluctuations + noise(20, 0.3) + .color(0.5, 0.0, 1.0) // Deep purple quantum + .add( + // Interference patterns + osc(60, 0, 0.8) + .color(0.0, 1.0, 0.8) // Quantum teal + .mult( + osc(40, 0, 0.6) + .color(1.0, 0.2, 0.6) // Quantum pink + .rotate(Math.PI / 4) + ), + 0.8 + ) + .add( + // Probability waves + osc(8, 0.05, 1.0) + .color(1.0, 1.0, 0.3) // Bright quantum yellow + .modulateRotate( + osc(3, 0, 1) + .rotate(() => time * 0.1), + 1.5 + ) + .thresh(() => 0.7 + Math.sin(time * 2) * 0.2), // Fluctuating threshold + 0.6 + ) + .add( + // Particle traces + noise(100, 0.02) + .thresh(0.98) + .color(1.0, 0.8, 1.0) // White particle traces + .scrollX(() => time * 1.5) + .scrollY(() => Math.sin(time) * 0.5), + 0.4 + ) + .modulatePixelate( + noise(5, 0.1), + () => 15 + Math.sin(time * 3) * 10 + ) + .contrast(2.2) + .brightness(0.1) + .out(); + }, 100); + }; + + const johnnyMnemonic = () => { + setTimeout(() => { + // Johnny Mnemonic - data highways and ice breaking + + // Data stream base + noise(15, 0.2) + .color(0.0, 0.8, 0.3) // Matrix green data + .add( + // Ice barriers - crystalline structures + voronoi(20, 0.1) + .color(0.8, 0.9, 1.0) // Ice blue + .thresh(0.6) + .modulateScale( + osc(3, 0.2) + .rotate(() => time * 0.1), + 0.4 + ), + 0.7 + ) + .add( + // Data packets flowing + osc(80, 0, 1) + .thresh(0.85) + .color(1.0, 1.0, 0.0) // Yellow data packets + .scrollX(() => time * 2) + .scrollY(() => Math.sin(time * 0.5) * 0.3) + .mult( + gradient(1) + .rotate(() => time * 0.02) + ), + 0.6 + ) + .add( + // Neural pathways + osc(40, 0.01, 0.5) + .color(1.0, 0.2, 0.8) // Pink neural connections + .modulateRotate( + osc(2, 0, 1) + .rotate(() => time * 0.08), + 1.5 + ), + 0.5 + ) + .add( + // Glitch corruption + noise(100, 0.05) + .thresh(0.95) + .color(1.0, 0.0, 0.0) // Red corruption + .scrollY(() => time * 4) + .modulatePixelate( + noise(8, 0.1), + () => 25 + Math.sin(time * 2) * 15 + ), + 0.4 + ) + .contrast(2.0) + .brightness(0.2) + .saturate(1.3) + .out(); + }, 100); + }; + + const billAndTed = () => { + setTimeout(() => { + // Bill & Ted's Excellent Adventure - time travel vortex + + // Psychedelic time vortex + osc(10, 0.1, 0.8) + .color(1.0, 0.6, 0.0) // Orange 80s glow + .modulateRotate( + osc(1, 0, 1) + .rotate(() => time * 0.2), + 3.0 // Strong spiral effect + ) + .add( + // Time ripples + osc(30, 0.02, 0.6) + .color(0.8, 0.2, 1.0) // Purple time waves + .modulateKaleid( + osc(2, 0, 1), + 6 // Kaleidoscope effect + ), + 0.8 + ) + .add( + // Excellent sparkles + noise(60, 0.03) + .thresh(0.9) + .color(1.0, 1.0, 0.5) // Golden sparkles + .scale(() => 1.0 + Math.sin(time * 3) * 0.2) + .rotate(() => time * 0.3), + 0.6 + ) + .add( + // Phone booth trails + shape(4, 0.9, 0.02) // Square phone booth + .color(0.0, 1.0, 1.0) // Cyan trails + .scale(() => 0.2 + Math.sin(time * 1.5) * 0.1) + .repeat(5, 5) + .modulateScrollX( + osc(1, 0.1), + 0.5 + ), + 0.4 + ) + .add( + // Bogus interference + osc(200, 0, 0.3) + .color(1.0, 0.0, 0.5) // Pink static + .thresh(() => 0.8 + Math.sin(time * 4) * 0.15) + .scrollY(() => time * 1.5), + 0.3 + ) + .modulateHue( + osc(0.5, 0.3), + 0.4 + ) + .contrast(1.8) + .brightness(0.25) + .out(); + }, 100); + }; + + const tronLegacy = () => { + setTimeout(() => { + // Tron Legacy - digital grid world + + // Grid base + solid(0.0, 0.05, 0.1) // Dark blue-black base + .add( + // Main grid lines + osc(40, 0, 1) + .thresh(0.98) + .color(0.0, 0.8, 1.0) // Cyan grid + .add( + osc(40, 0, 1) + .thresh(0.98) + .color(0.0, 0.8, 1.0) + .rotate(Math.PI / 2), + 1.0 + ), + 0.8 + ) + .add( + // Light cycles trails + osc(100, 0, 1) + .thresh(0.95) + .color(1.0, 0.4, 0.0) // Orange light cycle + .scrollX(() => time * 1.5) + .scrollY(() => Math.sin(time * 0.8) * 0.4) + .add( + osc(100, 0, 1) + .thresh(0.95) + .color(0.0, 1.0, 1.0) // Cyan light cycle + .scrollX(() => -time * 1.2) + .scrollY(() => Math.cos(time * 0.6) * 0.3), + 0.7 + ), + 0.7 + ) + .add( + // Identity discs + shape(32, 0.8, 0.02) + .color(1.0, 1.0, 0.6) // Bright disc + .scale(() => 0.15 + Math.sin(time * 2) * 0.05) + .rotate(() => time * 2) + .repeat(3, 3) + .modulateScale( + osc(1, 0.1), + 0.2 + ), + 0.6 + ) + .add( + // Digital de-resolution + noise(8, 0.1) + .thresh(0.7) + .color(0.2, 0.6, 1.0) // Blue pixels + .modulatePixelate( + osc(2, 0.1), + () => 8 + Math.sin(time) * 4 + ), + 0.4 + ) + .add( + // Recognition sequences + osc(20, 0.05, 0.8) + .color(1.0, 0.8, 0.0) // Golden recognition + .thresh(() => 0.6 + Math.sin(time * 3) * 0.3) + .scrollY(() => time * 0.5), + 0.3 + ) + .contrast(2.2) + .brightness(0.15) + .saturate(1.4) + .out(); + }, 100); + }; + + const hitchhikersGuide = () => { + setTimeout(() => { + // Hitchhiker's Guide - infinite improbability and babel fish + + // Improbability field + noise(5, 0.4) + .color(0.9, 0.7, 0.2) // Golden improbability + .modulateRotate( + osc(0.5, 0, 1) + .rotate(() => time * 0.042), // 42 reference + 2.5 + ) + .add( + // Babel fish swimming + shape(8, 0.9, 0.03) // Fish-like shape + .color(1.0, 0.9, 0.0) // Yellow babel fish + .scale(() => 0.1 + Math.sin(time * 1.5) * 0.05) + .repeat(6, 4) + .modulateScrollX( + osc(1, 0.2) + .rotate(() => time * 0.1), + 0.3 + ) + .modulateScrollY( + osc(0.8, 0.1), + 0.2 + ), + 0.7 + ) + .add( + // Infinite loops and paradoxes + voronoi(12, 0.3) + .color(0.4, 1.0, 0.6) // Green paradox patterns + .modulateKaleid( + osc(1.5, 0, 1) + .rotate(() => time * 0.08), + 8 + ), + 0.6 + ) + .add( + // Deep Thought processing + osc(60, 0, 0.5) + .color(0.2, 0.8, 1.0) // Blue computational patterns + .thresh(() => 0.5 + Math.sin(time * 0.42) * 0.4) // 42 again + .modulateRotate( + osc(3, 0, 1), + 1.0 + ), + 0.5 + ) + .add( + // Pan-dimensional mice + noise(80, 0.02) + .thresh(0.92) + .color(0.8, 0.8, 0.8) // Gray mice dots + .scrollX(() => time * 0.7) + .scrollY(() => Math.sin(time * 1.2) * 0.6), + 0.4 + ) + .add( + // Answer to everything: 42 + shape(4, 0.95, 0.01) // Square representing "42" + .color(1.0, 0.2, 0.8) // Pink answer + .scale(() => 0.05 + Math.sin(time * 0.42) * 0.02) + .repeat(42, 1) // 42 repetitions horizontally + .scrollY(() => time * 0.1), + 0.3 + ) + .modulateHue( + osc(0.42, 0.2), // More 42 references + 0.3 + ) + .contrast(1.6) + .brightness(0.3) + .out(); + }, 100); + }; + + const hydraEffects = [vernoi, waveyzz, oscRotate, retroSun, synthWave, galaxy, electricSheep, cyberpunkCity, digitalDreams, quantumStatic, johnnyMnemonic, billAndTed, tronLegacy, hitchhikersGuide]; function rotateHydraEffect() { try { @@ -729,11 +1339,20 @@ https://retrowave.ru/${musicData.streamUrl} if (args[1]) { if (args[1] === 'list') { addTerminalLine('Available effects:'); - addTerminalLine(' vernoi - Synthwave Voronoi patterns'); - addTerminalLine(' waveyzz - Neon wave synthesis'); - addTerminalLine(' oscrotate - Oscillating neon shapes'); - addTerminalLine(' retrosun - Retro sunset with grid'); - addTerminalLine(' synthwave - Basic synthwave pattern'); + addTerminalLine(' vernoi - Synthwave Voronoi patterns'); + addTerminalLine(' waveyzz - Neon wave synthesis'); + addTerminalLine(' oscrotate - Oscillating neon shapes'); + addTerminalLine(' retrosun - Retro sunset with grid'); + addTerminalLine(' synthwave - Basic synthwave pattern'); + addTerminalLine(' galaxy - Deep space galaxy with stars'); + addTerminalLine(' electricsheep- Digital dreams & synthetic memories'); + addTerminalLine(' cyberpunk - Neon-soaked cityscape'); + addTerminalLine(' digitaldreams- Abstract consciousness patterns'); + addTerminalLine(' quantumstatic- Quantum interference & particles'); + addTerminalLine(' johnny - Johnny Mnemonic data highways'); + addTerminalLine(' billted - Bill & Ted time travel vortex'); + addTerminalLine(' tron - Tron Legacy digital grid world'); + addTerminalLine(' hitchhiker - Hitchhiker\'s Guide improbability'); addTerminalLine('Usage: effect <effect_name> or effect list'); } else { const effectName = args[1].toLowerCase(); @@ -755,6 +1374,33 @@ https://retrowave.ru/${musicData.streamUrl} case 'synthwave': effectIndex = 4; break; + case 'galaxy': + effectIndex = 5; + break; + case 'electricsheep': + effectIndex = 6; + break; + case 'cyberpunk': + effectIndex = 7; + break; + case 'digitaldreams': + effectIndex = 8; + break; + case 'quantumstatic': + effectIndex = 9; + break; + case 'johnny': + effectIndex = 10; + break; + case 'billted': + effectIndex = 11; + break; + case 'tron': + effectIndex = 12; + break; + case 'hitchhiker': + effectIndex = 13; + break; default: addTerminalLine(`Unknown effect: ${effectName}`); addTerminalLine('Type "effect list" to see available effects.'); |