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;
|
2024-01-16 17:17:47 +08:00
|
|
|
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;
|
2024-01-16 17:17:47 +08:00
|
|
|
moveLimit?: string;
|
2023-12-12 17:31:07 +08:00
|
|
|
constructor(scene: IGraphicScene);
|
2024-01-16 17:17:47 +08:00
|
|
|
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 {};
|