wufe / react-particles-js

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

Polygon not appearing #147

Closed trishantpahwa closed 4 years ago

trishantpahwa commented 4 years ago

On adding the option to create a polygon using particles of an svg image. But, nothing appears. These are the settings: polygon: { enable: true, type: 'inside', move: { radius: 10 }, url: "/logo.svg" }

The logo.svg is in the same directory of the react component that is calling the

matteobruni commented 4 years ago

Hi @trishantpahwa,

The polygon options requires "pathseg" library in some browsers (Chrome is one of them)

You can fix that just with this

import "pathseg";

You can checkout a CodeSandbox sample here: https://codesandbox.io/s/react-particles-js-masking-background-forked-vc3v2?file=/src/App.js

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.