graphic-pixi/lib/plugins/AnimationManager.d.ts

49 lines
1.2 KiB
TypeScript
Raw Normal View History

2023-12-12 17:31:07 +08:00
import { IGraphicScene } from '../app';
import { GraphicAnimation, JlGraphic } from '../core';
/**
*
*/
export declare class AnimationManager {
app: IGraphicScene;
_pause: boolean;
/**
* key - graphic.id
*/
2023-12-14 13:11:42 +08:00
graphicAnimationMap: Map<number, Map<string, GraphicAnimation>>;
2023-12-12 17:31:07 +08:00
constructor(app: IGraphicScene);
private run;
pause(): void;
resume(): void;
destroy(): void;
/**
* map
* @param graphic
* @returns
*/
animationMap(graphic: JlGraphic): Map<string, GraphicAnimation>;
/**
*
* @param graphic
* @param animation
*/
registerAnimation(graphic: JlGraphic, animation: GraphicAnimation): void;
/**
*
* @param graphic
* @param name
*/
unregisterAnimation(graphic: JlGraphic, name: string): void;
/**
*
* @param graphic
*/
unregisterGraphicAnimations(graphic: JlGraphic): void;
/**
*
* @param graphic
* @param name
* @returns
*/
animation(graphic: JlGraphic, name: string): GraphicAnimation | undefined;
}