Revert "perf(render): v3.26.138 边线 SVG 绘制面缩到视口大小(world 层不再被 10000² 撑大)"
This reverts commit d23d203a27.
This commit is contained in:
1 parent
d23d203a27
commit
95abac0730
6 files changed
+5
-28
No files matched your search
@@ -16,15 +16,6 @@
|
||||
> 3. 核验正式地址版本 → 之后才移动 `stable` / `stable-verified-<日期>` 标签、更新本 CHANGELOG、写 GitHub Release(`gh release create`)。
|
||||
> 测试发现问题 → 改 → 再 `deploy:test`,正式环境不受影响。回滚点 `git reset --hard stable`。
|
||||
|
||||
## v3.26.138(2026-11-30)边线绘制面缩到视口大小(graphics 445MB 的下一步)
|
||||
|
||||
137 三组实测:默认 1130MB(WebContent 717 / graphics 445)、禁用毛玻璃 1181MB、+图层提升 1101MB
|
||||
⇒ 毛玻璃与 will-change 都不是主因;去掉边线 SVG 的 translateZ(0) 已把 graphics 从 641 降到 445。
|
||||
剩下的 445MB 来自 world 层的绘制范围仍被 10000x10000 的 SVG 撑着。
|
||||
|
||||
- 边线 SVG 改为「当前视口的世界矩形 + 64px 余量」,`overflow: hidden`,内部 `<g>` 按 -x/-y 平移;
|
||||
屏幕外的边线本来不可见,裁掉不影响显示。
|
||||
|
||||
## v3.26.137(2026-11-30)去掉边线 SVG 的常驻合成层 + 加大视口裁剪边距 + 毛玻璃开关
|
||||
|
||||
136 的 A/B:合成层常驻提升开=1629MB / 关=1242MB(+387MB)⇒ 默认关是对的;但关着 WebContent graphics 仍有 641MB。
|
||||
|
||||
@@ -7513,14 +7513,6 @@ const tbCenterSeed = (type, refs) => {
|
||||
const connecting = !!conn
|
||||
|
||||
const edgeEls = []
|
||||
// 边线绘制面 = 当前视口的世界矩形(+ 一点余量,避免边缘线条被切)
|
||||
const edgeBox = (function () {
|
||||
const sc = (viewport && viewport.scale) || 1
|
||||
const cw = (canvasSize && canvasSize.w) || 1200
|
||||
const ch = (canvasSize && canvasSize.h) || 800
|
||||
const pad = 64 / sc
|
||||
return { x: -((viewport.x || 0) / sc) - pad, y: -((viewport.y || 0) / sc) - pad, w: cw / sc + pad * 2, h: ch / sc + pad * 2 }
|
||||
})()
|
||||
const focusNodeId = sel.length === 1 ? sel[0] : null
|
||||
const edgeGraph = graphCache.index
|
||||
for (const ed of edges) {
|
||||
@@ -8085,13 +8077,7 @@ const tbCenterSeed = (type, refs) => {
|
||||
},
|
||||
// v3.26.137:去掉 translateZ(0)。它把这块 10000×10000 的 SVG 强行提升成常驻合成层,
|
||||
// 实测 graphics 里的大头;overflow:visible 下不提升也照常绘制。
|
||||
el('svg', {
|
||||
className: 'iwb-edges',
|
||||
// v3.26.138:把边线的绘制面缩到**视口大小**。原来是 10000x10000,撑大了整个 world 层的绘制范围
|
||||
// (WebContent graphics 445MB)。世界坐标下取「当前视口矩形」,超出部分本来就在屏幕外,裁掉即可。
|
||||
width: edgeBox.w, height: edgeBox.h,
|
||||
style: { position: 'absolute', left: edgeBox.x, top: edgeBox.y, overflow: 'hidden' },
|
||||
}, el('g', { transform: 'translate(' + (-edgeBox.x) + ',' + (-edgeBox.y) + ')' }, edgeEls)),
|
||||
el('svg', { className: 'iwb-edges', width: 10000, height: 10000, style: { overflow: 'visible' } }, edgeEls),
|
||||
groupEls,
|
||||
nodeEls,
|
||||
),
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "image-workbench-web",
|
||||
"private": true,
|
||||
"version": "3.26.138",
|
||||
"version": "3.26.137",
|
||||
"description": "Browser-based node canvas image workbench",
|
||||
"scripts": {
|
||||
"build": "node scripts/build.js && node scripts/copy-plugins.js",
|
||||
|
||||
Generated
+1
-1
@@ -2014,7 +2014,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "image-workbench"
|
||||
version = "3.26.138"
|
||||
version = "3.26.137"
|
||||
dependencies = [
|
||||
"arboard",
|
||||
"base64 0.22.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "image-workbench"
|
||||
version = "3.26.138"
|
||||
version = "3.26.137"
|
||||
description = "无限画布 · 生图工作台桌面版"
|
||||
authors = ["malongan"]
|
||||
license = ""
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "image-workbench",
|
||||
"version": "3.26.138",
|
||||
"version": "3.26.137",
|
||||
"identifier": "com.malongan.imageworkbench",
|
||||
"build": {
|
||||
"frontendDist": "../dist",
|
||||
|
||||
Reference in new issue
Block a user