some filters
This commit is contained in:
parent
6f38d694ac
commit
465595de5f
@ -347,6 +347,7 @@
|
||||
|
||||
.skill-animation {
|
||||
opacity: 0;
|
||||
stroke-width: 5px;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -21,9 +21,20 @@ class Curse extends Component {
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 198 200">
|
||||
<defs>
|
||||
<filter id="curseFilter">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5" />
|
||||
<feMerge>
|
||||
<feMergeNode />
|
||||
<feMergeNode in="SourceGraphic" />
|
||||
</feMerge>
|
||||
</filter>
|
||||
</defs>
|
||||
<g filter="url(#curseFilter)">
|
||||
<ellipse cx="100" cy="100" rx="30" ry="30"/>
|
||||
<ellipse cx="100" cy="100" rx="60" ry="60"/>
|
||||
<ellipse cx="100" cy="100" rx="90" ry="90"/>
|
||||
</g>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@ -40,8 +51,9 @@ class Curse extends Component {
|
||||
|
||||
this.animations.push(anime({
|
||||
targets: ['#curse'],
|
||||
scale: [0.5, 0.8],
|
||||
scale: [0.5, 1],
|
||||
strokeWidth: [8, 0],
|
||||
|
||||
easing: 'easeInOutSine',
|
||||
// delay: TIMES.TARGET_DELAY_MS,
|
||||
duration: TIMES.TARGET_DURATION_MS,
|
||||
|
||||
@ -18,7 +18,16 @@ class Decay extends Component {
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 300 300">
|
||||
<g>
|
||||
<defs>
|
||||
<filter id="decayFilter">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5" />
|
||||
<feMerge>
|
||||
<feMergeNode />
|
||||
<feMergeNode in="SourceGraphic" />
|
||||
</feMerge>
|
||||
</filter>
|
||||
</defs>
|
||||
<g filter="url(#decayFilter)" >
|
||||
<rect x="135" y="135" width="30" height="30" />
|
||||
<rect x="135" y="135" width="30" height="30" />
|
||||
<rect x="135" y="135" width="30" height="30" />
|
||||
@ -50,12 +59,10 @@ class Decay extends Component {
|
||||
|
||||
this.animations.push(anime({
|
||||
targets: ['#decay rect'],
|
||||
x: () => anime.random(30, 270),
|
||||
y: () => anime.random(30, 270),
|
||||
x: () => anime.random(50, 250),
|
||||
y: () => anime.random(50, 250),
|
||||
transform: `rotate(${anime.random(-15, 15)})`,
|
||||
filter: ['brightness(1)', 'brightness(1.5)'],
|
||||
opacity: 0,
|
||||
easing: 'linear',
|
||||
easing: 'easeOutSine',
|
||||
delay: TIMES.TARGET_DELAY_MS,
|
||||
duration: TIMES.START_SKILL,
|
||||
}));
|
||||
|
||||
@ -22,16 +22,18 @@ class Hex extends Component {
|
||||
id="hex"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 128 128">
|
||||
<filter id='hexFilter'>
|
||||
<feTurbulence type="turbulence"
|
||||
baseFrequency="0.10"
|
||||
numOctaves="10" result="turbulence">
|
||||
</feTurbulence>
|
||||
<feDisplacementMap in2="turbulence" in="SourceGraphic" scale="15" xChannelSelector="R" yChannelSelector="G"></feDisplacementMap>
|
||||
<defs>
|
||||
<filter id="hexFilter">
|
||||
<feGaussianBlur in="SourceGraphic" stdDeviation="5" />
|
||||
<feMerge>
|
||||
<feMergeNode />
|
||||
<feMergeNode in="SourceGraphic" />
|
||||
</feMerge>
|
||||
</filter>
|
||||
</defs>
|
||||
<polygon
|
||||
points="64 68.64 8.574 100 63.446 67.68 64 4 64.554 67.68 119.426 100"
|
||||
style={{ filter: 'url("#hexFilter")' }}>
|
||||
filter="url(#hexFilter)">
|
||||
</polygon>
|
||||
</svg>
|
||||
);
|
||||
@ -54,16 +56,15 @@ class Hex extends Component {
|
||||
delay: TIMES.TARGET_DELAY_MS,
|
||||
duration: TIMES.TARGET_DURATION_MS,
|
||||
}));
|
||||
// this.animations.push(anime({
|
||||
// targets: ['feTurbulence', 'feDisplacementMap'],
|
||||
// baseFrequency: 0,
|
||||
// scale: 1,
|
||||
// easing: 'easeOutSine',
|
||||
|
||||
this.animations.push(anime({
|
||||
targets: ['feTurbulence', 'feDisplacementMap'],
|
||||
baseFrequency: 0,
|
||||
scale: 1,
|
||||
easing: 'easeOutSine',
|
||||
|
||||
delay: TIMES.TARGET_DELAY_MS,
|
||||
duration: TIMES.TARGET_DURATION_MS,
|
||||
}));
|
||||
// delay: TIMES.TARGET_DELAY_MS,
|
||||
// duration: TIMES.TARGET_DURATION_MS,
|
||||
// }));
|
||||
}
|
||||
|
||||
// this is necessary because
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user