zuramai / starback.js

Create a beautiful star falling background with starback.js
https://zuramai.github.io/starback.js/
394 stars 28 forks source link

Adding "speed" parameter breaks animation #11

Closed kurealnum closed 1 year ago

kurealnum commented 1 year ago

Adding the speed parameter to the Starback class init breaks the animation. The background still displays properly, but no stars are displayed. Take a look at this Codepen for example.

VladChernyak commented 1 year ago

The documentation specifies the type of the expected parameter incorrectly. You need to pass not a number, but an array with several values, for example:

{
  ...
  speed: [0.2, 0.4],
}