Table of Contents
- MotorCortex-Counter
- Intro / Features
- Getting Started
- Creating Incidents
- Adding Incidents in your clip
- Contributing
- License
- Sponsored by
With MotorCortex-Counter you can easily add a counter in your clip. You are able to animate and customize the progress of a number from an initial value to the target value.
The Plugin exposes one Incident:
- Counter
Chrome | Safari | IE / Edge | Firefox | Opera |
---|---|---|---|---|
24+ | 6+ | 10+ | 32+ | 15+ |
$ npm install @donkeyclip/motorcortex-counter
# OR
$ yarn add @donkeyclip/motorcortex-counter
import { loadPlugin } from "@donkeyclip/motorcortex";
import CounterDef from "@donkeyclip/motorcortex-counter";
const Counter = loadPlugin(CounterDef);
const counterEffect = new Counter.Counter(
{
animatedAttrs: {
count: 100,
},
initialValues: {
count: 0,
},
decimals: 2,
},
{
selector: ".effect-target",
duration: 1000,
easing: "easeInOutQuad",
}
);
Name | Are | Values |
---|---|---|
count | set that initial and target value | num |
decimals | defines the decimal accurary of the counter | num (0-20) |
clipName.addIncident(incidentName,startTime);
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:
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that we can review your changes