新增兼容层,适配WebCAD v16材质版本
This commit is contained in:
1 parent
ae9d88c6d7
commit
fc94b6721a
10 files changed
+516
-29
No files matched your search
@@ -6,7 +6,6 @@ import { createPinia, disposePinia } from 'pinia';
|
||||
import { ConfigureLibOutput, type LibOutputConfig } from './libOutputConfig';
|
||||
import { useEvent } from '../stores/eventStore';
|
||||
import { useScene, useSceneRaw } from '../stores/sceneStore';
|
||||
import { CADFactory, LayerNode, PhysicalMaterialRecord, TextureTableRecord } from 'webcad_ue4_api';
|
||||
import { ToDeflatedBase64 } from '../helpers/helper.material';
|
||||
|
||||
let app: VueApp<Element> = undefined;
|
||||
@@ -21,13 +20,6 @@ export function Mount(element: string | Element, options?: Partial<LibOutputConf
|
||||
|
||||
const pinia = createPinia();
|
||||
|
||||
// TODO: Warn: 有BUG,部分实体的构造函数名带_1后缀,原因未知,这会导致CADFactory在创建实体时找不到注册的类名
|
||||
// @ts-ignore
|
||||
console.log(CADFactory['factory'].objectNameMap); // 为什么Map中的构造函数名带_1后缀?
|
||||
CADFactory.RegisterObjectAlias(LayerNode, "LayerNode");
|
||||
CADFactory.RegisterObjectAlias(TextureTableRecord, "TextureTableRecord");
|
||||
CADFactory.RegisterObjectAlias(PhysicalMaterialRecord, "PhysicalMaterialRecord");
|
||||
|
||||
app = createApp(App);
|
||||
app.use(pinia)
|
||||
.mount(element);
|
||||
|
||||
Reference in new issue
Block a user