@netless/appliance-plugin 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/cdn.js +1 -1
- package/cdn/{fullWorker-DzU-Co.js → fullWorker-CnB3KR.js} +93 -93
- package/cdn/{subWorker-B5ZQoK.js → subWorker-1E_izA.js} +93 -93
- package/dist/appliance-plugin.js +1 -1
- package/dist/appliance-plugin.mjs +1 -1
- package/dist/core/enum.d.ts +3 -1
- package/dist/core/mainEngine.d.ts +1 -0
- package/dist/core/mainThread/base.d.ts +1 -0
- package/dist/core/mainThread/workerMainThread.d.ts +1 -0
- package/dist/core/tools/pencilEraserBitMap.d.ts +6 -1
- package/dist/core/types.d.ts +1 -0
- package/dist/core/vNodeManager.d.ts +1 -1
- package/dist/core/worker/base.d.ts +2 -1
- package/dist/core/worker/workerManager.d.ts +2 -0
- package/dist/fullWorker.js +93 -93
- package/dist/index-8E5yX5Xn.js +1 -0
- package/dist/{index-D8AMdzYo.mjs → index-Bd_LdZxD.mjs} +4147 -4014
- package/dist/{index-rRQeW_6Z.mjs → index-Db4VURLT.mjs} +227 -215
- package/dist/index-qS7tU8QD.js +1 -0
- package/dist/plugin/baseApplianceManager.d.ts +6 -0
- package/dist/plugin/types.d.ts +2 -1
- package/dist/subWorker.js +93 -93
- package/package.json +1 -1
- package/dist/index-B90iIvel.js +0 -1
- package/dist/index-CpjV7Ujm.js +0 -1
package/dist/appliance-plugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-8E5yX5Xn.js");exports.ActiveContainerType=e.ActiveContainerType;exports.ApplianceMultiPlugin=e.ApplianceMultiPlugin;exports.ApplianceNames=e.ApplianceNames;exports.ApplianceSigleWrapper=e.ApplianceSigleWrapper;exports.ApplianceSinglePlugin=e.ApplianceSinglePlugin;exports.AutoDrawPlugin=e.AutoDrawPlugin;exports.ECanvasShowType=e.ECanvasShowType;exports.EDataType=e.EDataType;exports.EImageType=e.EImageType;exports.EMatrixrRelationType=e.EMatrixrRelationType;exports.EOperationType=e.EOperationType;exports.EPostMessageType=e.EPostMessageType;exports.ERenderFilterType=e.ERenderFilterType;exports.EScaleType=e.EScaleType;exports.EStrokeType=e.EStrokeType;exports.EToolsKey=e.EToolsKey;exports.ElayerType=e.ElayerType;exports.EmitEventType=e.EmitEventType;exports.EventMessageType=e.EventMessageType;exports.EvevtWorkState=e.EvevtWorkState;exports.EvevtWorkType=e.EvevtWorkType;exports.InternalMsgEmitterType=e.InternalMsgEmitterType;exports.Plugin=e.Plugin;exports.ShapeType=e.ShapeType;exports.fullWorkerUrl=e.fullWorker;exports.subWorkerUrl=e.subWorker;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z as s, A as p, w as r, v as l, u as t, N as i, B as n, b as y, j as E, l as T, K as o, c as g, L as u, H as v, x as c, a as A, G as S, h as P, F as k, E as m, J as M, I as W, P as h, y as w, r as x, s as I } from "./index-
|
|
1
|
+
import { z as s, A as p, w as r, v as l, u as t, N as i, B as n, b as y, j as E, l as T, K as o, c as g, L as u, H as v, x as c, a as A, G as S, h as P, F as k, E as m, J as M, I as W, P as h, y as w, r as x, s as I } from "./index-Bd_LdZxD.mjs";
|
|
2
2
|
export {
|
|
3
3
|
s as ActiveContainerType,
|
|
4
4
|
p as ApplianceMultiPlugin,
|
package/dist/core/enum.d.ts
CHANGED
|
@@ -115,7 +115,9 @@ export declare enum EPostMessageType {
|
|
|
115
115
|
/** 授权可以操作page权限 */
|
|
116
116
|
AuthPage = 27,
|
|
117
117
|
/** 获取vNode信息 */
|
|
118
|
-
GetVNodeInfo = 28
|
|
118
|
+
GetVNodeInfo = 28,
|
|
119
|
+
/** 变更dpr */
|
|
120
|
+
UpdateDpr = 29
|
|
119
121
|
}
|
|
120
122
|
export type ECanvasContextType = "webgl2" | "webgl" | "2d";
|
|
121
123
|
export declare enum ECanvasShowType {
|
|
@@ -199,6 +199,7 @@ export declare class MasterControlForWorker extends MasterController {
|
|
|
199
199
|
post(msg: Set<IWorkerMessage>): void;
|
|
200
200
|
updateNode(workId: IworkId, updateNodeOpt: IUpdateNodeOpt, viewId: string, scenePath: string): void;
|
|
201
201
|
destroyTaskQueue(): void;
|
|
202
|
+
updateDpr(viewId: string, dpr: number): void;
|
|
202
203
|
updateCamera(viewId: string, cameraOpt: ICameraOpt): void;
|
|
203
204
|
private updateCameraDone;
|
|
204
205
|
private consumeQueue;
|
|
@@ -72,6 +72,7 @@ export declare class MainThreadEngineImpl implements MainThreadEngine {
|
|
|
72
72
|
clearCacheImages(): void;
|
|
73
73
|
clearImageResolveMap(): void;
|
|
74
74
|
post(msg: Omit<IBatchMainMessage, 'render'>): void;
|
|
75
|
+
updateDpr(dpr: number): void;
|
|
75
76
|
on(msg: IWorkerMessage): Promise<void>;
|
|
76
77
|
private getIconSize;
|
|
77
78
|
loadImageBitMap(msg: Pick<IWorkerMessage, 'toolsType' | 'opt' | 'workId'>): Promise<ImageBitmap | undefined>;
|
|
@@ -52,6 +52,7 @@ export declare class MainThreadWorkerImpl implements MainThreadWorker {
|
|
|
52
52
|
private createLayer;
|
|
53
53
|
private updateScene;
|
|
54
54
|
private updateLayer;
|
|
55
|
+
updateDpr(dpr: number): void;
|
|
55
56
|
on(msg: IWorkerMessage): void;
|
|
56
57
|
setCameraOpt(cameraOpt: ICameraOpt): void;
|
|
57
58
|
updateCamera(msg: IWorkerMessage): void;
|
|
@@ -34,7 +34,8 @@ export declare class BitMapEraserShape extends BaseShapeTool {
|
|
|
34
34
|
private updateTempPoints;
|
|
35
35
|
private getChangeNodes;
|
|
36
36
|
reRenderEffectNodes(props: {
|
|
37
|
-
|
|
37
|
+
willDeleteNodes?: Set<string>;
|
|
38
|
+
willUpdateNodes?: Map<string, BaseNodeMapItem>;
|
|
38
39
|
worker: LocalWorkForFullWorker | SubLocalThreadImpl;
|
|
39
40
|
}): Promise<IRectType | undefined>;
|
|
40
41
|
consume(props: {
|
|
@@ -58,6 +59,9 @@ export declare class BitMapEraserShape extends BaseShapeTool {
|
|
|
58
59
|
opt: import("./utils").ShapeOptions;
|
|
59
60
|
};
|
|
60
61
|
private draw;
|
|
62
|
+
private isTransparentRectByGL;
|
|
63
|
+
private isTransparentRectByCanvas;
|
|
64
|
+
private isTransparentRect;
|
|
61
65
|
consumeAll(): {
|
|
62
66
|
workId: string;
|
|
63
67
|
toolsType: EToolsKey;
|
|
@@ -75,6 +79,7 @@ export declare class BitMapEraserShape extends BaseShapeTool {
|
|
|
75
79
|
rect: IRectType | undefined;
|
|
76
80
|
ops: string;
|
|
77
81
|
willUpdateNodes: Map<string, BaseNodeMapItem>;
|
|
82
|
+
willDeleteNodes: Set<string>;
|
|
78
83
|
workId: string;
|
|
79
84
|
toolsType: EToolsKey;
|
|
80
85
|
opt: import("./utils").ShapeOptions;
|
package/dist/core/types.d.ts
CHANGED
|
@@ -126,6 +126,7 @@ export type IWorkerMessage = Omit<Partial<BaseCollectorReducerAction>, 'op'> & {
|
|
|
126
126
|
textUpdateForWoker?: boolean;
|
|
127
127
|
tasksqueue?: Map<string, IWorkerMessage>;
|
|
128
128
|
point?: [number, number];
|
|
129
|
+
disableEraseImage?: boolean;
|
|
129
130
|
[key: string]: any;
|
|
130
131
|
};
|
|
131
132
|
export interface IRectType {
|
|
@@ -18,7 +18,7 @@ export declare class VNodeManager {
|
|
|
18
18
|
getLocalUid(): string | undefined;
|
|
19
19
|
setCanClearUids(clearUids?: _SetTrue): void;
|
|
20
20
|
getCanClearUids(): _SetTrue | undefined;
|
|
21
|
-
getCanEraserNodes(nodeMap: Map<string, BaseNodeMapItem
|
|
21
|
+
getCanEraserNodes(nodeMap: Map<string, BaseNodeMapItem>, disableEraseImage?: boolean): Map<string, BaseNodeMapItem>;
|
|
22
22
|
getNodesByType(type: EToolsKey): Map<string, BaseNodeMapItem>;
|
|
23
23
|
hasRenderNodes(): boolean;
|
|
24
24
|
has(name: string): boolean;
|
|
@@ -26,7 +26,7 @@ export declare abstract class WorkThreadEngineBase {
|
|
|
26
26
|
scene: Scene;
|
|
27
27
|
fullLayer: Group;
|
|
28
28
|
readonly vNodes: VNodeManager;
|
|
29
|
-
|
|
29
|
+
dpr: number;
|
|
30
30
|
readonly contextType?: ECanvasContextType;
|
|
31
31
|
abstract readonly type: EWorkThreadType;
|
|
32
32
|
protected opt: IWorkerInitOption;
|
|
@@ -54,6 +54,7 @@ export declare abstract class WorkThreadEngineBase {
|
|
|
54
54
|
}>;
|
|
55
55
|
constructor(viewId: string, opt: IWorkerInitOption, workerType: EWorkThreadType);
|
|
56
56
|
private createRenderLayer;
|
|
57
|
+
updateDpr(dpr: number): Promise<void>;
|
|
57
58
|
getCachedImages(imageSrc: string): ImageBitmap | undefined;
|
|
58
59
|
getCachedImagesByWorkId(workId: string): ImageBitmap | undefined;
|
|
59
60
|
deleteCachedImagesByWorkId(workId: string, filter?: string): void;
|
|
@@ -47,6 +47,7 @@ export declare class WorkThreadEngineForFullWorker extends WorkThreadEngineBase
|
|
|
47
47
|
consumeFull(type: EDataType, data: IWorkerMessage): Promise<void>;
|
|
48
48
|
consumeDraw(type: EDataType, data: IWorkerMessage): Promise<void>;
|
|
49
49
|
consumeDrawAll(type: EDataType, data: IWorkerMessage): Promise<void>;
|
|
50
|
+
updateDpr(dpr: number): Promise<void>;
|
|
50
51
|
updateCamera(msg: IWorkerMessage): Promise<void>;
|
|
51
52
|
private getRectImageBitmap;
|
|
52
53
|
private cursorHover;
|
|
@@ -74,6 +75,7 @@ export declare class WorkThreadEngineForSubWorker extends WorkThreadEngineBase {
|
|
|
74
75
|
clearAll(): Promise<void>;
|
|
75
76
|
private getRectImageBitmap;
|
|
76
77
|
protected updateLayer(layerOpt: ILayerOptionType): void;
|
|
78
|
+
updateDpr(dpr: number): Promise<void>;
|
|
77
79
|
updateCamera(msg: IWorkerMessage): Promise<void>;
|
|
78
80
|
setCameraOpt(cameraOpt: ICameraOpt, layer?: Group): void;
|
|
79
81
|
private getSnapshot;
|