Skip to content

Commit 6e26378

Browse files
committed
docs: update appliance-plugin
1 parent 7d595be commit 6e26378

File tree

2 files changed

+38
-8
lines changed

2 files changed

+38
-8
lines changed

docs/en/appliance-plugin.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -424,23 +424,38 @@ The following interfaces are involved:
424424
export type AppliancePluginOptions = {
425425
/** cdn configuration item */
426426
cdn: CdnOpt;
427-
/** Synchronous Data Configuration item */
427+
/** Additional configuration items */
428+
extras?: ExtrasOptions;
429+
};
430+
export type CdnOpt = {
431+
/** full worker url Address, the thread for drawing complete data */
432+
fullWorkerUrl?: string;
433+
/** sub worker url Address, the thread that draws a frame of data */
434+
subWorkerUrl?: string;
435+
};
436+
export type ExtrasOptions = {
437+
/** Whether to use worker, the default value is 'auto'
438+
* auto: Automatic selection (Use webWorker if your browser supports offscreenCanvas; otherwise, use the main thread)
439+
* mainThread: Use the main thread, canvas, to draw data.
440+
*/
441+
useWorker? : UseWorkerType;
442+
/** Synchronize data configuration items */
428443
syncOpt? : SyncOpt;
429-
/** Canvas configuration item */
444+
/** Canvas Configuration item */
430445
canvasOpt? : CanvasOpt;
431446
/** Pointer configuration item */
432447
cursor? : CursorOpt;
433-
/** Canvas Cache configuration item */
448+
/** Canvas cache configuration item */
434449
bufferSize? : BufferSizeOpt;
435-
/** Bessel Optimization Configuration item */
450+
/** Bezier Optimization Configuration items */
436451
bezier? : BezierOpt;
437-
/** Local Eraser configuration item */
452+
/** Local eraser configuration item */
438453
pencilEraser? : PencilEraserOpt;
439454
/** Line thickness range configuration item */
440455
strokeWidth? : StrokeWidthOpt,
441456
/** Text Editor configuration item */
442457
textEditor? : TextEditorOpt;
443-
}
458+
}
444459
```
445460
- ``cursorAdapter? : CursorAdapter``; This parameter is optional. In single whiteboard mode, customize the mouse style.
446461
- ``logger?: Logger``; This parameter is optional. Configure the log printer object. The default output is on the local console. If logs need to be uploaded to the specified server, you need to manually configure the configuration.

docs/zh/appliance-plugin.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ if (manager) {
138138
cdn: {
139139
fullWorkerUrl,
140140
subWorkerUrl,
141-
}
141+
},
142142
...
143143
}
144144
}
@@ -435,9 +435,24 @@ module: {
435435
- adaptor: 配置适配器.
436436
- ``options: AppliancePluginOptions``; 必须配置,其中`cdn`为必填项。
437437
```js
438-
export type AppliancePluginOptions = {
438+
export type AppliancePluginOptions = {
439439
/** cdn配置项 */
440440
cdn: CdnOpt;
441+
/** 额外配置项 */
442+
extras?: ExtrasOptions;
443+
};
444+
export type CdnOpt = {
445+
/** full worker url 地址, 绘制完整数据的线程 */
446+
fullWorkerUrl?: string;
447+
/** sub worker url 地址, 绘制一帧数据的线程 */
448+
subWorkerUrl?: string;
449+
};
450+
export type ExtrasOptions = {
451+
/** 是否使用 worker, 默认值为 ``auto``
452+
* auto: 自动选择(如果浏览器支持 offscreenCanvas 则使用 webWorker, 否则使用主线程)
453+
* mainThread: 使用主线程, canvas 绘制数据。
454+
*/
455+
useWorker?: UseWorkerType;
441456
/** 同步数据配置项 */
442457
syncOpt?: SyncOpt;
443458
/** 画布配置项 */

0 commit comments

Comments
 (0)