
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.
A JavaScript library for Constrained Delaunay Triangulation powered by WebAssembly.
npm install cdt-js
import CDTModule, { Point, Edge } from 'cdt-js';
CDTModule().then((CDT) => {
const triangulation = new CDT.Triangulation();
const vertices: Point[] = [
{ x: 0, y: 0 },
{ x: 100, y: 0 },
{ x: 100, y: 100 },
{ x: 0, y: 100 },
{ x: 50, y: 50 }
];
const edges: Edge[] = [
{ from: 0, to: 1 },
{ from: 1, to: 2 },
{ from: 2, to: 3 },
{ from: 3, to: 0 },
];
triangulation.insertVertices(vertices);
triangulation.insertEdges(edges);
triangulation.eraseOuterTrianglesAndHoles();
const vertices = triangulation.getVertices();
const triangles = triangulation.getTriangles();
const fixedEdges = triangulation.getFixedEdges();
const extractedEdges = CDT.extractEdgesFromTriangles(triangles);
console.log(vertices);
console.log(triangles);
console.log(fixedEdges);
console.log(extractedEdges);
});
Main class for triangulation operations.
new Triangulation(
vertexInsertionOrder?: VertexInsertionOrder,
intersectingConstraintEdges?: IntersectingConstraintEdges,
minDistToConstraintEdge?: number
);
vertexInsertionOrder: Strategy specifying order in which a range of vertices is inserted (default: Auto)intersectingConstraintEdges: Strategy for treating intersecting constraint edges (default: NotAllowed)minDistToConstraintEdge: Distance within which a point is considered to be lying on a constraint edge (default: 0)insertVertices(vertices): Add an array of pointsinsertEdges(edges): Add an array of constraint edgestriangulate(): Perform triangulationgetVertices(): Get array of verticesgetEdges(): Get array of edgesgetTriangles(): Get array of triangles as vertex indicesAuto: Automatic insertion order optimized for better performance (default)AsProvided: Insert vertices in same order they are providedNotAllowed: Constraint edge intersections are not allowed (default)TryResolve: Attempt to resolve constraint edge intersectionsDontCheck: No checks, slightly faster but less safe, user must provide a valid input without intersecting constraintsSee the examples folder for complete examples.
npm run build
MIT
FAQs
Constrained Delaunay Triangulation library for JavaScript using WebAssembly
We found that cdt-js demonstrated a healthy version release cadence and project activity because the last version was released less than 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
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.