question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

stroke for images/svg particles?

See original GitHub issue

Is there anyway to give stroke to images? like stroke is working in circular particles not custom images path.

also i want to know if i can change stroke/color/shadow values on the fly without refreshing the whole particle canvas? thanks

Which version are you using? 1.22.1

Which library are you using?

  • jQuery (jquery-particles)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
thewayurcommented, Mar 20, 2021

@matteobruni omg, beautiful examples! you are such a lovely person. thanks a lot for such an adorable library. this is my most fav lib, you are my hero… love from India!!!

1reaction
matteobrunicommented, Mar 19, 2021

For stroking the particles you can see this sample: https://codepen.io/matteobruni/pen/XWbBxEm Changing the color on the fly can be done with the animation like here: https://codepen.io/matteobruni/pen/NWRPKQW

But… If you want to replace the images color it’s not supported since the image needs to be loaded for every color and I think the stroke will be a square around the image.

If you need a more complex shape you can draw it yourself, something like this: https://github.com/matteobruni/tsparticles/tree/main/shapes/heart or this https://codepen.io/matteobruni/pen/vYOMmGr but it require some canvas drawing skills

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fills and Strokes - SVG: Scalable Vector Graphics | MDN
The stroke-width property defines the width of this stroke. Strokes are drawn centered around the path. In the example above, the path is...
Read more >
Davinci Resolve Tutorial: Stroke Logo Reveal Outline Effect
In this Davinci Resolve tutorial, we're going to create a stroke animation using any logo. We'll be importing an SVG file inside fusion...
Read more >
plygon mask with SVG image does not work #104 - GitHub
All super helpful, but I'm unable to get the particles to trace the path of my svg image as a polygon mask. (For...
Read more >
How to give stroke width evenly to rounded svg hexagon?
Just give it some width and height and it will work. Stroke width is even on your svg, you just don't see the...
Read more >
Shape | tsParticles - v2.6.0
Shape options is a dynamic object, is properties are the shape types, even the custom one you created (as you can read above)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found