perf: 优化 UI

This commit is contained in:
richarjiang
2026-04-26 17:18:25 +08:00
parent 1e5017e28e
commit 9d60fa601d
4 changed files with 32 additions and 29 deletions

View File

@@ -980,7 +980,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -176.293,
"x": -233.245,
"y": 120.83,
"z": 0
},

View File

@@ -195,13 +195,16 @@ export class PassModal extends BaseModal {
/**
* 规范化进度值
* 九宫格 Bar 的 Left+Right border = 240pxtotalLength = 925px
* 当 width < 240px 时圆角会畸变,因此 progress > 0 时强制最小值
*/
private _normalizeProgress(progress: number): number {
if (!Number.isFinite(progress)) {
if (!Number.isFinite(progress) || progress <= 0) {
return 0;
}
return Math.max(0, Math.min(1, progress));
const MIN_PROGRESS = 240 / 925;
return Math.max(MIN_PROGRESS, Math.min(1, progress));
}
/**

View File

@@ -2007,7 +2007,7 @@
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_isTrimmedMode": false,
"_useGrayscale": false,
"_atlas": null,
"_id": ""