Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

stripes: new piece with cycling rainbow vertical stripes

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

+24
+24
system/public/aesthetic.computer/disks/stripes.mjs
··· 1 + // stripes, 26.04.21 2 + 3 + const { floor, sin, PI } = Math; 4 + const count = 12; 5 + let frame = 0; 6 + 7 + function paint({ wipe, ink, screen: { width: w, height: h } }) { 8 + wipe(0); 9 + frame += 1; 10 + const stripeW = w / count; 11 + for (let i = 0; i < count; i++) { 12 + const t = (i / count + frame * 0.004) % 1; 13 + const r = floor(sin(t * PI * 2) * 127 + 128); 14 + const g = floor(sin(t * PI * 2 + (PI * 2) / 3) * 127 + 128); 15 + const b = floor(sin(t * PI * 2 + (PI * 4) / 3) * 127 + 128); 16 + ink(r, g, b).box(floor(i * stripeW), 0, floor(stripeW) + 1, h, "fill"); 17 + } 18 + } 19 + 20 + function meta() { 21 + return { title: "Stripes", desc: "Cycling color stripes." }; 22 + } 23 + 24 + export { paint, meta };