
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
tsparticles-preset-fireworks
Advanced tools
tsParticles preset for fireworks effects.
The first step is installing 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@1/tsparticles.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tsparticles-preset-fireworks@1/tsparticles.preset.fireworks.min.js"></script>
This script MUST be placed after the tsParticles
one.
A bundled script can also be used, this will include every needed plugin needed by the preset.
<script src="https://cdn.jsdelivr.net/npm/tsparticles-preset-fireworks@1/tsparticles.preset.fireworks.bundle.min.js"></script>
Once the scripts are loaded you can set up tsParticles
like this:
loadFireworksPreset(tsParticles);
tsParticles.load("tsparticles", {
preset: "fireworks",
});
Important ⚠️
You can override all the options defining the properties like in any standard tsParticles
installation.
tsParticles.load("tsparticles", {
particles: {
shape: {
type: "square",
},
},
preset: "fireworks",
});
Like in the sample above, the circles will be replaced by squares.
The syntax for React.js
, Preact
and Inferno
is the same.
This sample uses the class component syntax, but you can use hooks as well (if the library supports it).
import Particles from "react-tsparticles";
import { Main } from "tsparticles";
import { loadFireworksPreset } from "tsparticles-preset-fireworks";
export class ParticlesContainer extends React.PureComponent<IProps> {
// this customizes the component tsParticles installation
customInit(main: Main) {
// this adds the preset to tsParticles, you can safely use the
loadFireworksPreset(main);
}
render() {
const options = {
preset: "fireworks",
};
return <Particles options={options} init={this.customInit} />;
}
}
The syntax for Vue.js 2.x
and 3.x
is the same
<Particles id="tsparticles" :particlesInit="particlesInit" url="http://foo.bar/particles.json" />
function particlesInit(main: Main) {
loadFireworksPreset(main);
}
<ng-particles
[id]="id"
[options]="particlesOptions"
(particlesLoaded)="particlesLoaded($event)"
(particlesInit)="particlesInit($event)"
></ng-particles>
function particlesInit(main: Main): void {
loadFireworksPreset(main);
}
<Particles
id="tsparticles"
url="http://foo.bar/particles.json"
on:particlesInit="{onParticlesInit}"
/>
let onParticlesInit = (main) => {
loadFireworksPreset(main);
};
FAQs
tsParticles fireworks preset
The npm package tsparticles-preset-fireworks receives a total of 149 weekly downloads. As such, tsparticles-preset-fireworks popularity was classified as not popular.
We found that tsparticles-preset-fireworks 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.