Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@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 878 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.