Skip to content

Commit

Permalink
front page redesign: unused code to auto-resize anim when window resizes
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Dec 22, 2023
1 parent 20bcf1b commit 38dea1b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion static/topology.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,17 @@ let sketch = function(p) {
return (x % n + n) % n;
}
};
new p5(sketch, document.getElementById('topology'));

let myQ5Sketch = new p5(sketch, document.getElementById('topology'));


// tried setting this inside the sketch with p.windowResized = ...
// but that didn't work.
// https://github.com/processing/p5.js/wiki/Positioning-your-canvas#making-the-canvas-fill-the-window
// https://github.com/quinton-ashley/q5.js/pull/6
//
// also this restarts the animation, and occasionally it crashes. so, forget
// about this for now
// addEventListener("resize", (event) => {
// myQ5.resizeCanvas(document.documentElement.clientWidth, 900);
// });

0 comments on commit 38dea1b

Please sign in to comment.