You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@loonywizard love the project; thank you for your work.
It looks like rightConfettiPosition and leftConfettiPosition use the following variable to determine the vertical launch location of the confetti:
var yPosition = canvasHeight * 5 / 7;
I don't know why those specific numbers are used, but I'm assuming the intention is to get a position that is a bit above the bottom of the canvas so the confetti effect appears more natural. However, it would be nice to be able to control where the confetti launches vertically.
We should be able to pass a float that gets used to calculate yPosition. Example of potential usage:
// In front-end
jsConfetti.addConfetti({
confettiColors: ['#ff0a54', '#ff477e', '#ff7096', '#ff85a1', '#fbb1bd', '#f9bec7'],
emojiSize: 50,
confettiNumber: 20,
yPositionMultiplier: 0.5
});
// In node module
var yPosition = canvasHeight * yPositionMultiplier;
The text was updated successfully, but these errors were encountered:
@loonywizard love the project; thank you for your work.
It looks like
rightConfettiPosition
andleftConfettiPosition
use the following variable to determine the vertical launch location of the confetti:var yPosition = canvasHeight * 5 / 7;
I don't know why those specific numbers are used, but I'm assuming the intention is to get a position that is a bit above the bottom of the canvas so the confetti effect appears more natural. However, it would be nice to be able to control where the confetti launches vertically.
We should be able to pass a float that gets used to calculate
yPosition
. Example of potential usage:The text was updated successfully, but these errors were encountered: