Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

emostripes: harsh glitchy emo stripes piece

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

+82
+82
system/public/aesthetic.computer/disks/emostripes.mjs
··· 1 + // emostripes, 26.04.21 2 + 3 + const { floor, sin, cos, abs, PI, random } = Math; 4 + 5 + const count = 16; 6 + let frame = 0; 7 + 8 + // Harsh emo palette: blood, bruise, bile, bone, void 9 + const palette = [ 10 + [180, 0, 0], // blood red 11 + [90, 0, 120], // bruised purple 12 + [0, 120, 60], // sickly green 13 + [10, 10, 10], // near black 14 + [255, 255, 255], // harsh white 15 + [60, 0, 0], // dried blood 16 + [0, 0, 80], // cold blue-black 17 + [180, 160, 0], // sick yellow 18 + ]; 19 + 20 + const offsets = Array.from({ length: count }, () => random() * 1000); 21 + const glitchTimers = Array.from({ length: count }, () => 0); 22 + 23 + function paint({ wipe, ink, screen: { width: w, height: h } }) { 24 + wipe(0); 25 + frame += 1; 26 + 27 + const baseW = w / count; 28 + 29 + for (let i = 0; i < count; i++) { 30 + const off = offsets[i]; 31 + 32 + // Jagged width — stripes breathe unevenly 33 + const jag = sin(frame * 0.03 + off * 0.7) * 0.6 + cos(frame * 0.05 + off) * 0.4; 34 + const stripeW = floor(baseW * (0.4 + abs(jag) * 1.2)) + 1; 35 + 36 + // Horizontal drift 37 + const drift = sin(frame * 0.015 + off * 1.3) * baseW * 0.8; 38 + const x = floor(i * baseW + drift); 39 + 40 + const colorPhase = (frame * 0.008 + off * 0.4) % palette.length; 41 + const ci = floor(colorPhase) % palette.length; 42 + const [r, g, b] = palette[ci]; 43 + 44 + const flicker = abs(sin(frame * 0.12 + off * 2.1)); 45 + const harsh = floor(flicker * flicker * 255); 46 + 47 + glitchTimers[i] = (glitchTimers[i] + 1) % floor(40 + off % 80); 48 + const isGlitch = glitchTimers[i] < 2; 49 + 50 + if (isGlitch) { 51 + ink(255, 255, 255, 180).box(x, 0, stripeW, h, "fill"); 52 + } else { 53 + const scanLines = 6; 54 + for (let s = 0; s < scanLines; s++) { 55 + const y0 = floor(s * h / scanLines); 56 + const y1 = floor((s + 1) * h / scanLines); 57 + const scanShift = floor(sin(frame * 0.07 + s * 1.4 + off) * 3); 58 + const alpha = 120 + floor(harsh * 0.5); 59 + ink( 60 + floor(r * (0.5 + flicker * 0.5)), 61 + floor(g * (0.5 + flicker * 0.5)), 62 + floor(b * (0.5 + flicker * 0.5)), 63 + alpha, 64 + ).box(x + scanShift, y0, stripeW, y1 - y0, "fill"); 65 + } 66 + } 67 + } 68 + 69 + // Horizontal noise bars — VHS artifact 70 + for (let b = 0; b < 3; b++) { 71 + const barY = floor(((frame * (b + 1) * 7) % (h + 40)) - 20); 72 + const barH = 2 + floor(abs(sin(frame * 0.04 + b * 2.1)) * 4); 73 + ink(255, 255, 255, 25 + floor(abs(sin(frame * 0.1 + b)) * 40)) 74 + .box(0, barY, w, barH, "fill"); 75 + } 76 + } 77 + 78 + function meta() { 79 + return { title: "Emostripes", desc: "Harsh, glitchy, emo stripes." }; 80 + } 81 + 82 + export { paint, meta };