|
@@ -4,6 +4,7 @@ import { validNum } from "@/utils/shared";
|
|
|
import { aiIconMap, iconGroups } from "../constant";
|
|
|
import { Euler, MathUtils, Object3D, Quaternion, Vector3 } from "three";
|
|
|
import { getSvgContent, parseSvgContent } from "@/utils/resource";
|
|
|
+import { getIconStyle } from "@/core/components/icon";
|
|
|
|
|
|
export enum SCENE_TYPE {
|
|
|
fuse = "fuse",
|
|
@@ -348,9 +349,8 @@ export const taggingGets = {
|
|
|
} else {
|
|
|
item.rotate = Math.PI / 2;
|
|
|
loadPromises.push(
|
|
|
- getSvgContent(item.url).then((svgContent) => {
|
|
|
- const content = parseSvgContent(svgContent);
|
|
|
- item.position.x += (content.height / content.width * wh) / 2;
|
|
|
+ getIconStyle(item.url, wh, wh).then((style) => {
|
|
|
+ item.position.x += style.height / 2;
|
|
|
}).catch(() => {})
|
|
|
);
|
|
|
}
|