-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpcdeditor.d.ts
43 lines (35 loc) · 1.01 KB
/
pcdeditor.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
interface PCDEditorOptions {
wasmPath?: string
wasmExecPath?: string
idPrefix?: string
logId?: string
canvasId?: string
onKeyDownHook?: (KeyboardEvent) => void
}
declare class PCDEditor {
constructor(opts: PCDEditorOptions)
attach(): Promise<null>
appendDefaultMenuboxTo(selector: string): void
loadPCD(path: string): Promise<null>
loadSubPCD(path: string): Promise<null>
load2D(yamlPath: string, imgPath: string): Promise<null>
logger(any): void
private qs: (q: string) => Element
private wrapId: (q: string) => string
pcdeditor: {
reset(): Promise<string>
importPCD(a: Blob): Promise<string>
importSubPCD(a: Blob): Promise<string>
import2D(a, b: Blob): Promise<string>
exportPCD(): Promise<Blob>
exportSelectedPCD(): Promise<Blob>
command(cmd: string): Promise<number[][]>
show2D(show: boolean): Promise<string>
exit(): void
}
opts: PCDEditorOptions
canvas: HTMLCanvasElement
log: HTMLDivElement
localClipboard: Blob
}
export default PCDEditor