{"data":{"slug":"cosmosgl-graph","name":"graph","tagline":"GPU-accelerated force graph layout and rendering","github_url":"https://github.com/cosmosgl/graph","owner":"cosmosgl","repo":"graph","owner_avatar_url":"https://avatars.githubusercontent.com/u/206949303?v=4","primary_language":"TypeScript","stars":1256,"forks":83,"topics":["embeddings","force","graph","network","simulation","visualization","webgl"],"archived":false,"github_pushed_at":"2026-08-20T13:58:38+00:00","maintenance_label":"Very active","stars_delta_30d":37,"url":"https://www.graphcanon.com/tools/cosmosgl-graph","markdown_url":"https://www.graphcanon.com/tools/cosmosgl-graph.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/cosmosgl-graph","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=cosmosgl-graph","description":"GPU-accelerated force graph layout and rendering","homepage_url":"https://cosmos.gl","license":"MIT","open_issues":9,"watchers":12,"ai_summary":"CosmosGL/graph is a repository that focuses on GPU-accelerated techniques for the creation of force-directed graph layouts and their rendering. It leverages embeddings, making it particularly useful in visualizing complex networks and data structures.","readme_excerpt":"### Quick Start\n\nInstall the package:\n\n```bash\nnpm install @cosmos.gl/graph\n```\n\nGet the data, [configure](https://cosmosgl.github.io/graph/?path=/docs/configuration--docs) the graph and run the simulation:\n\n```ts\nimport { Graph } from '@cosmos.gl/graph'\n\nconst div = document.querySelector('div')\nconst config = {\n  spaceSize: 4096,\n  simulationFriction: 0.1, // keeps the graph inert\n  simulationGravity: 0, // disables the gravity force\n  simulationRepulsion: 0.5, // increases repulsion between points\n  curvedLinks: true, // curved links\n  fitViewOnInit: true, // fit the view to the graph after initialization\n  fitViewDelay: 1000, // wait 1 second before fitting the view\n  fitViewPadding: 0.3, // centers the graph with a padding of ~30% of screen\n  rescalePositions: false, // rescale positions, useful when coordinates are too small\n  enableDrag: true, // enable dragging points\n  onClick: (pointIndex) => { console.log('Clicked point index: ', pointIndex) },\n  /* ... */\n}\n\nconst graph = new Graph(div, config)\n\n// Points: [x1, y1, x2, y2, x3, y3]\nconst pointPositions = new Float32Array([\n  0.0, 0.0,    // Point 1 at (0,0)\n  1.0, 0.0,    // Point 2 at (1,0)\n  0.5, 1.0,    // Point 3 at (0.5,1)\n]);\n\ngraph.setPointPositions(pointPositions)\n\n// Links: [sourceIndex1, targetIndex1, sourceIndex2, targetIndex2]\nconst links = new Float32Array([\n  0, 1,    // Link from point 0 to point 1\n  1, 2,    // Link from point 1 to point 2\n  2, 0,    // Link from point 2 to point 0\n]);\n\ngraph.setLinks(links)\n\ngraph.render()\n```\n\n---","github_created_at":"2022-04-14T01:30:14+00:00","created_at":"2026-07-11T11:31:20.862084+00:00","updated_at":"2026-08-22T18:01:40.825605+00:00","categories":[{"slug":"data-retrieval","name":"Data & Retrieval","url":"https://www.graphcanon.com/categories/data-retrieval","markdown_url":"https://www.graphcanon.com/categories/data-retrieval.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/data-retrieval"},{"slug":"vector-databases","name":"Vector Databases","url":"https://www.graphcanon.com/categories/vector-databases","markdown_url":"https://www.graphcanon.com/categories/vector-databases.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/vector-databases"}],"tags":[{"slug":"embeddings","name":"embeddings"},{"slug":"force","name":"force"},{"slug":"graph","name":"graph"},{"slug":"network","name":"network"},{"slug":"simulation","name":"simulation"},{"slug":"visualization","name":"visualization"},{"slug":"webgl","name":"webgl"}],"trust":{"provenance":{"is_fork":false,"github_id":481427289,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-08-22T18:01:39.364Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":5,"days_since_push":2,"last_release_at":"2026-07-27T10:40:35Z","stars_delta_30d":37,"open_issues_delta_30d":-3},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T11:31:22.224Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"mcp":{"source":"repo_scan","observed_at":"2026-08-22T18:01:39.906Z","server_manifest":false},"scan":{"source":"repo_scan","observed_at":"2026-08-22T18:01:39.906Z"},"languages":{"value":["typescript","javascript"],"source":"github.language+package.json","observed_at":"2026-08-22T18:01:39.906Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-08-22T18:01:39.906Z"}},"decision_facts":{"hosting":null,"pricing":{"model":"freemium","summary":"Free and open-source under the MIT license."},"requirements":{"notes":["Requires a WebGL-supported environment"],"min_ram_gb":null,"requires_docker":false},"constraints":{"min_ram_gb":null,"pricing_model":"freemium","requires_docker":false},"when_to_use":["- When you require rapid visualization of large, complex network structures due to its GPU acceleration","- For projects that focus heavily on the use of embeddings for graph layout optimization"],"when_not_to_use":["- If your project does not involve visualizing complex networks as this tool's forte lies in force-directed graphical representations","- When working with systems or frameworks that do not support WebGL, since CosmosGL/graph relies on it for rendering"],"source":"enrich:decision_facts","observed_at":"2026-07-12T07:01:27.520Z"},"constraint_facets":{"min_ram_gb":null,"pricing_model":"freemium","requires_docker":false},"decision_summary":[{"label":"Pricing","value":"freemium - Free and open-source under the MIT license."},{"label":"Requirements","value":"Requires a WebGL-supported environment"},{"label":"Adopt for","value":"CosmosGL/graph provides GPU-accelerated techniques for creating and rendering force-directed layouts. This makes it particularly apt for users who need to visualize complex networks efficiently."},{"label":"License detail","value":"MIT License"}]}}