Merge branch 'main' of 47.107.44.202:xionglijia/18xchat
This commit is contained in:
@@ -16,6 +16,8 @@ import Utils from "db://assets/Scripts/Main/Common/Utils";
|
||||
import { ViewManager } from "db://assets/Scripts/Main/Manager/ViewManager";
|
||||
import { GButton } from "db://assets/Scripts/Main/Common/GButton";
|
||||
import { SceneBgVideoLayer } from "../../../Sub/UI/SceneBgVideoLayer";
|
||||
import { DataManager, DataId } from "../../data/DataManager";
|
||||
import { EnvData } from "../../data/EnvData";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
interface ShowPanelData {
|
||||
@@ -67,8 +69,14 @@ export class ShowPanel extends li_BaseView {
|
||||
}
|
||||
|
||||
show(path: string) {
|
||||
const envData = DataManager.I.getDataById<EnvData>(DataId.Env);
|
||||
if (this.isImg) {
|
||||
ResManager.I.changeBundleSpriteFrame(this.image, path, "Girls", () => {
|
||||
// ResManager.I.changeBundleSpriteFrame(this.image, path, "Girls", () => {
|
||||
// Utils.adjustBgPixelRatio(this.image.node, 3);
|
||||
// });
|
||||
// 加载远程资源
|
||||
let newPath = envData.cdn + "/" + "Girls/" + path + ".png";
|
||||
ResManager.I.changeRemoteSpriteFrame(this.image, newPath, () => {
|
||||
Utils.adjustBgPixelRatio(this.image.node, 3);
|
||||
});
|
||||
} else {
|
||||
@@ -77,11 +85,11 @@ export class ShowPanel extends li_BaseView {
|
||||
const targetSize = this.videoArea
|
||||
? new Size(this.videoArea.width, this.videoArea.height)
|
||||
: new Size(600, 800);
|
||||
|
||||
ResManager.I.changeBundleVideo(
|
||||
// 加载远程资源
|
||||
let newPath = envData.cdn + "/" + "Girls/" + path + ".mp4";
|
||||
ResManager.I.loadRemoteVideo(
|
||||
this.videoPlayer,
|
||||
path,
|
||||
"Girls",
|
||||
newPath,
|
||||
(res: VideoClip) => {
|
||||
// 设置视频大小和位置
|
||||
const uiTransform = this.videoPlayer.node.getComponent(UITransform);
|
||||
|
||||
Reference in New Issue
Block a user