Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
tsparticles-slim
Advanced tools
tsParticles preset for big colored circles on a white background.
First of all install tsParticles following the instructions for vanilla javascript in the main project here
Once installed you need one more script to be included in your page (or you can download that from jsDelivr:
<script src="https://cdn.jsdelivr.net/npm/tsparticles-preset-big-circles"></script>
This script MUST be placed after the tsParticles
one.
Once the scripts are loaded you can set up tsParticles
like this:
tsParticles.load("tsparticles", {
preset: "bigCircles", // also "big-circles" is accepted
});
Important ⚠️
You can override all the options defining the properties like in any standard tsParticles
installation.
tsParticles.load("tsparticles", {
particles: {
shape: {
type: "square",
},
},
preset: "bigCircles", // also "big-circles" is accepted
});
Like in the sample above, the circles will be replaced by squares.
The syntax for React.js
, Preact
and Inferno
is the same.
I'll show a simplified sample you can find in this repository; it uses class component, but you can choose any syntax you prefer.
import Particles from "react-tsparticles";
import { Main } from "tsparticles";
import { loadPreset } from "tsparticles-preset-big-circles";
export class ParticlesContainer extends React.PureComponent<IProps> {
// this customizes the component tsParticles installation
customInit(tsParticles: Main) {
// this adds the preset to tsParticles, you can safely use the
loadPreset(tsParticles);
}
render() {
const options = {
preset: "bigCircles", // also "big-circles" is accepted
};
return <Particles options={options} init={this.customInit} />;
}
}
FAQs
Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.
The npm package tsparticles-slim receives a total of 17,039 weekly downloads. As such, tsparticles-slim popularity was classified as popular.
We found that tsparticles-slim demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.