wufe / react-particles-js

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

cannot read property 'numberOfItems' of undefined when polygon is on #85

Closed nimahkh closed 5 years ago

nimahkh commented 5 years ago

i do this config exactly from demo mask ,

{
    "fps_limit": 28,
    "particles": {
        "number": {
            "value": 200,
            "density": {
                "enable": false
            }
        },
        "line_linked": {
            "enable": true,
            "distance": 30,
            "opacity": 0.4
        },
        "move": {
            "speed": 1
        },
        "opacity": {
            "anim": {
                "enable": true,
                "opacity_min": 0.05,
                "speed": 2,
                "sync": false
            },
            "value": 0.4
        }
    },
    "polygon": {
        "enable":true,
        "debug":true,
        "scale": 0.5,
        "type": "inline",
        "move": {
            "radius": 10
        },
        "url": "/assets/icons/back_polygon.svg",
        "inline": {
            "arrangement": "equidistant"
        },
        "draw": {
            "enable": true,
            "stroke": {
                "color": "rgba(255, 255, 255, .2)"
            }
        }
    },
    "retina_detect": true,
    "interactivity": {
        "events": {
            "onhover": {
                "enable": true,
                "mode": "bubble"
            }
        },
        "modes": {
            "bubble": {
                "size": 6,
                "distance": 40
            }
        }
    }
}


assets is in public and i can see it from browser, but i have a error in console :

cannot read property 'numberOfItems' of undefined
RouillerRomain commented 5 years ago

any suggestions to this issue ?,,

wufe commented 5 years ago

Are you using the svgpathseg polyfill? Add it in your html:

<script src="https://cdn.rawgit.com/progers/pathseg/master/pathseg.js"></script>

stale[bot] commented 5 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.