@realsee/dnalogel 2.0.4 → 2.0.5--alpha.1
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/dist/index.cjs.js +46 -46
- package/dist/index.es.js +4100 -3838
- package/dist/index.js +4100 -3838
- package/dist/index.umd.js +34 -34
- package/docs/assets/search.js +1 -1
- package/docs/classes/CruisePluginController.html +14 -14
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- package/docs/classes/PaintBrush.html +8 -0
- package/docs/enums/CameraMovementEffect.html +2 -2
- package/docs/enums/DIRECTION.html +1 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/PaintBrushTypeEnum.html +1 -0
- package/docs/enums/Rotation.html +2 -2
- package/docs/index.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -0
- package/docs/interfaces/CSS3DRenderPluginState.html +3 -0
- package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
- package/docs/interfaces/FloorplanBounding.html +4 -4
- package/docs/interfaces/FloorplanData.html +2 -2
- package/docs/interfaces/FloorplanEntrance.html +7 -7
- package/docs/interfaces/FloorplanExtraObject.html +3 -3
- package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
- package/docs/interfaces/FloorplanFloorData.html +2 -2
- package/docs/interfaces/FloorplanImagePosition.html +2 -2
- package/docs/interfaces/FloorplanObserver.html +2 -2
- package/docs/interfaces/FloorplanOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanPosition.html +2 -2
- package/docs/interfaces/FloorplanRoomItem.html +6 -6
- package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
- package/docs/interfaces/FloorplanServerBounding.html +4 -4
- package/docs/interfaces/FloorplanServerComputedData.html +1 -1
- package/docs/interfaces/FloorplanServerData.html +2 -2
- package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
- package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
- package/docs/interfaces/FloorplanServerEntrance.html +7 -7
- package/docs/interfaces/FloorplanServerFloorData.html +2 -2
- package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
- package/docs/interfaces/FloorplanServerObserver.html +2 -2
- package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanServerPosition.html +2 -2
- package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
- package/docs/interfaces/ItemLabelPluginData.html +1 -1
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/ModelViewPluginExportType.html +1 -1
- package/docs/interfaces/OpenParameter.html +2 -2
- package/docs/interfaces/PaintBrushAction.html +13 -0
- package/docs/interfaces/PaintBrushConfigs.html +1 -0
- package/docs/interfaces/PaintBrushState.html +1 -0
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +2 -2
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginState.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
- package/docs/interfaces/Point.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -1
- package/docs/interfaces/RoomInfo.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -1
- package/docs/interfaces/Rooms.html +1 -1
- package/docs/modules.html +17 -20
- package/libs/CSS3DRenderPlugin/CSS3DRender.d.ts +156 -0
- package/libs/CSS3DRenderPlugin/CSS3DRender.js +246 -0
- package/libs/CSS3DRenderPlugin/Controller.d.ts +78 -0
- package/libs/CSS3DRenderPlugin/Controller.js +59 -0
- package/libs/CSS3DRenderPlugin/index.d.ts +4 -3
- package/libs/CSS3DRenderPlugin/index.js +10 -8
- package/libs/CSS3DRenderPlugin/typing.d.ts +26 -0
- package/libs/CSS3DRenderPlugin/typing.js +1 -0
- package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.d.ts +16 -0
- package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +48 -0
- package/libs/CSS3DRenderPlugin/utils/centerPoint.d.ts +2 -0
- package/libs/CSS3DRenderPlugin/utils/centerPoint.js +10 -0
- package/libs/CSS3DRenderPlugin/utils/evenNumber.d.ts +3 -0
- package/libs/CSS3DRenderPlugin/utils/evenNumber.js +7 -0
- package/libs/CSS3DRenderPlugin/utils/index.d.ts +4 -0
- package/libs/CSS3DRenderPlugin/utils/index.js +13 -0
- package/libs/CSS3DRenderPlugin/utils/positionToVector3.d.ts +13 -0
- package/libs/CSS3DRenderPlugin/utils/positionToVector3.js +7 -0
- package/libs/CSS3DRenderPlugin/utils/random.d.ts +1 -0
- package/libs/CSS3DRenderPlugin/utils/random.js +6 -0
- package/libs/ModelTVVideoPlugin/Plugin.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/Plugin.js +129 -139
- package/libs/ModelTVVideoPlugin/index.js +14 -5
- package/libs/ModelTVVideoPlugin/typings.js +0 -1
- package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/utils/parseData.js +12 -8
- package/libs/PanoCompassPlugin/Controller.js +19 -16
- package/libs/PanoCompassPlugin/index.js +11 -8
- package/libs/PanoDoorLabelPlugin/BaseController.js +7 -7
- package/libs/PanoSpatialTagPlugin/Plugin.js +11 -8
- package/libs/PanoSpatialTagPlugin/index.js +11 -8
- package/libs/index.js +80 -76
- package/libs/shared-utils/Subscribe.d.ts +41 -25
- package/libs/shared-utils/Subscribe.js +37 -45
- package/package.json +1 -1
- package/docs/interfaces/CSS3DRenderPluginExportType.html +0 -4
- package/libs/CSS3DRenderPlugin/Plugin.d.ts +0 -49
- package/libs/CSS3DRenderPlugin/Plugin.js +0 -80
- package/libs/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +0 -7
- package/libs/CSS3DRenderPlugin/utils/createResizeObserver.js +0 -17
- package/libs/shared-utils/three/centerPoint.d.ts +0 -2
- package/libs/shared-utils/three/centerPoint.js +0 -7
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import * as a from "three";
|
|
2
2
|
import { Subscribe as we, Five as ye } from "@realsee/five";
|
|
3
|
-
import { CSS3DRenderPlugin as Te } from "../CSS3DRenderPlugin/
|
|
3
|
+
import { CSS3DRenderPlugin as Te } from "../CSS3DRenderPlugin/index.js";
|
|
4
4
|
import Me from "./Components/origins.js";
|
|
5
5
|
import Pe from "./Components/tag.js";
|
|
6
6
|
import { pluginStyle as xe } from "./style.js";
|
|
7
7
|
import Ee from "../shared-utils/tinyEJSrender.js";
|
|
8
|
+
import "../CSS3DRenderPlugin/Controller.js";
|
|
9
|
+
import "../CSS3DRenderPlugin/CSS3DRender.js";
|
|
8
10
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
9
|
-
import "../shared-utils/
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import "../CSS3DRenderPlugin/utils/
|
|
11
|
+
import "../shared-utils/Subscribe.js";
|
|
12
|
+
import "../CSS3DRenderPlugin/utils/evenNumber.js";
|
|
13
|
+
import "../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
14
|
+
import "../CSS3DRenderPlugin/utils/CSS3DObjectPlus.js";
|
|
15
|
+
import "../CSS3DRenderPlugin/utils/centerPoint.js";
|
|
13
16
|
import "../index.d6d7690a.js";
|
|
14
17
|
import "./store.js";
|
|
15
18
|
import "../index.4ab67e58.js";
|
|
16
|
-
const D = 1e-3, v = 0.01, je = "https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png",
|
|
19
|
+
const D = 1e-3, v = 0.01, je = "https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png", Ue = (n, s) => {
|
|
17
20
|
var k, z, q, B, G, J, K, Q;
|
|
18
21
|
let j = s == null ? void 0 : s.container, y = 1.4;
|
|
19
22
|
const ee = (k = s == null ? void 0 : s.wait) != null ? k : 200, oe = (z = s == null ? void 0 : s.maxNumberOnScreen) != null ? z : 3, I = (q = s == null ? void 0 : s.minRad) != null ? q : Math.PI / 4, L = (B = s == null ? void 0 : s.nearTolerance) != null ? B : 100, te = (G = s == null ? void 0 : s.upsideHeight) != null ? G : 1.6, A = (J = s == null ? void 0 : s.minDistance) != null ? J : 1.2, u = (K = s == null ? void 0 : s.maxDistance) != null ? K : 3.5, C = Te(n), S = document.createElement("div");
|
|
@@ -250,6 +253,6 @@ const D = 1e-3, v = 0.01, je = "https://vrlab-image4.ljcdn.com/release/web/PanoS
|
|
|
250
253
|
};
|
|
251
254
|
};
|
|
252
255
|
export {
|
|
253
|
-
|
|
254
|
-
|
|
256
|
+
Ue as PanoSpatialTagPlugin,
|
|
257
|
+
Ue as default
|
|
255
258
|
};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import "./Plugin.js";
|
|
2
|
-
import { PanoSpatialTagPlugin as
|
|
2
|
+
import { PanoSpatialTagPlugin as j, PanoSpatialTagPlugin as k } from "./Plugin.js";
|
|
3
3
|
import "three";
|
|
4
4
|
import "@realsee/five";
|
|
5
|
-
import "../CSS3DRenderPlugin/
|
|
5
|
+
import "../CSS3DRenderPlugin/index.js";
|
|
6
|
+
import "../CSS3DRenderPlugin/Controller.js";
|
|
7
|
+
import "../CSS3DRenderPlugin/CSS3DRender.js";
|
|
6
8
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
7
|
-
import "../shared-utils/
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import "../CSS3DRenderPlugin/utils/
|
|
9
|
+
import "../shared-utils/Subscribe.js";
|
|
10
|
+
import "../CSS3DRenderPlugin/utils/evenNumber.js";
|
|
11
|
+
import "../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
12
|
+
import "../CSS3DRenderPlugin/utils/CSS3DObjectPlus.js";
|
|
13
|
+
import "../CSS3DRenderPlugin/utils/centerPoint.js";
|
|
11
14
|
import "./Components/origins.js";
|
|
12
15
|
import "../index.d6d7690a.js";
|
|
13
16
|
import "./store.js";
|
|
@@ -16,6 +19,6 @@ import "./Components/tag.js";
|
|
|
16
19
|
import "./style.js";
|
|
17
20
|
import "../shared-utils/tinyEJSrender.js";
|
|
18
21
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
j as PanoSpatialTagPlugin,
|
|
23
|
+
k as default
|
|
21
24
|
};
|
package/libs/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { PaintBrush as
|
|
2
|
-
import { PaintBrushTypeEnum as
|
|
3
|
-
import { ModelViewPlugin as
|
|
4
|
-
import { CSS3DRenderPlugin as
|
|
5
|
-
import { PanoCursorRaycasterPlugin as
|
|
6
|
-
import { ModelRoomLabelPlugin as
|
|
7
|
-
import { FLOOR_PLAN_ATTACHED_TO as
|
|
8
|
-
import { ModelFloorplanPlugin as
|
|
9
|
-
import { MapviewFloorplanPlugin as
|
|
10
|
-
import { TopviewFloorplanPlugin as
|
|
11
|
-
import { PanoFloorplanRadarPlugin as
|
|
12
|
-
import { FLOOR_TYPE_MAP as
|
|
13
|
-
import { ModelChassisCompassPlugin as
|
|
14
|
-
import { ModelEntryDoorGuidePlugin as
|
|
15
|
-
import { CameraMovementPlugin as
|
|
16
|
-
import { CameraMovementEffect as
|
|
17
|
-
import { PanoRulerPlugin as
|
|
18
|
-
import { PanoRulerProPlugin as
|
|
19
|
-
import { PanoCompassPlugin as
|
|
20
|
-
import { PanoMeasurePlugin as
|
|
21
|
-
import { PanoSpatialTagPlugin as
|
|
22
|
-
import { modelItemLabelPluginServerParams as
|
|
23
|
-
import { ModelTVVideoPlugin as
|
|
24
|
-
import { DIRECTION as
|
|
25
|
-
import { itemLabelPluginServerParams as
|
|
26
|
-
import { PanoDoorLabelPlugin as
|
|
27
|
-
import { GuideLinePlugin as
|
|
28
|
-
import { CruisePlugin as
|
|
29
|
-
import { default as
|
|
30
|
-
import { ModelItemLabelPlugin as
|
|
31
|
-
import { Plugin as
|
|
32
|
-
import { DISPLAY_STRATEGY_TYPE as
|
|
33
|
-
import { ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE as
|
|
34
|
-
import { default as
|
|
1
|
+
import { PaintBrush as lm } from "./components/PaintBrush/index.js";
|
|
2
|
+
import { PaintBrushTypeEnum as am } from "./components/PaintBrush/typings.js";
|
|
3
|
+
import { ModelViewPlugin as um } from "./ModelViewPlugin/Plugin.js";
|
|
4
|
+
import { CSS3DRenderPlugin as xm } from "./CSS3DRenderPlugin/index.js";
|
|
5
|
+
import { PanoCursorRaycasterPlugin as sm } from "./PanoCursorRaycasterPlugin/index.js";
|
|
6
|
+
import { ModelRoomLabelPlugin as Mm, modelRoomLabelPluginServerParams as Lm } from "./ModelRoomLabelPlugin/index.js";
|
|
7
|
+
import { FLOOR_PLAN_ATTACHED_TO as dm } from "./floorplan/constant.js";
|
|
8
|
+
import { ModelFloorplanPlugin as Rm } from "./floorplan/ModelFloorplanPlugin/index.js";
|
|
9
|
+
import { MapviewFloorplanPlugin as Am } from "./floorplan/MapviewFloorplanPlugin/index.js";
|
|
10
|
+
import { TopviewFloorplanPlugin as Om } from "./floorplan/TopviewFloorplanPlugin/index.js";
|
|
11
|
+
import { PanoFloorplanRadarPlugin as Ym } from "./floorplan/PanoFloorplanRadarPlugin/index.js";
|
|
12
|
+
import { FLOOR_TYPE_MAP as vm, ROOM_FETILE_TYPE_MAP as Dm, ROOM_TYPE_MAP as Fm } from "./floorplan/typings/floorplanServerData.js";
|
|
13
|
+
import { ModelChassisCompassPlugin as hm } from "./ModelChassisCompassPlugin/Plugin.js";
|
|
14
|
+
import { ModelEntryDoorGuidePlugin as ym } from "./ModelEntryDoorGuidePlugin/Plugin.js";
|
|
15
|
+
import { CameraMovementPlugin as Nm } from "./CameraMovementPlugin/CameraMovementPlugin.js";
|
|
16
|
+
import { CameraMovementEffect as cm, Rotation as Hm } from "./CameraMovementPlugin/typing.js";
|
|
17
|
+
import { PanoRulerPlugin as jm } from "./PanoRulerPlugin/Plugin.js";
|
|
18
|
+
import { PanoRulerProPlugin as qm } from "./PanoRulerProPlugin/index.js";
|
|
19
|
+
import { PanoCompassPlugin as Jm } from "./PanoCompassPlugin/index.js";
|
|
20
|
+
import { PanoMeasurePlugin as Qm } from "./PanoMeasurePlugin/index.js";
|
|
21
|
+
import { PanoSpatialTagPlugin as Xm } from "./PanoSpatialTagPlugin/Plugin.js";
|
|
22
|
+
import { modelItemLabelPluginServerParams as $m } from "./ModelItemLabelPlugin/index.js";
|
|
23
|
+
import { ModelTVVideoPlugin as rt } from "./ModelTVVideoPlugin/Plugin.js";
|
|
24
|
+
import { DIRECTION as tt } from "./ModelTVVideoPlugin/typings.js";
|
|
25
|
+
import { itemLabelPluginServerParams as pt } from "./ItemLabelPlugin/index.js";
|
|
26
|
+
import { PanoDoorLabelPlugin as lt } from "./PanoDoorLabelPlugin/index.js";
|
|
27
|
+
import { GuideLinePlugin as at } from "./GuideLinePlugin/index.js";
|
|
28
|
+
import { CruisePlugin as ut } from "./CruisePlugin/index.js";
|
|
29
|
+
import { default as xt } from "./PanoMeasurePlugin/Modules/Magnifier.js";
|
|
30
|
+
import { ModelItemLabelPlugin as st } from "./ModelItemLabelPlugin/ModelItemLabelPlugin.js";
|
|
31
|
+
import { Plugin as Mt } from "./ItemLabelPlugin/Plugin.js";
|
|
32
|
+
import { DISPLAY_STRATEGY_TYPE as _t } from "./ModelItemLabelPlugin/typings.js";
|
|
33
|
+
import { ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE as Et } from "./ItemLabelPlugin/typings.js";
|
|
34
|
+
import { default as Ct } from "./CruisePlugin/Controller.js";
|
|
35
35
|
import "./components/PaintBrush/Controller.js";
|
|
36
36
|
import "./components/PaintBrush/utils.js";
|
|
37
37
|
import "./components/PaintBrush/tween.js";
|
|
@@ -41,11 +41,14 @@ import "./shared-utils/uuid.js";
|
|
|
41
41
|
import "./components/PaintBrush/style.js";
|
|
42
42
|
import "@realsee/five";
|
|
43
43
|
import "three";
|
|
44
|
+
import "./CSS3DRenderPlugin/Controller.js";
|
|
45
|
+
import "./CSS3DRenderPlugin/CSS3DRender.js";
|
|
44
46
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
45
|
-
import "./shared-utils/
|
|
46
|
-
import "./
|
|
47
|
-
import "./
|
|
48
|
-
import "./CSS3DRenderPlugin/utils/
|
|
47
|
+
import "./shared-utils/Subscribe.js";
|
|
48
|
+
import "./CSS3DRenderPlugin/utils/evenNumber.js";
|
|
49
|
+
import "./CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
50
|
+
import "./CSS3DRenderPlugin/utils/CSS3DObjectPlus.js";
|
|
51
|
+
import "./CSS3DRenderPlugin/utils/centerPoint.js";
|
|
49
52
|
import "./shared-utils/createLine/index.js";
|
|
50
53
|
import "@realsee/five/line";
|
|
51
54
|
import "./ModelRoomLabelPlugin/Controller.js";
|
|
@@ -104,6 +107,7 @@ import "three/examples/jsm/loaders/FBXLoader";
|
|
|
104
107
|
import "./shared-utils/object3d2LocalMatrix.js";
|
|
105
108
|
import "./shared-utils/three/transfromToMeshBasicMaterial.js";
|
|
106
109
|
import "./shared-utils/createCanvasTextTexture.js";
|
|
110
|
+
import "./shared-utils/three/transformPositionToVector3.js";
|
|
107
111
|
import "./shared-utils/animationFrame/tween.js";
|
|
108
112
|
import "./shared-utils/animationFrame/index.js";
|
|
109
113
|
import "./shared-utils/animationFrame/formatRad.js";
|
|
@@ -195,42 +199,42 @@ import "./ItemLabelPlugin/utils/getLabelTransform.js";
|
|
|
195
199
|
import "./ItemLabelPlugin/utils/transform2RenderData.js";
|
|
196
200
|
import "./ItemLabelPlugin/utils/parseData.js";
|
|
197
201
|
export {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
202
|
+
xm as CSS3DRenderPlugin,
|
|
203
|
+
cm as CameraMovementEffect,
|
|
204
|
+
Nm as CameraMovementPlugin,
|
|
205
|
+
ut as CruisePlugin,
|
|
206
|
+
Ct as CruisePluginController,
|
|
207
|
+
tt as DIRECTION,
|
|
208
|
+
_t as DISPLAY_STRATEGY_TYPE,
|
|
209
|
+
dm as FLOOR_PLAN_ATTACHED_TO,
|
|
210
|
+
vm as FLOOR_TYPE_MAP,
|
|
211
|
+
at as GuideLinePlugin,
|
|
212
|
+
Et as ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE,
|
|
213
|
+
Mt as ItemLabelPlugin,
|
|
214
|
+
xt as Magnifier,
|
|
215
|
+
Am as MapviewFloorplanPlugin,
|
|
216
|
+
hm as ModelChassisCompassPlugin,
|
|
217
|
+
ym as ModelEntryDoorGuidePlugin,
|
|
218
|
+
Rm as ModelFloorplanPlugin,
|
|
219
|
+
st as ModelItemLabelPlugin,
|
|
220
|
+
Mm as ModelRoomLabelPlugin,
|
|
221
|
+
rt as ModelTVVideoPlugin,
|
|
222
|
+
um as ModelViewPlugin,
|
|
223
|
+
lm as PaintBrush,
|
|
224
|
+
am as PaintBrushTypeEnum,
|
|
225
|
+
Jm as PanoCompassPlugin,
|
|
226
|
+
sm as PanoCursorRaycasterPlugin,
|
|
227
|
+
lt as PanoDoorLabelPlugin,
|
|
228
|
+
Ym as PanoFloorplanRadarPlugin,
|
|
229
|
+
Qm as PanoMeasurePlugin,
|
|
230
|
+
jm as PanoRulerPlugin,
|
|
231
|
+
qm as PanoRulerProPlugin,
|
|
232
|
+
Xm as PanoSpatialTagPlugin,
|
|
233
|
+
Dm as ROOM_FETILE_TYPE_MAP,
|
|
234
|
+
Fm as ROOM_TYPE_MAP,
|
|
235
|
+
Hm as Rotation,
|
|
236
|
+
Om as TopviewFloorplanPlugin,
|
|
237
|
+
pt as itemLabelPluginServerParams,
|
|
238
|
+
$m as modelItemLabelPluginServerParams,
|
|
239
|
+
Lm as modelRoomLabelPluginServerParams
|
|
236
240
|
};
|
|
@@ -1,45 +1,61 @@
|
|
|
1
|
-
|
|
1
|
+
interface EventMap {
|
|
2
|
+
[name: string]: (...args: any[]) => void | boolean;
|
|
3
|
+
}
|
|
2
4
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
+
* 监听者模式
|
|
6
|
+
* @template T - 预设的监听回调类型
|
|
7
|
+
* @example
|
|
8
|
+
* ```
|
|
9
|
+
* new Subscribe<{
|
|
10
|
+
* "foo": [arg1: number, arg2: string],
|
|
11
|
+
* "bar": [arg: boolean],
|
|
12
|
+
* }>()
|
|
13
|
+
* ```
|
|
5
14
|
*/
|
|
6
|
-
|
|
7
|
-
private [__EVENT__];
|
|
8
|
-
constructor();
|
|
15
|
+
declare class Subscribe<T extends EventMap> {
|
|
9
16
|
/**
|
|
10
|
-
*
|
|
11
|
-
* @param
|
|
17
|
+
* 判断是否注册了事件
|
|
18
|
+
* @param name - 事件类型
|
|
12
19
|
*/
|
|
13
|
-
hasListener(name:
|
|
20
|
+
hasListener(name: keyof T): boolean;
|
|
14
21
|
/**
|
|
15
22
|
* 注册事件
|
|
16
|
-
* @param
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
19
|
-
* @
|
|
23
|
+
* @param name - 事件类型
|
|
24
|
+
* @param callback - 事件回调函数
|
|
25
|
+
* @param once - 是否只执行一次
|
|
26
|
+
* @returns 解除事件
|
|
27
|
+
* @template K - 预设的监听事件名称
|
|
28
|
+
* @template C - 回调函数函数上下文
|
|
20
29
|
*/
|
|
21
|
-
on(
|
|
30
|
+
on<K extends keyof T>(name: K, callback: (...args: Parameters<T[K]>) => ReturnType<T[K]>, once?: boolean): () => void;
|
|
22
31
|
/**
|
|
23
32
|
* 注册事件(是否只执行一次)
|
|
24
|
-
* @param
|
|
25
|
-
* @param
|
|
26
|
-
* @
|
|
33
|
+
* @param name - 事件类型
|
|
34
|
+
* @param callback - 事件回调函数
|
|
35
|
+
* @returns 解除事件
|
|
36
|
+
* @template K - 预设的监听事件名称
|
|
37
|
+
* @template C - 回调函数函数上下文
|
|
27
38
|
*/
|
|
28
|
-
once(
|
|
39
|
+
once<K extends keyof T>(name: K, callback: (...args: Parameters<T[K]>) => ReturnType<T[K]>): () => void;
|
|
29
40
|
/**
|
|
30
41
|
* 解除事件
|
|
31
|
-
* @param {string|[string]} names 事件类型
|
|
32
|
-
* @param {function} callback 事件回调函数
|
|
33
42
|
*
|
|
34
43
|
* 如果 name 不传的话解除对应所有事件
|
|
35
44
|
* 如果 name, callback 不传的话解除所有name的所有事件
|
|
45
|
+
* @param name - 事件类型
|
|
46
|
+
* @param callback - 事件回调函数
|
|
47
|
+
* @template K - 预设的监听事件名称
|
|
36
48
|
*/
|
|
37
|
-
off(
|
|
49
|
+
off<K extends keyof T>(name?: K, callback?: (...args: Parameters<T[K]>) => ReturnType<T[K]>): void;
|
|
38
50
|
/**
|
|
39
51
|
* 触发事件
|
|
40
|
-
* @param
|
|
41
|
-
* @param
|
|
52
|
+
* @param name - 事件类型
|
|
53
|
+
* @param data - 触发事件的数据
|
|
54
|
+
* @returns canceled 是否被触发取消
|
|
55
|
+
* @template K - 预设的监听事件名称
|
|
42
56
|
*/
|
|
43
|
-
emit(name:
|
|
57
|
+
emit<K extends keyof T>(name: K, ...data: Parameters<T[K]>): boolean;
|
|
44
58
|
}
|
|
45
|
-
export
|
|
59
|
+
export default Subscribe;
|
|
60
|
+
export { Subscribe };
|
|
61
|
+
export type { EventMap as SubscribeEventMap };
|
|
@@ -1,59 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
function d(f) {
|
|
2
|
+
return typeof Symbol > "u" ? `$Symbol<${f}>$` : Symbol(f);
|
|
3
|
+
}
|
|
4
|
+
const i = d("$$EVENT$$");
|
|
5
|
+
function r(f) {
|
|
6
|
+
return f[i] || (f[i] = {}), f[i];
|
|
7
|
+
}
|
|
8
|
+
function v(f) {
|
|
9
|
+
f[i] || delete f[i];
|
|
10
|
+
}
|
|
11
|
+
class E {
|
|
11
12
|
hasListener(t) {
|
|
12
|
-
const e = this
|
|
13
|
-
return e
|
|
13
|
+
const e = r(this);
|
|
14
|
+
return Boolean((e == null ? void 0 : e[t]) && e[t].length > 0);
|
|
14
15
|
}
|
|
15
|
-
on(t, e,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return () => this.off(t, e);
|
|
16
|
+
on(t, e, o) {
|
|
17
|
+
const s = r(this);
|
|
18
|
+
return s[t] || (s[t] = []), s[t].push([e, o || !1]), () => this.off(t, e);
|
|
19
19
|
}
|
|
20
|
-
once(t, e
|
|
21
|
-
return this.on(t, e,
|
|
20
|
+
once(t, e) {
|
|
21
|
+
return this.on(t, e, !0);
|
|
22
22
|
}
|
|
23
23
|
off(t, e) {
|
|
24
|
-
if (
|
|
25
|
-
this
|
|
24
|
+
if (t === void 0) {
|
|
25
|
+
v(this);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (e === void 0) {
|
|
33
|
-
s[n].length = 0;
|
|
34
|
-
continue;
|
|
35
|
-
}
|
|
36
|
-
s[n] = s[n].filter((c) => c[0] !== e);
|
|
37
|
-
}
|
|
28
|
+
const o = r(this);
|
|
29
|
+
if (o[t] || (o[t] = []), e === void 0) {
|
|
30
|
+
o[t].length = 0;
|
|
31
|
+
return;
|
|
38
32
|
}
|
|
39
|
-
|
|
33
|
+
let s = 0;
|
|
34
|
+
for (; s < o[t].length && o[t][s][0] !== e; s++)
|
|
35
|
+
;
|
|
36
|
+
s < o[t].length && o[t].splice(s, 1);
|
|
40
37
|
}
|
|
41
38
|
emit(t, ...e) {
|
|
42
|
-
let
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return r = !0, r;
|
|
50
|
-
} catch (c) {
|
|
51
|
-
console.warn(c);
|
|
52
|
-
}
|
|
53
|
-
return r;
|
|
39
|
+
let o = !1;
|
|
40
|
+
const l = r(this)[t] || [];
|
|
41
|
+
for (let u of l.slice()) {
|
|
42
|
+
const [n, c = !1] = u, h = n(...e);
|
|
43
|
+
c && this.off(t, n), h === !1 && (o = !0);
|
|
44
|
+
}
|
|
45
|
+
return o;
|
|
54
46
|
}
|
|
55
47
|
}
|
|
56
|
-
v = o;
|
|
57
48
|
export {
|
|
58
|
-
|
|
49
|
+
E as Subscribe,
|
|
50
|
+
E as default
|
|
59
51
|
};
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"repository": "https://github.com/realsee-developer/dnalogel.git",
|
|
10
10
|
"description": "如视 VR 看房插件合集",
|
|
11
11
|
"private": false,
|
|
12
|
-
"version": "2.0.
|
|
12
|
+
"version": "2.0.5--alpha.1",
|
|
13
13
|
"license": "SEE LICENSE IN TERMS.txt",
|
|
14
14
|
"scripts": {
|
|
15
15
|
"build": "sh bin/build-production.sh",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CSS3DRenderPluginExportType | 如视看房插件合集 - v2.0.3</title><meta name="description" content="Documentation for 如视看房插件合集 - v2.0.3"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视看房插件合集 - v2.0.3</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">如视看房插件合集 - v2.0.3</a></li><li><a href="CSS3DRenderPluginExportType.html">CSS3DRenderPluginExportType</a></li></ul><h1>Interface CSS3DRenderPluginExportType </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">CSS3DRenderPluginExportType</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="CSS3DRenderPluginExportType.html#create3DDomContainer" class="tsd-kind-icon">create3DDom<wbr/>Container</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="CSS3DRenderPluginExportType.html#disposeAll" class="tsd-kind-icon">dispose<wbr/>All</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="create3DDomContainer" class="tsd-anchor"></a><h3 class="tsd-anchor-link">create3DDom<wbr/>Container<a href="#create3DDomContainer" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">create3DDom<wbr/>Container<span class="tsd-signature-symbol">(</span>points<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Vector3</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Vector3Position</span><span class="tsd-signature-symbol">[]</span>, config<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span>autoRender<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>container<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">; </span>dpr<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>ratio<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span>mode<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">"front"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span>autoRender<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>container<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">; </span>dpr<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>ratio<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span>behindFiveContainer<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">; </span>mode<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"behind"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>container<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">; </span>css3DObject<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CSS3DObject</span><span class="tsd-signature-symbol">; </span>dispose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span>render<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/realsee-developer/dnalogel/blob/9031a31/plugins/src/CSS3DRenderPlugin/Plugin.ts#L25">CSS3DRenderPlugin/Plugin.ts:25</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>description:</dt><dd><p>根据传入的四个点位创建一个3d dom容器,可以通过ReactDom.render()的方式将react组件放到容器中</p>
|
|
2
|
-
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>points: <span class="tsd-signature-type">Vector3</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Vector3Position</span><span class="tsd-signature-symbol">[]</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> config: <span class="tsd-signature-symbol">{ </span>autoRender<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>container<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">; </span>dpr<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>ratio<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span>mode<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">"front"</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span>autoRender<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span>container<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">; </span>dpr<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>ratio<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-symbol">{ </span>behindFiveContainer<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">; </span>mode<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"behind"</span><span class="tsd-signature-symbol"> }</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span>container<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">; </span>css3DObject<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CSS3DObject</span><span class="tsd-signature-symbol">; </span>dispose<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span>render<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span></h4><div><p>: container: dom容器, dispose: 清理函数</p>
|
|
3
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="disposeAll" class="tsd-anchor"></a><h3 class="tsd-anchor-link">dispose<wbr/>All<a href="#disposeAll" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">dispose<wbr/>All<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/realsee-developer/dnalogel/blob/9031a31/plugins/src/CSS3DRenderPlugin/Plugin.ts#L37">CSS3DRenderPlugin/Plugin.ts:37</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>description:</dt><dd><p>销毁所有的渲染内容</p>
|
|
4
|
-
</dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div></div></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="CSS3DRenderPluginExportType.html" class="tsd-kind-icon">CSS3DRender<wbr/>Plugin<wbr/>Export<wbr/>Type</a><ul><li class="tsd-kind-method tsd-parent-kind-interface"><a href="CSS3DRenderPluginExportType.html#create3DDomContainer" class="tsd-kind-icon">create3DDom<wbr/>Container</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="CSS3DRenderPluginExportType.html#disposeAll" class="tsd-kind-icon">dispose<wbr/>All</a></li></ul></li></ul></nav></div></div></div><footer class=""><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { FivePlugin } from '@realsee/five';
|
|
2
|
-
import type { Vector3Position } from '../typings/math.type';
|
|
3
|
-
import { Vector3 } from 'three';
|
|
4
|
-
import { CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer';
|
|
5
|
-
export declare type CSS3DRenderPluginParameterType = undefined;
|
|
6
|
-
export interface CSS3DRenderPluginExportType {
|
|
7
|
-
/**
|
|
8
|
-
* @description: 根据传入的四个点位创建一个3d dom容器,可以通过ReactDom.render()的方式将react组件放到容器中
|
|
9
|
-
* @param {Five} five
|
|
10
|
-
* @param {Vector3[] | Vector3Position[]} points: 矩形四个点坐标
|
|
11
|
-
* @param {number} config.ratio: 1px对应多少米,默认为 0.002,即1px对应2mm
|
|
12
|
-
* @param {number} config.dpr: dpr, 默认为1
|
|
13
|
-
* @param {HTMLElement} config.container: HTMLElement
|
|
14
|
-
* @param {number} config.autoRender: 默认为true,如果需要手动render则传false
|
|
15
|
-
* @param {'front' | 'behind'} config.mode: 两种模式
|
|
16
|
-
* @param {HTMLElement} config.behindFiveContainer: 如果config.mode为'behind',需要传入容器,并确保此容器位five下方,且中间没有其他dom元素遮挡
|
|
17
|
-
* @return {{ container: HTMLElement; dispose: () => void }}: container: dom容器, dispose: 清理函数
|
|
18
|
-
*/
|
|
19
|
-
create3DDomContainer: (points: Vector3[] | Vector3Position[], config?: {
|
|
20
|
-
ratio?: number;
|
|
21
|
-
dpr?: number;
|
|
22
|
-
autoRender?: boolean;
|
|
23
|
-
container?: HTMLElement;
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
} & ({
|
|
26
|
-
mode?: 'front';
|
|
27
|
-
} | {
|
|
28
|
-
mode: 'behind';
|
|
29
|
-
behindFiveContainer: HTMLElement;
|
|
30
|
-
})) => {
|
|
31
|
-
container: HTMLElement;
|
|
32
|
-
dispose: () => void;
|
|
33
|
-
css3DObject: CSS3DObject;
|
|
34
|
-
render?: () => void;
|
|
35
|
-
} | void;
|
|
36
|
-
/**
|
|
37
|
-
* @description: 销毁所有的渲染内容
|
|
38
|
-
* @return {void}
|
|
39
|
-
*/
|
|
40
|
-
disposeAll: () => void;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* **CSS3DRenderPlugin** 提供矩形区域(三维空间四个坐标点),你可以在此矩形区域中渲染 DOM 内容。
|
|
44
|
-
* 实现原理参考[CSS3DRenderer](https://threejs.org/docs/index.html?q=CSS3D#examples/en/renderers/CSS3DRenderer)。
|
|
45
|
-
*
|
|
46
|
-
* @returns
|
|
47
|
-
*/
|
|
48
|
-
export declare const CSS3DRenderPlugin: FivePlugin<CSS3DRenderPluginParameterType, CSS3DRenderPluginExportType>;
|
|
49
|
-
export default CSS3DRenderPlugin;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import * as R from "three";
|
|
2
|
-
import { Vector3 as p, Scene as q } from "three";
|
|
3
|
-
import { CSS3DRenderer as H, CSS3DObject as V } from "three/examples/jsm/renderers/CSS3DRenderer";
|
|
4
|
-
import F from "../shared-utils/math/evenNumber.js";
|
|
5
|
-
import X from "../shared-utils/three/centerPoint.js";
|
|
6
|
-
import Y from "../shared-utils/three/transformPositionToVector3.js";
|
|
7
|
-
import Z from "./utils/createResizeObserver.js";
|
|
8
|
-
const O = (c) => {
|
|
9
|
-
const n = { disposeCallbacks: [] }, j = (...t) => {
|
|
10
|
-
var I, T, W;
|
|
11
|
-
const f = t[0].map((a) => a instanceof p ? a : Y(a)), e = t[1];
|
|
12
|
-
if ((f == null ? void 0 : f.length) < 4)
|
|
13
|
-
return console.error("points must be equal or greater than than 4");
|
|
14
|
-
if (!((I = c == null ? void 0 : c.model) != null && I.loaded))
|
|
15
|
-
return console.error("five.model.loaded is: ", (T = c == null ? void 0 : c.model) == null ? void 0 : T.loaded);
|
|
16
|
-
const i = c.getElement();
|
|
17
|
-
if (!i)
|
|
18
|
-
return console.error("five.getElement() is " + i);
|
|
19
|
-
const h = [], x = (e == null ? void 0 : e.ratio) || 216e-5;
|
|
20
|
-
x <= 215e-5 && console.warn("if you need click css3DElement on safari, ratio must be greater than 0.00215");
|
|
21
|
-
const P = (e == null ? void 0 : e.dpr) || 1, l = (e == null ? void 0 : e.mode) || "front", C = (W = e == null ? void 0 : e.autoRender) != null ? W : !0, A = (e == null ? void 0 : e.behindFiveContainer) || i.parentElement || document.body, s = (e == null ? void 0 : e.container) || document.createElement("div");
|
|
22
|
-
s.classList.add("__Dnalogel-plugin--CSS3DRenderPlugin");
|
|
23
|
-
const { css3DObject: u, mesh: o } = z(f, { ratio: x, dpr: P, container: s, mode: l });
|
|
24
|
-
let r;
|
|
25
|
-
const D = l === "front" && !n.frontMode, M = l === "behind" && !n.behindMode, k = !(D || M);
|
|
26
|
-
M && (n.behindMode = { scene: new q(), css3DRenderer: new H() }), D && (n.frontMode = { scene: new q(), css3DRenderer: new H() });
|
|
27
|
-
const w = l === "behind" ? n.behindMode : n.frontMode, { scene: b, css3DRenderer: d } = w, m = (() => {
|
|
28
|
-
if (k)
|
|
29
|
-
return () => {
|
|
30
|
-
b.add(u);
|
|
31
|
-
};
|
|
32
|
-
{
|
|
33
|
-
const a = () => {
|
|
34
|
-
const E = F(i.clientWidth, { smaller: !0 }), U = F(i.clientHeight, { smaller: !0 });
|
|
35
|
-
d.setSize(E, U);
|
|
36
|
-
};
|
|
37
|
-
a(), r = Z(a, i), d.domElement.style.position = "absolute", d.domElement.style.top = "0", d.domElement.style.userSelect = "none", d.domElement.style.pointerEvents = "none";
|
|
38
|
-
const y = () => {
|
|
39
|
-
const E = requestAnimationFrame(y);
|
|
40
|
-
w.requestAnimationFrameId = E, d.render(b, c.camera);
|
|
41
|
-
};
|
|
42
|
-
return () => {
|
|
43
|
-
var E;
|
|
44
|
-
b.add(u), (E = r == null ? void 0 : r.observe) == null || E.call(r), y(), l === "behind" && o && (c.scene.add(o), h.push(() => o && c.scene.remove(o)));
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
})();
|
|
48
|
-
D && (i.parentElement || document.body).appendChild(d.domElement), M && A.appendChild(d.domElement);
|
|
49
|
-
const S = () => {
|
|
50
|
-
var a;
|
|
51
|
-
return h.forEach((y) => y == null ? void 0 : y()), b.remove(u), b.children.length === 0 && (typeof w.requestAnimationFrameId == "number" && cancelAnimationFrame(w.requestAnimationFrameId), d.domElement.remove(), l === "front" && (n.frontMode = void 0), l === "behind" && (n.behindMode = void 0), !n.behindMode && !n.frontMode && ((a = r == null ? void 0 : r.unobserve) == null || a.call(r))), !0;
|
|
52
|
-
}, g = n.disposeCallbacks.findIndex((a) => a === S);
|
|
53
|
-
return g !== -1 ? n.disposeCallbacks.splice(g, 1) : n.disposeCallbacks.push(S), C && m(), { container: s, dispose: S, css3DObject: u, render: C ? void 0 : m };
|
|
54
|
-
}, z = (t, f) => {
|
|
55
|
-
const { ratio: e, dpr: i, container: h, mode: x } = f, P = t[0].distanceTo(t[1]), l = t[1].distanceTo(t[2]), C = F(P / e * i), A = F(l / e * i), s = new V(h);
|
|
56
|
-
s.scale.set(e, e, e), h.style.width = C + "px", h.style.height = A + "px", h.style.pointerEvents = "none";
|
|
57
|
-
const u = X(t[0], t[2]), o = t[1].clone().sub(t[0]), r = t[2].clone().sub(t[1]), D = new p(0, 1, 0).angleTo(new p(0, r.y, r.z)), M = new p(1, 0, 0).angleTo(new p(o.x, 0, o.z)), k = o.angleTo(new p(o.x, 0, o.z)), w = (r.z > 0 ? -1 : 1) * D, b = (o.z < 0 ? 1 : -1) * M, d = (o.x > 0 && o.y < 0 || o.x < 0 && o.y > 0 ? -1 : 1) * k;
|
|
58
|
-
s.rotateOnWorldAxis(new p(1, 0, 0), w), s.rotateOnWorldAxis(new p(0, 1, 0), b), s.rotateOnWorldAxis(new p(0, 0, 1), d), s.position.set(u.x, u.y, u.z);
|
|
59
|
-
let m;
|
|
60
|
-
if (x === "behind") {
|
|
61
|
-
const S = new R.MeshBasicMaterial({
|
|
62
|
-
opacity: 0,
|
|
63
|
-
transparent: !1,
|
|
64
|
-
side: R.DoubleSide
|
|
65
|
-
}), g = new R.PlaneGeometry(C, A);
|
|
66
|
-
m = new R.Mesh(g, S), m.name = "CSS3DRenderPlugin-mesh", m.position.copy(s.position), m.rotation.copy(s.rotation), m.scale.copy(s.scale);
|
|
67
|
-
}
|
|
68
|
-
return { css3DObject: s, mesh: m };
|
|
69
|
-
};
|
|
70
|
-
return {
|
|
71
|
-
create3DDomContainer: j,
|
|
72
|
-
disposeAll: () => {
|
|
73
|
-
n.disposeCallbacks.forEach((t) => t == null ? void 0 : t()), n.disposeCallbacks = [];
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
export {
|
|
78
|
-
O as CSS3DRenderPlugin,
|
|
79
|
-
O as default
|
|
80
|
-
};
|