fixed animation bugs
This commit is contained in:
1 parent
8c62529f40
commit
181563a0ce
4 files changed
+8
-8
No files matched your search
@@ -86,11 +86,11 @@ export class GuillocheDirective implements OnChanges, OnDestroy {
|
||||
};
|
||||
});
|
||||
this.bounces = this.initialNodes.map(node => {
|
||||
const bounceStart = Math.round(Math.random() * 10) / 10;
|
||||
const bounceAmplitude = Math.round(Math.random() * 100);
|
||||
return this.math.bounce(bounceStart, bounceAmplitude, 2);
|
||||
const bounceStart = Math.round(Math.random() * 100) / 100;
|
||||
const bounceAmplitude = Math.round(Math.random() * 150);
|
||||
return this.math.bounce(bounceStart, bounceAmplitude, 3);
|
||||
});
|
||||
this.animationInterval = setInterval(() => this.animateGraph(), 60);
|
||||
this.animationInterval = setInterval(() => this.animateGraph(), 40);
|
||||
} else {
|
||||
if (this.animationInterval) {
|
||||
this.bounce = null;
|
||||
|
||||
Reference in new issue
Block a user