Current collected state Current
Observed since 20 Oct, 19:10 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
2d-canvas-image-particles
A simple lightweight 2D particle system using Canvas.
A simple lightweight 2D particle system using Canvas.
new ParticleSystem(canvas_id, image_path, options);<canvas id="js-canvas"></canvas>
<script src="dist/2d-canvas-image-particles.min.js"></script>
<script>
new ParticleSystem('js-canvas', 'images/default-particle.png', {
cursorMode: CursorMode.Zoom
});
</script>
You can check the demo page's sources for more examples. You can also use an HTMLCanvasElement instead of an id.
npm install 2d-canvas-image-particles or yarn add 2d-canvas-image-particles.
Then you can import it and use it
import '2d-canvas-image-particles';
// ...
new ParticleSystem('id', 'images/default-particle.png', {
cursorMode: CursorMode.Zoom
});
You will need to specify your own images.
{
maxParticles: number,
velocityAngle: [min, max],
speed: [min, max],
rotationStartAngle: [min, max],
cursorMode: CursorMode, // (CursorMode.Bounce, CursorMode.Zoom, CursorMode.Light, CursorMode.Follow),
rotationMode: RotationMode, // (RotationMode.None, RotationMode.Random, RotationMode.FollowVelocity)
rotationSpeed: [min, max],
rotationSpeedSizeScale: number
minimumRotationSpeed: number // if min is negative and max is positive
tints: [new Tint('#hexColor', opacity)],
width: [min, max],
height: [min, max],
addOnClickNb: number,
density: number,
cursorRadius: number
}
npm installnpm run buildDownload counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
ts-loaderEnvironment{
"local_name": "ts-loader",
"alias": false,
"peer_metadata": null
} | ^0.9.4 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^2.0.3 | development |
typingsEnvironment{
"local_name": "typings",
"alias": false,
"peer_metadata": null
} | ^1.4.0 | development |
webpackEnvironment{
"local_name": "webpack",
"alias": false,
"peer_metadata": null
} | ^1.13.2 | development |
Source distribution
{
"integrity": "sha512-UWwNYlu32jFz6Ra5AIB4lc6zRwW9ugpTozX5PH3HMaTjNOc5r9T0WKdPWFPWu6/zASm+pMsQiYoF9aMj1FoKGw==",
"shasum": "ecf06b01bdfd87c68b757bed54ef7b95c04ea0da",
"tarball": "https://registry.npmjs.org/2d-canvas-image-particles/-/2d-canvas-image-particles-1.4.2.tgz",
"fileCount": 24,
"unpackedSize": 57554,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuebECRA9TVsSAnZWagAAT00P/13XMCRdduHCF3T699nM\nB67uAJcZFRJPnciMUf/H7QrnvR2P9knt9KXulkXQVwJaJ+54Q9xq1+hWy6P4\nuLjgfKsAKBbyt5hBy/urU0KlFYLTXUmigTxDKrZkUmBRVitqbT0F0K/Lq03D\nX4Xr5FFEinCY2bjLelg6qLT312bX3Nqs+0ArRzCdOdNplgpa9jEFw2X3jVjS\ncn7NSFYFFlXo4niqmV6xLJ0eg0+P+HVC25l9dx6LNjO/IYE25dbLgS52NsSf\n6SS/ZqPHq8G9Os36pyKaTYVwBMYVtFCu2o6/RkjwRrwwDoUjdV7zlSiloDme\nyb9CaK3tPgG2b6ATWN5bLRm4nRn5UhLkevorvltY9MIGOBu4f5aKsESlo5xX\n/BeN8xYHCNyb2rQNKbFhBdXZRWjMTsbDgEFj7o1uO+1GalIF/ziHmvoKQM6a\niYvU4pDY1uUcpkO+vtT9AllKIyqnLP09VsnyYoIOm6xFucvdSRsX5IkfqCwq\nKYdY8uB2M8pKqgpbjUrFTcRNJ/MjDUD0oOiZoeHER93W56fw6opb0I97I0dT\nSFo5xPbI19vnDjJutIGPL+6JV/6Sy11DFj5/YG29VtZiBrDdECesAMmmMKtC\nVLVW8hC4elxvG13zYtX5KPgbT7RUDxWBqO43tgSjHZeI8VGNtKIZGT2VU3df\nxONi\r\n=u+Un\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIQCtBWMYS8D2eiIzdr+Ol3LdM2cJNHu0xnTQWRGHx0Kx0gIgcvP1KK4nV+TS96MOUwmRL8T7cwKnc+esBmFZpmi1JOU="
}
]
}Shared repository data · GitHub
Observed since 20 Oct, 19:10 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:a007eaa4cb11882a0f817c89934224eb7bd8c4c04e180ecc1db9246dfd3f7336