Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
julienetie committed Oct 11, 2016
2 parents ff3dadd + 0654a26 commit 145ae85
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

#### Install options

<sub>`npm i request-frame --save` **&nbsp;&nbsp;|&nbsp;&nbsp;** `bower i request-frame` **&nbsp;&nbsp;|&nbsp;&nbsp;** [src](https://github.com/julienetie/request-frame/tree/master/dist) **&nbsp;&nbsp;|&nbsp;&nbsp;** [release](https://github.com/julienetie/request-frame/releases)</sub>
`npm i request-frame --save` **&nbsp;&nbsp;|&nbsp;&nbsp;** `bower i request-frame` **&nbsp;&nbsp;|&nbsp;&nbsp;** [src](https://github.com/julienetie/request-frame/tree/master/dist) **&nbsp;&nbsp;|&nbsp;&nbsp;** [release](https://github.com/julienetie/request-frame/releases)


<sub>
```javascript
import requestFrame from 'request-frame'; // ES6
```
Expand All @@ -26,7 +26,7 @@ import requestFrame from 'request-frame'; // ES6
```javascript
const requestFrame = require('request-frame'); // CJS
```
</sub>


### The API:
#### Assign the timing functions:
Expand Down Expand Up @@ -54,22 +54,25 @@ function something( useTimeStamp ){

requestId = request(something); // Assigns Id & calls "something"
```

#### Cancel something:

```javascript
cancel(requestId); // Cancels frame request
```

### The ideology
<sub>request-frame aims to provide an optimal development consistency with the use of animation timing functions across the large number of browsers and devices. This lib is ideal for those who may want to avoid re-assigning native functions, or avoid interfering with other libs that do. requestFrame() is purposely not a constructor. The intention is for requestAnimationFrame to be used once or few times during execution since **multiple task are expected to be more efficient via a single requestAnimationFrame loop compared to several instances**.</sub>
request-frame aims to provide an optimal development consistency with the use of animation timing functions across the large number of browsers and devices. This lib is ideal for those who may want to avoid re-assigning native functions, or avoid interfering with other libs that do. requestFrame() is purposely not a constructor. The intention is for requestAnimationFrame to be used once or few times during execution since multiple task are expected to be more efficient via a single requestAnimationFrame loop compared to several instances.

### Browsers tested & passing:

Supports everything from IE5+

<sub>
<img style="float: left; display: inline-block;" src="http://i61.tinypic.com/i1xuzd.jpg" width="380">
<img style="float: left; display: inline-block;" src="http://i57.tinypic.com/j7fg2x.jpg" width="380">
</sub>
[<img style="float: left; display: inline-block;" src="http://i61.tinypic.com/i1xuzd.jpg" width="380">](http://i61.tinypic.com/i1xuzd.jpg)

[<img style="float: left; display: inline-block;" src="http://i57.tinypic.com/j7fg2x.jpg" width="380">](http://i57.tinypic.com/j7fg2x.jpg)



### Contribute
Just do it!
Expand All @@ -84,7 +87,7 @@ To launch port 9999
- ./test/compatibility-native-amd.html
- ./test/compatibility-native.html

<sub>_Browser based testing for RAF is imperative_ </sub>
_Browser based testing for RAF is imperative_

### Credits

Expand Down

0 comments on commit 145ae85

Please sign in to comment.