Better glitching

This commit is contained in:
Anthony Dumas 2023-03-10 09:53:39 +00:00
parent 8b1c7d0d3f
commit b44f29bfbf

View File

@ -11,10 +11,35 @@ import { PowerGlitch } from 'powerglitch';
class MainCard extends Component {
glitching() {
PowerGlitch.glitch('#photoProfil');
componentDidMount() {
PowerGlitch.glitch('img',
{
playMode: 'hover',
hideOverflow: true,
timing: {
duration: 1000,
iterations: 15,
easing: 'ease-in-out',
},
glitchTimeSpan: {
start: 0.0,
end: 0.7,
},
shake: {
velocity: 10,
amplitudeX: 0.4,
amplitudeY: 0.4,
},
slice: {
count: 4,
velocity: 10,
minHeight: 0.02,
maxHeight: 0.40,
hueRotate: true,
},
}
);
}
render() {
var metaThemeColor = document.querySelector("meta[name=theme-color]");
metaThemeColor.setAttribute("content", window.matchMedia('(prefers-color-scheme: dark)').matches ? "#25444b" : "#5c9ead");