@netless/appliance-plugin 1.1.6-beta.0 → 1.1.7-beta.0
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/README.md +60 -6
- package/cdn/cdn.js +1 -1
- package/cdn/fullWorker-l-yx2w.js +439 -0
- package/cdn/subWorker-B_WP6U.js +439 -0
- package/dist/appliance-plugin.js +1 -1
- package/dist/appliance-plugin.mjs +16 -14
- package/dist/component/miniMap/manager.d.ts +1 -0
- package/dist/core/enum.d.ts +7 -1
- package/dist/core/mainEngine.d.ts +15 -3
- package/dist/core/mainThread/base.d.ts +3 -0
- package/dist/core/mainThread/snapshotThread.d.ts +3 -0
- package/dist/core/plugin.d.ts +47 -0
- package/dist/core/tools/image.d.ts +5 -3
- package/dist/core/worker/base.d.ts +9 -3
- package/dist/core/worker/fullWorkerLocal.d.ts +2 -1
- package/dist/fullWorker.js +112 -112
- package/dist/index-9cZB1Gyu.js +1 -0
- package/dist/index-B1RiN3Qs.js +1 -0
- package/dist/{index-DK7rOQ8d.mjs → index-BhSfbo3W.mjs} +3750 -3616
- package/dist/{index-f9cCJCDG.mjs → index-C0f2hrD6.mjs} +591 -506
- package/dist/plugin/baseApplianceManager.d.ts +5 -1
- package/dist/plugin/types.d.ts +46 -1
- package/dist/subWorker.js +112 -112
- package/package.json +4 -4
- package/cdn/fullWorker-Bn23ql.js +0 -439
- package/cdn/subWorker-BHGGPo.js +0 -439
- package/dist/index--nNSULzs.js +0 -1
- package/dist/index-Jd0URiCw.js +0 -1
package/README.md
CHANGED
|
@@ -191,13 +191,15 @@ The following interfaces are involved:
|
|
|
191
191
|
- `screenshotToCanvasAsync` Replace the api room.screenshotToCanvas
|
|
192
192
|
- `scenePreviewAsync` Replace the api room.scenePreview
|
|
193
193
|
- `destroy` Destroy the instance of appliance-plugin
|
|
194
|
+
- `addListener` add appliance plugin Listener
|
|
195
|
+
- `removeListener` remove appliance plugin Listener
|
|
194
196
|
|
|
195
197
|
5.Incompatible
|
|
196
198
|
- `exportScene` When the appliance-plugin is enabled, notes cannot be exported in room mode
|
|
197
199
|
- Server-side screenshot, after the appliance-plugin is turned on, notes cannot be obtained by calling server-side screenshot, but need to use `screenshotToCanvasAsync` to obtain the screenshot
|
|
198
200
|
|
|
199
201
|
#### New features
|
|
200
|
-
1. Minimap function
|
|
202
|
+
1. Minimap function (Version >=1.1.6)
|
|
201
203
|
```js
|
|
202
204
|
/** Create a minimap
|
|
203
205
|
* @param viewId ID of the whiteboard under windowManager. The ID of the main whiteboard is mainView, and the ID of other whiteboards is the appID of addApp() return
|
|
@@ -207,7 +209,7 @@ The following interfaces are involved:
|
|
|
207
209
|
/** Destroy minimap */
|
|
208
210
|
destroyMiniMap(viewId: string): Promise<void>;
|
|
209
211
|
```
|
|
210
|
-
2. Filter Elements
|
|
212
|
+
2. Filter Elements (Version >=1.1.6)
|
|
211
213
|
```js
|
|
212
214
|
/** Filter Elements
|
|
213
215
|
* @param viewId ID of the whiteboard under windowManager. The ID of the main whiteboard is mainView, and the ID of other whiteboards is the appID of addApp() return
|
|
@@ -224,12 +226,64 @@ The following interfaces are involved:
|
|
|
224
226
|
*/
|
|
225
227
|
cancelFilterRender(viewId: string, isSync?:boolean): void;
|
|
226
228
|
```
|
|
227
|
-
3. Split screen display Elements (little whiteboard featrue), need to combine '@netless/app-little-white-board'
|
|
229
|
+
3. Split screen display Elements (little whiteboard featrue), need to combine '@netless/app-little-white-board' (Version >=1.1.3)
|
|
228
230
|
|
|
229
|
-
4. laserPen teaching aids
|
|
231
|
+
4. laserPen teaching aids (Version >=1.1.1)
|
|
230
232
|
```js
|
|
231
|
-
|
|
232
|
-
|
|
233
|
+
import { EStrokeType, ApplianceNames } from '@netless/appliance-plugin';
|
|
234
|
+
room.setMemberState({currentApplianceName: ApplianceNames.laserPen, strokeType: EStrokeType.Normal});
|
|
235
|
+
```
|
|
236
|
+
5. Extended Teaching AIDS (Version >=1.1.1)
|
|
237
|
+
```js
|
|
238
|
+
export enum EStrokeType {
|
|
239
|
+
/** Solid line */
|
|
240
|
+
Normal = 'Normal',
|
|
241
|
+
/** Line with pen edge */
|
|
242
|
+
Stroke = 'Stroke',
|
|
243
|
+
/** Dotted line */
|
|
244
|
+
Dotted = 'Dotted',
|
|
245
|
+
/** Long dotted line */
|
|
246
|
+
LongDotted = 'LongDotted'
|
|
247
|
+
};
|
|
248
|
+
export type ExtendMemberState = {
|
|
249
|
+
/** The teaching AIDS selected by the current user */
|
|
250
|
+
currentApplianceName: ApplianceNames;
|
|
251
|
+
/** Whether to open the pen tip */
|
|
252
|
+
strokeType? : EStrokeType;
|
|
253
|
+
/** Whether to delete the entire line segment */
|
|
254
|
+
isLine? : boolean;
|
|
255
|
+
/** Wireframe transparency */
|
|
256
|
+
strokeOpacity? : number;
|
|
257
|
+
/** Whether to turn on laser pointer */
|
|
258
|
+
useLaserPen? : boolean;
|
|
259
|
+
/** Laser pointer holding time, second */
|
|
260
|
+
duration? : number;
|
|
261
|
+
/** Fill style */
|
|
262
|
+
fillColor? : Color;
|
|
263
|
+
/** Fill transparency */
|
|
264
|
+
fillOpacity? : number;
|
|
265
|
+
/** The specific type of graph to draw when using shape */
|
|
266
|
+
shapeType? : ShapeType;
|
|
267
|
+
/** Number of polygon vertices */
|
|
268
|
+
vertices? :number;
|
|
269
|
+
/** Length of the inner vertex of the polygon */
|
|
270
|
+
innerVerticeStep? :number;
|
|
271
|
+
/** Ratio of the radius of the inner vertex of the polygon to the outer vertex */
|
|
272
|
+
innerRatio? : number;
|
|
273
|
+
/** Text transparency */
|
|
274
|
+
textOpacity? : number;
|
|
275
|
+
/** Text background color */
|
|
276
|
+
textBgColor? : Color;
|
|
277
|
+
/** Text background color transparency */
|
|
278
|
+
textBgOpacity? : number;
|
|
279
|
+
/** Location */
|
|
280
|
+
placement? : SpeechBalloonPlacement;
|
|
281
|
+
};
|
|
282
|
+
import { ExtendMemberState, ApplianceNames } from '@netless/appliance-plugin';
|
|
283
|
+
/** Set the state of teaching AIDS */
|
|
284
|
+
room.setMemberState({ ... } as ExtendMemberState);
|
|
285
|
+
manager.mainView.setMemberState({ ... } as ExtendMemberState);
|
|
286
|
+
appliance.setMemberState({ ... } as ExtendMemberState);
|
|
233
287
|
```
|
|
234
288
|
|
|
235
289
|
### Configure parameters
|
package/cdn/cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r="/fullWorker-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r="/fullWorker-l-yx2w.js",e="/subWorker-B_WP6U.js";exports.fullWorkerUrl=r;exports.subWorkerUrl=e;
|