npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@donkeyclip/motorcortex-anime

v3.1.1

Published

Anime plugin for MotorCortex

Readme

MotorCortex-Anime

Table of Contents

Demo

Check it out here

Intro / Features

Anime.js library as a MotorCortex CSS Layer. The library exposes CSSEffect which implementes an alternative CSS Layer for MotorCortex while the second (MotionPath) performs motion path animation.

The Plugin exposes two Incidents:

  • CSSEffect (CSS Layer implementation)
  • MotionPath

Browser compatibility

| Chrome | Safari | IE / Edge | Firefox | Opera | | ------ | ------ | --------- | ------- | ----- | | 24+ | 6+ | 10+ | 32+ | 15+ |

Getting Started

Installation

$ npm install @donkeyclip/motorcortex-anime
# OR
$ yarn add @donkeyclip/motorcortex-anime

Importing and loading

You 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):

As a MotorCortex's core CSS Layer:

import { setCSSCore } from "@donkeyclip/motorcortex";
import AnimePluginDefinition from "@donkeyclip/motorcortex-anime";
setCSSCore(AnimePluginDefinition.CSSEffect);

As a simple plugin:

import { loadPlugin } from "@donkeyclip/motorcortex";
import AnimePluginDefinition from "@donkeyclip/motorcortex-anime";
const AnimePlugin = loadPlugin(AnimePluginDefinition);

Creating Incidents

CSSEffect

Use the provided CSSEffect as the CSS core of MotorCortex.

const MyAnime = new CSSEffect({
  animatedAttrs: {
    left: '120px',
    top: '220px',
    background: 'orange',
    width: '10px;
  }
}, {
  selector: '.a',
  duration: 2000,
  easing: 'linear'
});

IMPORTANT

Don't forget το import and load the Anime Plugin using the first way.

MotionPath

The MotioPath Incident implements the motion path capability of anime.js library. This feature allows motion of any element on any given (svg) path.

The syntax is simple:

const motionPath = new AnimePlugin.MotionPath(
  {
    pixelsAccuracy: 5,
    animatedAttrs: {
      positionOn: {
        pathElement: "the selector that targets your path element",
      },
    },
  },
  {
    selector: ".a",
    duration: 2000,
    easing: "linear",
  }
);

MotionPath Attrs

As you can notice the animated attribute here is positionOn which in turn is an object expecting only one key, the pathElement which is a selctor to the path element that defines the motion path.

The selected elements will sleep into this path on the given duration.

One more thing to notice is the pixelsAccuracy attribute. This attribute sets the distance threshold between two sequential points of the path that the element should move. This attribute can be used so the motion path effect gets more performant (less processing is required). The default value is 4.

IMPORTANT

For the MotionPath Incident you should import and load MotorCortex-Anime as a simple Plugin.

Adding Incidents in your clip

clipName.addIncident(incidentName, startTime);

Contributing

In general, we follow the "fork-and-pull" Git workflow, so if you want to submit patches and additions you should follow the next steps:

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

License

MIT License

Sponsored by