@realsee/dnalogel 2.0.0-alpha.29 → 2.0.0-alpha.30
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 +8 -1
- package/dist/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/dist/ItemLabelPlugin/events.type.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.d.ts +9 -0
- package/dist/ItemLabelPlugin/index.js +922 -0
- package/dist/ItemLabelPlugin/typings.d.ts +59 -0
- package/dist/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/dist/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/dist/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/dist/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/dist/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +5 -2
- package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -0
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +17 -8
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +3 -0
- package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +49 -14
- package/dist/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +2 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +42 -0
- package/dist/PanoMeasurePlugin/index.d.ts +8 -5
- package/dist/PanoMeasurePlugin/index.js +1893 -3431
- package/dist/PanoMeasurePlugin/typings/data.d.ts +4 -0
- package/dist/PanoMeasurePlugin/typings/event.type.d.ts +10 -1
- package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -2
- package/dist/floorplan/ModelFloorplanPlugin/index.js +3 -3
- package/dist/floorplan/TopviewFloorplanPlugin/index.js +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +4939 -5627
- package/dist/index.js +5607 -6291
- package/dist/index.umd.js +5610 -6295
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/math/Interval.d.ts +13 -0
- package/dist/shared-utils/math/Rectangle.d.ts +27 -0
- package/dist/shared-utils/math/index.d.ts +2 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/Magnifier.html +9 -0
- package/docs/classes/ModelRoomLabelController.html +5 -5
- package/docs/classes/PanoFloorplanRadarPluginController.html +2 -2
- package/docs/enums/CameraMovementEffect.html +2 -2
- package/docs/enums/DIRECTION.html +1 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -0
- package/docs/enums/ModelFloorplanErrorType.html +1 -1
- package/docs/enums/Rotation.html +2 -2
- package/docs/index.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginExportType.html +3 -3
- package/docs/interfaces/CameraMovementPluginExportType.html +3 -3
- package/docs/interfaces/FloorplanBounding.html +5 -5
- package/docs/interfaces/FloorplanData.html +2 -2
- package/docs/interfaces/FloorplanEntrance.html +8 -8
- package/docs/interfaces/FloorplanExtraObject.html +4 -4
- package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
- package/docs/interfaces/FloorplanFloorData.html +2 -2
- package/docs/interfaces/FloorplanImagePosition.html +2 -2
- package/docs/interfaces/FloorplanObserver.html +2 -2
- package/docs/interfaces/FloorplanOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanPosition.html +2 -2
- package/docs/interfaces/FloorplanRoomItem.html +7 -7
- package/docs/interfaces/FloorplanRoomLabelItem.html +4 -4
- package/docs/interfaces/FloorplanServerBounding.html +5 -5
- package/docs/interfaces/FloorplanServerComputedData.html +1 -1
- package/docs/interfaces/FloorplanServerData.html +2 -2
- package/docs/interfaces/FloorplanServerEntrance.html +8 -8
- package/docs/interfaces/FloorplanServerFloorData.html +2 -2
- package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
- package/docs/interfaces/FloorplanServerObserver.html +2 -2
- package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanServerPosition.html +2 -2
- package/docs/interfaces/FloorplanServerRoomItem.html +8 -8
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +4 -4
- package/docs/interfaces/ItemLabelPluginData.html +1 -0
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -0
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -0
- 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 +3 -3
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/ModelViewPluginExportType.html +1 -1
- package/docs/interfaces/OpenParameter.html +3 -0
- package/docs/interfaces/PanoCompassPluginData.html +1 -1
- package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoFloorplanRadarPluginControllerParameter.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +1 -0
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
- package/docs/interfaces/Point.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -1
- package/docs/interfaces/RoomInfo.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -1
- package/docs/interfaces/Rooms.html +1 -1
- package/docs/interfaces/TopviewFloorplanPluginParameterType.html +10 -10
- package/docs/modules.html +20 -20
- package/libs/ItemLabelPlugin/ItemLabelComponent.js +558 -0
- package/libs/ItemLabelPlugin/ItemLabelItem.js +228 -0
- package/libs/ItemLabelPlugin/Plugin.d.ts +4 -0
- package/libs/ItemLabelPlugin/Plugin.js +120 -0
- package/libs/ItemLabelPlugin/events.type.d.ts +9 -0
- package/libs/ItemLabelPlugin/events.type.js +1 -0
- package/libs/ItemLabelPlugin/index.d.ts +9 -0
- package/libs/ItemLabelPlugin/index.js +8 -0
- package/libs/ItemLabelPlugin/typings.d.ts +59 -0
- package/libs/ItemLabelPlugin/typings.js +7 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/libs/ItemLabelPlugin/utils/getLabelTransform.js +3 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.js +16 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +6 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.js +12 -0
- package/libs/ItemLabelPlugin/utils/parseData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/parseData.js +4 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.js +4 -0
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +5 -2
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +9 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +4 -4
- package/libs/PanoMeasurePlugin/Controller/MixedController.d.ts +44 -0
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +337 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -0
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +14 -3
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +17 -8
- package/libs/PanoMeasurePlugin/Controller/index.js +57 -18
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +11 -14
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +3 -0
- package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +48 -11
- package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +49 -14
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +185 -60
- package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.d.ts +12 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/NewMainBtnController.js +98 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +24 -7
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +80 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/style.js +10 -1
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +64 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +42 -0
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +265 -0
- package/libs/PanoMeasurePlugin/index.d.ts +8 -5
- package/libs/PanoMeasurePlugin/index.js +2 -0
- package/libs/PanoMeasurePlugin/typings/data.d.ts +4 -0
- package/libs/PanoMeasurePlugin/typings/event.type.d.ts +10 -1
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
- package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +15 -0
- package/libs/PanoMeasurePlugin/utils/constants.js +7 -7
- package/libs/PanoMeasurePlugin/utils/distanceDom.js +19 -14
- package/libs/PanoMeasurePlugin/utils/mouseGroup.d.ts +2 -2
- package/libs/PanoMeasurePlugin/utils/mouseGroup.js +5 -6
- package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +3 -3
- package/libs/index.d.ts +1 -0
- package/libs/index.js +2 -1
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +1 -0
- package/libs/shared-utils/math/Interval.d.ts +13 -0
- package/libs/shared-utils/math/Interval.js +40 -0
- package/libs/shared-utils/math/Rectangle.d.ts +27 -0
- package/libs/shared-utils/math/Rectangle.js +50 -0
- package/libs/shared-utils/math/index.d.ts +2 -0
- package/libs/shared-utils/math/index.js +2 -0
- package/package.json +3 -1
|
@@ -1,153 +1,278 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Hammer from 'hammerjs';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import '../../shared-utils';
|
|
4
|
+
import { Subscribe } from '@realsee/five';
|
|
2
5
|
/** 交换数组元素 */
|
|
3
6
|
function exchange(array, index1, index2) {
|
|
4
7
|
const value = array[index1];
|
|
5
8
|
array[index1] = array[index2];
|
|
6
9
|
array[index2] = value;
|
|
7
10
|
}
|
|
11
|
+
/** 翻转 ArrayBuffer(RGBA像素) 的 Y 轴 */
|
|
12
|
+
function flipPixelsY(pixels, width, height) {
|
|
13
|
+
const flipYLength = height / 2;
|
|
14
|
+
for (let currentHeight = 1; currentHeight <= flipYLength; currentHeight++) {
|
|
15
|
+
const targetHeight = height - (currentHeight - 1);
|
|
16
|
+
for (let currentWidth = 1; currentWidth <= width; currentWidth++) {
|
|
17
|
+
const pixelIndex = (currentHeight - 1) * width + currentWidth - 1;
|
|
18
|
+
const targetPixelIndex = (targetHeight - 1) * width + currentWidth - 1;
|
|
19
|
+
exchange(pixels, pixelIndex * 4 + 0, targetPixelIndex * 4 + 0);
|
|
20
|
+
exchange(pixels, pixelIndex * 4 + 1, targetPixelIndex * 4 + 1);
|
|
21
|
+
exchange(pixels, pixelIndex * 4 + 2, targetPixelIndex * 4 + 2);
|
|
22
|
+
exchange(pixels, pixelIndex * 4 + 3, targetPixelIndex * 4 + 3);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
8
26
|
export default class Magnifier {
|
|
9
27
|
constructor(five, options) {
|
|
10
|
-
|
|
28
|
+
var _a, _b, _c;
|
|
29
|
+
Object.defineProperty(this, "width", {
|
|
11
30
|
enumerable: true,
|
|
12
31
|
configurable: true,
|
|
13
32
|
writable: true,
|
|
14
33
|
value: void 0
|
|
15
34
|
});
|
|
16
|
-
Object.defineProperty(this, "
|
|
35
|
+
Object.defineProperty(this, "height", {
|
|
17
36
|
enumerable: true,
|
|
18
37
|
configurable: true,
|
|
19
38
|
writable: true,
|
|
20
39
|
value: void 0
|
|
21
40
|
});
|
|
22
|
-
Object.defineProperty(this, "
|
|
41
|
+
Object.defineProperty(this, "visible", {
|
|
23
42
|
enumerable: true,
|
|
24
43
|
configurable: true,
|
|
25
44
|
writable: true,
|
|
26
|
-
value:
|
|
45
|
+
value: false
|
|
27
46
|
});
|
|
28
|
-
Object.defineProperty(this, "
|
|
47
|
+
Object.defineProperty(this, "hooks", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true,
|
|
50
|
+
writable: true,
|
|
51
|
+
value: new Subscribe()
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(this, "contentDom", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
configurable: true,
|
|
56
|
+
writable: true,
|
|
57
|
+
value: document.createElement('canvas')
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(this, "five", {
|
|
29
60
|
enumerable: true,
|
|
30
61
|
configurable: true,
|
|
31
62
|
writable: true,
|
|
32
63
|
value: void 0
|
|
33
64
|
});
|
|
34
|
-
Object.defineProperty(this, "
|
|
65
|
+
Object.defineProperty(this, "scale", {
|
|
35
66
|
enumerable: true,
|
|
36
67
|
configurable: true,
|
|
37
68
|
writable: true,
|
|
38
69
|
value: void 0
|
|
39
70
|
});
|
|
40
|
-
Object.defineProperty(this, "
|
|
71
|
+
Object.defineProperty(this, "wrapper", {
|
|
41
72
|
enumerable: true,
|
|
42
73
|
configurable: true,
|
|
43
74
|
writable: true,
|
|
44
75
|
value: void 0
|
|
45
76
|
});
|
|
46
|
-
Object.defineProperty(this, "
|
|
77
|
+
Object.defineProperty(this, "config", {
|
|
47
78
|
enumerable: true,
|
|
48
79
|
configurable: true,
|
|
49
80
|
writable: true,
|
|
50
81
|
value: void 0
|
|
51
82
|
});
|
|
83
|
+
Object.defineProperty(this, "offset", {
|
|
84
|
+
enumerable: true,
|
|
85
|
+
configurable: true,
|
|
86
|
+
writable: true,
|
|
87
|
+
value: { x: 0, y: 0 }
|
|
88
|
+
});
|
|
89
|
+
Object.defineProperty(this, "canvas", {
|
|
90
|
+
enumerable: true,
|
|
91
|
+
configurable: true,
|
|
92
|
+
writable: true,
|
|
93
|
+
value: this.contentDom
|
|
94
|
+
});
|
|
52
95
|
Object.defineProperty(this, "context", {
|
|
53
96
|
enumerable: true,
|
|
54
97
|
configurable: true,
|
|
55
98
|
writable: true,
|
|
56
99
|
value: void 0
|
|
57
100
|
});
|
|
58
|
-
Object.defineProperty(this, "
|
|
101
|
+
Object.defineProperty(this, "renderCenter", {
|
|
59
102
|
enumerable: true,
|
|
60
103
|
configurable: true,
|
|
61
104
|
writable: true,
|
|
62
|
-
value:
|
|
105
|
+
value: new THREE.Vector3()
|
|
106
|
+
});
|
|
107
|
+
Object.defineProperty(this, "lastPanEvent", {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
configurable: true,
|
|
110
|
+
writable: true,
|
|
111
|
+
value: void 0
|
|
63
112
|
});
|
|
64
|
-
Object.defineProperty(this, "
|
|
113
|
+
Object.defineProperty(this, "hammer", {
|
|
65
114
|
enumerable: true,
|
|
66
115
|
configurable: true,
|
|
67
116
|
writable: true,
|
|
68
117
|
value: void 0
|
|
69
118
|
});
|
|
119
|
+
Object.defineProperty(this, "onPan", {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
configurable: true,
|
|
122
|
+
writable: true,
|
|
123
|
+
value: (event) => {
|
|
124
|
+
var _a, _b, _c, _d;
|
|
125
|
+
if (!this.wrapper)
|
|
126
|
+
return;
|
|
127
|
+
const lastDeltaX = (_b = (_a = this.lastPanEvent) === null || _a === void 0 ? void 0 : _a.deltaX) !== null && _b !== void 0 ? _b : 0;
|
|
128
|
+
const lastDeltaY = (_d = (_c = this.lastPanEvent) === null || _c === void 0 ? void 0 : _c.deltaY) !== null && _d !== void 0 ? _d : 0;
|
|
129
|
+
const deltaX = event.deltaX - lastDeltaX;
|
|
130
|
+
const deltaY = event.deltaY - lastDeltaY;
|
|
131
|
+
this.lastPanEvent = event;
|
|
132
|
+
const prevented = this.hooks.emit('wantsPanGesture', { srcEvent: event, deltaX, deltaY });
|
|
133
|
+
if (prevented)
|
|
134
|
+
return;
|
|
135
|
+
const translateX = this.offset.x + deltaX;
|
|
136
|
+
const translateY = this.offset.y + deltaY;
|
|
137
|
+
this.contentDom.style.boxShadow = '0 2px 30px 0 rgba(0,0,0,0.20)';
|
|
138
|
+
this.canvas.style.transform = `translate3d(${translateX}px, ${translateY}px, 100px)`;
|
|
139
|
+
this.offset = { x: translateX, y: translateY };
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
Object.defineProperty(this, "onPanEnd", {
|
|
143
|
+
enumerable: true,
|
|
144
|
+
configurable: true,
|
|
145
|
+
writable: true,
|
|
146
|
+
value: (event) => {
|
|
147
|
+
this.lastPanEvent = undefined;
|
|
148
|
+
this.contentDom.style.boxShadow = 'none';
|
|
149
|
+
}
|
|
150
|
+
});
|
|
70
151
|
if (!five.renderer)
|
|
71
152
|
throw new Error('Five Render 未初始化');
|
|
72
153
|
this.five = five;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
154
|
+
this.scale = (_a = options === null || options === void 0 ? void 0 : options.scale) !== null && _a !== void 0 ? _a : 2;
|
|
155
|
+
this.width = (_b = options === null || options === void 0 ? void 0 : options.width) !== null && _b !== void 0 ? _b : 190;
|
|
156
|
+
this.height = (_c = options === null || options === void 0 ? void 0 : options.height) !== null && _c !== void 0 ? _c : 190;
|
|
157
|
+
this.config = {
|
|
158
|
+
dragEnabled: (options === null || options === void 0 ? void 0 : options.dragEnabled) || false,
|
|
159
|
+
autoFixPCPosition: (options === null || options === void 0 ? void 0 : options.autoFixPCPosition) || false,
|
|
160
|
+
initialPosition: (options === null || options === void 0 ? void 0 : options.initialPosition) || { left: '0', top: '0' },
|
|
161
|
+
};
|
|
80
162
|
const context = this.canvas.getContext('2d');
|
|
81
163
|
if (!context)
|
|
82
164
|
throw new Error('CANNOT CREATE CONTEXT2D');
|
|
83
|
-
this.scale = scale;
|
|
84
165
|
this.context = context;
|
|
85
|
-
this.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
magnifier.style.position = 'absolute';
|
|
92
|
-
magnifier.style.pointerEvents = 'none';
|
|
93
|
-
magnifier.style.borderRadius = '50%';
|
|
94
|
-
magnifier.style.left = -width / 2 + 'px';
|
|
95
|
-
magnifier.style.top = -height - 90 + 'px';
|
|
96
|
-
magnifier.setAttribute('width', width.toString());
|
|
97
|
-
magnifier.setAttribute('height', height.toString());
|
|
98
|
-
this.canvas.style.width = originWidth + 'px';
|
|
99
|
-
this.canvas.style.height = originHeight + 'px';
|
|
166
|
+
if (this.config.dragEnabled) {
|
|
167
|
+
this.hammer = new Hammer(this.canvas);
|
|
168
|
+
this.hammer.on('pan', this.onPan);
|
|
169
|
+
this.hammer.on('panend', this.onPanEnd);
|
|
170
|
+
// this.hooks.on('wantsPanGesture', this.onMagnifierWantsPanGesture)
|
|
171
|
+
}
|
|
100
172
|
}
|
|
101
173
|
dispose() {
|
|
174
|
+
var _a;
|
|
102
175
|
this.clear();
|
|
176
|
+
this.remove();
|
|
177
|
+
(_a = this.hammer) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
178
|
+
}
|
|
179
|
+
/** 移除放大镜 DOM */
|
|
180
|
+
remove() {
|
|
103
181
|
this.canvas.remove();
|
|
182
|
+
this.visible = false;
|
|
104
183
|
}
|
|
184
|
+
/** 清除放大镜渲染内容 */
|
|
105
185
|
clear() {
|
|
106
186
|
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
107
187
|
}
|
|
188
|
+
/** 把放大镜放到某一个容器中 */
|
|
108
189
|
appendTo(element) {
|
|
109
|
-
this.
|
|
190
|
+
this.wrapper = element;
|
|
191
|
+
this.initStyle();
|
|
110
192
|
element.append(this.canvas);
|
|
193
|
+
this.visible = true;
|
|
111
194
|
}
|
|
112
|
-
|
|
113
|
-
|
|
195
|
+
/** 放大传入点位周围的内容 */
|
|
196
|
+
renderWithPoint(point) {
|
|
197
|
+
if (!this.wrapper)
|
|
114
198
|
return;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
199
|
+
this.renderCenter = point;
|
|
200
|
+
this.render();
|
|
201
|
+
if (this.config.autoFixPCPosition)
|
|
202
|
+
this.autoFixPCPosition();
|
|
203
|
+
}
|
|
204
|
+
autoFixPCPosition() {
|
|
205
|
+
if (!this.wrapper)
|
|
206
|
+
return;
|
|
207
|
+
const { width, height } = this;
|
|
208
|
+
const position2d = this.renderCenter.clone().project(this.five.camera);
|
|
209
|
+
const left = ((position2d.x + 1) / 2) * this.wrapper.clientWidth;
|
|
210
|
+
const right = (-(position2d.x - 1) / 2) * this.wrapper.clientWidth;
|
|
211
|
+
const top = (-(position2d.y - 1) / 2) * this.wrapper.clientHeight;
|
|
120
212
|
if (left < 183) {
|
|
121
|
-
this.canvas.style.top = -
|
|
213
|
+
this.canvas.style.top = -height / 2 + 'px';
|
|
122
214
|
this.canvas.style.left = 90 + 'px';
|
|
123
215
|
}
|
|
124
216
|
else if (top < 183) {
|
|
125
217
|
this.canvas.style.top = 90 + 'px';
|
|
126
|
-
this.canvas.style.left = -
|
|
218
|
+
this.canvas.style.left = -width / 2 + 'px';
|
|
127
219
|
}
|
|
128
220
|
else if (right < 183) {
|
|
129
|
-
this.canvas.style.top = -
|
|
130
|
-
this.canvas.style.left = -
|
|
221
|
+
this.canvas.style.top = -height / 2 + 'px';
|
|
222
|
+
this.canvas.style.left = -width - 90 + 'px';
|
|
131
223
|
}
|
|
132
224
|
else {
|
|
133
|
-
this.canvas.style.left = -
|
|
134
|
-
this.canvas.style.top = -
|
|
225
|
+
this.canvas.style.left = -width / 2 + 'px';
|
|
226
|
+
this.canvas.style.top = -height - 90 + 'px';
|
|
135
227
|
}
|
|
136
228
|
this.canvas.style.transform = `translate3d(${left}px, ${top}px, 10px)`;
|
|
137
|
-
|
|
229
|
+
this.offset = { x: left, y: top };
|
|
230
|
+
}
|
|
231
|
+
render() {
|
|
232
|
+
if (!this.five.renderer || !this.wrapper)
|
|
233
|
+
return;
|
|
234
|
+
const { scale, context, width, height } = this;
|
|
235
|
+
const position2d = this.renderCenter.clone().project(this.five.camera);
|
|
236
|
+
const renderSize = this.five.renderer.getSize(new THREE.Vector2());
|
|
237
|
+
// const pixelRatio = this.five.renderer.getPixelRatio()
|
|
238
|
+
// 安卓机型和ios部分机型在app里读不到像素,固定为1降低清晰度可以读到
|
|
239
|
+
const pixelRatio = 1;
|
|
240
|
+
// 从 renderTarget 读取区域的大小
|
|
241
|
+
const readPixelsWidth = width / scale;
|
|
242
|
+
const readPixelsHeight = height / scale;
|
|
243
|
+
// 一个像素重复多少倍,pixelRatio 是兼容屏幕像素比,scale 是真实重复倍数
|
|
244
|
+
const readPixelsRadio = pixelRatio * scale;
|
|
138
245
|
const x = ((position2d.x + 1) / 2) * renderSize.x;
|
|
139
246
|
const y = ((position2d.y + 1) / 2) * renderSize.y;
|
|
140
|
-
const pixels = this.five.getPixels(x -
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
const imageData = context.createImageData(width, height);
|
|
247
|
+
const pixels = this.five.getPixels(x - readPixelsWidth / 2, y - readPixelsWidth / 2, readPixelsWidth, readPixelsHeight, readPixelsRadio);
|
|
248
|
+
// 最后生成的图像大小是 [width * pixelRatio, height * pixelRatio]
|
|
249
|
+
// 绘制在[width, height]的区域上
|
|
250
|
+
const imageWidth = Math.floor(width * pixelRatio);
|
|
251
|
+
const imageHeight = Math.floor(height * pixelRatio);
|
|
252
|
+
// 因为 Canvas 与 THREE Renderer Y 坐标相反,所以需要 Y 轴翻转
|
|
253
|
+
flipPixelsY(pixels, imageWidth, imageHeight);
|
|
254
|
+
const imageData = new ImageData(imageWidth, imageHeight);
|
|
150
255
|
imageData.data.set(pixels);
|
|
151
256
|
context.putImageData(imageData, 0, 0);
|
|
152
257
|
}
|
|
258
|
+
initStyle() {
|
|
259
|
+
const canvas = this.canvas;
|
|
260
|
+
canvas.classList.add('five-plugin__magnifier');
|
|
261
|
+
canvas.style.position = 'absolute';
|
|
262
|
+
canvas.style.pointerEvents = 'all';
|
|
263
|
+
canvas.style.borderRadius = '50%';
|
|
264
|
+
canvas.style.zIndex = '99';
|
|
265
|
+
const pixelRatio = 1;
|
|
266
|
+
canvas.setAttribute('width', (this.width * pixelRatio).toString());
|
|
267
|
+
canvas.setAttribute('height', (this.height * pixelRatio).toString());
|
|
268
|
+
canvas.style.border = '2px solid rgba(255,255,255,0.20)';
|
|
269
|
+
canvas.style.width = this.width + 'px';
|
|
270
|
+
canvas.style.height = this.height + 'px';
|
|
271
|
+
canvas.style.top = this.config.initialPosition.top;
|
|
272
|
+
canvas.style.left = this.config.initialPosition.left;
|
|
273
|
+
canvas.style.transform = 'translate(0,0,100px)';
|
|
274
|
+
if (this.config.dragEnabled) {
|
|
275
|
+
this.canvas.style.cursor = 'pointer';
|
|
276
|
+
}
|
|
277
|
+
}
|
|
153
278
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import TWEEN from '@tweenjs/tween.js';
|
|
2
|
-
import { mainIconStyle
|
|
2
|
+
import { mainIconStyle, mainItemStyle } from './style';
|
|
3
3
|
import { tweenProgress } from '../../../shared-utils/animationFrame/BetterTween';
|
|
4
4
|
import { MAIN_NORMAL_PATH, MAIN_DONE_PATH, MAIN_MOUSE_ENTER_FILL, MAIN_MOUSE_LEAVE_FILL } from './HTML';
|
|
5
5
|
export class MainBtnController {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type MeasureController from '../../Controller';
|
|
2
|
+
export declare class NewMainBtnController {
|
|
3
|
+
private container;
|
|
4
|
+
private measureController;
|
|
5
|
+
private mainElement;
|
|
6
|
+
constructor(measureController: MeasureController, container: Element);
|
|
7
|
+
dispose(): void;
|
|
8
|
+
private getMainElement;
|
|
9
|
+
private change2Add;
|
|
10
|
+
private change2Done;
|
|
11
|
+
private onClick;
|
|
12
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { newMainIconStyle, newMainItemStyle } from './style';
|
|
2
|
+
export class NewMainBtnController {
|
|
3
|
+
constructor(measureController, container) {
|
|
4
|
+
Object.defineProperty(this, "container", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true,
|
|
8
|
+
value: void 0
|
|
9
|
+
});
|
|
10
|
+
Object.defineProperty(this, "measureController", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true,
|
|
14
|
+
value: void 0
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(this, "mainElement", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: void 0
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(this, "onClick", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
writable: true,
|
|
26
|
+
value: () => {
|
|
27
|
+
if (this.mainElement.mainTextDom.innerText === '开始') {
|
|
28
|
+
this.measureController.hook.emit('willChangeState', 'watching', 'editing');
|
|
29
|
+
this.change2Done();
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
this.measureController.hook.emit('willChangeState', 'editing', 'watching');
|
|
33
|
+
this.change2Add();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
this.measureController = measureController;
|
|
38
|
+
this.container = container;
|
|
39
|
+
this.mainElement = this.getMainElement();
|
|
40
|
+
Object.assign(this.mainElement.mainIcon.style, newMainIconStyle);
|
|
41
|
+
Object.assign(this.mainElement.mainItem.style, newMainItemStyle);
|
|
42
|
+
this.change2Add();
|
|
43
|
+
this.mainElement.mainItem.addEventListener('click', this.onClick);
|
|
44
|
+
}
|
|
45
|
+
dispose() {
|
|
46
|
+
this.mainElement.mainItem.removeEventListener('click', this.onClick);
|
|
47
|
+
}
|
|
48
|
+
getMainElement() {
|
|
49
|
+
const mainTextDom = this.container.querySelector('.fpm__main-text');
|
|
50
|
+
const mainItem = this.container.querySelector('.fpm__main');
|
|
51
|
+
const mainIcon = this.container.querySelector('.fpm__main-icon');
|
|
52
|
+
if (!mainItem || !mainTextDom || !mainIcon)
|
|
53
|
+
throw new Error('cannot find dom');
|
|
54
|
+
return { mainTextDom, mainItem, mainIcon };
|
|
55
|
+
}
|
|
56
|
+
change2Add() {
|
|
57
|
+
const { mainIcon, mainTextDom } = this.mainElement;
|
|
58
|
+
if (mainIcon.className.includes('fpm__main__start'))
|
|
59
|
+
return;
|
|
60
|
+
if (mainIcon.className.includes('fpm__main__end')) {
|
|
61
|
+
mainIcon.style.transform = `scale(0.8)`;
|
|
62
|
+
if (mainTextDom.className.includes('fpm__main-text__show')) {
|
|
63
|
+
mainTextDom.classList.replace('fpm__main-text__show', 'fpm__main-text__hide');
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
mainTextDom.classList.add('fpm__main-text__hide');
|
|
67
|
+
}
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
mainIcon.classList.replace('fpm__main__end', 'fpm__main__start');
|
|
70
|
+
mainIcon.style.transform = 'scale(1)';
|
|
71
|
+
mainTextDom.innerText = '开始';
|
|
72
|
+
mainTextDom.classList.replace('fpm__main-text__hide', 'fpm__main-text__show');
|
|
73
|
+
}, 200);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
change2Done() {
|
|
77
|
+
const { mainTextDom, mainIcon } = this.mainElement;
|
|
78
|
+
if (mainTextDom.innerText === '结束')
|
|
79
|
+
return;
|
|
80
|
+
if (mainIcon.className.includes('fpm__main__end'))
|
|
81
|
+
return;
|
|
82
|
+
if (mainIcon.className.includes('fpm__main__start')) {
|
|
83
|
+
mainIcon.style.transform = `scale(0.8)`;
|
|
84
|
+
if (mainTextDom.className.includes('fpm__main-text__show')) {
|
|
85
|
+
mainTextDom.classList.replace('fpm__main-text__show', 'fpm__main-text__hide');
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
mainTextDom.classList.add('fpm__main-text__hide');
|
|
89
|
+
}
|
|
90
|
+
setTimeout(() => {
|
|
91
|
+
mainIcon.classList.replace('fpm__main__start', 'fpm__main__end');
|
|
92
|
+
mainIcon.style.transform = 'scale(1)';
|
|
93
|
+
mainTextDom.innerText = '结束';
|
|
94
|
+
mainTextDom.classList.replace('fpm__main-text__hide', 'fpm__main-text__show');
|
|
95
|
+
}, 200);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type MeasureController from '../../Controller';
|
|
2
|
+
import type { OpenParameter } from '../../typings/data';
|
|
2
3
|
export interface UIControllerParams {
|
|
3
4
|
container: Element;
|
|
5
|
+
openParams?: OpenParameter;
|
|
4
6
|
}
|
|
7
|
+
export declare type UIMode = 'pc' | 'mobile';
|
|
5
8
|
export declare class UIController {
|
|
6
9
|
private revoke?;
|
|
7
10
|
private container;
|
|
8
11
|
private mainController?;
|
|
9
12
|
private disposers;
|
|
10
13
|
private measureController;
|
|
14
|
+
private mode;
|
|
11
15
|
constructor(measureController: MeasureController, params: UIControllerParams);
|
|
12
16
|
dispose(): void;
|
|
13
17
|
show(): this;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import htmlString from './HTML';
|
|
2
|
+
import mobileHTMLString from './mobileHTML';
|
|
2
3
|
import { uiWrapperStyle, operatingSpaceStyle, controllerBackgroundStyle, buttonGroupStyle, exitIconStyle, exitItemStyle, textStyle, } from './style';
|
|
3
4
|
import { MainBtnController } from './MainBtnController';
|
|
5
|
+
import { NewMainBtnController } from './NewMainBtnController';
|
|
4
6
|
import Revoke from './Revoke';
|
|
5
7
|
export class UIController {
|
|
6
8
|
constructor(measureController, params) {
|
|
9
|
+
var _a, _b;
|
|
7
10
|
Object.defineProperty(this, "revoke", {
|
|
8
11
|
enumerable: true,
|
|
9
12
|
configurable: true,
|
|
@@ -34,6 +37,12 @@ export class UIController {
|
|
|
34
37
|
writable: true,
|
|
35
38
|
value: void 0
|
|
36
39
|
});
|
|
40
|
+
Object.defineProperty(this, "mode", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true,
|
|
44
|
+
value: void 0
|
|
45
|
+
});
|
|
37
46
|
Object.defineProperty(this, "handleExit", {
|
|
38
47
|
enumerable: true,
|
|
39
48
|
configurable: true,
|
|
@@ -43,8 +52,10 @@ export class UIController {
|
|
|
43
52
|
const exitItem = this.container.querySelector('.fpm__exit');
|
|
44
53
|
if (!exitItem || !exitIcon)
|
|
45
54
|
throw new Error('cannot find dom');
|
|
46
|
-
|
|
47
|
-
|
|
55
|
+
if (this.mode === 'pc') {
|
|
56
|
+
Object.assign(exitItem.style, exitItemStyle);
|
|
57
|
+
Object.assign(exitIcon === null || exitIcon === void 0 ? void 0 : exitIcon.style, exitIconStyle);
|
|
58
|
+
}
|
|
48
59
|
const onMouseEnter = () => (exitItem.style.opacity = '1');
|
|
49
60
|
const onMouseLeave = () => (exitItem.style.opacity = '0.7');
|
|
50
61
|
const handleClick = () => {
|
|
@@ -61,9 +72,10 @@ export class UIController {
|
|
|
61
72
|
}
|
|
62
73
|
});
|
|
63
74
|
this.measureController = measureController;
|
|
75
|
+
this.mode = ((_a = params.openParams) === null || _a === void 0 ? void 0 : _a.isMobile) ? 'mobile' : 'pc';
|
|
64
76
|
this.container = document.createElement('div');
|
|
65
|
-
this.container.innerHTML = htmlString;
|
|
66
|
-
this.container.classList.add('fpm__ui-controller');
|
|
77
|
+
this.container.innerHTML = ((_b = params.openParams) === null || _b === void 0 ? void 0 : _b.isMobile) ? mobileHTMLString : htmlString;
|
|
78
|
+
this.container.classList.add('fpm__ui-controller', this.mode);
|
|
67
79
|
params.container.appendChild(this.container);
|
|
68
80
|
const textDoms = this.container.querySelectorAll('.fpm__text');
|
|
69
81
|
const UIItems = this.container.querySelectorAll('.fpm__ui-item');
|
|
@@ -83,8 +95,13 @@ export class UIController {
|
|
|
83
95
|
this.container.style.display = 'block';
|
|
84
96
|
this.container.style.opacity = '1';
|
|
85
97
|
this.container.style.transform = 'translate(0, 0)';
|
|
86
|
-
|
|
87
|
-
|
|
98
|
+
if (this.mode === 'pc') {
|
|
99
|
+
this.revoke = new Revoke(this.measureController, this.container);
|
|
100
|
+
this.mainController = new MainBtnController(this.measureController, this.container);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this.mainController = new NewMainBtnController(this.measureController, this.container);
|
|
104
|
+
}
|
|
88
105
|
this.disposers.push(this.handleExit());
|
|
89
106
|
return this;
|
|
90
107
|
}
|
|
@@ -93,7 +110,7 @@ export class UIController {
|
|
|
93
110
|
this.container.style.display = 'none';
|
|
94
111
|
this.container.style.opacity = '0';
|
|
95
112
|
this.container.style.transform = 'translate(0, 10px)';
|
|
96
|
-
(_a = this.revoke) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
113
|
+
this.mode === 'pc' && ((_a = this.revoke) === null || _a === void 0 ? void 0 : _a.dispose());
|
|
97
114
|
(_b = this.mainController) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
98
115
|
this.disposers.forEach((disposer) => disposer());
|
|
99
116
|
this.disposers = [];
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const startIconImage = `data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzIiIGhlaWdodD0iNzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxmaWx0ZXIgeD0iLTUuMyUiIHk9Ii01LjMlIiB3aWR0aD0iMTEwLjUlIiBoZWlnaHQ9IjExMC41JSIgZmlsdGVyVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94IiBpZD0icHJlZml4X19hIj48ZmVPZmZzZXQgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjEiIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIvPjxmZUNvbXBvc2l0ZSBpbj0ic2hhZG93Qmx1ck91dGVyMSIgaW4yPSJTb3VyY2VBbHBoYSIgb3BlcmF0b3I9Im91dCIgcmVzdWx0PSJzaGFkb3dCbHVyT3V0ZXIxIi8+PGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDEgMCAwIDAgMCAxIDAgMCAwIDAgMSAwIDAgMCAwLjUgMCIgaW49InNoYWRvd0JsdXJPdXRlcjEiLz48L2ZpbHRlcj48ZmlsdGVyIHg9Ii0xMS40JSIgeT0iLTExLjQlIiB3aWR0aD0iMTIyLjklIiBoZWlnaHQ9IjEyMi45JSIgZmlsdGVyVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94IiBpZD0icHJlZml4X19jIj48ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSI0LjUiIGluPSJTb3Vy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gZmlsbC1ydWxlPSJub256ZXJvIi8+PC9nPjwvc3ZnPg==`;
|
|
3
|
+
const exitIconSvg = `
|
|
4
|
+
<svg class="fpm__exit-icon width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<defs>
|
|
6
|
+
<radialGradient cx="50%" cy="50%" fx="50%" fy="50%" r="86.3016741%" id="radialGradient-1">
|
|
7
|
+
<stop stop-color="#FFFFFF" offset="0%"></stop>
|
|
8
|
+
<stop stop-color="#FFFFFF" stop-opacity="0.3" offset="100%"></stop>
|
|
9
|
+
</radialGradient>
|
|
10
|
+
<radialGradient cx="50%" cy="50%" fx="50%" fy="50%" r="70.7106781%" id="radialGradient-2">
|
|
11
|
+
<stop stop-color="#FFFFFF" offset="0%"></stop>
|
|
12
|
+
<stop stop-color="#FFFFFF" stop-opacity="0" offset="100%"></stop>
|
|
13
|
+
</radialGradient>
|
|
14
|
+
</defs>
|
|
15
|
+
<g fill="url(#radialGradient-1)" fill-rule="nonzero" stroke="url(#radialGradient-2)" stroke-width="0.2">
|
|
16
|
+
<path d="M19.1859205,4.10000004 C19.3691554,4.09993923 19.5526088,4.16602323 19.6925352,4.29904206 C19.8171021,4.41745965 19.8858582,4.56899486 19.8980316,4.7239943 C19.9103475,4.88080848 19.8647874,5.04088037 19.7661957,5.16777131 L19.7661957,5.16777131 L14.3769795,11.1697063 C14.1649599,11.4058657 14.0589501,11.7029328 14.0589501,12 C14.0589501,12.2970672 14.1649599,12.5941343 14.3769795,12.8302937 L14.3769795,12.8302937 L19.6928862,18.7509889 C19.8173649,18.8694879 19.8860087,19.0210672 19.8980683,19.1760728 C19.9102693,19.3328965 19.8645908,19.4929392 19.7701664,19.6153111 C19.6099275,19.772809 19.4324896,19.8610254 19.2586274,19.8856752 C19.0810547,19.910851 18.9081905,19.8692156 18.765363,19.7704965 L18.765363,19.7704965 L11.9999322,13.2904645 L5.32508998,19.6962598 C5.16077108,19.8156635 4.99335965,19.8785989 4.83451361,19.8898888 C4.67442082,19.9012674 4.52389835,19.8596921 4.3968979,19.7731206 C4.23619359,19.588506 4.14871527,19.4164558 4.12392544,19.2589757 C4.09801173,19.094356 4.14341261,18.9485987 4.23380428,18.8322287 L4.23380428,18.8322287 L9.62302046,12.8302937 C9.81773049,12.6134147 9.92302682,12.3451662 9.93892926,12.0727274 C9.95499717,11.7974536 9.87975312,11.5179151 9.70614397,11.2737767 L9.70614397,11.2737767 L4.31595492,5.25860214 C4.17860663,5.08857057 4.11166276,4.9104714 4.11172409,4.7432513 C4.11178577,4.57506821 4.18051603,4.41972395 4.30746483,4.29904206 C4.43371817,4.17902131 4.59543385,4.11349344 4.76041858,4.10187732 L4.76041858,4.10187732 L12.0000677,10.7085251 L18.6794563,4.29937602 C18.8192839,4.16626546 19.0026873,4.10006086 19.1859205,4.10000004 Z" id="形状结合"></path>
|
|
17
|
+
</g>
|
|
18
|
+
</svg>
|
|
19
|
+
`;
|
|
20
|
+
export default `
|
|
21
|
+
<style>
|
|
22
|
+
.mobile .fpm__exit {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 53px;
|
|
25
|
+
left: 16px;
|
|
26
|
+
width: 24px;
|
|
27
|
+
height: 24px;
|
|
28
|
+
z-index: 10;
|
|
29
|
+
pointer-events: all;
|
|
30
|
+
}
|
|
31
|
+
.mobile .fpm__exit-icon {
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
.fpm_operating--mobile {
|
|
37
|
+
padding-bottom: 23px;
|
|
38
|
+
}
|
|
39
|
+
.fpm__main-btn {
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
align-items: center;
|
|
43
|
+
margin: 0 !important;
|
|
44
|
+
}
|
|
45
|
+
.fpm__main-btn-text {
|
|
46
|
+
position: absolute;
|
|
47
|
+
font-weight: 500;
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
color: #FFFFFF;
|
|
50
|
+
text-align: center;
|
|
51
|
+
text-shadow: 0 2px 8px rgba(0,0,0,0.50);
|
|
52
|
+
transition: all 200ms ease-in-out;
|
|
53
|
+
}
|
|
54
|
+
.fpm__main-text__hide {
|
|
55
|
+
transform: scale(0.8) translateY(4px);
|
|
56
|
+
opacity: 0;
|
|
57
|
+
}
|
|
58
|
+
.fpm__main-text__show {
|
|
59
|
+
transform: scale(1) translateY(0);
|
|
60
|
+
opacity: 1;
|
|
61
|
+
}
|
|
62
|
+
.fpm__main__start {
|
|
63
|
+
background-image: url(${startIconImage});
|
|
64
|
+
}
|
|
65
|
+
.fpm__main__end {
|
|
66
|
+
background-image: url(${endIconImage});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
</style>
|
|
70
|
+
<div class="fpm__exit">
|
|
71
|
+
${exitIconSvg}
|
|
72
|
+
</div>
|
|
73
|
+
<div class="fpm_ui-bg"></div>
|
|
74
|
+
<div class="fpm_operating-space fpm_operating--mobile">
|
|
75
|
+
<div class="fpm__main fpm__main-btn">
|
|
76
|
+
<div class="fpm__main-icon fpm__main__start"></div>
|
|
77
|
+
<div class="fpm__main-text fpm__main-btn-text">开始</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
`;
|
|
@@ -11,7 +11,9 @@ export declare const operatingSpaceStyle: Partial<CSSStyleDeclaration>;
|
|
|
11
11
|
export declare const buttonGroupStyle: Partial<CSSStyleDeclaration>;
|
|
12
12
|
export declare const controllerBackgroundStyle: Partial<CSSStyleDeclaration>;
|
|
13
13
|
export declare const mainItemStyle: Partial<CSSStyleDeclaration>;
|
|
14
|
+
export declare const newMainItemStyle: Partial<CSSStyleDeclaration>;
|
|
14
15
|
export declare const exitItemStyle: Partial<CSSStyleDeclaration>;
|
|
15
16
|
export declare const mainIconStyle: Partial<CSSStyleDeclaration>;
|
|
17
|
+
export declare const newMainIconStyle: Partial<CSSStyleDeclaration>;
|
|
16
18
|
export declare const exitIconStyle: Partial<CSSStyleDeclaration>;
|
|
17
19
|
export declare const textStyle: Partial<CSSStyleDeclaration>;
|