/*
GREED version 2.0
permeating moneyed thoughts
consuming basic needs
polluting every water source
with tiny plastic beads
intertwined with instinct
adapted to survive
self-created misery
a perpetuated lie
and when you go to wipe the scourge
from any path you choose
you find it lurking in the background
a most peculiar ruse
by thingticketNFT
@thingticket
created with hydra (https://hydra.ojack.xyz/) and p5.js (https://p5js.org/)
non-generative alternate version of GREED (https://www.fxhash.xyz/generative/5738). free gift.
move the mouse or tap screen to interact and zoom. press s to take a screenshot.
*/
document.addEventListener("keyup", (event) => {
if (event.key === "s" || event.key === "S") {
event.preventDefault();
screencap();
}
})
speed=0.25
let hydra, hydraCanvas;
hydraCanvas = document.createElement("canvas");
hydraCanvas.width = window.innerWidth
hydraCanvas.height = window.innerHeight
hydraCanvas.id = "hydraCanvas";
hydraCanvas.style.position = "absolute";
hydraCanvas.style.zIndex = 2;
hydraCanvas.style.top = 0;
hydraCanvas.style.left = 0;
hydraCanvas.getContext("webgl", { preserveDrawingBuffer: false });
hydra = new Hydra({
canvas: hydraCanvas,
detectAudio: false,
enableStreamCapture: false,
});
document.querySelector(".placeholder").appendChild(hydraCanvas)
s0.initImage("./greed.jpg")
src(s0)
.invert(1)
.scrollY(0,()=>0.05*Math.sin(2*Math.sin(Math.pow(1.5*Math.cos(time),2))))
.scale(()=>0.0001+0.0005*Math.pow(5*Math.abs(mouse.x-Math.sin(1.2*time)),.9))
.rotate(()=>0.004*mouse.y,-.9)
.out(o0)
src(o1)
osc(4,1,2)
.color(1,0.2,0.15)
.mult(shape(1,0.5,0.001)
.repeat(()=>1000-950*Math.sin(time),()=>1000-950*Math.sin(time)))
.diff(osc(100),1.2,0)
.rotate(-.3,-.1)
.modulateScale(osc(20)
)
.out(o1)
src(o2)
.diff(src(o1)
.scale(()=>1+0.0005*Math.pow(5*Math.abs(mouse.x-Math.sin(1.2*time)),.2))
.mult(src(o0))
.pixelate(()=>2000-1500*Math.abs(Math.cos(time)),()=>1500-1499*Math.abs(Math.sin(Math.sin(Math.cos(Math.tan(time/4))))))
.saturate(4)
)
.out(o2)
render(o2)