@realsee/dnalogel 3.47.8 → 3.47.9
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/Rectangle.d.ts +0 -1
- package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +9 -0
- package/dist/Sculpt/Objects/Line/index.d.ts +3 -3
- package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -3
- package/dist/Sculpt/Objects/Polyline/index.d.ts +3 -3
- package/dist/Sculpt/Objects/Rectangle/index.d.ts +6 -2
- package/dist/Sculpt/typings/style.d.ts +8 -1
- package/dist/index.cjs.js +32 -32
- package/dist/index.js +1453 -1436
- package/dist/index.umd.js +33 -33
- package/dist/shared-utils/tag.d.ts +5 -0
- package/libs/AreaMakerPlugin/Controller.js +1 -1
- package/libs/AreaMakerPlugin/index.js +1 -1
- package/libs/AreaMakerPlugin/utils/Item.js +1 -1
- package/libs/CSS3DRenderPlugin/Controller.js +1 -1
- package/libs/CSS3DRenderPlugin/index.js +1 -1
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +1 -1
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +1 -1
- package/libs/CruisePlugin/BaseController.js +1 -1
- package/libs/CruisePlugin/Move.js +1 -1
- package/libs/CruisePlugin/Work.js +1 -1
- package/libs/CruisePlugin/index.js +1 -1
- package/libs/CurrentPanoImagePlugin/Controller.js +1 -1
- package/libs/CurrentPanoImagePlugin/index.js +1 -1
- package/libs/GuideLinePlugin/Controller.js +1 -1
- package/libs/GuideLinePlugin/GuideLineItem.js +1 -1
- package/libs/GuideLinePlugin/GuideLineModeItem.js +1 -1
- package/libs/GuideLinePlugin/index.js +1 -1
- package/libs/ModelMakerPlugin/Controller.js +1 -1
- package/libs/ModelMakerPlugin/index.js +1 -1
- package/libs/ModelMakerPlugin/item/baseItem.js +1 -1
- package/libs/ModelMakerPlugin/item/boxItem.js +1 -1
- package/libs/ModelMakerPlugin/item/polygonItem.js +1 -1
- package/libs/ModelMakerPlugin/item/prismItem.js +1 -1
- package/libs/ModelTVVideoPlugin/Plugin.js +1 -1
- package/libs/ModelTVVideoPlugin/index.js +1 -1
- package/libs/Object3DHelperPlugin/Controller.js +1 -1
- package/libs/Object3DHelperPlugin/index.js +1 -1
- package/libs/PanoCompassPlugin/Controller.js +1 -1
- package/libs/PanoCompassPlugin/index.js +1 -1
- package/libs/PanoDoorLabelPlugin/BaseController.js +1 -1
- package/libs/PanoDoorLabelPlugin/Controller.js +1 -1
- package/libs/PanoDoorLabelPlugin/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/WatchController.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/index.js +1 -1
- package/libs/PanoMeasurePlugin/Model/area.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +1 -1
- package/libs/PanoMeasurePlugin/index.js +1 -1
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +1 -1
- package/libs/PanoSpatialTagPlugin/Plugin.js +1 -1
- package/libs/PanoSpatialTagPlugin/index.js +1 -1
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +1 -1
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +1 -1
- package/libs/PanoTagPlugin/Components/Tag/index.js +1 -1
- package/libs/PanoTagPlugin/Components/TagContainer.js +1 -1
- package/libs/PanoTagPlugin/Components/TagItem.js +1 -1
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +1 -1
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +1 -1
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +1 -1
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +1 -1
- package/libs/PanoTagPlugin/controller/TagRender.js +1 -1
- package/libs/PanoTagPlugin/controller/TagUtil.js +1 -1
- package/libs/PanoTagPlugin/controller/index.js +1 -1
- package/libs/PanoTagPlugin/index.js +1 -1
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +1 -1
- package/libs/PanoVideoPlugin/Controller.js +1 -1
- package/libs/PanoVideoPlugin/VideoMeshController.js +1 -1
- package/libs/PanoVideoPlugin/index.js +1 -1
- package/libs/PipelinePlugin/Controller.js +1 -1
- package/libs/PipelinePlugin/index.js +1 -1
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +1 -1
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +1 -1
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +1 -1
- package/libs/Sculpt/Meshes/Box.js +10 -10
- package/libs/Sculpt/Meshes/Line.js +18 -15
- package/libs/Sculpt/Meshes/Rectangle.d.ts +0 -1
- package/libs/Sculpt/Meshes/Rectangle.js +14 -17
- package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +9 -0
- package/libs/Sculpt/Meshes/RectangleWithEdge.js +29 -19
- package/libs/Sculpt/Objects/Line/index.d.ts +3 -3
- package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -3
- package/libs/Sculpt/Objects/Polyline/index.d.ts +3 -3
- package/libs/Sculpt/Objects/Rectangle/index.d.ts +6 -2
- package/libs/Sculpt/Objects/Rectangle/index.js +77 -67
- package/libs/Sculpt/typings/style.d.ts +8 -1
- package/libs/Sculpt/utils/Meshes/getLengthHTML.js +2 -2
- package/libs/Sculpt/utils/three/RectangleGeometry.js +1 -1
- package/libs/base/BasePlugin.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -1
- package/libs/index.js +1 -1
- package/libs/shared-utils/five/vector3ToScreen.js +5 -7
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +5 -0
- package/libs/shared-utils/tag.js +31 -26
- package/package.json +1 -1
- /package/dist/shared-utils/three/{raycaster.d.ts → temp.d.ts} +0 -0
- /package/libs/shared-utils/three/{raycaster.d.ts → temp.d.ts} +0 -0
- /package/libs/shared-utils/three/{raycaster.js → temp.js} +0 -0
|
@@ -1,26 +1,36 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var h = Object.getOwnPropertySymbols;
|
|
3
3
|
var u = Object.prototype.hasOwnProperty, c = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var n = (e, i, t) => i in e ? y(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, l = (e, i) => {
|
|
5
|
+
for (var t in i || (i = {}))
|
|
6
|
+
u.call(i, t) && n(e, t, i[t]);
|
|
7
|
+
if (h)
|
|
8
|
+
for (var t of h(i))
|
|
9
|
+
c.call(i, t) && n(e, t, i[t]);
|
|
10
|
+
return e;
|
|
11
|
+
};
|
|
12
|
+
var p = (e, i) => {
|
|
6
13
|
var t = {};
|
|
7
|
-
for (var
|
|
8
|
-
u.call(e,
|
|
9
|
-
if (e != null &&
|
|
10
|
-
for (var
|
|
11
|
-
|
|
14
|
+
for (var s in e)
|
|
15
|
+
u.call(e, s) && i.indexOf(s) < 0 && (t[s] = e[s]);
|
|
16
|
+
if (e != null && h)
|
|
17
|
+
for (var s of h(e))
|
|
18
|
+
i.indexOf(s) < 0 && c.call(e, s) && (t[s] = e[s]);
|
|
12
19
|
return t;
|
|
13
20
|
};
|
|
14
|
-
var
|
|
15
|
-
import { RectangleMesh as
|
|
21
|
+
var o = (e, i, t) => (n(e, typeof i != "symbol" ? i + "" : i, t), t);
|
|
22
|
+
import { RectangleMesh as d } from "./Rectangle.js";
|
|
16
23
|
import { PolylineMesh as f } from "./Polyline.js";
|
|
17
|
-
class
|
|
24
|
+
class W extends d {
|
|
18
25
|
constructor(t) {
|
|
19
|
-
const
|
|
26
|
+
const r = t != null ? t : {}, { points: s } = r, g = p(r, ["points"]);
|
|
20
27
|
super();
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
o(this, "name", "RectangleWithEdgeMesh");
|
|
29
|
+
o(this, "line", new f());
|
|
30
|
+
s && this.setPoints(s), g && this.setStyle(g);
|
|
31
|
+
}
|
|
32
|
+
get style() {
|
|
33
|
+
return l(l({}, super.style), this.line.style);
|
|
24
34
|
}
|
|
25
35
|
get lineWidth() {
|
|
26
36
|
return this.line.lineWidth;
|
|
@@ -30,8 +40,8 @@ class S extends p {
|
|
|
30
40
|
}
|
|
31
41
|
setPoints(t) {
|
|
32
42
|
if (super.setPoints(t), this.points) {
|
|
33
|
-
const
|
|
34
|
-
this.line.setPoints([
|
|
43
|
+
const s = this.points;
|
|
44
|
+
this.line.setPoints([s[0], s[1], s[2], s[3], s[0]]), this.addIfNotExists(this.line);
|
|
35
45
|
}
|
|
36
46
|
}
|
|
37
47
|
setStyle(t) {
|
|
@@ -45,5 +55,5 @@ class S extends p {
|
|
|
45
55
|
}
|
|
46
56
|
}
|
|
47
57
|
export {
|
|
48
|
-
|
|
58
|
+
W as RectangleWithEdgeMesh
|
|
49
59
|
};
|
|
@@ -2,7 +2,7 @@ import { LineMesh, type LineData, type LineMeshStyle } from '../../Meshes/Line';
|
|
|
2
2
|
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
3
3
|
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
4
4
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
5
|
-
import type {
|
|
5
|
+
import type { CreateLimitConfig } from '../../typings/style';
|
|
6
6
|
import { LineWithDotsMesh } from '../../Meshes/LineWithDots';
|
|
7
7
|
export interface LineImportData extends BaseImportData, LineData {
|
|
8
8
|
type: LiteralString<'Line'>;
|
|
@@ -24,10 +24,10 @@ export declare class Line extends BaseObject<LineImportData> {
|
|
|
24
24
|
constructor(data?: LineImportData, config?: Partial<BaseObjectConfig>);
|
|
25
25
|
highlight(): void;
|
|
26
26
|
unhighlight(): void;
|
|
27
|
-
create(params?: Partial<LineMeshStyle &
|
|
27
|
+
create(params?: Partial<LineMeshStyle & CreateLimitConfig>): Promise<void>;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* @description 绘制线段
|
|
31
31
|
* @param config.limit 限制折线绘制的平面; `xoz` 限制在水平面; `y` 限制垂直面; `none` 不限制;默认 `none`
|
|
32
32
|
*/
|
|
33
|
-
export declare function createLine(lineMesh: LineMesh, pointSelector: PointSelector, config?: Partial<
|
|
33
|
+
export declare function createLine(lineMesh: LineMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig>): Promise<void>;
|
|
@@ -3,7 +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 {
|
|
6
|
+
import type { CreateLimitConfig } from '../../typings/style';
|
|
7
7
|
export interface PolygonImportData extends BaseImportData, PolygonData {
|
|
8
8
|
type: LiteralString<'Polygon'>;
|
|
9
9
|
style?: Partial<AreaStyle>;
|
|
@@ -24,6 +24,6 @@ export declare class Polygon extends BaseObject<PolygonImportData> {
|
|
|
24
24
|
constructor(data?: PolygonImportData, config?: Partial<BaseObjectConfig>);
|
|
25
25
|
highlight(): void;
|
|
26
26
|
unhighlight(): void;
|
|
27
|
-
create(params?: Partial<PolygonStyle &
|
|
27
|
+
create(params?: Partial<PolygonStyle & CreateLimitConfig>): Promise<void>;
|
|
28
28
|
}
|
|
29
|
-
export declare function createPolygon(areaMesh: AreaMesh, pointSelector: PointSelector, config?: Partial<
|
|
29
|
+
export declare function createPolygon(areaMesh: AreaMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig>): Promise<void>;
|
|
@@ -2,7 +2,7 @@ import { PolylineMesh, PolylineWithDotsMesh, type PolylineData, type PolylineSty
|
|
|
2
2
|
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
3
3
|
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
4
4
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
5
|
-
import type {
|
|
5
|
+
import type { CreateLimitConfig } from '../../typings/style';
|
|
6
6
|
export interface PolylineImportData extends BaseImportData, PolylineData {
|
|
7
7
|
type: LiteralString<'Polyline'>;
|
|
8
8
|
style?: Partial<PolylineStyle>;
|
|
@@ -23,10 +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?: Partial<PolylineStyle &
|
|
26
|
+
create(params?: Partial<PolylineStyle & CreateLimitConfig>): Promise<void>;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* @description 绘制折线
|
|
30
30
|
* @param config.limit 限制折线绘制的平面; `xoz` 限制在水平面; `y` 限制垂直面; `none` 不限制;默认 `none`
|
|
31
31
|
*/
|
|
32
|
-
export declare function createPolyline(polyLineMesh: PolylineMesh, pointSelector: PointSelector, config?: Partial<
|
|
32
|
+
export declare function createPolyline(polyLineMesh: PolylineMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig>): Promise<void>;
|
|
@@ -4,6 +4,7 @@ import type { ArrayPosition } from '../../../PanoTagPlugin';
|
|
|
4
4
|
import type { RectangleData, RectangleMesh } from '../../Meshes/Rectangle';
|
|
5
5
|
import { RectangleWithEdgeMesh, type RectangleWithEdgeMeshStyle } from '../../Meshes/RectangleWithEdge';
|
|
6
6
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
7
|
+
import type { DrawMethodConfig, CreateLimitConfig } from '../../typings/style';
|
|
7
8
|
export interface RectangleImportData extends BaseImportData, RectangleData {
|
|
8
9
|
type: LiteralString<'Rectangle'>;
|
|
9
10
|
style?: Partial<RectangleWithEdgeMeshStyle>;
|
|
@@ -24,6 +25,9 @@ export declare class Rectangle extends BaseObject<RectangleImportData> {
|
|
|
24
25
|
constructor(data?: RectangleImportData, config?: Partial<BaseObjectConfig>);
|
|
25
26
|
highlight(): void;
|
|
26
27
|
unhighlight(): void;
|
|
27
|
-
create(
|
|
28
|
+
create(config?: Partial<RectangleWithEdgeMeshStyle & CreateLimitConfig & DrawMethodConfig>): Promise<void>;
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
+
/**
|
|
31
|
+
* @description 创建矩形
|
|
32
|
+
*/
|
|
33
|
+
export declare function createRectangle(rectangleMesh: RectangleMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig & DrawMethodConfig>): Promise<void>;
|
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var O = Object.defineProperty, U = Object.defineProperties;
|
|
2
|
+
var k = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var H = Object.getOwnPropertySymbols;
|
|
4
|
+
var B = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var b = (s, t, e) => t in s ? O(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, d = (s, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
7
|
+
B.call(t, e) && b(s, e, t[e]);
|
|
8
|
+
if (H)
|
|
9
|
+
for (var e of H(t))
|
|
10
|
+
I.call(t, e) && b(s, e, t[e]);
|
|
11
|
+
return s;
|
|
12
|
+
}, u = (s, t) => U(s, k(t));
|
|
13
|
+
var M = (s, t, e) => (b(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var L = (s, t, e) => new Promise((h, f) => {
|
|
15
|
+
var r = (o) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
m(e.next(o));
|
|
18
|
+
} catch (c) {
|
|
19
|
+
f(c);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, w = (o) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
m(e.throw(o));
|
|
24
|
+
} catch (c) {
|
|
25
|
+
f(c);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, m = (o) => o.done ? h(o.value) : Promise.resolve(o.value).then(r, w);
|
|
28
|
+
m((e = e.apply(s, t)).next());
|
|
29
29
|
});
|
|
30
|
-
import { hotkeys as
|
|
31
|
-
import { BaseObject as
|
|
32
|
-
import * as
|
|
33
|
-
import { PolylineWithDotsMesh as
|
|
34
|
-
import { RectangleEditor as
|
|
35
|
-
import { RectangleWithEdgeMesh as
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
import { hotkeys as _ } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
31
|
+
import { BaseObject as j } from "../Base/index.js";
|
|
32
|
+
import * as l from "three";
|
|
33
|
+
import { PolylineWithDotsMesh as E } from "../../Meshes/Polyline.js";
|
|
34
|
+
import { RectangleEditor as q } from "./Editor.js";
|
|
35
|
+
import { RectangleWithEdgeMesh as T } from "../../Meshes/RectangleWithEdge.js";
|
|
36
|
+
const G = new l.Vector3();
|
|
37
|
+
class S extends j {
|
|
38
|
+
constructor(e, h) {
|
|
39
|
+
super(e, h);
|
|
40
|
+
M(this, "type", "Rectangle");
|
|
41
|
+
M(this, "rectangleMesh");
|
|
42
|
+
this.config.canEdit && (this.editor = new q(this)), e && (this.rectangleMesh = new T(d(d({}, e.style), e)), this.add(this.rectangleMesh)), _("esc", () => {
|
|
42
43
|
this.stopCreating();
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
46
|
get data() {
|
|
46
|
-
return
|
|
47
|
+
return u(d({}, this.baseData), {
|
|
47
48
|
points: this.rectangleMesh.builtPoints.map((e) => e.toArray()),
|
|
48
49
|
style: {
|
|
49
50
|
color: this.rectangleMesh.color.getHex(),
|
|
@@ -61,45 +62,54 @@ class K extends k {
|
|
|
61
62
|
(e = this.rectangleMesh) == null || e.unhighlight();
|
|
62
63
|
}
|
|
63
64
|
create(e) {
|
|
64
|
-
return
|
|
65
|
+
return L(this, null, function* () {
|
|
65
66
|
this.removeChildren();
|
|
66
|
-
const
|
|
67
|
-
this.rectangleMesh =
|
|
67
|
+
const h = new T(e);
|
|
68
|
+
this.rectangleMesh = h, this.add(this.rectangleMesh), yield J(this.rectangleMesh, this.pointSelector), this.editor.enable();
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
-
return new Promise((
|
|
73
|
-
var
|
|
74
|
-
const r =
|
|
75
|
-
if (!r)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
72
|
+
function J(s, t, e) {
|
|
73
|
+
return new Promise((h, f) => {
|
|
74
|
+
var W, z;
|
|
75
|
+
const r = s.parent;
|
|
76
|
+
if (!r)
|
|
77
|
+
return f(new Error("No container"));
|
|
78
|
+
const w = (W = e == null ? void 0 : e.limit) != null ? W : "none", m = (z = e == null ? void 0 : e.drawMethod) != null ? z : "diagonal", o = new E(u(d({}, s.style), { dashed: !0, lengthEnable: !1 })), c = new E(u(d({}, s.style), { dashed: !0, lengthEnable: !1 })), y = new E(u(d({}, s.style), { dashed: !1, lengthEnable: !1 }));
|
|
79
|
+
r.add(o, y, c), t.enable();
|
|
80
|
+
const n = [];
|
|
81
|
+
let a = new l.Vector3(), v = new l.Vector3();
|
|
82
|
+
const g = new l.Plane(), C = () => {
|
|
83
|
+
n.push(a.clone()), n.length === 1 ? (w === "xoz" && g.setFromNormalAndCoplanarPoint(new l.Vector3(0, 1, 0), n[0]), w === "none" && g.setFromNormalAndCoplanarPoint(v, n[0])) : n.length === 2 ? (w === "y" && g.setFromCoplanarPoints(n[0], n[1], new l.Vector3(0, 1, 0).add(n[0])), y.setPoints([n[0], n[1]])) : n.length === 3 && (R(), h());
|
|
84
|
+
}, x = (i) => {
|
|
85
|
+
var A;
|
|
86
|
+
if (!(i != null && i.raycaster))
|
|
87
|
+
return;
|
|
88
|
+
const D = (A = n.at(-1)) == null ? void 0 : A.clone();
|
|
89
|
+
if (n.length === 0)
|
|
90
|
+
a = i.point.clone(), v = i.face.normal;
|
|
91
|
+
else if (n.length === 1)
|
|
92
|
+
g ? (a = i.raycaster.ray.intersectPlane(g, G), c.setPoints([a, i.point])) : a = i.point.clone(), o.setPoints([D, a]);
|
|
93
|
+
else if (n.length === 2) {
|
|
94
|
+
const F = i.raycaster.ray.intersectPlane(g, new l.Vector3());
|
|
95
|
+
if (m === "diagonal") {
|
|
96
|
+
const P = n[0].distanceTo(n[1]) / 2, p = new l.Vector3().lerpVectors(n[0], n[1], 0.5), V = new l.Vector3().subVectors(F, p).normalize();
|
|
97
|
+
a = new l.Vector3().addVectors(p, V.multiplyScalar(P));
|
|
98
|
+
} else if (m === "vertex") {
|
|
99
|
+
const P = n[0].distanceTo(n[1]), p = n[0], V = new l.Vector3().subVectors(F, p).normalize();
|
|
100
|
+
a = new l.Vector3().addVectors(p, V.multiplyScalar(P));
|
|
92
101
|
}
|
|
102
|
+
r.remove(o), s.setPoints([n[0], a, n[1]]);
|
|
93
103
|
}
|
|
94
|
-
},
|
|
95
|
-
t.off("select",
|
|
96
|
-
},
|
|
97
|
-
|
|
104
|
+
}, R = () => {
|
|
105
|
+
t.off("select", C), t.off("intersectionUpdate", x), t.off("disable", N), t.disable(), r == null || r.remove(o, y, c);
|
|
106
|
+
}, N = () => {
|
|
107
|
+
R(), r == null || r.remove(s), f(new Error("Cancelled"));
|
|
98
108
|
};
|
|
99
|
-
t.on("select",
|
|
109
|
+
t.on("select", C), t.on("intersectionUpdate", x), t.on("disable", N);
|
|
100
110
|
});
|
|
101
111
|
}
|
|
102
112
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
113
|
+
S as Rectangle,
|
|
114
|
+
J as createRectangle
|
|
105
115
|
};
|
|
@@ -31,13 +31,20 @@ export type LineWidthStyle = {
|
|
|
31
31
|
*/
|
|
32
32
|
lineWidth?: number;
|
|
33
33
|
};
|
|
34
|
-
export type
|
|
34
|
+
export type CreateLimitConfig = {
|
|
35
35
|
/**
|
|
36
36
|
* @description 限制折线绘制的平面; `xoz` 限制在水平面; `y` 限制垂直面; `none` 不限制
|
|
37
37
|
* @default `none`
|
|
38
38
|
*/
|
|
39
39
|
limit: 'xoz' | 'y' | 'none';
|
|
40
40
|
};
|
|
41
|
+
export type DrawMethodConfig = {
|
|
42
|
+
/**
|
|
43
|
+
* @description 矩形绘制方式; `vertex` 按顺序绘制三个点; `diagonal` 先绘制对角线;
|
|
44
|
+
* @default `diagonal`
|
|
45
|
+
*/
|
|
46
|
+
drawMethod: 'vertex' | 'diagonal';
|
|
47
|
+
};
|
|
41
48
|
export type OcclusionStyle = {
|
|
42
49
|
/**
|
|
43
50
|
* @description 是否以一种半透明的方式显示遮挡的部分
|
|
@@ -5,7 +5,7 @@ function i(t) {
|
|
|
5
5
|
.LineLengthTag {
|
|
6
6
|
position: absolute;
|
|
7
7
|
pointer-events: none;
|
|
8
|
-
font-size:
|
|
8
|
+
font-size: 18px;
|
|
9
9
|
letter-spacing: 1px;
|
|
10
10
|
color: white;
|
|
11
11
|
left: 50%;
|
|
@@ -15,7 +15,7 @@ function i(t) {
|
|
|
15
15
|
position: absolute;
|
|
16
16
|
top: 0;
|
|
17
17
|
left: 0;
|
|
18
|
-
-webkit-text-stroke: 2px
|
|
18
|
+
-webkit-text-stroke: 2px #1F2E4D;
|
|
19
19
|
}
|
|
20
20
|
.LineLengthTag div:last-child {
|
|
21
21
|
position: relative;
|
|
@@ -11,7 +11,7 @@ class l extends o.BufferGeometry {
|
|
|
11
11
|
console.error("Invalid number of points, it's not a rectangle");
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
this.points = e.slice(0, 4), this.setAttribute("position", new o.BufferAttribute(new Float32Array(this.points.flatMap((s) => s.toArray())), 3)), this.setIndex(new o.BufferAttribute(new Uint16Array([0, 1, 2, 0,
|
|
14
|
+
this.points = e.slice(0, 4), this.setAttribute("position", new o.BufferAttribute(new Float32Array(this.points.flatMap((s) => s.toArray())), 3)), this.setIndex(new o.BufferAttribute(new Uint16Array([0, 1, 2, 0, 2, 3]), 1));
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
export {
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -95,7 +95,7 @@ import "../../shared-utils/three/IObject3D.js";
|
|
|
95
95
|
import "../../shared-utils/three/centerPoint.js";
|
|
96
96
|
import "../../shared-utils/tag.js";
|
|
97
97
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
98
|
-
import "../../shared-utils/three/
|
|
98
|
+
import "../../shared-utils/three/temp.js";
|
|
99
99
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
100
100
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
101
101
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -55,11 +55,11 @@ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
55
55
|
import "../../shared-utils/tag.js";
|
|
56
56
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
57
57
|
import "../../shared-utils/five/getFiveModel.js";
|
|
58
|
-
import "../../shared-utils/three/raycaster.js";
|
|
59
58
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
60
59
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
61
60
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
62
61
|
import "../../shared-utils/five/transformPosition.js";
|
|
62
|
+
import "../../shared-utils/three/temp.js";
|
|
63
63
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
64
64
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
65
65
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -94,7 +94,7 @@ import "../../shared-utils/three/IObject3D.js";
|
|
|
94
94
|
import "../../shared-utils/three/centerPoint.js";
|
|
95
95
|
import "../../shared-utils/tag.js";
|
|
96
96
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
97
|
-
import "../../shared-utils/three/
|
|
97
|
+
import "../../shared-utils/three/temp.js";
|
|
98
98
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
99
99
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
100
100
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -56,11 +56,11 @@ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
56
56
|
import "../../shared-utils/tag.js";
|
|
57
57
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
58
58
|
import "../../shared-utils/five/getFiveModel.js";
|
|
59
|
-
import "../../shared-utils/three/raycaster.js";
|
|
60
59
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
61
60
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
62
61
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
63
62
|
import "../../shared-utils/five/transformPosition.js";
|
|
63
|
+
import "../../shared-utils/three/temp.js";
|
|
64
64
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
65
65
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
66
66
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -65,11 +65,11 @@ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
65
65
|
import "../../shared-utils/tag.js";
|
|
66
66
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
67
67
|
import "../../shared-utils/five/getFiveModel.js";
|
|
68
|
-
import "../../shared-utils/three/raycaster.js";
|
|
69
68
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
70
69
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
71
70
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
72
71
|
import "../../shared-utils/five/transformPosition.js";
|
|
72
|
+
import "../../shared-utils/three/temp.js";
|
|
73
73
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
74
74
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
75
75
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -36,11 +36,11 @@ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
36
36
|
import "../../shared-utils/tag.js";
|
|
37
37
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
38
38
|
import "../../shared-utils/five/getFiveModel.js";
|
|
39
|
-
import "../../shared-utils/three/raycaster.js";
|
|
40
39
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
41
40
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
42
41
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
43
42
|
import "../../shared-utils/five/transformPosition.js";
|
|
43
|
+
import "../../shared-utils/three/temp.js";
|
|
44
44
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
45
45
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
46
46
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -92,7 +92,7 @@ import "../../shared-utils/three/IObject3D.js";
|
|
|
92
92
|
import "../../shared-utils/three/centerPoint.js";
|
|
93
93
|
import "../../shared-utils/tag.js";
|
|
94
94
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
95
|
-
import "../../shared-utils/three/
|
|
95
|
+
import "../../shared-utils/three/temp.js";
|
|
96
96
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
97
97
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
98
98
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -54,11 +54,11 @@ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
54
54
|
import "../../shared-utils/tag.js";
|
|
55
55
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
56
56
|
import "../../shared-utils/five/getFiveModel.js";
|
|
57
|
-
import "../../shared-utils/three/raycaster.js";
|
|
58
57
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
59
58
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
60
59
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
61
60
|
import "../../shared-utils/five/transformPosition.js";
|
|
61
|
+
import "../../shared-utils/three/temp.js";
|
|
62
62
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
63
63
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
64
64
|
import "../../Object3DHelperPlugin/Controller.js";
|
package/libs/index.js
CHANGED
|
@@ -83,12 +83,12 @@ import "./shared-utils/isNil.js";
|
|
|
83
83
|
import "./shared-utils/tag.js";
|
|
84
84
|
import "./shared-utils/five/vector3ToScreen.js";
|
|
85
85
|
import "./shared-utils/five/getFiveModel.js";
|
|
86
|
-
import "./shared-utils/three/raycaster.js";
|
|
87
86
|
import "./shared-utils/Utils/FiveUtil.js";
|
|
88
87
|
import "./shared-utils/Utils/BaseUtil.js";
|
|
89
88
|
import "./shared-utils/Subscribe.js";
|
|
90
89
|
import "./shared-utils/Utils/WorkUtil.js";
|
|
91
90
|
import "./shared-utils/five/transformPosition.js";
|
|
91
|
+
import "./shared-utils/three/temp.js";
|
|
92
92
|
import "./Sculpt/utils/Modules/Global.js";
|
|
93
93
|
import "./Sculpt/utils/Modules/Cursor.js";
|
|
94
94
|
import "./shared-utils/five/FiveDomEvents.js";
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function x(t, n, o) {
|
|
4
|
-
const { x: e, y: c, z: r } = n.clone().project(t);
|
|
1
|
+
function i(t, n, o) {
|
|
2
|
+
const { x: c, y: e, z: r } = n.clone().project(t);
|
|
5
3
|
return r > 1 ? void 0 : {
|
|
6
|
-
leftPx: (
|
|
7
|
-
topPx: (-
|
|
4
|
+
leftPx: (c + 1) / 2 * o.x,
|
|
5
|
+
topPx: (-e + 1) / 2 * o.y
|
|
8
6
|
};
|
|
9
7
|
}
|
|
10
8
|
export {
|
|
11
|
-
|
|
9
|
+
i as vector3ToScreen
|
|
12
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.47.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.47.9",
|
|
4
4
|
[
|
|
5
5
|
"background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
|
|
6
6
|
"background-repeat: no-repeat",
|
|
@@ -7,6 +7,11 @@ export declare class LightTag {
|
|
|
7
7
|
enabled: boolean;
|
|
8
8
|
wrapper: HTMLElement;
|
|
9
9
|
positionsForRotate?: THREE.Vector3[];
|
|
10
|
+
/**
|
|
11
|
+
* @description 碰撞检测
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
intersectCheck: boolean;
|
|
10
15
|
private tagWrapper;
|
|
11
16
|
private five;
|
|
12
17
|
private originPosition?;
|