zakeke-configurator-react 0.0.152 → 0.0.153

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.
Files changed (2) hide show
  1. package/dist/index.js +36 -31
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31350,17 +31350,17 @@ var SceneDesignManager = /*#__PURE__*/function () {
31350
31350
  key: "refreshAsync",
31351
31351
  value: function () {
31352
31352
  var _refreshAsync = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
31353
- var scene, meshDesignManager, mesh, meshSide, i, found, k, meshVisible, meshID, _meshID, j, _meshID2, submeshIdx;
31353
+ var scene, meshDesignManager, mesh, meshSide, i, found, k, meshVisible, meshID, j, _meshID, submeshIdx;
31354
31354
  return _regeneratorRuntime().wrap(function _callee$(_context) {
31355
31355
  while (1) switch (_context.prev = _context.next) {
31356
31356
  case 0:
31357
31357
  if (!(this._scene && this._zkModel && this._zkDesign)) {
31358
- _context.next = 37;
31358
+ _context.next = 36;
31359
31359
  break;
31360
31360
  }
31361
31361
  scene = this.getDefaultModelScene();
31362
31362
  if (!scene) {
31363
- _context.next = 37;
31363
+ _context.next = 36;
31364
31364
  break;
31365
31365
  }
31366
31366
  meshDesignManager = null;
@@ -31404,10 +31404,12 @@ var SceneDesignManager = /*#__PURE__*/function () {
31404
31404
  }
31405
31405
  }
31406
31406
  if (!found || !meshVisible) {
31407
- console.log("qui rimuove effettivamente la texture");
31408
31407
  meshDesignManager.dispose();
31409
- _meshID = meshDesignManager.getMeshID(); // if (meshID)
31408
+ // const meshID = meshDesignManager.getMeshID();
31409
+
31410
+ // if (meshID)
31410
31411
  // this._debouncedMeshRefresh.delete(meshID);
31412
+
31411
31413
  this._meshDesignManagers.splice(i--, 1);
31412
31414
  }
31413
31415
  case 22:
@@ -31418,24 +31420,23 @@ var SceneDesignManager = /*#__PURE__*/function () {
31418
31420
  j = 0;
31419
31421
  case 26:
31420
31422
  if (!(j < scene.get("meshSides").length)) {
31421
- _context.next = 37;
31423
+ _context.next = 36;
31422
31424
  break;
31423
31425
  }
31424
31426
  meshSide = scene.get("meshSides").at(j);
31425
- console.log(meshSide);
31426
- _meshID2 = meshSide.get("meshID");
31427
+ _meshID = meshSide.get("meshID");
31427
31428
  submeshIdx = meshSide.get("subMeshID");
31428
- if (!_meshID2) {
31429
- _context.next = 34;
31429
+ if (!_meshID) {
31430
+ _context.next = 33;
31430
31431
  break;
31431
31432
  }
31432
- _context.next = 34;
31433
- return this.refreshMeshDesignAsync(_meshID2, submeshIdx);
31434
- case 34:
31433
+ _context.next = 33;
31434
+ return this.refreshMeshDesignAsync(_meshID, submeshIdx);
31435
+ case 33:
31435
31436
  j++;
31436
31437
  _context.next = 26;
31437
31438
  break;
31438
- case 37:
31439
+ case 36:
31439
31440
  case "end":
31440
31441
  return _context.stop();
31441
31442
  }
@@ -31488,12 +31489,11 @@ var SceneDesignManager = /*#__PURE__*/function () {
31488
31489
  return _context2.abrupt("return");
31489
31490
  case 4:
31490
31491
  this._meshesToBeRefreshed.add(meshID);
31491
- console.log(this._meshesToBeRefreshed);
31492
31492
  validEffect = effect;
31493
31493
  if (effect && !this.isValidEffectForMesh(meshID, submeshID, effect)) validEffect = undefined;
31494
31494
  mesh = this._scene.getMeshByID(meshID);
31495
31495
  if (!(mesh && mesh.isVisible)) {
31496
- _context2.next = 25;
31496
+ _context2.next = 29;
31497
31497
  break;
31498
31498
  }
31499
31499
  subMesh = null;
@@ -31502,12 +31502,12 @@ var SceneDesignManager = /*#__PURE__*/function () {
31502
31502
  }
31503
31503
  meshDesignManager = this.getMeshDesignMananger(mesh, subMesh);
31504
31504
  if (meshDesignManager) {
31505
- _context2.next = 25;
31505
+ _context2.next = 26;
31506
31506
  break;
31507
31507
  }
31508
- _context2.next = 16;
31508
+ _context2.next = 15;
31509
31509
  return _MeshDesignManager__WEBPACK_IMPORTED_MODULE_0__.MeshDesignManager.createMeshDesignManagerAsync(this._scene, this._zkScene, mesh, subMesh, this._zkModel, this._zkDesign, this._showDesign, validEffect, this._designTextureResolution);
31510
- case 16:
31510
+ case 15:
31511
31511
  meshDesignManager = _context2.sent;
31512
31512
  meshDesignManager.addRenderingNeededListener(function () {
31513
31513
  return _this.fireRenderingNeededEvent();
@@ -31537,9 +31537,15 @@ var SceneDesignManager = /*#__PURE__*/function () {
31537
31537
  _iterator2.f();
31538
31538
  }
31539
31539
  this._meshDesignManagers.push(meshDesignManager);
31540
- case 25:
31541
- this._meshesToBeRefreshed["delete"](meshID);
31540
+ _context2.next = 29;
31541
+ break;
31542
31542
  case 26:
31543
+ meshDesignManager.showDesign = this._showDesign;
31544
+ _context2.next = 29;
31545
+ return meshDesignManager.refreshAsync(validEffect);
31546
+ case 29:
31547
+ this._meshesToBeRefreshed["delete"](meshID);
31548
+ case 30:
31543
31549
  case "end":
31544
31550
  return _context2.stop();
31545
31551
  }
@@ -58255,21 +58261,20 @@ var SceneViewer = /*#__PURE__*/function () {
58255
58261
  case 0:
58256
58262
  showDesign = _args21.length > 1 && _args21[1] !== undefined ? _args21[1] : true;
58257
58263
  if (!(this._scene && this._zkScene && this._zkModel && zkDesign)) {
58258
- _context21.next = 22;
58264
+ _context21.next = 21;
58259
58265
  break;
58260
58266
  }
58261
58267
  if (!(this._sceneDesignManager && this._sceneDesignManager.isForModels(this._scene, this._zkModel, zkDesign))) {
58262
- _context21.next = 9;
58268
+ _context21.next = 8;
58263
58269
  break;
58264
58270
  }
58265
- console.log("sceneViewer", showDesign);
58266
58271
  this._sceneDesignManager.showDesign = showDesign;
58267
- _context21.next = 7;
58272
+ _context21.next = 6;
58268
58273
  return this._sceneDesignManager.refreshAsync();
58269
- case 7:
58270
- _context21.next = 21;
58274
+ case 6:
58275
+ _context21.next = 20;
58271
58276
  break;
58272
- case 9:
58277
+ case 8:
58273
58278
  this.emptyArFileCache();
58274
58279
  if (this._sceneDesignManager) {
58275
58280
  this._sceneDesignManager.dispose();
@@ -58304,11 +58309,11 @@ var SceneViewer = /*#__PURE__*/function () {
58304
58309
  } finally {
58305
58310
  _iterator2.f();
58306
58311
  }
58307
- _context21.next = 21;
58312
+ _context21.next = 20;
58308
58313
  return this._sceneDesignManager.refreshAsync();
58309
- case 21:
58314
+ case 20:
58310
58315
  this.setLongRenderingNeeded();
58311
- case 22:
58316
+ case 21:
58312
58317
  case "end":
58313
58318
  return _context21.stop();
58314
58319
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zakeke-configurator-react",
3
- "version": "0.0.152",
3
+ "version": "0.0.153",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/declarations/composer/Module/src/index.d.ts",