动画引擎平台 GreenSock Animation Platform

码农软件 · 软件分类 · 游戏开发包 · 2019-10-06 09:11:56

软件介绍

Flash业界久负盛名的动画引擎(TweenLite等)GreenSock推出了新一代动画引擎平台GreenSock Animation Platform,最棒的是包括JS版本!

 

 

 //JS版本

 <script type="text/javascript" src="js/TweenMax.min.js"></script>

 var photo = document.getElementById("photo"); //or use jQuery's $("#photo")

 TweenLite.to(photo, 1.5, {width:100});

 

 //fade out all of the elements with the class "myClass" 

 TweenLite.to( $(".myClass"), 1, {css:{opacity:0}});   

 

 //tween the width of the element with id "myElement" to 500px 

 TweenLite.to( $("#myElement"), 1, {css:{width:"500px"}, ease:Elastic.easeOut});   

 

 //tween the "marginTop" of all objects of the class "myClass" in a staggered fashion so that they appear to fall into place from 100px up 

 var tl = new TimelineLite(); 

 tl.staggerFrom( $(".myClass"), 1, {css:{marginTop:"-=100px", opacity:0}}, 0.1);   

 //or use jQuery's each() method to loop through the results and stagger a fade out 

 $(".myClass").each( function(index, element) {     

     TweenLite.to( element, 1, {css:{autoAlpha:0}, delay:index * 0.2}); 

 });   

 //add a click handler that uses $(this) to refer to the menu element that was clicked and tween its height to 100px 

 $("#menu").click(function(){ 

     TweenLite.to( $(this), 0.7, { css:{height:"100px"}, ease:Power2.easeInOut } );

 });

 

 //AS3.0版本:

 //notice the target is an array 

 TweenLite.to([mc1, mc2, mc3], 1, {alpha:0});   

 var tl:TimelineLite = new TimelineLite(); //previously only appendMultiple() could handle arrays. Now append() and insert() can too. 

 tl.append( [tween1, tween2, tween3] ); 

 tl.insert( [tween1, tween2, tween3] );   //kill all tweens of mc1, mc2, and/or mc3 

本文地址:https://codercto.com/soft/d/16145.html

软件开发本质论

软件开发本质论

Ron Jeffries / 王凌云 / 人民邮电出版社图灵分社 / 2017-1 / 39

想象你正在攀登一座名为“软件开发”的山峰。本书是与你同登一座山峰的敏捷先驱所带来的话语与图片。他在崎岖的山路边找到相当平坦的歇脚处,画下所见的风景,并写下自己的想法和发现。他瞧见很多条上山的路,愿以此书与你分享哪条路容易、哪条路困难、哪条路安全、哪条路危险。他还想指引你欣赏身后的美景。正是这些美景丰富了你的登山之旅,让你在重重困难中收获成长。 “对于每一位CTO、技术VP、软件产品总......一起来看看 《软件开发本质论》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

在线进制转换器
在线进制转换器

各进制数互转换器

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具