{"id":20762086,"url":"https://github.com/donkeyclip/motorcortex-sigma","last_synced_at":"2026-04-18T20:31:49.169Z","repository":{"id":39559629,"uuid":"170695408","full_name":"donkeyclip/motorcortex-sigma","owner":"donkeyclip","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-15T02:15:20.000Z","size":14155,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T17:25:51.556Z","etag":null,"topics":["motorcortex","motorcortex-plugin","sigma"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/donkeyclip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-14T13:27:01.000Z","updated_at":"2022-04-01T08:50:46.000Z","dependencies_parsed_at":"2024-11-17T10:29:39.910Z","dependency_job_id":"a53d062c-dbf7-484a-a6a4-c625aa60154c","html_url":"https://github.com/donkeyclip/motorcortex-sigma","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/donkeyclip/motorcortex-sigma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-sigma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-sigma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-sigma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-sigma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donkeyclip","download_url":"https://codeload.github.com/donkeyclip/motorcortex-sigma/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-sigma/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31984125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["motorcortex","motorcortex-plugin","sigma"],"created_at":"2024-11-17T10:29:34.148Z","updated_at":"2026-04-18T20:31:49.145Z","avatar_url":"https://github.com/donkeyclip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# motorcortex-sigmajs\n\n\n## Description\nSigma-JS library instanciates and renders graphs with any number of nodes and\nedges in a web container. The MotorCortex implementation embeds these instanciates\nand any animations performed on them within Groups of Incidents. Each Group refers \nto a different graph and therefore a different instance of sigma. Each Group can \nbe a host to child-incidents that perform animations on the said sigma graph. \n\nVarious options are available for the user, from different renderers and display \nproperties, to exporting data and images from the rendered graphs (see inner \ndocumentation and Sigma-JS plugins implemented in this version below)\n\n\n## Installation\n```bash\n$ npm install --save @kissmybutton/motorcortex-sigma\n```\n\n## Importing\n\n```javascript\nimport MotorCortex from \"@kissmybutton/motorcortex\";\nimport Sigma from \"@kissmybutton/motorcortex-sigma\";\n```\n\n## Loading\n\n```javascript\nconst plugins = MotorCortex.loadPlugin(Sigma);\nconst anime = new plugins.Sigma(attrs, props);\n```\n\n## API\n\n### Graph Creation\n-The user can either create their own graph or provide a certain number of nodes (N),\nedges (E) and clusters (C) (optional). The graph must be an array containing a nodes\nand an edges array. Each of those must contain node and edge objects following this \ntemplate:\n```javascript\ngraph.nodes[i] = {\n    id: 'n'+i,\n    lavel: 'Node ' + i, //user may change this\n    x: xCoordinate,\n    y: yCoordinate,\n    size: decimal, (the size of node)\n    color: colorOfNode (rgb or hex)\n}\ngraph.edges[i] = {\n    id: 'e' + i,\n    label: 'Edge ' + i, (optional)\n    source: 'n' + a,\n    target: 'n' + b,\n    size: sizeOfEdge,\n    color: colorOfEdge\n}\n```\n\n### Sigma Instanciation\nCreating a SigmaBasePlugin instance requires certain attributes and properties:\n```javascript\nattrs = {\n    attrs:{\n        N: numberOfNodes,\n        E: numberOfEdges,\n        C: numberOfClusters, (optional)\n        rendererType: DefaultIsCanvas (note that most feature of the current version only work in canvas)\n        customGraph: userProvidedCustomGraph\n        settings:{\n            any setting provided in sigma.settings.js\n        },\n        options:{\n            drag_nodes: T/F,\n            parallelEdges: T/F,\n            edgeCurve: T/F,\n            customEdgeShapes: T/F,\n            edgeLabels: T/F\n        },\n        cmd: {\n            sigmaFunction: {\n                params\n            }\n        }\n    }\n}\nprops = {\n    css of group,\n    host element of group,\n    html of group,\n    containerParameters of host element \n}\n```\n*NOTE* Simply instanciating Sigma will render the given graph.\n\n### Animating the graph\nAnimation Child-Incidents of group are defined as follows:\n```javascript\nnew Sigma.SigmaAnimPlugin(\n    //attrs\n    {\n        attrs:{\n            master: theParentGroup\n        },\n        animatedAttrs:{\n            finalG: the final form of the graph\n        }   \n    },\n    //props\n    {\n        duration: the duration of the animation in milliseconds,\n        selector: DOM selector of the host element\n    }\n);\ngroupName.addIncident(childIncidentName, millisecondTimeStart)\n```\n\n\n\n\n## SIGMA PLUGINS IMPLEMENTED \n\nThe following plugins of the SigmaJS library are currently supported by the\nMC SigmaJS plugin implementation (most are exclusive to the canvas renderer):\n    -plugins.animate --\u003e implemented allowing MC to call requestAnimationFrame\n        function instead of sigma\n    -plugins.dragNodes --\u003e resets the graph to he result after the drag\n    -renderers.parallelEdges --\u003e custom graph creation includes parallel edges.\n    -renderers.customEdgeShapes --\u003e renderers support custom edge creation\n        for dashed, dotted, parallel and taperred edges (only compatible with canvas)\n    -renderers.edgeDots --\u003e renderers support the creation of curved edges/arrows\n    -renderers.edgeLabels --\u003e renderers support display of edge labels\n    -renderers.snapshot --\u003e can export an image file directly from a renderer\n    -plugins.neighborhoods --\u003e can export the nodes that a node is connected to\n        (the node's neighborhood)\n    -statistics.HITS --\u003e can export Hub and Authority statistics about the \n        nodes of a graph.\n    -pathfinding.astar  --\u003e can export an array demonstrating the path from 2 \n        target nodes (using the alpha-star algorithm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonkeyclip%2Fmotorcortex-sigma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonkeyclip%2Fmotorcortex-sigma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonkeyclip%2Fmotorcortex-sigma/lists"}