You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

2056 lines
41 KiB

html,
body {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
#app {
height: 100%;
margin: 0;
padding: 0;
}
.inspector-root {
display: flex;
flex-direction: column;
position: relative;
height: 100%;
overflow: hidden;
padding: 4px 8px 0;
box-sizing: border-box;
font-size: 13px;
/* ===== HUD 深蓝毛玻璃主题:全局覆盖官方变量 ===== */
--hud-bg: #0e1a38;
--hud-bg-card: rgba(15, 23, 42, 0.85);
--hud-line: rgba(96, 165, 250, 0.25);
--hud-line-strong: rgba(59, 130, 246, 0.7);
--hud-brand: #3b82f6;
--hud-glow: rgba(59, 130, 246, 0.55);
--hud-glow-soft: rgba(59, 130, 246, 0.32);
--hud-text: #e8f1ff;
--hud-text2: #94a3b8;
--hud-text3: #64748b;
color: var(--hud-text2);
background: var(--hud-bg);
/* 映射官方变量到 HUD,让整套官方组件自动转深蓝 */
--color-normal-fill: rgba(15, 23, 42, 0.9);
--color-normal-fill-light: rgba(30, 41, 59, 0.92);
--color-normal-fill-weak: rgba(15, 23, 42, 0.75);
--color-normal-border: rgba(96, 165, 250, 0.22);
--color-normal-contrast: var(--hud-text);
--color-normal-contrast-weak: var(--hud-text2);
--color-normal-contrast-weakest: var(--hud-text3);
--color-normal-contrast-strongest: var(--hud-text);
--color-primary: #60a5fa;
--color-input-background: rgba(15, 23, 42, 0.9);
--color-button-background: rgba(30, 41, 59, 0.9);
}
.panel-toolbar {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 10px;
border: 1px solid rgba(96, 165, 250, 0.28);
border-radius: 10px;
background: rgba(18, 28, 58, 0.92);
box-shadow: 0 0 28px rgba(59, 130, 246, 0.3), inset 0 0 26px rgba(59, 130, 246, 0.08);
flex-wrap: wrap;
margin-bottom: 8px;
}
/* 客户端类型徽章:渐变胶囊 + 发光圆点 */
.client-badge {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 1px 9px 1px 7px;
margin-left: 2px;
border-radius: 999px;
font-size: 12px;
font-weight: 600;
line-height: 18px;
vertical-align: middle;
color: #fff;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 1px 4px rgba(0, 0, 0, 0.3);
}
.client-badge .client-icon {
width: 7px;
height: 7px;
border-radius: 50%;
background: #fff;
box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.9);
}
.client-badge.h5 {
background: linear-gradient(135deg, #0ea5e9, #22d3ee);
}
.client-badge.editor {
background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}
.client-badge.simulator {
background: linear-gradient(135deg, #f59e0b, #fbbf24);
}
.client-badge.device {
background: linear-gradient(135deg, #10b981, #34d399);
}
.client-badge.unknown {
background: linear-gradient(135deg, #64748b, #94a3b8);
}
.chk {
display: inline-flex;
align-items: center;
gap: 4px;
cursor: pointer;
user-select: none;
}
.cmd-input {
flex: 1;
min-width: 120px;
background: var(--color-input-background);
color: var(--color-normal-contrast);
border: 1px solid var(--color-normal-border);
border-radius: 4px;
padding: 4px 8px;
}
button {
background: var(--color-button-background);
color: var(--color-normal-contrast);
border: 1px solid var(--color-normal-border);
border-radius: 4px;
padding: 4px 10px;
cursor: pointer;
}
button.install-btn {
background: var(--color-primary);
color: var(--color-white);
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* ===== 工具栏按钮美化:柔和胶囊,去掉白边框 ===== */
.panel-toolbar > button {
border: none;
border-radius: 5px;
background: rgba(128, 128, 128, 0.14);
color: var(--color-normal-contrast-weak);
padding: 4px 12px;
font-size: 12px;
transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.panel-toolbar > button:hover:not(:disabled) {
background: rgba(128, 128, 128, 0.26);
color: var(--color-normal-contrast);
}
.panel-toolbar > button:disabled {
opacity: 0.4;
}
/* 服务启停按钮:运行中 = 绿色渐变高亮(服务在线),停止 = 灰色胶囊 */
.panel-toolbar > button.server-btn.running {
background: linear-gradient(135deg, #10b981, #34d399);
color: #fff;
font-weight: 600;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 1px 4px rgba(16, 185, 129, 0.5);
}
.panel-toolbar > button.server-btn:not(.running):hover:not(:disabled) {
background: rgba(16, 185, 129, 0.16);
color: #34d399;
}
/* 安装脚本按钮:亮蓝渐变主按钮(与开关激活态同族),文字加粗 + 蓝色投影 + 白色内发光描边 */
.panel-toolbar > button.install-btn,
.panel-toolbar > button.install-btn:hover:not(:disabled) {
background: linear-gradient(135deg, #3b82f6, #60a5fa);
color: #fff;
font-weight: 600;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 1px 4px rgba(37, 99, 235, 0.5);
}
/* 开关式按钮:激活时亮蓝渐变高亮,与灰底形成强对比 */
button.toggle.active {
background: linear-gradient(135deg, #3b82f6, #60a5fa);
color: #fff;
font-weight: 600;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 1px 4px rgba(37, 99, 235, 0.5);
}
/* ===== MCP 配置弹窗 ===== */
.mcp-mask {
position: absolute;
inset: 0;
z-index: 50;
background: rgba(0, 0, 0, 0.45);
display: flex;
align-items: center;
justify-content: center;
}
.mcp-dialog {
width: 520px;
max-width: 92%;
background: var(--color-normal-fill);
border: 1px solid var(--color-normal-border);
border-radius: 6px;
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
overflow: hidden;
}
.mcp-dialog-head {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 12px;
border-bottom: 1px solid var(--color-normal-border);
background: rgba(128, 128, 128, 0.08);
font-weight: 600;
}
.mcp-dialog-body {
padding: 12px;
display: flex;
flex-direction: column;
gap: 10px;
}
.mcp-row {
display: flex;
align-items: center;
gap: 8px;
min-height: 28px;
}
.mcp-label {
flex: none;
width: 56px;
color: var(--color-normal-contrast-weakest);
}
.mcp-st {
font-weight: 600;
padding: 1px 8px;
border-radius: 3px;
font-size: 12px;
}
.mcp-st.on {
color: #22c55e;
background: rgba(34, 197, 94, 0.15);
}
.mcp-st.off {
color: var(--color-normal-contrast-weak);
background: rgba(128, 128, 128, 0.15);
}
.mcp-st-url {
font-family: monospace;
color: var(--color-normal-contrast);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mcp-port {
width: 90px;
flex: none;
}
.mcp-help {
color: var(--color-normal-contrast-weakest);
font-size: 12px;
opacity: 0.8;
}
.mcp-row .token-input {
flex: 1;
min-width: 0;
}
.mcp-actions {
border-top: 1px solid var(--color-normal-border);
padding-top: 10px;
}
.mcp-actions button.toggle {
margin-right: 8px;
}
.mcp-auth {
font-family: monospace;
color: var(--color-normal-contrast-weakest);
background: rgba(128, 128, 128, 0.15);
border-radius: 3px;
padding: 1px 6px;
max-width: 320px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mcp-tip {
color: var(--color-normal-contrast-weakest);
opacity: 0.8;
}
.mcp-dialog .mcp-tip {
font-size: 12px;
}
.split {
display: flex;
flex: 1;
min-height: 0;
gap: 0;
margin-top: 8px;
overflow: hidden;
}
.preview-col {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
border: 1px solid var(--hud-line);
border-radius: 10px;
overflow: hidden;
background: rgba(18, 28, 58, 0.92);
box-shadow: 0 0 28px var(--hud-glow-soft), inset 0 0 26px rgba(59, 130, 246, 0.08);
}
.preview-toolbar {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 8px;
border-bottom: 1px solid rgba(96, 165, 250, 0.25);
background: linear-gradient(180deg, rgba(59, 130, 246, 0.18), rgba(10, 16, 32, 0));
}
.p-online {
display: inline-flex;
align-items: center;
gap: 5px;
font-size: 12px;
color: #8b94a3;
white-space: nowrap;
}
.p-online .dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: #5a6270;
flex: none;
}
.p-online.ok {
color: #10b981;
}
.p-online.ok .dot {
background: #34d399;
box-shadow: 0 0 6px #34d399;
}
.p-online.warn {
color: #f59e0b;
}
.p-online.warn .dot {
background: #f59e0b;
box-shadow: 0 0 6px #f59e0b;
}
.p-sep {
width: 1px;
height: 18px;
background: var(--color-normal-border);
margin: 0 4px;
flex: none;
}
.p-group {
display: inline-flex;
align-items: center;
gap: 5px;
color: #8b94a3;
}
.p-group > ui-icon {
font-size: 14px;
}
.p-device {
min-width: 108px;
}
.p-fps-in {
width: 56px;
}
.pbtn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
padding: 0;
border: 1px solid var(--color-normal-border);
border-radius: 5px;
background: #21252b;
color: #a3adbd;
cursor: pointer;
transition: all 0.12s ease;
flex: none;
}
.pbtn:hover {
background: #2a303a;
color: #e6ebf2;
border-color: #3a4250;
}
.pbtn.on {
background: linear-gradient(180deg, #3b82f6, #2563eb);
color: #fff;
border-color: #3b82f6;
box-shadow: 0 0 12px rgba(59, 130, 246, 0.8), 0 1px 6px rgba(59, 130, 246, 0.45);
}
.pbtn.major {
width: 30px;
background: linear-gradient(180deg, #3b82f6, #2563eb);
color: #fff;
border-color: #3b82f6;
box-shadow: 0 0 12px rgba(59, 130, 246, 0.9), 0 1px 6px rgba(59, 130, 246, 0.45);
}
.pbtn.major:hover {
filter: brightness(1.12);
}
.pbtn ui-icon {
font-size: 15px;
}
.p-zoom {
position: absolute;
right: 8px;
bottom: 8px;
z-index: 5;
padding: 2px 8px;
border-radius: 10px;
background: rgba(20, 22, 26, 0.78);
color: #cfe0ff;
font-size: 11px;
font-variant-numeric: tabular-nums;
pointer-events: none;
backdrop-filter: blur(3px);
}
.preview-frame-wrap {
flex: 1;
display: flex;
position: relative;
min-height: 0;
}
.preview-frame {
flex: 1;
width: 100%;
border: 0;
background: #111;
}
/* 无 iframe 游戏渲染容器(引擎脚本直接跑在面板 DOM 里) */
.game-view {
flex: 1;
width: 100%;
min-width: 0;
background: #0d1428;
overflow: hidden;
position: relative;
}
/* 预览器 UI 控件条仅作为 Ui 构造依赖保留,不显示 */
#yyka-game-host .toolbar {
display: none !important;
}
#yyka-game-host .content,
#yyka-game-host .contentWrap,
#yyka-game-host #GameDiv,
#yyka-game-host #Cocos3dGameContainer {
width: 100% !important;
height: 100% !important;
margin: 0 !important;
padding: 0 !important;
}
#yyka-game-host #GameDiv {
display: flex;
align-items: center;
justify-content: center;
background: #111;
}
#yyka-game-host #GameCanvas {
width: 100%;
height: 100%;
display: block;
}
/* 加载画面 */
#yyka-game-host #splash {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: #141519;
}
#yyka-game-host #splash .progress-bar {
width: 200px;
height: 6px;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 8px;
background: rgba(255, 255, 255, 0.04);
overflow: hidden;
}
#yyka-game-host #splash .progress-bar > span {
display: block;
height: 100%;
width: 0;
background: linear-gradient(90deg, #3b82f6, #60a5fa);
border-radius: 8px;
}
/* 空场景提示 / 引擎错误遮罩 */
#yyka-game-host #bulletin {
position: absolute;
inset: 0;
display: none;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 0.45);
font-size: 13px;
}
#yyka-game-host #error {
position: absolute;
inset: 0;
display: none;
z-index: 10;
background: rgba(0, 0, 0, 0.85);
color: #f87171;
padding: 16px;
overflow: auto;
white-space: pre-wrap;
font-size: 12px;
}
/* 面板层渲染错误提示(点击重新加载) */
.preview-err {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(16, 16, 16, 0.88);
color: #f87171;
font-size: 12px;
line-height: 1.7;
padding: 16px;
text-align: center;
cursor: pointer;
z-index: 6;
word-break: break-all;
}
/* 预览服务未启动时的遮罩提示 */
.preview-cover {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(16, 16, 16, 0.82);
z-index: 5;
}
.cover-box {
text-align: center;
color: var(--color-normal-contrast-weak);
font-size: 13px;
line-height: 1.9;
padding: 16px;
}
.cover-box b {
display: block;
font-size: 15px;
color: var(--color-warn);
margin-bottom: 10px;
}
.cover-box button {
margin-top: 12px;
}
.ok {
color: var(--color-success);
}
.warn {
color: var(--color-warn);
}
/* ===== 预览下方状态栏 ===== */
.statusbar {
display: flex;
align-items: center;
gap: 6px;
justify-content: center;
padding: 3px 8px;
font-size: 12px;
color: var(--color-normal-contrast-weakest);
border-top: 1px solid rgba(96, 165, 250, 0.25);
background: linear-gradient(180deg, rgba(59, 130, 246, 0.14), rgba(10, 16, 32, 0));
white-space: nowrap;
overflow: hidden;
flex: none;
}
.statusbar b {
color: var(--color-normal-contrast-strongest, #fff);
margin: 0 2px;
font-family: monospace;
color: #60a5fa;
text-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}
.st-item-group {
display: inline-flex;
align-items: center;
gap: 6px;
}
.st-item {
display: inline-flex;
align-items: center;
gap: 2px;
}
.st-item.dim {
opacity: 0.6;
}
.st-sep {
opacity: 0.35;
}
/* 不同统计信息用不同颜色区分 */
.st-fps b {
color: var(--color-success);
}
.st-dc b {
color: var(--color-warn);
}
.st-tri b {
color: #4fc3f7;
}
.st-mem b {
color: #ce93d8;
}
.st-phy b {
color: #ffab91;
}
.st-ver b {
color: var(--color-normal-contrast-weakest);
}
/* 性能曲线嵌入预览列:去掉外框,仅以上边框与状态栏分隔 */
.preview-col .perf-panel {
margin: 0;
border: 0;
border-top: 1px solid var(--color-normal-border);
border-radius: 0;
}
.tree-panel {
flex: none;
display: flex;
flex-direction: column;
min-width: 0;
border: 1px solid var(--hud-line);
border-radius: 10px;
overflow: hidden;
background: rgba(18, 28, 58, 0.92);
box-shadow: 0 0 28px var(--hud-glow-soft), inset 0 0 26px rgba(59, 130, 246, 0.08);
}
.tree-head {
display: flex;
align-items: center;
gap: 8px;
padding: 3px 8px;
height: 40px;
box-sizing: border-box;
font-size: 12px;
color: #e2f0ff;
font-weight: 600;
letter-spacing: 0.5px;
background: linear-gradient(180deg, rgba(59, 130, 246, 0.18), rgba(10, 16, 32, 0));
border-bottom: 1px solid rgba(96, 165, 250, 0.25);
text-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}
.scene {
font-size: 12px;
color: var(--color-normal-contrast-weakest);
}
.tree-body {
flex: 1;
overflow: auto;
padding: 6px 4px;
background: rgba(22, 34, 70, 0.45);
}
/* 树行:圆角卡片 + 缩进引导线 + 悬停微动 */
.tree-row {
position: relative;
display: flex;
align-items: center;
gap: 6px;
line-height: 26px;
padding-right: 8px;
margin: 2px 4px;
border-radius: 6px;
cursor: pointer;
white-space: nowrap;
transition: background 0.15s, transform 0.15s;
}
.tree-row:hover {
background: rgba(128, 128, 128, 0.12);
transform: translateX(2px);
}
/* 缩进区引导线(只画在缩进范围内,不穿透文字) */
.tree-row::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: var(--indent, 8px);
background-image: repeating-linear-gradient(
to right,
transparent 0 13px,
rgba(128, 128, 128, 0.1) 13px 14px
);
pointer-events: none;
border-radius: 6px 0 0 6px;
}
/* 选中:渐变底 + 左侧发光色条 */
.tree-row.selected {
background: linear-gradient(90deg, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.08));
color: var(--color-white);
}
.tree-row.selected::after {
content: '';
position: absolute;
left: 0;
top: 5px;
bottom: 5px;
width: 3px;
border-radius: 2px;
background: #3b82f6;
box-shadow: 0 0 12px rgba(59, 130, 246, 1);
}
/* 展开箭头:SVG 三角形 + 旋转动画 */
.expander {
flex: none;
width: 24px;
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--color-normal-contrast-weakest);
transition: transform 0.18s, color 0.18s;
}
.expander svg {
width: 15px;
height: 15px;
display: block;
fill: currentColor;
transition: transform 0.18s;
}
.expander:hover {
color: var(--color-normal-contrast);
}
.expander.open {
transform: rotate(90deg);
}
.expander.placeholder {
color: transparent;
}
/* 节点类型图标(ui-icon 官方组件,按组件类名显示) */
.node-ico {
flex: none;
width: 16px;
height: 16px;
font-size: 16px;
color: #7dd3fc;
}
.node-ico.inactive {
opacity: 0.4;
color: #64748b;
}
.name {
overflow: hidden;
text-overflow: ellipsis;
}
.name.inactive {
opacity: 0.5;
text-decoration: line-through;
}
/* 徽章:组件数靠右胶囊,隐藏橙色小标签 */
.badge {
flex: none;
margin-left: auto;
padding: 0 6px;
border-radius: 8px;
font-size: 10px;
line-height: 15px;
color: var(--color-normal-contrast-weakest);
background: rgba(128, 128, 128, 0.16);
}
.badge.hide-badge {
margin-left: 6px;
color: #fbbf24;
background: rgba(251, 191, 36, 0.14);
}
.tree-row.selected .badge {
color: #dbeafe;
background: rgba(255, 255, 255, 0.15);
}
.empty-hint {
padding: 12px;
color: var(--color-normal-contrast-weakest);
font-size: 12px;
}
.detail-panel {
flex: none;
display: flex;
flex-direction: column;
min-width: 0;
border: 1px solid var(--hud-line);
border-radius: 10px;
overflow: hidden;
background: rgba(18, 28, 58, 0.92);
box-shadow: 0 0 28px var(--hud-glow-soft), inset 0 0 26px rgba(59, 130, 246, 0.08);
}
.divider {
flex: none;
width: 8px;
cursor: col-resize;
background: transparent;
position: relative;
flex-shrink: 0;
touch-action: none;
z-index: 2;
}
.divider::after {
content: '';
position: absolute;
top: 20%;
bottom: 20%;
left: 50%;
width: 1px;
transform: translateX(-50%);
background: var(--color-normal-border);
}
.divider:hover::after {
background: var(--color-primary);
width: 2px;
}
.detail-head {
padding: 3px 8px;
height: 40px;
box-sizing: border-box;
font-weight: 600;
font-size: 12px;
color: #e2f0ff;
letter-spacing: 0.5px;
background: linear-gradient(180deg, rgba(59, 130, 246, 0.18), rgba(10, 16, 32, 0));
border-bottom: 1px solid rgba(96, 165, 250, 0.25);
text-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
display: flex;
align-items: center;
gap: 6px;
}
.detail-head .mini {
margin-left: auto;
font-weight: 400;
}
.detail-body {
flex: 1;
overflow: auto;
background: rgba(22, 34, 70, 0.45);
}
.detail-section {
border-bottom: 1px solid var(--color-normal-border);
padding: 6px 0;
}
.section-title {
padding: 5px 10px;
font-weight: 600;
font-size: 12px;
color: var(--color-normal-contrast-weakest);
display: flex;
align-items: center;
gap: 6px;
}
.section-title::before {
content: '';
flex: none;
width: 3px;
height: 12px;
border-radius: 2px;
background: #3b82f6;
box-shadow: 0 0 10px rgba(59, 130, 246, 0.85);
}
.comp-head {
display: flex;
align-items: center;
gap: 6px;
padding: 5px 10px;
background: var(--color-normal-weak);
border-left: 3px solid #3b82f6;
position: sticky;
top: 0;
z-index: 1;
}
.comp-type {
font-size: 12px;
}
.v-editor {
width: 100%;
min-width: 0;
box-sizing: border-box;
}
.vec {
display: flex;
gap: 4px;
flex-wrap: wrap;
min-width: 0;
}
.vec ui-num-input {
flex: 1 1 52px;
min-width: 0;
box-sizing: border-box;
}
.vec > span {
display: inline-flex;
align-items: center;
gap: 3px;
flex: 1 1 52px;
min-width: 0;
}
.vec > span input {
flex: 1;
width: auto;
}
/* 颜色选择器:占满值列宽度 */
ui-color.color-editor {
width: 100%;
min-width: 0;
flex: 1 1 120px;
}
.detail-row {
display: grid;
grid-template-columns: 88px minmax(0, 1fr);
gap: 8px;
align-items: center;
padding: 4px 10px;
font-size: 12px;
border-radius: 4px;
}
.detail-row:hover {
background: rgba(128, 128, 128, 0.08);
}
.detail-row .k {
color: var(--color-normal-contrast-weakest);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.detail-row .v {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.logbar-wrap {
/* 不漂浮:作为 flex 布局的普通子项,占位显示,不遮挡其他窗口 */
flex: none;
position: relative;
margin: 8px 0 4px;
background: rgba(18, 28, 58, 0.92);
border: 1px solid var(--hud-line);
border-radius: 10px;
overflow: hidden;
box-shadow: 0 0 28px var(--hud-glow-soft), inset 0 0 26px rgba(59, 130, 246, 0.08);
}
.logbar-head {
display: flex;
align-items: center;
gap: 8px;
padding: 3px 6px;
height: 40px;
box-sizing: border-box;
font-size: 12px;
font-weight: 600;
color: #e2f0ff;
letter-spacing: 0.5px;
background: linear-gradient(180deg, rgba(59, 130, 246, 0.18), rgba(10, 16, 32, 0));
border-bottom: 1px solid rgba(96, 165, 250, 0.25);
text-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
cursor: pointer;
user-select: none;
overflow: hidden;
position: relative;
}
.logbar-stats {
display: inline-flex;
align-items: center;
gap: 4px;
position: absolute;
left: 50%;
transform: translateX(-50%);
font-size: 12px;
color: var(--color-normal-contrast-weakest);
white-space: nowrap;
pointer-events: none;
}
.logbar-stats b {
color: var(--color-normal-contrast-strongest, #fff);
}
.logbar-stats .dim {
opacity: 0.45;
}
.log-title {
cursor: pointer;
user-select: none;
color: var(--color-normal-contrast-weakest);
font-size: 12px;
display: inline-flex;
align-items: center;
gap: 4px;
}
.log-fold {
width: 12px;
height: 12px;
display: inline-block;
fill: currentColor;
transition: transform 0.18s;
}
.log-fold.open {
transform: rotate(90deg);
}
.log-count {
color: var(--color-normal-contrast-weakest);
}
.spacer {
flex: 1;
}
.copied-hint {
color: var(--color-success);
font-size: 12px;
}
.mini {
padding: 1px 8px;
font-size: 12px;
}
.mini ui-icon {
display: inline-flex;
font-size: 13px;
}
.logbar {
height: 300px;
max-height: 300px;
overflow: auto;
font-family: monospace;
font-size: 12px;
background: rgba(22, 34, 70, 0.45);
}
.log-item {
position: relative;
display: flex;
align-items: flex-start;
gap: 6px;
padding: 2px 6px 2px 8px;
border-left: 3px solid transparent;
}
.log-item:hover {
background: var(--color-normal-hover);
}
/* 左色条:按等级着色,一眼可辨 */
.log-item.lv-log {
border-left-color: #8a9bb8;
}
.log-item.lv-warn {
border-left-color: var(--color-warn);
}
.log-item.lv-error {
border-left-color: var(--color-error);
background: rgba(248, 113, 113, 0.06);
}
.log-item.lv-error:hover {
background: rgba(248, 113, 113, 0.12);
}
.copy-line {
flex: none;
margin-left: auto;
padding: 0 4px;
line-height: 16px;
visibility: hidden;
}
.log-item:hover .copy-line {
visibility: visible;
}
.log-text {
flex: 1;
min-width: 0;
white-space: pre-wrap;
word-break: break-all;
}
/* ===== 等级徽章 ===== */
.log-badge {
flex: none;
min-width: 34px;
text-align: center;
font-size: 10px;
line-height: 15px;
padding: 0 4px;
border-radius: 3px;
margin-top: 1px;
font-family: sans-serif;
letter-spacing: 0.5px;
}
.log-badge.b-log {
color: #8a9bb8;
background: rgba(138, 155, 184, 0.14);
border: 1px solid rgba(138, 155, 184, 0.35);
}
.log-badge.b-warn {
color: #fbbf24;
background: rgba(251, 191, 36, 0.14);
border: 1px solid rgba(251, 191, 36, 0.35);
}
.log-badge.b-error {
color: #f87171;
background: rgba(248, 113, 113, 0.14);
border: 1px solid rgba(248, 113, 113, 0.4);
}
.log-badge.b-info {
color: #9aa4b2;
background: rgba(154, 164, 178, 0.14);
border: 1px solid rgba(154, 164, 178, 0.3);
}
/* ===== 时间戳 ===== */
.log-time {
flex: none;
color: var(--color-normal-contrast-weakest);
font-size: 11px;
line-height: 17px;
margin-top: 1px;
}
/* ===== 日志分级 ===== */
.log-item.lv-log .log-text {
color: var(--color-normal-contrast);
}
.log-item.lv-warn .log-text {
color: #e8c07a;
}
.log-item.lv-error .log-text {
color: #f1968f;
}
.log-filters {
display: inline-flex;
align-items: center;
gap: 2px;
margin-right: 4px;
}
.log-filters .mini.active {
background: var(--color-primary);
color: var(--color-white);
border-color: var(--color-primary);
}
/* ===== 令牌 ===== */
.token-box {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 12px;
color: var(--color-normal-contrast-weakest);
}
.token-input {
width: 130px;
font-family: monospace;
font-size: 12px;
background: var(--color-input-background);
color: var(--color-normal-contrast);
border: 1px solid var(--color-normal-border);
border-radius: 3px;
padding: 1px 5px;
}
/* ===== 性能曲线 ===== */
.perf-panel {
flex: none;
margin-top: 8px;
border: 1px solid var(--color-normal-border);
border-radius: 4px;
overflow: hidden;
background: var(--color-normal-fill, #222);
padding-bottom: 2px;
}
.perf-head {
display: flex;
align-items: center;
gap: 10px;
padding: 4px 8px;
font-size: 12px;
color: var(--color-normal-contrast-weak);
}
.perf-latest {
font-family: monospace;
color: var(--color-normal-contrast-weakest);
}
.legend {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 12px;
color: var(--color-normal-contrast-weakest);
}
.legend .dot {
width: 8px;
height: 8px;
border-radius: 50%;
display: inline-block;
}
.legend .dot.fps {
background: #4ade80;
}
.legend .dot.dc {
background: #fbbf24;
}
.perf-canvas {
display: block;
width: 100%;
height: 110px;
}
/* ===== 底部行:资源统计 + 日志 左右各半 ===== */
.bottom-row {
display: flex;
gap: 8px;
margin-top: 8px;
flex: none;
align-items: stretch;
min-height: 0;
}
.bottom-row > .res-panel {
flex: 1;
min-width: 0;
margin-top: 0;
}
.bottom-row > .logbar-wrap {
flex: 1;
min-width: 0;
margin: 0;
}
/* ===== 资源统计(HUD 仪表风格) ===== */
.res-panel {
flex: none;
margin-top: 8px;
border: 1px solid rgba(96, 165, 250, 0.28);
border-radius: 10px;
overflow: hidden;
background: rgba(18, 28, 58, 0.92);
box-shadow: 0 0 28px rgba(59, 130, 246, 0.3), inset 0 0 26px rgba(59, 130, 246, 0.08);
}
.res-head {
display: flex;
align-items: center;
gap: 8px;
padding: 3px 10px;
height: 40px;
box-sizing: border-box;
font-size: 12px;
color: #e2f0ff;
font-weight: 600;
letter-spacing: 0.5px;
background: linear-gradient(180deg, rgba(59, 130, 246, 0.18), rgba(10, 16, 32, 0));
border-bottom: 1px solid rgba(96, 165, 250, 0.25);
text-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}
.res-total {
font-size: 11px;
color: #94a3b8;
}
.res-total b {
color: #60a5fa;
font-family: monospace;
font-size: 14px;
margin: 0 2px;
text-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}
.res-body {
padding: 8px 10px 10px;
}
.res-group {
margin-bottom: 10px;
}
.res-group:last-child {
margin-bottom: 0;
}
.res-group-title {
font-size: 11px;
color: #7dd3fc;
letter-spacing: 0.4px;
margin-bottom: 6px;
padding-left: 8px;
border-left: 2px solid rgba(59, 130, 246, 0.7);
text-shadow: 0 0 8px rgba(59, 130, 246, 0.45);
}
.res-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
gap: 8px;
}
.res-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
padding: 10px 4px 8px;
background: rgba(15, 23, 42, 0.85);
border: 1px solid rgba(96, 165, 250, 0.18);
border-radius: 10px;
transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.06);
}
.res-item:hover {
border-color: rgba(59, 130, 246, 0.7);
box-shadow: 0 0 12px rgba(59, 130, 246, 0.28), inset 0 0 16px rgba(59, 130, 246, 0.1);
transform: translateY(-2px);
}
/* 彩色发光圆点仪表 */
.res-dot {
width: 28px;
height: 28px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
font-weight: bold;
color: #fff;
font-family: sans-serif;
margin-bottom: 4px;
user-select: none;
border: 1px solid rgba(255, 255, 255, 0.35);
box-shadow: 0 0 18px currentColor, inset 0 0 6px rgba(255, 255, 255, 0.3);
}
.res-dot.c-green {
background: linear-gradient(135deg, #34d399, #059669);
color: #a7f3d0;
}
.res-dot.c-cyan {
background: linear-gradient(135deg, #22d3ee, #0891b2);
color: #a5f3fc;
}
.res-dot.c-orange {
background: linear-gradient(135deg, #fb923c, #ea580c);
color: #fed7aa;
}
.res-dot.c-yellow {
background: linear-gradient(135deg, #fbbf24, #d97706);
color: #fef3c7;
}
.res-dot.c-pink {
background: linear-gradient(135deg, #f472b6, #db2777);
color: #fbcfe8;
}
.res-dot.c-red {
background: linear-gradient(135deg, #f87171, #dc2626);
color: #fecaca;
}
.res-dot.c-indigo {
background: linear-gradient(135deg, #818cf8, #4f46e5);
color: #c7d2fe;
}
.res-dot.c-teal {
background: linear-gradient(135deg, #2dd4bf, #0d9488);
color: #99f6e4;
}
.res-dot.c-slate {
background: linear-gradient(135deg, #94a3b8, #475569);
color: #e2e8f0;
}
.res-dot.c-blue {
background: linear-gradient(135deg, #60a5fa, #2563eb);
color: #bfdbfe;
}
.res-dot.c-purple {
background: linear-gradient(135deg, #a78bfa, #7c3aed);
color: #ddd6fe;
}
.res-dot.c-gray {
background: linear-gradient(135deg, #9ca3af, #4b5563);
color: #e5e7eb;
}
.res-label {
font-size: 11px;
color: #94a3b8;
letter-spacing: 0.3px;
}
.res-value {
font-size: 17px;
font-family: monospace;
color: #f0f9ff;
text-shadow: 0 0 8px rgba(59, 130, 246, 0.55);
}
/* ===== 数组属性 ===== */
.array-wrap {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
}
.array-item {
display: flex;
align-items: center;
gap: 4px;
flex-wrap: wrap;
}
.array-idx {
flex: none;
width: 14px;
text-align: right;
font-size: 11px;
color: var(--color-normal-contrast-weakest);
font-family: monospace;
}
.array-more {
font-size: 11px;
color: var(--color-normal-contrast-weakest);
}
/* ===== 引用属性 ===== */
.ref-wrap {
display: inline-flex;
align-items: center;
gap: 6px;
min-width: 0;
}
.ref-name {
font-weight: 600;
max-width: 130px;
}
/* ===== Widget 组件专属布局:3x3 对齐网格 + 边距行(官方编辑器风格) ===== */
.widget-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 4px;
padding: 6px 10px 4px;
}
.wg-cell {
position: relative;
height: 26px;
border: 1px solid var(--color-normal-border);
border-radius: 4px;
cursor: pointer;
background: var(--color-normal-fill-light, #2e2e2e);
color: var(--color-normal-contrast-weakest);
transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.wg-cell:hover {
border-color: var(--color-normal-contrast-weak);
background: rgba(128, 128, 128, 0.14);
}
.wg-cell.on {
background: #3b82f6;
border-color: #3b82f6;
color: #fff;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
/* 九宫格指示:角格显示 L 形折角,边格显示方向线,中心显示圆点 */
.wg-cell::after {
content: '';
position: absolute;
background: currentColor;
pointer-events: none;
}
.wg-cell:nth-child(1)::after,
.wg-cell:nth-child(3)::after,
.wg-cell:nth-child(7)::after,
.wg-cell:nth-child(9)::after {
width: 7px;
height: 7px;
border: 2px solid currentColor;
background: transparent;
}
.wg-cell:nth-child(1)::after {
left: 5px;
top: 5px;
border-right: none;
border-bottom: none;
}
.wg-cell:nth-child(3)::after {
right: 5px;
top: 5px;
border-left: none;
border-bottom: none;
}
.wg-cell:nth-child(7)::after {
left: 5px;
bottom: 5px;
border-right: none;
border-top: none;
}
.wg-cell:nth-child(9)::after {
right: 5px;
bottom: 5px;
border-left: none;
border-top: none;
}
.wg-cell:nth-child(2)::after {
left: 50%;
top: 6px;
width: 10px;
height: 2px;
transform: translateX(-50%);
}
.wg-cell:nth-child(4)::after {
left: 6px;
top: 50%;
width: 2px;
height: 10px;
transform: translateY(-50%);
}
.wg-cell:nth-child(6)::after {
right: 6px;
top: 50%;
width: 2px;
height: 10px;
transform: translateY(-50%);
}
.wg-cell:nth-child(8)::after {
left: 50%;
bottom: 6px;
width: 10px;
height: 2px;
transform: translateX(-50%);
}
.wg-cell:nth-child(5)::after {
left: 50%;
top: 50%;
width: 6px;
height: 6px;
border-radius: 50%;
transform: translate(-50%, -50%);
}
.wg-center {
border-radius: 50%;
}
/* 边距行:左/右、上/下 + Abs 切换 */
.widget-row {
display: grid;
grid-template-columns: 20px 36px minmax(0, 1fr) 20px 36px minmax(0, 1fr);
gap: 6px;
align-items: center;
padding: 2px 10px;
font-size: 12px;
}
.widget-row .k {
color: var(--color-normal-contrast-weakest);
text-align: right;
white-space: nowrap;
overflow: hidden;
}
.widget-row .v-editor {
width: 100%;
min-width: 0;
}
.wg-abs {
height: 22px;
padding: 0 4px;
font-size: 10px;
font-weight: 600;
border: 1px solid var(--color-normal-border);
border-radius: 3px;
background: var(--color-normal-fill-light, #2e2e2e);
color: var(--color-normal-contrast-weak);
cursor: pointer;
transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.wg-abs:hover {
border-color: var(--color-normal-contrast-weak);
}
.wg-abs.on {
background: #3b82f6;
border-color: #3b82f6;
color: #fff;
}
/* ===== 节点选择框(ui-node 风格) ===== */
.ref-wrap {
display: flex;
align-items: center;
gap: 6px;
width: 100%;
min-width: 0;
}
.ref-pick {
display: inline-flex;
align-items: center;
gap: 5px;
flex: 1;
min-width: 0;
height: 24px;
padding: 0 8px;
box-sizing: border-box;
border: 1px solid var(--color-normal-border);
border-radius: 4px;
background: var(--color-normal-fill-light, #2e2e2e);
color: var(--color-normal-contrast-weak);
cursor: pointer;
overflow: hidden;
transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.ref-pick:hover {
border-color: var(--color-primary, #3b82f6);
background: rgba(59, 130, 246, 0.08);
}
.ref-pick.empty {
color: var(--color-normal-contrast-weakest);
font-style: italic;
}
.ref-pick .ref-name {
flex: 1;
min-width: 0;
max-width: none;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ref-pick ui-icon {
flex: none;
opacity: 0.8;
}
/* 组件引用(ui-component 风格):紫色强调 + 组件类型徽章 */
.ref-pick.component {
border-color: rgba(139, 92, 246, 0.45);
}
.ref-pick.component:hover {
border-color: #8b5cf6;
background: rgba(139, 92, 246, 0.1);
}
.ref-pick .ref-type {
flex: none;
font-size: 10px;
line-height: 15px;
color: #c4b5fd;
background: rgba(139, 92, 246, 0.18);
border: 1px solid rgba(139, 92, 246, 0.35);
border-radius: 3px;
padding: 0 5px;
white-space: nowrap;
max-width: 140px;
overflow: hidden;
text-overflow: ellipsis;
}
/* 资产引用(ui-asset 风格):琥珀强调 + 类型徽章,区别于节点/组件 */
.asset-pick {
display: inline-flex;
align-items: center;
gap: 5px;
flex: 1;
min-width: 0;
height: 24px;
padding: 0 8px;
box-sizing: border-box;
border: 1px solid rgba(245, 158, 11, 0.4);
border-radius: 4px;
background: rgba(245, 158, 11, 0.06);
color: var(--color-normal-contrast-weak);
overflow: hidden;
cursor: default;
}
.asset-pick.empty {
color: var(--color-normal-contrast-weakest);
font-style: italic;
}
/* 可点击的资产框(spriteFrame / material 选择):指针 + 悬停琥珀高亮 */
.asset-pick.pick {
cursor: pointer;
}
.asset-pick.pick:hover {
border-color: rgba(245, 158, 11, 0.8);
background: rgba(245, 158, 11, 0.14);
}
.asset-pick .ref-name {
flex: 1;
min-width: 0;
max-width: none;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.asset-pick .asset-type {
flex: none;
font-size: 10px;
line-height: 15px;
color: #fcd34d;
background: rgba(245, 158, 11, 0.15);
border: 1px solid rgba(245, 158, 11, 0.35);
border-radius: 3px;
padding: 0 5px;
white-space: nowrap;
max-width: 140px;
overflow: hidden;
text-overflow: ellipsis;
}
.asset-pick ui-icon {
flex: none;
opacity: 0.85;
}
/* 材质参数展开区 */
.ref-wrap.mat {
flex-wrap: wrap;
}
.mat-props {
flex-basis: 100%;
display: flex;
flex-direction: column;
gap: 4px;
padding: 5px 6px;
border: 1px solid var(--color-normal-border);
border-radius: 4px;
background: rgba(245, 158, 11, 0.04);
}
.mat-prop {
display: grid;
grid-template-columns: 72px minmax(0, 1fr);
gap: 6px;
align-items: center;
font-size: 12px;
min-width: 0;
}
.mat-prop .k {
color: var(--color-normal-contrast-weakest);
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.mat-prop .color-editor {
width: 100%;
min-width: 0;
}
.mat-prop .vec {
width: 100%;
min-width: 0;
}
.asset-pick.tex {
border-style: dashed;
background: transparent;
cursor: default;
}
/* ===== 节点选择弹层 ===== */
.node-picker-mask {
position: fixed;
inset: 0;
z-index: 9999;
background: rgba(0, 0, 0, 0.45);
display: flex;
align-items: center;
justify-content: center;
}
.node-picker {
display: flex;
flex-direction: column;
width: 420px;
max-width: 90vw;
max-height: 70vh;
background: var(--color-normal-fill, #2b2b2b);
border: 1px solid var(--color-normal-border);
border-radius: 6px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
overflow: hidden;
}
.np-head {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 10px;
background: var(--color-normal-fill-light, #3a3a3a);
border-bottom: 1px solid var(--color-normal-border);
}
.np-title {
flex: none;
font-size: 12px;
font-weight: 600;
color: var(--color-normal-contrast-strong, #fff);
}
.np-filter {
flex: 1;
min-width: 0;
}
/* 资产选择弹层:类型筛选下拉 */
.ap-type {
flex: none;
max-width: 150px;
font-size: 12px;
color: var(--color-normal-contrast);
background: var(--color-input-background, #2e2e2e);
border: 1px solid var(--color-normal-border);
border-radius: 4px;
padding: 2px 6px;
outline: none;
}
.np-list {
flex: 1;
overflow-y: auto;
padding: 4px 0;
max-height: 50vh;
}
.np-row {
display: flex;
align-items: center;
gap: 6px;
height: 26px;
padding: 0 8px 0 14px;
font-size: 12px;
cursor: pointer;
white-space: nowrap;
}
.np-row:hover {
background: rgba(59, 130, 246, 0.12);
}
.np-row .np-name {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.np-row .np-type {
flex: none;
font-size: 11px;
color: var(--color-normal-contrast-weakest);
background: var(--color-normal-weak);
border-radius: 3px;
padding: 0 4px;
opacity: 0.85;
}
.np-row ui-icon {
flex: none;
opacity: 0.85;
}
/* select 下拉:占满值列 + 自定义箭头,避免与 label 重叠 */
select.v-editor {
width: 100%;
min-width: 0;
max-width: 100%;
appearance: none;
-webkit-appearance: none;
cursor: pointer;
padding-right: 20px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.5 3.5 5 6.5 7.5 3.5' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 6px center;
background-size: 10px;
}