shop-components 0.1.39 → 0.1.41

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.
@@ -11,6 +11,7 @@ export declare const textureLoader: TextureLoader;
11
11
  export interface AmrProps {
12
12
  url?: string;
13
13
  showSizeBox: boolean;
14
+ showSlots?: boolean;
14
15
  showController?: boolean;
15
16
  }
16
17
  export declare class Amr extends Object3D {
@@ -43,6 +44,7 @@ export declare class Amr extends Object3D {
43
44
  private _shelveAnimateTimes;
44
45
  private _url;
45
46
  private _showController;
47
+ private _showSlots;
46
48
  private _shapeKeys;
47
49
  private _materialsCache;
48
50
  opacityCache: undefined | number;
@@ -1 +1,2 @@
1
1
  export * from "./scene";
2
+ export * from "./amr";
@@ -9,6 +9,7 @@ export interface SlotProps {
9
9
  origin: number;
10
10
  }>;
11
11
  slot: Object3D;
12
+ show: boolean;
12
13
  }
13
14
  export interface DeviceInfo {
14
15
  name: string;
@@ -49,6 +50,7 @@ export declare class Slot extends CSS2DObject {
49
50
  get hasDevice(): boolean;
50
51
  deviceInfo: DeviceInfo | undefined;
51
52
  holeTarget: Object3D | undefined;
53
+ private _showSlot;
52
54
  constructor(props: SlotProps);
53
55
  shapeKeyChanged(key: string, value: number): void;
54
56
  loadGlb(sglb: string): Promise<Object3D<import("three").Object3DEventMap> | undefined>;
@@ -57306,44 +57306,44 @@ let qt = class extends Yr {
57306
57306
  <img alt="" src="${nj}">
57307
57307
  <div class="name">
57308
57308
  <div class="name-wrapper">${(n = this.slot) == null ? void 0 : n.name}</div>
57309
-
57309
+
57310
57310
  ${this.allFunctions.length ? Ji`
57311
- <div class="functions-wrapper">
57312
- <div class="device-name ${!this.deviceName && "empty"}">${this.deviceName}</div>
57313
- <div class="functions">
57314
- ${this.functions.map((A) => Ji`
57315
- <div class="function"><span>${A}</span><i class="btn btn-remove"
57316
- @click=${() => {
57311
+ <div class="functions-wrapper">
57312
+ <div class="device-name ${!this.deviceName && "empty"}">${this.deviceName}</div>
57313
+ <div class="functions">
57314
+ ${this.functions.map((A) => Ji`
57315
+ <div class="function"><span>${A}</span><i class="btn btn-remove"
57316
+ @click=${() => {
57317
57317
  this.dispatchEvent(new CustomEvent("function-removed", { detail: A }));
57318
57318
  }}></i>
57319
- </div>
57320
- `)}
57321
- ${Ji`
57322
- <div class="btn btn-add" @click=${() => {
57319
+ </div>
57320
+ `)}
57321
+ ${Ji`
57322
+ <div class="btn btn-add" @click=${() => {
57323
57323
  this._showDialog = !this._showDialog;
57324
57324
  }}>+添加
57325
- </div>`}
57325
+ </div>`}
57326
57326
 
57327
- </div>
57328
- ${this.hasMoreFunctions ? Ji`
57329
- <div class="all-functions ${this._showDialog && "show"}">
57330
- <label>添加功能
57331
- <i class="btn btn-close" @click=${() => {
57327
+ </div>
57328
+ ${this.hasMoreFunctions ? Ji`
57329
+ <div class="all-functions ${this._showDialog && "show"}">
57330
+ <label>添加功能
57331
+ <i class="btn btn-close" @click=${() => {
57332
57332
  this._showDialog = !1;
57333
57333
  }}></i>
57334
- </label>
57335
- <div class="functions">
57336
- ${this.allFunctions.map((A) => this.functions.includes(A) ? Ji`` : Ji`
57337
- <div class="function">
57338
- <span>${A}</span>
57339
- <i class="btn btn-add" @click=${() => this.addFunction(A)}>+</i>
57340
- </div>
57341
- `)}
57342
- </div>
57343
- </div>` : Ji``}
57344
- </div>
57345
- ` : Ji``}
57346
-
57334
+ </label>
57335
+ <div class="functions">
57336
+ ${this.allFunctions.map((A) => this.functions.includes(A) ? Ji`` : Ji`
57337
+ <div class="function">
57338
+ <span>${A}</span>
57339
+ <i class="btn btn-add" @click=${() => this.addFunction(A)}>+</i>
57340
+ </div>
57341
+ `)}
57342
+ </div>
57343
+ </div>` : Ji``}
57344
+ </div>
57345
+ ` : Ji``}
57346
+
57347
57347
  </div>
57348
57348
  </div>
57349
57349
  </div>
@@ -57403,7 +57403,7 @@ const xi = {
57403
57403
  class E0 extends bv {
57404
57404
  constructor(A) {
57405
57405
  const e = document.createElement("div");
57406
- super(e), this.props = A, this._emitter = new Vr(), this._slotContainer = new St(), this._bracketSlots = [], this._hasError = !1, this.useBracket = !1, this.addEventListener = this._emitter.addListener.bind(this._emitter), this.removeEventListener = this._emitter.removeListener.bind(this._emitter), this._canInstall = !1, this._loading = !1, this._selected = !1, this._deviceSelected = !1, this._allFunctions = /* @__PURE__ */ new Set(), this._functions = /* @__PURE__ */ new Set(), this._timer = 0, this._parentPos = new O(), this._wrapper = new St(), this.getWP = this._slotContainer.getWorldPosition.bind(this._slotContainer), this.name = A.name, this._slotUI = new qt({ name: A.name }), this._slotUI.slot = this, e.append(this._slotUI), this._parentPos.copy(this.props.slot.position), this._slotUI.addEventListener("function-removed", ({ detail: t }) => {
57406
+ super(e), this.props = A, this._emitter = new Vr(), this._slotContainer = new St(), this._bracketSlots = [], this._hasError = !1, this.useBracket = !1, this.addEventListener = this._emitter.addListener.bind(this._emitter), this.removeEventListener = this._emitter.removeListener.bind(this._emitter), this._canInstall = !1, this._loading = !1, this._selected = !1, this._deviceSelected = !1, this._allFunctions = /* @__PURE__ */ new Set(), this._functions = /* @__PURE__ */ new Set(), this._timer = 0, this._parentPos = new O(), this._wrapper = new St(), this._showSlot = !0, this.getWP = this._slotContainer.getWorldPosition.bind(this._slotContainer), this._showSlot = typeof A.show == "boolean" ? A.show : !0, this.name = A.name, this._slotUI = new qt({ name: A.name }), this._slotUI.slot = this, this._slotUI.hide = !this._showSlot, e.append(this._slotUI), this._parentPos.copy(this.props.slot.position), this._slotUI.addEventListener("function-removed", ({ detail: t }) => {
57407
57407
  this.removeFunction(t);
57408
57408
  }), this._slotUI.addEventListener("function-added", ({ detail: t }) => {
57409
57409
  this.addFunction(t);
@@ -62460,10 +62460,10 @@ class MI extends Ie {
62460
62460
  o.computeLineDistances(), this.add(i, o);
62461
62461
  }
62462
62462
  }
62463
- new uv();
62463
+ const oH = new uv();
62464
62464
  class mK extends Ie {
62465
62465
  constructor(A) {
62466
- super(), this._props = A, this._emitter = new Vr(), this.addEventListener = this._emitter.addListener.bind(this._emitter), this._container = new St(), this.sizeBox = new uK(), 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._shapeKeys = /* @__PURE__ */ new Map(), 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;
62466
+ super(), this._props = A, this._emitter = new Vr(), this.addEventListener = this._emitter.addListener.bind(this._emitter), this._container = new St(), this.sizeBox = new uK(), 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._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;
62467
62467
  }
62468
62468
  get shapeKeys() {
62469
62469
  return this._shapeKeys;
@@ -62837,7 +62837,8 @@ class mK extends Ie {
62837
62837
  const o = new E0({
62838
62838
  name: t,
62839
62839
  follows: s,
62840
- slot: A
62840
+ slot: A,
62841
+ show: this._showSlots
62841
62842
  });
62842
62843
  return o.holeTarget = r, o.addEventListener(xi.ON_DROP, (a) => {
62843
62844
  this._app && this._app.props.useSound && this._app.sound.play();
@@ -64968,7 +64969,7 @@ let U0;
64968
64969
  zF.loadAsync(e5).then((n) => {
64969
64970
  U0 = n;
64970
64971
  });
64971
- const oH = new kO(A5);
64972
+ const aH = new kO(A5);
64972
64973
  class A2 {
64973
64974
  constructor(A) {
64974
64975
  this._props = A, this.name = "", this._timer = 0, this._offscreen = new OffscreenCanvas(0, 0), this._defaults = { ...A }, this.target = A.target, this.parent = this.target.parent, this.reset();
@@ -65029,7 +65030,7 @@ let la, vf = 0, W0 = 0;
65029
65030
  const kF = () => {
65030
65031
  la = void 0, vf = 0, W0 = 0;
65031
65032
  }, jF = new si({ colorWrite: !1 });
65032
- class aH {
65033
+ class lH {
65033
65034
  constructor(A) {
65034
65035
  this.props = A, this.stats = new uc(), this.scene = new ka(), this.overlayScene = new ka(), this.renderer = new N2({
65035
65036
  antialias: !0,
@@ -66987,13 +66988,14 @@ Xr = rl([
66987
66988
  Md("image-cropper")
66988
66989
  ], Xr);
66989
66990
  export {
66991
+ mK as Amr,
66990
66992
  Xr as Cropper,
66991
66993
  Ja as DeviceLines,
66992
66994
  sH as Line,
66993
66995
  A2 as Logo,
66994
66996
  Xf as SGLBLoader,
66995
66997
  xi as SLOT_EVENTS,
66996
- aH as Scene3D,
66998
+ lH as Scene3D,
66997
66999
  e2 as Skin,
66998
67000
  E0 as Slot,
66999
67001
  RF as SlotState,
@@ -67002,10 +67004,11 @@ export {
67002
67004
  QG as createSGLBFile,
67003
67005
  qG as downloadBlob,
67004
67006
  XG as dracoExporter,
67005
- oH as font,
67007
+ aH as font,
67006
67008
  Bk as gltfExporter,
67007
67009
  Bc as gltfLoader,
67008
67010
  NG as imageBitmapToPixiTexture,
67009
67011
  zx as imageBitmapToUrl,
67010
- bR as isAppleDevice
67012
+ bR as isAppleDevice,
67013
+ oH as textureLoader
67011
67014
  };