1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-07-31 13:07:46 +00:00

cube: preserve state across pages

This commit is contained in:
RGBCube 2025-06-04 01:50:47 +03:00
parent b13bff471f
commit a6f7c93d62
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
4 changed files with 59 additions and 14 deletions

View file

@ -162,12 +162,12 @@ Blog Articles
context.shadowColor = "#94f475";
context.textBaseline = "top";
context.textAlign = "center";
for (const strip of strips) {
context.font = `${strip.size}px sans`;
if (strip.y > canvas.height + (strip.size * 40)) {
Object.assign(strip, randomStrip())
Object.assign(strip, randomStrip());
}
let { y: yCopy } = strip;
@ -192,7 +192,7 @@ Blog Articles
strip.y += strip.deltaY;
}
data.animationFrameId = requestAnimationFrame(animate);
};