# TweenJS
TweenJS is a simple tweening library for use in Javascript. It was developed to integrate well with the EaselJS library,
but is not dependent on or specific to it (though it uses the same Ticker and Event classes by default). It supports
tweening of both numeric object properties & CSS style properties.
## Example
The API is simple but very powerful, making it easy to create complex tweens by chaining commands.
```javascript
var tween = createjs.Tween.get(myTarget)
.to({x:300},400)
.set({label:"hello!"})
.wait(500).to({alpha:0,visible:false},1000)
.call(onComplete);
```
The example above will create a new tween instance that:
* tweens the target to an x value of 300 over 400ms and sets its label to "hello!"
* waits 500 ms
* tweens the target's alpha to 0 over 1s & sets its visible to false
* calls the onComplete function
Tweens are composed of two elements: steps and actions.
Steps define the tweened properties and always have a duration associated with them (even if that duration is 0). Steps
are defined with the "to" and "wait" methods. Steps are entirely deterministic. You can arbitrarily set a tween's
position, and it will always set the same properties for that position.
Actions do not have a duration, and are executed between steps. They are defined with the "call", "set", "play", and
"pause" methods. They are guaranteed to execute in the correct order, but not at the precise moment in time that is
indicated in the sequence. This can lead to indeterminate results, especially when tweens are interacting via the play
and pause actions.
Tweens support a number of configuration properties, which are specified as the second param when creating a new tween:
```javascript
createjs.Tween.get(target, {loop:true, useTicks:true, css:true, ignoreGlobalPause:true}).to(etc...);
```
All configuration properties default to false. The properties are:
* **loop** - indicates whether the tween should loop when it reaches the end
* **useTicks** - the tween will use ticks for duration instead of milliseconds
* **css** - enables css mapping for some css properties
* **ignoreGlobalPause** - the tween will continue ticking even when Ticker is paused.
When using Tween.get, you can also specify true as the third parameter to override any active tweens on the target.
```javascript
createjs.Tween.get(target,null,true); // this will remove any existing tweens on the target.
```
## Support and Resources
* Find examples and more information at the [TweenJS web site](http://tweenjs.com/)
* Read the [documentation](http://createjs.com/docs/tweenjs/)
* Discuss, share projects, and interact with other users on [reddit](http://www.reddit.com/r/createjs/).
* Ask technical questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/tweenjs).
* File verified bugs or formal feature requests using Issues on [GitHub](https://github.com/createjs/TweenJS/issues).
* Have a look at the included [examples](https://github.com/CreateJS/TweenJS/tree/master/examples) and
[API documentation](http://createjs.com/docs/tweenjs/) for more in-depth information.
It was built by [gskinner.com](http://www.gskinner.com), and is released for free under the MIT license, which means you
can use it for almost any purpose (including commercial projects). We appreciate credit where possible, but it is not a
requirement.
## Classes
**Tween**
Returns a new Tween instance.
**Timeline**
The Timeline class synchronizes multiple tweens and allows them to be controlled as a group.
**Ease**
The Ease class provides a collection of easing functions for use with TweenJS. It does not use the standard 4 param
easing signature. Instead it uses a single param which indicates the current linear ratio (0 to 1) of the tween.
## Thanks
Special thanks to [Robert Penner](http://flashblog.robertpenner.com/) for his easing equations, which form the basis for
the Ease class.
没有合适的资源?快使用搜索试试~ 我知道了~
TweenJS-master_720度旋转_
共130个文件
js:41个
scss:21个
html:20个
5星 · 超过95%的资源 1 下载量 132 浏览量
2021-10-02
18:02:10
上传
评论
收藏 1.42MB ZIP 举报
温馨提示
720度3D立体效果插件,非常好用的一款插件,推荐大家使用
资源详情
资源评论
资源推荐
收起资源包目录
TweenJS-master_720度旋转_ (130个子文件)
BANNER 1KB
yui-cssgrids-min.css 3KB
shared.css 1KB
examples.css 755B
styles.css 460B
tweenjs.css 35B
jasmine.css 0B
loading.gif 658B
.gitignore 322B
method.handlebars 7KB
classes.handlebars 7KB
attrs.handlebars 5KB
events.handlebars 5KB
props.handlebars 4KB
module.handlebars 2KB
main.handlebars 2KB
sidebar.handlebars 846B
options.handlebars 615B
files.handlebars 201B
xhr.handlebars 155B
index.handlebars 93B
Tween_SparkTable.html 7KB
Example.html 4KB
MultiMotionDemo.html 3KB
RotationPlugin.html 3KB
Tween_Circles.html 3KB
PerfTest.html 3KB
CSSPlugin.html 3KB
PerfTestCSS.html 3KB
MotionGuideBlitz.html 2KB
ColorPlugin.html 2KB
tweenGroup.html 2KB
MotionGuideDemo.html 2KB
CSSPlugin_transform.html 2KB
SamplePlugin.html 2KB
RelativePlugin.html 2KB
DotPlugin.html 2KB
TweenOnlyDemo.html 2KB
SimpleTweenDemo.html 2KB
SparkTable.html 2KB
timeScale.html 2KB
favicon.ico 15KB
yui-source.js 299KB
tweenjs-NEXT.js 130KB
easeljs-NEXT.min.js 125KB
tweenjs.js 119KB
builder.js 64KB
Tween.js 29KB
tweenjs-NEXT.min.js 28KB
tweenjs.min.js 26KB
Ticker.js 20KB
AbstractTween.js 19KB
MotionGuidePlugin.js 16KB
EventDispatcher.js 16KB
CSSPlugin.js 11KB
TweenSpec.js 11KB
SamplePlugin.js 11KB
Ease.js 10KB
Gruntfile.js 8KB
ColorPlugin.js 7KB
Event.js 7KB
TweenGroup.js 7KB
Timeline.js 7KB
RotationPlugin.js 5KB
DotPlugin.js 4KB
RelativePlugin.js 4KB
promote.js 3KB
deprecate.js 3KB
extend.js 2KB
findopenport.js 2KB
indexOf.js 2KB
listips.js 2KB
Gruntfile.js 2KB
Helpers.js 1KB
updateversion.js 1KB
version.js 627B
examples.js 626B
updatebower.js 553B
path.js 105B
jasmine-html.js 0B
jasmine.js 0B
boot.js 0B
console.js 0B
package.json 1KB
bower.json 588B
config.json 579B
package.json 562B
package.json 372B
theme.json 105B
LICENSE 346B
MIT.LICENSE 0B
README.md 4KB
README.md 2KB
ISSUE_TEMPLATE.md 1KB
README.md 984B
README.md 356B
README.md 159B
README.md 133B
.npmignore 101B
tweenjs-banner.png 82KB
共 130 条
- 1
- 2
鹰忍
- 粉丝: 66
- 资源: 4707
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1