Add an option for letting confetti fall through the bottom of the viewport.
Review Request #15094 — Created June 5, 2026 and updated
This adds an option to remove the bottom of the viewport as a mandatory platform. When this is set, pieces will fall through the bottom of the viewport instead of landing on it. This is useful when adding confetti to pages that have a vertical scroll, when you scroll the confetti ends up looking like its floating on the page. This change also switches the position of the canvas that holds the confetti from fixed to absolute, so that confetti sticks onto the platform it landed on when the page scrolls, instead of being sticky to the viewport when scrolling.
Saw that behavior was normal with the option disabled, and that
confetti falls through the the bottom of the viewport when the option
is set.
| Summary | ID |
|---|---|
| 67b9f80e14ace73e400dcae2a89dae8527bd4e3e |
-
-
It's generally nice to keep flags in a positive state, like
floorEnabled, so that it's consistent what atrueor afalsemeans. Can we invert this one?This should also sort alphabetically below the
ms. -
Would it make sense to conditionally create or not create
#floorbased on the flag, and then check that instead?
Review request changed
- Commits:
-
Summary ID 531a04c9b941e660c7014ca2a1ff7f2bbca7689e 67b9f80e14ace73e400dcae2a89dae8527bd4e3e - Diff:
-
Revision 2 (+114 -46)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.