当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript TweenLite.to函数代码示例

本文整理汇总了TypeScript中TweenLite.to函数的典型用法代码示例。如果您正苦于以下问题:TypeScript to函数的具体用法?TypeScript to怎么用?TypeScript to使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了to函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1:

const startTween = ()=> {
    const initialDelay = 1;

    TweenLite.to($robust, 1, {
        x: 200,
        y: 225,
        //rotation: 90,
        //rotationX: 180,
        rotationY: 180,
        alpha: 0.2,
        //height: 200
        scale: 4,
        delay: initialDelay,
        onComplete: returnToNormal,
        onCompleteParams: [$robust]
    });


    TweenLite.to($header, 1, {
        color: '#ff0000',
        fontSize: '+=10',
        delay: initialDelay + 0.5,
        onComplete: textReturnToNormal,
        onCompleteParams: [$header]
    });
}
开发者ID:martin-fabbri,项目名称:greensock-playground,代码行数:26,代码来源:main.ts

示例2:

/// <reference path="../../typings/main/ambient/TweenLite/TweenLite.d.ts" />
/// <reference path="../../typings/main/ambient/TimelineLite/TimelineLite.d.ts" />
import * as TweenLite from 'TweenLite';
import * as TimelineLite from 'TimelineLite';
import 'CSSPlugin';

// logo1 animation
TweenLite.to('#logo1', 10, {
    left: 600,
    backgroundColor: 'red',
    padding: 20,
    borderColor: 'white',
    borderRadius: 26
});

// logo2 animation
TweenLite.to('#logo2', 10, {x: 300});




开发者ID:martin-fabbri,项目名称:greensock-playground,代码行数:17,代码来源:basic-tween.ts

示例3:

/// <reference path="../../typings/main/ambient/TweenLite/TweenLite.d.ts" />
/// <reference path="../../typings/main/ambient/TimelineLite/TimelineLite.d.ts" />
import * as TweenLite from 'TweenLite';
import * as TimelineLite from 'TimelineLite';
import 'CSSPlugin';
import 'EasePack';

// logo1 animation
TweenLite.to('#logo1', 6, {
    x: 600,
    rotation: 360,
    scale: 0.5,
    ease: Back.easeOut
});

// logo2 animation
TweenLite.to('#logo2', 2, {
    x: 300,
    ease: Back.easeOut
});

// logo3 animation
TweenLite.to('#logo3', 2, {
    x: 300,
    ease: Elastic.easeOut
});

// logo4 animation
TweenLite.to('#logo4', 2, {
    x: 300,
    ease: Bounce.easeOut
开发者ID:martin-fabbri,项目名称:greensock-playground,代码行数:31,代码来源:css-transforms.ts

示例4:

/// <reference path="../../typings/main/ambient/TweenMax/TweenMax.d.ts" />
/// <reference path="../../typings/main/ambient/TweenLite/TweenLite.d.ts" />
/// <reference path="../../typings/main/ambient/TimelineLite/TimelineLite.d.ts" />
import 'TweenLite';
import 'CSSPlugin';
import 'AttrPlugin';
import * as TweenLite from 'TweenLite';


CSSPlugin.defaultSmoothOrigin = false;

TweenLite.to('#cards', 1, {rotation: 180});
//TweenLite.to('#cards', 1, {scale: 2});
//TweenLite.to('#cards', 1, {rotation: 360, transformOrigin: "center center", delay: 2});


开发者ID:martin-fabbri,项目名称:greensock-playground,代码行数:14,代码来源:main.ts


注:本文中的TweenLite.to函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。