NIKO / CYBERSECURITY & DIGITAL

Chaos Xmas VFX Studio

Practical digital expertise. Clear communication. Solutions built around real needs.

Niko in a modern data centre

Chaos Xmas VFX Studio

EN: Live before/after VFX previewer with personalized GFX sliders — built by Niko. Drop an MP4 video, grade it with the glitch, lights and doodles sliders, compare before/after in real time, and export your grade as a Shopify Hydrogen component. Custom HTML / Hydrogen GFX slider panels.

FR : Aperçu VFX avant/après en direct avec curseurs GFX personnalisés — conçu par Niko. Dépose une vidéo MP4, règle les curseurs glitch, lumières et doodles, compare avant/après en temps réel, et exporte ton réglage en composant Shopify Hydrogen. Panneaux de curseurs GFX en HTML personnalisé / Hydrogen.

Try it live / Essaie-le en direct

Chaos Xmas VFX Studio — Live Before/After Previewer

Chaos Xmas VFX Studio — Live Before/After Previewer

Drag the center split handle to compare Raw Dark Footage vs. Christmas Lights + VFX

00:10.5 / 02:24.0 SCENE 1 // ROOFTOP SKYLINE
808 SUB
SNARE
00:00 Intro 00:10 Skyline Lights 00:39 Purple Flames 01:00 Datamosh 01:16 Xmas Alley 01:53 Stream Finale 02:24
1. Building Christmas Lights
Facade Light Glow 125%
Performer Mask Radius 25%
2. 12fps Hand-Drawn Doodles
Neon Scribble & Flame Glow 120%

Triggers 12fps wireframe sleigh, glitching reindeer, reboot crown, toxic-purple flames, devil horns & mic lightning.

3. Glitch, Thermal & 808 Shake
808 Impact & Datamosh Mix 100%
1280×720

How it works / Comment ça marche

EN — Installation: npm install @mediapipe/tasks-vision — then place ChaosVfxStudio.jsx in app/components/.

EN — Usage: import ChaosVfxStudio from '~/components/ChaosVfxStudio'; render <ChaosVfxStudio videoSrc="https://YOUR-CDN.example/kass-christmas.mp4" />. The MP4 must be reachable by the browser (configure CORS if it is hosted on another origin) and must be 16:9 for the 1280×720 compositor geometry to align.

EN — Included: client-only init compatible with Hydrogen SSR; low-pass bass analysis (20–120 Hz) with 150 ms moving baseline and 85–90 ms cooldown; beat-drop purple flame layer driven by bass energy; MediaPipe FaceLandmarker in VIDEO mode (landmarks smoothed, held up to six missed frames); horns in the snowy alley, two eye-anchored X marks in the gaming finale, three final intensity stages; intro negative/thermal flash and CRT collapse from 142.8 s through 144 s.

EN — Important: this is a real-time browser compositor/preview component. It does not encode or download a rendered MP4. To export, capture the canvas plus source audio with a MediaRecorder/export pipeline or render the same timing/effects in a video pipeline. The source MP4 is not modified.

FR — Installation : npm install @mediapipe/tasks-vision — puis placer ChaosVfxStudio.jsx dans app/components/.

FR — Utilisation : importer le composant et passer videoSrc (l'URL du MP4, 16:9, CORS configuré si le fichier est sur un autre domaine).

FR — Inclus : initialisation client-only compatible avec le SSR Hydrogen ; analyse des basses (20–120 Hz) ; flammes violettes du beat-drop ; suivi du visage (MediaPipe) ; cornes, X sur les yeux dans le final gaming, flocon final ; flash négatif/thermique et effondrement CRT de 142,8 s à 144 s.

FR — Important : c'est un aperçu en temps réel dans le navigateur — il n'encode pas et ne télécharge pas de MP4 final. Pour exporter, capturer le canvas et l'audio (MediaRecorder) ou rendre les effets dans un pipeline vidéo. Le MP4 source n'est pas modifié.

Hydrogen component / Composant Hydrogen — ChaosXmasVfxPlayer.jsx

Core render loop / Boucle de rendu principale (the studio's "Copy .JSX Code" button exports the full component / le bouton « Copy .JSX Code » du studio exporte le composant complet) :

const dy = Math.cos(phase * 1.13) * shake * 0.62;
      ctx.clearRect(0, 0, W, H);
      if (video.readyState >= 2) {
        ctx.drawImage(video, dx, dy, W, H);
      } else {
        ctx.fillStyle = '#080510';
        ctx.fillRect(0, 0, W, H);
      }
      // Neon architectural Christmas lights, preserving the original scene windows.
      if (lightsIntensity > 0 && ((t >= 9.5 && t <= 45.5) || (t >= 75.5 && t <= 109.5))) {
        ctx.save();
        ctx.globalCompositeOperation = 'lighter';
        const colors = ['#ff2442', '#22c55e', '#ffd166', '#00f0ff', '#ec4899'];
        for (let i = 0; i < 160; i++) {
          const x = i % 2 === 0 ? ((i * 37) % 360) + 20 : W - (((i * 41) % 360) + 20);
          const y = ((i * 53) % 370) + 40;
          const pulse = 0.5 + 0.28 * Math.sin(t * 5 + i) + bass * 0.42;
          ctx.fillStyle = colors[i % colors.length];
          ctx.globalAlpha = Math.max(0, Math.min(1, pulse * 0.72 * lightsIntensity));
          ctx.beginPath();
          ctx.arc(x, y, 2.3 + bass * 2.2, 0, Math.PI * 2);
          ctx.fill();
        }
        ctx.restore();
      }
      // Beat-drop reboot crown and hand lightning.
      if (doodlesIntensity > 0 && t >= 39 && t <= 45.5) {
        const j = Math.floor(t * 12);
        const jx = (n) => Math.sin(j * 19.3 + n * 7.1) * 4 * doodlesIntensity;
        const jy = (n) => Math.cos(j * 23.7 + n * 5.3) * 4 * doodlesIntensity;
        const cx = 640 + jx(1);
        const cy = 115 + jy(1);
        drawNeonLine([
          [cx - 58, cy + 28], [cx - 70, cy - 20], [cx - 28, cy + 6],
          [cx, cy - 30], [cx + 28, cy + 6], [cx + 70, cy - 20], [cx + 58, cy + 28]
        ], '#ffd166', 4, true, 24);
        drawNeonLine([[445 + jx(2),340 + jy(2)],[345 + jx(3),265 + jy(3)],[385 + jx(4),255 + jy(4)],[265 + jx(5),175 + jy(5)]], '#22c55e', 3.5, false, 18);
        drawNeonLine([[835 + jx(6),340 + jy(6)],[935 + jx(7),265 + jy(7)],[895 + jx(8),255 + jy(8)],[1015 + jx(9),175 + jy(9)]], '#ec4899', 3.5, false, 18);
      }
      // Finale accents: keep the existing X marks and lightning around the streamer.
      if (doodlesIntensity > 0 && t >= 109.5 && t <= 143) {
        const j = Math.floor(t * 12);
        const jx = (n) => Math.sin(j * 19.3 + n * 7.1) * 3.5 * doodlesIntensity;
        const jy = (n) => Math.cos(j * 23.7 + n * 5.3) * 3.5 * doodlesIntensity;
        drawNeonLine([[445+jx(1),220+jy(1)],[395+jx(2),150+jy(2)],[425+jx(3),145+jy(3)],[370+jx(4),85+jy(4)]], '#22c55e', 3.2, false, 17);
        drawNeonLine([[835+jx(5),220+jy(5)],[885+jx(6),150+jy(6)],[855+jx(7),145+jy(7)],[910+jx(8),85+jy(8)]], '#ec4899', 3.2, false, 17);
        const marks = [[355,290,'#ec4899'],[925,290,'#22c55e'],[340,540,'#22c55e'],[940,540,'#ec4899']];
        marks.forEach(([x,y,color],i) => {
          drawNeonLine([[x-12+jx(i),y-12+jy(i)],[x+12+jx(i),y+12+jy(i)]], color, 3, false, 16);
          drawNeonLine([[x+12+jx(i),y-12+jy(i)],[x-12+jx(i),y+12+jy(i)]], color, 3, false, 16);
        });
      }
      // Requested final POP: one unmistakable glowing snowflake, followed by drifting flakes.
      if (snowflakeIntensity > 0 && t >= 142.75 && t <= 144) {
        const p = Math.max(0, Math.min(1, (t - 142.75) / 0.42));
        const eased = 1 - Math.pow(1 - p, 3);
        const pulse = 1 + 0.08 * Math.sin((t - 142.75) * 34);
        const radius = (8 + 44 * eased) * pulse * snowflakeIntensity;
        ctx.save();
        ctx.globalCompositeOperation = 'lighter';
        const glow = ctx.createRadialGradient(640, 360, 2, 640, 360, radius * 2.4);
        glow.addColorStop(0, 'rgba(220,248,255,0.62)');
        glow.addColorStop(0.45, 'rgba(110,210,255,0.20)');
        glow.addColorStop(1, 'rgba(110,210,255,0)');
        ctx.fillStyle = glow;
        ctx.beginPath();
        ctx.arc(640, 360, radius * 2.4, 0, Math.PI * 2);
        ctx.fill();
        drawSnowflake(640, 360, radius, (t - 142.75) * 0.45, 0.98);
        for (let i = 0; i < 18; i++) {
          const angle = (i / 18) * Math.PI * 2 + 0.18;
          const distance = 18 + eased * 115 + (i % 3) * 9;
          const x = 640 + Math.cos(angle) * distance;
          const y = 360 + Math.sin(angle) * distance;
          const r = 4 + (i % 4) * 1.5;
          drawSnowflake(x, y, r, -angle, Math.max(0.15, 0.9 - eased * 0.45));
        }
        ctx.restore();
      }
      raf = requestAnimationFrame(render);