This commit is contained in:
parent
4d2d6154a3
commit
c5cb786054
|
@ -26,7 +26,9 @@ const whatIsNew = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
confetti();
|
confetti({
|
||||||
|
duration: 1000 * 3,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import _confetti from 'canvas-confetti';
|
import _confetti from 'canvas-confetti';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
|
||||||
export function confetti() {
|
export function confetti(options: { duration?: number; } = {}) {
|
||||||
const duration = 1000 * 5;
|
const duration = options.duration ?? 1000 * 5;
|
||||||
const animationEnd = Date.now() + duration;
|
const animationEnd = Date.now() + duration;
|
||||||
const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: os.claimZIndex('high') };
|
const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: os.claimZIndex('high') };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue