{"id":13832243,"url":"https://github.com/Soonad/Formality-Net-Animator","last_synced_at":"2025-07-09T16:34:57.031Z","repository":{"id":105784549,"uuid":"165679393","full_name":"Soonad/Formality-Net-Animator","owner":"Soonad","description":"Animations for Elementary-Affine-Net interactions","archived":false,"fork":false,"pushed_at":"2019-06-30T17:40:49.000Z","size":38338,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-05T10:20:43.635Z","etag":null,"topics":["animation","animator","computation","i-net","interaction-nets","lambda","nasic","reduction"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Soonad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-01-14T14:53:00.000Z","updated_at":"2024-02-07T18:21:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3291cb0-915c-49de-b9b5-2ae8a97d87c4","html_url":"https://github.com/Soonad/Formality-Net-Animator","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/Soonad%2FFormality-Net-Animator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soonad%2FFormality-Net-Animator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soonad%2FFormality-Net-Animator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soonad%2FFormality-Net-Animator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Soonad","download_url":"https://codeload.github.com/Soonad/Formality-Net-Animator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225575261,"owners_count":17490731,"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":["animation","animator","computation","i-net","interaction-nets","lambda","nasic","reduction"],"created_at":"2024-08-04T10:01:56.884Z","updated_at":"2024-11-20T14:30:43.925Z","avatar_url":"https://github.com/Soonad.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Nasic Render\n\nThis tool is used to create an animation of the reduction process of interaction nets for [Nasic](https://github.com/MaiaVictor/Nasic) (N-Ary Symmetric Interaction Combinators).\n\n## Usage\n\u003e It's recommended have a sketch before defining the type and position of the nodes.\n\n1. Go to the root folder and run a local server. \n2. Open `http://localhost:8080` to visualize the canvas.\n\nEdit function `makeNodes()` to setup nodes properties.\nWe start creating an empty node's array, an initial node and the other nodes. \n\n``` javascript\nfunction makeNodes() {\n    var nodes = [];\n    var initialNode = new Node(0, {x: width * 0.47 - 5, y: height * 0.05}, getRadianFromAngle()); \n    var node0 = new Node(1, {x: width * 0.5, y: height * 0.2}, getRadianFromAngle(90));\n    var node1 = new Node(1, {x: width * 0.3, y: height * 0.40}, getRadianFromAngle());\n    ...\n}\n```\n\nAfter pushing the nodes into the array and identifing them, we have to connect their ports. Again, it's highly recommended have a sketch before doing this. \n``` javascript\n // Connections between ports\n    connectPorts([node0, 0], [node1, 0]);\n    connectPorts([node0, 1], [node4, 0]);\n    connectPorts([node0, 2],[initialNode, 0]);\n    ...\n```\n\n## Making an animation \n- **Single click**: select an element\n- **Click and move**: updates an element position. Can be done in nodes and pivots. \n- **Click and use arrow keys**: updates an element angle, makes a rotation\n- **Space bar**: saves an state of nodes' info as position, rotating, ports, etc.\n- **Press crtl/cmd and click** a node to check if can do a transformation (reduction or duplication). If it can transform, the transformation will occur, otherwise nothing happens. \n- **Press 'x'** to remove the last state of nodes saved\n- **Press 'h'** to hide pivots position\n- **Press 'p'** to play an animation\n\n\u003e Tip: to make a smooth animation, do small changes on the position and rotation of the elements and save them. More states saved, more smooth is the animation. \n\n\u003cimg src=\"nasic-render.gif\" width=\"300\" height=\"300\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSoonad%2FFormality-Net-Animator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSoonad%2FFormality-Net-Animator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSoonad%2FFormality-Net-Animator/lists"}