Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/d3-delaunay

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/d3-delaunay

TypeScript definitions for d3-delaunay

  • 6.0.4
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2M
decreased by-4.42%
Maintainers
1
Weekly downloads
 
Created

What is @types/d3-delaunay?

The @types/d3-delaunay package provides TypeScript type definitions for the d3-delaunay library, which is a JavaScript library for computing Delaunay triangulations and Voronoi diagrams. These type definitions allow TypeScript developers to use d3-delaunay in their projects with the benefits of type checking and code autocompletion.

What are @types/d3-delaunay's main functionalities?

Delaunay Triangulation

This feature allows you to compute the Delaunay triangulation of a set of points. The 'triangles' property of the Delaunay object contains the indices of the points forming the triangles.

import { Delaunay } from 'd3-delaunay';

const points = [[0, 0], [1, 0], [0, 1], [1, 1]];
const delaunay = Delaunay.from(points);
const triangles = delaunay.triangles;

Voronoi Diagram

This feature allows you to compute the Voronoi diagram from a Delaunay triangulation. The 'voronoi' method creates the Voronoi layout, and 'cellPolygons' generates the polygons for each cell.

import { Delaunay } from 'd3-delaunay';

const points = [[0, 0], [1, 0], [0, 1], [1, 1]];
const delaunay = Delaunay.from(points);
const voronoi = delaunay.voronoi([0, 0, 960, 500]);
const diagram = voronoi.cellPolygons();

Other packages similar to @types/d3-delaunay

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc