starback.js
starback.js copied to clipboard
When zooming in/out, the particles don't fill the whole page.
That's it.
Could you provide steps and reproduction to this issue? Images or videos would help a lot
This is just a misunderstanding of how the library works--the width and height of the canvas are static, passed in when the Starback object is first created. If you want to dynamically adjust the size of the canvas to match the viewport, you can resize the canvas element itself whenever the window resizes with something like this:
window.addEventListener("resize", () => {
canvas.setAttribute("width", window.innerWidth);
canvas.setAttribute("height", window.innerHeight);
}
it might be worthwhile to look into building this reactivity into the library itself, however this isn't really an advertised feature and as such is not a bug