Comments (5)
Can you brief what you expect from me to do?
from react.
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.
it's related to this issue #49
from react.
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.
uh, I'll check this one. Thank you a lot for your time
from react.
Related Issues (20)
- `console.dir` is left in code HOT 2
- Particles not showing. HOT 1
- How do i stop ts particles from taking the whole background and only the background of the div its in HOT 1
- Changing theme crashes page HOT 7
- hexagons preset is not working for me HOT 1
- Convert the component using hooks HOT 7
- Fast route changes causes component render outside #root HOT 1
- How to set it to render within a certain div range instead of the entire screen HOT 1
- tsparticles causing build to fail HOT 1
- How to change the fixed of canvas to absolute? HOT 1
- Update license to MIT same as @tsparticles/engine
- Particles on one component, staying even when I scroll to another component HOT 5
- Please fix TypeScript support - object HOT 6
- Vector.js error HOT 1
- Next JS HOT 1
- Flickering Particles on projects build with React and Vite HOT 1
- [Feature Request] Support to React Native HOT 1
- Particles started loading very slowly recently HOT 2
- particles cover the whole page, i want it to only cover my hero component but its covering the whole page, im using next js HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.