build-dxf 0.0.20-24 → 0.0.20-25
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 +1 -1
- package/src/build.js +413 -412
- package/src/index.css +1 -1
- package/src/index3.js +268 -240
- package/src/selectLocalFile.js +3 -1
- package/src/utils/DxfSystem/components/AngleCorrectionDxf.d.ts +1 -0
- package/src/utils/DxfSystem/components/Dxf.d.ts +1 -1
- package/src/utils/DxfSystem/plugin/Editor/components/Editor.d.ts +4 -1
- package/src/utils/DxfSystem/plugin/RenderPlugin/components/Renderer.d.ts +2 -0
package/src/selectLocalFile.js
CHANGED
|
@@ -29,6 +29,8 @@ class yn extends at {
|
|
|
29
29
|
container = new _.Group();
|
|
30
30
|
onUpdate;
|
|
31
31
|
onResize;
|
|
32
|
+
width = 0;
|
|
33
|
+
height = 0;
|
|
32
34
|
tweenTaskList = [];
|
|
33
35
|
constructor(t) {
|
|
34
36
|
super(), this.description = t;
|
|
@@ -43,7 +45,7 @@ class yn extends at {
|
|
|
43
45
|
const o = this.description.resizeObserver;
|
|
44
46
|
this.resizeObserver = new ResizeObserver(() => {
|
|
45
47
|
const i = this.camera, { width: s, height: l } = o.getBoundingClientRect();
|
|
46
|
-
this.renderer.setSize(s, l), this.html2DRenderer && this.html2DRenderer.setSize(s, l), this.html3DRenderer && this.html3DRenderer.setSize(s, l), this.orbitControls && (i instanceof _.PerspectiveCamera ? i.aspect = s / l : i instanceof _.OrthographicCamera && (i.left = -s * 0.5, i.right = s * 0.5, i.top = l * 0.5, i.bottom = -l * 0.5), i.updateProjectionMatrix()), this.onResize && this.onResize(s, l), this.dispatchEvent({ type: "resize", width: s, height: l });
|
|
48
|
+
this.renderer.setSize(s, l), this.html2DRenderer && this.html2DRenderer.setSize(s, l), this.html3DRenderer && this.html3DRenderer.setSize(s, l), this.orbitControls && (i instanceof _.PerspectiveCamera ? i.aspect = s / l : i instanceof _.OrthographicCamera && (i.left = -s * 0.5, i.right = s * 0.5, i.top = l * 0.5, i.bottom = -l * 0.5), i.updateProjectionMatrix()), this.width = s, this.height = l, this.onResize && this.onResize(s, l), this.dispatchEvent({ type: "resize", width: s, height: l });
|
|
47
49
|
}), this.resizeObserver.observe(o);
|
|
48
50
|
}
|
|
49
51
|
this.renderer.setAnimationLoop(() => {
|
|
@@ -198,7 +198,7 @@ export declare class Dxf<TEventMap extends {} = {}> extends Component<{
|
|
|
198
198
|
*
|
|
199
199
|
* @param type
|
|
200
200
|
*/
|
|
201
|
-
toDxfImageBlob(unit?: Unit, type?: string): Promise<any>;
|
|
201
|
+
toDxfImageBlob(unit?: Unit, type?: string, background?: string): Promise<any>;
|
|
202
202
|
/**
|
|
203
203
|
* 将点json结构转换为Dxf string
|
|
204
204
|
*/
|
|
@@ -5,6 +5,7 @@ import { DomContainer, DomEventRegister, EventInput, Renderer } from '../../Rend
|
|
|
5
5
|
import { RenderManager } from './RenderManager';
|
|
6
6
|
import { CommandManager } from '../../../../CommandManager';
|
|
7
7
|
import { App } from 'vue';
|
|
8
|
+
import { DxfSystem } from '../../../../../build';
|
|
8
9
|
import * as THREE from "three";
|
|
9
10
|
export declare class Editor extends Component<{
|
|
10
11
|
pointerPositionChange: {
|
|
@@ -26,8 +27,10 @@ export declare class Editor extends Component<{
|
|
|
26
27
|
app?: App<Element>;
|
|
27
28
|
domElement: HTMLDivElement;
|
|
28
29
|
viewPermission?: "admin";
|
|
30
|
+
imgEl: HTMLImageElement;
|
|
31
|
+
imgWidth: number;
|
|
29
32
|
constructor(viewPermission?: "admin");
|
|
30
|
-
onAddFromParent(): void;
|
|
33
|
+
onAddFromParent(parent: DxfSystem): void;
|
|
31
34
|
/**
|
|
32
35
|
* 取消命令,由其他命令组件监听事件后注册事件监听实现
|
|
33
36
|
*/
|
|
@@ -46,6 +46,8 @@ export declare class Renderer extends Component<{
|
|
|
46
46
|
container: THREE.Group<THREE.Object3DEventMap>;
|
|
47
47
|
onUpdate?: () => void;
|
|
48
48
|
onResize?: (width: number, height: number) => void;
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
49
51
|
private tweenTaskList;
|
|
50
52
|
constructor(description: RendererDescription);
|
|
51
53
|
/**
|