decord/stable/source/modules/games/getGameMediaRefURL.tsx
github-actions 528a3dd5ba chore: update source for stable 345.9
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4745.js (118.4 MB)
2026-09-18 20:18:48 +00:00

52 lines
1.5 KiB
TypeScript

// Module ID: 1924
// Function ID: 1925
// Name: getGameMediaRefURL
// Dependencies: [1925, 1396, 1929, 2]
// Exports: default
// Module 1924 (getGameMediaRefURL)
import AvatarUtilsDefault from "AvatarUtils" /* 1396 */;
import ImageProxyUtils from "ImageProxyUtils" /* 1929 */;
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("modules/games/getGameMediaRefURL.tsx");
export default function getGameMediaRefURL(id, type, size) {
if (null == type) {
return null;
} else {
type = type.type;
if ("hash" === type) {
let tmp8 = null;
if (!obj3.isNullOrEmpty(type.value)) {
const obj2 = { id, hash: type.value };
const merged = Object.assign(size);
let gameAssetURL = AvatarUtilsDefault.getGameAssetURL(obj2);
if (gameAssetURL == null) {
gameAssetURL = null;
}
tmp8 = gameAssetURL;
}
return tmp8;
} else if ("url" === type) {
size = undefined;
if (size != null) {
size = size.size;
}
const obj5 = { size, keepAspectRatio: null, format: null };
let keepAspectRatio;
if (size != null) {
keepAspectRatio = size.keepAspectRatio;
}
obj5.keepAspectRatio = keepAspectRatio;
let format;
if (size != null) {
format = size.format;
}
obj5.format = format;
return ImageProxyUtils.getSizedImageAssetURL(type.value, obj5);
} else {
return null;
}
}
};