@realsee/dnalogel 0.1.5 → 0.1.7-alpha.4
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/GLTFView/index.d.ts +104 -0
- package/components/GLTFView/index.js +181 -0
- package/data/81zxMaeVKLQU93OZMG.d.ts +49 -0
- package/data/81zxMaeVKLQU93OZMG.js +633 -0
- package/data/PrXel3aqGbp34JQn.js +139 -1
- package/data/vLykj3NWrllMrG06.js +335 -71
- 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} +14 -18
- 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 +69 -0
- package/libs/gltf-viewer/index.js +744 -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 +5 -4
- package/plugins/ModelEntryDoorGuidePlugin/index.d.ts +6 -2
- package/plugins/ModelEntryDoorGuidePlugin/index.js +22 -14
- package/plugins/ModelRoomLabelPlugin/Controller.js +1 -0
- package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +5 -5
- package/plugins/ModelRoomLabelPlugin/index.d.ts +4 -0
- package/plugins/ModelRoomLabelPlugin/index.js +7 -2
- package/plugins/PanoMaskSelectorPlugin/createBox.js +3 -0
- package/plugins/PanoMaskSelectorPlugin/index.js +3 -1
- package/plugins/PanoMeasurePlugin/Controller/BaseController.d.ts +36 -0
- package/plugins/PanoMeasurePlugin/Controller/BaseController.js +103 -0
- package/plugins/PanoMeasurePlugin/Controller/EditController.d.ts +52 -0
- package/plugins/PanoMeasurePlugin/Controller/EditController.js +341 -0
- package/plugins/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
- package/plugins/PanoMeasurePlugin/Controller/ShortcutKeyController.js +69 -0
- package/plugins/PanoMeasurePlugin/Controller/WatchController.d.ts +25 -0
- package/plugins/PanoMeasurePlugin/Controller/WatchController.js +371 -0
- package/plugins/PanoMeasurePlugin/Controller/index.d.ts +61 -0
- package/plugins/PanoMeasurePlugin/Controller/index.js +230 -0
- package/plugins/PanoMeasurePlugin/Model/index.d.ts +38 -0
- package/plugins/PanoMeasurePlugin/Model/index.js +235 -0
- package/plugins/PanoMeasurePlugin/Model/line.d.ts +30 -0
- package/plugins/PanoMeasurePlugin/Model/line.js +121 -0
- package/plugins/PanoMeasurePlugin/Model/point.d.ts +16 -0
- package/plugins/PanoMeasurePlugin/Model/point.js +68 -0
- package/plugins/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
- package/plugins/PanoMeasurePlugin/Model/polyline.js +109 -0
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +11 -0
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +11 -0
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +11 -0
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +22 -0
- package/plugins/PanoMeasurePlugin/Modules/DeleteDom/index.js +182 -0
- package/plugins/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
- package/plugins/PanoMeasurePlugin/Modules/FiveHelper.js +66 -0
- package/plugins/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
- package/plugins/PanoMeasurePlugin/Modules/GuideController.js +107 -0
- package/plugins/PanoMeasurePlugin/Modules/Magnifier.d.ts +24 -0
- package/plugins/PanoMeasurePlugin/Modules/Magnifier.js +139 -0
- package/plugins/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +6 -0
- package/plugins/PanoMeasurePlugin/Modules/UIController/HTML.js +26 -0
- package/plugins/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +18 -0
- package/plugins/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +169 -0
- package/plugins/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +12 -0
- package/plugins/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +59 -0
- package/plugins/PanoMeasurePlugin/Modules/UIController/index.d.ts +16 -0
- package/plugins/PanoMeasurePlugin/Modules/UIController/index.js +123 -0
- package/plugins/PanoMeasurePlugin/Modules/UIController/style.d.ts +17 -0
- package/plugins/PanoMeasurePlugin/Modules/UIController/style.js +103 -0
- package/plugins/PanoMeasurePlugin/index.d.ts +7 -0
- package/plugins/PanoMeasurePlugin/index.js +20 -0
- package/plugins/PanoMeasurePlugin/typings/data.d.ts +28 -0
- package/plugins/PanoMeasurePlugin/typings/data.js +7 -0
- package/plugins/PanoMeasurePlugin/typings/event.type.d.ts +28 -0
- package/plugins/PanoMeasurePlugin/typings/event.type.js +7 -0
- package/plugins/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/plugins/PanoMeasurePlugin/typings/utils.type.js +7 -0
- package/plugins/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/plugins/PanoMeasurePlugin/utils/clearGroup.js +16 -0
- package/plugins/PanoMeasurePlugin/utils/constants.d.ts +4 -0
- package/plugins/PanoMeasurePlugin/utils/constants.js +47 -0
- package/plugins/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
- package/plugins/PanoMeasurePlugin/utils/distanceDom.js +147 -0
- package/plugins/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
- package/plugins/PanoMeasurePlugin/utils/findAssociatedLines.js +37 -0
- package/plugins/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
- package/plugins/PanoMeasurePlugin/utils/findClosestPoint.js +49 -0
- package/plugins/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
- package/plugins/PanoMeasurePlugin/utils/getIntersectionFromEvent.js +20 -0
- package/plugins/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
- package/plugins/PanoMeasurePlugin/utils/getPointFromHammerEvent.js +33 -0
- package/plugins/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
- package/plugins/PanoMeasurePlugin/utils/ironbox.js +14 -0
- package/plugins/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
- package/plugins/PanoMeasurePlugin/utils/isNDCPointInScreen.js +16 -0
- package/plugins/PanoMeasurePlugin/utils/line.d.ts +17 -0
- package/plugins/PanoMeasurePlugin/utils/line.js +61 -0
- package/plugins/PanoMeasurePlugin/utils/math.d.ts +17 -0
- package/plugins/PanoMeasurePlugin/utils/math.js +57 -0
- package/plugins/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -0
- package/plugins/PanoMeasurePlugin/utils/mouseGroup.js +42 -0
- package/plugins/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
- package/plugins/PanoMeasurePlugin/utils/ndc2Screen.js +16 -0
- package/plugins/PanoRulerPlugin/index.d.ts +4 -0
- package/plugins/PanoRulerPlugin/index.js +6 -1
- package/plugins/PanoTVVideoPlugin/index.d.ts +2 -0
- package/plugins/PanoTVVideoPlugin/index.js +20 -14
- package/plugins/floorplan/ModelFloorplanPlugin/Controller.d.ts +5 -2
- package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +22 -11
- package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +4 -4
- package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +5 -5
- package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +2 -2
- 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 +14 -2
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.d.ts +3 -0
- package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +1 -1
- 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 +1 -1
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +1 -0
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +4 -4
- package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +2 -2
- package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +3 -3
- package/plugins/floorplan/index.d.ts +4 -0
- package/plugins/floorplan/index.js +13 -0
- package/plugins/floorplan/typings/floorplanData.d.ts +2 -0
- package/plugins/floorplan/typings/floorplanServerData.d.ts +2 -0
- package/plugins/floorplan/utils/formatData.js +2 -1
- package/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
- package/shared-utils/{changeModelCanvansOpacity.js → changeModelCanvasOpacity.js} +2 -2
- package/shared-utils/removeArrayItem.d.ts +7 -0
- package/shared-utils/removeArrayItem.js +22 -0
- package/shared-utils/three/loadTexture.d.ts +2 -2
- package/shared-utils/three/loadTexture.js +21 -2
- package/typedoc/libs.d.ts +1 -0
- package/typedoc/libs.js +7 -0
- package/components/PBRView/index.d.ts +0 -14
- package/shared-utils/changeModelCanvansOpacity.d.ts +0 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.addMouseWheel = addMouseWheel;
|
|
9
|
+
exports.removeMouseWheel = removeMouseWheel;
|
|
10
|
+
// 兼容 滚轮事件
|
|
11
|
+
var _document = document;
|
|
12
|
+
var _window = window;
|
|
13
|
+
var eventName = _document.mozFullScreen ? 'DOMMouseScroll' : 'mousewheel';
|
|
14
|
+
var isW3cEvent = !!window.addEventListener;
|
|
15
|
+
var isIEEvent = !!_window.attachEvent;
|
|
16
|
+
|
|
17
|
+
function fnWrapper(element, fn) {
|
|
18
|
+
return fn.__mouseWheelWrapper = function (event) {
|
|
19
|
+
event = event || window.event;
|
|
20
|
+
|
|
21
|
+
if (isW3cEvent) {
|
|
22
|
+
event.preventDefault();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (isIEEvent) {
|
|
26
|
+
event.returnValue = false;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (eventName == 'DOMMouseScroll' || eventName == 'mousewheel') {
|
|
30
|
+
event.delta = event.wheelDelta ? event.wheelDelta / 120 : -(event.detail || 0) / 3;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
fn.call(element, event);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function addMouseWheel(element, fn) {
|
|
38
|
+
var __mouseWheelWrapper = fnWrapper(element, fn);
|
|
39
|
+
|
|
40
|
+
if (isW3cEvent) {
|
|
41
|
+
element.addEventListener(eventName, __mouseWheelWrapper, false);
|
|
42
|
+
} else if (isIEEvent) {
|
|
43
|
+
var _element = element;
|
|
44
|
+
|
|
45
|
+
_element.attachEvent('on' + eventName, __mouseWheelWrapper);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function removeMouseWheel(element, fn) {
|
|
50
|
+
if (isW3cEvent) {
|
|
51
|
+
element.removeEventListener(eventName, fn.__mouseWheelWrapper, false);
|
|
52
|
+
} else if (isIEEvent) {
|
|
53
|
+
var _element = element;
|
|
54
|
+
|
|
55
|
+
_element.detachEvent('on' + eventName, fn.__mouseWheelWrapper);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
delete fn.__mouseWheelWrapper;
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const requestAnimationFrame: ((callback: FrameRequestCallback) => number) & typeof globalThis.requestAnimationFrame;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.requestAnimationFrame = void 0;
|
|
9
|
+
|
|
10
|
+
require("core-js/modules/web.timers.js");
|
|
11
|
+
|
|
12
|
+
var _window = window;
|
|
13
|
+
|
|
14
|
+
var requestAnimationFrame = window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame || _window.msRequestAnimationFrame || function (fn) {
|
|
15
|
+
return setTimeout(fn, 16);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.requestAnimationFrame = requestAnimationFrame;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function requestAnimationFrameInterval(fn: any, context?: any, args?: any[]): () => void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.requestAnimationFrameInterval = requestAnimationFrameInterval;
|
|
11
|
+
|
|
12
|
+
require("core-js/modules/es.array.concat.js");
|
|
13
|
+
|
|
14
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
15
|
+
|
|
16
|
+
var _requestAnimationFrame = require("./requestAnimationFrame");
|
|
17
|
+
|
|
18
|
+
function requestAnimationFrameInterval(fn, context) {
|
|
19
|
+
var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
20
|
+
var stoped = false;
|
|
21
|
+
|
|
22
|
+
var _loop = function loop(time) {
|
|
23
|
+
if (fn) fn.call.apply(fn, [context, time].concat((0, _toConsumableArray2["default"])(args)));
|
|
24
|
+
if (!stoped && _loop) (0, _requestAnimationFrame.requestAnimationFrame)(_loop);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
(0, _requestAnimationFrame.requestAnimationFrame)(_loop);
|
|
28
|
+
return function () {
|
|
29
|
+
_loop = null, stoped = true;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = uuid;
|
|
9
|
+
|
|
10
|
+
require("core-js/modules/es.date.to-string.js");
|
|
11
|
+
|
|
12
|
+
require("core-js/modules/es.object.to-string.js");
|
|
13
|
+
|
|
14
|
+
require("core-js/modules/es.regexp.to-string.js");
|
|
15
|
+
|
|
16
|
+
// uuid
|
|
17
|
+
function S4() {
|
|
18
|
+
return ((1 + Math.random()) * 0x10000 | 0).toString(16).substring(1);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 随机生成一个uuid值
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
function uuid() {
|
|
26
|
+
// then to call it, plus stitch in '4' in the third group
|
|
27
|
+
return (S4() + S4() + '-' + S4() + '-4' + S4().substr(0, 3) + '-' + S4() + '-' + S4() + S4() + S4()).toLowerCase();
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@realsee/dnalogel",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "如视前端
|
|
3
|
+
"version": "0.1.7-alpha.4",
|
|
4
|
+
"description": "如视前端 Components、Plugins 兼部分 SDKs \"Dnalogel\" 库。",
|
|
5
5
|
"author": "BEIKE REALSEE TECHNOLOGY (HK) LIMITED",
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@realsee/five": "^5.0.0-alpha.
|
|
7
|
+
"@realsee/five": "^5.0.0-alpha.84",
|
|
8
8
|
"@tweenjs/tween.js": "^18.6.4",
|
|
9
9
|
"@types/styled-jsx": "^2.2.9",
|
|
10
|
+
"hammerjs": "^2.0.8",
|
|
10
11
|
"react": "^16.14.0",
|
|
11
12
|
"styled-jsx": "^3.4.6",
|
|
12
13
|
"three": "0.117.1",
|
|
@@ -19,4 +20,4 @@
|
|
|
19
20
|
"dependencies": {
|
|
20
21
|
"core-js": "^3.20.0"
|
|
21
22
|
}
|
|
22
|
-
}
|
|
23
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { FivePlugin } from '@realsee/five';
|
|
2
2
|
import { Vector3Position } from '../../typings/math.type';
|
|
3
3
|
export interface ModelEntryDoorGuidePluginData {
|
|
4
|
-
position
|
|
5
|
-
rad
|
|
4
|
+
position?: Vector3Position;
|
|
5
|
+
rad?: number;
|
|
6
6
|
fbx_url?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare type ModelEntryDoorGuidePluginParameterType = {
|
|
@@ -19,4 +19,8 @@ export interface ModelEntryDoorGuidePluginExportType {
|
|
|
19
19
|
* 模型入户门引导插件
|
|
20
20
|
*/
|
|
21
21
|
declare const ModelEntryDoorGuidePlugin: FivePlugin<ModelEntryDoorGuidePluginParameterType, ModelEntryDoorGuidePluginExportType>;
|
|
22
|
+
export declare const modelEntryDoorGuidePluginServerParams: {
|
|
23
|
+
name: string;
|
|
24
|
+
version: number;
|
|
25
|
+
};
|
|
22
26
|
export default ModelEntryDoorGuidePlugin;
|
|
@@ -19,7 +19,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
19
19
|
Object.defineProperty(exports, "__esModule", {
|
|
20
20
|
value: true
|
|
21
21
|
});
|
|
22
|
-
exports["default"] = void 0;
|
|
22
|
+
exports.modelEntryDoorGuidePluginServerParams = exports["default"] = void 0;
|
|
23
23
|
|
|
24
24
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
25
25
|
|
|
@@ -61,38 +61,40 @@ var ModelEntryDoorGuidePlugin = function ModelEntryDoorGuidePlugin(five, params)
|
|
|
61
61
|
|
|
62
62
|
var load = /*#__PURE__*/function () {
|
|
63
63
|
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(data) {
|
|
64
|
-
var _data$position, _data$
|
|
64
|
+
var _data$position, _data$rad, _data$fbx_url, _object$children, _object$children$, _object$children$$chi, _object$children$$chi2;
|
|
65
65
|
|
|
66
|
-
var modelPosition, rad, fbxUrl, object, textMesh;
|
|
66
|
+
var position, modelPosition, rad, fbxUrl, object, textMesh;
|
|
67
67
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
68
68
|
while (1) {
|
|
69
69
|
switch (_context.prev = _context.next) {
|
|
70
70
|
case 0:
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
position = (_data$position = data === null || data === void 0 ? void 0 : data.position) !== null && _data$position !== void 0 ? _data$position : defaultModelPosition;
|
|
72
|
+
|
|
73
|
+
if (position) {
|
|
74
|
+
_context.next = 3;
|
|
73
75
|
break;
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
return _context.abrupt("return", Promise.reject("ModelEntryDoorGuidePlugin.load(): position is undefined"));
|
|
77
79
|
|
|
78
|
-
case
|
|
79
|
-
modelPosition = (0, _transformPositionToVector["default"])(
|
|
80
|
+
case 3:
|
|
81
|
+
modelPosition = (0, _transformPositionToVector["default"])(position);
|
|
80
82
|
rad = (_data$rad = data === null || data === void 0 ? void 0 : data.rad) !== null && _data$rad !== void 0 ? _data$rad : defaultRad;
|
|
81
83
|
fbxUrl = (_data$fbx_url = data === null || data === void 0 ? void 0 : data.fbx_url) !== null && _data$fbx_url !== void 0 ? _data$fbx_url : defaultFbxUrl;
|
|
82
84
|
state.rad = rad;
|
|
83
85
|
|
|
84
86
|
if (!(rad === undefined)) {
|
|
85
|
-
_context.next =
|
|
87
|
+
_context.next = 9;
|
|
86
88
|
break;
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
return _context.abrupt("return", Promise.reject("ModelEntryDoorGuidePlugin.load(): rad is ".concat(rad)));
|
|
90
92
|
|
|
91
|
-
case
|
|
92
|
-
_context.next =
|
|
93
|
+
case 9:
|
|
94
|
+
_context.next = 11;
|
|
93
95
|
return new _FBXLoader.FBXLoader().loadAsync(fbxUrl);
|
|
94
96
|
|
|
95
|
-
case
|
|
97
|
+
case 11:
|
|
96
98
|
object = _context.sent;
|
|
97
99
|
// 设置位置
|
|
98
100
|
object.position.copy(modelPosition);
|
|
@@ -105,13 +107,13 @@ var ModelEntryDoorGuidePlugin = function ModelEntryDoorGuidePlugin(five, params)
|
|
|
105
107
|
textMesh = (_object$children = object.children) === null || _object$children === void 0 ? void 0 : (_object$children$ = _object$children[0]) === null || _object$children$ === void 0 ? void 0 : (_object$children$$chi = _object$children$.children) === null || _object$children$$chi === void 0 ? void 0 : (_object$children$$chi2 = _object$children$$chi[3]) === null || _object$children$$chi2 === void 0 ? void 0 : _object$children$$chi2.clone();
|
|
106
108
|
|
|
107
109
|
if (textMesh) {
|
|
108
|
-
_context.next =
|
|
110
|
+
_context.next = 19;
|
|
109
111
|
break;
|
|
110
112
|
}
|
|
111
113
|
|
|
112
114
|
return _context.abrupt("return", Promise.reject("ModelEntryDoorGuidePlugin.load(): textMesh is ".concat(textMesh)));
|
|
113
115
|
|
|
114
|
-
case
|
|
116
|
+
case 19:
|
|
115
117
|
textMesh.material = new THREE.MeshBasicMaterial({
|
|
116
118
|
transparent: true,
|
|
117
119
|
map: (0, _createCanvasTextTexture["default"])('入户门')
|
|
@@ -121,7 +123,7 @@ var ModelEntryDoorGuidePlugin = function ModelEntryDoorGuidePlugin(five, params)
|
|
|
121
123
|
state.object = object;
|
|
122
124
|
return _context.abrupt("return", true);
|
|
123
125
|
|
|
124
|
-
case
|
|
126
|
+
case 24:
|
|
125
127
|
case "end":
|
|
126
128
|
return _context.stop();
|
|
127
129
|
}
|
|
@@ -221,6 +223,7 @@ var ModelEntryDoorGuidePlugin = function ModelEntryDoorGuidePlugin(five, params)
|
|
|
221
223
|
var enable = function enable(config) {
|
|
222
224
|
if (state.enabled) return true;
|
|
223
225
|
state.enabled = true;
|
|
226
|
+
modeChangeHandler(five.currentMode);
|
|
224
227
|
five.on('modeChange', modeChangeHandler);
|
|
225
228
|
show(config);
|
|
226
229
|
return true;
|
|
@@ -240,5 +243,10 @@ var ModelEntryDoorGuidePlugin = function ModelEntryDoorGuidePlugin(five, params)
|
|
|
240
243
|
};
|
|
241
244
|
};
|
|
242
245
|
|
|
246
|
+
var modelEntryDoorGuidePluginServerParams = {
|
|
247
|
+
name: 'ModelEntryDoorGuidePlugin',
|
|
248
|
+
version: 0
|
|
249
|
+
};
|
|
250
|
+
exports.modelEntryDoorGuidePluginServerParams = modelEntryDoorGuidePluginServerParams;
|
|
243
251
|
var _default = ModelEntryDoorGuidePlugin;
|
|
244
252
|
exports["default"] = _default;
|
|
@@ -71,6 +71,7 @@ var ModelRoomLabelController = /*#__PURE__*/function () {
|
|
|
71
71
|
this.container.style.width = '100%';
|
|
72
72
|
this.container.style.height = '100%';
|
|
73
73
|
this.container.style.position = 'absolute';
|
|
74
|
+
this.container.style.pointerEvents = 'none';
|
|
74
75
|
this.container.style.left = '0';
|
|
75
76
|
this.container.style.top = '0'; // five lisenter
|
|
76
77
|
|
|
@@ -50,14 +50,14 @@ function RoomLabelItem(props, ref) {
|
|
|
50
50
|
return /*#__PURE__*/React.createElement("div", {
|
|
51
51
|
onClick: handleClick,
|
|
52
52
|
ref: ref,
|
|
53
|
-
className: _style["default"].dynamic([["
|
|
53
|
+
className: _style["default"].dynamic([["312299051", [(0, _px2rem["default"])(roomName.length > 3 ? 8 : 10), (0, _px2rem["default"])(-64), (0, _px2rem["default"])(20), (0, _px2rem["default"])(32), (0, _px2rem["default"])(6), (0, _px2rem["default"])(-44), (0, _px2rem["default"])(48), (0, _px2rem["default"])(1)]]]) + " " + "room-guid-label-plugin__item"
|
|
54
54
|
}, /*#__PURE__*/React.createElement(_style["default"], {
|
|
55
|
-
id: "
|
|
55
|
+
id: "312299051",
|
|
56
56
|
dynamic: [(0, _px2rem["default"])(roomName.length > 3 ? 8 : 10), (0, _px2rem["default"])(-64), (0, _px2rem["default"])(20), (0, _px2rem["default"])(32), (0, _px2rem["default"])(6), (0, _px2rem["default"])(-44), (0, _px2rem["default"])(48), (0, _px2rem["default"])(1)]
|
|
57
|
-
}, [".room-guid-label-plugin__item.__jsx-style-dynamic-selector{position:absolute;z-index:0;font-size:".concat((0, _px2rem["default"])(roomName.length > 3 ? 8 : 10), ";-webkit-transform:'';-ms-transform:'';transform:'';cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}"), ".room-guid-label-plugin__item-text.__jsx-style-dynamic-selector{position:absolute;left:0;top:".concat((0, _px2rem["default"])(-64), ";-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:").concat((0, _px2rem["default"])(20), ";min-width:").concat((0, _px2rem["default"])(32), ";padding:0 ").concat((0, _px2rem["default"])(6), ";pointer-events:all;background:url('//vrlab-static.ljcdn.com/release/web/room-label-bg.23e9d038.png') no-repeat;background-size:100% 100%;white-space:nowrap;}"), ".room-guid-label-plugin__item-bar.__jsx-style-dynamic-selector{position:absolute;top:".concat((0, _px2rem["default"])(-44), ";height:").concat((0, _px2rem["default"])(48), ";width:").concat((0, _px2rem["default"])(1), ";background-image:linear-gradient(to bottom,rgba(255,255,255,1),rgba(255,255,255,0));}")]), /*#__PURE__*/React.createElement("span", {
|
|
58
|
-
className: _style["default"].dynamic([["
|
|
57
|
+
}, [".room-guid-label-plugin__item.__jsx-style-dynamic-selector{position:absolute;z-index:0;font-size:".concat((0, _px2rem["default"])(roomName.length > 3 ? 8 : 10), ";-webkit-transform:'';-ms-transform:'';transform:'';cursor:pointer;point-events:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}"), ".room-guid-label-plugin__item-text.__jsx-style-dynamic-selector{position:absolute;left:0;top:".concat((0, _px2rem["default"])(-64), ";-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:").concat((0, _px2rem["default"])(20), ";min-width:").concat((0, _px2rem["default"])(32), ";padding:0 ").concat((0, _px2rem["default"])(6), ";pointer-events:all;background:url('//vrlab-static.ljcdn.com/release/web/room-label-bg.23e9d038.png') no-repeat;background-size:100% 100%;white-space:nowrap;}"), ".room-guid-label-plugin__item-bar.__jsx-style-dynamic-selector{position:absolute;top:".concat((0, _px2rem["default"])(-44), ";height:").concat((0, _px2rem["default"])(48), ";width:").concat((0, _px2rem["default"])(1), ";background-image:linear-gradient(to bottom,rgba(255,255,255,1),rgba(255,255,255,0));}")]), /*#__PURE__*/React.createElement("span", {
|
|
58
|
+
className: _style["default"].dynamic([["312299051", [(0, _px2rem["default"])(roomName.length > 3 ? 8 : 10), (0, _px2rem["default"])(-64), (0, _px2rem["default"])(20), (0, _px2rem["default"])(32), (0, _px2rem["default"])(6), (0, _px2rem["default"])(-44), (0, _px2rem["default"])(48), (0, _px2rem["default"])(1)]]]) + " " + "room-guid-label-plugin__item-text"
|
|
59
59
|
}, roomName), /*#__PURE__*/React.createElement("div", {
|
|
60
|
-
className: _style["default"].dynamic([["
|
|
60
|
+
className: _style["default"].dynamic([["312299051", [(0, _px2rem["default"])(roomName.length > 3 ? 8 : 10), (0, _px2rem["default"])(-64), (0, _px2rem["default"])(20), (0, _px2rem["default"])(32), (0, _px2rem["default"])(6), (0, _px2rem["default"])(-44), (0, _px2rem["default"])(48), (0, _px2rem["default"])(1)]]]) + " " + "room-guid-label-plugin__item-bar"
|
|
61
61
|
}));
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -2,6 +2,10 @@ import { FivePlugin } from '@realsee/five';
|
|
|
2
2
|
import { ModelRoomLabelController, ModelRoomLabelPluginParameters } from './Controller';
|
|
3
3
|
export declare const ModelRoomLabelPlugin: FivePlugin<ModelRoomLabelPluginParameters, ModelRoomLabelPluginReturnType>;
|
|
4
4
|
export default ModelRoomLabelPlugin;
|
|
5
|
+
export declare const modelRoomLabelPluginServerParams: {
|
|
6
|
+
name: string;
|
|
7
|
+
version: number;
|
|
8
|
+
};
|
|
5
9
|
export type { ModelRoomLabelController } from './Controller';
|
|
6
10
|
export type { ModelRoomLabelPluginData, RoomLabel } from './typings';
|
|
7
11
|
export declare type ModelRoomLabelPluginReturnType = ModelRoomLabelController;
|
|
@@ -5,7 +5,7 @@ require("core-js/modules/es.object.define-property.js");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] = exports.ModelRoomLabelPlugin = void 0;
|
|
8
|
+
exports.modelRoomLabelPluginServerParams = exports["default"] = exports.ModelRoomLabelPlugin = void 0;
|
|
9
9
|
|
|
10
10
|
var _Controller = require("./Controller");
|
|
11
11
|
|
|
@@ -15,4 +15,9 @@ var ModelRoomLabelPlugin = function ModelRoomLabelPlugin(five) {
|
|
|
15
15
|
|
|
16
16
|
exports.ModelRoomLabelPlugin = ModelRoomLabelPlugin;
|
|
17
17
|
var _default = ModelRoomLabelPlugin;
|
|
18
|
-
exports["default"] = _default;
|
|
18
|
+
exports["default"] = _default;
|
|
19
|
+
var modelRoomLabelPluginServerParams = {
|
|
20
|
+
name: 'ModelRoomLabelPlugin',
|
|
21
|
+
version: 0
|
|
22
|
+
};
|
|
23
|
+
exports.modelRoomLabelPluginServerParams = modelRoomLabelPluginServerParams;
|
|
@@ -25,6 +25,8 @@ require("core-js/modules/es.object.assign.js");
|
|
|
25
25
|
|
|
26
26
|
require("core-js/modules/es.array.map.js");
|
|
27
27
|
|
|
28
|
+
require("core-js/modules/es.function.name.js");
|
|
29
|
+
|
|
28
30
|
var THREE = _interopRequireWildcard(require("three"));
|
|
29
31
|
|
|
30
32
|
var _vertexShader = require("./vertexShader");
|
|
@@ -75,5 +77,6 @@ function createBox(textures, observer, _config) {
|
|
|
75
77
|
box.geometry.scale(-1, 1, 1);
|
|
76
78
|
box.position.set(observer.position.x, observer.position.y, observer.position.z);
|
|
77
79
|
box.quaternion.multiply(observer.quaternion);
|
|
80
|
+
box.name = 'PanoMaskSelectorPlugin';
|
|
78
81
|
return box;
|
|
79
82
|
}
|
|
@@ -133,9 +133,11 @@ var PanoMaskSelectorPlugin = function PanoMaskSelectorPlugin(five) {
|
|
|
133
133
|
|
|
134
134
|
if (state.box) {
|
|
135
135
|
five.scene.remove(state.box);
|
|
136
|
+
state.box = undefined;
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
var panoramaImgs = state.data.panoramaImgs[five.panoIndex];
|
|
140
|
+
state.currentLoadedIndex = five.panoIndex;
|
|
139
141
|
|
|
140
142
|
if (!panoramaImgs) {
|
|
141
143
|
state.textures = undefined;
|
|
@@ -149,7 +151,7 @@ var PanoMaskSelectorPlugin = function PanoMaskSelectorPlugin(five) {
|
|
|
149
151
|
thickness: ((_state$data$config2 = state.data.config) === null || _state$data$config2 === void 0 ? void 0 : _state$data$config2.thickness) || 0.005
|
|
150
152
|
});
|
|
151
153
|
five.scene.add(state.box);
|
|
152
|
-
|
|
154
|
+
five.needsRender = true;
|
|
153
155
|
return true;
|
|
154
156
|
};
|
|
155
157
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import Line from '../Model/line';
|
|
2
|
+
import Magnifier from '../Modules/Magnifier';
|
|
3
|
+
import FiveHelper from '../Modules/FiveHelper';
|
|
4
|
+
import { Group } from 'three';
|
|
5
|
+
import { Model } from '../Model';
|
|
6
|
+
import { PluginEvent } from '../typings/event.type';
|
|
7
|
+
import { Five, Intersection, IntersectMeshInterface, Subscribe } from '@realsee/five';
|
|
8
|
+
import { UserDistanceItem } from '../utils/distanceDom';
|
|
9
|
+
export interface IControllerParams {
|
|
10
|
+
five: Five;
|
|
11
|
+
group: Group;
|
|
12
|
+
model: Model;
|
|
13
|
+
mouseGroup: Group;
|
|
14
|
+
container: Element;
|
|
15
|
+
magnifier: Magnifier;
|
|
16
|
+
fiveHelper: FiveHelper;
|
|
17
|
+
hook: Subscribe<PluginEvent>;
|
|
18
|
+
userDistanceItemCreator?: () => UserDistanceItem;
|
|
19
|
+
}
|
|
20
|
+
export default abstract class BaseController {
|
|
21
|
+
protected five: Five;
|
|
22
|
+
protected group: Group;
|
|
23
|
+
protected model: Model;
|
|
24
|
+
protected disposed: boolean;
|
|
25
|
+
protected mouseGroup: Group;
|
|
26
|
+
protected container: Element;
|
|
27
|
+
protected fiveHelper: FiveHelper;
|
|
28
|
+
protected hook: IControllerParams['hook'];
|
|
29
|
+
protected magnifier: IControllerParams['magnifier'];
|
|
30
|
+
protected userDistanceItemCreator: IControllerParams['userDistanceItemCreator'];
|
|
31
|
+
constructor(params: IControllerParams);
|
|
32
|
+
protected removeLine(line: Line): void;
|
|
33
|
+
protected updateDistanceUI: () => void;
|
|
34
|
+
protected updateMouseGroup(intersection: Intersection, mesh?: IntersectMeshInterface): Group;
|
|
35
|
+
protected dispose(): void;
|
|
36
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
require("core-js/modules/es.array.for-each.js");
|
|
13
|
+
|
|
14
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
15
|
+
|
|
16
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
17
|
+
|
|
18
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
19
|
+
|
|
20
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
|
+
|
|
22
|
+
var _ironbox = require("../utils/ironbox");
|
|
23
|
+
|
|
24
|
+
var BaseController = /*#__PURE__*/function () {
|
|
25
|
+
function BaseController(params) {
|
|
26
|
+
var _this = this;
|
|
27
|
+
|
|
28
|
+
(0, _classCallCheck2["default"])(this, BaseController);
|
|
29
|
+
(0, _defineProperty2["default"])(this, "disposed", false);
|
|
30
|
+
(0, _defineProperty2["default"])(this, "updateDistanceUI", function () {
|
|
31
|
+
_this.model.lines.forEach(function (line) {
|
|
32
|
+
return line.distanceItem.update(_this.five);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
// ==================== Params ====================
|
|
36
|
+
this.five = params.five;
|
|
37
|
+
this.hook = params.hook;
|
|
38
|
+
this.model = params.model;
|
|
39
|
+
this.magnifier = params.magnifier;
|
|
40
|
+
this.container = params.container;
|
|
41
|
+
this.fiveHelper = params.fiveHelper;
|
|
42
|
+
this.userDistanceItemCreator = params.userDistanceItemCreator; // ==================== Groups ====================
|
|
43
|
+
|
|
44
|
+
this.group = params.group;
|
|
45
|
+
this.mouseGroup = params.mouseGroup;
|
|
46
|
+
var fiveElement = this.five.getElement();
|
|
47
|
+
|
|
48
|
+
if (fiveElement) {
|
|
49
|
+
fiveElement.addEventListener('touchstart', _ironbox.preventDefault);
|
|
50
|
+
fiveElement.addEventListener('contextmenu', _ironbox.preventDefault);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
(0, _createClass2["default"])(BaseController, [{
|
|
55
|
+
key: "removeLine",
|
|
56
|
+
value: function removeLine(line) {
|
|
57
|
+
this.group.remove(line.mesh, line.lightMesh);
|
|
58
|
+
line.distanceItem.remove();
|
|
59
|
+
this.five.needsRender = true;
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
key: "updateMouseGroup",
|
|
63
|
+
value: function updateMouseGroup(intersection, mesh) {
|
|
64
|
+
if (!intersection) return this.mouseGroup; // ============ update mouseGroup position ============
|
|
65
|
+
|
|
66
|
+
var adsorbentPoint = this.fiveHelper.getAdsorbentPoint(intersection);
|
|
67
|
+
var viewPosition = adsorbentPoint ? adsorbentPoint : intersection.point;
|
|
68
|
+
this.mouseGroup.position.copy(viewPosition); // ============ update mouseGroup quaternion ============
|
|
69
|
+
|
|
70
|
+
if (mesh) {
|
|
71
|
+
this.mouseGroup.quaternion.copy(mesh.quaternion);
|
|
72
|
+
} else if (intersection.face) {
|
|
73
|
+
var normal = intersection.face.normal;
|
|
74
|
+
var positionVector = normal.clone().multiplyScalar(0.05);
|
|
75
|
+
var position = intersection.point.clone().add(positionVector);
|
|
76
|
+
var lookAtVector = position.clone().add(positionVector);
|
|
77
|
+
this.mouseGroup.lookAt(lookAtVector);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return this.mouseGroup;
|
|
81
|
+
}
|
|
82
|
+
}, {
|
|
83
|
+
key: "dispose",
|
|
84
|
+
value: function dispose() {
|
|
85
|
+
var _this2 = this;
|
|
86
|
+
|
|
87
|
+
this.disposed = true;
|
|
88
|
+
this.magnifier.dispose();
|
|
89
|
+
this.model.lines.forEach(function (line) {
|
|
90
|
+
return _this2.removeLine(line);
|
|
91
|
+
});
|
|
92
|
+
var fiveElement = this.five.getElement();
|
|
93
|
+
|
|
94
|
+
if (fiveElement) {
|
|
95
|
+
fiveElement.removeEventListener('touchstart', _ironbox.preventDefault);
|
|
96
|
+
fiveElement.removeEventListener('contextmenu', _ironbox.preventDefault);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}]);
|
|
100
|
+
return BaseController;
|
|
101
|
+
}();
|
|
102
|
+
|
|
103
|
+
exports["default"] = BaseController;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Model } from '../Model';
|
|
2
|
+
import Line from '../Model/line';
|
|
3
|
+
import { LineJson } from '../typings/data';
|
|
4
|
+
import BaseController, { IControllerParams } from './BaseController';
|
|
5
|
+
export interface EditEvent {
|
|
6
|
+
editedLineChange: (lines: LineJson[]) => void;
|
|
7
|
+
}
|
|
8
|
+
export default class EditController extends BaseController {
|
|
9
|
+
type: string;
|
|
10
|
+
model: Model;
|
|
11
|
+
private pressPoint?;
|
|
12
|
+
private hasAppendDashed;
|
|
13
|
+
private hasAppendMouseGroup;
|
|
14
|
+
private fiveElement?;
|
|
15
|
+
/** 上一个端点位置 */
|
|
16
|
+
private lastPoint;
|
|
17
|
+
/** 鼠标点到上一个端点连接的虚线 */
|
|
18
|
+
private dashed;
|
|
19
|
+
private hammer?;
|
|
20
|
+
/** 根据 intersection 更新放大镜和吸附点 */
|
|
21
|
+
private onIntersectionUpdate;
|
|
22
|
+
constructor(params: IControllerParams);
|
|
23
|
+
dispose(): void;
|
|
24
|
+
getEditingLines(): Line[];
|
|
25
|
+
/** 撤销编辑 */
|
|
26
|
+
revoke: () => void;
|
|
27
|
+
private onMouseLeave;
|
|
28
|
+
/** 编辑线条发生改变时通知外部 */
|
|
29
|
+
private onLineChanged;
|
|
30
|
+
private onPress;
|
|
31
|
+
/**
|
|
32
|
+
* 1. 如果之前没有长按行为「即没有长按点时」-> 滑动全景
|
|
33
|
+
* 2. 如果有长按点,把长按点位置更新为当前位置
|
|
34
|
+
*/
|
|
35
|
+
private onPan;
|
|
36
|
+
private onPanEnd;
|
|
37
|
+
/**
|
|
38
|
+
* 1. 如果存在上一个点,需要绘制当前点到上一个点的连线
|
|
39
|
+
* 2. 把上一个点的位置更新为当前点的位置
|
|
40
|
+
* 3. 清除 mouseGroup 和 magnifier
|
|
41
|
+
*/
|
|
42
|
+
private onTap;
|
|
43
|
+
private onWantsTapGesture;
|
|
44
|
+
/** 编辑时取消走点 */
|
|
45
|
+
private onWantsToMoveToPano;
|
|
46
|
+
/** 存在长按点时不能移动全景 */
|
|
47
|
+
private onWantsPanGesture;
|
|
48
|
+
/** 移动全景时更新 distanceItem 在屏幕上的位置 */
|
|
49
|
+
private onCameraUpdate;
|
|
50
|
+
/** 更新虚线 */
|
|
51
|
+
private updateDashed;
|
|
52
|
+
}
|