Options should have a theme option that can be used to specify which options should be used, like the array index configuration.
This should help create particles themes creating a general preset that will be added to the tsParticles instance and the named options with customisations.
This is an example of how should work:
tsParticles.load("tsparticles", {
themes: [
{
name: "light",
default: true,
options: {
background: {
color: "#fff"
},
particles: {
color: {
value: "#000" // black particles on light background
}
}
}
},
{
name: "dark",
default: false, // this property defaults to false
options: {
background: {
color: "#000"
},
particles: {
color: {
value: "#fff" // white particles on dark background
}
}
}
}
]
/* all your cool options */
});
tsParticles.useTheme('light');
tsParticles.useTheme('dark');
This is what I think this feature should be
Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.93. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
I will like to fix this issue with some help!!
Hi @Himanshunitrr,
Welcome and thanks! If you want to discuss this issue or need help you can join Slack so we can talk more freely, otherwise we can discuss here if you don't want. No pressure 馃槈
What's your slack channel ?
Got it.
@Himanshunitrr you can see it working here in the alpha 3 version: https://codepen.io/matteobruni/full/rNeOaWP
Thanks for the help!