Skip to content

Commit 0a148aa

Browse files
committed
v5.2.0 release
a lot of changes, will log inside release note on GitHUb
1 parent cf7788e commit 0a148aa

25 files changed

+10232
-19675
lines changed

.eslintrc

Lines changed: 0 additions & 176 deletions
This file was deleted.

API.md

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ Lightweight, effecient and modular ES6 version of tween.js
88
**Copyright**: 2017 @dalisoft and es6-tween contributors
99
**Example**
1010
```js
11-
// ES6const {add, remove, isRunning, autoPlay} = TWEEN
11+
// ES6
12+
const {add, remove, isRunning, autoPlay} = TWEEN
1213
```
1314

1415
* [TWEEN](#TWEEN) : <code>object</code>
15-
* [.now](#TWEEN.now)
16-
* [.Plugins](#TWEEN.Plugins) : <code>object</code>
1716
* [.Easing](#TWEEN.Easing) : <code>object</code>
1817
* [.Interpolation](#TWEEN.Interpolation) : <code>object</code>
1918
* [.Interpolator](#TWEEN.Interpolator) ⇒ <code>function</code>
@@ -43,6 +42,8 @@ Lightweight, effecient and modular ES6 version of tween.js
4342
* [.Tween#easing(_easingFunction)](#TWEEN.Tween.Tween+easing)
4443
* [.Tween#interpolation(_interpolationFunction)](#TWEEN.Tween.Tween+interpolation)
4544
* [.Tween#update(time, [preserve], [forceTime])](#TWEEN.Tween.Tween+update)
45+
* [.Plugins](#TWEEN.Plugins) : <code>object</code>
46+
* [.now](#TWEEN.now)
4647
* [.add(tween)](#TWEEN.add)
4748
* [.onTick(fn)](#TWEEN.onTick)
4849
* [.FrameThrottle([frameCount])](#TWEEN.FrameThrottle)
@@ -54,27 +55,6 @@ Lightweight, effecient and modular ES6 version of tween.js
5455
* [.update([time], [preserve])](#TWEEN.update)
5556
* [.isRunning()](#TWEEN.isRunning) ⇒ <code>Boolean</code>
5657

57-
<a name="TWEEN.now"></a>
58-
59-
### TWEEN.now ⇒
60-
Get browser/Node.js current time-stamp
61-
62-
**Kind**: static property of [<code>TWEEN</code>](#TWEEN)
63-
**Returns**: Normalised current time-stamp in milliseconds
64-
**Example**
65-
```js
66-
TWEEN.now
67-
```
68-
<a name="TWEEN.Plugins"></a>
69-
70-
### TWEEN.Plugins : <code>object</code>
71-
The plugins store object
72-
73-
**Kind**: static namespace of [<code>TWEEN</code>](#TWEEN)
74-
**Example**
75-
```js
76-
let num = Plugins.num = function (node, start, end) {return t => start + (end - start) * t}
77-
```
7858
<a name="TWEEN.Easing"></a>
7959

8060
### TWEEN.Easing : <code>object</code>
@@ -83,7 +63,9 @@ List of full easings
8363
**Kind**: static namespace of [<code>TWEEN</code>](#TWEEN)
8464
**Example**
8565
```js
86-
import {Tween, Easing} from 'es6-tween'// then set via new Tween({x:0}).to({x:100}, 1000).easing(Easing.Quadratic.InOut).start()
66+
import {Tween, Easing} from 'es6-tween'
67+
68+
// then set via new Tween({x:0}).to({x:100}, 1000).easing(Easing.Quadratic.InOut).start()
8769
```
8870
<a name="TWEEN.Interpolation"></a>
8971

@@ -93,7 +75,10 @@ List of full Interpolation
9375
**Kind**: static namespace of [<code>TWEEN</code>](#TWEEN)
9476
**Example**
9577
```js
96-
import {Interpolation, Tween} from 'es6-tween'let bezier = Interpolation.Beziernew Tween({x:0}).to({x:[0, 4, 8, 12, 15, 20, 30, 40, 20, 40, 10, 50]}, 1000).interpolation(bezier).start()
78+
import {Interpolation, Tween} from 'es6-tween'
79+
80+
let bezier = Interpolation.Bezier
81+
new Tween({x:0}).to({x:[0, 4, 8, 12, 15, 20, 30, 40, 20, 40, 10, 50]}, 1000).interpolation(bezier).start()
9782
```
9883
<a name="TWEEN.Interpolator"></a>
9984

@@ -159,9 +144,9 @@ Sets max `event` listener's count to Events system
159144

160145
**Kind**: static method of [<code>Tween</code>](#TWEEN.Tween)
161146

162-
| Param | Type | Description |
163-
| --- | --- | --- |
164-
| count | <code>number</code> | Event listener's count |
147+
| Param | Type | Default | Description |
148+
| --- | --- | --- | --- |
149+
| count | <code>number</code> | <code>15</code> | Event listener's count |
165150

166151
<a name="TWEEN.Tween.Tween+on"></a>
167152

@@ -178,7 +163,8 @@ Adds `event` to Events system
178163
<a name="TWEEN.Tween.Tween+once"></a>
179164

180165
#### Tween.Tween#once(event, callback)
181-
Adds `event` to Events system.Removes itself after fired once
166+
Adds `event` to Events system.
167+
Removes itself after fired once
182168

183169
**Kind**: static method of [<code>Tween</code>](#TWEEN.Tween)
184170

@@ -484,6 +470,29 @@ Updates initial object to target value by given `time`
484470
```js
485471
tween.update(100)
486472
```
473+
<a name="TWEEN.Plugins"></a>
474+
475+
### TWEEN.Plugins : <code>object</code>
476+
The plugins store object
477+
478+
**Kind**: static namespace of [<code>TWEEN</code>](#TWEEN)
479+
**Example**
480+
```js
481+
let num = Plugins.num = function (node, start, end) {
482+
return t => start + (end - start) * t
483+
}
484+
```
485+
<a name="TWEEN.now"></a>
486+
487+
### TWEEN.now ⇒
488+
Get browser/Node.js current time-stamp
489+
490+
**Kind**: static constant of [<code>TWEEN</code>](#TWEEN)
491+
**Returns**: Normalised current time-stamp in milliseconds
492+
**Example**
493+
```js
494+
TWEEN.now
495+
```
487496
<a name="TWEEN.add"></a>
488497

489498
### TWEEN.add(tween)
@@ -497,7 +506,9 @@ Adds tween to list
497506

498507
**Example**
499508
```js
500-
let tween = new Tween({x:0})tween.to({x:200}, 1000)TWEEN.add(tween)
509+
let tween = new Tween({x:0})
510+
tween.to({x:200}, 1000)
511+
TWEEN.add(tween)
501512
```
502513
<a name="TWEEN.onTick"></a>
503514

README.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,6 @@ Download the [library](https://raw.githubusercontent.com/tweenjs/es6-tween/maste
114114

115115
### More advanced users might want to...
116116

117-
#### Using `grunt`
118-
119-
PR are welcome...
120-
121-
#### Using `gulp`
122-
123-
After package installed, go-to directory and then run:
124-
125-
- if you want build, then `$ gulp`
126-
- if you want watch, then `$ gulp watch`
127-
128117
#### Using `import`
129118

130119
```javascript
@@ -145,14 +134,12 @@ const { Tween, Easing, autoPlay } = require('es6-tween')
145134
</script>
146135
```
147136

148-
#### Using `npm`, `yarn` or `bower`
137+
#### Using `npm` or `yarn`
149138

150139
```bash
151140
$ yarn add es6-tween
152141
# or
153142
$ npm install es6-tween
154-
# or
155-
$ bower install es6-tween
156143
```
157144

158145
Then include the Tween.js module with the standard node.js `require`:
@@ -173,9 +160,9 @@ You can run script commands to build modules into single `UMD` compatible file:
173160
#### Using commands
174161

175162
```bash
176-
$ npm run build # builds production files
163+
$ yarn build # builds production files
177164
# or
178-
$ npm run dev # builds and watchs development files
165+
$ yarn dev # builds and watchs development files
179166
```
180167

181168
Then reference the library source:

bower.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)