@c4h/chuci 0.2.2 → 0.2.4
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
|
@@ -21129,7 +21129,7 @@ class a_ extends os {
|
|
|
21129
21129
|
${this.modelUrl ? `
|
|
21130
21130
|
${this.isLoading ? '<div class="loading">Loading...</div>' : ""}
|
|
21131
21131
|
${!this.isLoading && this.debugMode ? `
|
|
21132
|
-
<div class="debug-info" style="z-index:
|
|
21132
|
+
<div class="debug-info" style="z-index: calc(var(--cc-viewer-z-index-each, 1000) + 5);">
|
|
21133
21133
|
Camera Position: ${this.getCameraDebugInfo()}<br>
|
|
21134
21134
|
Camera Target: ${this.getTargetDebugInfo()}<br>
|
|
21135
21135
|
Controls: Rotate (drag), Zoom (scroll), Pan (right-drag)
|
|
@@ -21200,7 +21200,7 @@ class a_ extends os {
|
|
|
21200
21200
|
font-size: 12px;
|
|
21201
21201
|
border-radius: 4px;
|
|
21202
21202
|
pointer-events: none;
|
|
21203
|
-
z-index:
|
|
21203
|
+
z-index: calc(var(--cc-viewer-z-index-each, 1000) + 10);
|
|
21204
21204
|
}
|
|
21205
21205
|
|
|
21206
21206
|
.texture-toggle {
|
|
@@ -21214,7 +21214,7 @@ class a_ extends os {
|
|
|
21214
21214
|
cursor: pointer;
|
|
21215
21215
|
border-radius: 4px;
|
|
21216
21216
|
transition: background 0.3s;
|
|
21217
|
-
z-index:
|
|
21217
|
+
z-index: calc(var(--cc-viewer-z-index-each, 1000) + 10);
|
|
21218
21218
|
pointer-events: auto;
|
|
21219
21219
|
}
|
|
21220
21220
|
|
|
@@ -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"
|
|
21282
|
-
const
|
|
21283
|
-
|
|
21284
|
-
|
|
21285
|
-
|
|
21286
|
-
|
|
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) {
|
|
@@ -21392,7 +21394,7 @@ class o_ extends os {
|
|
|
21392
21394
|
width: 100%;
|
|
21393
21395
|
height: 100%;
|
|
21394
21396
|
background-color: rgba(0, 0, 0, 0.9);
|
|
21395
|
-
z-index: 1000;
|
|
21397
|
+
z-index: var(--cc-viewer-z-index-each, 1000);
|
|
21396
21398
|
}
|
|
21397
21399
|
|
|
21398
21400
|
.viewer {
|
|
@@ -21459,7 +21461,7 @@ class o_ extends os {
|
|
|
21459
21461
|
pointer-events: none;
|
|
21460
21462
|
white-space: pre-line;
|
|
21461
21463
|
min-width: 200px;
|
|
21462
|
-
z-index:
|
|
21464
|
+
z-index: calc(var(--cc-viewer-z-index-each, 1000) + 3);
|
|
21463
21465
|
}
|
|
21464
21466
|
|
|
21465
21467
|
${this.getNavigationStyles()}
|
|
@@ -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
|
-
|
|
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;
|