DEV Community

Discussion on: tsParticles Polygon Mask with color animation

Collapse
 
abevigodasson1 profile image
abevigodasson

Hi - really appreciate your reply. Any suggestions as to why when using a local file (even a copy of your example SVG) it turns into random particles that don't constrain to (or display) the SVG? Thanks

Thread Thread
 
matteobruni profile image
Matteo Bruni

Ok, this could be a SVG format issue. Only SVG path tags are valid, so if you have other tags they won't be considered. Another important note is using SVG 1.1 and not 2.0. You can have more than one path tag anyway, they will be all used in the polygon mask feature. Remember also to include pathseg polyfill for Chrome and other Chromium browsers that dropper SVG 1.1 support.

Thread Thread
 
abevigodasson1 profile image
abevigodasson • Edited

Got it - thanks. I must be missing something else since I've double checked everything there and can't even get it to work with a local copy of your example SVG (which shouldn't have any SVG format issues). With local files elsewise, I can only get it to work linking out to your SVG.

Thread Thread
 
matteobruni profile image
Matteo Bruni

You can try creating a sample on CodeSandbox or StackBlitz with your SVG so I can check it, I can tell you more about your file if I can see it