@inweb/viewer-visualize 25.11.2 → 25.12.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/dist/viewer-visualize.js +15 -6
- package/dist/viewer-visualize.js.map +1 -1
- package/dist/viewer-visualize.min.js +1 -1
- package/dist/viewer-visualize.module.js +5 -1
- package/dist/viewer-visualize.module.js.map +1 -1
- package/lib/Viewer/Viewer.d.ts +9 -0
- package/package.json +5 -5
- package/src/Viewer/Viewer.ts +16 -6
package/lib/Viewer/Viewer.d.ts
CHANGED
|
@@ -229,6 +229,9 @@ export declare class Viewer extends EventEmitter2<ViewerEventMap & CanvasEventMa
|
|
|
229
229
|
* model reference files from the Open Cloud Server. For a standalone viewer instance use
|
|
230
230
|
* {@link openVsfFile | openVsfFile()} or {@link openVsfxFile | openVsfxFile()}.
|
|
231
231
|
*
|
|
232
|
+
* If there was an active dragger before opening the file, it will be deactivated. After
|
|
233
|
+
* opening the file, you must manually activate the required dragger.
|
|
234
|
+
*
|
|
232
235
|
* Fires:
|
|
233
236
|
*
|
|
234
237
|
* - {@link OpenEvent | open}
|
|
@@ -255,6 +258,9 @@ export declare class Viewer extends EventEmitter2<ViewerEventMap & CanvasEventMa
|
|
|
255
258
|
* This method does not support {@link IOptions.enableStreamingMode | streaming} or
|
|
256
259
|
* {@link IOptions.enablePartialMode | partial streaming} mode.
|
|
257
260
|
*
|
|
261
|
+
* If there was an active dragger before opening the file, it will be deactivated. After
|
|
262
|
+
* opening the file, you must manually activate the required dragger.
|
|
263
|
+
*
|
|
258
264
|
* Fires:
|
|
259
265
|
*
|
|
260
266
|
* - {@link OpenEvent | open}
|
|
@@ -273,6 +279,9 @@ export declare class Viewer extends EventEmitter2<ViewerEventMap & CanvasEventMa
|
|
|
273
279
|
* This method does not support {@link IOptions.enableStreamingMode | streaming} or
|
|
274
280
|
* {@link IOptions.enablePartialMode | partial streaming} mode.
|
|
275
281
|
*
|
|
282
|
+
* If there was an active dragger before opening the file, it will be deactivated. After
|
|
283
|
+
* opening the file, you must manually activate the required dragger.
|
|
284
|
+
*
|
|
276
285
|
* Fires:
|
|
277
286
|
*
|
|
278
287
|
* - {@link OpenEvent | open}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inweb/viewer-visualize",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.12.0",
|
|
4
4
|
"description": "JavaScript library for rendering CAD and BIM files in a browser using 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.
|
|
33
|
-
"@inweb/eventemitter2": "~25.
|
|
34
|
-
"@inweb/markup": "~25.
|
|
35
|
-
"@inweb/viewer-core": "~25.
|
|
32
|
+
"@inweb/client": "~25.12.0",
|
|
33
|
+
"@inweb/eventemitter2": "~25.12.0",
|
|
34
|
+
"@inweb/markup": "~25.12.0",
|
|
35
|
+
"@inweb/viewer-core": "~25.12.0"
|
|
36
36
|
},
|
|
37
37
|
"visualizeJS": "https://public-fhemb7e3embacwec.z02.azurefd.net/libs/visualizejs/master/Visualize.js"
|
|
38
38
|
}
|
package/src/Viewer/Viewer.ts
CHANGED
|
@@ -454,17 +454,18 @@ export class Viewer
|
|
|
454
454
|
|
|
455
455
|
const view = device.getActiveView();
|
|
456
456
|
|
|
457
|
-
// setup light
|
|
458
457
|
view.enableDefaultLighting(true, visLib.DefaultLightingType.kTwoLights);
|
|
459
458
|
view.setDefaultLightingIntensity(1.25);
|
|
460
459
|
|
|
460
|
+
// Visualize.js 25.11 and earlier threw an exception if the style did not exist.
|
|
461
461
|
let visualStyleId;
|
|
462
462
|
try {
|
|
463
463
|
visualStyleId = visViewer.findVisualStyle("OpenCloud");
|
|
464
|
-
} catch
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
464
|
+
} catch {
|
|
465
|
+
visualStyleId = undefined;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
if (!visualStyleId || visualStyleId.isNull()) {
|
|
468
469
|
visualStyleId = visViewer.createVisualStyle("OpenCloud");
|
|
469
470
|
|
|
470
471
|
const colorDef = new visLib.OdTvColorDef(66, 66, 66);
|
|
@@ -473,7 +474,6 @@ export class Viewer
|
|
|
473
474
|
const visualStylePtr = visualStyleId.openObject();
|
|
474
475
|
visualStylePtr.copyFrom(shadedVsId);
|
|
475
476
|
visualStylePtr.setOptionInt32(visLib.VisualStyleOptions.kFaceModifiers, 0, visLib.VisualStyleOperations.kSet);
|
|
476
|
-
//visualStylePtr.setOptionInt32(visLib.VisualStyleOptions.kEdgeModel, 1, visLib.VisualStyleOperations.kSet);
|
|
477
477
|
visualStylePtr.setOptionInt32(visLib.VisualStyleOptions.kEdgeModel, 2, visLib.VisualStyleOperations.kSet);
|
|
478
478
|
visualStylePtr.setOptionDouble(visLib.VisualStyleOptions.kEdgeCreaseAngle, 60, visLib.VisualStyleOperations.kSet);
|
|
479
479
|
visualStylePtr.setOptionInt32(visLib.VisualStyleOptions.kEdgeStyles, 0, visLib.VisualStyleOperations.kSet);
|
|
@@ -901,6 +901,9 @@ export class Viewer
|
|
|
901
901
|
* model reference files from the Open Cloud Server. For a standalone viewer instance use
|
|
902
902
|
* {@link openVsfFile | openVsfFile()} or {@link openVsfxFile | openVsfxFile()}.
|
|
903
903
|
*
|
|
904
|
+
* If there was an active dragger before opening the file, it will be deactivated. After
|
|
905
|
+
* opening the file, you must manually activate the required dragger.
|
|
906
|
+
*
|
|
904
907
|
* Fires:
|
|
905
908
|
*
|
|
906
909
|
* - {@link OpenEvent | open}
|
|
@@ -963,6 +966,9 @@ export class Viewer
|
|
|
963
966
|
* This method does not support {@link IOptions.enableStreamingMode | streaming} or
|
|
964
967
|
* {@link IOptions.enablePartialMode | partial streaming} mode.
|
|
965
968
|
*
|
|
969
|
+
* If there was an active dragger before opening the file, it will be deactivated. After
|
|
970
|
+
* opening the file, you must manually activate the required dragger.
|
|
971
|
+
*
|
|
966
972
|
* Fires:
|
|
967
973
|
*
|
|
968
974
|
* - {@link OpenEvent | open}
|
|
@@ -1013,6 +1019,9 @@ export class Viewer
|
|
|
1013
1019
|
* This method does not support {@link IOptions.enableStreamingMode | streaming} or
|
|
1014
1020
|
* {@link IOptions.enablePartialMode | partial streaming} mode.
|
|
1015
1021
|
*
|
|
1022
|
+
* If there was an active dragger before opening the file, it will be deactivated. After
|
|
1023
|
+
* opening the file, you must manually activate the required dragger.
|
|
1024
|
+
*
|
|
1016
1025
|
* Fires:
|
|
1017
1026
|
*
|
|
1018
1027
|
* - {@link OpenEvent | open}
|
|
@@ -1081,6 +1090,7 @@ export class Viewer
|
|
|
1081
1090
|
this.setActiveDragger();
|
|
1082
1091
|
this.clearSlices();
|
|
1083
1092
|
this.clearOverlay();
|
|
1093
|
+
this.clearSelected();
|
|
1084
1094
|
|
|
1085
1095
|
visViewer.clear();
|
|
1086
1096
|
visViewer.createLocalDatabase();
|