Closed dumganhar closed 3 months ago
! WARNING this pull request has changed these public interfaces:
@@ -54838,11 +54838,16 @@
get relative(): boolean;
clone(): TweenAction<T>;
reverse(): TweenAction<T>;
startWithTarget<U>(target: U | null): void;
+ stop(): void;
update(t: number): void;
progress(start: number, end: number, current: number, t: number): number;
}
+ export namespace tweenProgress {
+ export function bezier(...knots: ReadonlyArray<math.Vec3>): ITweenCustomProperty<math.Vec3>;
+ export function catmullRom(...knots: ReadonlyArray<math.Vec3>): ITweenCustomProperty<math.Vec3>;
+ }
/**
* @en
* tween is a utility function that helps instantiate Tween instances.
* @zh
@@ -54866,8 +54871,14 @@
*/
export function tweenUtil<T extends object = any>(target?: T): Tween<T>;
export type TweenCustomProgress = (start: any, end: any, current: any, ratio: number) => any;
export type TweenCustomEasing = ITweenOption["easing"];
+ export interface ITweenCustomPropertyStartParameter<Value> {
+ relative: boolean;
+ reversed: boolean;
+ start: Value;
+ end: Value;
+ }
export interface ITweenCustomProperty<Value> {
value: __private._cocos_tween_tween__MaybeUnionStringNumber<Value> | (() => __private._cocos_tween_tween__MaybeUnionStringNumber<Value>);
progress?: TweenCustomProgress;
easing?: TweenCustomEasing;
@@ -54876,8 +54887,11 @@
add?: (a: Value, b: Value) => Value;
sub?: (a: Value, b: Value) => Value;
legacyProgress?: __private._cocos_tween_tween__ExtendsReturnResultOrNever<Value, object, boolean>;
toFixed?: __private._cocos_tween_tween__ExtendsReturnResultOrNever<Value, string, number>;
+ onStart?: (param: ITweenCustomPropertyStartParameter<Value>) => void;
+ onStop?: () => void;
+ onComplete?: () => void;
}
export type TweenUpdateCallback<T extends object, Args extends any[]> = (target: T, ratio: number, ...args: Args) => void;
/**
* @en
Re: https://github.com/cocos/3d-tasks/issues/11124
Test caser depends on https://github.com/cocos/cocos-engine/pull/17213
Usage
Changelog
*
Continuous Integration
This pull request:
Compatibility Check
This pull request: