@tweenjs/tween.js 18.3.2 → 18.6.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 +34 -34
- package/dist/index.d.ts +273 -0
- package/dist/tween.amd.js +792 -961
- package/dist/tween.cjs.js +786 -955
- package/dist/tween.esm.js +786 -955
- package/dist/tween.umd.js +795 -964
- package/package.json +54 -31
- package/.eslintrc.json +0 -100
- package/.travis.yml +0 -26
- package/CODE_OF_CONDUCT.md +0 -75
- package/README_zh-CN.md +0 -297
- package/rollup.config.js +0 -24
- package/src/Tween.js +0 -961
package/package.json
CHANGED
@@ -1,33 +1,56 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
2
|
+
"name": "@tweenjs/tween.js",
|
3
|
+
"description": "Super simple, fast and easy to use tweening engine which incorporates optimised Robert Penner's equations.",
|
4
|
+
"version": "18.6.0",
|
5
|
+
"main": "dist/tween.cjs.js",
|
6
|
+
"types": "dist/index.d.ts",
|
7
|
+
"module": "dist/tween.esm.js",
|
8
|
+
"files": [
|
9
|
+
"dist",
|
10
|
+
"README.md",
|
11
|
+
"LICENSE"
|
12
|
+
],
|
13
|
+
"homepage": "https://github.com/tweenjs/tween.js",
|
14
|
+
"repository": {
|
15
|
+
"type": "git",
|
16
|
+
"url": "https://github.com/tweenjs/tween.js.git"
|
17
|
+
},
|
18
|
+
"bugs": {
|
19
|
+
"url": "https://github.com/tweenjs/tween.js/issues"
|
20
|
+
},
|
21
|
+
"license": "MIT",
|
22
|
+
"keywords": [
|
23
|
+
"tween",
|
24
|
+
"interpolation"
|
25
|
+
],
|
26
|
+
"dependencies": {},
|
27
|
+
"scripts": {
|
28
|
+
"build": "rimraf dist && node scripts/write-version.js && npm run tsc && npm run rollup-build && npm run tsc-d.ts && npm run adjust-d.ts",
|
29
|
+
"rollup-build": "rollup -c ./rollup.config.js",
|
30
|
+
"tsc": "tsc",
|
31
|
+
"tsc-watch": "tsc --watch",
|
32
|
+
"tsc-d.ts": "tsc --declaration --emitDeclarationOnly --esModuleInterop --outFile dist/index.d.ts",
|
33
|
+
"adjust-d.ts": "node scripts/adjust-d.ts.js",
|
34
|
+
"test": "npm run build && npm run test-unit && npm run test-lint",
|
35
|
+
"test-unit": "nodeunit test/unit/nodeunitheadless.js",
|
36
|
+
"test-lint": "npm run prettier -- --check && eslint 'src/**/*.ts'",
|
37
|
+
"lint": "npm run prettier -- --write && eslint 'src/**/*.ts' --fix",
|
38
|
+
"prettier": "prettier './**/*.{js,ts,md,json,html,css}'",
|
39
|
+
"prepare": "npm run build"
|
40
|
+
},
|
41
|
+
"author": "tween.js contributors (https://github.com/tweenjs/tween.js/graphs/contributors)",
|
42
|
+
"devDependencies": {
|
43
|
+
"@typescript-eslint/eslint-plugin": "^3.1.0",
|
44
|
+
"@typescript-eslint/parser": "^3.1.0",
|
45
|
+
"eslint": "^7.1.0",
|
46
|
+
"eslint-config-prettier": "^6.7.0",
|
47
|
+
"eslint-plugin-prettier": "^3.1.1",
|
48
|
+
"nodeunit": "^0.11.3",
|
49
|
+
"prettier": "^2.0.0",
|
50
|
+
"rimraf": "^3.0.0",
|
51
|
+
"rollup": "^0.57.1",
|
52
|
+
"rollup-plugin-typescript": "^1.0.1",
|
53
|
+
"tslib": "^1.10.0",
|
54
|
+
"typescript": "^3.9.0"
|
55
|
+
}
|
33
56
|
}
|
package/.eslintrc.json
DELETED
@@ -1,100 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"env": {
|
3
|
-
"browser": true,
|
4
|
-
"node": true
|
5
|
-
},
|
6
|
-
"globals": {},
|
7
|
-
"parserOptions": {
|
8
|
-
"ecmaVersion": 6,
|
9
|
-
"sourceType": "module"
|
10
|
-
},
|
11
|
-
"rules": {
|
12
|
-
"curly": 2,
|
13
|
-
"eqeqeq": 2,
|
14
|
-
"no-unused-vars": 2,
|
15
|
-
"one-var": [
|
16
|
-
2,
|
17
|
-
"never"
|
18
|
-
],
|
19
|
-
"space-in-parens": [
|
20
|
-
2,
|
21
|
-
"never"
|
22
|
-
],
|
23
|
-
"comma-dangle": [
|
24
|
-
2,
|
25
|
-
"never"
|
26
|
-
],
|
27
|
-
"no-trailing-spaces": 2,
|
28
|
-
"no-unused-vars": [
|
29
|
-
2,
|
30
|
-
{
|
31
|
-
"vars": "local",
|
32
|
-
"args": "all"
|
33
|
-
}
|
34
|
-
],
|
35
|
-
"camelcase": [
|
36
|
-
2,
|
37
|
-
{
|
38
|
-
"properties": "never"
|
39
|
-
}
|
40
|
-
],
|
41
|
-
"comma-style": [
|
42
|
-
2,
|
43
|
-
"last"
|
44
|
-
],
|
45
|
-
"newline-after-var": [
|
46
|
-
2,
|
47
|
-
"always"
|
48
|
-
],
|
49
|
-
"semi": [
|
50
|
-
2,
|
51
|
-
"always"
|
52
|
-
],
|
53
|
-
"space-infix-ops": 2,
|
54
|
-
"keyword-spacing": [
|
55
|
-
2,
|
56
|
-
{
|
57
|
-
"overrides": {
|
58
|
-
"else": {
|
59
|
-
"before": true
|
60
|
-
},
|
61
|
-
"while": {
|
62
|
-
"before": true
|
63
|
-
},
|
64
|
-
"catch": {
|
65
|
-
"before": true
|
66
|
-
}
|
67
|
-
}
|
68
|
-
}
|
69
|
-
],
|
70
|
-
"spaced-comment": [
|
71
|
-
2,
|
72
|
-
"always"
|
73
|
-
],
|
74
|
-
"space-before-blocks": [
|
75
|
-
2,
|
76
|
-
"always"
|
77
|
-
],
|
78
|
-
"key-spacing": [
|
79
|
-
2,
|
80
|
-
{
|
81
|
-
"afterColon": true
|
82
|
-
}
|
83
|
-
],
|
84
|
-
"linebreak-style": [
|
85
|
-
2,
|
86
|
-
"unix"
|
87
|
-
],
|
88
|
-
"indent": [
|
89
|
-
2,
|
90
|
-
"tab",
|
91
|
-
{
|
92
|
-
"SwitchCase": 1
|
93
|
-
}
|
94
|
-
],
|
95
|
-
"quotes": [
|
96
|
-
2,
|
97
|
-
"single"
|
98
|
-
]
|
99
|
-
}
|
100
|
-
}
|
package/.travis.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
language: node_js
|
3
|
-
notifications:
|
4
|
-
email: false
|
5
|
-
node_js:
|
6
|
-
- "10"
|
7
|
-
before_install:
|
8
|
-
- npm i -g npm@^6.0.0
|
9
|
-
before_script:
|
10
|
-
- npm prune
|
11
|
-
script:
|
12
|
-
- npm run test
|
13
|
-
deploy:
|
14
|
-
- on:
|
15
|
-
branch: master
|
16
|
-
provider: npm
|
17
|
-
skip_cleanup: true
|
18
|
-
email: "mikebolt@gmail.com"
|
19
|
-
api_key: $NPM_TOKEN
|
20
|
-
- on:
|
21
|
-
branch: master
|
22
|
-
provider: pages
|
23
|
-
skip_cleanup: true
|
24
|
-
github_token: $GH_TOKEN
|
25
|
-
local_dir: .
|
26
|
-
keep_history: false
|
package/CODE_OF_CONDUCT.md
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at coc@soledadpenades.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
75
|
-
|
package/README_zh-CN.md
DELETED
@@ -1,297 +0,0 @@
|
|
1
|
-
# tween.js
|
2
|
-
|
3
|
-
tween.js是用于简单动画的JavaScript补间引擎,结合了优化的 Robert Penner 方程。
|
4
|
-
|
5
|
-
[![NPM Version][npm-image]][npm-url]
|
6
|
-
[![NPM Downloads][downloads-image]][downloads-url]
|
7
|
-
[![Travis tests][travis-image]][travis-url]
|
8
|
-
[![Flattr this][flattr-image]][flattr-url]
|
9
|
-
[![CDNJS][cdnjs-image]][cdnjs-url]
|
10
|
-
|
11
|
-
```javascript
|
12
|
-
var box = document.createElement('div');
|
13
|
-
box.style.setProperty('background-color', '#008800');
|
14
|
-
box.style.setProperty('width', '100px');
|
15
|
-
box.style.setProperty('height', '100px');
|
16
|
-
document.body.appendChild(box);
|
17
|
-
|
18
|
-
// 设置循环动画
|
19
|
-
function animate(time) {
|
20
|
-
requestAnimationFrame(animate);
|
21
|
-
TWEEN.update(time);
|
22
|
-
}
|
23
|
-
requestAnimationFrame(animate);
|
24
|
-
|
25
|
-
var coords = { x: 0, y: 0 }; // 起始点 (0, 0)
|
26
|
-
var tween = new TWEEN.Tween(coords) // 创建一个新的tween用来改变 'coords'
|
27
|
-
.to({ x: 300, y: 200 }, 1000) // 在1s内移动至 (300, 200)
|
28
|
-
.easing(TWEEN.Easing.Quadratic.Out) // 使用缓动功能使的动画更加平滑
|
29
|
-
.onUpdate(function() { // 在 tween.js 更新 'coords' 后调用
|
30
|
-
// 将 'box' 移动到 'coords' 所描述的位置,配合 CSS 过渡
|
31
|
-
box.style.setProperty('transform', 'translate(' + coords.x + 'px, ' + coords.y + 'px)');
|
32
|
-
})
|
33
|
-
.start(); // 立即开始 tween
|
34
|
-
```
|
35
|
-
|
36
|
-
[在线代码测试](https://codepen.io/mikebolt/pen/zzzvZg)
|
37
|
-
|
38
|
-
## 安装
|
39
|
-
|
40
|
-
下载 [library](https://raw.githubusercontent.com/tweenjs/tween.js/master/src/Tween.js) 并将它引入至你的代码中:
|
41
|
-
|
42
|
-
```html
|
43
|
-
<script src="js/Tween.js"></script>
|
44
|
-
```
|
45
|
-
|
46
|
-
您也可以在代码中引用 CDN 托管的版本,这要感谢 cdnjs 。例如:
|
47
|
-
|
48
|
-
```html
|
49
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/tween.js/16.3.5/Tween.min.js"></script>
|
50
|
-
```
|
51
|
-
|
52
|
-
See [tween.js](https://cdnjs.com/libraries/tween.js/) for more versions.
|
53
|
-
|
54
|
-
查看更多 [tween.js](https://cdnjs.com/libraries/tween.js/) 版本.
|
55
|
-
|
56
|
-
### 更多高级用户想要的...
|
57
|
-
|
58
|
-
#### 使用 `npm`
|
59
|
-
|
60
|
-
```bash
|
61
|
-
npm install @tweenjs/tween.js
|
62
|
-
```
|
63
|
-
|
64
|
-
然后用标准的 node.js `require` 包含 Tween.js 模块:
|
65
|
-
|
66
|
-
```javascript
|
67
|
-
var TWEEN = require('@tweenjs/tween.js');
|
68
|
-
```
|
69
|
-
|
70
|
-
您可以像所有其他示例一样使用Tween.js,例如:
|
71
|
-
|
72
|
-
```javascript
|
73
|
-
var t = new TWEEN.Tween( /* etc */ );
|
74
|
-
t.start();
|
75
|
-
```
|
76
|
-
|
77
|
-
你将需要使用诸如`browserify`之类的工具将使用此风格的代码转换为可以在浏览器中运行的代码(浏览器无法识别 `require`)
|
78
|
-
|
79
|
-
#### Use `bower`
|
80
|
-
|
81
|
-
```bash
|
82
|
-
bower install @tweenjs/tweenjs --save
|
83
|
-
```
|
84
|
-
|
85
|
-
或者安装特定的tag.他们是git tags,如果你已经在本地克隆仓库,你可以在命令行中运行`git tag`查看tag列表,或者你可以查看下 [tween.js tags page](https://github.com/tweenjs/tween.js/tags) 列表.例如,安装 `v16.3.0`:
|
86
|
-
|
87
|
-
```bash
|
88
|
-
bower install @tweenjs/tweenjs#v16.3.0
|
89
|
-
```
|
90
|
-
|
91
|
-
然后引入库源码:
|
92
|
-
|
93
|
-
```html
|
94
|
-
<script src="bower_components/@tweenjs/tweenjs/src/Tween.js"></script>
|
95
|
-
```
|
96
|
-
|
97
|
-
## Features
|
98
|
-
|
99
|
-
* 只做一件事且仅只做一件事: 补间特性
|
100
|
-
* 不关注CSS单位 (e.g. appending `px`)
|
101
|
-
* 不插入颜色
|
102
|
-
* 缓和功能可以在Tween之外重用
|
103
|
-
* 也可以使用自定义缓动功能
|
104
|
-
|
105
|
-
## Documentation
|
106
|
-
|
107
|
-
* [使用指南](./docs/user_guide_zh-CN.md)
|
108
|
-
* [贡献者指南](./docs/contributor_guide_zh-CN.md)
|
109
|
-
* [教程](http://learningthreejs.com/blog/2011/08/17/tweenjs-for-smooth-animation/) using tween.js with three.js
|
110
|
-
* 其他: [libtween](https://github.com/jsm174/libtween), [jsm174](https://github.com/jsm174) 写的一个C语言版本的 tween.js.
|
111
|
-
* 其他: [es6-tween](https://github.com/tweenjs/es6-tween), [dalisoft](https://github.com/dalisoft) 写的一个ES6/Harmony版本的 tween.js.
|
112
|
-
* [理解 tween.js](https://mikebolt.me/article/understanding-tweenjs.html)
|
113
|
-
|
114
|
-
## 示例
|
115
|
-
|
116
|
-
<table>
|
117
|
-
<tr>
|
118
|
-
<td>
|
119
|
-
<a href="http://tweenjs.github.io/tween.js/examples/12_graphs_custom_functions.html">
|
120
|
-
<img src="./assets/examples/03_graphs.png" alt="Custom functions" />
|
121
|
-
</a>
|
122
|
-
</td>
|
123
|
-
<td>
|
124
|
-
Custom functions<br />
|
125
|
-
(<a href="examples/12_graphs_custom_functions.html">source</a>)
|
126
|
-
</td>
|
127
|
-
<td>
|
128
|
-
<a href="http://tweenjs.github.io/tween.js/examples/11_stop_all_chained_tweens.html">
|
129
|
-
<img src="./assets/examples/11_stop_all_chained_tweens.png" alt="Stop all chained tweens" />
|
130
|
-
</a>
|
131
|
-
</td>
|
132
|
-
<td>
|
133
|
-
Stop all chained tweens<br />
|
134
|
-
(<a href="examples/11_stop_all_chained_tweens.html">source</a>)
|
135
|
-
</td>
|
136
|
-
</tr>
|
137
|
-
<tr>
|
138
|
-
<td>
|
139
|
-
<a href="http://tweenjs.github.io/tween.js/examples/10_yoyo.html">
|
140
|
-
<img src="./assets/examples/10_yoyo.png" alt="Yoyo" />
|
141
|
-
</a>
|
142
|
-
</td>
|
143
|
-
<td>
|
144
|
-
Yoyo<br />
|
145
|
-
(<a href="examples/10_yoyo.html">source</a>)
|
146
|
-
</td>
|
147
|
-
<td>
|
148
|
-
<a href="http://tweenjs.github.io/tween.js/examples/09_relative_values.html">
|
149
|
-
<img src="./assets/examples/09_relative.png" alt="Relative values" />
|
150
|
-
</a>
|
151
|
-
</td>
|
152
|
-
<td>
|
153
|
-
Relative values<br />
|
154
|
-
(<a href="examples/09_relative_values.html">source</a>)
|
155
|
-
</td>
|
156
|
-
</tr>
|
157
|
-
<tr>
|
158
|
-
<td>
|
159
|
-
<a href="http://tweenjs.github.io/tween.js/examples/08_repeat.html">
|
160
|
-
<img src="./assets/examples/08_repeat.png" alt="Repeat" />
|
161
|
-
</a>
|
162
|
-
</td>
|
163
|
-
<td>
|
164
|
-
Repeat<br />
|
165
|
-
(<a href="examples/08_repeat.html">source</a>)
|
166
|
-
</td>
|
167
|
-
<td>
|
168
|
-
<a href="http://tweenjs.github.io/tween.js/examples/07_dynamic_to.html">
|
169
|
-
<img src="./assets/examples/07_dynamic_to.png" alt="Dynamic to" />
|
170
|
-
</a>
|
171
|
-
</td>
|
172
|
-
<td>
|
173
|
-
Dynamic to<br />
|
174
|
-
(<a href="examples/07_dynamic_to.html">source</a>)
|
175
|
-
</td>
|
176
|
-
</tr>
|
177
|
-
<tr>
|
178
|
-
<td>
|
179
|
-
<a href="http://tweenjs.github.io/tween.js/examples/06_array_interpolation.html">
|
180
|
-
<img src="./assets/examples/03_graphs.png" alt="Array interpolation" />
|
181
|
-
</a>
|
182
|
-
</td>
|
183
|
-
<td>
|
184
|
-
Array interpolation<br />
|
185
|
-
(<a href="examples/06_array_interpolation.html">source</a>)
|
186
|
-
</td>
|
187
|
-
<td>
|
188
|
-
<a href="http://tweenjs.github.io/tween.js/examples/05_video_and_time.html">
|
189
|
-
<img src="./assets/examples/06_video_and_time.png" alt="Video and time" />
|
190
|
-
</a>
|
191
|
-
</td>
|
192
|
-
<td>
|
193
|
-
Video and time<br />
|
194
|
-
(<a href="examples/05_video_and_time.html">source</a>)
|
195
|
-
</td>
|
196
|
-
</tr>
|
197
|
-
<tr>
|
198
|
-
<td>
|
199
|
-
<a href="http://tweenjs.github.io/tween.js/examples/04_simplest.html">
|
200
|
-
<img src="./assets/examples/04_simplest.png" alt="Simplest possible example" />
|
201
|
-
</a>
|
202
|
-
</td>
|
203
|
-
<td>
|
204
|
-
Simplest possible example<br />
|
205
|
-
(<a href="examples/04_simplest.html">source</a>)
|
206
|
-
</td>
|
207
|
-
<td>
|
208
|
-
<a href="http://tweenjs.github.io/tween.js/examples/03_graphs.html">
|
209
|
-
<img src="./assets/examples/03_graphs.png" alt="Graphs" />
|
210
|
-
</a>
|
211
|
-
</td>
|
212
|
-
<td>
|
213
|
-
Graphs<br />
|
214
|
-
(<a href="examples/03_graphs.html">source</a>)
|
215
|
-
</td>
|
216
|
-
</tr>
|
217
|
-
<tr>
|
218
|
-
<td>
|
219
|
-
<a href="http://tweenjs.github.io/tween.js/examples/02_black_and_red.html">
|
220
|
-
<img src="./assets/examples/02_black_and_red.png" alt="Black and red" />
|
221
|
-
</a>
|
222
|
-
</td>
|
223
|
-
<td>
|
224
|
-
Black and red<br />
|
225
|
-
(<a href="examples/02_black_and_red.html">source</a>)
|
226
|
-
</td>
|
227
|
-
<td>
|
228
|
-
<a href="http://tweenjs.github.io/tween.js/examples/01_bars.html">
|
229
|
-
<img src="./assets/examples/01_bars.png" alt="Bars" />
|
230
|
-
</a>
|
231
|
-
</td>
|
232
|
-
<td>
|
233
|
-
Bars<br />
|
234
|
-
(<a href="examples/01_bars.html">source</a>)
|
235
|
-
</td>
|
236
|
-
</tr>
|
237
|
-
<tr>
|
238
|
-
<td>
|
239
|
-
<a href="http://tweenjs.github.io/tween.js/examples/00_hello_world.html">
|
240
|
-
<img src="./assets/examples/00_hello_world.png" alt="hello world" />
|
241
|
-
</a>
|
242
|
-
</td>
|
243
|
-
<td>
|
244
|
-
hello world<br />
|
245
|
-
(<a href="examples/00_hello_world.html">source</a>)
|
246
|
-
</td>
|
247
|
-
</tr>
|
248
|
-
</table>
|
249
|
-
|
250
|
-
## Tests
|
251
|
-
|
252
|
-
你首先需要安装`npm`--基于node.js,所以首先安装它.然后,进入到`tween.js`的目录下并运行:
|
253
|
-
|
254
|
-
```bash
|
255
|
-
npm install
|
256
|
-
```
|
257
|
-
|
258
|
-
如果是第一次运行测试,则为运行测试安装额外的依赖,然后运行
|
259
|
-
|
260
|
-
```bash
|
261
|
-
npm test
|
262
|
-
```
|
263
|
-
|
264
|
-
每次你想运行测试.
|
265
|
-
|
266
|
-
如果你想添加任何功能或改变现有的功能,你*必须*运行测试,以确保你没有影响别的东西.如果你发一个pull request(PR)添加新的东西,它没有测试,或测试不通过,这个PR将不被接受.更详细的请看 [contributing](CONTRIBUTING.md).
|
267
|
-
|
268
|
-
## People
|
269
|
-
|
270
|
-
维护者: [mikebolt](https://github.com/mikebolt), [sole](https://github.com/sole).
|
271
|
-
|
272
|
-
[所有贡献者](http://github.com/tweenjs/tween.js/contributors).
|
273
|
-
|
274
|
-
## 使用 tween.js 的项目
|
275
|
-
|
276
|
-
[](https://aframe.io)
|
277
|
-
[](http://www.moma.org/interactives/exhibitions/2012/inventingabstraction/)
|
278
|
-
[](http://www.chromeweblab.com/)
|
279
|
-
[](http://5013.es/toys/macchina)
|
280
|
-
[](http://egraether.com/mine3d/)
|
281
|
-
[](http://ro.me)
|
282
|
-
[](http://data-arts.appspot.com/globe)
|
283
|
-
[](http://www.androidify.com/)
|
284
|
-
[](http://thewildernessdowntown.com/)
|
285
|
-
[](http://dejavis.org/linechart)
|
286
|
-
|
287
|
-
[npm-image]: https://img.shields.io/npm/v/@tweenjs/tween.js.svg
|
288
|
-
[npm-url]: https://npmjs.org/package/@tweenjs/tween.js
|
289
|
-
[downloads-image]: https://img.shields.io/npm/dm/@tweenjs/tween.js.svg
|
290
|
-
[downloads-url]: https://npmjs.org/package/@tweenjs/tween.js
|
291
|
-
[travis-image]: https://travis-ci.org/tweenjs/tween.js.svg?branch=master
|
292
|
-
[travis-url]: https://travis-ci.org/tweenjs/tween.js
|
293
|
-
[flattr-image]: https://api.flattr.com/button/flattr-badge-large.png
|
294
|
-
[flattr-url]: https://flattr.com/thing/45014/tween-js
|
295
|
-
[cdnjs-image]: https://img.shields.io/cdnjs/v/tween.js.svg
|
296
|
-
[cdnjs-url]: https://cdnjs.com/libraries/tween.js
|
297
|
-
|
package/rollup.config.js
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
const pkg = require('./package.json');
|
2
|
-
|
3
|
-
export default {
|
4
|
-
input: 'src/Tween.js',
|
5
|
-
output: [
|
6
|
-
{
|
7
|
-
file: 'dist/tween.umd.js',
|
8
|
-
name: 'TWEEN',
|
9
|
-
format: 'umd'
|
10
|
-
},
|
11
|
-
{
|
12
|
-
file: 'dist/tween.amd.js',
|
13
|
-
format: 'amd'
|
14
|
-
},
|
15
|
-
{
|
16
|
-
file: 'dist/tween.cjs.js',
|
17
|
-
format: 'cjs'
|
18
|
-
},
|
19
|
-
{
|
20
|
-
file: 'dist/tween.esm.js',
|
21
|
-
format: 'es'
|
22
|
-
}
|
23
|
-
]
|
24
|
-
};
|