bill před 2 měsíci
rodič
revize
c520b572c8
1 změnil soubory, kde provedl 11 přidání a 7 odebrání
  1. 11 7
      src/example/platform/platform-resource.ts

+ 11 - 7
src/example/platform/platform-resource.ts

@@ -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({