@preference-sl/pref-viewer 2.11.0-beta.15 → 2.11.0-beta.16

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.11.0-beta.15",
3
+ "version": "2.11.0-beta.16",
4
4
  "description": "Web Component to preview GLTF models with Babylon.js",
5
5
  "author": "Alex Moreno Palacio <amoreno@preference.es>",
6
6
  "scripts": {
@@ -144,6 +144,7 @@ export default class BabylonJSAnimationController {
144
144
  */
145
145
  dispose() {
146
146
  if (this.#highlightLayer) {
147
+ this.#highlightLayer.removeAllMeshes();
147
148
  this.#highlightLayer.dispose();
148
149
  this.#highlightLayer = null;
149
150
  }
@@ -3,6 +3,7 @@ import { DracoCompression } from "@babylonjs/core/Meshes/Compression/dracoCompre
3
3
  import "@babylonjs/loaders";
4
4
  import "@babylonjs/loaders/glTF/2.0/Extensions/KHR_draco_mesh_compression.js";
5
5
  import { USDZExportAsync, GLTF2Export } from "@babylonjs/serializers";
6
+ import JSZip from "jszip";
6
7
 
7
8
  import GLTFResolver from "./gltf-resolver.js";
8
9
  import { MaterialData } from "./pref-viewer-3d-data.js";
@@ -1005,7 +1006,6 @@ export default class BabylonJSController {
1005
1006
  #downloadZip(files, name = "files", comment = "", addDateInName = false) {
1006
1007
  name = addDateInName ? this.#addDateToName(name) : name;
1007
1008
 
1008
- const JSZip = require("jszip");
1009
1009
  const zip = new JSZip();
1010
1010
  zip.comment = comment;
1011
1011
 
@@ -46,7 +46,7 @@ export class ContainerData {
46
46
  this.update.pending = true;
47
47
  this.update.storage = storage;
48
48
  this.update.success = false;
49
- this.update.show = show !== undefined ? show : this.update.show;
49
+ this.update.show = show !== undefined ? show : this.update.show !== null ? this.update.show : this.show;
50
50
  }
51
51
  setPendingCacheData(size = 0, timeStamp = null) {
52
52
  this.update.size = size;
@@ -62,7 +62,7 @@ export class ContainerData {
62
62
  return this.visible === true;
63
63
  }
64
64
  get mustBeShown() {
65
- return this.show === true;
65
+ return this.update.show !== null ? this.update.show === true : this.show === true;
66
66
  }
67
67
  }
68
68