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]: particles.vue3 slow down with vue-router #4385

Closed
1 task done
bkawakami opened this issue Jul 14, 2022 · 1 comment · Fixed by #4538
Closed
1 task done

[Bug]: particles.vue3 slow down with vue-router #4385

bkawakami opened this issue Jul 14, 2022 · 1 comment · Fixed by #4538
Assignees
Labels
bug Something isn't working
Milestone

Comments

@bkawakami
Copy link

Contact Details

bru.kawakami@gmail.com

What happened?

I just start a default project with Vue 3 + Router and then add a Particle on my default HomeView.vue

<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    <HelloWorld msg="Welcome to Your Vue.js App"/>
  </div>
  <Particles id="tsparticles" :particlesInit="particlesInit" :options="particlesConfig" />
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

import { loadTrianglesPreset } from "tsparticles-preset-triangles"

export default {
  name: 'HomeView',
  components: {
    HelloWorld
  },
  methods: {
    particlesInit: async function(engine) {
      await loadTrianglesPreset(engine)
    },
  },
  data() {
    return {
      particlesConfig: {
        preset: "triangles",
        fpsLimit: 60,
        detectRetina: false
      }
    }
  }
}
</script>

<style>
#tsparticles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: -10;
}
</style>

But when I peform a simple action, such as change page in top menu on Vue default router, when I come back to home de particles are slow and lagged.

Someone experienced this?

tsParticles Version

2.1.3

Which library are you using?

Vue.js 3.x (particles.vue3)

tsParticles Configuration

{
        preset: "triangles",
        fpsLimit: 60,
        detectRetina: false
      }

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@bkawakami bkawakami added bug Something isn't working triage labels Jul 14, 2022
@matteobruni matteobruni added Core and removed triage labels Jul 14, 2022
@matteobruni matteobruni added this to the 2.2.0 milestone Jul 14, 2022
@matteobruni matteobruni linked a pull request Jul 14, 2022 that will close this issue
@matteobruni
Copy link
Collaborator

matteobruni commented Jul 14, 2022

Thanks for the report, I thought this kind of issue was already solved in 2.1.0, but I didn't notice there was still a bug about it. The first report was #4031, but it'll be fixed in v2.2.0 (PR #4341).

matteobruni added a commit that referenced this issue Jul 14, 2022
same issue, thought it was fixed but there was still a bug present
matteobruni added a commit that referenced this issue Jul 28, 2022
…ixes #4534

fix: fixed issue with opacity and svg color replaced images, fixes #4532
@matteobruni matteobruni mentioned this issue Jul 28, 2022
2 tasks
@matteobruni matteobruni modified the milestones: 2.2.0, 2.1.4 Jul 28, 2022
@matteobruni matteobruni removed a link to a pull request Jul 28, 2022
@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants