wufe / react-particles-js

Particles.js for React
https://rpj.bembi.dev/
MIT License
1.15k stars 106 forks source link

How to use in Next.js? #69

Closed hrahimi270 closed 5 years ago

hrahimi270 commented 5 years ago

Hello guys. I love what you did! It's awesome. Now I want to use it my Next.js project and it's getting hard for me! Because in Next.js configs are hard!

Right now, I'm installed react-particles-js and run the simple example very successfully. But when I want to use polygon example, I have some issues. So I need your help.

How to use pathseg in React/Next ?

This is my code: pic1 1

pic2 2

I'm using polygon example just like that. But I have no result. I think it's because that I'm not using pathseg. How to use it? Any solution? Very very tanks. Regards, Hossein.

wufe commented 5 years ago

I never used Next.js, however I think you may want to read this section of the documentation about populating head. Just put the pathseg polyfill link there.

hrahimi270 commented 5 years ago

Thanks for your reply. Look at this link: https://greensock.com/morphSVG. Is possible to create something like this? With Particle.js? I have some SVGs and I want to transform them between each other, like SVG morphing but in Canvas. Do you have any idea?

wufe commented 5 years ago

I'm afraid this is not possible at the moment.
This would require a completely different approach.
Nevertheless I will think about it because it's an interesting effect.
Thanks for your feedback.

Closing this issue anyway, answers related to original question given.

matteobruni commented 4 years ago

This is the solution for Next.js https://github.com/matteobruni/tsparticles/issues/686