mxcad 1.0.123 → 1.0.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mxcad.d.ts +13 -1
- package/dist/mxcad.es.js +14 -5
- package/dist/mxcad.umd.js +3 -3
- package/dist/wasm/2d/mxdrawassembly_min.js +648 -645
- package/dist/wasm/2d/mxdrawassembly_min.wasm +0 -0
- package/dist/wasm/2d-st/mxdrawassembly_min.js +642 -639
- package/dist/wasm/2d-st/mxdrawassembly_minst.wasm +0 -0
- package/dist/wasm/3d/mxdraw3d_min.js +12 -7
- package/dist/wasm/3d/mxdraw3d_min.wasm +0 -0
- package/package.json +2 -1
package/dist/mxcad.d.ts
CHANGED
|
@@ -3191,6 +3191,18 @@ export declare class McObject {
|
|
|
3191
3191
|
* 返回当前数据库中设置的绘制颜色,它会自动依据背景色,把黑白色转换。
|
|
3192
3192
|
*/
|
|
3193
3193
|
getCurrentDatabaseDrawColor(): THREE.Color;
|
|
3194
|
+
/**
|
|
3195
|
+
* 回退到上一个命令或标记处
|
|
3196
|
+
*/
|
|
3197
|
+
undo(): void;
|
|
3198
|
+
/**
|
|
3199
|
+
*反回退,重做。
|
|
3200
|
+
*/
|
|
3201
|
+
redo(): void;
|
|
3202
|
+
/**
|
|
3203
|
+
*在当前设置一个回退标记.
|
|
3204
|
+
*/
|
|
3205
|
+
undoMark(): void;
|
|
3194
3206
|
}
|
|
3195
3207
|
/**
|
|
3196
3208
|
* McAppType 类,提供了 MxCAD 的一些基本操作。
|
|
@@ -6289,7 +6301,7 @@ export declare class MdGeBRep {
|
|
|
6289
6301
|
openObjFromUrl(theModelPath: string): MdGeShape;
|
|
6290
6302
|
openGltfFromUrl(theModelPath: string): MdGeShape;
|
|
6291
6303
|
openVrmlFromUrl(theModelPath: string): MdGeShape;
|
|
6292
|
-
openStepFromUrlByOCAF(theModelPath: string):
|
|
6304
|
+
openStepFromUrlByOCAF(theModelPath: string): string;
|
|
6293
6305
|
RemoveAllLights(): void;
|
|
6294
6306
|
AddLight(theLight: MdGeLight): void;
|
|
6295
6307
|
EnableAllLights(): void;
|
package/dist/mxcad.es.js
CHANGED
|
@@ -2724,6 +2724,15 @@ class ii {
|
|
|
2724
2724
|
let s = new THREE.Color();
|
|
2725
2725
|
return s.setRGB(r / 255, n / 255, C / 255), s;
|
|
2726
2726
|
}
|
|
2727
|
+
undo() {
|
|
2728
|
+
this.imp.undo(), this.updateDisplay(!1);
|
|
2729
|
+
}
|
|
2730
|
+
redo() {
|
|
2731
|
+
this.imp.redo(), this.updateDisplay();
|
|
2732
|
+
}
|
|
2733
|
+
undoMark() {
|
|
2734
|
+
this.imp.undoMark();
|
|
2735
|
+
}
|
|
2727
2736
|
}
|
|
2728
2737
|
class Vi {
|
|
2729
2738
|
imp;
|
|
@@ -2811,7 +2820,7 @@ class Wi {
|
|
|
2811
2820
|
return _.decodeFromGb2312(e);
|
|
2812
2821
|
}
|
|
2813
2822
|
}
|
|
2814
|
-
const ri = "1.0.
|
|
2823
|
+
const ri = "1.0.125", cn = "SharedArrayBuffer" in window, St = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src), mn = (i, e = self.location.href) => St ? `https://unpkg.com/mxcad@${ri}/dist/wasm/2d-st/${i}` : e + i, hn = (i, e = self.location.href) => St ? `https://unpkg.com/mxcad@${ri}/dist/wasm/2d/${i}` : e + i, dn = (i, e = self.location.href) => St ? `https://unpkg.com/mxcad@${ri}/dist/wasm/3d/${i}` : e + i, Hi = (i) => new Promise((e, t) => {
|
|
2815
2824
|
const r = document.createElement("script");
|
|
2816
2825
|
r.src = i, r.type = "text/javascript", r.crossOrigin = "anonymous", document.body.appendChild(r), r.onload = () => {
|
|
2817
2826
|
e();
|
|
@@ -4809,7 +4818,7 @@ const yt = (...i) => {
|
|
|
4809
4818
|
let e = new Te();
|
|
4810
4819
|
return Ei(e, ...i), e;
|
|
4811
4820
|
}, Ei = (i, ...e) => {
|
|
4812
|
-
const t = (n) => n.length > 1 || typeof n[0] == "object" && n[0].isColor || typeof n[0] == "string" || typeof n[0] == "number", r = (n) => typeof n[0] == "object" && !n[0]
|
|
4821
|
+
const t = (n) => n.length > 1 || typeof n[0] == "object" && n[0].isColor || typeof n[0] == "string" || typeof n[0] == "number", r = (n) => typeof n[0] == "object" && !(n[0] && n[0].isColor);
|
|
4813
4822
|
if (t(e)) {
|
|
4814
4823
|
const { r: n, g: C, b: s } = yt(...e);
|
|
4815
4824
|
i.red = n * 255, i.green = C * 255, i.blue = s * 255;
|
|
@@ -6058,7 +6067,7 @@ class Qe {
|
|
|
6058
6067
|
canvas;
|
|
6059
6068
|
constructor(e) {
|
|
6060
6069
|
const t = () => {
|
|
6061
|
-
const A = this.canvas.parentElement
|
|
6070
|
+
const A = this.canvas.parentElement ? this.canvas.parentElement.clientWidth : window.innerWidth, a = this.canvas.parentElement ? this.canvas.parentElement.clientHeight : window.innerHeight;
|
|
6062
6071
|
let l = Math.min(A, window.screen.availWidth), p = Math.min(a, window.screen.availHeight);
|
|
6063
6072
|
l = Math.max(C, l), p = Math.max(s, p), this.canvas.style.width = l + 1 + "px", this.canvas.style.height = p + "px";
|
|
6064
6073
|
const h = window.devicePixelRatio || 1;
|
|
@@ -6305,7 +6314,7 @@ class be extends c {
|
|
|
6305
6314
|
}
|
|
6306
6315
|
class j extends c {
|
|
6307
6316
|
constructor(e, t) {
|
|
6308
|
-
arguments.length == 0 ? (super(), this.initTempObject(new o.MdGeEdge())) : e instanceof w && arguments.length == 2 ? (super(), this.initTempObject(new o.MdGeEdge(e.getImp(), t
|
|
6317
|
+
arguments.length == 0 ? (super(), this.initTempObject(new o.MdGeEdge())) : e instanceof w && arguments.length == 2 ? (super(), this.initTempObject(new o.MdGeEdge(e.getImp(), t && t.getImp()))) : e instanceof Object && arguments.length == 1 && super(e);
|
|
6309
6318
|
}
|
|
6310
6319
|
Wire() {
|
|
6311
6320
|
return new V(this.imp.Wire());
|
|
@@ -10123,7 +10132,7 @@ class qt {
|
|
|
10123
10132
|
return new c(this.imp.openVrmlFromUrl(e));
|
|
10124
10133
|
}
|
|
10125
10134
|
openStepFromUrlByOCAF(e) {
|
|
10126
|
-
this.imp.openStepFromUrlByOCAF(e);
|
|
10135
|
+
return this.imp.openStepFromUrlByOCAF(e);
|
|
10127
10136
|
}
|
|
10128
10137
|
RemoveAllLights() {
|
|
10129
10138
|
this.imp.RemoveAllLights();
|