{"id":20762004,"url":"https://github.com/donkeyclip/motorcortex-flubber","last_synced_at":"2026-03-09T17:47:07.832Z","repository":{"id":39490307,"uuid":"142132086","full_name":"donkeyclip/motorcortex-flubber","owner":"donkeyclip","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-06T02:57:58.000Z","size":18839,"stargazers_count":0,"open_issues_count":21,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-06T12:05:32.726Z","etag":null,"topics":["flubber","motorcortex","motorcortex-plugin","svg"],"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/donkeyclip.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-07-24T08:55:48.000Z","updated_at":"2022-04-01T08:45:04.000Z","dependencies_parsed_at":"2023-02-08T04:46:40.451Z","dependency_job_id":"b7d78b19-1240-4af3-8107-f11498b6724d","html_url":"https://github.com/donkeyclip/motorcortex-flubber","commit_stats":{"total_commits":431,"total_committers":16,"mean_commits":26.9375,"dds":0.4431554524361949,"last_synced_commit":"fe742445ce9116d42d74c70bbfb0cfeb64a21277"},"previous_names":["kissmybutton/motorcortex-flubber"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/donkeyclip/motorcortex-flubber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-flubber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-flubber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-flubber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-flubber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donkeyclip","download_url":"https://codeload.github.com/donkeyclip/motorcortex-flubber/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-flubber/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30305301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T17:35:44.120Z","status":"ssl_error","status_checked_at":"2026-03-09T17:35:43.707Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["flubber","motorcortex","motorcortex-plugin","svg"],"created_at":"2024-11-17T10:28:37.617Z","updated_at":"2026-03-09T17:47:07.814Z","avatar_url":"https://github.com/donkeyclip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MotorCortex-Flubber\n\n**Table of Contents**\n\n- [MotorCortex-Flubber](#motorcortex-flubber)\n  - [Demo](#demo)\n- [Intro / Features](#intro--features)\n- [Getting Started](#getting-started)\n  - [Installation](#installation)\n  - [Importing and Loading](#importing-and-loading)\n- [Creating Incidents](#creating-incidents)\n  - [Flubber](#flubber)\n- [Adding Incidents in your clip](#adding-incidents-in-your-clip)\n- [Contributing](#contributing)\n- [License](#license)\n- [Sponsored by](#sponsored-by)\n\n## Demo\n\n[Check it out here](https://donkeyclip.github.io/motorcortex-flubber/demo/)\n\n# Intro / Features\n\nMotorcortex-Flubber plugin brings [flubber](https://github.com/veltman/flubber) library's capabilities into MotorCortex, available as Incident.\n_\"The goal of this library is to provide a best-guess interpolation for any two arbitrary shapes (or collections of shapes) that results in a reasonably smooth animation, without overthinking it.\"_\n\nThis Plugin exposes one Incident:\n- Flubber\n\n# Getting Started\n\n## Installation\n\n```bash\n$ npm install @donkeyclip/motorcortex-flubber\n# OR\n$ yarn add @donkeyclip/motorcortex-flubber\n```\n\n## Importing and loading\n\n```javascript\nimport { loadPlugin } from \"@donkeyclip/motorcortex\";\nimport FlubberPluginDefinition from \"@donkeyclip/motorcortex-flubber\";\nconst FlubberPlugin = loadPlugin(FlubberPluginDefinition);\n```\n# Creating Incidents\n\n## Flubber\n\nFlubber Incident accepts on its `animatedAttrs` property the `d` parameter which defines the final state of the svg path to be transformed. The Incident should target the svg path to transform (via the `selector` of its props).\nHere's is an example which include both the creation of the incident and the creation of the clip where the incident will be applied:\n\n```javascript\n// Don't forget to import also HTMLClip from \"@donkeyclip/motorcortex\" in order to create a clip.\nimport { HTMLClip } from \"@donkeyclip/motorcortex\";\n// Νotice the svg path with id \"flubber\" on the html of the clip. \n// This is the path we will apply the Flubber transformation to.\nconst myClip = new HTMLClip({\n  host: document.getElementById(\"clip-container\"),\n  html: `\u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"960\" height=\"500\"\u003e\n            \u003cg transform=\"translate(240 10) scale(30 30)\"\u003e\n                \u003cpath id=\"flubber\" d=\"M1,0 L2,2 L0,2 Z\"\u003e\u003c/path\u003e\n            \u003c/g\u003e\n        \u003c/svg\u003e`,\n  css: `#flubber{\n        fill: #8b00ff;\n        display:block;\n    }\n    svg{\n        margin-top:150px;\n    }`,\n});\n\nconst flubberIncident = new FlubberPlugin.Flubber(\n  {\n    animatedAttrs: {\n      d: [\n        [0, 0],\n        [2, 0],\n        [2, 1],\n        [1, 2],\n        [0, 1],\n      ],\n    },\n  },\n  {\n    selector: \"#flubber\",\n    duration: 2000,\n  }\n);\n```\n\nNotice that we passed the new `d` parameter of the svg path. `d` can be defined via various ways (have a look here for more info: [https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).\nAccording to the provided definition an alternative way to define the new `d` value can be:\n\n```javascript\nconst fubberIncident2 = new FlubberPlugin.Flubber(\n  {\n    animatedAttrs: {\n      d: \"M2 1 h1 v1 h1 v1 h-1 v1 h-1 v-1 h-1 v-1 h1 z\",\n    },\n  },\n  {\n    selector: \"#flubber\",\n    duration: 2000,\n  }\n);\n```\n\n# Adding Incidents in your clip\n\n```javascript\nclipName.addIncident(incidentName,startTime);\n```\n\n# Contributing \n\nIn general, we follow the \"fork-and-pull\" Git workflow, so if you want to submit patches and additions you should follow the next steps:\n1.\t**Fork** the repo on GitHub\n2.\t**Clone** the project to your own machine\n3.\t**Commit** changes to your own branch\n4.\t**Push** your work back up to your fork\n5.\tSubmit a **Pull request** so that we can review your changes\n\n# License\n\n[MIT License](https://opensource.org/licenses/MIT)\n\n# Sponsored by\n[\u003cimg src=\"https://presskit.donkeyclip.com/logos/donkey%20clip%20logo.svg\" width=250\u003e\u003c/img\u003e](https://donkeyclip.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonkeyclip%2Fmotorcortex-flubber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonkeyclip%2Fmotorcortex-flubber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonkeyclip%2Fmotorcortex-flubber/lists"}