@realsee/dnalogel 3.44.5 → 3.45.0
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/CHANGELOG.md +3 -0
- package/dist/Sculpt/Meshes/Area.d.ts +1 -1
- package/dist/Sculpt/Meshes/Box.d.ts +1 -1
- package/dist/Sculpt/Meshes/Circle.d.ts +1 -1
- package/dist/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Line.d.ts +2 -1
- package/dist/Sculpt/Meshes/LineWithDots.d.ts +1 -1
- package/dist/Sculpt/Meshes/Point.d.ts +1 -1
- package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Prism.d.ts +1 -1
- package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
- package/dist/Sculpt/Objects/Line/Editor.d.ts +22 -0
- package/dist/Sculpt/Objects/Line/index.d.ts +33 -0
- package/dist/Sculpt/Objects/Point/index.d.ts +1 -1
- package/dist/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
- package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -2
- package/dist/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
- package/dist/Sculpt/Objects/Polyline/index.d.ts +7 -6
- package/dist/Sculpt/index.d.ts +5 -0
- package/dist/Sculpt/typings/index.d.ts +11 -6
- package/dist/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
- package/dist/Sculpt/typings/utils.type.d.ts +2 -0
- package/dist/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
- package/dist/Sculpt/utils/three/rayOnLine.d.ts +3 -5
- package/dist/index.cjs.js +56 -56
- package/dist/index.js +4272 -4171
- package/dist/index.umd.js +45 -45
- package/dist/shared-utils/Utils/WorkUtil.d.ts +6 -6
- package/libs/ModelMakerPlugin/Controller.js +1 -1
- package/libs/ModelMakerPlugin/index.js +1 -1
- package/libs/PanoMeasurePlugin/Components/Controller0.js +1 -1
- package/libs/PanoMeasurePlugin/Components/Controller1.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/index.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +1 -1
- package/libs/PanoMeasurePlugin/index.js +1 -1
- package/libs/Sculpt/Meshes/Area.d.ts +1 -1
- package/libs/Sculpt/Meshes/Box.d.ts +1 -1
- package/libs/Sculpt/Meshes/Box.js +10 -10
- package/libs/Sculpt/Meshes/Circle.d.ts +1 -1
- package/libs/Sculpt/Meshes/Circle.js +1 -1
- package/libs/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Cylinder.js +1 -1
- package/libs/Sculpt/Meshes/Line.d.ts +2 -1
- package/libs/Sculpt/Meshes/Line.js +55 -47
- package/libs/Sculpt/Meshes/LineWithDots.d.ts +1 -1
- package/libs/Sculpt/Meshes/LineWithDots.js +26 -26
- package/libs/Sculpt/Meshes/Point.d.ts +1 -1
- package/libs/Sculpt/Meshes/Point.js +1 -1
- package/libs/Sculpt/Meshes/Polygon.js +1 -1
- package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Prism.d.ts +1 -1
- package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
- package/libs/Sculpt/Objects/Box/index.js +41 -43
- package/libs/Sculpt/Objects/Cylinder/index.js +35 -37
- package/libs/Sculpt/Objects/Line/Editor.d.ts +22 -0
- package/libs/Sculpt/Objects/Line/Editor.js +61 -0
- package/libs/Sculpt/Objects/Line/index.d.ts +33 -0
- package/libs/Sculpt/Objects/Line/index.js +107 -0
- package/libs/Sculpt/Objects/Point/index.d.ts +1 -1
- package/libs/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
- package/libs/Sculpt/Objects/Polygon/Editor.js +5 -5
- package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -2
- package/libs/Sculpt/Objects/Polygon/index.js +80 -80
- package/libs/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
- package/libs/Sculpt/Objects/Polyline/Editor.js +10 -48
- package/libs/Sculpt/Objects/Polyline/index.d.ts +7 -6
- package/libs/Sculpt/Objects/Polyline/index.js +63 -58
- package/libs/Sculpt/Objects/Prism/index.js +56 -58
- package/libs/Sculpt/index.d.ts +5 -0
- package/libs/Sculpt/index.js +58 -48
- package/libs/Sculpt/typings/index.d.ts +11 -6
- package/libs/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
- package/libs/Sculpt/typings/utils.type.d.ts +2 -0
- package/libs/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
- package/libs/Sculpt/utils/three/ColoredMesh.js +1 -1
- package/libs/Sculpt/utils/three/rayOnLine.d.ts +3 -5
- package/libs/Sculpt/utils/three/rayOnLine.js +15 -14
- package/libs/base/BasePlugin.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +3 -2
- package/libs/index.js +128 -126
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.js +23 -23
- package/libs/shared-utils/Utils/WorkUtil.d.ts +6 -6
- package/libs/shared-utils/Utils/WorkUtil.js +8 -7
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +15 -15
- package/package.json +1 -1
- package/dist/Sculpt/typings/SimplifyDeep.d.ts +0 -3
- package/libs/Sculpt/typings/SimplifyDeep.d.ts +0 -3
- /package/libs/Sculpt/{utils/color.js → typings/style.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LineStyle } from '../
|
|
1
|
+
import type { LineStyle } from '../typings/style';
|
|
2
2
|
import type { PointsData } from '../utils/data';
|
|
3
3
|
import type { ColoredMeshStyle } from '../utils/three/ColoredMesh';
|
|
4
4
|
import { PolygonWithEdgeMesh } from './PolygonWithEdge';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IObject3D } from '../../shared-utils/three/IObject3D';
|
|
2
2
|
import { type AnyPositions, type AnyPosition } from '../../shared-utils/positionToVector3';
|
|
3
3
|
import type * as THREE from 'three';
|
|
4
|
-
import type { LineStyle } from '../
|
|
4
|
+
import type { LineStyle } from '../typings/style';
|
|
5
5
|
import { RectangleWithEdgeMesh } from './RectangleWithEdge';
|
|
6
6
|
import { RectangleMesh } from './Rectangle';
|
|
7
7
|
import type { PointsData } from '../utils/data';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { type OcclusionStyle } from '../
|
|
2
|
+
import { type OcclusionStyle } from '../typings/style';
|
|
3
3
|
import ColoredMesh, { type ColoredMeshStyle } from '../utils/three/ColoredMesh';
|
|
4
4
|
import { type AnyPosition } from '../../shared-utils/positionToVector3';
|
|
5
5
|
export type CircleStyle = ColoredMeshStyle & OcclusionStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LineStyle } from '../
|
|
1
|
+
import type { LineStyle } from '../typings/style';
|
|
2
2
|
import { CircleMesh, type CircleData, type CircleStyle } from './Circle';
|
|
3
3
|
export type CircleWithEdgeMeshStyle = CircleStyle & LineStyle;
|
|
4
4
|
export declare class CircleWithEdgeMesh extends CircleMesh {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { type Color, type OcclusionStyle, type LineStyle } from '../
|
|
2
|
+
import { type Color, type OcclusionStyle, type LineStyle } from '../typings/style';
|
|
3
3
|
import { LineGeometry, LineMaterial, THREE_Line2 } from '../../shared-utils/five/FiveLine';
|
|
4
4
|
import { type AnyPositions } from '../../shared-utils/positionToVector3';
|
|
5
5
|
import { IObject3D } from '../../shared-utils/three/IObject3D';
|
|
@@ -28,6 +28,7 @@ export declare class THREE_Line3 extends THREE_Line2 {
|
|
|
28
28
|
export declare class LineMesh extends IObject3D {
|
|
29
29
|
name: string;
|
|
30
30
|
points: THREE.Vector3[];
|
|
31
|
+
get style(): LineMeshStyle;
|
|
31
32
|
get lineWidth(): number;
|
|
32
33
|
get color(): THREE.Color;
|
|
33
34
|
get dashed(): boolean;
|
|
@@ -15,7 +15,7 @@ type Style = LineMeshStyle & {
|
|
|
15
15
|
export declare class LineWithDotsMesh extends LineMesh {
|
|
16
16
|
name: string;
|
|
17
17
|
pointGroup: IObject3D;
|
|
18
|
-
|
|
18
|
+
private _paramsStyle;
|
|
19
19
|
get startPoint(): PointMesh;
|
|
20
20
|
get endPoint(): PointMesh;
|
|
21
21
|
get visiblePointMeshes(): PointMesh[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { type ColorStyle, type OcclusionStyle } from '../
|
|
2
|
+
import { type ColorStyle, type OcclusionStyle } from '../typings/style';
|
|
3
3
|
import { IObject3D } from '../../shared-utils/three/IObject3D';
|
|
4
4
|
import type { PointData } from '../utils/data';
|
|
5
5
|
export type { PointData } from '../utils/data';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AnyPositions } from '../../shared-utils/positionToVector3';
|
|
2
2
|
import { PolylineMesh } from './Polyline';
|
|
3
|
-
import type { LineStyle } from '../
|
|
3
|
+
import type { LineStyle } from '../typings/style';
|
|
4
4
|
import PolygonMesh, { type PolygonData, type PolygonStyle } from './Polygon';
|
|
5
5
|
import * as THREE from 'three';
|
|
6
6
|
export type PolygonWithEdgeMeshStyle = PolygonStyle & LineStyle;
|
|
@@ -2,7 +2,7 @@ import { IObject3D } from '../../shared-utils/three/IObject3D';
|
|
|
2
2
|
import { type AnyPosition, type AnyPositions } from '../../shared-utils/positionToVector3';
|
|
3
3
|
import type { AreaData } from './Area';
|
|
4
4
|
import * as THREE from 'three';
|
|
5
|
-
import type { LineStyle } from '../
|
|
5
|
+
import type { LineStyle } from '../typings/style';
|
|
6
6
|
import type { ColoredMeshStyle } from '../utils/three/ColoredMesh';
|
|
7
7
|
import { PolygonWithEdgeMesh } from './PolygonWithEdge';
|
|
8
8
|
export type PrismStyle = ColoredMeshStyle & LineStyle;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { AnyPositions } from '../../shared-utils/positionToVector3';
|
|
2
2
|
import { RectangleMesh, type RectangleData, type RectangleStyle } from './Rectangle';
|
|
3
3
|
import { PolylineMesh } from './Polyline';
|
|
4
|
-
import type { LineStyle } from '../
|
|
5
|
-
import * as THREE from 'three';
|
|
4
|
+
import type { LineStyle } from '../typings/style';
|
|
6
5
|
export type RectangleWithEdgeMeshStyle = RectangleStyle & LineStyle;
|
|
7
6
|
/**
|
|
8
7
|
* @description: 带边线的矩形
|
|
@@ -10,8 +9,8 @@ export type RectangleWithEdgeMeshStyle = RectangleStyle & LineStyle;
|
|
|
10
9
|
export declare class RectangleWithEdgeMesh extends RectangleMesh {
|
|
11
10
|
name: string;
|
|
12
11
|
get lineWidth(): number;
|
|
13
|
-
get lineColor():
|
|
14
|
-
|
|
12
|
+
get lineColor(): import("three").Color;
|
|
13
|
+
line: PolylineMesh;
|
|
15
14
|
constructor(params?: Partial<RectangleWithEdgeMeshStyle & RectangleData>);
|
|
16
15
|
setPoints(points: AnyPositions): void;
|
|
17
16
|
setStyle(style: Partial<RectangleWithEdgeMeshStyle>): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseEditor } from '../Base/Editor';
|
|
2
|
+
import type { FiveDomEvent } from '../../../shared-utils/five/FiveDomEvents';
|
|
3
|
+
import type { Line } from '.';
|
|
4
|
+
import type * as THREE from 'three';
|
|
5
|
+
import { PointMesh } from '../../Meshes/Point';
|
|
6
|
+
export declare abstract class LineEditorAbstract<OriginObject extends THREE.Object3D = THREE.Object3D> extends BaseEditor<OriginObject> {
|
|
7
|
+
protected draggingPoints: PointMesh[];
|
|
8
|
+
protected get pointMeshes(): PointMesh[];
|
|
9
|
+
abstract get points(): THREE.Vector3[];
|
|
10
|
+
get pointHandles(): PointMesh[];
|
|
11
|
+
constructor(originObject: OriginObject);
|
|
12
|
+
enable(): void;
|
|
13
|
+
disable(): void;
|
|
14
|
+
protected onDragstart: (event: FiveDomEvent) => void;
|
|
15
|
+
protected onDragend: (event: FiveDomEvent) => void;
|
|
16
|
+
protected abstract onDrag(event: FiveDomEvent): void;
|
|
17
|
+
}
|
|
18
|
+
export declare class LineEditor extends LineEditorAbstract<Line> {
|
|
19
|
+
get points(): THREE.Vector3[];
|
|
20
|
+
constructor(originObject: Line);
|
|
21
|
+
protected onDrag: (event: FiveDomEvent) => void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LineMesh, type LineData, type LineMeshStyle } from '../../Meshes/Line';
|
|
2
|
+
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
3
|
+
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
4
|
+
import type { LiteralString } from '../../../typings/utils.type';
|
|
5
|
+
import type { LimitPlaneConfig } from '../../typings/style';
|
|
6
|
+
import { LineWithDotsMesh } from '../../Meshes/LineWithDots';
|
|
7
|
+
export interface LineImportData extends BaseImportData, LineData {
|
|
8
|
+
type: LiteralString<'Line'>;
|
|
9
|
+
style?: Partial<LineMeshStyle>;
|
|
10
|
+
}
|
|
11
|
+
export declare class Line extends BaseObject<LineImportData> {
|
|
12
|
+
readonly type = "Line";
|
|
13
|
+
lineMesh: LineWithDotsMesh;
|
|
14
|
+
get data(): {
|
|
15
|
+
points: [number, number, number][];
|
|
16
|
+
style: {
|
|
17
|
+
lineColor: number;
|
|
18
|
+
lineWidth: number;
|
|
19
|
+
dashed: boolean;
|
|
20
|
+
};
|
|
21
|
+
id: string;
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
constructor(data?: LineImportData, config?: Partial<BaseObjectConfig>);
|
|
25
|
+
highlight(): void;
|
|
26
|
+
unhighlight(): void;
|
|
27
|
+
create(params?: Partial<LineMeshStyle & LimitPlaneConfig>): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @description 绘制线段
|
|
31
|
+
* @param config.limit 限制折线绘制的平面; `xoz` 限制在水平面; `y` 限制垂直面; `none` 不限制;默认 `none`
|
|
32
|
+
*/
|
|
33
|
+
export declare function createLine(lineMesh: LineMesh, pointSelector: PointSelector, config?: Partial<LimitPlaneConfig>): Promise<void>;
|
|
@@ -30,6 +30,6 @@ export declare class Point extends BaseObject<PointImportData> {
|
|
|
30
30
|
/**
|
|
31
31
|
* @description: 创建点
|
|
32
32
|
*/
|
|
33
|
-
create(params?: PointStyle): Promise<void>;
|
|
33
|
+
create(params?: Partial<PointStyle>): Promise<void>;
|
|
34
34
|
}
|
|
35
35
|
export declare function createPoint(pointMesh: PointMesh, pointSelector: PointSelector): Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Polygon } from '.';
|
|
2
2
|
import type { FiveDomEvent } from '../../../shared-utils/five/FiveDomEvents';
|
|
3
|
-
import { LineEditor } from '../Polyline/Editor';
|
|
4
3
|
import * as THREE from 'three';
|
|
5
|
-
|
|
4
|
+
import { LineEditorAbstract } from '../Line/Editor';
|
|
5
|
+
export declare class PolygonEditor extends LineEditorAbstract<Polygon> {
|
|
6
6
|
get points(): THREE.Vector3[];
|
|
7
7
|
constructor(originObject: Polygon);
|
|
8
8
|
protected onDrag: (event: FiveDomEvent) => void;
|
|
@@ -3,6 +3,7 @@ import { AreaMesh, type AreaStyle } from '../../Meshes/Area';
|
|
|
3
3
|
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
4
4
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
5
5
|
import type { PolygonData, PolygonStyle } from '../../Meshes/Polygon';
|
|
6
|
+
import type { LimitPlaneConfig } from '../../typings/style';
|
|
6
7
|
export interface PolygonImportData extends BaseImportData, PolygonData {
|
|
7
8
|
type: LiteralString<'Polygon'>;
|
|
8
9
|
style?: Partial<AreaStyle>;
|
|
@@ -23,6 +24,6 @@ export declare class Polygon extends BaseObject<PolygonImportData> {
|
|
|
23
24
|
constructor(data?: PolygonImportData, config?: Partial<BaseObjectConfig>);
|
|
24
25
|
highlight(): void;
|
|
25
26
|
unhighlight(): void;
|
|
26
|
-
create(params?: Partial<PolygonStyle>): Promise<void>;
|
|
27
|
+
create(params?: Partial<PolygonStyle & LimitPlaneConfig>): Promise<void>;
|
|
27
28
|
}
|
|
28
|
-
export declare function createPolygon(areaMesh: AreaMesh, pointSelector: PointSelector): Promise<void>;
|
|
29
|
+
export declare function createPolygon(areaMesh: AreaMesh, pointSelector: PointSelector, config?: Partial<LimitPlaneConfig>): Promise<void>;
|
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
import { BaseEditor } from '../Base/Editor';
|
|
2
1
|
import type { FiveDomEvent } from '../../../shared-utils/five/FiveDomEvents';
|
|
3
2
|
import type { Polyline } from '.';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
protected draggingPoints: PointMesh[];
|
|
8
|
-
protected get pointMeshes(): PointMesh[];
|
|
9
|
-
abstract get points(): THREE.Vector3[];
|
|
10
|
-
get pointHandles(): PointMesh[];
|
|
11
|
-
constructor(originObject: OriginObject);
|
|
12
|
-
enable(): void;
|
|
13
|
-
disable(): void;
|
|
14
|
-
protected onDragstart: (event: FiveDomEvent) => void;
|
|
15
|
-
protected onDragend: (event: FiveDomEvent) => void;
|
|
16
|
-
protected abstract onDrag(event: FiveDomEvent): void;
|
|
17
|
-
}
|
|
18
|
-
export declare class PolylineEditor extends LineEditor<Polyline> {
|
|
19
|
-
get points(): THREE.Vector3[];
|
|
3
|
+
import { LineEditorAbstract } from '../Line/Editor';
|
|
4
|
+
export declare class PolylineEditor extends LineEditorAbstract<Polyline> {
|
|
5
|
+
get points(): import("three").Vector3[];
|
|
20
6
|
constructor(originObject: Polyline);
|
|
21
7
|
protected onDrag: (event: FiveDomEvent) => void;
|
|
22
8
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Color } from '../../../Object3DHelperPlugin';
|
|
2
1
|
import { PolylineMesh, PolylineWithDotsMesh, type PolylineData, type PolylineStyle } from '../../Meshes/Polyline';
|
|
3
2
|
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
4
3
|
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
5
4
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
5
|
+
import type { LimitPlaneConfig } from '../../typings/style';
|
|
6
6
|
export interface PolylineImportData extends BaseImportData, PolylineData {
|
|
7
7
|
type: LiteralString<'Polyline'>;
|
|
8
8
|
style?: Partial<PolylineStyle>;
|
|
@@ -23,9 +23,10 @@ export declare class Polyline extends BaseObject<PolylineImportData> {
|
|
|
23
23
|
constructor(data?: PolylineImportData, config?: Partial<BaseObjectConfig>);
|
|
24
24
|
highlight(): void;
|
|
25
25
|
unhighlight(): void;
|
|
26
|
-
create(params?:
|
|
27
|
-
color?: Color;
|
|
28
|
-
lineWidth?: number;
|
|
29
|
-
}): Promise<void>;
|
|
26
|
+
create(params?: Partial<PolylineStyle & LimitPlaneConfig>): Promise<void>;
|
|
30
27
|
}
|
|
31
|
-
|
|
28
|
+
/**
|
|
29
|
+
* @description 绘制折线
|
|
30
|
+
* @param config.limit 限制折线绘制的平面; `xoz` 限制在水平面; `y` 限制垂直面; `none` 不限制;默认 `none`
|
|
31
|
+
*/
|
|
32
|
+
export declare function createPolyline(polyLineMesh: PolylineMesh, pointSelector: PointSelector, config?: Partial<LimitPlaneConfig>): Promise<void>;
|
package/dist/Sculpt/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { Circle } from './Objects/Circle';
|
|
|
12
12
|
import { Cylinder } from './Objects/Cylinder';
|
|
13
13
|
import { Box } from './Objects/Box';
|
|
14
14
|
import type { BuiltInData, BuiltInItem, Theme } from './typings';
|
|
15
|
+
import { Line } from './Objects/Line';
|
|
15
16
|
export type { SculptData } from './typings';
|
|
16
17
|
interface Data {
|
|
17
18
|
items: Array<BuiltInData>;
|
|
@@ -125,6 +126,10 @@ export declare class Sculpt extends Subscribe<Event> {
|
|
|
125
126
|
* @description: 开始绘制点
|
|
126
127
|
*/
|
|
127
128
|
createPoint(params?: Parameters<Point['create']>[0]): Promise<Point>;
|
|
129
|
+
/**
|
|
130
|
+
* @description: 开始绘制线段
|
|
131
|
+
*/
|
|
132
|
+
createline(params?: Parameters<Line['create']>[0]): Promise<Line>;
|
|
128
133
|
/**
|
|
129
134
|
* @description: 开始绘制空间折线
|
|
130
135
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { SimplifyDeep } from './SimplifyDeep';
|
|
2
1
|
import type { PartialDeep } from 'type-fest';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { SimplifyDeep } from './utils.type';
|
|
3
|
+
export type { SimplifyDeep };
|
|
5
4
|
import type { Point, PointImportData } from '../Objects/Point';
|
|
5
|
+
import type { Line, LineImportData } from '../Objects/Line';
|
|
6
|
+
import type { Polyline, PolylineImportData } from '../Objects/Polyline';
|
|
6
7
|
import type { Polygon, PolygonImportData } from '../Objects/Polygon';
|
|
7
8
|
import type { Prism, PrismImportData } from '../Objects/Prism';
|
|
8
9
|
import type { Rectangle, RectangleImportData } from '../Objects/Rectangle';
|
|
@@ -10,6 +11,7 @@ import type { Circle, CircleImportData } from '../Objects/Circle';
|
|
|
10
11
|
import type { Cylinder, CylinderImportData } from '../Objects/Cylinder';
|
|
11
12
|
import type { Box, BoxImportData } from '../Objects/Box';
|
|
12
13
|
import type { PointStyle } from '../Meshes/Point';
|
|
14
|
+
import type { LineMeshStyle } from '../Meshes/Line';
|
|
13
15
|
import type { PolylineStyle } from '../Meshes/Polyline';
|
|
14
16
|
import type { PrismStyle } from '../Meshes/Prism';
|
|
15
17
|
import type { RectangleWithEdgeMeshStyle as RectangleStyle } from '../Meshes/RectangleWithEdge';
|
|
@@ -27,8 +29,9 @@ export declare namespace SculptData {
|
|
|
27
29
|
type CylinderData = SimplifyDeep<CylinderImportData>;
|
|
28
30
|
type BoxData = SimplifyDeep<BoxImportData>;
|
|
29
31
|
}
|
|
30
|
-
export type { Polyline, PolylineImportData };
|
|
31
32
|
export type { Point, PointImportData };
|
|
33
|
+
export type { Line, LineImportData };
|
|
34
|
+
export type { Polyline, PolylineImportData };
|
|
32
35
|
export type { Polygon, PolygonImportData };
|
|
33
36
|
export type { Prism, PrismImportData };
|
|
34
37
|
export type { Rectangle, RectangleImportData };
|
|
@@ -36,6 +39,7 @@ export type { Circle, CircleImportData };
|
|
|
36
39
|
export type { Cylinder, CylinderImportData };
|
|
37
40
|
export type { Box, BoxImportData };
|
|
38
41
|
export type { PointStyle };
|
|
42
|
+
export type { LineMeshStyle };
|
|
39
43
|
export type { PolylineStyle };
|
|
40
44
|
export type { PrismStyle };
|
|
41
45
|
export type { RectangleStyle };
|
|
@@ -43,10 +47,11 @@ export type { CircleStyle };
|
|
|
43
47
|
export type { CylinderStyle };
|
|
44
48
|
export type { BoxStyle };
|
|
45
49
|
export type { AreaStyle };
|
|
46
|
-
export type BuiltInData = PolylineImportData | PointImportData | PolygonImportData | PrismImportData | RectangleImportData | CircleImportData | CylinderImportData | BoxImportData;
|
|
47
|
-
export type BuiltInItem = Polyline | Point | Polygon | Prism | Rectangle | Circle | Cylinder | Box;
|
|
50
|
+
export type BuiltInData = PolylineImportData | PointImportData | PolygonImportData | PrismImportData | RectangleImportData | CircleImportData | CylinderImportData | BoxImportData | LineImportData;
|
|
51
|
+
export type BuiltInItem = Polyline | Point | Polygon | Prism | Rectangle | Circle | Cylinder | Box | Line;
|
|
48
52
|
export type Theme = PartialDeep<{
|
|
49
53
|
point: PointStyle;
|
|
54
|
+
line: LineMeshStyle;
|
|
50
55
|
polyline: PolylineStyle;
|
|
51
56
|
polygon: AreaStyle;
|
|
52
57
|
prism: PrismStyle;
|
|
@@ -31,6 +31,13 @@ export type LineWidthStyle = {
|
|
|
31
31
|
*/
|
|
32
32
|
lineWidth?: number;
|
|
33
33
|
};
|
|
34
|
+
export type LimitPlaneConfig = {
|
|
35
|
+
/**
|
|
36
|
+
* @description 限制折线绘制的平面; `xoz` 限制在水平面; `y` 限制垂直面; `none` 不限制
|
|
37
|
+
* @default `none`
|
|
38
|
+
*/
|
|
39
|
+
limit: 'xoz' | 'y' | 'none';
|
|
40
|
+
};
|
|
34
41
|
export type OcclusionStyle = {
|
|
35
42
|
/**
|
|
36
43
|
* @description 是否以一种半透明的方式显示遮挡的部分
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type * as THREE from 'three';
|
|
2
2
|
import type { Merge, UnknownArray } from 'type-fest';
|
|
3
|
+
import type { ConditionalSimplifyDeep } from 'type-fest/source/conditional-simplify';
|
|
3
4
|
import type { IsNull, NonRecursiveType } from 'type-fest/source/internal';
|
|
5
|
+
export type SimplifyDeep<T> = ConditionalSimplifyDeep<T, THREE.Color | THREE.Vector3 | Function | Iterable<unknown>, object>;
|
|
4
6
|
export type ImportDataToExportData<T> = Merge<JsonData<T>, {
|
|
5
7
|
id: string | number;
|
|
6
8
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { type ColorStyle, type OpacityStyle, type OcclusionStyle } from '
|
|
2
|
+
import { type ColorStyle, type OpacityStyle, type OcclusionStyle } from '../../typings/style';
|
|
3
3
|
import { IObject3D } from '../../../shared-utils/three/IObject3D';
|
|
4
4
|
export type ColoredMeshStyle = OpacityStyle & ColorStyle & OcclusionStyle;
|
|
5
5
|
export default class ColoredMesh<TGeometry extends THREE.Geometry | THREE.BufferGeometry = THREE.Geometry | THREE.BufferGeometry> extends IObject3D {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
/**
|
|
3
3
|
* @description: 求射线与线段的交点(交点在线段上)
|
|
4
|
-
* @param {THREE.
|
|
5
|
-
* @param {THREE.
|
|
6
|
-
* @param {
|
|
7
|
-
* @param {boolean} clampToLine 是否限制交点在线段上,默认为true,不限制则可以相交在线段的延长线上
|
|
4
|
+
* @param {THREE.Raycaster} params.ray 射线
|
|
5
|
+
* @param {THREE.Line3} params.line 线段
|
|
6
|
+
* @param {boolean} params.clampToLine `true` 限制交点在线段上, `false` 可以相交在线段的延长线上;默认为`true`
|
|
8
7
|
*/
|
|
9
8
|
export declare function rayOnLine(params: {
|
|
10
|
-
cameraPosition: THREE.Vector3;
|
|
11
9
|
raycaster: THREE.Raycaster;
|
|
12
10
|
line: THREE.Line3;
|
|
13
11
|
clampToLine?: boolean;
|