
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
modular-particle-system-webgl-renderer
Advanced tools
Simple WebGL 2 renderer package for modular-particle-system
.
Minified size 9 kB. Capable of rendering up to 100 000 particles with smooth FPS (60 times per second).
Available as:
<script src="https://cdn.jsdelivr.net/npm/modular-particle-system-webgl-renderer@1.0.0/index.iife.js"></script>
By using the IIFE build, you can even embed a fully functional particle system + renderer with pure HTML code, for example like this.
npm install modular-particle-system-webgl-renderer
NOTE: Usage from NPM package is currently untested.
// IIFE
const { Renderer } = modularParticleSystemWebglRenderer;
// NPM
import { Renderer } from "modular-particle-system-webgl-renderer";
const imgCloudTexture = new Image();
imgCloudTexture.src = `my-assets/generic/cloud.png`
const textures = {
"generic/cloud.png": imgCloudTexture,
};
const renderer = Renderer({
particleSystem,
container: document.body,
textures,
});
particleSystem
Reference to a modular ParticleSystem
object.
container
Reference to a HTML
element that will contain the renderer.
textures
Texture sources for rendering particles.
This is a object where each property key describes the name of a texture and the value is a texture source. Several types of values are supported:
ArrayBufferView
ImageData
HTMLImageElement
ImageBitmap
pixels
parameter.autoUpdate
If omitted or
true, the renderer will automatically update the ParticleSystem
between each frame.
coordinateSystem
Defaults to 'pixels'
. Can be one of:
'pixels'
: Particle positions are in pixels, {x:0, y: 0}
is at top left corner of container
, positive X is right, positive Y is down..
'pixels-centered'
: Particle positions are in pixels, {x:0, y: 0}
is at center of container
, positive X is right, positive Y is down.
maxParticlesCount
Defaults to 50000
, can be used to set a limit for particle rendering.
When number of particles exceeds this, the renderer will render some subset of the particles but not all.
const renderer = Renderer({ ... });
renderer.destroy()
The renderer currently only supports rendering with 1 texture source.
The vision is to allow rendering with a relatively small number of relatively small textures, let's say 10 textures each smaller than 200x200px, since this is within the limits of keeping things simple and performant.
cd modular-particle-system-webgl-renderer
npm i
npm start
FAQs
WebGL 2 renderer for modular-particle-system package
We found that modular-particle-system-webgl-renderer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.