build-dxf 0.0.18 → 0.0.19-2
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/README.md +30 -0
- package/package.json +1 -3
- package/src/build.d.ts +10 -1
- package/src/build.js +555 -471
- package/src/components/Editor.vue.d.ts +26 -0
- package/src/index.js +3 -2
- package/src/index2.js +373 -3426
- package/src/index3.js +1937 -0
- package/src/pages/Editor.vue.d.ts +2 -0
- package/src/pages/Editor02.vue.d.ts +4 -0
- package/src/selectLocalFile.js +3745 -0
- package/src/utils/CommandManager/CommandFlow.d.ts +23 -0
- package/src/utils/CommandManager/CommandManager.d.ts +59 -0
- package/src/utils/CommandManager/index.d.ts +2 -0
- package/src/utils/ComponentManager/EventDispatcher.d.ts +11 -1
- package/src/utils/DxfSystem/components/Dxf.d.ts +15 -12
- package/src/utils/DxfSystem/components/LineAnalysis.d.ts +1 -20
- package/src/utils/DxfSystem/components/Variable.d.ts +8 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/CommandFlowComponent.d.ts +36 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/Default.d.ts +57 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawDoorLine.d.ts +19 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawLine.d.ts +20 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawWindow.d.ts +25 -0
- package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/PointDrag.d.ts +27 -0
- package/src/utils/DxfSystem/plugin/Editor/components/Editor.d.ts +22 -3
- package/src/utils/DxfSystem/plugin/Editor/components/RenderManager.d.ts +88 -0
- package/src/utils/DxfSystem/plugin/Editor/components/index.d.ts +6 -0
- package/src/utils/DxfSystem/plugin/Editor/pages/EditorTool.vue.d.ts +6 -0
- package/src/utils/DxfSystem/plugin/ModelDataPlugin/components/DxfLineModel.d.ts +7 -3
- package/src/utils/DxfSystem/plugin/ModelDataPlugin/index.d.ts +9 -1
- package/src/utils/DxfSystem/plugin/RenderPlugin/components/DomContainer.d.ts +1 -0
- package/src/utils/DxfSystem/plugin/RenderPlugin/components/DomEventRegister.d.ts +20 -1
- package/src/utils/DxfSystem/plugin/RenderPlugin/components/EventInput.d.ts +74 -0
- package/src/utils/DxfSystem/plugin/RenderPlugin/components/Renderer.d.ts +0 -11
- package/src/utils/DxfSystem/plugin/RenderPlugin/components/index.d.ts +1 -0
- package/src/utils/DxfSystem/plugin/RenderPlugin/index.d.ts +11 -1
- package/src/utils/PointVirtualGrid/index.d.ts +10 -4
- package/src/utils/Quadtree/Box2.d.ts +3 -2
- package/src/utils/Quadtree/LineSegment.d.ts +11 -9
- package/src/utils/Quadtree/Point.d.ts +11 -6
- package/src/utils/Quadtree/Quadtree.d.ts +5 -0
- package/src/utils/Quadtree/Rectangle.d.ts +5 -4
package/README.md
CHANGED
|
@@ -40,6 +40,36 @@ detailsPoint.set("./json/dp8.json")
|
|
|
40
40
|
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
# 浏览器编辑功能使用示例
|
|
44
|
+
```html
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<div class="w-[100vw] h-[100vh]" ref="dom"> </div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<style scoped></style>
|
|
51
|
+
|
|
52
|
+
<script setup lang="ts">
|
|
53
|
+
import data from "../data/d9.json"
|
|
54
|
+
import { createEditor } from "build-dxf"
|
|
55
|
+
import { onMounted, ref } from "vue"
|
|
56
|
+
import * as THREE from "three"
|
|
57
|
+
import "build-dxf/index.css"
|
|
58
|
+
|
|
59
|
+
const dom = ref<HTMLDivElement>()
|
|
60
|
+
|
|
61
|
+
onMounted(async ()=>{
|
|
62
|
+
if(dom.value) {
|
|
63
|
+
const camera = new THREE.OrthographicCamera( -100, 100, 100, -100, 0.1, 1000 )
|
|
64
|
+
const { dxfSystem } = await createEditor( dom.value, camera )
|
|
65
|
+
dxfSystem.Dxf.set( (data as any) )
|
|
66
|
+
dxfSystem.Dxf.lineOffset()
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
</script>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
|
|
43
73
|
|
|
44
74
|
# 浏览器 使用示例
|
|
45
75
|
```html
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "build-dxf",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19-2",
|
|
4
4
|
"description": "线段构建双线墙壁的dxf版本",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -35,8 +35,6 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"clipper-lib": ">=6.4.2",
|
|
37
37
|
"dxf-writer": ">=1.18.4",
|
|
38
|
-
"three-bvh-csg": ">=0.0.17",
|
|
39
|
-
"three-csg-ts": ">=3.2.0",
|
|
40
38
|
"@tweenjs/tween.js": ">=25.0.0",
|
|
41
39
|
"vue": ">=3.0.0",
|
|
42
40
|
"obj2gltf": ">=3.1.6"
|
package/src/build.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import { DxfSystem } from './utils/DxfSystem';
|
|
2
|
+
import * as THREE from "three";
|
|
1
3
|
export * from './utils/DxfSystem';
|
|
2
4
|
export * from './utils/DxfSystem/plugin/ModelDataPlugin';
|
|
3
|
-
|
|
5
|
+
/** 快捷创建编辑器
|
|
6
|
+
* @param dom
|
|
7
|
+
* @param camera
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function createEditor(dom: HTMLDivElement, camera?: THREE.OrthographicCamera): Promise<{
|
|
11
|
+
dxfSystem: DxfSystem;
|
|
12
|
+
}>;
|