An even bigger problem is that Particles Bric doesn’t work, except on a new, blank document. When I add it to any of my existing Blocs web pages, it won’t display when I Preview. But when I create a new document, and either color the background or color the particles (so they become visible), then it works. So clearly, that Bric doesn’t play well with other things on the page. Not that it matters, I guess. I really want to get my custom SVG animated, which is something that Bric won’t do.
Anyone can test my custom-generated Particles code (with custom SVG) in your own Blocs website simply by performing the following 2 steps:
- Open your Blocs site and click on a Bloc with a background color (so you can see the Particles on Preview), then name its ID “particles-js”.
- Copy the script below and then Paste it in the Footer of the “Add Code” section of Page Settings…
(When you Preview in Blocs, you should see your page content is thrown to the Left, and my K-shaped SVG floating around on the right. That’s BAD. What I want to happen is get that SVG animation to float BEHIND the page content. The solution to that problem is one of life’s great mysteries, I guess.)
<script type="text/javascript">
particlesJS("particles-js", {"particles":{"number":{"value":10,"density":{"enable":false,"value_area":710.2342786683108}},"color":{"value":"#daddf0"},"shape":{"type":"image","stroke":{"width":0,"color":"#000"},"polygon":{"nb_sides":4},"image":{"src":"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='#fff' opacity='0.2' width='50' height='50' viewBox='0 0 64.1 46.2'> %09%3Cpolygon%20points%3D%220.5%2020.1%2010.1%2014%2019.6%2020.1%2010%2026.2%22%2F%3E%20%09%3Cpolygon%20points%3D%2211.4%2027.1%2021%2021%2030.5%2027.1%2020.9%2033.2%22%2F%3E%20%09%3Cpolygon%20points%3D%2222.4%2020.2%2032%2014%2041.5%2020.1%2031.9%2026.3%22%2F%3E%20%09%3Cpolygon%20points%3D%2244.3%2020.1%2053.9%2014%2063.4%2020.1%2053.8%2026.3%22%2F%3E%20%09%3Cpolygon%20points%3D%2222.4%206.1%2032%200%2041.5%206.1%2031.9%2012.3%22%2F%3E%20%09%3Cpolygon%20points%3D%2222.4%2034.2%2032%2028.1%2041.5%2034.2%2032%2040.3%22%2F%3E%20%09%3Cpolygon%20points%3D%2210.8%2028.6%2020.4%2034.7%2020.4%2039.2%2010.8%2033%22%2F%3E%20%09%3Cpolygon%20points%3D%220%2021.6%209.5%2027.7%209.5%2032.2%200%2026.1%22%2F%3E%20%09%09%3Cpolygon%20points%3D%2221.7%2035.5%2031.2%2041.6%2031.2%2046.2%2021.7%2040%22%2F%3E%20%09%09%3Cpolygon%20points%3D%2242.3%2035.5%2032.7%2041.6%2032.7%2046.2%2042.3%2040%22%2F%3E%20%09%09%09%3Cpolygon%20points%3D%2243.5%2021.5%2053%2027.6%2053%2032.1%2043.5%2025.9%22%2F%3E%20%09%09%09%3Cpolygon%20points%3D%2264.1%2021.5%2054.6%2027.6%2054.6%2032.1%2064.1%2025.9%22%2F%3E%20%09%09%09%3Cpolygon%20points%3D%2221.6%207.5%2021.6%2011.9%2027%2015.4%2030.5%2013.2%22%2F%3E%20%09%09%09%3Cpolygon%20points%3D%2242.2%207.5%2033.3%2013.2%2036.8%2015.4%2042.2%2011.9%22%2F%3E%20%09%09%09%3Cpolygon%20points%3D%2242.2%2021.5%2033.3%2027.2%2036.9%2029.4%2042.2%2026%22%2F%3E </svg>","width":50,"height":50}},"opacity":{"value":0.07215332581736189,"random":false,"anim":{"enable":false,"speed":1,"opacity_min":0.1,"sync":false}},"size":{"value":88.18739822122009,"random":true,"anim":{"enable":false,"speed":10,"size_min":40,"sync":false}},"line_linked":{"enable":false,"distance":336.71552048102217,"color":"#ff0000","opacity":1,"width":2},"move":{"enable":true,"speed":0.5,"direction":"left","random":true,"straight":false,"out_mode":"out","bounce":false,"attract":{"enable":false,"rotateX":600,"rotateY":1200}}},"interactivity":{"detect_on":"canvas","events":{"onhover":{"enable":false,"mode":"grab"},"onclick":{"enable":false,"mode":"push"},"resize":true},"modes":{"grab":{"distance":400,"line_linked":{"opacity":1}},"bubble":{"distance":400,"size":40,"duration":2,"opacity":8,"speed":3},"repulse":{"distance":200,"duration":0.4},"push":{"particles_nb":4},"remove":{"particles_nb":2}}},"retina_detect":false});
</script>