perf(canvas): 移除低缩放 LOD + 节点去阴影(v3.25.69)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 52s

This commit is contained in:
qiqi committed 2026-11-20 23:04:49 +08:00
1 parent e79095e848
commit 7e544b9e10
12 files changed
+62 -27

No files matched your search

+5 -7
View File
@@ -128,7 +128,7 @@ button { font-family: inherit; }
.iwb-edge-downstream { stroke: var(--iwb-edge-hot); stroke-width: 1.2; opacity: 1; stroke-dasharray: none; }
.iwb-edge-detach { stroke: var(--iwb-err); stroke-width: 2.4; stroke-dasharray: 6 4; }
.iwb-edge-temp { stroke: var(--iwb-edge-hot); stroke-dasharray: 6 4; pointer-events: none; }
.iwb-node { position: absolute; background: var(--iwb-node-bg); border: 1px solid var(--iwb-border); border-top: 1px solid var(--iwb-border); border-radius: var(--iwb-node-radius); box-shadow: 0 2px 12px rgba(0,0,0,0.08); font-size: 12px; color: var(--iwb-text); display: flex; flex-direction: column; cursor: move; contain: layout style; }
.iwb-node { position: absolute; background: var(--iwb-node-bg); border: 1px solid var(--iwb-border); border-top: 1px solid var(--iwb-border); border-radius: var(--iwb-node-radius); box-shadow: none; font-size: 12px; color: var(--iwb-text); display: flex; flex-direction: column; cursor: move; contain: layout style; }
.iwb-node-selected { border-color: var(--iwb-brand); box-shadow: 0 0 0 var(--iwb-node-sel-w) var(--iwb-brand), 0 6px 20px rgba(0,0,0,0.25); }
.iwb-node:hover { z-index: 4; }
.iwb-node input, .iwb-node select, .iwb-node button { cursor: auto; }
@@ -2302,9 +2302,7 @@ html { scrollbar-width: thin; scrollbar-color: var(--iwb-border2) color-mix(in s
/* 画布内大图:paint 隔离 + 不让图片溢出重绘(v3.25.67 性能) */
.iwb-ref-single, .iwb-out-cell-img, .iwb-lod-thumb { contain: paint; }
/* 远视距简化(v3.25.68,借鉴 tldraw 的 LOD):缩放 < 40% 时节点很小,
细边框和投影看不出来却要参与合成/重绘 —— 直接去掉,省下整层重栅格化。 */
.iwb-zoom-far .iwb-node { box-shadow: none; }
.iwb-zoom-far .iwb-node:hover { box-shadow: none; }
.iwb-zoom-far .iwb-node-selected { box-shadow: 0 0 0 var(--iwb-node-sel-w) var(--iwb-brand); }
.iwb-zoom-far .iwb-node-head { opacity: 0; }
/* v3.25.69:低缩放 LOD 已移除(用户反馈跨阈值时卡顿;改由 content-visibility 缩小绘制面) */
/* v3.25.69:屏幕外节点不参与绘制(配合已有视口裁剪,进一步缩小每次重绘的像素面) */
.iwb-node { content-visibility: auto; contain-intrinsic-size: auto 240px; }