@inweb/viewer-visualize 25.8.20 → 25.8.21
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 +2 -4
- package/dist/viewer-visualize.js +44 -40
- package/dist/viewer-visualize.js.map +1 -1
- package/dist/viewer-visualize.min.js +1 -1
- package/dist/viewer-visualize.module.js +23 -23
- package/dist/viewer-visualize.module.js.map +1 -1
- package/lib/Viewer/Markup/Visualize/VisualizeMarkup.d.ts +1 -1
- package/lib/Viewer/Viewer.d.ts +21 -17
- package/package.json +5 -5
- package/src/Viewer/Markup/Visualize/VisualizeMarkup.ts +2 -2
- package/src/Viewer/Viewer.ts +21 -17
|
@@ -11,7 +11,7 @@ export declare class VisualizeMarkup implements IMarkup {
|
|
|
11
11
|
lineWidth: number;
|
|
12
12
|
lineType: "solid";
|
|
13
13
|
fontSize: number;
|
|
14
|
-
initialize(
|
|
14
|
+
initialize(container: HTMLElement, containerEvents: string[], viewer?: IEventEmitter, worldTransformer?: IWorldTransform): void;
|
|
15
15
|
dispose(): void;
|
|
16
16
|
syncOverlay(): void;
|
|
17
17
|
clearOverlay(): void;
|
package/lib/Viewer/Viewer.d.ts
CHANGED
|
@@ -31,9 +31,9 @@ export declare class Viewer extends EventEmitter2<ViewerEventMap & CanvasEventMa
|
|
|
31
31
|
_abortControllerForReferences: AbortController | undefined;
|
|
32
32
|
client: Client | undefined;
|
|
33
33
|
/**
|
|
34
|
-
* @param client - The `Client` instance that
|
|
35
|
-
* specify `Client` if you need a standalone viewer instance to
|
|
36
|
-
* web or from local computer.
|
|
34
|
+
* @param client - The `Client` instance that is used to load model reference files from the
|
|
35
|
+
* Open Cloud Server. Do not specify `Client` if you need a standalone viewer instance to
|
|
36
|
+
* view `VSFX` files from the web or from local computer.
|
|
37
37
|
* @param params - An object containing viewer configuration parameters.
|
|
38
38
|
* @param params.visualizeJsUrl - `VisualizeJS` library URL. Set this URL to use your own
|
|
39
39
|
* library instance, or specify `undefined` or blank to use the default URL defined by
|
|
@@ -251,9 +251,12 @@ export declare class Viewer extends EventEmitter2<ViewerEventMap & CanvasEventMa
|
|
|
251
251
|
applyModelTransformMatrix(model: Model | Assembly): void;
|
|
252
252
|
applySceneGraphSettings(options?: IOptions): void;
|
|
253
253
|
/**
|
|
254
|
-
* Loads a
|
|
254
|
+
* Loads a file from Open Cloud Server into the viewer.
|
|
255
255
|
*
|
|
256
|
-
*
|
|
256
|
+
* The file geometry data on the server must be converted to `VSFX` format.
|
|
257
|
+
*
|
|
258
|
+
* This method requires a `Client` instance to be specified when creating the viewer to load
|
|
259
|
+
* model reference files from the Open Cloud Server. For a standalone viewer instance use
|
|
257
260
|
* {@link openVsfFile | openVsfFile()} or {@link openVsfxFile | openVsfxFile()}.
|
|
258
261
|
*
|
|
259
262
|
* Fires:
|
|
@@ -266,9 +269,9 @@ export declare class Viewer extends EventEmitter2<ViewerEventMap & CanvasEventMa
|
|
|
266
269
|
* - {@link GeometryEndEvent | geometryend}
|
|
267
270
|
* - {@link GeometryErrorEvent | geometryerror}
|
|
268
271
|
*
|
|
269
|
-
* @param file - File
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
+
* @param file - File, assembly or specific model to load. If a `File` instance with multiple
|
|
273
|
+
* models is specified, the default model will be loaded. If there is no default model,
|
|
274
|
+
* first availiable model will be loaded.
|
|
272
275
|
*/
|
|
273
276
|
open(file: File | Assembly | Model): Promise<this>;
|
|
274
277
|
/**
|
|
@@ -324,21 +327,21 @@ export declare class Viewer extends EventEmitter2<ViewerEventMap & CanvasEventMa
|
|
|
324
327
|
*
|
|
325
328
|
* - {@link ChangeMarkupColorEvent | changemarkupcolor}
|
|
326
329
|
*
|
|
327
|
-
* @param r - `
|
|
328
|
-
* @param g - `
|
|
329
|
-
* @param b - `
|
|
330
|
+
* @param r - The `red` component of the color, as a number between 0 and 255.
|
|
331
|
+
* @param g - The `green` component of the color, as a number between 0 and 255.
|
|
332
|
+
* @param b - The `blue` component of the color, as a number between 0 and 255.
|
|
330
333
|
*/
|
|
331
334
|
setMarkupColor(r?: number, g?: number, b?: number): void;
|
|
332
335
|
/**
|
|
333
336
|
* Colors all markup objects with the specified color.
|
|
334
337
|
*
|
|
335
|
-
* @param r - `
|
|
336
|
-
* @param g - `
|
|
337
|
-
* @param b - `
|
|
338
|
+
* @param r - The `red` component of the color, as a number between 0 and 255.
|
|
339
|
+
* @param g - The `green` component of the color, as a number between 0 and 255.
|
|
340
|
+
* @param b - The `blue` component of the color, as a number between 0 and 255.
|
|
338
341
|
*/
|
|
339
342
|
colorizeAllMarkup(r?: number, g?: number, b?: number): void;
|
|
340
343
|
/**
|
|
341
|
-
* Colors selected markup objects with the specified color.
|
|
344
|
+
* Colors the selected markup objects with the specified color.
|
|
342
345
|
*
|
|
343
346
|
* @param r - `Red` part of color.
|
|
344
347
|
* @param g - `Green` part of color.
|
|
@@ -352,7 +355,8 @@ export declare class Viewer extends EventEmitter2<ViewerEventMap & CanvasEventMa
|
|
|
352
355
|
/**
|
|
353
356
|
* Sets the viewer state to the specified viewpoint.
|
|
354
357
|
*
|
|
355
|
-
* To get a list of available
|
|
358
|
+
* To get a list of available viewpoints from the server for a specific file, use the
|
|
359
|
+
* `File.getViewpoints()`.
|
|
356
360
|
*
|
|
357
361
|
* @param viewpoint - Viewpoint data.
|
|
358
362
|
*/
|
|
@@ -360,7 +364,7 @@ export declare class Viewer extends EventEmitter2<ViewerEventMap & CanvasEventMa
|
|
|
360
364
|
/**
|
|
361
365
|
* Saves the viewer state at the viewpoint.
|
|
362
366
|
*
|
|
363
|
-
* To save a viewpoint to
|
|
367
|
+
* To save a viewpoint to the server for a specific file, use the `File.saveViewpoint()`.
|
|
364
368
|
*/
|
|
365
369
|
createViewpoint(): IViewpoint;
|
|
366
370
|
private getPoint3dFromArray;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inweb/viewer-visualize",
|
|
3
|
-
"version": "25.8.
|
|
3
|
+
"version": "25.8.21",
|
|
4
4
|
"description": "3D viewer powered by VisualizeJS",
|
|
5
5
|
"homepage": "https://cloud.opendesign.com/docs/index.html",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"docs": "typedoc"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@inweb/client": "~25.8.
|
|
33
|
-
"@inweb/eventemitter2": "~25.8.
|
|
34
|
-
"@inweb/markup": "~25.8.
|
|
35
|
-
"@inweb/viewer-core": "~25.8.
|
|
32
|
+
"@inweb/client": "~25.8.21",
|
|
33
|
+
"@inweb/eventemitter2": "~25.8.21",
|
|
34
|
+
"@inweb/markup": "~25.8.21",
|
|
35
|
+
"@inweb/viewer-core": "~25.8.21"
|
|
36
36
|
},
|
|
37
37
|
"visualizeJS": "https://opencloud.azureedge.net/libs/visualizejs/master/Visualize.js"
|
|
38
38
|
}
|
|
@@ -14,8 +14,8 @@ export class VisualizeMarkup implements IMarkup {
|
|
|
14
14
|
public fontSize = 34;
|
|
15
15
|
|
|
16
16
|
initialize(
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
container: HTMLElement,
|
|
18
|
+
containerEvents: string[],
|
|
19
19
|
viewer?: IEventEmitter,
|
|
20
20
|
worldTransformer?: IWorldTransform
|
|
21
21
|
): void {
|
package/src/Viewer/Viewer.ts
CHANGED
|
@@ -98,9 +98,9 @@ export class Viewer
|
|
|
98
98
|
public client: Client | undefined;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* @param client - The `Client` instance that
|
|
102
|
-
* specify `Client` if you need a standalone viewer instance to
|
|
103
|
-
* web or from local computer.
|
|
101
|
+
* @param client - The `Client` instance that is used to load model reference files from the
|
|
102
|
+
* Open Cloud Server. Do not specify `Client` if you need a standalone viewer instance to
|
|
103
|
+
* view `VSFX` files from the web or from local computer.
|
|
104
104
|
* @param params - An object containing viewer configuration parameters.
|
|
105
105
|
* @param params.visualizeJsUrl - `VisualizeJS` library URL. Set this URL to use your own
|
|
106
106
|
* library instance, or specify `undefined` or blank to use the default URL defined by
|
|
@@ -899,9 +899,12 @@ export class Viewer
|
|
|
899
899
|
}
|
|
900
900
|
|
|
901
901
|
/**
|
|
902
|
-
* Loads a
|
|
902
|
+
* Loads a file from Open Cloud Server into the viewer.
|
|
903
903
|
*
|
|
904
|
-
*
|
|
904
|
+
* The file geometry data on the server must be converted to `VSFX` format.
|
|
905
|
+
*
|
|
906
|
+
* This method requires a `Client` instance to be specified when creating the viewer to load
|
|
907
|
+
* model reference files from the Open Cloud Server. For a standalone viewer instance use
|
|
905
908
|
* {@link openVsfFile | openVsfFile()} or {@link openVsfxFile | openVsfxFile()}.
|
|
906
909
|
*
|
|
907
910
|
* Fires:
|
|
@@ -914,9 +917,9 @@ export class Viewer
|
|
|
914
917
|
* - {@link GeometryEndEvent | geometryend}
|
|
915
918
|
* - {@link GeometryErrorEvent | geometryerror}
|
|
916
919
|
*
|
|
917
|
-
* @param file - File
|
|
918
|
-
*
|
|
919
|
-
*
|
|
920
|
+
* @param file - File, assembly or specific model to load. If a `File` instance with multiple
|
|
921
|
+
* models is specified, the default model will be loaded. If there is no default model,
|
|
922
|
+
* first availiable model will be loaded.
|
|
920
923
|
*/
|
|
921
924
|
async open(file: File | Assembly | Model): Promise<this> {
|
|
922
925
|
if (!this.visualizeJs) return this;
|
|
@@ -1101,9 +1104,9 @@ export class Viewer
|
|
|
1101
1104
|
*
|
|
1102
1105
|
* - {@link ChangeMarkupColorEvent | changemarkupcolor}
|
|
1103
1106
|
*
|
|
1104
|
-
* @param r - `
|
|
1105
|
-
* @param g - `
|
|
1106
|
-
* @param b - `
|
|
1107
|
+
* @param r - The `red` component of the color, as a number between 0 and 255.
|
|
1108
|
+
* @param g - The `green` component of the color, as a number between 0 and 255.
|
|
1109
|
+
* @param b - The `blue` component of the color, as a number between 0 and 255.
|
|
1107
1110
|
*/
|
|
1108
1111
|
setMarkupColor(r = 255, g = 0, b = 0): void {
|
|
1109
1112
|
this._markup.setMarkupColor(r, g, b);
|
|
@@ -1114,16 +1117,16 @@ export class Viewer
|
|
|
1114
1117
|
/**
|
|
1115
1118
|
* Colors all markup objects with the specified color.
|
|
1116
1119
|
*
|
|
1117
|
-
* @param r - `
|
|
1118
|
-
* @param g - `
|
|
1119
|
-
* @param b - `
|
|
1120
|
+
* @param r - The `red` component of the color, as a number between 0 and 255.
|
|
1121
|
+
* @param g - The `green` component of the color, as a number between 0 and 255.
|
|
1122
|
+
* @param b - The `blue` component of the color, as a number between 0 and 255.
|
|
1120
1123
|
*/
|
|
1121
1124
|
colorizeAllMarkup(r = 255, g = 0, b = 0): void {
|
|
1122
1125
|
this._markup.colorizeAllMarkup(r, g, b);
|
|
1123
1126
|
}
|
|
1124
1127
|
|
|
1125
1128
|
/**
|
|
1126
|
-
* Colors selected markup objects with the specified color.
|
|
1129
|
+
* Colors the selected markup objects with the specified color.
|
|
1127
1130
|
*
|
|
1128
1131
|
* @param r - `Red` part of color.
|
|
1129
1132
|
* @param g - `Green` part of color.
|
|
@@ -1159,7 +1162,8 @@ export class Viewer
|
|
|
1159
1162
|
/**
|
|
1160
1163
|
* Sets the viewer state to the specified viewpoint.
|
|
1161
1164
|
*
|
|
1162
|
-
* To get a list of available
|
|
1165
|
+
* To get a list of available viewpoints from the server for a specific file, use the
|
|
1166
|
+
* `File.getViewpoints()`.
|
|
1163
1167
|
*
|
|
1164
1168
|
* @param viewpoint - Viewpoint data.
|
|
1165
1169
|
*/
|
|
@@ -1172,7 +1176,7 @@ export class Viewer
|
|
|
1172
1176
|
/**
|
|
1173
1177
|
* Saves the viewer state at the viewpoint.
|
|
1174
1178
|
*
|
|
1175
|
-
* To save a viewpoint to
|
|
1179
|
+
* To save a viewpoint to the server for a specific file, use the `File.saveViewpoint()`.
|
|
1176
1180
|
*/
|
|
1177
1181
|
createViewpoint(): IViewpoint {
|
|
1178
1182
|
const vp = this._markup.getViewpoint();
|