Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@cosmograph/cosmos
Advanced tools
GPU-accelerated Force Graph
Cosmos is a WebGL Force Graph layout algorithm and rendering engine. All the computations and drawing are happening on the GPU in fragment and vertex shaders, avoiding expensive memory operations.
It enables real-time simulation of network graphs consisting of hundreds of thousands of points and links on modern hardware.
📺 Comparison with other libraries
Install the package:
npm install @cosmograph/cosmos
Configure the graph, set data, and run the simulation:
import { Graph } from '@cosmograph/cosmos';
import { pointPositions, links } from './data';
const div = document.querySelector('div');
const config = {
simulationRepulsion: 0.5,
renderLinks: true,
onClick: (pointIndex) => {
console.log('Clicked point index: ', pointIndex);
},
};
const graph = new Graph(div, config);
graph.setPointPositions(pointPositions);
graph.setLinks(links);
graph.render();
pointPositions
: A Float32Array of [x1, y1, x2, y2, ..., xN, yN]
.links
: A Float32Array of [sourceIndex1, targetIndex1, ..., sourceIndexN, targetIndexN]
.Cosmos v2.0 introduces significant improvements in performance and data handling:
setPointPositions
and setLinks
replace setData
for improved efficiency.setPointClusters
, setClusterPositions
and setPointClusterStrength
).Check the Migration Guide for details.
EXT_float_blend
). We're investigating this issue and exploring solutions.CC-BY-NC-4.0
Cosmos is free for non-commercial usage. If you're a scientist, artist, educator, journalist, or student, we'd love to hear how you're using Cosmos! For commercial projects, please reach out.
FAQs
GPU-based force graph layout and rendering
The npm package @cosmograph/cosmos receives a total of 699 weekly downloads. As such, @cosmograph/cosmos popularity was classified as not popular.
We found that @cosmograph/cosmos demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.