Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/komomoo/vue-image-painter

๐Ÿ™‹โ€โ™€๏ธ Image magic animation drawing effect component for Vue 2.x | ๅ›พๅƒๅŠจๆ€็ป˜ๅˆถๆ•ˆๆžœ
https://github.com/komomoo/vue-image-painter

image image-drawer image-painter img-draw vue

Last synced: about 2 months ago
JSON representation

๐Ÿ™‹โ€โ™€๏ธ Image magic animation drawing effect component for Vue 2.x | ๅ›พๅƒๅŠจๆ€็ป˜ๅˆถๆ•ˆๆžœ

Lists

README

        

# vue-image-painter

English | [็ฎ€ไฝ“ไธญๆ–‡](./README.zh-CN.md)

## ๐ŸŒฐ Example

[Demo](https://komomoo.github.io/vue-image-painter/demo/dist/)

[Demo Source Code](https://github.com/komomoo/vue-image-painter/blob/master/demo/App.vue)

## ๐Ÿš€ QuickStart

1. Install

```bash
yarn add vue-image-painter # OR npm i -S vue-image-painter
```

2. Import

```js
// main.js
import ImagePainter from 'vue-image-painter'
Vue.use(ImagePainter)
```

3. Usage. Please refer to the [Demo Source Code](https://github.com/komomoo/vue-image-painter/blob/master/demo/App.vue)

```html

```

## ๐Ÿ”Œ API

### Props

| Name | Description | Type | Default |
| --------- | --------------------------------------------------------------------------- | ------- | --------- |
| src | image URL. local images must be used `require('')` | String | undefined |
| alt | image alt | String | undefined |
| animation | animation effect. optional key: 'draw'๏ผŒ'blur' | String | 'draw' |
| duration | animation duration. unit: ms | Number | 4000 |
| immediate | display images and animations immediately, don't wait for the image to load | Boolean | false |

### Events

| Name | Description | Parameters |
| --------- | ---------------- | ---------- |
| loadStart | image load start | null |
| loadEnd | image load end | null |

### Slots

| Name | Description |
| ------- | ------------------------------------------------------------- |
| default | The content ImagePainter displays, before the image is loaded |

---

๐Ÿ˜‰๐Ÿ˜˜ If it is helpful to you๏ผŒplease encourage me with a โญ๏ธStar ~

## Inspiration

- [ImageDrawer.js](https://github.com/UstymUkhman/ImageDrawer.js)

## [Changelog](./CHANGELOG.md)

## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2018-present, komo