Skip to content

Change particle link distance on interval #2259

Closed Locked Answered by matteobruni
joedecerce asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @joedecerce,

This is a difficult trick to do programmatically since each particle has its own options and values, links are set on particles too. This is because you can have particles without links or with different ids.

If you have 30 particles with link id A and 30 particles with link id B they will only link with the same link id, this is useful when using particles groups or emitters.

If you want to change the distance you have to update each particle link distance.

But there's a plugin system inside tsParticles and you can create something like this:

const customLinksPlugin = {
    id: "customLinks",
    needsPlugin: () => true, // it has options parameter, if you want to customi…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@joedecerce
Comment options

@matteobruni
Comment options

Answer selected by matteobruni
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants