# e-flyjs

> fly.js

Latest version **1.0.5** (published 2019-09-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install e-flyjs
pnpm add e-flyjs
yarn add e-flyjs
bun add e-flyjs
```

## 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.5 |
| Published | 2019-09-04 |
| First published | 2019-09-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Eric |
| Maintainers | sincerity |
| Keywords | fly, parabola |

## Links

- npm: https://www.npmjs.com/package/e-flyjs
- Repository: https://github.com/ChaoLeer/e-flyjs
- Homepage: https://github.com/ChaoLeer/e-flyjs#readme
- Issues: https://github.com/ChaoLeer/e-flyjs/issues
- npm.io page: https://npm.io/package/e-flyjs

## Recent versions

- 1.0.5 (latest) — 2019-09-04
- 1.0.2 — 2019-09-04

## README

> 抛物线动画
# 用法
```bash
# install
npm i --save e-flyjs
```
```html
<template>
  <div class="fly-demo">
    <div class="list">
      <div class="list-item" @click="flyRun" v-for="i in 50" :key="i">
        项{{i}}s
      </div>
    </div>
    <div id="tar" class="tar">目标</div>
    <span id="dot" class="dot"></span>
  </div>
</template>
<script>
import Fly from 'e-flyjs'
export default {
  name: 'Fly_demo',
  methods: {
    flyRun(e) {
      const $tar = document.querySelector('#tar')
      const $dot = document.querySelector('#dot')
      let flyInstance = new Fly({
        el: e.target, // 触发的元素
        targetEl: $tar, // 目标元素
        flyEl: $dot, // 飞行的元素，可不传
        duration: 600,
        stop: function() {
          flyInstance = null
        },
      })
      flyInstance.start()
    }
  }
}
</script>
<style scoped>
  .fly-demo {
    position: relative;
  }
  .list {
    display: flex;
    flex-wrap: wrap;
    width: 20vw;
  }
  .list-item {
    width: 60px;
    height: 60px;
    color: #787878;
    text-align: center;
    line-height: 60px;
    border-radius: 60px;
    background: #d7e1ff;
    /* transition: all 3s linear; */
    will-change: auto;
    transition-timing-function: cubic-bezier(0.16, 0.72, 0.90, 0.22);
  }
  .tar {
    position: fixed;
    right: 10px;
    bottom: 20vh;
    width: 80px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    border: 1px solid #787878;
  }
  .dot {
    position: fixed;
    opacity: 0;
    width: 20px;
    height: 20px;
    border-radius: 20px;
    background: #f00;
  }
</style>
```

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