@c4h/chuci 0.2.1 → 0.2.3

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/dist/chuci.js CHANGED
@@ -21278,12 +21278,14 @@ class a_ extends os {
21278
21278
  const i = this.container.clientWidth || this.container.offsetWidth, n = this.container.clientHeight || this.container.offsetHeight;
21279
21279
  this.camera = new ri(75, i / n, 0.1, 1e3), this.renderer = new LA({ antialias: !0, alpha: !0 }), this.renderer.setSize(i, n), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.shadowMap.enabled = !0;
21280
21280
  const r = this.renderer.domElement;
21281
- r.style.position = "fixed", r.style.left = `${t.left}px`, r.style.top = `${t.top}px`, r.style.width = `${t.width}px`, r.style.height = `${t.height}px`, r.style.pointerEvents = "auto", r.style.zIndex = "1001", document.body.appendChild(r), this.externalCanvas = r, this.controls = new ZA(this.camera, r), this.controls.enableDamping = !0, this.controls.dampingFactor = 0.05;
21282
- const a = new jp(4210752, 2), o = new Kp(16777215, 1);
21283
- o.position.set(1, 1, 1), this.scene.add(a, o), await this.loadModel(), this.resizeObserver = new ResizeObserver((c) => {
21284
- for (const l of c) {
21285
- const { width: d, height: h } = l.contentRect;
21286
- d > 0 && h > 0 && this.handleResize();
21281
+ r.style.position = "fixed", r.style.left = `${t.left}px`, r.style.top = `${t.top}px`, r.style.width = `${t.width}px`, r.style.height = `${t.height}px`, r.style.pointerEvents = "auto";
21282
+ const o = window.getComputedStyle(this).getPropertyValue("--cc-viewer-z-index-each").trim(), c = o ? parseInt(o, 10) : 1e3;
21283
+ r.style.zIndex = `${c + 1}`, document.body.appendChild(r), this.externalCanvas = r, this.controls = new ZA(this.camera, r), this.controls.enableDamping = !0, this.controls.dampingFactor = 0.05;
21284
+ const l = new jp(4210752, 2), d = new Kp(16777215, 1);
21285
+ d.position.set(1, 1, 1), this.scene.add(l, d), await this.loadModel(), this.resizeObserver = new ResizeObserver((h) => {
21286
+ for (const u of h) {
21287
+ const { width: p, height: g } = u.contentRect;
21288
+ p > 0 && g > 0 && this.handleResize();
21287
21289
  }
21288
21290
  }), this.resizeObserver.observe(this.container), this.animateLoop();
21289
21291
  } catch (i) {
@@ -21541,7 +21543,12 @@ ${this.getTargetDebugInfo()}
21541
21543
  if (!i) return;
21542
21544
  const n = i.getBoundingClientRect();
21543
21545
  let r = document.getElementById(t);
21544
- r || (r = document.createElement("canvas"), r.id = t, r.style.position = "fixed", r.style.top = `${n.top}px`, r.style.left = `${n.left}px`, r.style.width = `${n.width}px`, r.style.height = `${n.height}px`, r.style.zIndex = "1001", r.style.pointerEvents = "auto", r.style.display = "block", r.style.background = "transparent", document.body.appendChild(r)), r.style.top = `${n.top}px`, r.style.left = `${n.left}px`, r.style.width = `${n.width}px`, r.style.height = `${n.height}px`, this.canvas = r;
21546
+ if (!r) {
21547
+ r = document.createElement("canvas"), r.id = t, r.style.position = "fixed", r.style.top = `${n.top}px`, r.style.left = `${n.left}px`, r.style.width = `${n.width}px`, r.style.height = `${n.height}px`;
21548
+ const o = window.getComputedStyle(this).getPropertyValue("--cc-viewer-z-index-each").trim(), c = o ? parseInt(o, 10) : 1e3;
21549
+ r.style.zIndex = `${c + 1}`, r.style.pointerEvents = "auto", r.style.display = "block", r.style.background = "transparent", document.body.appendChild(r);
21550
+ }
21551
+ r.style.top = `${n.top}px`, r.style.left = `${n.left}px`, r.style.width = `${n.width}px`, r.style.height = `${n.height}px`, this.canvas = r;
21545
21552
  try {
21546
21553
  const a = this.query(".gaussian-container");
21547
21554
  if (!a) return;