# draw-something

> A plugin of drawing something

Latest version **0.0.9-development** (published 2018-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install draw-something
pnpm add draw-something
yarn add draw-something
bun add draw-something
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9-development |
| Published | 2018-05-15 |
| First published | 2018-05-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | boseny |
| Maintainers | boseny |
| Keywords | draw, plugin |

## Links

- npm: https://www.npmjs.com/package/draw-something
- Repository: https://github.com/BosenY/Draw
- Homepage: https://github.com/BosenY/Draw#readme
- Issues: https://github.com/BosenY/Draw/issues
- npm.io page: https://npm.io/package/draw-something

## Recent versions

- 0.0.9-development (latest) — 2018-05-15
- 0.0.8-development — 2018-05-14
- 0.0.7-development — 2018-05-11
- 0.0.6-development — 2018-05-11
- 0.0.5-development — 2018-05-11
- 0.0.3-development — 2018-05-11
- 0.0.2-development — 2018-05-11
- 0.0.1-development — 2018-05-11

## README

# Draw

一个用js实现的飘落的效果，可以飘落各种文字（✨、❤️、❉等等）

可以放在自己的博客当中使用。

## use

CDN
```html
<script src="https://unpkg.com/draw-something/dist/draw.min.js"></script>
```
NPM
```js
//install
npm i draw-something

//use
import Draw from 'draw-something'
new Draw()
```
## options
new(options)

| Option name | Type | Description |
| --- | --- | --- |
| parent | Dom object | a parent dom object 默认在body上创建id为`draw-wrap${Draw.id}`的div, id初始值为0逐个递增 |
| maxNum | number | max num of the screen,默认`30` |
| iconText | string | 飘落的个体,默认 `❉` |
| color | string | 飘落个体的颜色,默认 `#fff`|
| end() | function | stop draw |


```javascript
import Draw from './lib/Draw.js'
let flame = document.getElementById('flame')
let draw1 = new Draw()
let draw2 = new Draw({ parent: flame, maxNum: 2 , iconText: "✨"})
let draw3 = new Draw({ maxNum: 10, iconText: "❤️"})
draw3.end()
```

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