# trueanimation

> This is low weight lib, that helps with step-by-step animation

Latest version **1.0.0** (published 2018-04-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install trueanimation
pnpm add trueanimation
yarn add trueanimation
bun add trueanimation
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-04-01 |
| First published | 2018-04-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | MinskLeo |
| Maintainers | minskleo |
| Keywords | animation, css, lib |

## Links

- npm: https://www.npmjs.com/package/trueanimation
- Repository: https://github.com/MinskLeo/TrueAnimation
- Homepage: https://github.com/MinskLeo/TrueAnimation#readme
- Issues: https://github.com/MinskLeo/TrueAnimation/issues
- npm.io page: https://npm.io/package/trueanimation

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-04-01

## README

# TrueAnimation
This is low weight lib, that helps with using step-by-step animation
# Usage
To use that lib correctly:
1. Connect lib to your project
```
<head>

    // Other tags here
    <script src="libs/TrueAnimation.js"></script>
</head>
```
2. Make new .js file with your code
3. Then you need to setup your animation

  Select necessary element
  ```
  let square = document.querySelector(".square");
  ```
  Init constructor
  ```
  let anim = new TrueAnimation(square,["width", "height", "opacity"],[{
      duration: 500,
      timingFunction: "linear",
      lastValue: "3px"
    },{
      duration: 500,
      timingFunction: "linear",
      lastValue: "3px"
    },{
      duration: 200,
      timingFunction: "linear",
      lastValue: "0"
    }]);
  ```
  Almost before an animation you should init css transition rules with init() method
  
  *Don't worry about your current transition rules! Lib will automatically save it and restore when the animation ends!*
  ```
  anim.init();
  ```
  4) At last, when you want to start animation, use start() method
  ```
  square.addEventListener("click",()=>{
    anim.start();
  });
  5) That's all! Congratulations!
  ```

---
_Source: https://npm.io/package/trueanimation · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
