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:
parent
b13bff471f
commit
a6f7c93d62
4 changed files with 59 additions and 14 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue