{"id":20762033,"url":"https://github.com/donkeyclip/motorcortex-anime","last_synced_at":"2025-04-30T06:41:58.749Z","repository":{"id":37295896,"uuid":"136182766","full_name":"donkeyclip/motorcortex-anime","owner":"donkeyclip","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-30T05:27:35.000Z","size":31116,"stargazers_count":1,"open_issues_count":18,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-30T06:31:02.303Z","etag":null,"topics":["animation","anime","anime-incident","anime-library","motorcortex","motorcortex-anime","motorcortex-plugin"],"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}},"created_at":"2018-06-05T13:37:37.000Z","updated_at":"2023-07-18T09:08:46.000Z","dependencies_parsed_at":"2024-01-17T06:43:14.396Z","dependency_job_id":"1f659337-4a93-4f23-89ca-d1e1887aa7cb","html_url":"https://github.com/donkeyclip/motorcortex-anime","commit_stats":{"total_commits":1177,"total_committers":18,"mean_commits":65.38888888888889,"dds":0.4672897196261683,"last_synced_commit":"fcea0eaec69ed7dea94a52aa4f057df3cf48de95"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-anime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-anime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-anime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donkeyclip%2Fmotorcortex-anime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donkeyclip","download_url":"https://codeload.github.com/donkeyclip/motorcortex-anime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251658084,"owners_count":21622817,"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","anime","anime-incident","anime-library","motorcortex","motorcortex-anime","motorcortex-plugin"],"created_at":"2024-11-17T10:28:46.695Z","updated_at":"2025-04-30T06:41:58.723Z","avatar_url":"https://github.com/donkeyclip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MotorCortex-Anime\n\n**Table of Contents**\n\n- [MotorCortex-Anime](#motorcortex-anime)\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  - [CSSEffect](#csseffect)\n  - [MotionPath](#motionpath)\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-anime/demo/)\n\n# Intro / Features\n\n[Anime.js](https://animejs.com/) library as a MotorCortex CSS Layer.\nThe library exposes `CSSEffect` which implementes an alternative CSS Layer for MotorCortex while the second (`MotionPath`) performs motion path animation.\n\nThe Plugin exposes two Incidents:\n- `CSSEffect` (CSS Layer implementation)\n- `MotionPath`\n\n## Browser compatibility\n\n| Chrome | Safari | IE / Edge | Firefox | Opera |\n| ------ | ------ | --------- | ------- | ----- |\n| 24+    | 6+     | 10+       | 32+     | 15+   |\n\n\n# Getting Started\n## Installation\n\n```bash\n$ npm install @donkeyclip/motorcortex-anime\n# OR\n$ yarn add @donkeyclip/motorcortex-anime\n```\n## Importing and loading\n\nYou can load Anime plugin in a two different ways, based on what you want to do with this plugin (you will find out more information below):\n\nAs a MotorCortex's core CSS Layer:\n```javascript\nimport { setCSSCore } from \"@donkeyclip/motorcortex\";\nimport AnimePluginDefinition from \"@donkeyclip/motorcortex-anime\";\nsetCSSCore(AnimePluginDefinition.CSSEffect);\n```\n\nAs a simple plugin:\n```javascript\nimport { loadPlugin } from \"@donkeyclip/motorcortex\";\nimport AnimePluginDefinition from \"@donkeyclip/motorcortex-anime\";\nconst AnimePlugin = loadPlugin(AnimePluginDefinition);\n```\n\n# Creating Incidents\n\n## CSSEffect\nUse the provided CSSEffect as the CSS core of MotorCortex.\n```javascript\nconst MyAnime = new CSSEffect({\n  animatedAttrs: {\n    left: '120px',\n    top: '220px',\n    background: 'orange',\n    width: '10px;\n  }\n}, {\n  selector: '.a',\n  duration: 2000,\n  easing: 'linear'\n});\n```\n#### IMPORTANT \nDon't forget το import and load the Anime Plugin using the first way.\n\n## MotionPath\n\nThe MotioPath Incident implements the motion path capability of anime.js library. This feature allows motion of any element on any given (svg) path.\n\nThe syntax is simple:\n\n```javascript\nconst motionPath = new AnimePlugin.MotionPath(\n  {\n    pixelsAccuracy: 5,\n    animatedAttrs: {\n      positionOn: {\n        pathElement: \"the selector that targets your path element\",\n      },\n    },\n  },\n  {\n    selector: \".a\",\n    duration: 2000,\n    easing: \"linear\",\n  }\n);\n```\n### MotionPath Attrs\nAs you can notice the animated attribute here is `positionOn` which in turn is an\nobject expecting only one key, the `pathElement` which is a selctor to the path\nelement that defines the motion path.\n\nThe selected elements will sleep into this path on the given duration.\n\nOne more thing to notice is the `pixelsAccuracy` attribute. This attribute sets the distance threshold between two\nsequential points of the path that the element should move. This attribute can be used so the motion path\neffect gets more performant (less processing is required). The default value is 4.\n\n#### IMPORTANT \nFor the MotionPath Incident you should import and load MotorCortex-Anime as a simple Plugin.\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\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonkeyclip%2Fmotorcortex-anime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonkeyclip%2Fmotorcortex-anime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonkeyclip%2Fmotorcortex-anime/lists"}