@realsee/dnalogel 2.0.0-alpha.16 → 2.0.0-alpha.19
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 +13 -0
- package/dist/CSS3DRenderPlugin/index.d.ts +2 -2
- package/dist/CameraMovementPlugin/index.js +15 -40
- package/dist/CameraMovementPlugin/typing.d.ts +1 -1
- package/dist/ModelChassisCompassPlugin/index.js +3 -28
- package/dist/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
- package/dist/ModelEntryDoorGuidePlugin/index.js +8 -33
- package/dist/ModelItemLabelPlugin/events.type.d.ts +2 -2
- package/dist/ModelItemLabelPlugin/index.js +8 -8
- package/dist/ModelItemLabelPlugin/typings.d.ts +2 -2
- package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +1 -1
- package/dist/ModelRoomLabelPlugin/index.js +6 -6
- package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/index.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/index.js +3 -28
- package/dist/PanoCompassPlugin/index.js +53 -86
- package/dist/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +8 -8
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +3 -3
- package/dist/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/dist/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +2 -2
- package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/index.d.ts +1 -1
- package/dist/PanoMeasurePlugin/index.js +1 -21
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +4 -4
- package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/dist/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/dist/PanoRulerPlugin/index.d.ts +1 -1
- package/dist/PanoRulerPlugin/index.js +3 -28
- package/dist/PanoSpatialTagPlugin/index.js +11 -11
- package/dist/PanoSpatialTagPlugin/typings.d.ts +1 -1
- package/dist/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
- package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -2
- package/dist/floorplan/ModelFloorplanPlugin/index.js +1266 -1298
- package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +81 -204
- package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +28 -15
- package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +1257 -1250
- package/dist/floorplan/utils/formatPosition.d.ts +1 -1
- package/dist/index.es.js +1480 -1507
- package/dist/index.js +1477 -1504
- package/dist/index.umd.js +1477 -1504
- package/dist/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/dist/shared-utils/three/getNormal.d.ts +1 -1
- package/dist/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/dist/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/dist/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/ModelRoomLabelController.html +6 -6
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ModelFloorplanErrorType.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/ModelFloorplanParameterType.html +1 -1
- package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
- 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/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +19 -1
- package/docs/modules.html +12 -12
- package/libs/CSS3DRenderPlugin/index.d.ts +2 -2
- package/libs/CameraMovementPlugin/index.js +15 -24
- package/libs/CameraMovementPlugin/typing.d.ts +1 -1
- package/libs/ModelChassisCompassPlugin/index.js +3 -12
- package/libs/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
- package/libs/ModelEntryDoorGuidePlugin/index.js +8 -17
- package/libs/ModelItemLabelPlugin/events.type.d.ts +2 -2
- package/libs/ModelItemLabelPlugin/typings.d.ts +2 -2
- package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/index.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/index.js +3 -12
- package/libs/ModelTVVideoPlugin/typings.js +1 -0
- package/libs/PanoCompassPlugin/index.js +49 -64
- package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +8 -8
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +3 -3
- package/libs/PanoMeasurePlugin/Model/index.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/line.d.ts +5 -5
- package/libs/PanoMeasurePlugin/Model/line.js +1 -1
- package/libs/PanoMeasurePlugin/Model/point.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +2 -2
- package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/index.d.ts +1 -1
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +4 -4
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/constants.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
- package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
- package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/line.d.ts +1 -1
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +1 -0
- package/libs/PanoRulerPlugin/index.d.ts +1 -1
- package/libs/PanoRulerPlugin/index.js +3 -12
- package/libs/PanoSpatialTagPlugin/typings.d.ts +1 -1
- package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Camera.js +2 -2
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Compass.js +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components/CurrentFloor → Components}/CurrentFloor.js +73 -80
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Main.js +186 -105
- package/libs/floorplan/Components/RoomHighlight/Room.js +5 -7
- package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +24 -116
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RoomLabels/RoomLabel.js +0 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RoomLabels/RoomLabels.js +2 -2
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +26 -22
- package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
- package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RuleLabels/RuleLabels.js +82 -32
- package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -2
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +34 -43
- package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +22 -33
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -12
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +28 -15
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +80 -54
- package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -1
- package/libs/floorplan/utils/formatData.js +28 -43
- package/libs/floorplan/utils/formatPosition.d.ts +1 -1
- package/libs/floorplan/utils/formatPosition.js +2 -2
- package/libs/shared-utils/five/changeMode.js +12 -23
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
- package/libs/shared-utils/three/getNormal.d.ts +1 -1
- package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
- package/libs/shared-utils/three/loadFbxObj.js +9 -20
- package/libs/shared-utils/three/loadTexture.js +6 -17
- package/libs/shared-utils/to.js +10 -21
- package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
- package/package.json +3 -1
- package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +0 -301
|
@@ -4,32 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var internal = require('svelte/internal');
|
|
6
6
|
var svelte = require('svelte');
|
|
7
|
-
var three = require('three');
|
|
8
|
-
|
|
9
|
-
/*! *****************************************************************************
|
|
10
|
-
Copyright (c) Microsoft Corporation.
|
|
11
|
-
|
|
12
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
13
|
-
purpose with or without fee is hereby granted.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
17
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
19
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
20
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
21
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
22
|
-
***************************************************************************** */
|
|
23
|
-
|
|
24
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
25
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
26
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
27
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
28
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
29
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(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Hl6J+KFy88uA2RJyJPE4wkL4wIPBfgXxO5HxGN7zNw5W2bNnLZhio+OmaR3LD6tplrLfKeYAwX7/O6Dje/2dpniwuKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==';
|
|
35
9
|
|
|
@@ -55,7 +29,7 @@ function throttle(func, wait = 200) {
|
|
|
55
29
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte generated by Svelte v3.47.0 */
|
|
56
30
|
|
|
57
31
|
function add_css$7(target) {
|
|
58
|
-
internal.append_styles(target, "svelte-
|
|
32
|
+
internal.append_styles(target, "svelte-1ty3s4p", ".plugin-radar__camera-wrapper.svelte-1ty3s4p{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1ty3s4p{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1ty3s4p{position:absolute;left:-0.78125rem;top:-0.78125rem;width:0.88542rem;height:0.88542rem;transform-origin:0.78125rem 0.78125rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}");
|
|
59
33
|
}
|
|
60
34
|
|
|
61
35
|
function create_fragment$8(ctx) {
|
|
@@ -68,12 +42,12 @@ function create_fragment$8(ctx) {
|
|
|
68
42
|
div2 = internal.element("div");
|
|
69
43
|
div1 = internal.element("div");
|
|
70
44
|
div0 = internal.element("div");
|
|
71
|
-
internal.attr(div0, "class", "plugin-radar__camera-rotate svelte-
|
|
45
|
+
internal.attr(div0, "class", "plugin-radar__camera-rotate svelte-1ty3s4p");
|
|
72
46
|
internal.set_style(div0, "background-image", "url(" + (/*cameraImageUrl*/ ctx[0] || CAMERA_IMAGE) + ")");
|
|
73
47
|
internal.set_style(div0, "transform", /*rotateTransform*/ ctx[1], false);
|
|
74
|
-
internal.attr(div1, "class", "plugin-radar__camera-position svelte-
|
|
48
|
+
internal.attr(div1, "class", "plugin-radar__camera-position svelte-1ty3s4p");
|
|
75
49
|
internal.set_style(div1, "transform", /*positionTransform*/ ctx[2], false);
|
|
76
|
-
internal.attr(div2, "class", "plugin-radar__camera-wrapper svelte-
|
|
50
|
+
internal.attr(div2, "class", "plugin-radar__camera-wrapper svelte-1ty3s4p");
|
|
77
51
|
},
|
|
78
52
|
m(target, anchor) {
|
|
79
53
|
internal.insert(target, div2, anchor);
|
|
@@ -189,7 +163,7 @@ class Camera extends internal.SvelteComponent {
|
|
|
189
163
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte generated by Svelte v3.47.0 */
|
|
190
164
|
|
|
191
165
|
function add_css$6(target) {
|
|
192
|
-
internal.append_styles(target, "svelte-
|
|
166
|
+
internal.append_styles(target, "svelte-1i87fz7", ".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}");
|
|
193
167
|
}
|
|
194
168
|
|
|
195
169
|
function get_each_context$1(ctx, list, i) {
|
|
@@ -215,11 +189,11 @@ function create_each_block$1(key_1, ctx) {
|
|
|
215
189
|
div1 = internal.element("div");
|
|
216
190
|
div0 = internal.element("div");
|
|
217
191
|
t = internal.space();
|
|
218
|
-
internal.attr(div0, "class", "plugin-pano-floorplan__extra-object-item svelte-
|
|
192
|
+
internal.attr(div0, "class", "plugin-pano-floorplan__extra-object-item svelte-1i87fz7");
|
|
219
193
|
internal.set_style(div0, "background-image", `url(${/*extraObject*/ ctx[1].icon.url})`);
|
|
220
194
|
internal.set_style(div0, "width", style_width, false);
|
|
221
195
|
internal.set_style(div0, "height", style_height, false);
|
|
222
|
-
internal.attr(div1, "class", "plugin-pano-floorplan__extra-object-item--position svelte-
|
|
196
|
+
internal.attr(div1, "class", "plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7");
|
|
223
197
|
internal.set_style(div1, "top", style_top, false);
|
|
224
198
|
internal.set_style(div1, "left", style_left, false);
|
|
225
199
|
this.first = div1;
|
|
@@ -279,7 +253,7 @@ function create_fragment$7(ctx) {
|
|
|
279
253
|
each_blocks[i].c();
|
|
280
254
|
}
|
|
281
255
|
|
|
282
|
-
internal.attr(div, "class", "plugin-pano-floorplan__extra-objects svelte-
|
|
256
|
+
internal.attr(div, "class", "plugin-pano-floorplan__extra-objects svelte-1i87fz7");
|
|
283
257
|
},
|
|
284
258
|
m(target, anchor) {
|
|
285
259
|
internal.insert(target, div, anchor);
|
|
@@ -326,7 +300,7 @@ class ExtraObjects extends internal.SvelteComponent {
|
|
|
326
300
|
/* src/floorplan/Components/Normalmage.svelte generated by Svelte v3.47.0 */
|
|
327
301
|
|
|
328
302
|
function add_css$5(target) {
|
|
329
|
-
internal.append_styles(target, "svelte-
|
|
303
|
+
internal.append_styles(target, "svelte-1gfoniz", "img.svelte-1gfoniz{width:100%;height:100%}");
|
|
330
304
|
}
|
|
331
305
|
|
|
332
306
|
function create_fragment$6(ctx) {
|
|
@@ -338,7 +312,7 @@ function create_fragment$6(ctx) {
|
|
|
338
312
|
img = internal.element("img");
|
|
339
313
|
if (!internal.src_url_equal(img.src, img_src_value = /*url*/ ctx[0])) internal.attr(img, "src", img_src_value);
|
|
340
314
|
internal.attr(img, "alt", "floorplan iamge");
|
|
341
|
-
internal.attr(img, "class", "svelte-
|
|
315
|
+
internal.attr(img, "class", "svelte-1gfoniz");
|
|
342
316
|
},
|
|
343
317
|
m(target, anchor) {
|
|
344
318
|
internal.insert(target, img, anchor);
|
|
@@ -376,7 +350,7 @@ class Normalmage extends internal.SvelteComponent {
|
|
|
376
350
|
/* src/floorplan/Components/SvgImage.svelte generated by Svelte v3.47.0 */
|
|
377
351
|
|
|
378
352
|
function add_css$4(target) {
|
|
379
|
-
internal.append_styles(target, "svelte-
|
|
353
|
+
internal.append_styles(target, "svelte-ub47ya", ".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}");
|
|
380
354
|
}
|
|
381
355
|
|
|
382
356
|
function create_fragment$5(ctx) {
|
|
@@ -393,7 +367,7 @@ function create_fragment$5(ctx) {
|
|
|
393
367
|
html_tag_1 = new internal.HtmlTag();
|
|
394
368
|
html_tag.a = t;
|
|
395
369
|
html_tag_1.a = null;
|
|
396
|
-
internal.attr(div, "class", "floorplan-plugin__base-image svelte-
|
|
370
|
+
internal.attr(div, "class", "floorplan-plugin__base-image svelte-ub47ya");
|
|
397
371
|
},
|
|
398
372
|
m(target, anchor) {
|
|
399
373
|
internal.insert(target, div, anchor);
|
|
@@ -423,8 +397,7 @@ function instance$5($$self, $$props, $$invalidate) {
|
|
|
423
397
|
}
|
|
424
398
|
svg [type='lineItemGroup'] g g g g {
|
|
425
399
|
stroke: #ffffff;
|
|
426
|
-
}
|
|
427
|
-
</style>
|
|
400
|
+
}</style>
|
|
428
401
|
`;
|
|
429
402
|
|
|
430
403
|
$$self.$$set = $$props => {
|
|
@@ -444,7 +417,7 @@ class SvgImage extends internal.SvelteComponent {
|
|
|
444
417
|
/* src/floorplan/Components/BaseImage.svelte generated by Svelte v3.47.0 */
|
|
445
418
|
|
|
446
419
|
function add_css$3(target) {
|
|
447
|
-
internal.append_styles(target, "svelte-
|
|
420
|
+
internal.append_styles(target, "svelte-ozpg4a", ".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
|
|
448
421
|
}
|
|
449
422
|
|
|
450
423
|
// (13:22)
|
|
@@ -540,7 +513,7 @@ function create_fragment$4(ctx) {
|
|
|
540
513
|
c() {
|
|
541
514
|
div = internal.element("div");
|
|
542
515
|
if (if_block) if_block.c();
|
|
543
|
-
internal.attr(div, "class", "floorplan-plugin__base-image svelte-
|
|
516
|
+
internal.attr(div, "class", "floorplan-plugin__base-image svelte-ozpg4a");
|
|
544
517
|
},
|
|
545
518
|
m(target, anchor) {
|
|
546
519
|
internal.insert(target, div, anchor);
|
|
@@ -663,9 +636,9 @@ function pathD(points, options = {}) {
|
|
|
663
636
|
return d + (needZ ? 'Z' : '');
|
|
664
637
|
}
|
|
665
638
|
/** 把户型图上点点位转换到 SVG 上的点位 */
|
|
666
|
-
function formatFloorplanPoint({ x, y },
|
|
639
|
+
function formatFloorplanPoint({ x, y }, bounding) {
|
|
667
640
|
const { max, min } = bounding;
|
|
668
|
-
return { x:
|
|
641
|
+
return { x: x - min.x, y: max.y - y };
|
|
669
642
|
}
|
|
670
643
|
/** 模型坐标转户型图坐标 */
|
|
671
644
|
function modelPosition2FloorplanPosition(position, floorplanData) {
|
|
@@ -696,7 +669,7 @@ function getFloorIndexFromModelPosition(position, five) {
|
|
|
696
669
|
/* src/floorplan/Components/RoomHighlight/Room.svelte generated by Svelte v3.47.0 */
|
|
697
670
|
|
|
698
671
|
function add_css$2(target) {
|
|
699
|
-
internal.append_styles(target, "svelte-
|
|
672
|
+
internal.append_styles(target, "svelte-19uvvss", "path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}");
|
|
700
673
|
}
|
|
701
674
|
|
|
702
675
|
function create_fragment$3(ctx) {
|
|
@@ -707,7 +680,7 @@ function create_fragment$3(ctx) {
|
|
|
707
680
|
path = internal.svg_element("path");
|
|
708
681
|
internal.attr(path, "d", /*_pathD*/ ctx[0]);
|
|
709
682
|
internal.attr(path, "fill", `#fff`);
|
|
710
|
-
internal.attr(path, "class", "svelte-
|
|
683
|
+
internal.attr(path, "class", "svelte-19uvvss");
|
|
711
684
|
},
|
|
712
685
|
m(target, anchor) {
|
|
713
686
|
internal.insert(target, path, anchor);
|
|
@@ -722,45 +695,43 @@ function create_fragment$3(ctx) {
|
|
|
722
695
|
}
|
|
723
696
|
|
|
724
697
|
function instance$3($$self, $$props, $$invalidate) {
|
|
725
|
-
let { pxmm } = $$props;
|
|
726
698
|
let { room } = $$props;
|
|
727
699
|
let { floorplanData } = $$props;
|
|
728
700
|
const { bounding } = floorplanData;
|
|
729
701
|
|
|
730
702
|
const _pathD = pathD(room.path, {
|
|
731
703
|
needZ: true,
|
|
732
|
-
format: vector => formatFloorplanPoint(vector,
|
|
704
|
+
format: vector => formatFloorplanPoint(vector, bounding)
|
|
733
705
|
});
|
|
734
706
|
|
|
735
707
|
$$self.$$set = $$props => {
|
|
736
|
-
if ('
|
|
737
|
-
if ('
|
|
738
|
-
if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
|
|
708
|
+
if ('room' in $$props) $$invalidate(1, room = $$props.room);
|
|
709
|
+
if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
|
|
739
710
|
};
|
|
740
711
|
|
|
741
|
-
return [_pathD,
|
|
712
|
+
return [_pathD, room, floorplanData];
|
|
742
713
|
}
|
|
743
714
|
|
|
744
715
|
class Room extends internal.SvelteComponent {
|
|
745
716
|
constructor(options) {
|
|
746
717
|
super();
|
|
747
|
-
internal.init(this, options, instance$3, create_fragment$3, internal.safe_not_equal, {
|
|
718
|
+
internal.init(this, options, instance$3, create_fragment$3, internal.safe_not_equal, { room: 1, floorplanData: 2 }, add_css$2);
|
|
748
719
|
}
|
|
749
720
|
}
|
|
750
721
|
|
|
751
722
|
/* src/floorplan/Components/RoomHighlight/RoomHighlight.svelte generated by Svelte v3.47.0 */
|
|
752
723
|
|
|
753
724
|
function add_css$1(target) {
|
|
754
|
-
internal.append_styles(target, "svelte-
|
|
725
|
+
internal.append_styles(target, "svelte-1kqo6e4", ".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}");
|
|
755
726
|
}
|
|
756
727
|
|
|
757
728
|
function get_each_context(ctx, list, i) {
|
|
758
729
|
const child_ctx = ctx.slice();
|
|
759
|
-
child_ctx[
|
|
730
|
+
child_ctx[4] = list[i];
|
|
760
731
|
return child_ctx;
|
|
761
732
|
}
|
|
762
733
|
|
|
763
|
-
// (
|
|
734
|
+
// (10:4) {#each floorplanData.floorDatas[floorIndex].rooms as room (room.id)}
|
|
764
735
|
function create_each_block(key_1, ctx) {
|
|
765
736
|
let first;
|
|
766
737
|
let room;
|
|
@@ -768,9 +739,8 @@ function create_each_block(key_1, ctx) {
|
|
|
768
739
|
|
|
769
740
|
const room_spread_levels = [
|
|
770
741
|
{
|
|
771
|
-
room: /*room*/ ctx[
|
|
772
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
773
|
-
pxmm: /*pxmm*/ ctx[0]
|
|
742
|
+
room: /*room*/ ctx[4],
|
|
743
|
+
floorplanData: /*floorplanData*/ ctx[1]
|
|
774
744
|
}
|
|
775
745
|
];
|
|
776
746
|
|
|
@@ -798,12 +768,11 @@ function create_each_block(key_1, ctx) {
|
|
|
798
768
|
p(new_ctx, dirty) {
|
|
799
769
|
ctx = new_ctx;
|
|
800
770
|
|
|
801
|
-
const room_changes = (dirty & /*floorplanData, floorIndex
|
|
771
|
+
const room_changes = (dirty & /*floorplanData, floorIndex*/ 3)
|
|
802
772
|
? internal.get_spread_update(room_spread_levels, [
|
|
803
773
|
{
|
|
804
|
-
room: /*room*/ ctx[
|
|
805
|
-
floorplanData: /*floorplanData*/ ctx[
|
|
806
|
-
pxmm: /*pxmm*/ ctx[0]
|
|
774
|
+
room: /*room*/ ctx[4],
|
|
775
|
+
floorplanData: /*floorplanData*/ ctx[1]
|
|
807
776
|
}
|
|
808
777
|
])
|
|
809
778
|
: {};
|
|
@@ -831,12 +800,9 @@ function create_fragment$2(ctx) {
|
|
|
831
800
|
let svg;
|
|
832
801
|
let each_blocks = [];
|
|
833
802
|
let each_1_lookup = new Map();
|
|
834
|
-
let div_resize_listener;
|
|
835
803
|
let current;
|
|
836
|
-
let
|
|
837
|
-
|
|
838
|
-
let each_value = /*floorplanData*/ ctx[2].floorDatas[/*floorIndex*/ ctx[1]].rooms;
|
|
839
|
-
const get_key = ctx => /*room*/ ctx[12].id;
|
|
804
|
+
let each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
|
|
805
|
+
const get_key = ctx => /*room*/ ctx[4].id;
|
|
840
806
|
|
|
841
807
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
842
808
|
let child_ctx = get_each_context(ctx, each_value, i);
|
|
@@ -853,9 +819,11 @@ function create_fragment$2(ctx) {
|
|
|
853
819
|
each_blocks[i].c();
|
|
854
820
|
}
|
|
855
821
|
|
|
856
|
-
internal.attr(svg, "
|
|
857
|
-
internal.attr(
|
|
858
|
-
internal.
|
|
822
|
+
internal.attr(svg, "width", "100%");
|
|
823
|
+
internal.attr(svg, "height", "100%");
|
|
824
|
+
internal.attr(svg, "viewBox", `0 0 ${/*boundingWidth*/ ctx[2]} ${/*boundingHeight*/ ctx[3]}`);
|
|
825
|
+
internal.attr(svg, "class", "svelte-1kqo6e4");
|
|
826
|
+
internal.attr(div, "class", "floorplan-plugin__room-highlight svelte-1kqo6e4");
|
|
859
827
|
},
|
|
860
828
|
m(target, anchor) {
|
|
861
829
|
internal.insert(target, div, anchor);
|
|
@@ -865,18 +833,11 @@ function create_fragment$2(ctx) {
|
|
|
865
833
|
each_blocks[i].m(svg, null);
|
|
866
834
|
}
|
|
867
835
|
|
|
868
|
-
/*div_binding*/ ctx[9](div);
|
|
869
|
-
div_resize_listener = internal.add_resize_listener(div, /*div_elementresize_handler*/ ctx[10].bind(div));
|
|
870
836
|
current = true;
|
|
871
|
-
|
|
872
|
-
if (!mounted) {
|
|
873
|
-
dispose = internal.listen(div, "click", /*handleClick*/ ctx[6]);
|
|
874
|
-
mounted = true;
|
|
875
|
-
}
|
|
876
837
|
},
|
|
877
838
|
p(ctx, [dirty]) {
|
|
878
|
-
if (dirty & /*floorplanData, floorIndex
|
|
879
|
-
each_value = /*floorplanData*/ ctx[
|
|
839
|
+
if (dirty & /*floorplanData, floorIndex*/ 3) {
|
|
840
|
+
each_value = /*floorplanData*/ ctx[1].floorDatas[/*floorIndex*/ ctx[0]].rooms;
|
|
880
841
|
internal.group_outros();
|
|
881
842
|
each_blocks = internal.update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, svg, internal.outro_and_destroy_block, create_each_block, null, get_each_context);
|
|
882
843
|
internal.check_outros();
|
|
@@ -904,106 +865,28 @@ function create_fragment$2(ctx) {
|
|
|
904
865
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
905
866
|
each_blocks[i].d();
|
|
906
867
|
}
|
|
907
|
-
|
|
908
|
-
/*div_binding*/ ctx[9](null);
|
|
909
|
-
div_resize_listener();
|
|
910
|
-
mounted = false;
|
|
911
|
-
dispose();
|
|
912
868
|
}
|
|
913
869
|
};
|
|
914
870
|
}
|
|
915
871
|
|
|
916
872
|
function instance$2($$self, $$props, $$invalidate) {
|
|
917
|
-
let { five } = $$props;
|
|
918
|
-
let { pxmm } = $$props;
|
|
919
873
|
let { floorIndex } = $$props;
|
|
920
874
|
let { floorplanData } = $$props;
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
let clientHeight;
|
|
924
|
-
let highlightContainerDom;
|
|
925
|
-
const { observers: floorplan_observers } = floorplanData;
|
|
926
|
-
|
|
927
|
-
const handleClick = function (e) {
|
|
928
|
-
if ((onRoomHeightClick === null || onRoomHeightClick === void 0
|
|
929
|
-
? void 0
|
|
930
|
-
: onRoomHeightClick(e)) === false) return;
|
|
931
|
-
|
|
932
|
-
// 因为 mouse.offsetX 的兼容性问题,手动计算 mouse offsetX offsetY
|
|
933
|
-
const boundingClientRect = highlightContainerDom.getBoundingClientRect();
|
|
934
|
-
|
|
935
|
-
const mouseClientVector = new three.Vector2(e.clientX, e.clientY);
|
|
936
|
-
const domTopLeftVector = new three.Vector2(boundingClientRect.left, boundingClientRect.top);
|
|
937
|
-
const mouseOffsetVector = mouseClientVector.clone().sub(domTopLeftVector);
|
|
938
|
-
|
|
939
|
-
// px 转换为 百分比
|
|
940
|
-
const mouseOffsetRelativeVector = new three.Vector2(mouseOffsetVector.x / clientWidth, mouseOffsetVector.y / clientHeight);
|
|
941
|
-
|
|
942
|
-
const closestPoint = floorplan_observers.filter(observer => observer.floorIndex === floorIndex).sort((ob1, ob2) => {
|
|
943
|
-
const position1 = new three.Vector2(ob1.positionInImage.x, ob1.positionInImage.y);
|
|
944
|
-
const position2 = new three.Vector2(ob2.positionInImage.x, ob2.positionInImage.y);
|
|
945
|
-
return position1.distanceTo(mouseOffsetRelativeVector) - position2.distanceTo(mouseOffsetRelativeVector);
|
|
946
|
-
})[0];
|
|
947
|
-
|
|
948
|
-
five.moveToPano(closestPoint.index);
|
|
949
|
-
};
|
|
950
|
-
|
|
951
|
-
function div_binding($$value) {
|
|
952
|
-
internal.binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
953
|
-
highlightContainerDom = $$value;
|
|
954
|
-
$$invalidate(5, highlightContainerDom);
|
|
955
|
-
});
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
function div_elementresize_handler() {
|
|
959
|
-
clientWidth = this.clientWidth;
|
|
960
|
-
clientHeight = this.clientHeight;
|
|
961
|
-
$$invalidate(3, clientWidth);
|
|
962
|
-
$$invalidate(4, clientHeight);
|
|
963
|
-
}
|
|
875
|
+
const boundingWidth = floorplanData.bounding.max.x - floorplanData.bounding.min.x;
|
|
876
|
+
const boundingHeight = floorplanData.bounding.max.y - floorplanData.bounding.min.y;
|
|
964
877
|
|
|
965
878
|
$$self.$$set = $$props => {
|
|
966
|
-
if ('
|
|
967
|
-
if ('
|
|
968
|
-
if ('floorIndex' in $$props) $$invalidate(1, floorIndex = $$props.floorIndex);
|
|
969
|
-
if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
|
|
970
|
-
if ('onRoomHeightClick' in $$props) $$invalidate(8, onRoomHeightClick = $$props.onRoomHeightClick);
|
|
879
|
+
if ('floorIndex' in $$props) $$invalidate(0, floorIndex = $$props.floorIndex);
|
|
880
|
+
if ('floorplanData' in $$props) $$invalidate(1, floorplanData = $$props.floorplanData);
|
|
971
881
|
};
|
|
972
882
|
|
|
973
|
-
return [
|
|
974
|
-
pxmm,
|
|
975
|
-
floorIndex,
|
|
976
|
-
floorplanData,
|
|
977
|
-
clientWidth,
|
|
978
|
-
clientHeight,
|
|
979
|
-
highlightContainerDom,
|
|
980
|
-
handleClick,
|
|
981
|
-
five,
|
|
982
|
-
onRoomHeightClick,
|
|
983
|
-
div_binding,
|
|
984
|
-
div_elementresize_handler
|
|
985
|
-
];
|
|
883
|
+
return [floorIndex, floorplanData, boundingWidth, boundingHeight];
|
|
986
884
|
}
|
|
987
885
|
|
|
988
886
|
class RoomHighlight extends internal.SvelteComponent {
|
|
989
887
|
constructor(options) {
|
|
990
888
|
super();
|
|
991
|
-
|
|
992
|
-
internal.init(
|
|
993
|
-
this,
|
|
994
|
-
options,
|
|
995
|
-
instance$2,
|
|
996
|
-
create_fragment$2,
|
|
997
|
-
internal.safe_not_equal,
|
|
998
|
-
{
|
|
999
|
-
five: 7,
|
|
1000
|
-
pxmm: 0,
|
|
1001
|
-
floorIndex: 1,
|
|
1002
|
-
floorplanData: 2,
|
|
1003
|
-
onRoomHeightClick: 8
|
|
1004
|
-
},
|
|
1005
|
-
add_css$1
|
|
1006
|
-
);
|
|
889
|
+
internal.init(this, options, instance$2, create_fragment$2, internal.safe_not_equal, { floorIndex: 0, floorplanData: 1 }, add_css$1);
|
|
1007
890
|
}
|
|
1008
891
|
}
|
|
1009
892
|
|
|
@@ -1237,7 +1120,7 @@ class CurrentFloor extends internal.SvelteComponent {
|
|
|
1237
1120
|
/* src/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte generated by Svelte v3.47.0 */
|
|
1238
1121
|
|
|
1239
1122
|
function add_css(target) {
|
|
1240
|
-
internal.append_styles(target, "svelte-
|
|
1123
|
+
internal.append_styles(target, "svelte-1mvqyqq", ".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}");
|
|
1241
1124
|
}
|
|
1242
1125
|
|
|
1243
1126
|
// (41:2) {#if clientWidth !== 0}
|
|
@@ -1292,7 +1175,7 @@ function create_if_block(ctx) {
|
|
|
1292
1175
|
internal.create_component(currentfloor.$$.fragment);
|
|
1293
1176
|
t = internal.space();
|
|
1294
1177
|
internal.create_component(camera.$$.fragment);
|
|
1295
|
-
internal.attr(div, "class", "plugin-floorplan-radar-container svelte-
|
|
1178
|
+
internal.attr(div, "class", "plugin-floorplan-radar-container svelte-1mvqyqq");
|
|
1296
1179
|
internal.set_style(div, "width", style_width, false);
|
|
1297
1180
|
internal.set_style(div, "height", style_height, false);
|
|
1298
1181
|
},
|
|
@@ -1369,7 +1252,7 @@ function create_fragment(ctx) {
|
|
|
1369
1252
|
c() {
|
|
1370
1253
|
div = internal.element("div");
|
|
1371
1254
|
if (if_block) if_block.c();
|
|
1372
|
-
internal.attr(div, "class", "plugin-floorplan-radar svelte-
|
|
1255
|
+
internal.attr(div, "class", "plugin-floorplan-radar svelte-1mvqyqq");
|
|
1373
1256
|
internal.add_render_callback(() => /*div_elementresize_handler*/ ctx[11].call(div));
|
|
1374
1257
|
},
|
|
1375
1258
|
m(target, anchor) {
|
|
@@ -1519,26 +1402,22 @@ class Main extends internal.SvelteComponent {
|
|
|
1519
1402
|
|
|
1520
1403
|
const FLOORPLAN_EXTRA_OBJECT_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIh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M52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC';
|
|
1521
1404
|
|
|
1522
|
-
function formatOutlines(outlines) {
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
const
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
url: item.url,
|
|
1530
|
-
svgUrl: item.svg_url,
|
|
1531
|
-
};
|
|
1532
|
-
if (item.svg_url) {
|
|
1533
|
-
const svgContent = yield fetch(item.svg_url, { headers }).then((res) => res.text());
|
|
1534
|
-
outlineItem.svgContent = svgContent;
|
|
1535
|
-
}
|
|
1536
|
-
return outlineItem;
|
|
1537
|
-
});
|
|
1405
|
+
async function formatOutlines(outlines) {
|
|
1406
|
+
const headers = new Headers({ 'Content-Type': 'text/plain' });
|
|
1407
|
+
const getOutlineItem = async function (item) {
|
|
1408
|
+
const outlineItem = {
|
|
1409
|
+
index: item.index,
|
|
1410
|
+
url: item.url,
|
|
1411
|
+
svgUrl: item.svg_url,
|
|
1538
1412
|
};
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1413
|
+
if (item.svg_url) {
|
|
1414
|
+
const svgContent = await fetch(item.svg_url, { headers }).then((res) => res.text());
|
|
1415
|
+
outlineItem.svgContent = svgContent;
|
|
1416
|
+
}
|
|
1417
|
+
return outlineItem;
|
|
1418
|
+
};
|
|
1419
|
+
const svgOutlineItems = await Promise.all(outlines.map(getOutlineItem));
|
|
1420
|
+
return svgOutlineItems;
|
|
1542
1421
|
}
|
|
1543
1422
|
function formatRoom(data) {
|
|
1544
1423
|
const floorplanRoomItem = {
|
|
@@ -1584,21 +1463,19 @@ function formatFloorplanEntrance(data) {
|
|
|
1584
1463
|
};
|
|
1585
1464
|
return floorplanEntrance;
|
|
1586
1465
|
}
|
|
1587
|
-
function formatData(data) {
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
return floorplanData;
|
|
1601
|
-
});
|
|
1466
|
+
async function formatData(data) {
|
|
1467
|
+
const outlines = await formatOutlines(data.outlines);
|
|
1468
|
+
const bounding = data.computed_data.bounding;
|
|
1469
|
+
const floorDatas = data.computed_data.floor_datas.map(formatFloorData);
|
|
1470
|
+
const entrance = data.computed_data.entrance ? formatFloorplanEntrance(data.computed_data.entrance) : null;
|
|
1471
|
+
const floorplanData = {
|
|
1472
|
+
outlines,
|
|
1473
|
+
entrance,
|
|
1474
|
+
bounding,
|
|
1475
|
+
floorDatas,
|
|
1476
|
+
observers: data.computed_data.observers.map(formateFloorplanObserver),
|
|
1477
|
+
};
|
|
1478
|
+
return floorplanData;
|
|
1602
1479
|
}
|
|
1603
1480
|
function formatExtraObjects(data, five, floorplanData) {
|
|
1604
1481
|
const extraObjects = data.map((object) => {
|
|
@@ -1681,9 +1558,9 @@ class PanoFloorplanRadarPluginController {
|
|
|
1681
1558
|
enumerable: true,
|
|
1682
1559
|
configurable: true,
|
|
1683
1560
|
writable: true,
|
|
1684
|
-
value: (data) =>
|
|
1561
|
+
value: async (data) => {
|
|
1685
1562
|
const copyData = JSON.parse(JSON.stringify(data));
|
|
1686
|
-
const floorplanData =
|
|
1563
|
+
const floorplanData = await formatData(copyData);
|
|
1687
1564
|
this.data = floorplanData;
|
|
1688
1565
|
// const loadImage = async () => {
|
|
1689
1566
|
// const floorIndex = this.five.work.observers[this.five.getCurrentState().panoIndex].floorIndex
|
|
@@ -1701,7 +1578,7 @@ class PanoFloorplanRadarPluginController {
|
|
|
1701
1578
|
// }
|
|
1702
1579
|
// await loadImage()
|
|
1703
1580
|
this.render();
|
|
1704
|
-
}
|
|
1581
|
+
}
|
|
1705
1582
|
});
|
|
1706
1583
|
this.five = five;
|
|
1707
1584
|
(params === null || params === void 0 ? void 0 : params.configs) && Object.assign(this.configs, params.configs);
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import type { Five } from '@realsee/five';
|
|
2
|
+
import type { FLOOR_PLAN_ATTACHED_TO } from '../constant';
|
|
2
3
|
import type { FloorplanServerData } from '../typings/floorplanServerData';
|
|
3
4
|
import type { FloorplanRoomItem } from '../typings/floorplanData';
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
/** TopviewFloorplanPlugin 配置参数 */
|
|
6
|
+
interface Configs {
|
|
6
7
|
northDesc?: string;
|
|
7
|
-
selector?: string | Element;
|
|
8
|
-
scale?: number;
|
|
9
8
|
modelOpacity?: number;
|
|
10
9
|
cameraImageUrl?: string;
|
|
10
|
+
/** 是否开启高亮房间功能,默认为 false */
|
|
11
11
|
hoverEnable?: boolean;
|
|
12
|
+
/** 是否开启放大缩小和拖动功能,默认为 false */
|
|
13
|
+
gestureEnable?: boolean;
|
|
14
|
+
/** 是否展示指南针,默认为 true */
|
|
12
15
|
compassEnable?: boolean;
|
|
13
|
-
|
|
16
|
+
/** 是否展示户型图标尺,默认为 true */
|
|
14
17
|
ruleLabelsEnable?: boolean;
|
|
18
|
+
/** 是否展示房间标签,默认为 true */
|
|
15
19
|
roomLabelsEnable?: boolean;
|
|
20
|
+
/** 点击房间时,是否需要跳转到被点房间的全景态点位上,默认为 true */
|
|
16
21
|
preventRoomClick?: boolean;
|
|
22
|
+
/** 户型图展示时,应该对应到模型的哪个位置上,默认是 BOUNDING_CENTER */
|
|
17
23
|
attachedTo?: FLOOR_PLAN_ATTACHED_TO;
|
|
24
|
+
/** 用户自定义房间标间 DOM 函数 */
|
|
18
25
|
getLabelElement?: (room: FloorplanRoomItem) => Element | null;
|
|
19
26
|
}
|
|
27
|
+
/** TopviewFloorplanPlugin 初始化参数 */
|
|
28
|
+
export interface TopviewFloorplanPluginParameterType extends Configs {
|
|
29
|
+
selector?: string | Element;
|
|
30
|
+
scale?: number;
|
|
31
|
+
}
|
|
20
32
|
export declare type TopviewFloorplanPluginReturnType = TopviewFloorplanPluginController;
|
|
21
33
|
export declare class TopviewFloorplanPluginController {
|
|
22
34
|
size: {
|
|
@@ -41,22 +53,23 @@ export declare class TopviewFloorplanPluginController {
|
|
|
41
53
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
42
54
|
appendTo(wrapper: Element): this;
|
|
43
55
|
dispose: () => void;
|
|
44
|
-
|
|
56
|
+
private onFiveWantsMoveToPano;
|
|
57
|
+
private onFiveWantsGesture;
|
|
45
58
|
private onModelShownFloorChange;
|
|
46
|
-
|
|
47
|
-
private
|
|
48
|
-
|
|
49
|
-
private
|
|
50
|
-
/** 在户型图展示时阻止 Five 滑动行为 */
|
|
51
|
-
private handleWantsPanGesture;
|
|
52
|
-
private handleModelLoaded;
|
|
59
|
+
private onFivePanoArrived;
|
|
60
|
+
private onFivePanGesture;
|
|
61
|
+
private onFivePinchGesture;
|
|
62
|
+
private onFiveModelLoaded;
|
|
53
63
|
/** 非 Topview 态隐藏户型图 */
|
|
54
|
-
private
|
|
64
|
+
private onFiveModeChange;
|
|
55
65
|
/** 动画结束后是 Topview 态就展示户型图 */
|
|
56
|
-
private
|
|
66
|
+
private onFiveInitAnimationEnded;
|
|
57
67
|
private show;
|
|
58
68
|
private hide;
|
|
59
69
|
/** 更新户型图大小 */
|
|
60
70
|
private updateSize;
|
|
71
|
+
/** 更新户型图位置 */
|
|
72
|
+
private updatePosition;
|
|
61
73
|
private render;
|
|
62
74
|
}
|
|
75
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FivePlugin } from '@realsee/five';
|
|
1
|
+
import type { FivePlugin } from '@realsee/five';
|
|
2
2
|
import { TopviewFloorplanPluginParameterType, TopviewFloorplanPluginReturnType } from './Controller';
|
|
3
3
|
export declare const TopviewFloorplanPlugin: FivePlugin<TopviewFloorplanPluginParameterType, TopviewFloorplanPluginReturnType>;
|
|
4
4
|
export default TopviewFloorplanPlugin;
|