
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
wasm-flood-fill
Advanced tools
Implementation of a flood-fill canvas algorithm in Rust for WebAssembly
Implementation of a flood fill algorithm in Rust for WebAssembly.
This is an experimentation with WebAssembly to speed-up CPU intensive operations (flood-fill on large canvas).
import * as wasm from 'wasm-flood-fill'
const startX: number;
const startY: number;
const color: {r, g, b}: {r: number, g: number, b: number};
const context: CanvasRenderingContext2D;
const {width, height} = context.canvas;
const imageData = context.getImageData(0, 0, width, height);
const data = wasm.flood_fill(
context,
imageData.data,
Math.round(startX), Math.round(startY), // Important that it is rounded before passing it to wasm
r, g, b,
50 // tolerance (0-255 range)
);
context.putImageData(new ImageData(data, width, height), 0, 0);
Benchmarks between an equivalent function implemented in JavaScript shows an improvement in speed of 3 to 5 times for the wasm version. One flood fill takes ~50-60ms in wasm and ~230ms in JS for a 800x660 canvas.
FAQs
Implementation of a flood-fill canvas algorithm in Rust for WebAssembly
The npm package wasm-flood-fill receives a total of 0 weekly downloads. As such, wasm-flood-fill popularity was classified as not popular.
We found that wasm-flood-fill 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.