@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/dist/viewer-visualize.js
CHANGED
|
@@ -17901,24 +17901,23 @@
|
|
|
17901
17901
|
if (device.isNull())
|
|
17902
17902
|
return this;
|
|
17903
17903
|
const view = device.getActiveView();
|
|
17904
|
-
// setup light
|
|
17905
17904
|
view.enableDefaultLighting(true, visLib.DefaultLightingType.kTwoLights);
|
|
17906
17905
|
view.setDefaultLightingIntensity(1.25);
|
|
17906
|
+
// Visualize.js 25.11 and earlier threw an exception if the style did not exist.
|
|
17907
17907
|
let visualStyleId;
|
|
17908
17908
|
try {
|
|
17909
17909
|
visualStyleId = visViewer.findVisualStyle("OpenCloud");
|
|
17910
17910
|
}
|
|
17911
|
-
catch
|
|
17912
|
-
|
|
17913
|
-
|
|
17914
|
-
|
|
17911
|
+
catch {
|
|
17912
|
+
visualStyleId = undefined;
|
|
17913
|
+
}
|
|
17914
|
+
if (!visualStyleId || visualStyleId.isNull()) {
|
|
17915
17915
|
visualStyleId = visViewer.createVisualStyle("OpenCloud");
|
|
17916
17916
|
const colorDef = new visLib.OdTvColorDef(66, 66, 66);
|
|
17917
17917
|
const shadedVsId = visViewer.findVisualStyle("Realistic");
|
|
17918
17918
|
const visualStylePtr = visualStyleId.openObject();
|
|
17919
17919
|
visualStylePtr.copyFrom(shadedVsId);
|
|
17920
17920
|
visualStylePtr.setOptionInt32(visLib.VisualStyleOptions.kFaceModifiers, 0, visLib.VisualStyleOperations.kSet);
|
|
17921
|
-
//visualStylePtr.setOptionInt32(visLib.VisualStyleOptions.kEdgeModel, 1, visLib.VisualStyleOperations.kSet);
|
|
17922
17921
|
visualStylePtr.setOptionInt32(visLib.VisualStyleOptions.kEdgeModel, 2, visLib.VisualStyleOperations.kSet);
|
|
17923
17922
|
visualStylePtr.setOptionDouble(visLib.VisualStyleOptions.kEdgeCreaseAngle, 60, visLib.VisualStyleOperations.kSet);
|
|
17924
17923
|
visualStylePtr.setOptionInt32(visLib.VisualStyleOptions.kEdgeStyles, 0, visLib.VisualStyleOperations.kSet);
|
|
@@ -18258,6 +18257,9 @@
|
|
|
18258
18257
|
* model reference files from the Open Cloud Server. For a standalone viewer instance use
|
|
18259
18258
|
* {@link openVsfFile | openVsfFile()} or {@link openVsfxFile | openVsfxFile()}.
|
|
18260
18259
|
*
|
|
18260
|
+
* If there was an active dragger before opening the file, it will be deactivated. After
|
|
18261
|
+
* opening the file, you must manually activate the required dragger.
|
|
18262
|
+
*
|
|
18261
18263
|
* Fires:
|
|
18262
18264
|
*
|
|
18263
18265
|
* - {@link OpenEvent | open}
|
|
@@ -18313,6 +18315,9 @@
|
|
|
18313
18315
|
* This method does not support {@link IOptions.enableStreamingMode | streaming} or
|
|
18314
18316
|
* {@link IOptions.enablePartialMode | partial streaming} mode.
|
|
18315
18317
|
*
|
|
18318
|
+
* If there was an active dragger before opening the file, it will be deactivated. After
|
|
18319
|
+
* opening the file, you must manually activate the required dragger.
|
|
18320
|
+
*
|
|
18316
18321
|
* Fires:
|
|
18317
18322
|
*
|
|
18318
18323
|
* - {@link OpenEvent | open}
|
|
@@ -18356,6 +18361,9 @@
|
|
|
18356
18361
|
* This method does not support {@link IOptions.enableStreamingMode | streaming} or
|
|
18357
18362
|
* {@link IOptions.enablePartialMode | partial streaming} mode.
|
|
18358
18363
|
*
|
|
18364
|
+
* If there was an active dragger before opening the file, it will be deactivated. After
|
|
18365
|
+
* opening the file, you must manually activate the required dragger.
|
|
18366
|
+
*
|
|
18359
18367
|
* Fires:
|
|
18360
18368
|
*
|
|
18361
18369
|
* - {@link OpenEvent | open}
|
|
@@ -18412,6 +18420,7 @@
|
|
|
18412
18420
|
this.setActiveDragger();
|
|
18413
18421
|
this.clearSlices();
|
|
18414
18422
|
this.clearOverlay();
|
|
18423
|
+
this.clearSelected();
|
|
18415
18424
|
visViewer.clear();
|
|
18416
18425
|
visViewer.createLocalDatabase();
|
|
18417
18426
|
this.syncOpenCloudVisualStyle(true);
|