build-dxf 0.0.8 → 0.0.10
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 +21 -3
- package/package.json +24 -6
- package/src/{plugins/ModelDataPlugin/index.js → build.js} +850 -13
- package/src/index.css +1 -0
- package/src/index.d.ts +85 -0
- package/src/index.js +4 -1750
- package/src/index2.js +7361 -0
- package/src/plugins/ModelDataPlugin/index.d.ts +0 -588
- package/src/plugins/RenderPlugin/index.d.ts +0 -588
- package/src/plugins/RenderPlugin/index.js +0 -1184
package/src/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { EventDispatcher as EventDispatcher_2 } from 'three';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import { utilsDxfSystemPluginRenderPlugin } from '@/utils/DxfSystem/plugin/RenderPlugin';
|
|
2
4
|
|
|
3
5
|
declare class Box2 {
|
|
4
6
|
minX: number;
|
|
@@ -133,6 +135,19 @@ declare class ComponentManager<TEventMap extends {} = {}> extends EventDispatche
|
|
|
133
135
|
* @param type
|
|
134
136
|
*/
|
|
135
137
|
findComponentByType<T extends typeof Component>(type: T): InstanceType<T> | null;
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
* @param type
|
|
141
|
+
*/
|
|
142
|
+
findComponentByName(name: string): Component<{}> | null;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare namespace components {
|
|
146
|
+
export {
|
|
147
|
+
WhiteModel,
|
|
148
|
+
DetailsPoint,
|
|
149
|
+
DxfLineModel
|
|
150
|
+
}
|
|
136
151
|
}
|
|
137
152
|
|
|
138
153
|
/**
|
|
@@ -140,6 +155,34 @@ declare class ComponentManager<TEventMap extends {} = {}> extends EventDispatche
|
|
|
140
155
|
*/
|
|
141
156
|
declare type DataItem = [Point, Point, number[], boolean, number];
|
|
142
157
|
|
|
158
|
+
declare class DetailsPoint extends Component<{
|
|
159
|
+
handleSuccess: {
|
|
160
|
+
desPoints: IDesPointItem[];
|
|
161
|
+
};
|
|
162
|
+
}> {
|
|
163
|
+
Dxf: Dxf | null;
|
|
164
|
+
WhiteModel: WhiteModel | null;
|
|
165
|
+
Variable: Variable | null;
|
|
166
|
+
desPoints: IDesPointItem[];
|
|
167
|
+
raylines: [THREE.Vector3, THREE.Vector3][];
|
|
168
|
+
data: any[];
|
|
169
|
+
onAddFromParent(parent: ComponentManager): void;
|
|
170
|
+
/**
|
|
171
|
+
* 设置值
|
|
172
|
+
* @param data
|
|
173
|
+
*/
|
|
174
|
+
set(data: any): Promise<void>;
|
|
175
|
+
/**
|
|
176
|
+
* 设置射线辅助
|
|
177
|
+
*/
|
|
178
|
+
racasterHelper(position: THREE.Vector3, direction: THREE.Vector3, far: number): void;
|
|
179
|
+
private _timer;
|
|
180
|
+
/**
|
|
181
|
+
* 更新模型
|
|
182
|
+
*/
|
|
183
|
+
updateModel(): void;
|
|
184
|
+
}
|
|
185
|
+
|
|
143
186
|
/**
|
|
144
187
|
* 将点云结构转换为DXF格式
|
|
145
188
|
*/
|
|
@@ -252,6 +295,14 @@ declare class Dxf extends Component<{
|
|
|
252
295
|
static createData(pointsGroups: Point[][], sealed?: boolean): OriginalDataItem[];
|
|
253
296
|
}
|
|
254
297
|
|
|
298
|
+
declare class DxfLineModel extends Component {
|
|
299
|
+
private dxfLineModel;
|
|
300
|
+
private dxfDoorsLineModel;
|
|
301
|
+
dxfModelGroup: THREE.Group<THREE.Object3DEventMap>;
|
|
302
|
+
onAddFromParent(parent: ComponentManager): void;
|
|
303
|
+
updateMode(): void;
|
|
304
|
+
}
|
|
305
|
+
|
|
255
306
|
export declare class DxfSystem extends ComponentManager {
|
|
256
307
|
Dxf: Dxf;
|
|
257
308
|
Variable: Variable;
|
|
@@ -297,6 +348,12 @@ declare interface EventTypeMap {
|
|
|
297
348
|
};
|
|
298
349
|
}
|
|
299
350
|
|
|
351
|
+
declare interface IDesPointItem {
|
|
352
|
+
message: string;
|
|
353
|
+
position: THREE.Vector3;
|
|
354
|
+
intersection: THREE.Vector3;
|
|
355
|
+
}
|
|
356
|
+
|
|
300
357
|
/**
|
|
301
358
|
* 非轴对称线段
|
|
302
359
|
*/
|
|
@@ -326,6 +383,17 @@ declare class LineSegment<T = Record<string, any>> {
|
|
|
326
383
|
clone(): LineSegment<Record<string, any>>;
|
|
327
384
|
}
|
|
328
385
|
|
|
386
|
+
export declare function loadRenderPlugin(): Promise<utilsDxfSystemPluginRenderPlugin>;
|
|
387
|
+
|
|
388
|
+
export declare namespace ModelDataPlugin {
|
|
389
|
+
export {
|
|
390
|
+
components,
|
|
391
|
+
ModelDataPlugin_2 as ModelDataPlugin
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
declare function ModelDataPlugin_2(dxfSystem: DxfSystem): void;
|
|
396
|
+
|
|
329
397
|
declare interface OriginalDataItem {
|
|
330
398
|
start: {
|
|
331
399
|
x: number;
|
|
@@ -517,4 +585,21 @@ declare class Variable extends Component<EventType> {
|
|
|
517
585
|
get<KeyT extends keyof EventType>(key: KeyT): this[KeyT] | undefined;
|
|
518
586
|
}
|
|
519
587
|
|
|
588
|
+
declare class WhiteModel extends Component<{
|
|
589
|
+
updateModel: {
|
|
590
|
+
whiteModelGroup: THREE.Group;
|
|
591
|
+
originalWhiteMode: THREE.Group;
|
|
592
|
+
};
|
|
593
|
+
}> {
|
|
594
|
+
Dxf: Dxf | null;
|
|
595
|
+
Variable: Variable | null;
|
|
596
|
+
whiteModelGroup: THREE.Group<THREE.Object3DEventMap>;
|
|
597
|
+
originalWhiteMode: THREE.Group<THREE.Object3DEventMap>;
|
|
598
|
+
onAddFromParent(parent: ComponentManager): void;
|
|
599
|
+
updateModel(): void;
|
|
600
|
+
toOBJ(): Promise<string>;
|
|
601
|
+
toBlob(): Promise<Blob | undefined>;
|
|
602
|
+
download(filename: string): Promise<void>;
|
|
603
|
+
}
|
|
604
|
+
|
|
520
605
|
export { }
|