Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: seaAnemone preset refreshes shortly after first render #3074

Closed
1 task done
IgnusG opened this issue Feb 3, 2022 · 4 comments · Fixed by #3093 or #3557
Closed
1 task done

[Bug]: seaAnemone preset refreshes shortly after first render #3074

IgnusG opened this issue Feb 3, 2022 · 4 comments · Fixed by #3093 or #3557
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed plugin A feature that could become a plugin triage up-for-grabs

Comments

@IgnusG
Copy link

IgnusG commented Feb 3, 2022

Contact Details

No response

What happened?

Using the seaAnemone preset, there is a refresh right after the particles start moving.

particles-bug

This also happens on the official seaAnemone preset demo page: https://particles.js.org/samples/presets/seaAnemone

Version

In my project it's 1.39.2

Which library are you using?

Vanilla (tsparticles), React.js (react-tsparticles, react-particles-js)

tsParticles Configuration

function ParticleContainer(props: { className?: string; }) {
  const { className} = props;

  const container = useRef<Container | undefined>(undefined);
  const id = `particles-${preset}`;

  const init = useCallback(async () => {
    const { loadSeaAnemonePreset } = await import(
      "tsparticles-preset-sea-anemone"
    );

    loadSeaAnemonePreset(tsParticles);

  }, []);

  useEffect(() => {
    (async () => {
      await init();

      container.current = await tsParticles.load(id, { preset: "seaAnemone" });
    })();

    return () => container.current?.destroy();
  }, []);

  return <div id={id} />;
}

What browsers are you seeing the problem on?

Firefox, Microsoft Edge

Relevant log output

No logs available

Code of Conduct

  • I agree to follow this project's Code of Conduct
@IgnusG IgnusG added bug Something isn't working triage labels Feb 3, 2022
@xscode-auto-reply
Copy link

Thanks for opening a new issue. The team has been notified and will review it as soon as possible.

For urgent issues and priority support, visit https://xscode.com/matteobruni/tsparticles

@matteobruni
Copy link
Collaborator

Thank you, I'm aware of this issue but it's not on my priority list since it happens only when starting the animation. During the startup, the emitters have this issue.

@matteobruni matteobruni added good first issue Good for newcomers help wanted Extra attention is needed plugin A feature that could become a plugin up-for-grabs labels Feb 3, 2022
@matteobruni matteobruni added this to To do in Low Priority via automation Feb 3, 2022
@matteobruni matteobruni moved this from To do to In progress in Low Priority Feb 4, 2022
@matteobruni matteobruni moved this from In progress to Review in progress in Low Priority Feb 4, 2022
@matteobruni matteobruni moved this from Review in progress to Reviewer approved in Low Priority Feb 4, 2022
Low Priority automation moved this from Reviewer approved to Done Feb 4, 2022
@matteobruni matteobruni mentioned this issue Feb 6, 2022
@matteobruni matteobruni linked a pull request Feb 6, 2022 that will close this issue
@IgnusG
Copy link
Author

IgnusG commented Mar 14, 2022

Seems like this regression has returned since 41 I believe

@matteobruni
Copy link
Collaborator

Yes, it's a known issue. The fix was more breaking than expected, I'm still inspecting this. I'm trying to understand why the resize event is raised twice on startup

@matteobruni matteobruni linked a pull request Mar 18, 2022 that will close this issue
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed plugin A feature that could become a plugin triage up-for-grabs
Projects
No open projects
Low Priority
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants