Closed JigyasuPrakash closed 4 years ago
I'm not sure what is going on.. Any further detail might help.
Are you sure the CSS is rendering correctly?
Yes I am pretty sure the CSS are working perfect in development mode but as soon as i build the react app.. and deploy the build over firebase something messes up.. and only canvas is rendered with no particle effect.
Unfortunately I don't know how to reproduce. Is this issue reproducible in a codesandbox environment? Can you provide a sample?
I am not much familier with codesandbox. But you can use my repository to find the bug. https://github.com/JigyasuPrakash/JigyasuPrakash.github.io
I have actually managed to use particles using CDN.
I imported your repository in codesandbox and fixed the issue:
https://codesandbox.io/s/inspiring-kowalevski-dj2p1
I don't know if this was the project version that was giving the issue, anyway I removed the CDN script and updated react-particles-js
to 3.0.3
and added the Particle
component to the App.js
. Removed also the initialization of particles in the public js, it was useless at this point.
I fixed also the z-index
in the App.css for the particles and imported the particles.json
in the Particle
component to update the settings.
Everything seems ok there
@matteobruni thanks for helping me out.. I have checked the sandbox and it working as expected.. but my problem is with the deployement.. I have copied the sandbox project and deployed on netlify and the problem is same as it was earlier.. You can check the deployment at here
@matteobruni thanks for helping me out.. I have checked the sandbox and it working as expected.. but my problem is with the deployement.. I have copied the sandbox project and deployed on netlify and the problem is same as it was earlier.. You can check the deployment at here
I've checked the deployment and the particles container has 1% opacity, Idk why but at least we found the issue.
The value should be 1 and not 1% obv. Probably the value in the App.css in % it's causing the issue, try using 1 instead of 100%.
I've updated the sandbox with 1 if you want to try.
Finally its working..!! Thank you so much @matteobruni you really made my day. So does this issue needs a fix in building script as it is not the expected behaviour?
You’re welcome. No it was just a CSS error like I thought.
Ok then.. thank u so much again man..
I used this as background animation for my website. It is working absolutly fine but the moment i build the react app makes things get worse.. only canvas is rendered on page and rest of the particle effect just disappear.. am I doing somthing wrong..