Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Axis aligned bounding boxes for fun and profit.
var aabb = require('aabb-2d')
var bounding_box = aabb([0, 0], [12, 12]) // x, y == 0, 0; width, height == 12, 12
, other = aabb([10, 10], [2, 2])
bounding_box.intersects(other) // true
bounding_box.union(other) // -> aabb([10, 10], [2, 2])
bounding_box.translate([2, 2]) // moves the bounding box
bounding_box.expand(other) // returns a new aabb that surrounds both bboxes
returns a new aabb.
returns the perimeter length of the box.
returns the integer perimeter length of the box (using a bit shift instead of a multiply.)
returns the area of the box.
returns:
x0/y1 ------ x1/y1
| |
| | <-- height
| |
| |
x0/y0 ------ x1/y0
^
|
width
moves the box. returns itself.
returns true if the two bounding boxes intersect (or touch at all.)
returns a new aabb
representing the shared area of the
two aabb's. returns null
if the boxes don't intersect.
MIT
FAQs
2d axis aligned bounding boxes
The npm package aabb-2d receives a total of 2 weekly downloads. As such, aabb-2d popularity was classified as not popular.
We found that aabb-2d 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.