Open angelorodem opened 3 weeks ago
Name | Link |
---|---|
Latest commit | 8534d78e63465f568a48fe015deb7bf8ff17ce97 |
Latest deploy log | https://app.netlify.com/sites/imaginative-palmier-d7ee2c/deploys/666e12e095110e0008a4e19d |
Related to issue #26
Tested this code with
var effect = Newton(
key: newtonKey,
);
var rainEffect = RainEffect(
particleConfiguration: ParticleConfiguration(
shape: CircleShape(),
size: const Size(15, 15),
color: SingleParticleColor(color: COULUMB_BLUE),
),
effectConfiguration: EffectConfiguration(
particleCount: 0,
minDuration: 3000,
maxDuration: 7000,
particlesPerEmit: 3,
maxFadeInLimit: 5,
minFadeInLimit: 4),
);
if (appState.getIsCharging()) {
print("Started animation");
if (newtonKey.currentState!.isEffectsListEmpty()) {
newtonKey.currentState?.addEffect(rainEffect);
} else {
print("Effects not empty");
}
newtonKey.currentState?.resumeEffects();
} else {
print("Stopped animation");
newtonKey.currentState?.pauseEffects();
}
With this feature, integrators can pause the emission and wait the particles finish smoothly, and later resume if needed.