Skip to content

Commit

Permalink
read me
Browse files Browse the repository at this point in the history
  • Loading branch information
Cam O'Connell committed Jan 22, 2019
1 parent 9928188 commit 646d40c
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ A free Online Editor developed specifically for SVG path animation.

<br>

## Install
### Install

#### NPM <br>
```js
Expand All @@ -49,7 +49,7 @@ npm i lazy-line-painter
```
<br><br>

## Quick Start
### Quick Start
The most basic, no-frills implementation can be setup like so;

```js
Expand All @@ -73,9 +73,9 @@ myAnimation.paint()

<br>

## Configuration
### Configuration

### Initialisation Config
#### Configure svg
On initialise, pass lazylinepainter a config object as an argument containing the attritubes you wish to alter across the entire svg;

```js
Expand All @@ -100,15 +100,16 @@ let svg = document.querySelector('#my-svg')
let myAnimation = new LazyLinePainter(svg, config)

```
<br>

All config properties are optional. <br>
Style attributes set in the config will override css styles

### Configure Data Attributes
<br>

#### Configure specific paths

Data attributes can be set on individual shapes in the SVG. <br>
Data attributes will override both css styles & initialisation config style attributes
Data attributes can be used to configure style & animation properties on individual paths in the SVG. <br>
Data attributes will override both css styles & initialisation config style attributes. <br>

```html
<path
Expand All @@ -129,14 +130,17 @@ Data attributes will override both css styles & initialisation config style attr
```
<br><br>

## API Reference
### API Reference

### Methods
#### Methods

**Paint**<br>
accepts playback arguments - reverse, ease, delay
accepts optional playback arguments - reverse, ease, delay
```js
myAnimation.paint( { reverse : true, ease : 'easeExpoOut' });
myAnimation.paint( {
reverse : true,
ease : 'easeExpoOut'
});
```

**Erase**<br>
Expand Down Expand Up @@ -175,7 +179,7 @@ myAnimation.destroy();
```
<br><br>

### Events
#### Events

**Handle events across entire animation**
```js
Expand Down

0 comments on commit 646d40c

Please sign in to comment.