GithubHelp home page GithubHelp logo

Comments (5)

Kritika30032002 avatar Kritika30032002 commented on May 4, 2024

Can you brief what you expect from me to do?

from react.

Squikle avatar Squikle commented on May 4, 2024

Could you please see what the problem is and what important code is missing that is causing the problem? Otherwise, I could do a fork the other day and try to fix the problem.
I'm not sure why this problem hasn't come up yet. I've checked a few times, I don't think I'm doing anything wrong.

from react.

Squikle avatar Squikle commented on May 4, 2024

it's related to this issue #49

from react.

matteobruni avatar matteobruni commented on May 4, 2024

@Kritika30032002

Looks like something important was removed with that bunch of deleted code. When I use the new function version of the Particles component I end up with the destroyed variable as 'true' even before calling play(). Duration isn't set in options and by call stack, it happens some safelyCallDestroy() where it calls destroy() itself

With those concerns, I've decided to try the original class version and it works perfectly fine without changing any of my code I also created 2 branches in case of need to reproduce the problem. Please, see https://github.com/Squikle/MemIt/branches -npm run dev -go to http://localhost:5173/terms/1 -press the green button to finish a stack -see particles don't start with the new function component version and some logs of the destroyed variable show it's 'true'

Sorry I don't have much time for deep investigation or fork but contact me if you need some additional information

I've seen your repo and you changes some private variables. That would create some unexpected behaviors, and the destroy could be one of them.

I've tried to create a similar effect (I've not run your repo, but I think it's very close to what you are achieving) here:

https://codesandbox.io/p/sandbox/hopeful-sound-d3qq8j?file=%2Fsrc%2FApp.js%3A33%2C21

The container.addEmitter in JavaScript is not a problem, in TypeScript you need to import the EmitterContainer and cast the container to that type from @tsparticles/plugin-emitters. The container.addEmitter returns the EmitterInstance class, that you can pause/stop manually. In the sample created the Emitters have a life options, to stop both emitters after a second.

from react.

Squikle avatar Squikle commented on May 4, 2024

uh, I'll check this one. Thank you a lot for your time

from react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.