{"id":22059193,"url":"https://github.com/pegasystems/somaria","last_synced_at":"2025-05-12T19:45:09.075Z","repository":{"id":35612023,"uuid":"153501903","full_name":"pegasystems/somaria","owner":"pegasystems","description":"Model-driven data visualization","archived":false,"fork":false,"pushed_at":"2024-09-26T21:52:42.000Z","size":195,"stargazers_count":6,"open_issues_count":6,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-01T02:49:48.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pegasystems.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null}},"created_at":"2018-10-17T18:06:02.000Z","updated_at":"2023-09-08T13:58:43.000Z","dependencies_parsed_at":"2024-03-29T19:27:36.731Z","dependency_job_id":"498c67cd-721c-4bd4-8ac1-c79612ef4a9e","html_url":"https://github.com/pegasystems/somaria","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasystems%2Fsomaria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasystems%2Fsomaria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasystems%2Fsomaria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pegasystems%2Fsomaria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pegasystems","download_url":"https://codeload.github.com/pegasystems/somaria/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253809826,"owners_count":21967809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-30T17:27:30.170Z","updated_at":"2025-05-12T19:45:09.032Z","avatar_url":"https://github.com/pegasystems.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003e\n    \u003cimg alt=\"Somaria logo\" src=\"spec/images/somaria-block.png\"\u003e\n    \u003cp\u003eSomaria\u003c/p\u003e\n\u003c/h2\u003e\n\u003cp align=\"center\"\u003eModel-driven data visualization\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://travis-ci.org/pegasystems/somaria\"\u003e\n\t\t\u003cimg alt=\"Build status\" src=\"https://travis-ci.org/pegasystems/somaria.svg?branch=master\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://codecov.io/gh/pegasystems/somaria\"\u003e\n\t\t\u003cimg alt=\"Code coverage\" src=\"https://codecov.io/gh/pegasystems/somaria/branch/master/graph/badge.svg\"\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n### Introduction\n\nSomaria draws shapes in WebGL based on a JSON object describing how data influences those shapes.    This data is composed of \"blocks\" which interconnect so that data flows through calculations and into shapes.\n\n```javascript\n// Your data visualization, described in JSON\nvar dataVizJSON = {\n    drawables: [ \"Drawable Iterator 1\" ],\n    blocks: [\n        { // These \"Published inputs\" are configurable at runtime\n            id: \"Published inputs\", type: \"PublishedInputs\",\n            publishedOutputs: [\n                {\n                    id: \"Values\",\n                    accessType: \"External\",\n                    type: \"list\",\n                    fallbackAccessType: \"Value\",\n                    value: []\n                }\n            ]\n        },\n        {\n            id: \"Count 1\", type: \"Count\",\n            inputs: [\n                { accessType: \"Published\", blockId: \"Published inputs\", reference: \"Values\" }\n            ]\n        },\n        { // Iterators repeat drawables and actions\n            id: \"Drawable Iterator 1\", type: \"IteratorDrawable\",\n            drawables: [ \"Rectangle 1\" ],\n            inputs: [\n                { accessType: \"Value\" },\n                { accessType: \"Indexed\", blockId: \"Count 1\", index: 0 }\n            ],\n            blocks: [\n                { id: \"Iterator variables\", type: \"IteratorVariables\" },\n                {\n                    id: \"Published inputs\", type: \"PublishedInputs\",\n                    publishedOutputs: [\n                        { id: \"Values\", accessType: \"Published\", blockId: \"Published inputs\", reference: \"Values\" }\n                    ]\n                },\n                {\n                    id: \"Convert range 1\", type: \"ConvertRange\",\n                    inputs: [\n                        { accessType: \"Indexed\", blockId: \"Iterator variables\", index: 1 },\n                        { accessType: \"Value\", value: 0 },\n                        { accessType: \"Indexed\", blockId: \"Iterator variables\", index: 0 },\n                        { accessType: \"Value\", value: -130 },\n                        { accessType: \"Value\", value: 150 }\n                    ]\n                },\n                {\n                    id: \"Lookup by index 1\", type: \"LookupIndexed\",\n                    inputs: [\n                        { accessType: \"Published\", blockId: \"Published inputs\", reference: \"Values\" },\n                        { accessType: \"Indexed\", blockId: \"Iterator variables\", index: 1 }\n                    ]\n                },\n                {\n                    id: \"Point 1\", type: \"Point\",\n                    inputs: [\n                        { accessType: \"Indexed\", blockId: \"Convert range 1\", index: 0 },\n                        { accessType: \"Value\", value: 0 },\n                        { accessType: \"Value\", value: 0 }\n                    ]\n                },\n                {\n                    id: \"Rectangle 1\", type: \"Rectangle\",\n                    inputs: [\n                        { accessType: \"Value\" },\n                        { accessType: \"Indexed\", blockId: \"Point 1\", index: 0 },\n                        { accessType: \"Value\", value: 50 },\n                        { accessType: \"Indexed\", blockId: \"Lookup by index 1\", index: 0 },\n                        { accessType: \"Value\" },\n                        { accessType: \"Value\" },\n                        { accessType: \"Value\", value: \"center\" },\n                        { accessType: \"Value\", value: \"min\" }\n                    ]\n                }\n            ]\n        }\n    ]\n};\n\n// Configure the visualization\nvar dataVizOptions = {\n    height: 300,\n    width: 300,\n    backgroundColor: 0xEEEEEE,\n    meshColor: 0x34495E\n};\n\n// The HTML5 canvas element to draw on\nvar canvas = document.createElement( \"canvas\" );\n\n// Tell Somaria about our visualization\nvar dataViz = new Visualization( dataVizOptions, dataVizJSON, canvas );\n\n// Tell Somaria about our data\ndataViz.setInputValue( \"Values\", [ 165, 121, 53, 86 ] );\n\n// Draw on the canvas using WebGL 🎉\ndataViz.render();\n```\n\n![Somaria visualization example](spec/examples/basic-bars.png)\n\nThe above example is basic and bland, but much more is possible!    Shape, color, positioning, mouse interaction, and animation can all be data-driven using Somaria's library of blocks.\n\n### Compiling from Typescript\n\nBe sure to install dependencies by running `npm install`.\n\nThe Typescript source code can be compiled using `npm run build`.    A combined ES5 source file will be generated at `build/Visualization.js` while CommonJS modules using ES6 will be generated under `spec/build` for testing purposes.\n\n### Making changes\n\nWhen making changes be sure to add or update unit tests under `spec/automated` and run them with `npm test`, then check coverage with `npm run coverage`.    Manual test fixtures are also available for inspection under `spec/manual`.    Finally, `npm run lint` will automatically adjust code style for consistency.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpegasystems%2Fsomaria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpegasystems%2Fsomaria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpegasystems%2Fsomaria/lists"}