forked from docker/welcome-to-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbc532a
commit 14aba37
Showing
13 changed files
with
663 additions
and
80 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
import Particles from "react-particles"; | ||
import { useCallback } from "react"; | ||
import { loadFull } from "tsparticles"; | ||
|
||
const Confetti = () => { | ||
|
||
const particlesInit = useCallback(async engine => { | ||
console.log(engine); | ||
// you can initiate the tsParticles instance (engine) here, adding custom shapes or presets | ||
// this loads the tsparticles package bundle, it's the easiest method for getting everything ready | ||
// starting from v2 you can add only the features you need reducing the bundle size | ||
await loadFull(engine); | ||
}, []); | ||
|
||
const particlesLoaded = useCallback(async container => { | ||
await console.log(container); | ||
}, []); | ||
|
||
return ( | ||
<Particles | ||
id="tsparticles" | ||
init={particlesInit} | ||
loaded={particlesLoaded} | ||
options={{ | ||
fullScreen: { | ||
zIndex: 1 | ||
}, | ||
emitters: [ | ||
{ | ||
position: { | ||
x: 0, | ||
y: 30 | ||
}, | ||
rate: { | ||
quantity: 5, | ||
delay: 0.15 | ||
}, | ||
particles: { | ||
move: { | ||
direction: "top-right", | ||
outModes: { | ||
top: "none", | ||
left: "none", | ||
default: "destroy" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
position: { | ||
x: 100, | ||
y: 30 | ||
}, | ||
rate: { | ||
quantity: 5, | ||
delay: 0.15 | ||
}, | ||
particles: { | ||
move: { | ||
direction: "top-left", | ||
outModes: { | ||
top: "none", | ||
right: "none", | ||
default: "destroy" | ||
} | ||
} | ||
} | ||
} | ||
], | ||
particles: { | ||
color: { | ||
value: [ | ||
"#ffffff", | ||
"#FF0000" | ||
] | ||
}, | ||
move: { | ||
decay: 0.05, | ||
direction: "top", | ||
enable: true, | ||
gravity: { | ||
"enable": true | ||
}, | ||
outModes: { | ||
top: "none", | ||
default: "destroy" | ||
}, | ||
speed: { | ||
min: 10, | ||
max: 50 | ||
} | ||
}, | ||
number: { | ||
value: 0 | ||
}, | ||
opacity: { | ||
value: 1 | ||
}, | ||
rotate: { | ||
value: { | ||
min: 0, | ||
max: 360 | ||
}, | ||
direction: "random", | ||
animation: { | ||
enable: true, | ||
speed: 30 | ||
} | ||
}, | ||
tilt: { | ||
direction: "random", | ||
enable: true, | ||
value: { | ||
min: 0, | ||
max: 360 | ||
}, | ||
animation: { | ||
enable: true, | ||
speed: 30 | ||
} | ||
}, | ||
size: { | ||
value: { | ||
min: 0, | ||
max: 7 | ||
}, | ||
animation: { | ||
enable: true, | ||
startValue: "min", | ||
count: 1, | ||
speed: 16, | ||
sync: true | ||
} | ||
}, | ||
roll: { | ||
darken: { | ||
enable: true, | ||
value: 25 | ||
}, | ||
enable: true, | ||
speed: { | ||
min: 5, | ||
max: 15 | ||
} | ||
}, | ||
wobble: { | ||
distance: 30, | ||
enable: true, | ||
speed: { | ||
min: -7, | ||
max: 7 | ||
} | ||
}, | ||
shape: { | ||
type: [ | ||
"square", | ||
"triangle", | ||
"polygon" | ||
], | ||
options: { | ||
polygon: [ | ||
{ | ||
sides: 5 | ||
}, | ||
{ | ||
sides: 6 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}} | ||
/> | ||
); | ||
} | ||
|
||
export default Confetti; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.