
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Performant artful blob generator using canvas 📋
Via npm, Yarn, pnpm
pnpm i blava
import { Blava, Point } from 'blava';
new Blava(canvas) where canvas is a reference to the canvas element. An additional configuration object can also be included. Animation automatically begins. To toggle the animation, call Blava.pause and Blava.play| parameter | default value | options | notes |
|---|---|---|---|
| seed | null | Any string | A seed on which all random generation (such as movement, initial positioning, & gradient hue) will be based |
| variance | {x:5,y:10} | Any object with x and y number parameters | The extent of movement in each direction |
| gradient | 'auto' | 'auto' or an object with either from and to color string properties or from and to property objects, each containing a color color string property and a position object with x and y properties describing the position of the stop | The gradient fill of the Blava |
| movementSpeed | 'slow' | One of ['molasses', 'slow', 'medium', 'fast', 'jelly'] or any number | The speed of movement in point animation. Typically any number between 0.000_05 and 0.01 works well |
| points | null | null, an array of Points, or an array of objects with x and y number parameters | The points to build the Blava blob with |
| pointCount | 6 | Any number | The number of points to build the Blava blob with. Does nothing if points parameter is supplied |
| style | 'wave' | One of ['wave','blob'] | The style of Blava to generate. Does nothing if points parameter is supplied |
| beforePaint | null | Any function | Function called before painting the Blava on the canvas. The points and path of the Blava are calculated by this step. First argument is the Blava instance |
| afterPaint | null | Any function | Function called after painting the Blava on the canvas. First argument is the Blava instance |
A Blava is generated on a canvas whose container element is assumed to be a square. Points are placed on a 100×100 grid, with {x: 0, y: 0} being the top left corner of the canvas. The variance setting determines the maximum distance the point can travel vertically or horizontally during animation (assuming the Point's animated property for that dimension is set to true)
A custom Point class is included to track positioning and per-direction animation state of each point in the Blava. The constructor takes an x and y position as well as an optional configuration object. The configuration object can have an animated property with either a boolean to determine whether the Point is animated at all or an object with x and y properties to set animation state per dimension
The beforePaint and afterPaint configuration options allow for a function before and after the
Blava paint operation respectively. Both functions have full access to the Blava instance as the
first passed argument. Point calculation is completed before running either function, so they can
be manipulated before or after the paint operation.
FAQs
Performant artful blob generator using canvas
The npm package blava receives a total of 14 weekly downloads. As such, blava popularity was classified as not popular.
We found that blava demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.