@tweenjs/tween.js 18.6.4 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -53
- package/dist/tween.amd.js +158 -102
- package/dist/tween.cjs.js +156 -100
- package/dist/tween.d.ts +98 -155
- package/dist/tween.esm.js +156 -101
- package/dist/tween.umd.js +158 -102
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -100,48 +100,108 @@ const TWEEN = require('@tweenjs/tween.js')
|
|
|
100
100
|
<table>
|
|
101
101
|
<tr>
|
|
102
102
|
<td>
|
|
103
|
-
<a href="http://tweenjs.github.io/tween.js/examples/
|
|
104
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/
|
|
103
|
+
<a href="http://tweenjs.github.io/tween.js/examples/00_hello_world.html">
|
|
104
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/00_hello_world.png" alt="hello world" />
|
|
105
105
|
</a>
|
|
106
106
|
</td>
|
|
107
107
|
<td>
|
|
108
|
-
|
|
109
|
-
(<a href="examples/
|
|
108
|
+
hello world<br />
|
|
109
|
+
(<a href="examples/00_hello_world.html">source</a>)
|
|
110
110
|
</td>
|
|
111
111
|
<td>
|
|
112
|
-
<a href="http://tweenjs.github.io/tween.js/examples/
|
|
113
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/
|
|
112
|
+
<a href="http://tweenjs.github.io/tween.js/examples/01_bars.html">
|
|
113
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/01_bars.png" alt="Bars" />
|
|
114
114
|
</a>
|
|
115
115
|
</td>
|
|
116
116
|
<td>
|
|
117
|
-
|
|
118
|
-
(<a href="examples/
|
|
117
|
+
Bars<br />
|
|
118
|
+
(<a href="examples/01_bars.html">source</a>)
|
|
119
|
+
</td>
|
|
120
|
+
<tr>
|
|
121
|
+
</tr>
|
|
122
|
+
<td>
|
|
123
|
+
<a href="http://tweenjs.github.io/tween.js/examples/02_black_and_red.html">
|
|
124
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/02_black_and_red.png" alt="Black and red" />
|
|
125
|
+
</a>
|
|
126
|
+
</td>
|
|
127
|
+
<td>
|
|
128
|
+
Black and red<br />
|
|
129
|
+
(<a href="examples/02_black_and_red.html">source</a>)
|
|
130
|
+
</td>
|
|
131
|
+
<td>
|
|
132
|
+
<a href="http://tweenjs.github.io/tween.js/examples/03_graphs.html">
|
|
133
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/03_graphs.png" alt="Graphs" />
|
|
134
|
+
</a>
|
|
135
|
+
</td>
|
|
136
|
+
<td>
|
|
137
|
+
Graphs<br />
|
|
138
|
+
(<a href="examples/03_graphs.html">source</a>)
|
|
119
139
|
</td>
|
|
120
140
|
</tr>
|
|
121
141
|
<tr>
|
|
122
142
|
<td>
|
|
123
|
-
<a href="http://tweenjs.github.io/tween.js/examples/
|
|
124
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/
|
|
143
|
+
<a href="http://tweenjs.github.io/tween.js/examples/04_simplest.html">
|
|
144
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/04_simplest.png" alt="Simplest possible example" />
|
|
125
145
|
</a>
|
|
126
146
|
</td>
|
|
127
147
|
<td>
|
|
128
|
-
|
|
129
|
-
(<a href="examples/
|
|
148
|
+
Simplest possible example<br />
|
|
149
|
+
(<a href="examples/04_simplest.html">source</a>)
|
|
130
150
|
</td>
|
|
131
151
|
<td>
|
|
132
|
-
<a href="http://tweenjs.github.io/tween.js/examples/
|
|
133
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/
|
|
152
|
+
<a href="http://tweenjs.github.io/tween.js/examples/05_video_and_time.html">
|
|
153
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/06_video_and_time.png" alt="Video and time" />
|
|
134
154
|
</a>
|
|
135
155
|
</td>
|
|
136
156
|
<td>
|
|
137
|
-
|
|
138
|
-
(<a href="examples/
|
|
157
|
+
Video and time<br />
|
|
158
|
+
(<a href="examples/05_video_and_time.html">source</a>)
|
|
159
|
+
</td>
|
|
160
|
+
</tr>
|
|
161
|
+
<tr>
|
|
162
|
+
<td>
|
|
163
|
+
<a href="http://tweenjs.github.io/tween.js/examples/06_array_interpolation.html">
|
|
164
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/03_graphs.png" alt="Array interpolation" />
|
|
165
|
+
</a>
|
|
166
|
+
</td>
|
|
167
|
+
<td>
|
|
168
|
+
Array interpolation<br />
|
|
169
|
+
(<a href="examples/06_array_interpolation.html">source</a>)
|
|
170
|
+
</td>
|
|
171
|
+
<td>
|
|
172
|
+
<a href="http://tweenjs.github.io/tween.js/examples/07_dynamic_to.html">
|
|
173
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/07_dynamic_to.png" alt="Dynamic to, object" />
|
|
174
|
+
</a>
|
|
175
|
+
</td>
|
|
176
|
+
<td>
|
|
177
|
+
Dynamic to, object<br />
|
|
178
|
+
(<a href="examples/07_dynamic_to.html">source</a>)
|
|
179
|
+
</td>
|
|
180
|
+
</tr>
|
|
181
|
+
<tr>
|
|
182
|
+
<td>
|
|
183
|
+
<a href="http://tweenjs.github.io/tween.js/examples/07a_dynamic_to_two_array_values.html">
|
|
184
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/07a_dynamic_to.png" alt="Dynamic to, interpolation array" />
|
|
185
|
+
</a>
|
|
186
|
+
</td>
|
|
187
|
+
<td>
|
|
188
|
+
Dynamic to, interpolation array<br />
|
|
189
|
+
(<a href="examples/07a_dynamic_to_two_array_values.html">source</a>)
|
|
190
|
+
</td>
|
|
191
|
+
<td>
|
|
192
|
+
<a href="http://tweenjs.github.io/tween.js/examples/07b_dynamic_to_an_array_of_values.html">
|
|
193
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/07b_dynamic_to.png" alt="Dynamic to, large interpolation array" />
|
|
194
|
+
</a>
|
|
195
|
+
</td>
|
|
196
|
+
<td>
|
|
197
|
+
Dynamic to, large interpolation array<br />
|
|
198
|
+
(<a href="examples/07b_dynamic_to_an_array_of_values.html">source</a>)
|
|
139
199
|
</td>
|
|
140
200
|
</tr>
|
|
141
201
|
<tr>
|
|
142
202
|
<td>
|
|
143
203
|
<a href="http://tweenjs.github.io/tween.js/examples/08_repeat.html">
|
|
144
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/08_repeat.png" alt="Repeat" />
|
|
204
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/08_repeat.png" alt="Repeat" />
|
|
145
205
|
</a>
|
|
146
206
|
</td>
|
|
147
207
|
<td>
|
|
@@ -149,84 +209,84 @@ const TWEEN = require('@tweenjs/tween.js')
|
|
|
149
209
|
(<a href="examples/08_repeat.html">source</a>)
|
|
150
210
|
</td>
|
|
151
211
|
<td>
|
|
152
|
-
<a href="http://tweenjs.github.io/tween.js/examples/
|
|
153
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/
|
|
212
|
+
<a href="http://tweenjs.github.io/tween.js/examples/09_relative_values.html">
|
|
213
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/09_relative.png" alt="Relative values" />
|
|
154
214
|
</a>
|
|
155
215
|
</td>
|
|
156
216
|
<td>
|
|
157
|
-
|
|
158
|
-
(<a href="examples/
|
|
217
|
+
Relative values<br />
|
|
218
|
+
(<a href="examples/09_relative_values.html">source</a>)
|
|
159
219
|
</td>
|
|
160
220
|
</tr>
|
|
161
221
|
<tr>
|
|
162
222
|
<td>
|
|
163
|
-
<a href="http://tweenjs.github.io/tween.js/examples/
|
|
164
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/
|
|
223
|
+
<a href="http://tweenjs.github.io/tween.js/examples/10_yoyo.html">
|
|
224
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/10_yoyo.png" alt="Yoyo" />
|
|
165
225
|
</a>
|
|
166
226
|
</td>
|
|
167
227
|
<td>
|
|
168
|
-
|
|
169
|
-
(<a href="examples/
|
|
228
|
+
Yoyo<br />
|
|
229
|
+
(<a href="examples/10_yoyo.html">source</a>)
|
|
170
230
|
</td>
|
|
171
231
|
<td>
|
|
172
|
-
<a href="http://tweenjs.github.io/tween.js/examples/
|
|
173
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/
|
|
232
|
+
<a href="http://tweenjs.github.io/tween.js/examples/11_stop_all_chained_tweens.html">
|
|
233
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/11_stop_all_chained_tweens.png" alt="Stop all chained tweens" />
|
|
174
234
|
</a>
|
|
175
235
|
</td>
|
|
176
236
|
<td>
|
|
177
|
-
|
|
178
|
-
(<a href="examples/
|
|
237
|
+
Stop all chained tweens<br />
|
|
238
|
+
(<a href="examples/11_stop_all_chained_tweens.html">source</a>)
|
|
179
239
|
</td>
|
|
180
240
|
</tr>
|
|
181
241
|
<tr>
|
|
182
242
|
<td>
|
|
183
|
-
<a href="http://tweenjs.github.io/tween.js/examples/
|
|
184
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/
|
|
243
|
+
<a href="http://tweenjs.github.io/tween.js/examples/12_graphs_custom_functions.html">
|
|
244
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/03_graphs.png" alt="Custom functions" />
|
|
185
245
|
</a>
|
|
186
246
|
</td>
|
|
187
247
|
<td>
|
|
188
|
-
|
|
189
|
-
(<a href="examples/
|
|
248
|
+
Custom functions<br />
|
|
249
|
+
(<a href="examples/12_graphs_custom_functions.html">source</a>)
|
|
190
250
|
</td>
|
|
191
251
|
<td>
|
|
192
|
-
<a href="http://tweenjs.github.io/tween.js/examples/
|
|
193
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/
|
|
252
|
+
<a href="http://tweenjs.github.io/tween.js/examples/13_relative_start_time.html">
|
|
253
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/13_relative_start_time.png" alt="Relative start time" />
|
|
194
254
|
</a>
|
|
195
255
|
</td>
|
|
196
256
|
<td>
|
|
197
|
-
|
|
198
|
-
(<a href="examples/
|
|
257
|
+
Relative start time<br />
|
|
258
|
+
(<a href="examples/13_relative_start_time.html">source</a>)
|
|
199
259
|
</td>
|
|
200
260
|
</tr>
|
|
201
261
|
<tr>
|
|
202
262
|
<td>
|
|
203
|
-
<a href="http://tweenjs.github.io/tween.js/examples/
|
|
204
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/
|
|
263
|
+
<a href="http://tweenjs.github.io/tween.js/examples/14_pause_tween.html">
|
|
264
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/14_pause_tween.png" alt="Pause tween" />
|
|
205
265
|
</a>
|
|
206
266
|
</td>
|
|
207
267
|
<td>
|
|
208
|
-
|
|
209
|
-
(<a href="examples/
|
|
268
|
+
Pause tween<br />
|
|
269
|
+
(<a href="examples/14_pause_tween.html">source</a>)
|
|
210
270
|
</td>
|
|
211
271
|
<td>
|
|
212
|
-
<a href="http://tweenjs.github.io/tween.js/examples/
|
|
213
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/
|
|
272
|
+
<a href="http://tweenjs.github.io/tween.js/examples/15_complex_properties.html">
|
|
273
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/15_complex_properties.png" alt="Complex properties" />
|
|
214
274
|
</a>
|
|
215
275
|
</td>
|
|
216
276
|
<td>
|
|
217
|
-
|
|
218
|
-
(<a href="examples/
|
|
277
|
+
Complex properties<br />
|
|
278
|
+
(<a href="examples/15_complex_properties.html">source</a>)
|
|
219
279
|
</td>
|
|
220
280
|
</tr>
|
|
221
281
|
<tr>
|
|
222
282
|
<td>
|
|
223
|
-
<a href="http://tweenjs.github.io/tween.js/examples/
|
|
224
|
-
<img src="https://tweenjs.github.io/tween.js/assets/examples/
|
|
283
|
+
<a href="http://tweenjs.github.io/tween.js/examples/16_animate_an_array_of_values.html">
|
|
284
|
+
<img width="100" height="50" src="https://tweenjs.github.io/tween.js/assets/examples/16_animate_an_array_of_values.png" alt="Animate an array of values" />
|
|
225
285
|
</a>
|
|
226
286
|
</td>
|
|
227
287
|
<td>
|
|
228
|
-
|
|
229
|
-
(<a href="examples/
|
|
288
|
+
Animate an array of values<br />
|
|
289
|
+
(<a href="examples/16_animate_an_array_of_values.html">source</a>)
|
|
230
290
|
</td>
|
|
231
291
|
</tr>
|
|
232
292
|
</table>
|
|
@@ -239,15 +299,13 @@ You need to install `npm` first--this comes with node.js, so install that one fi
|
|
|
239
299
|
npm install
|
|
240
300
|
```
|
|
241
301
|
|
|
242
|
-
|
|
302
|
+
To run the tests run:
|
|
243
303
|
|
|
244
304
|
```bash
|
|
245
305
|
npm test
|
|
246
306
|
```
|
|
247
307
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
If you want to add any feature or change existing features, you _must_ run the tests to make sure you didn't break anything else. If you send a pull request (PR) to add something new and it doesn't have tests, or the tests don't pass, the PR won't be accepted. See [contributing](CONTRIBUTING.md) for more information.
|
|
308
|
+
If you want to add any feature or change existing features, you _must_ run the tests to make sure you didn't break anything else. Any pull request (PR) needs to have updated passing tests for feature changes (or new passing tests for new features) in `src/tests.ts`, otherwise the PR won't be accepted. See [contributing](CONTRIBUTING.md) for more information.
|
|
251
309
|
|
|
252
310
|
## People
|
|
253
311
|
|