shop-components 0.1.44 → 0.1.46

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.
@@ -3,7 +3,7 @@ import { Logo, Scene3D, Skin, Slot } from './scene';
3
3
  import { Mechanism } from './mechanism/mechanism';
4
4
  import { ObjectSize } from './utils';
5
5
  import { SizeBox } from './dimension/size-box';
6
- import { AMRAssembly } from './assembly';
6
+ import { AMRAssembly } from '../../../../../../../stories/device-viewer/assembly';
7
7
  import EventEmitter from 'eventemitter3';
8
8
  import { CropperConfigs } from '../cropper';
9
9
  import { GoodsBox } from './goods-box';
@@ -29,7 +29,7 @@ export declare const SLOT_EVENTS: {
29
29
  ON_FUNCTION_ADDED: string;
30
30
  };
31
31
  export declare class Slot extends CSS2DObject {
32
- private props;
32
+ props: SlotProps;
33
33
  private _emitter;
34
34
  private _slotContainer;
35
35
  private _slotUI;
@@ -57448,7 +57448,7 @@ class lI extends Iv {
57448
57448
  const i = this.props.follows.get(A);
57449
57449
  if (i) {
57450
57450
  let r = "x";
57451
- A === "height" ? r = "y" : A === "width" && (r = "z");
57451
+ A === "height" ? r = "y" : ["width", "liftOuterWidth"].includes(A) && (r = "z");
57452
57452
  const s = ((t = this.props.slot) == null ? void 0 : t.position[r]) > 0 ? 1 : -1;
57453
57453
  this._wrapper.position[r] = (e - i.origin) * i.scale * s;
57454
57454
  }
@@ -62533,7 +62533,7 @@ class mK extends Ie {
62533
62533
  init(A) {
62534
62534
  this._app = A, this.sizeBox.init(A), this.addEventListener("shape-key-changed", (e, t) => {
62535
62535
  this._slots.forEach((i) => i.shapeKeyChanged(e, t)), this.sizeBox.follow === e ? (this.sizeBox.generate(this._container, t), this.sizeBox.originOffset && (this._container.traverse((i) => {
62536
- i instanceof Pe && !i.userData.isDevice && !i.userData.isBracket && i.geometry.translate(this.sizeBox.originOffset - this.sizeBox.translateCache, 0, 0), i instanceof lI && i.parent && i.parent.position.add(new O(this.sizeBox.originOffset - this.sizeBox.translateCache, 0, 0));
62536
+ i instanceof Pe && !i.userData.isDevice && !i.userData.isBracket && i.geometry.translate(this.sizeBox.originOffset - this.sizeBox.translateCache, 0, 0), i instanceof lI && !i.props.slot.userData.ignoreOriginChanged && i.parent && i.parent.position.add(new O(this.sizeBox.originOffset - this.sizeBox.translateCache, 0, 0));
62537
62537
  }), this.sizeBox.translateCache = this.sizeBox.originOffset, this.sizeBox.generate(this._container))) : this.sizeBox.generate(this._container), ["width", "length", "height"].includes(e) && this._emitter.emit("size-changed", e, t);
62538
62538
  });
62539
62539
  }
@@ -65047,7 +65047,7 @@ class lH {
65047
65047
  powerPreference: "high-performance",
65048
65048
  preserveDrawingBuffer: !0
65049
65049
  }), this.css2dRenderer = new RO(), this.mousePos = new uA(), this.mouseCoord = new uA(), this.offset = new uA(), this.size = new uA(), this.amr = new mK({ showSizeBox: !0, showController: !0 }), this.camera = new yt(
65050
- 60,
65050
+ 39.6,
65051
65051
  window.innerWidth / window.innerHeight,
65052
65052
  0.1,
65053
65053
  1e4
@@ -65116,7 +65116,7 @@ class lH {
65116
65116
  this._dragging ? i.getCanInstall() && i.render(this) : i.render(this);
65117
65117
  }), Ds.update(), this.controls.update(), this.css2dRenderer.render(this.scene, this.camera), this.updatePosition(), this.scene.overrideMaterial = null, this.renderer.render(this.scene, this.camera), this.renderer.render(this.overlayScene, this.camera);
65118
65118
  this.stats.end();
65119
- }, this.stats.showPanel(0), this.hideState(), A.fov && (this.camera.fov = A.fov), this._ground.visible = !1, this.controls = new GE(this.camera, this.renderer.domElement), this.controls.enablePan = !1, this.controls.rotateSpeed = 0.5, this.controls.dampingFactor = t2, this.controls.enableDamping = !0, this.controls.maxDistance = 5, this.controls.minDistance = 1, this.controls.zoomSpeed = bR() ? 0.2 : 1, this.renderer.setPixelRatio(window.devicePixelRatio || 1), this.renderer.autoClear = !0, this.renderer.toneMapping = W0, this.renderer.toneMappingExposure = 1.2, this.renderer.outputColorSpace = ke, this.renderer.localClippingEnabled = !0, this.css2dRenderer.domElement.style.pointerEvents = "none", this.css2dRenderer.domElement.style.position = "absolute", this.css2dRenderer.domElement.style.top = "0px", ae.tonemapping_pars_fragment = ae.tonemapping_pars_fragment.replace(
65119
+ }, this.stats.showPanel(0), this.hideState(), A.fov && (this.camera.fov = A.fov, this.camera.updateProjectionMatrix()), this._ground.visible = !1, this.controls = new GE(this.camera, this.renderer.domElement), this.controls.enablePan = !1, this.controls.rotateSpeed = 0.5, this.controls.dampingFactor = t2, this.controls.enableDamping = !0, this.controls.maxDistance = 5, this.controls.minDistance = 1, this.controls.zoomSpeed = bR() ? 0.2 : 1, this.renderer.setPixelRatio(window.devicePixelRatio || 1), this.renderer.autoClear = !0, this.renderer.toneMapping = W0, this.renderer.toneMappingExposure = 1.2, this.renderer.outputColorSpace = ke, this.renderer.localClippingEnabled = !0, this.css2dRenderer.domElement.style.pointerEvents = "none", this.css2dRenderer.domElement.style.position = "absolute", this.css2dRenderer.domElement.style.top = "0px", ae.tonemapping_pars_fragment = ae.tonemapping_pars_fragment.replace(
65120
65120
  "vec3 CustomToneMapping( vec3 color ) { return color; }",
65121
65121
  `
65122
65122
  float startCompression = 0.8;