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

36 lines
1013 B
TypeScript
Raw Normal View History

2023-12-12 17:31:07 +08:00
import { Container, FederatedPointerEvent, Point } from 'pixi.js';
import { IGraphicScene } from '../app';
import { JlGraphic } from '../core';
import { KeyListener } from './KeyboardPlugin';
2024-01-15 16:08:34 +08:00
interface GraphicControler {
controlerList: KeyListener[];
check: () => boolean;
moveLimitOption?: {
moveLimitName: string;
moveLimit: (e: FederatedPointerEvent) => void;
};
2024-01-15 16:08:34 +08:00
}
2023-12-12 17:31:07 +08:00
/**
*
*/
export declare class GraphicCopyPlugin {
container: Container;
scene: IGraphicScene;
keyListeners: KeyListener[];
2024-01-15 16:08:34 +08:00
graphicControlers: GraphicControler[];
2023-12-12 17:31:07 +08:00
copys: JlGraphic[];
start?: Point;
running: boolean;
moveLimit?: string;
2023-12-12 17:31:07 +08:00
constructor(scene: IGraphicScene);
updateMoveLimit(limit?: string): void;
2023-12-12 17:31:07 +08:00
init(): void;
2024-01-15 16:08:34 +08:00
addGraphicControlers(graphicControlers: GraphicControler[]): void;
2023-12-12 17:31:07 +08:00
clear(): void;
onPointerMove(e: FederatedPointerEvent): void;
onFinish(): void;
2024-01-15 13:55:25 +08:00
saveCopyGraphic(): void;
2023-12-12 17:31:07 +08:00
cancle(): void;
}
2024-01-15 16:08:34 +08:00
export {};