Open MarzSbaih opened 6 years ago
+1 same behavior
+1 same here
I was able to get them to work by using the 'image' type in the configs, and a data:image encoded string as the image source. E.g. 'data:image/svg+xml;utf8,<svg ...> ... </svg>'
. Just make sure to check your quotes!
I was able to get them to work by using the 'image' type in the configs, and a data:image encoded string as the image source. E.g.
'data:image/svg+xml;utf8,<svg ...> ... </svg>'
. Just make sure to check your quotes!
Wait, are you saying you essentially put the contents of the SVG in the config as a string?
@jcat4 Yes, essentially just paste the SVG code (single line in single quotes for ES5 support) between 'data:image/svg+xml;utf8,
and '
That is what worked as a patch for a client website, though I haven't done any testing into performance. It was able to solve our issue in time for site delivery and did not create a noticeable lag :smiley:
@jcat4 Yes, essentially just paste the SVG code (single line in single quotes for ES5 support) between
'data:image/svg+xml;utf8,
and'
That is what worked as a patch for a client website, though I haven't done any testing into performance. It was able to solve our issue in time for site delivery and did not create a noticeable lag 😃
Do you have a pen for this? I can't Seem to get it working.
@joelscreative Sorry for the delay, here ya go! https://codepen.io/anon/pen/vbVJLW?editors=0010
I copied my JSON into the code generated from the Codepen link on the demo site, I set mine up a little differently but the SVG still works. If you're still having trouble, make sure you have the viewbox
attribute on your SVG. I saw I'm using viewbox and width/height (this was from a project about a year ago), so you may need test if both are necessary. I hope that helps!
@joelscreative Sorry for the delay, here ya go! https://codepen.io/anon/pen/vbVJLW?editors=0010
I copied my JSON into the code generated from the Codepen link on the demo site, I set mine up a little differently but the SVG still works. If you're still having trouble, make sure you have the
viewbox
attribute on your SVG. I saw I'm using viewbox and width/height (this was from a project about a year ago), so you may need test if both are necessary. I hope that helps!
BTW, this doesn't work for me in Chrome. Working in Safari. I don't have any other browsers on my system to test with. Just curious, what browser are you using?
Resolution I found was under the 'Pull requests' tab. Look for 'Fixed SVG loading issue in Safari and Chrome' > Files changed > particles.js > view files
Seems to work at the moment.
thanks @davidandrew that was what i needed! +1
dang still issues on IE 11... anybody else?
I tried to use SVGs, and I only see black background! BTW, PNGs work good but I need to use svg instead !
Any Idea ?
Thanks