From 99513346fb24974e5184d23db2db0a0fed6bf82a Mon Sep 17 00:00:00 2001 From: Paul-Louis NECH Date: Thu, 21 Apr 2022 14:00:51 +0200 Subject: [PATCH] Starry night: Lucia <3 --- StarryNights/Lucia.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 StarryNights/Lucia.js diff --git a/StarryNights/Lucia.js b/StarryNights/Lucia.js new file mode 100644 index 0000000..ec7581a --- /dev/null +++ b/StarryNights/Lucia.js @@ -0,0 +1,35 @@ +// On April 21 in 2014 +// This image of Jupiter was taken by the OPAL Program +// (Outer Planet Atmospheres Legacy), a long-term project that uses Hubble +// to capture global maps of the outer planets every year. +// The Great Red Spot appears in the lower right. + +s0.initImage("https://imagine.gsfc.nasa.gov/hst_bday/images/april-21-2019-jupiter.jpg") + +periodMask = 21 +periodScale = 10 +periodVoronoiScale = 30 +periodVoronoiRot = 100 + +src(s0) + .scale(() => 1 + 0.05 * Math.sin(time / periodScale)) + .out(o0) + +src(s0).luma(0.57, 0.2).invert().out(o1) + +src(o0) + .mask(src(s0) + .modulateScale(voronoi(20, () => 0.03 + 0.02 * Math.sin(time / periodVoronoiScale))) + .rotate(() => time / periodVoronoiRot % 360)) + .out(o2) + + +src(o2).blend( + src(o2) + .colorama(0.01) + .contrast(-0.3) + .mask(shape(30).scale(3)), () => 0.25 * Math.sin(time / periodMask) +) +.out(o3) + +render(o3) -- libgit2 0.27.0