build-dxf 0.1.3 → 0.1.5
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/package.json +2 -2
- package/src/build.js +9 -6
- package/src/utils/index.d.ts +1 -0
package/package.json
CHANGED
package/src/build.js
CHANGED
|
@@ -3,6 +3,8 @@ import { EventDispatcher as EventDispatcher$1, DataTextureLoader, HalfFloatType,
|
|
|
3
3
|
import ClipperLib from "clipper-lib";
|
|
4
4
|
import Drawing from "dxf-writer";
|
|
5
5
|
import { OBJExporter } from "three/examples/jsm/exporters/OBJExporter.js";
|
|
6
|
+
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
|
|
7
|
+
import { GLTFExporter } from "three/addons/exporters/GLTFExporter.js";
|
|
6
8
|
import { Brush, Evaluator, SUBTRACTION } from "three-bvh-csg";
|
|
7
9
|
const VITE_OSS_BASEURL = "https://image.cnyang.cn/common-assets/".endsWith("/") ? "https://image.cnyang.cn/common-assets/" : "https://image.cnyang.cn/common-assets//";
|
|
8
10
|
const DEFAULT_WALL_WIDTH = 0.12;
|
|
@@ -8066,17 +8068,17 @@ if (typeof globalThis !== "undefined" && typeof ProgressEvent === "undefined") {
|
|
|
8066
8068
|
}
|
|
8067
8069
|
};
|
|
8068
8070
|
}
|
|
8069
|
-
let gltfLoader;
|
|
8070
|
-
let gltfExporter;
|
|
8071
|
+
let gltfLoader = GLTFExporter;
|
|
8072
|
+
let gltfExporter = GLTFLoader;
|
|
8071
8073
|
let promise;
|
|
8072
8074
|
function GltfInit() {
|
|
8073
8075
|
if (promise) return promise;
|
|
8074
8076
|
promise = new Promise(async (resolve) => {
|
|
8075
8077
|
try {
|
|
8076
|
-
const { GLTFLoader } = await (typeof window !== "undefined" ? import("three/addons/loaders/GLTFLoader.js") : include("node-three-gltf", false));
|
|
8077
|
-
gltfLoader =
|
|
8078
|
-
const { GLTFExporter } = await (typeof window !== "undefined" ? import("three/addons/exporters/GLTFExporter.js") : include("node-three-gltf", false));
|
|
8079
|
-
gltfExporter =
|
|
8078
|
+
const { GLTFLoader: GLTFLoader2 } = await (typeof window !== "undefined" ? import("three/addons/loaders/GLTFLoader.js") : include("node-three-gltf", false));
|
|
8079
|
+
gltfLoader = GLTFLoader2;
|
|
8080
|
+
const { GLTFExporter: GLTFExporter2 } = await (typeof window !== "undefined" ? import("three/addons/exporters/GLTFExporter.js") : include("node-three-gltf", false));
|
|
8081
|
+
gltfExporter = GLTFExporter2;
|
|
8080
8082
|
} catch (error) {
|
|
8081
8083
|
console.error(error);
|
|
8082
8084
|
}
|
|
@@ -8119,6 +8121,7 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
8119
8121
|
PvgList,
|
|
8120
8122
|
Quadtree,
|
|
8121
8123
|
Rectangle,
|
|
8124
|
+
SceneAutoGenerat,
|
|
8122
8125
|
SelectLocalFile,
|
|
8123
8126
|
SetMap,
|
|
8124
8127
|
UndirectedGraph,
|
package/src/utils/index.d.ts
CHANGED