修正主视图长/宽样式,修复外部导入调用时实体缺失问题
This commit is contained in:
parent
37158e7cb1
commit
0db872ec33
@ -32,7 +32,7 @@
|
||||
"fflate": "^0.8.2",
|
||||
"flatbush": "^3.3.0",
|
||||
"js-angusj-clipper": "^1.2.1",
|
||||
"pako": "^2.1.0",
|
||||
"pako": "^1.0.11",
|
||||
"pinia": "^3.0.2",
|
||||
"polylabel": "^1.1.0",
|
||||
"three": "npm:three-cf@^0.122.9",
|
||||
|
@ -24,8 +24,8 @@ importers:
|
||||
specifier: ^1.2.1
|
||||
version: 1.3.1
|
||||
pako:
|
||||
specifier: ^2.1.0
|
||||
version: 2.1.0
|
||||
specifier: ^1.0.11
|
||||
version: 1.0.11
|
||||
pinia:
|
||||
specifier: ^3.0.2
|
||||
version: 3.0.2(typescript@5.7.3)(vue@3.5.13(typescript@5.7.3))
|
||||
@ -706,8 +706,8 @@ packages:
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
hasBin: true
|
||||
|
||||
pako@2.1.0:
|
||||
resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==}
|
||||
pako@1.0.11:
|
||||
resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==}
|
||||
|
||||
path-browserify@1.0.1:
|
||||
resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==}
|
||||
@ -1626,7 +1626,7 @@ snapshots:
|
||||
|
||||
nanoid@3.3.11: {}
|
||||
|
||||
pako@2.1.0: {}
|
||||
pako@1.0.11: {}
|
||||
|
||||
path-browserify@1.0.1: {}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { CADFactory, CADFiler, CADObject, Database, DuplicateRecordCloning, ObjectId, PhysicalMaterialRecord } from "webcad_ue4_api";
|
||||
import { CADFactory, CADFiler, CADObject, Database, DuplicateRecordCloning, Factory, LayerNode, ObjectId, PhysicalMaterialRecord } from "webcad_ue4_api";
|
||||
|
||||
// TODO: Danger: 注意入侵性代码
|
||||
// 疑似是WebCAD中的漏洞,当传入new Database()时,
|
||||
|
@ -10,10 +10,10 @@
|
||||
<label>材质名</label>
|
||||
<input v-model.trim="materialInfo.materialName" type="text" placeholder="材质名" />
|
||||
|
||||
<!-- <CfFlex gap="1em">
|
||||
<CfFlex gap="1em" v-if="debugMode">
|
||||
<button class="btn-success" style="min-width: 110px;" @click="HandleUpload">上传</button>
|
||||
<button class="btn-danger" style="min-width: 110px;" @click="HandleCancel">取消</button>
|
||||
</CfFlex> -->
|
||||
</CfFlex>
|
||||
</div>
|
||||
|
||||
<div class="adjust-section">
|
||||
|
@ -59,8 +59,8 @@ async function HandleUpdateConfig() {
|
||||
<style scoped lang="scss">
|
||||
.material-view
|
||||
{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 100cqw;
|
||||
height: 100cqh;
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
@ -8,8 +8,9 @@ export function ToDeflatedBase64(materialJson: string)
|
||||
|
||||
export function FromDeflateBase64(base64: string) {
|
||||
let binaryString = atob(base64);
|
||||
console.log("Bin", binaryString);
|
||||
// TODO: Danger: 压缩数据有问题,使用fflate或是pako@2.1.0会出现EOF/unknown compression method错误,必须要使用pako@1.0.11才行
|
||||
let data = Pako.inflate(binaryString as any, { to: "string" });
|
||||
// let data = U8ToStr(Deflate(binaryString));
|
||||
console.log("data", data);
|
||||
return data;
|
||||
}
|
@ -7,6 +7,7 @@ import { ConfigureLibOutput, type LibOutputConfig } from './libOutputConfig';
|
||||
import { useEvent } from '../stores/eventStore';
|
||||
import { useScene, useSceneRaw } from '../stores/sceneStore';
|
||||
import { DeflateAsync } from '../helpers/helper.compression';
|
||||
import { CADFactory, Factory, LayerNode } from 'webcad_ue4_api';
|
||||
|
||||
let app: VueApp<Element> = undefined;
|
||||
|
||||
@ -19,6 +20,12 @@ export function Mount(element: Element, options: Partial<LibOutputConfig>) {
|
||||
ConfigureLibOutput(options);
|
||||
|
||||
const pinia = createPinia();
|
||||
|
||||
// TODO: Warn: 有BUG,部分实体的构造函数名带_1后缀,原因未知,这会导致CADFactory在创建实体时找不到注册的类名
|
||||
// @ts-ignore
|
||||
// console.log(CADFactory.factory.objectNameMap); // 为什么Map中的构造函数名带_1后缀?
|
||||
CADFactory.RegisterObjectAlias(LayerNode, "LayerNode");
|
||||
|
||||
app = createApp(App);
|
||||
app.use(pinia)
|
||||
.mount(element);
|
||||
|
Loading…
Reference in New Issue
Block a user