@realsee/dnalogel 0.1.4 → 0.1.7-alpha.3
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/components/ARVideoFigure/ARVideoFigureMesh.js +56 -32
- package/components/ARVideoFigure/ARVideoFigureScene.js +30 -19
- package/components/ARVideoFigure/ImgBgTransparent.js +22 -6
- package/components/ARVideoFigure/ImgBgTransparentMesh.js +40 -30
- package/components/ARVideoFigure/fragmentShader.js +2 -0
- package/components/ARVideoFigure/index.js +22 -6
- package/components/ARVideoFigure/vertexShader.js +2 -0
- package/components/GLTFView/index.d.ts +104 -0
- package/components/GLTFView/index.js +181 -0
- package/components/GlassFilters/index.js +25 -1
- package/components/ModelView/ModelViewController.js +39 -29
- package/components/ModelView/index.js +4 -2
- package/components/PaintBrush/index.js +15 -1
- package/components/PanoTag/index.js +2 -0
- package/data/1aGKl9JmrlXMXx8d.js +2 -0
- package/data/54djM0oR6ky3Ey8e.d.ts +55 -0
- package/data/54djM0oR6ky3Ey8e.js +350 -0
- package/data/6gyq3v1verxD7JO1.js +2 -0
- package/data/8054djM0oR6ky3Ey8e.js +2 -0
- package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.js +2 -0
- package/data/PrXel3aqGbp34JQn.js +141 -1
- package/data/XJ6NMLWnkAY3Rdx8.js +2 -0
- package/data/YdoNP9K4rwQDwjJr.js +2 -0
- package/data/ZLvK29zj4L29Jowd.d.ts +55 -0
- package/data/ZLvK29zj4L29Jowd.js +372 -0
- package/data/auto3d-njL5J99VwCmnjtQElOmXQr.js +2 -0
- package/data/extrude-walls/ZLvK29zj4L29Jowd.d.ts +5 -0
- package/data/extrude-walls/ZLvK29zj4L29Jowd.js +14 -0
- package/data/extrude-walls/lo024DEgzanMj5BE.d.ts +5 -0
- package/data/extrude-walls/lo024DEgzanMj5BE.js +14 -0
- package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.js +2 -0
- package/data/lo024DEgzanMj5BE.d.ts +55 -0
- package/data/lo024DEgzanMj5BE.js +966 -0
- package/data/oPzy3ApbjjpD8YdR.js +2 -0
- package/data/qjAxMG4XbPn96wKG.js +2 -0
- package/data/rXel3aPQRRBD4JQn.js +2 -0
- package/data/vLykj3NWrllMrG06.js +337 -71
- package/data/wz0QV9KA4ugyo9ME.js +2 -0
- package/data/zxMawr9raSg8LYjG.js +2 -0
- package/examples/FiveStateController/index.js +9 -15
- package/examples/VRHouse/Mobile.js +15 -1
- package/examples/VRHouse/PC.js +15 -1
- package/examples/VRHouse/index.js +15 -1
- package/index.js +4 -2
- package/libs/gltf-viewer/Subscribe.d.ts +76 -0
- package/libs/gltf-viewer/Subscribe.js +231 -0
- package/libs/gltf-viewer/coordsMoveByOffset.d.ts +13 -0
- package/libs/gltf-viewer/coordsMoveByOffset.js +22 -0
- package/libs/gltf-viewer/coordsToDirection.d.ts +5 -0
- package/{components/PBRView/index.js → libs/gltf-viewer/coordsToDirection.js} +29 -19
- package/libs/gltf-viewer/formatRad.d.ts +1 -0
- package/libs/gltf-viewer/formatRad.js +13 -0
- package/libs/gltf-viewer/getFrameTime.d.ts +1 -0
- package/libs/gltf-viewer/getFrameTime.js +28 -0
- package/libs/gltf-viewer/index.d.ts +65 -0
- package/libs/gltf-viewer/index.js +704 -0
- package/libs/gltf-viewer/mouseWheel.d.ts +2 -0
- package/libs/gltf-viewer/mouseWheel.js +59 -0
- package/libs/gltf-viewer/requestAnimationFrame.d.ts +1 -0
- package/libs/gltf-viewer/requestAnimationFrame.js +18 -0
- package/libs/gltf-viewer/requestAnimationFrameInterval.d.ts +1 -0
- package/libs/gltf-viewer/requestAnimationFrameInterval.js +31 -0
- package/libs/gltf-viewer/uuid.d.ts +4 -0
- package/libs/gltf-viewer/uuid.js +28 -0
- package/package.json +8 -4
- package/plugins/AutoPreloadPlugin/index.js +26 -0
- package/plugins/CSS3DRenderPlugin/components/Marker/index.js +24 -16
- package/plugins/CSS3DRenderPlugin/index.js +31 -3
- package/plugins/CameraMovementPlugin/index.js +33 -9
- package/plugins/CameraMovementPlugin/typing.js +2 -0
- package/plugins/ModelChassisCompassPlugin/index.js +23 -9
- package/plugins/ModelEntryDoorGuidePlugin/index.d.ts +2 -2
- package/plugins/ModelEntryDoorGuidePlugin/index.js +43 -22
- package/plugins/ModelExtrudeWallsPlugin/index.d.ts +16 -0
- package/plugins/ModelExtrudeWallsPlugin/index.js +252 -0
- package/plugins/ModelRoomLabelPlugin/Controller.js +30 -23
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +26 -8
- package/plugins/ModelRoomLabelPlugin/RoomLabelItems.js +35 -25
- package/plugins/ModelRoomLabelPlugin/index.js +2 -0
- package/plugins/ModelRoomLabelPlugin/typings.js +2 -0
- package/plugins/ModelRoomLabelPlugin/utils/parseData.js +6 -0
- package/plugins/ModelTVVideoPlugin/index.js +100 -16
- package/plugins/ModelViewPlugin/index.js +25 -1
- package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.js +29 -25
- package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.js +15 -1
- package/plugins/PanoCursorRaycasterPlugin/index.js +13 -6
- package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.js +4 -2
- package/plugins/PanoCursorRaycasterPlugin/utils/createLine.js +15 -1
- package/plugins/PanoDoorLabelPlugin/index.js +2 -0
- package/plugins/PanoIRobotPlugin/index.js +2 -0
- package/plugins/PanoMaskSelectorPlugin/compare.js +2 -0
- package/plugins/PanoMaskSelectorPlugin/createBox.js +22 -1
- package/plugins/PanoMaskSelectorPlugin/createTextures.js +17 -1
- package/plugins/PanoMaskSelectorPlugin/fragmentShader.js +2 -0
- package/plugins/PanoMaskSelectorPlugin/index.js +88 -10
- package/plugins/PanoMaskSelectorPlugin/vertexShader.js +2 -0
- package/plugins/PanoRulerPlugin/data/roomInfo.js +2 -0
- package/plugins/PanoRulerPlugin/data/roomRules.js +2 -0
- package/plugins/PanoRulerPlugin/index.js +68 -20
- package/plugins/PanoRulerPlugin/typings.js +2 -0
- package/plugins/PanoTVVideoPlugin/index.d.ts +2 -0
- package/plugins/PanoTVVideoPlugin/index.js +108 -26
- package/plugins/TreasurePlugin/Controller.js +58 -52
- package/plugins/TreasurePlugin/TreasureFaceAnime.js +36 -21
- package/plugins/TreasurePlugin/TreasureObject.js +60 -56
- package/plugins/TreasurePlugin/TreasureOpenAnime.js +38 -19
- package/plugins/TreasurePlugin/constants.js +2 -0
- package/plugins/TreasurePlugin/index.js +2 -0
- package/plugins/TreasurePlugin/typings.js +2 -0
- package/plugins/floorplan/Assets/floorplanExtraObject.js +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/Controller.d.ts +5 -2
- package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +93 -99
- package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +25 -7
- package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +22 -8
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.js +28 -4
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +25 -5
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomMaterial.d.ts +11 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomMaterial.js +174 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RuleLabels.d.ts +8 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RuleLabels.js +179 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.d.ts +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +32 -6
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.d.ts +3 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +30 -8
- package/plugins/floorplan/ModelFloorplanPlugin/controller.style.js +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/index.js +4 -2
- package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.js +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/typings/utility.d.ts +2 -0
- package/plugins/floorplan/ModelFloorplanPlugin/typings/utility.js +7 -0
- package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +1 -1
- package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.js +3 -1
- package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +14 -22
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +25 -3
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +10 -6
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +21 -5
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.js +28 -4
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.js +22 -6
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.js +29 -19
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.js +2 -0
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.js +44 -47
- package/plugins/floorplan/PanoFloorplanRadarPlugin/index.js +4 -2
- package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +53 -58
- package/plugins/floorplan/TopviewFloorplanPlugin/index.js +2 -0
- package/plugins/floorplan/TopviewFloorplanPlugin/style.js +2 -0
- package/plugins/floorplan/components/FloorplanImage.js +15 -1
- package/plugins/floorplan/typings/floorplanData.d.ts +2 -0
- package/plugins/floorplan/typings/floorplanData.js +2 -0
- package/plugins/floorplan/typings/floorplanServerData.d.ts +2 -0
- package/plugins/floorplan/typings/floorplanServerData.js +2 -0
- package/plugins/floorplan/utils/formatData.js +30 -11
- package/plugins/floorplan/utils/formatPosition.js +10 -8
- package/shared-utils/Preloader.js +6 -0
- package/shared-utils/Subscribe.js +36 -16
- package/shared-utils/animationFrame/BetterTween.js +28 -27
- package/shared-utils/animationFrame/calculateProgress.js +2 -0
- package/shared-utils/animationFrame/formatRad.js +2 -0
- package/shared-utils/animationFrame/index.js +12 -0
- package/shared-utils/animationFrame/tween.js +17 -1
- package/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/shared-utils/{changeModelCanvansOpacity.js → changeModelCanvasOpacity.js} +16 -2
- package/shared-utils/createCanvasTextTexture.js +2 -0
- package/shared-utils/createFiveContainer.js +23 -17
- package/shared-utils/createLine/index.js +15 -1
- package/shared-utils/debounce.js +4 -0
- package/shared-utils/equal.js +15 -4
- package/shared-utils/filter.js +36 -2
- package/shared-utils/five/changeMode.js +13 -17
- package/shared-utils/five/useFivePlugin.js +2 -0
- package/shared-utils/formatRad.js +2 -0
- package/shared-utils/getPxmm.js +15 -1
- package/shared-utils/getRandomColor.js +10 -0
- package/shared-utils/isNil.js +2 -0
- package/shared-utils/isTruelyObject.js +4 -0
- package/shared-utils/math/evenNumber.js +2 -0
- package/shared-utils/math/planimetry.js +10 -0
- package/shared-utils/math/rad2Deg.js +2 -0
- package/shared-utils/nearlyEqual.js +2 -0
- package/shared-utils/nextFrame.js +2 -0
- package/shared-utils/noop.js +2 -0
- package/shared-utils/object3d2LocalMatrix.js +20 -14
- package/shared-utils/px2rem.js +10 -0
- package/shared-utils/tap.js +2 -0
- package/shared-utils/three/centerPoint.js +2 -0
- package/shared-utils/three/getExtraModelLoader.js +14 -0
- package/shared-utils/three/getNormal.js +4 -0
- package/shared-utils/three/getTextureLoader.js +16 -0
- package/shared-utils/three/loadFbxObj.js +13 -5
- package/shared-utils/three/loadTexture.d.ts +2 -2
- package/shared-utils/three/loadTexture.js +33 -6
- package/shared-utils/three/transformPositionToVector3.js +2 -0
- package/shared-utils/three/transfromToMeshBasicMaterial.js +6 -0
- package/shared-utils/throttle.js +4 -0
- package/shared-utils/to.js +8 -4
- package/shared-utils/useDebounce.js +6 -0
- package/shared-utils/useThrottle.js +6 -0
- package/shared-utils/uuid.js +8 -0
- package/shared-utils/vectorTocoordinates.js +2 -0
- package/typedoc/components.js +2 -0
- package/typedoc/libs.d.ts +1 -0
- package/typedoc/libs.js +7 -0
- package/typedoc/plugins.js +2 -0
- package/typedoc/shared-utils.js +2 -0
- package/typedoc/typings.js +2 -0
- package/typings/math.type.js +2 -0
- package/typings/utils.type.js +2 -0
- package/components/PBRView/index.d.ts +0 -14
- package/shared-utils/changeModelCanvansOpacity.d.ts +0 -2
|
@@ -1,12 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.weak-map.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.define-property.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
+
|
|
17
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
+
|
|
19
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
20
|
|
|
5
21
|
Object.defineProperty(exports, "__esModule", {
|
|
6
22
|
value: true
|
|
7
23
|
});
|
|
8
24
|
exports.TreasurePluginOpenAnime = void 0;
|
|
9
25
|
|
|
26
|
+
require("core-js/modules/es.array.filter.js");
|
|
27
|
+
|
|
28
|
+
require("core-js/modules/es.array.index-of.js");
|
|
29
|
+
|
|
30
|
+
require("core-js/modules/es.function.name.js");
|
|
31
|
+
|
|
32
|
+
require("core-js/modules/es.array.for-each.js");
|
|
33
|
+
|
|
34
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
35
|
+
|
|
36
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
37
|
+
|
|
38
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
39
|
+
|
|
40
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
41
|
+
|
|
10
42
|
var THREE = _interopRequireWildcard(require("three"));
|
|
11
43
|
|
|
12
44
|
var _BetterTween = require("../../shared-utils/animationFrame/BetterTween");
|
|
@@ -17,14 +49,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
49
|
|
|
18
50
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
51
|
|
|
20
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
-
|
|
22
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
23
|
-
|
|
24
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
25
|
-
|
|
26
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
-
|
|
28
52
|
/** 打开宝箱的动画实例
|
|
29
53
|
* @description
|
|
30
54
|
* 因为宝箱没有关闭的场景,对于一个宝箱来讲,打开后,要么销毁,要么保留当时的状态。所以不做关闭方面的兼容处理
|
|
@@ -33,13 +57,10 @@ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
|
|
|
33
57
|
function TreasurePluginOpenAnime(params) {
|
|
34
58
|
var _this = this;
|
|
35
59
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
_defineProperty(this, "clock", new THREE.Clock());
|
|
41
|
-
|
|
42
|
-
_defineProperty(this, "onPlayFinished", function () {
|
|
60
|
+
(0, _classCallCheck2["default"])(this, TreasurePluginOpenAnime);
|
|
61
|
+
(0, _defineProperty2["default"])(this, "hasPlayed", false);
|
|
62
|
+
(0, _defineProperty2["default"])(this, "clock", new THREE.Clock());
|
|
63
|
+
(0, _defineProperty2["default"])(this, "onPlayFinished", function () {
|
|
43
64
|
var _this$animationDispos;
|
|
44
65
|
|
|
45
66
|
// 销毁打开盒子动画的定时任务
|
|
@@ -63,7 +84,6 @@ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
|
|
|
63
84
|
return (_this$params$onComple = (_this$params = _this.params).onComplete) === null || _this$params$onComple === void 0 ? void 0 : _this$params$onComple.call(_this$params);
|
|
64
85
|
});
|
|
65
86
|
});
|
|
66
|
-
|
|
67
87
|
this.five = params.five;
|
|
68
88
|
this.params = params;
|
|
69
89
|
this.treasureGroup = params.treasureGroup;
|
|
@@ -73,7 +93,7 @@ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
|
|
|
73
93
|
this.action.clampWhenFinished = true;
|
|
74
94
|
}
|
|
75
95
|
|
|
76
|
-
|
|
96
|
+
(0, _createClass2["default"])(TreasurePluginOpenAnime, [{
|
|
77
97
|
key: "dispose",
|
|
78
98
|
value: function dispose() {
|
|
79
99
|
var _this$animationDispos2;
|
|
@@ -101,7 +121,6 @@ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
|
|
|
101
121
|
return true;
|
|
102
122
|
}
|
|
103
123
|
}]);
|
|
104
|
-
|
|
105
124
|
return TreasurePluginOpenAnime;
|
|
106
125
|
}();
|
|
107
126
|
|
|
@@ -8,6 +8,9 @@ export interface ModelFloorplanParameterType {
|
|
|
8
8
|
scale?: number;
|
|
9
9
|
autoShowEnable?: boolean;
|
|
10
10
|
hoverEnable?: boolean;
|
|
11
|
+
compassEnable?: boolean;
|
|
12
|
+
ruleLabelsEnable?: boolean;
|
|
13
|
+
roomLabelsEnable?: boolean;
|
|
11
14
|
cameraImage?: {
|
|
12
15
|
style: React.CSSProperties;
|
|
13
16
|
};
|
|
@@ -18,7 +21,7 @@ export interface ModelFloorplanPluginsShowOpts {
|
|
|
18
21
|
floorIndex?: number;
|
|
19
22
|
isAutoShow?: boolean;
|
|
20
23
|
modelOpacity?: number;
|
|
21
|
-
|
|
24
|
+
immediately?: boolean;
|
|
22
25
|
userAction?: boolean;
|
|
23
26
|
}
|
|
24
27
|
export declare const MODEL_FLOORPLAN_PLUGIN_NAME = "modelFloorplanPlugin";
|
|
@@ -64,7 +67,7 @@ export default class ModelFloorplanPluginController {
|
|
|
64
67
|
* 5. 如果多次调用 show 方法,参数与上次参数不一致时,上次 show Promise 会被 reject
|
|
65
68
|
* @param opts.floorIndex 楼层
|
|
66
69
|
* @param opts.modelOpacity 模型透明度
|
|
67
|
-
* @param opts.
|
|
70
|
+
* @param opts.immediately 是否立即展示
|
|
68
71
|
* @param opts.isAutoShow 是否是自动展示
|
|
69
72
|
*/
|
|
70
73
|
show: (opts?: ModelFloorplanPluginsShowOpts | undefined) => Promise<boolean>;
|
|
@@ -1,12 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.string.iterator.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.weak-map.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/es.object.define-property.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
14
|
+
|
|
15
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
16
|
+
|
|
17
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
18
|
|
|
5
19
|
Object.defineProperty(exports, "__esModule", {
|
|
6
20
|
value: true
|
|
7
21
|
});
|
|
8
22
|
exports["default"] = exports.MODEL_FLOORPLAN_PLUGIN_NAME = void 0;
|
|
9
23
|
|
|
24
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
25
|
+
|
|
26
|
+
require("core-js/modules/es.object.to-string.js");
|
|
27
|
+
|
|
28
|
+
require("core-js/modules/es.promise.js");
|
|
29
|
+
|
|
30
|
+
require("core-js/modules/es.promise.finally.js");
|
|
31
|
+
|
|
32
|
+
require("core-js/modules/es.object.assign.js");
|
|
33
|
+
|
|
34
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
35
|
+
|
|
36
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
37
|
+
|
|
38
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
39
|
+
|
|
40
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
41
|
+
|
|
42
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
43
|
+
|
|
10
44
|
var React = _interopRequireWildcard(require("react"));
|
|
11
45
|
|
|
12
46
|
var _components = _interopRequireDefault(require("./components"));
|
|
@@ -23,7 +57,7 @@ var _getPxmm = _interopRequireDefault(require("../../../shared-utils/getPxmm"));
|
|
|
23
57
|
|
|
24
58
|
var _correctFiveState = _interopRequireWildcard(require("./utils/correctFiveState"));
|
|
25
59
|
|
|
26
|
-
var
|
|
60
|
+
var _changeModelCanvasOpacity = _interopRequireDefault(require("../../../shared-utils/changeModelCanvasOpacity"));
|
|
27
61
|
|
|
28
62
|
var _controller = require("./controller.style");
|
|
29
63
|
|
|
@@ -33,36 +67,10 @@ var _five2 = require("@realsee/five");
|
|
|
33
67
|
|
|
34
68
|
var _constant = require("./utils/constant");
|
|
35
69
|
|
|
36
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
|
-
|
|
38
70
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
71
|
|
|
40
72
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
41
73
|
|
|
42
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
-
|
|
44
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
45
|
-
|
|
46
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
47
|
-
|
|
48
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
49
|
-
|
|
50
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
51
|
-
|
|
52
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
-
|
|
54
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
55
|
-
|
|
56
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
57
|
-
|
|
58
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
59
|
-
|
|
60
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
61
|
-
|
|
62
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
63
|
-
|
|
64
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
65
|
-
|
|
66
74
|
var MODEL_FLOORPLAN_PLUGIN_NAME = 'modelFloorplanPlugin';
|
|
67
75
|
exports.MODEL_FLOORPLAN_PLUGIN_NAME = MODEL_FLOORPLAN_PLUGIN_NAME;
|
|
68
76
|
|
|
@@ -74,30 +82,20 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
74
82
|
var _this = this,
|
|
75
83
|
_params$scale;
|
|
76
84
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
_defineProperty(this, "visible", false);
|
|
82
|
-
|
|
83
|
-
_defineProperty(this, "size", {
|
|
85
|
+
(0, _classCallCheck2["default"])(this, ModelFloorplanPluginController);
|
|
86
|
+
(0, _defineProperty2["default"])(this, "name", MODEL_FLOORPLAN_PLUGIN_NAME);
|
|
87
|
+
(0, _defineProperty2["default"])(this, "visible", false);
|
|
88
|
+
(0, _defineProperty2["default"])(this, "size", {
|
|
84
89
|
width: 0,
|
|
85
90
|
height: 0
|
|
86
91
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
_defineProperty(this, "configs", {});
|
|
95
|
-
|
|
96
|
-
_defineProperty(this, "lastPanoramaLongitude", 0);
|
|
97
|
-
|
|
98
|
-
_defineProperty(this, "container", document.createElement('div'));
|
|
99
|
-
|
|
100
|
-
_defineProperty(this, "dispose", function () {
|
|
92
|
+
(0, _defineProperty2["default"])(this, "pxmm", 0);
|
|
93
|
+
(0, _defineProperty2["default"])(this, "panoIndex", 0);
|
|
94
|
+
(0, _defineProperty2["default"])(this, "floorIndex", 0);
|
|
95
|
+
(0, _defineProperty2["default"])(this, "configs", {});
|
|
96
|
+
(0, _defineProperty2["default"])(this, "lastPanoramaLongitude", 0);
|
|
97
|
+
(0, _defineProperty2["default"])(this, "container", document.createElement('div'));
|
|
98
|
+
(0, _defineProperty2["default"])(this, "dispose", function () {
|
|
101
99
|
var _this$container;
|
|
102
100
|
|
|
103
101
|
var five = _this.five;
|
|
@@ -115,8 +113,7 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
115
113
|
five.off('wantsTapGesture', _this.handleWantsTapGesture);
|
|
116
114
|
five.off('modelShownFloorChange', _this.onModelShownFloorChange);
|
|
117
115
|
});
|
|
118
|
-
|
|
119
|
-
_defineProperty(this, "updateSize", function () {
|
|
116
|
+
(0, _defineProperty2["default"])(this, "updateSize", function () {
|
|
120
117
|
if (!_this.floorplanData) return;
|
|
121
118
|
if (!(0, _correctFiveState.checkShowState)(_this.five, _this.showState)) return;
|
|
122
119
|
if (!_this.container || !_this.wrapper) return; // 计算户型图展示大小
|
|
@@ -142,14 +139,13 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
142
139
|
_this.container.style.width = _width + 'px';
|
|
143
140
|
_this.container.style.height = _height + 'px';
|
|
144
141
|
});
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(opts) {
|
|
142
|
+
(0, _defineProperty2["default"])(this, "show", /*#__PURE__*/function () {
|
|
143
|
+
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(opts) {
|
|
148
144
|
var _this$five$model;
|
|
149
145
|
|
|
150
146
|
var _this$showRejection, sameWithLastOpts, showPromise;
|
|
151
147
|
|
|
152
|
-
return
|
|
148
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
153
149
|
while (1) {
|
|
154
150
|
switch (_context2.prev = _context2.next) {
|
|
155
151
|
case 0:
|
|
@@ -201,12 +197,12 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
201
197
|
case 12:
|
|
202
198
|
_this.ModelFloorplanPluginsShowOpts = opts;
|
|
203
199
|
showPromise = new Promise( /*#__PURE__*/function () {
|
|
204
|
-
var _ref2 =
|
|
200
|
+
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(resolve, reject) {
|
|
205
201
|
var _opts$modelOpacity;
|
|
206
202
|
|
|
207
203
|
var hasRejected, _yield$to, _yield$to2, correctError, modelOpacity, renderDuration;
|
|
208
204
|
|
|
209
|
-
return
|
|
205
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
210
206
|
while (1) {
|
|
211
207
|
switch (_context.prev = _context.next) {
|
|
212
208
|
case 0:
|
|
@@ -214,7 +210,7 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
214
210
|
|
|
215
211
|
_this.showRejection = function (errorMsg) {
|
|
216
212
|
hasRejected = true;
|
|
217
|
-
reject(errorMsg ? new Error(errorMsg) : new Error(_constant.FloorplanErrorType.
|
|
213
|
+
reject(errorMsg ? new Error(errorMsg) : new Error(_constant.FloorplanErrorType.UnknownError));
|
|
218
214
|
};
|
|
219
215
|
|
|
220
216
|
_context.next = 4;
|
|
@@ -222,7 +218,7 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
222
218
|
|
|
223
219
|
case 4:
|
|
224
220
|
_yield$to = _context.sent;
|
|
225
|
-
_yield$to2 =
|
|
221
|
+
_yield$to2 = (0, _slicedToArray2["default"])(_yield$to, 1);
|
|
226
222
|
correctError = _yield$to2[0];
|
|
227
223
|
|
|
228
224
|
if (!correctError) {
|
|
@@ -238,7 +234,7 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
238
234
|
break;
|
|
239
235
|
}
|
|
240
236
|
|
|
241
|
-
return _context.abrupt("return", reject(new Error(_constant.FloorplanErrorType.
|
|
237
|
+
return _context.abrupt("return", reject(new Error(_constant.FloorplanErrorType.UnknownError)));
|
|
242
238
|
|
|
243
239
|
case 11:
|
|
244
240
|
if (_this.visible) {
|
|
@@ -246,7 +242,7 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
246
242
|
break;
|
|
247
243
|
}
|
|
248
244
|
|
|
249
|
-
return _context.abrupt("return", reject(new Error(_constant.FloorplanErrorType.
|
|
245
|
+
return _context.abrupt("return", reject(new Error(_constant.FloorplanErrorType.UnknownError)));
|
|
250
246
|
|
|
251
247
|
case 13:
|
|
252
248
|
// 更新户型图状态
|
|
@@ -263,8 +259,8 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
263
259
|
|
|
264
260
|
|
|
265
261
|
modelOpacity = (_opts$modelOpacity = opts === null || opts === void 0 ? void 0 : opts.modelOpacity) !== null && _opts$modelOpacity !== void 0 ? _opts$modelOpacity : 0.01;
|
|
266
|
-
renderDuration = opts !== null && opts !== void 0 && opts.
|
|
267
|
-
(0,
|
|
262
|
+
renderDuration = opts !== null && opts !== void 0 && opts.immediately ? 0 : _constant.SHOW_ANIME_DURATION;
|
|
263
|
+
(0, _changeModelCanvasOpacity["default"])(_this.five, modelOpacity, renderDuration);
|
|
268
264
|
|
|
269
265
|
_this.render(renderDuration); // 展示之后的事件监听
|
|
270
266
|
|
|
@@ -320,8 +316,7 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
320
316
|
return _ref.apply(this, arguments);
|
|
321
317
|
};
|
|
322
318
|
}());
|
|
323
|
-
|
|
324
|
-
_defineProperty(this, "hide", function (options) {
|
|
319
|
+
(0, _defineProperty2["default"])(this, "hide", function (options) {
|
|
325
320
|
var _this$showRejection2, _options$userAction;
|
|
326
321
|
|
|
327
322
|
if (_this.size.width === 0) return true;
|
|
@@ -334,7 +329,7 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
334
329
|
|
|
335
330
|
_this.visible = false;
|
|
336
331
|
(_this$showRejection2 = _this.showRejection) === null || _this$showRejection2 === void 0 ? void 0 : _this$showRejection2.call(_this, _constant.FloorplanErrorType.BreakOffByHide);
|
|
337
|
-
(0,
|
|
332
|
+
(0, _changeModelCanvasOpacity["default"])(_this.five, 1, 0);
|
|
338
333
|
|
|
339
334
|
_this.render();
|
|
340
335
|
|
|
@@ -345,15 +340,13 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
345
340
|
|
|
346
341
|
return true;
|
|
347
342
|
});
|
|
348
|
-
|
|
349
|
-
_defineProperty(this, "onModelShownFloorChange", function (shownFloor) {
|
|
343
|
+
(0, _defineProperty2["default"])(this, "onModelShownFloorChange", function (shownFloor) {
|
|
350
344
|
if (shownFloor === null) return;
|
|
351
345
|
_this.floorIndex = shownFloor;
|
|
352
346
|
|
|
353
347
|
_this.render();
|
|
354
348
|
});
|
|
355
|
-
|
|
356
|
-
_defineProperty(this, "handleModelLoaded", function () {
|
|
349
|
+
(0, _defineProperty2["default"])(this, "handleModelLoaded", function () {
|
|
357
350
|
if (_this.wrapper) return;
|
|
358
351
|
if (!_this.selector) return;
|
|
359
352
|
var wrapper = _this.selector instanceof Element ? _this.selector : document.querySelector(_this.selector);
|
|
@@ -361,28 +354,24 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
361
354
|
_this.wrapper = wrapper;
|
|
362
355
|
wrapper.append(_this.container);
|
|
363
356
|
});
|
|
364
|
-
|
|
365
|
-
_defineProperty(this, "handleClick", function () {
|
|
357
|
+
(0, _defineProperty2["default"])(this, "handleClick", function () {
|
|
366
358
|
if (!_this.visible) return;
|
|
367
359
|
|
|
368
360
|
var prevented = _this.hooks.emit('click');
|
|
369
361
|
|
|
370
362
|
if (prevented) return false;
|
|
371
363
|
});
|
|
372
|
-
|
|
373
|
-
_defineProperty(this, "handleWantsTapGesture", function () {
|
|
364
|
+
(0, _defineProperty2["default"])(this, "handleWantsTapGesture", function () {
|
|
374
365
|
return _this.handleClick();
|
|
375
366
|
});
|
|
376
|
-
|
|
377
|
-
_defineProperty(this, "handleWantsChangeMode", function (mode) {
|
|
367
|
+
(0, _defineProperty2["default"])(this, "handleWantsChangeMode", function (mode) {
|
|
378
368
|
if (mode !== 'Panorama') {
|
|
379
369
|
_this.lastPanoramaLongitude = _this.five.getCurrentState().longitude;
|
|
380
370
|
}
|
|
381
371
|
|
|
382
372
|
if (mode !== 'Floorplan') _this.hide();
|
|
383
373
|
});
|
|
384
|
-
|
|
385
|
-
_defineProperty(this, "handleModeChange", function (mode) {
|
|
374
|
+
(0, _defineProperty2["default"])(this, "handleModeChange", function (mode) {
|
|
386
375
|
if (mode === 'Floorplan') {
|
|
387
376
|
_this.five.on('panGesture', _this.handlePanGesture);
|
|
388
377
|
} else {
|
|
@@ -391,29 +380,25 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
391
380
|
_this.five.off('panGesture', _this.handlePanGesture);
|
|
392
381
|
}
|
|
393
382
|
});
|
|
394
|
-
|
|
395
|
-
_defineProperty(this, "handlePanoArrived", function (index) {
|
|
383
|
+
(0, _defineProperty2["default"])(this, "handlePanoArrived", function (index) {
|
|
396
384
|
var _this$five;
|
|
397
385
|
|
|
398
386
|
if (!((_this$five = _this.five) !== null && _this$five !== void 0 && _this$five.work)) return;
|
|
399
387
|
_this.panoIndex = index;
|
|
400
388
|
_this.floorIndex = _this.five.work.observers[index].floorIndex;
|
|
401
389
|
});
|
|
402
|
-
|
|
403
|
-
_defineProperty(this, "handleWantsInteriaPan", function () {
|
|
390
|
+
(0, _defineProperty2["default"])(this, "handleWantsInteriaPan", function () {
|
|
404
391
|
if (_this.visible) return false;
|
|
405
392
|
});
|
|
406
|
-
|
|
407
|
-
_defineProperty(this, "handleWantsGesture", function (type, pointers) {
|
|
393
|
+
(0, _defineProperty2["default"])(this, "handleWantsGesture", function (type, pointers) {
|
|
408
394
|
if (!_this.visible) return;
|
|
409
395
|
if (pointers.length > 1) return false;
|
|
410
396
|
if (type === 'mouseWheel') return false;
|
|
411
397
|
});
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(_ref3, isFinal) {
|
|
398
|
+
(0, _defineProperty2["default"])(this, "handlePanGesture", /*#__PURE__*/function () {
|
|
399
|
+
var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(_ref3, isFinal) {
|
|
415
400
|
var latitude, longitude, latitudeHide, longitudeHide, canHide, latitudeVisible, longitudeVisible, handleInteriaPan;
|
|
416
|
-
return
|
|
401
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
417
402
|
while (1) {
|
|
418
403
|
switch (_context4.prev = _context4.next) {
|
|
419
404
|
case 0:
|
|
@@ -471,8 +456,8 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
471
456
|
|
|
472
457
|
// 当手指离开时需要等惯性结束之后在进行判断
|
|
473
458
|
handleInteriaPan = /*#__PURE__*/function () {
|
|
474
|
-
var _ref5 =
|
|
475
|
-
return
|
|
459
|
+
var _ref5 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(any, isFinal) {
|
|
460
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
476
461
|
while (1) {
|
|
477
462
|
switch (_context3.prev = _context3.next) {
|
|
478
463
|
case 0:
|
|
@@ -520,7 +505,6 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
520
505
|
return _ref4.apply(this, arguments);
|
|
521
506
|
};
|
|
522
507
|
}());
|
|
523
|
-
|
|
524
508
|
this.five = _five;
|
|
525
509
|
this.hooks = new _five2.Subscribe();
|
|
526
510
|
this.selector = params.selector;
|
|
@@ -551,14 +535,14 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
551
535
|
_five.on('modelShownFloorChange', this.onModelShownFloorChange);
|
|
552
536
|
}
|
|
553
537
|
|
|
554
|
-
|
|
538
|
+
(0, _createClass2["default"])(ModelFloorplanPluginController, [{
|
|
555
539
|
key: "load",
|
|
556
540
|
value:
|
|
557
541
|
/** 加载户型图数据 */
|
|
558
542
|
function () {
|
|
559
|
-
var _load =
|
|
543
|
+
var _load = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(data) {
|
|
560
544
|
var copyData;
|
|
561
|
-
return
|
|
545
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
562
546
|
while (1) {
|
|
563
547
|
switch (_context5.prev = _context5.next) {
|
|
564
548
|
case 0:
|
|
@@ -617,7 +601,15 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
617
601
|
key: "render",
|
|
618
602
|
value: function render(duration) {
|
|
619
603
|
if (!this.container) return;
|
|
620
|
-
if (this.size.width === 0) return;
|
|
604
|
+
if (this.size.width === 0) return; // eslint-disable-next-line prettier/prettier
|
|
605
|
+
|
|
606
|
+
var _this$configs = this.configs,
|
|
607
|
+
cameraImage = _this$configs.cameraImage,
|
|
608
|
+
hoverEnable = _this$configs.hoverEnable,
|
|
609
|
+
getLabelElement = _this$configs.getLabelElement,
|
|
610
|
+
roomLabelsEnable = _this$configs.roomLabelsEnable,
|
|
611
|
+
compassEnable = _this$configs.compassEnable,
|
|
612
|
+
ruleLabelsEnable = _this$configs.ruleLabelsEnable;
|
|
621
613
|
var props = {
|
|
622
614
|
five: this.five,
|
|
623
615
|
pxmm: this.pxmm,
|
|
@@ -627,16 +619,18 @@ var ModelFloorplanPluginController = /*#__PURE__*/function () {
|
|
|
627
619
|
floorIndex: this.floorIndex,
|
|
628
620
|
floorplanData: this.floorplanData,
|
|
629
621
|
onRoomHeightClick: this.handleClick,
|
|
630
|
-
cameraImage:
|
|
631
|
-
hoverEnable:
|
|
632
|
-
getLabelElement:
|
|
622
|
+
cameraImage: cameraImage,
|
|
623
|
+
hoverEnable: hoverEnable !== null && hoverEnable !== void 0 ? hoverEnable : true,
|
|
624
|
+
getLabelElement: getLabelElement,
|
|
625
|
+
roomLabelsEnable: roomLabelsEnable !== null && roomLabelsEnable !== void 0 ? roomLabelsEnable : true,
|
|
626
|
+
compassEnable: compassEnable !== null && compassEnable !== void 0 ? compassEnable : true,
|
|
627
|
+
ruleLabelsEnable: ruleLabelsEnable !== null && ruleLabelsEnable !== void 0 ? ruleLabelsEnable : true,
|
|
633
628
|
lastPanoramaLongitude: this.lastPanoramaLongitude
|
|
634
629
|
};
|
|
635
630
|
|
|
636
631
|
_reactDom["default"].render( /*#__PURE__*/React.createElement(_components["default"], props), this.container);
|
|
637
632
|
}
|
|
638
633
|
}]);
|
|
639
|
-
|
|
640
634
|
return ModelFloorplanPluginController;
|
|
641
635
|
}();
|
|
642
636
|
|
|
@@ -1,20 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.object.to-string.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.string.iterator.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.weak-map.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.define-property.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
+
|
|
17
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
18
|
+
|
|
19
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
20
|
|
|
5
21
|
Object.defineProperty(exports, "__esModule", {
|
|
6
22
|
value: true
|
|
7
23
|
});
|
|
8
24
|
exports["default"] = Camera;
|
|
9
25
|
|
|
26
|
+
require("core-js/modules/es.array.concat.js");
|
|
27
|
+
|
|
28
|
+
require("core-js/modules/es.object.assign.js");
|
|
29
|
+
|
|
10
30
|
var React = _interopRequireWildcard(require("react"));
|
|
11
31
|
|
|
12
32
|
var _px2rem = _interopRequireDefault(require("../../../../shared-utils/px2rem"));
|
|
13
33
|
|
|
14
34
|
var _rad2Deg = _interopRequireDefault(require("../../../../shared-utils/math/rad2Deg"));
|
|
15
35
|
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
18
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
37
|
|
|
20
38
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -39,10 +57,10 @@ function Camera(props) {
|
|
|
39
57
|
var size = bodyWidth < 500 || bodyHeight < 500 ? 17 : 37;
|
|
40
58
|
var rotateBaseStyle = {
|
|
41
59
|
position: 'absolute',
|
|
42
|
-
left:
|
|
43
|
-
top:
|
|
44
|
-
width:
|
|
45
|
-
height:
|
|
60
|
+
left: (0, _px2rem["default"])(-15),
|
|
61
|
+
top: (0, _px2rem["default"])(-15),
|
|
62
|
+
width: (0, _px2rem["default"])(size),
|
|
63
|
+
height: (0, _px2rem["default"])(size),
|
|
46
64
|
transformOrigin: "".concat((0, _px2rem["default"])(15), " ").concat((0, _px2rem["default"])(15)),
|
|
47
65
|
transform: "rotate(".concat(rotate, "deg)"),
|
|
48
66
|
backgroundImage: "url('//vrlab-image4.ljcdn.com/release/web/default-sidemap-camera.c9772225.png')",
|