shop-components 0.1.54 → 0.1.57

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.
@@ -47,6 +47,7 @@ export declare class Amr extends Object3D {
47
47
  private _showSlots;
48
48
  private _shapeKeys;
49
49
  private _shapeKeyTimer;
50
+ private _shapeKeyCache;
50
51
  private _materialsCache;
51
52
  opacityCache: undefined | number;
52
53
  get shapeKeys(): Map<string, number>;
@@ -57314,13 +57314,12 @@ let qt = class extends Yr {
57314
57314
  <img alt="" src="${rj}">
57315
57315
  <div class="name">
57316
57316
  <div class="name-wrapper">${(n = this.slot) == null ? void 0 : n.name}</div>
57317
-
57318
- ${this.allFunctions.length ? Zi`
57319
- <div class="functions-wrapper">
57320
- <div class="device-name ${!this.deviceName && "empty"}">
57321
- <span>${this.deviceName}</span>
57322
- <i class="btn btn-close" @click=${this.removeDevice}></i>
57323
- </div>
57317
+ <div class="functions-wrapper">
57318
+ <div class="device-name ${!this.deviceName && "empty"}">
57319
+ <span>${this.deviceName}</span>
57320
+ <i class="btn btn-close" @click=${this.removeDevice}></i>
57321
+ </div>
57322
+ ${this.allFunctions.length ? Zi`
57324
57323
  <div class="functions">
57325
57324
  ${this.functions.map((A) => Zi`
57326
57325
  <div class="function"><span>${A}</span><i class="btn btn-remove"
@@ -57334,27 +57333,26 @@ let qt = class extends Yr {
57334
57333
  this._showDialog = !this._showDialog;
57335
57334
  }}>+添加
57336
57335
  </div>`}
57337
-
57338
57336
  </div>
57339
- ${this.hasMoreFunctions ? Zi`
57340
- <div class="all-functions ${this._showDialog && "show"}">
57341
- <label>添加功能
57342
- <i class="btn btn-close" @click=${() => {
57337
+ ` : Zi``}
57338
+
57339
+ ${this.hasMoreFunctions && this.allFunctions.length ? Zi`
57340
+ <div class="all-functions ${this._showDialog && "show"}">
57341
+ <label>添加功能
57342
+ <i class="btn btn-close" @click=${() => {
57343
57343
  this._showDialog = !1;
57344
57344
  }}></i>
57345
- </label>
57346
- <div class="functions">
57347
- ${this.allFunctions.map((A) => this.functions.includes(A) ? Zi`` : Zi`
57348
- <div class="function">
57349
- <span>${A}</span>
57350
- <i class="btn btn-add" @click=${() => this.addFunction(A)}>+</i>
57351
- </div>
57352
- `)}
57353
- </div>
57354
- </div>` : Zi``}
57355
- </div>
57356
- ` : Zi``}
57357
-
57345
+ </label>
57346
+ <div class="functions">
57347
+ ${this.allFunctions.map((A) => this.functions.includes(A) ? Zi`` : Zi`
57348
+ <div class="function">
57349
+ <span>${A}</span>
57350
+ <i class="btn btn-add" @click=${() => this.addFunction(A)}>+</i>
57351
+ </div>
57352
+ `)}
57353
+ </div>
57354
+ </div>` : Zi``}
57355
+ </div>
57358
57356
  </div>
57359
57357
  </div>
57360
57358
  </div>
@@ -62490,7 +62488,7 @@ class MI extends Ie {
62490
62488
  const aH = new hv();
62491
62489
  class vK extends Ie {
62492
62490
  constructor(A) {
62493
- super(), this._props = A, this._emitter = new Vr(), this.addEventListener = this._emitter.addListener.bind(this._emitter), this._container = new St(), this.sizeBox = new fK(), this._goodsSize = new bd(0, 0, 0), this._slots = [], this._logos = [], this._skins = [], this._levels = /* @__PURE__ */ new Map(), this._bodyOpacity = 1, this._masts = /* @__PURE__ */ new Map(), this._liftMaxHeight = 0, this._jackMaxHeight = 0, this._forkMaxHeight = 0, this.controllers = [], this.goods = [], this._breathLights = [], this._shelves = /* @__PURE__ */ new Map(), this._shelfMaxLevel = 1, this._shelveAnimateTimes = [], this._url = "", this._showController = !0, this._showSlots = !0, this._shapeKeys = /* @__PURE__ */ new Map(), this._shapeKeyTimer = 0, this._materialsCache = /* @__PURE__ */ new Map(), this.opacityCache = void 0, this._url = A.url || "", this._url && this.load(this._url).then(), this.add(this._container), this._props.showSizeBox && this.add(this.sizeBox), this.showController = typeof A.showController == "boolean" ? A.showController : !0, this._showSlots = typeof A.showSlots == "boolean" ? A.showSlots : !0;
62491
+ super(), this._props = A, this._emitter = new Vr(), this.addEventListener = this._emitter.addListener.bind(this._emitter), this._container = new St(), this.sizeBox = new fK(), this._goodsSize = new bd(0, 0, 0), this._slots = [], this._logos = [], this._skins = [], this._levels = /* @__PURE__ */ new Map(), this._bodyOpacity = 1, this._masts = /* @__PURE__ */ new Map(), this._liftMaxHeight = 0, this._jackMaxHeight = 0, this._forkMaxHeight = 0, this.controllers = [], this.goods = [], this._breathLights = [], this._shelves = /* @__PURE__ */ new Map(), this._shelfMaxLevel = 1, this._shelveAnimateTimes = [], this._url = "", this._showController = !0, this._showSlots = !0, this._shapeKeys = /* @__PURE__ */ new Map(), this._shapeKeyTimer = 0, this._shapeKeyCache = "", this._materialsCache = /* @__PURE__ */ new Map(), this.opacityCache = void 0, this._url = A.url || "", this._url && this.load(this._url).then(), this.add(this._container), this._props.showSizeBox && this.add(this.sizeBox), this.showController = typeof A.showController == "boolean" ? A.showController : !0, this._showSlots = typeof A.showSlots == "boolean" ? A.showSlots : !0;
62494
62492
  }
62495
62493
  get shapeKeys() {
62496
62494
  return this._shapeKeys;
@@ -62582,7 +62580,7 @@ class vK extends Ie {
62582
62580
  ));
62583
62581
  }
62584
62582
  setShapeKey(A, e) {
62585
- this._shapeKeyTimer && clearTimeout(this._shapeKeyTimer), this._shapeKeyTimer = window.setTimeout(() => {
62583
+ this._shapeKeyTimer && A === this._shapeKeyCache && clearTimeout(this._shapeKeyTimer), this._shapeKeyCache = A, this._shapeKeyTimer = window.setTimeout(() => {
62586
62584
  this._container.traverse((t) => {
62587
62585
  if (!Object.keys(t.morphTargetDictionary || {}).includes(A))
62588
62586
  return;