diff --git a/cocos/animation/bezier.ts b/cocos/animation/bezier.ts index f28ed64e93..45a78afcaa 100644 --- a/cocos/animation/bezier.ts +++ b/cocos/animation/bezier.ts @@ -12,6 +12,7 @@ export function bezier (C1: number, C2: number, C3: number, C4: number, t: numbe C3 * 3 * t1 * t * t + C4 * t * t * t; } +cc.bezier = bezier; // var sin = Math.sin; const cos = Math.cos; @@ -160,3 +161,4 @@ export function bezierByTime (controlPoints: BezierControlPoints, x: number) { p2y * 3 * percent * percent * t1 + p3y * percent * percent * percent; } +cc.bezierByTime = bezierByTime; diff --git a/cocos/animation/index.ts b/cocos/animation/index.ts index 80295cee74..78d92ef841 100644 --- a/cocos/animation/index.ts +++ b/cocos/animation/index.ts @@ -3,6 +3,7 @@ */ import * as easing from './easing'; +cc.easing = easing; export * from './bezier'; export { easing }; export * from './animation-curve'; diff --git a/cocos/animation/target-modifier.ts b/cocos/animation/target-modifier.ts index 52adca774a..bcd2786839 100644 --- a/cocos/animation/target-modifier.ts +++ b/cocos/animation/target-modifier.ts @@ -16,14 +16,17 @@ export type TargetModifier = PropertyModifier | ElementModifier | ICustomTargetM export function isPropertyModifier(modifier: TargetModifier): modifier is PropertyModifier { return typeof modifier === 'string'; } +cc.isPropertyModifier = isPropertyModifier; export function isElementModifier(modifier: TargetModifier): modifier is ElementModifier { return typeof modifier === 'number'; } +cc.isElementModifier = isElementModifier; export function isCustomTargetModifier(modifier: TargetModifier, constructor: Constructor): modifier is T { return modifier instanceof constructor; } +cc.isCustomTargetModifier = isCustomTargetModifier; @ccclass('cc.HierachyModifier') export class HierachyModifier implements ICustomTargetModifier { @@ -120,3 +123,4 @@ export class BoundTarget { } } } +cc.BoundTarget = BoundTarget; \ No newline at end of file