mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-06 03:22:39 +08:00
9f89b0ef24
* Temp * temp * move ui core * Arrange ui and terrain * Fix import path for all modules except core * Move primitives into core * Fix debug.getError * Move audio-downloader to audio module * export game from game.ts * Migrate load-pipeline to ts * Fix core modules and cleanup * Move animation into core * Fix module exports * Fix director issue * Remove most cc.director usage * Fix ts issues * Fix issues for unit test and editor running * Revert removing deprecated import * tweaks * tweaks * Fix ci * Fix ci * Add modules in module division * Upgrade coordinates-converts-utils
39 lines
776 B
TypeScript
39 lines
776 B
TypeScript
/**
|
|
* @hidden
|
|
*/
|
|
|
|
// deprecated
|
|
import { Tween } from './tween';
|
|
import { replaceProperty } from '../core/utils/deprecated';
|
|
|
|
/**
|
|
* @zh
|
|
* 增加一个 tween 缓动,与 creator 2D 中的 cc.tween 功能类似
|
|
* @deprecated
|
|
* 下个版本中将会移除 tween 方法,请及时调整为 tweenUtil
|
|
* @param target 缓动目标
|
|
*
|
|
* 注:请勿对 node 矩阵相关数据直接进行缓动,例如传入 this.node.position
|
|
* @example
|
|
*
|
|
* ```typescript
|
|
*
|
|
* let position = new math.Vec3();
|
|
*
|
|
* tweenUtil(position)
|
|
*
|
|
* .to(2, new math.Vec3(0, 2, 0), { easing: 'Cubic-InOut' })
|
|
*
|
|
* .start();
|
|
*
|
|
* ```
|
|
*/
|
|
export declare function tween (target: {}): Tween;
|
|
|
|
replaceProperty(cc, 'cc', [
|
|
{
|
|
name: 'tween',
|
|
newName: 'tweenUtil'
|
|
}
|
|
]);
|