Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When zooming in/out, the particles don't fill the whole page. #12

Open
goteusz-maszyk opened this issue Mar 26, 2024 · 2 comments
Open

Comments

@goteusz-maszyk
Copy link

That's it.

@zuramai
Copy link
Owner

zuramai commented Apr 2, 2024

Could you provide steps and reproduction to this issue? Images or videos would help a lot

@justDeeevin
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants