better reflect
This commit is contained in:
parent
8263f274bc
commit
eac994b7b8
@ -11,8 +11,8 @@ class Reflect extends Component {
|
||||
}
|
||||
|
||||
render({ team }) {
|
||||
let redX = anime.random(32, 128);
|
||||
let blueX = anime.random(128, 224);
|
||||
const redX = anime.random(32, 96);
|
||||
const blueX = anime.random(192, 224);
|
||||
|
||||
return (
|
||||
<svg
|
||||
@ -31,8 +31,12 @@ class Reflect extends Component {
|
||||
</defs>
|
||||
<g filter="url(#reflectFilterGreen)">
|
||||
<rect class="green" fill={COLOURS.GREEN} x="32" y="64" width="192" height="4" />
|
||||
<path class="red" d={`M${redX},20 L${redX * 1.5},64 L${redX * 2},20`} style={{ 'stroke-dasharray': anime.random(48, 64) }} />
|
||||
<path class="blue" d={`M${blueX},20 L${blueX * 0.75},64 L${blueX * 0.5},20`} style={{ 'stroke-dasharray': anime.random(48, 64) }} />
|
||||
<path class="red"
|
||||
d={`M${redX * 0.5},20 L${redX},64 L${redX * 1.5},20`}
|
||||
style={{ 'stroke-dasharray': anime.random(48, 64) }} />
|
||||
<path class="blue"
|
||||
d={`M${blueX},20 L${blueX * 0.75},64 L${blueX * 0.5},20`}
|
||||
style={{ 'stroke-dasharray': anime.random(48, 64) }} />
|
||||
</g>
|
||||
</svg>
|
||||
);
|
||||
@ -50,22 +54,11 @@ class Reflect extends Component {
|
||||
|
||||
this.animations.push(anime({
|
||||
targets: ['#reflect path'],
|
||||
strokeDashoffset: [anime.setDashoffset, 0],
|
||||
strokeDashoffset: [0, 1000],
|
||||
easing: 'linear',
|
||||
loop: true,
|
||||
duration: TIMES.TARGET_DURATION_MS / 5,
|
||||
duration: TIMES.TARGET_DURATION_MS * 2,
|
||||
delay: anime.stagger(200),
|
||||
}));
|
||||
|
||||
// this.animations.push(anime({
|
||||
// targets: ['#reflectFilter feTurbulence', ' #reflectFilter feDisplacementMap'],
|
||||
// baseFrequency: 2,
|
||||
// scale: 10,
|
||||
// numOctaves: 5,
|
||||
// easing: 'easeOutSine',
|
||||
|
||||
// delay: TIMES.TARGET_FADE_IN_DELAY,
|
||||
// duration: TIMES.RESOLUTION_TOTAL_MS,
|
||||
// }));
|
||||
}
|
||||
|
||||
// this is necessary because
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user