This commit is contained in:
2025-10-13 17:09:39 +08:00
parent 347a7292cc
commit 104e7f566c
9 changed files with 376 additions and 230 deletions
@@ -76,7 +76,14 @@ export class ShowPanel extends li_BaseView {
// 加载远程资源
let newPath = envData.cdn + "/" + "Girls/" + path + ".png";
ResManager.I.changeRemoteSpriteFrame(this.image, newPath, () => {
Utils.adjustBgPixelRatio(this.image.node, 3);
// 固定高度为 1334,等比缩放宽度
const targetHeight = 1334;
const uiTransform = this.image.node.getComponent(UITransform);
if (uiTransform && uiTransform.height > 0) {
const scale = targetHeight / uiTransform.height;
uiTransform.height = targetHeight;
uiTransform.width = uiTransform.width * scale;
}
});
} else {
// 使用自己的 videoPlayer 进行置顶显示