build-dxf 0.0.20-13 → 0.0.20-14

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "build-dxf",
3
- "version": "0.0.20-13",
3
+ "version": "0.0.20-14",
4
4
  "description": "线段构建双线墙壁的dxf版本",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
package/src/index3.js CHANGED
@@ -1231,7 +1231,7 @@ class jn extends T {
1231
1231
  "clear",
1232
1232
  t.addEventListener("pointerPositionChange", () => {
1233
1233
  const { point: d, find: l } = t.renderManager.adsorption(0.05);
1234
- n && s.setPoint(n, d), l ? (o.position.set(d.x, d.y, 0), this.container.add(o), this.domElement.style.cursor = "none", i = d.clone()) : (i = null, o.removeFromParent(), this.domElement.style.cursor = "no-drop");
1234
+ n && s.setPoint(n, d), this.dispatchEvent({ type: "pointerMove", point: d }), l ? (o.position.set(d.x, d.y, 0), this.container.add(o), this.domElement.style.cursor = "none", i = d.clone()) : (i = null, o.removeFromParent(), this.domElement.style.cursor = "no-drop");
1235
1235
  }),
1236
1236
  t.eventInput.addEventListener("codeChange", async () => {
1237
1237
  if (t.eventInput.isKeyDown("mouse_0") && i) {
@@ -1297,7 +1297,7 @@ class Gn extends T {
1297
1297
  let t = null, n = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 16711935 })), o = null;
1298
1298
  this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
1299
1299
  const { point: s, line: a, find: i } = this.editor.renderManager.adsorption();
1300
- i ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
1300
+ this.dispatchEvent({ type: "pointerMove", point: s }), i ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
1301
1301
  })).add(this.eventInput.addEventListener("codeChange", () => {
1302
1302
  this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: o }));
1303
1303
  })), this.addEventRecord("clear").add(() => n.removeFromParent());
@@ -1309,7 +1309,7 @@ class Gn extends T {
1309
1309
  let o = null, s = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 16711935 }));
1310
1310
  this.addEventRecord("clear").add(() => s.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
1311
1311
  const { point: a, find: i, line: d } = this.editor.renderManager.adsorption();
1312
- i && d === n ? (this.domElement.style.cursor = "none", s.position.copy(a), o = a.clone(), this.container.add(s)) : (this.domElement.style.cursor = "no-drop", o = null, s.removeFromParent());
1312
+ this.dispatchEvent({ type: "pointerMove", point: a }), i && d === n ? (this.domElement.style.cursor = "none", s.position.copy(a), o = a.clone(), this.container.add(s)) : (this.domElement.style.cursor = "no-drop", o = null, s.removeFromParent());
1313
1313
  })).add(this.eventInput.addEventListener("codeChange", () => {
1314
1314
  this.eventInput.isKeyDown("mouse_0") && o && e({ line: n, start: t, end: o });
1315
1315
  }));
@@ -1418,7 +1418,7 @@ class ee extends T {
1418
1418
  const o = this.renderManager.quadtree.queryLineSegment(e).filter(({ line: a }) => !(a === e || a.userData.isDoor)).map((a) => a.line), s = e.direction();
1419
1419
  return o.forEach((a) => {
1420
1420
  if (n.has(a)) return !1;
1421
- if (a.length() / e.length() > 1) return;
1421
+ if (a.length() / e.length() > 1 && this.recursion) return;
1422
1422
  const i = a.direction(), d = s.angleBetween(i, "angle"), l = Math.abs(90 - d);
1423
1423
  if (!(l > 20 || l < 1))
1424
1424
  if (this.isTowLineSegmentConnect(e, a)) {
@@ -2282,7 +2282,7 @@ class co extends T {
2282
2282
  let t = null, n = new m.Mesh(new m.SphereGeometry(0.05), new m.MeshBasicMaterial({ color: 16711935 })), o = null;
2283
2283
  this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
2284
2284
  const { point: s, line: a, find: i, mode: d } = this.editor.renderManager.adsorption();
2285
- i && d === "point" ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
2285
+ this.dispatchEvent({ type: "pointerMove", point: s }), i && d === "point" ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
2286
2286
  })).add(this.eventInput.addEventListener("codeChange", () => {
2287
2287
  this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), n.material.color.set(65280), e({ point: t, line: o }));
2288
2288
  })), this.addEventRecord("clear").add(() => n.removeFromParent());
@@ -3,7 +3,11 @@ import { LineSegment } from '../../../../../Quadtree/LineSegment';
3
3
  import { LineUserData } from '../RenderManager';
4
4
  import { CommandFlowComponent } from './CommandFlowComponent';
5
5
  import * as THREE from "three";
6
- export declare class DrawDoorLine extends CommandFlowComponent<{}> {
6
+ export declare class DrawDoorLine extends CommandFlowComponent<{
7
+ pointerMove: {
8
+ point: THREE.Vector3;
9
+ };
10
+ }> {
7
11
  static name: string;
8
12
  container: THREE.Group<THREE.Object3DEventMap>;
9
13
  interruptKeys: string[];
@@ -3,7 +3,11 @@ import { LineSegment } from '../../../../../Quadtree/LineSegment';
3
3
  import { LineUserData } from '../RenderManager';
4
4
  import { ComponentManager } from '../../../../../ComponentManager';
5
5
  import * as THREE from "three";
6
- export declare class DrawWindow extends CommandFlowComponent<{}> {
6
+ export declare class DrawWindow extends CommandFlowComponent<{
7
+ pointerMove: {
8
+ point: THREE.Vector3;
9
+ };
10
+ }> {
7
11
  static name: string;
8
12
  container: THREE.Group<THREE.Object3DEventMap>;
9
13
  interruptKeys: string[];
@@ -0,0 +1,15 @@
1
+ import { CommandFlowComponent } from './CommandFlowComponent';
2
+ import { ComponentManager } from '../../../../../ComponentManager';
3
+ /**
4
+ * 查看线段角度
5
+ */
6
+ export declare class ViewAngle extends CommandFlowComponent<{}> {
7
+ static name: string;
8
+ shortcutKeys: string[];
9
+ static commandName: string;
10
+ onAddFromParent(parent: ComponentManager): void;
11
+ /** 执行完成
12
+ * @param data
13
+ */
14
+ private completed;
15
+ }