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