
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
Computes the visible region from a point for a given environment represented by a collection of line segments. Based on Amit Patel's blog post
Just install it using npm:
npm install vishull2d
Then you can use it in your game like this:
var vishull = require("vishull2d")
//Line segments are encoded as pairs of arrays
var lines = [
[[10, 10], [10, -10]]
]
//Compute visible hull from the point [0,0]
var result = vishull2d(lines, [0,0])
var region = result.region
var ids = result.ids
require("vishull2d")(segments, center)Computes the visible hull from the point center
segments is a collection of line segmentscenter is the point from which the visibility is computedReturns: An object with two properties:
region a counter-clockwise oriented simple polygon representing the visible region.ids a list of indices into segments representing the walls visible from the regionNote This code assumes that all segments intersect only at their end points
(c) 2013 Mikola Lysenko. MIT License
FAQs
Visible regions for 2D poly-lines
We found that vishull2d 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
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.