|
@@ -58,7 +58,11 @@ export const getSceneApi = async (type: string | undefined, url: string) => {
|
|
|
if (url[0] === "/") {
|
|
|
url = url.substring(1, url.length);
|
|
|
}
|
|
|
- let origin = type ? window.platform.resourceURLS[type] : '';
|
|
|
+ let origin = type
|
|
|
+ ? window.platform.resourceURLS[type]
|
|
|
+ ? window.platform.resourceURLS[type]
|
|
|
+ : type
|
|
|
+ : "";
|
|
|
if (origin[origin.length - 1] !== "/") {
|
|
|
origin = origin + "/";
|
|
|
}
|
|
@@ -209,17 +213,17 @@ export const taggingGets = {
|
|
|
if (!validNum(signage.pos[0]) || !validNum(signage.pos[2])) return;
|
|
|
const getIcon =
|
|
|
signage.icon.indexOf("style-") === 0
|
|
|
- ? getSceneApi(undefined, `./styles/${signage.icon}.svg`).catch((e) => {
|
|
|
- console.error(e)
|
|
|
+ ? getSceneApi("./", `./styles/${signage.icon}.svg`).catch((e) => {
|
|
|
+ console.error(e);
|
|
|
return getSceneApi(
|
|
|
"ossRoot",
|
|
|
`/sdk/images/billboard/${signage.icon}.png`
|
|
|
- )
|
|
|
+ );
|
|
|
})
|
|
|
: getSceneApi("oss", `${prev}/user/${signage.icon}`);
|
|
|
- const q = new Quaternion(...signage.qua)
|
|
|
- const yRotate = new Euler().setFromQuaternion(q, 'XYZ').y + Math.PI
|
|
|
-
|
|
|
+ const q = new Quaternion(...signage.qua);
|
|
|
+ const yRotate = new Euler().setFromQuaternion(q, "XYZ").y + Math.PI;
|
|
|
+
|
|
|
return getIcon
|
|
|
.then((url) => {
|
|
|
tags.push({
|