@preference-sl/pref-viewer 2.13.0-beta.17 → 2.13.0-beta.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preference-sl/pref-viewer",
3
- "version": "2.13.0-beta.17",
3
+ "version": "2.13.0-beta.19",
4
4
  "description": "Web Component to preview GLTF models with Babylon.js",
5
5
  "author": "Alex Moreno Palacio <amoreno@preference.es>",
6
6
  "scripts": {
@@ -45,7 +45,7 @@ export default class BabylonJSAnimationController {
45
45
  #highlightColor = Color3.FromHexString(PrefViewerStyleVariables.colorPrimary);
46
46
  #highlightLayer = null;
47
47
  #overlayLayer = null;
48
- #useHighlightLayer = false; // Set to true to use HighlightLayer (better performance) and false to use overlay meshes (UtilityLayerRenderer - always on top)
48
+ #useHighlightLayer = true; // Set to true to use HighlightLayer (better performance) and false to use overlay meshes (UtilityLayerRenderer - always on top)
49
49
  #lastHighlightedMeshId = null; // Cache to avoid redundant highlight updates
50
50
  #lastHighlightedNodeIds = []; // Cache to avoid redundant highlight updates
51
51
 
@@ -317,6 +317,9 @@ export default class BabylonJSAnimationController {
317
317
  baseToOverlayBase.forEach((overlayBase) => {
318
318
  overlayBase.dispose();
319
319
  });
320
+
321
+ // Dispose utility layer scene/resources; without this each rebuild leaks GPU/JS resources.
322
+ utilityLayer.dispose();
320
323
  },
321
324
  };
322
325
  }