A MotorCortex plugin for animating number progress from a start to an end value.
npm install @donkeyclip/motorcortex-counterTable of Contents
- MotorCortex-Counter
- Demo
- Intro / Features
- Getting Started
- Installation
- Importing and Loading
- Creating Incidents
- Counter
- Adding Incidents in your clip
- Contributing
- License
- Sponsored by
The Plugin exposes one Incident:
- Counter
#### Browser compatibility
| Chrome | Safari | IE / Edge | Firefox | Opera |
| ------ | ------ | --------- | ------- | ----- |
| 24+ | 6+ | 10+ | 32+ | 15+ |
``bash`
$ npm install @donkeyclip/motorcortex-counterOR
$ yarn add @donkeyclip/motorcortex-counter
`javascript`
import { loadPlugin } from "@donkeyclip/motorcortex";
import CounterDef from "@donkeyclip/motorcortex-counter";
const Counter = loadPlugin(CounterDef);
javascript
const counterEffect = new Counter.Counter(
{
animatedAttrs: {
count: 100,
},
initialValues: {
count: 0,
},
decimals: 2,
},
{
selector: ".effect-target",
duration: 1000,
easing: "easeInOutQuad",
}
);
`$3
| Name | Are | Values |
| -------- | :------------------------------------------: | ---------: |
| count | set that initial and target value | num |
| decimals | defines the decimal accurary of the counter | num (0-20) |
Adding Incidents in your clip
`javascript
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:
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