endset_three_editor 0.5.3 → 0.5.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/three-editor.es.js
CHANGED
|
@@ -1993,10 +1993,10 @@ class dt {
|
|
|
1993
1993
|
items: e.items || [],
|
|
1994
1994
|
offsetY: e.offsetY ?? 0.1,
|
|
1995
1995
|
fontSize: e.fontSize || "13px",
|
|
1996
|
-
width: e.width || "
|
|
1997
|
-
backgroundColor: e.backgroundColor || "rgba(
|
|
1998
|
-
textColor: e.textColor || "#
|
|
1999
|
-
borderColor: e.borderColor || "rgba(
|
|
1996
|
+
width: e.width || "240px",
|
|
1997
|
+
backgroundColor: e.backgroundColor || "linear-gradient(135deg, rgba(6, 16, 42, 0.55) 0%, rgba(2, 6, 18, 0.40) 100%)",
|
|
1998
|
+
textColor: e.textColor || "#ffffff",
|
|
1999
|
+
borderColor: e.borderColor || "rgba(80, 200, 255, 0.15)",
|
|
2000
2000
|
className: e.className || ""
|
|
2001
2001
|
}, this.buildPanel();
|
|
2002
2002
|
}
|
|
@@ -2008,44 +2008,50 @@ class dt {
|
|
|
2008
2008
|
/** 根据当前 options 构建面板 DOM 结构(全部使用 em 单位,font-size 由 JS 动态控制) */
|
|
2009
2009
|
buildPanel() {
|
|
2010
2010
|
const e = this.options, t = dt.pxToEm, n = document.createElement("div");
|
|
2011
|
-
|
|
2011
|
+
n.className = `${Ye.panel} ${e.className}`.trim();
|
|
2012
|
+
const s = e.backgroundColor.includes("gradient") ? e.backgroundColor : `linear-gradient(135deg, ${e.backgroundColor} 0%, rgba(2, 6, 18, 0.40) 100%)`;
|
|
2013
|
+
if (n.style.cssText = `
|
|
2012
2014
|
width: ${t(parseFloat(e.width || "200"))}em;
|
|
2013
|
-
background: ${
|
|
2015
|
+
background: ${s};
|
|
2014
2016
|
color: ${e.textColor};
|
|
2015
2017
|
border: ${t(1)}em solid ${e.borderColor};
|
|
2016
|
-
border-radius: ${t(
|
|
2017
|
-
padding: ${t(
|
|
2018
|
+
border-radius: ${t(10)}em;
|
|
2019
|
+
padding: ${t(12)}em ${t(16)}em;
|
|
2018
2020
|
font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
|
|
2019
2021
|
font-size: var(${io}, 13px);
|
|
2020
|
-
line-height: 1.
|
|
2021
|
-
box-shadow:
|
|
2022
|
-
|
|
2022
|
+
line-height: 1.8;
|
|
2023
|
+
box-shadow:
|
|
2024
|
+
0 ${t(4)}em ${t(24)}em rgba(0, 0, 0, 0.5),
|
|
2025
|
+
0 0 ${t(12)}em rgba(60, 180, 240, 0.12),
|
|
2026
|
+
inset 0 0 ${t(4)}em rgba(60, 180, 240, 0.04);
|
|
2023
2027
|
user-select: none;
|
|
2024
2028
|
pointer-events: auto;
|
|
2025
2029
|
box-sizing: border-box;
|
|
2026
2030
|
`, e.title) {
|
|
2027
|
-
const
|
|
2028
|
-
|
|
2031
|
+
const a = document.createElement("div");
|
|
2032
|
+
a.className = Ye.title, a.style.cssText = `
|
|
2029
2033
|
font-weight: 700;
|
|
2030
2034
|
font-size: ${t(15)}em;
|
|
2031
|
-
color: #
|
|
2035
|
+
color: #88d8f0;
|
|
2036
|
+
text-shadow: 0 0 ${t(6)}em rgba(136, 216, 240, 0.20);
|
|
2032
2037
|
margin-bottom: ${t(8)}em;
|
|
2033
2038
|
padding-bottom: ${t(6)}em;
|
|
2034
|
-
border-bottom: ${t(1)}em solid rgba(
|
|
2039
|
+
border-bottom: ${t(1)}em solid rgba(100, 200, 232, 0.20);
|
|
2035
2040
|
text-align: center;
|
|
2036
|
-
|
|
2041
|
+
letter-spacing: ${t(1.2)}em;
|
|
2042
|
+
`, a.textContent = e.title, a.setAttribute("data-panel-title", ""), n.appendChild(a);
|
|
2037
2043
|
}
|
|
2038
|
-
const s = document.createElement("div");
|
|
2039
|
-
s.className = Ye.list, s.setAttribute("data-panel-list", ""), n.appendChild(s), this.renderItems(s, e.items);
|
|
2040
2044
|
const i = document.createElement("div");
|
|
2041
|
-
i.className = Ye.
|
|
2045
|
+
i.className = Ye.list, i.setAttribute("data-panel-list", ""), n.appendChild(i), this.renderItems(i, e.items);
|
|
2046
|
+
const o = document.createElement("div");
|
|
2047
|
+
o.className = Ye.arrow, o.style.cssText = `
|
|
2042
2048
|
width: 0;
|
|
2043
2049
|
height: 0;
|
|
2044
2050
|
border-left: ${t(8)}em solid transparent;
|
|
2045
2051
|
border-right: ${t(8)}em solid transparent;
|
|
2046
|
-
border-top: ${t(8)}em solid
|
|
2047
|
-
margin: ${t(
|
|
2048
|
-
`, n.appendChild(
|
|
2052
|
+
border-top: ${t(8)}em solid rgba(100, 200, 232, 0.25);
|
|
2053
|
+
margin: ${t(5)}em auto 0;
|
|
2054
|
+
`, n.appendChild(o), this.container = n, this.css2dObject && (this.css2dObject.element = n);
|
|
2049
2055
|
}
|
|
2050
2056
|
/** 渲染数据项到 DOM 列表 */
|
|
2051
2057
|
renderItems(e, t) {
|
|
@@ -2057,10 +2063,10 @@ class dt {
|
|
|
2057
2063
|
justify-content: space-between;
|
|
2058
2064
|
align-items: center;
|
|
2059
2065
|
padding: ${n(3)}em 0;
|
|
2060
|
-
border-bottom: ${n(1)}em solid rgba(255, 255, 255, 0.
|
|
2066
|
+
border-bottom: ${n(1)}em solid rgba(255, 255, 255, 0.05);
|
|
2061
2067
|
`, i.setAttribute("data-item-code", s.code || ""), i.innerHTML = `
|
|
2062
|
-
<span class="item-label" style="opacity: 0.
|
|
2063
|
-
<span class="item-value" style="font-weight:
|
|
2068
|
+
<span class="item-label" style="opacity: 0.78; flex-shrink: 0;">${this.escapeHtml(s.label)}</span>
|
|
2069
|
+
<span class="item-value" style="font-weight: 700; color: #88d8f0; text-shadow: 0 0 ${n(4)}em rgba(136, 216, 240, 0.15); text-align: right; word-break: break-all;">${this.escapeHtml(s.value)}${s.unit ? `<span style="font-size:0.85em;opacity:0.7;margin-left:${n(2)}em;">${this.escapeHtml(s.unit)}</span>` : ""}</span>
|
|
2064
2070
|
`, e.appendChild(i);
|
|
2065
2071
|
});
|
|
2066
2072
|
}
|