@realsee/dnalogel 2.8.2 → 2.8.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/index.js +74 -74
- package/dist/Object3DHelperPlugin/Controller.d.ts +1 -0
- package/dist/index.cjs.js +29 -29
- package/dist/index.js +2566 -2595
- package/dist/index.umd.js +26 -26
- package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +11 -25
- package/dist/shared-utils/Object3DHelper/Controller/RotateController.d.ts +4 -3
- package/dist/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +25 -16
- package/dist/shared-utils/Object3DHelper/typings/Hooks.d.ts +1 -1
- package/dist/shared-utils/Object3DHelper/utils/setObjectQuaternion.d.ts +8 -0
- package/dist/shared-utils/math/deg2Rad.d.ts +1 -0
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +20 -20
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +27 -27
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoMeasurePluginLine.html +23 -23
- package/docs/classes/PanoMeasurePluginModel.html +22 -22
- package/docs/classes/PanoMeasurePluginPoint.html +14 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
- package/docs/classes/PanoTagPluginController.html +47 -47
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +18 -18
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +5 -5
- package/docs/functions/CameraMovementPlugin.html +5 -5
- package/docs/functions/CruisePlugin.html +5 -5
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +5 -5
- package/docs/functions/MapviewFloorplanPlugin.html +5 -5
- package/docs/functions/ModelChassisCompassPlugin.html +5 -5
- package/docs/functions/ModelEntryDoorGuidePlugin.html +5 -5
- package/docs/functions/ModelFloorplanPlugin.html +5 -5
- package/docs/functions/ModelItemLabelPlugin.html +5 -5
- package/docs/functions/ModelRoomLabelPlugin.html +5 -5
- package/docs/functions/ModelTVVideoPlugin.html +5 -5
- package/docs/functions/ModelViewPlugin.html +5 -5
- package/docs/functions/Object3DHelperPlugin.html +5 -5
- package/docs/functions/PanoCompassPlugin.html +5 -5
- package/docs/functions/PanoCursorRaycasterPlugin.html +5 -5
- package/docs/functions/PanoDoorLabelPlugin.html +5 -5
- package/docs/functions/PanoFloorplanRadarPlugin.html +5 -5
- package/docs/functions/PanoMeasurePlugin.html +5 -5
- package/docs/functions/PanoRulerPlugin.html +5 -5
- package/docs/functions/PanoRulerProPlugin.html +5 -5
- package/docs/functions/PanoSpatialTagPlugin.html +5 -5
- package/docs/functions/PanoTagPlugin.html +5 -5
- package/docs/functions/TopviewFloorplanPlugin.html +5 -5
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +4 -4
- package/docs/interfaces/AddTagConfig.html +6 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/EventMap.html +15 -15
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/HelperOffset.html +8 -8
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/MinMax.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +11 -11
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/ObjectHelperControllers.html +9 -9
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
- package/docs/interfaces/PanoMeasureParameterType.html +12 -12
- package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -8
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/State.html +8 -8
- package/docs/interfaces/TagCache.html +12 -12
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/TagIconUrl.html +9 -9
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/TemporaryState.html +6 -6
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/AudioAppearance.html +5 -5
- package/docs/types/AudioTagTypeConfigKey.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/ClassFunctionParameters.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeySplit.html +5 -5
- package/docs/types/ContentTypeMap.html +5 -5
- package/docs/types/Create3DDomContainerReturnType.html +5 -5
- package/docs/types/Create3DElementReturnType.html +5 -5
- package/docs/types/CruisePluginExportType.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/HelperEventMap.html +9 -9
- package/docs/types/LoadTagConfig.html +5 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.html +5 -5
- package/docs/types/MediaStore.html +5 -5
- package/docs/types/ModelElement.html +5 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
- package/docs/types/MoveArgs.html +5 -5
- package/docs/types/MoveOpts.html +5 -5
- package/docs/types/Object3DHelperEventMap.html +5 -5
- package/docs/types/ObjectFit.html +5 -5
- package/docs/types/PaintBrushEventMap.html +5 -5
- package/docs/types/PanoCompassPluginData.html +5 -5
- package/docs/types/PanoCompassPluginExportType.html +5 -5
- package/docs/types/PanoCompassPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
- package/docs/types/PanoIndex.html +5 -5
- package/docs/types/PanoMeasurePluginEvent.html +5 -5
- package/docs/types/PanoMeasureReturnType.html +5 -5
- package/docs/types/PanoSpatialTagPluginId.html +5 -5
- package/docs/types/PanoTagPluginExportInterface.html +5 -5
- package/docs/types/PanoTagPluginParamsInterface.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PlaneTagElement.html +5 -5
- package/docs/types/Point2DElement.html +5 -5
- package/docs/types/Point2DTag.html +5 -5
- package/docs/types/Point3DElement.html +5 -5
- package/docs/types/Point3DTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/PointTagElement.html +5 -5
- package/docs/types/Position.html +5 -5
- package/docs/types/RotateArgs.html +5 -5
- package/docs/types/RotateOpts.html +5 -5
- package/docs/types/RuleLabelsKey.html +5 -5
- package/docs/types/RuleLabelsValue.html +5 -5
- package/docs/types/StickType.html +5 -5
- package/docs/types/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagContentType.html +5 -5
- package/docs/types/TagDimensionType.html +5 -5
- package/docs/types/TagElement.html +5 -5
- package/docs/types/TagEvents.html +5 -5
- package/docs/types/TagGLTFObject.html +5 -5
- package/docs/types/TagHooks.html +5 -5
- package/docs/types/TagIconSize.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TagPointType.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/WorkCode.html +5 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
- package/docs/variables/PLUGIN.html +5 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
- package/docs/variables/ROOM_TYPE_MAP.html +5 -5
- package/docs/variables/VERSION.html +5 -5
- package/docs/variables/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/Object3DHelperPlugin/Controller.d.ts +1 -0
- package/libs/Object3DHelperPlugin/Controller.js +5 -2
- package/libs/Object3DHelperPlugin/index.js +10 -7
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.d.ts +4 -0
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.js +6 -0
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.d.ts +93 -0
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.js +5622 -0
- package/libs/PanoTagPlugin/mocks/v1/mock-test3-realsee-cn-4zr0A5.js +1325 -0
- package/libs/PanoTagPlugin/mocks/v1/mock1.d.ts +173 -0
- package/libs/PanoTagPlugin/mocks/v1/mock1.js +122 -0
- package/libs/PanoTagPlugin/mocks/v1/mock2.d.ts +233 -0
- package/libs/PanoTagPlugin/mocks/v1/mock2.js +296 -0
- package/libs/PanoTagPlugin/mocks/v1/mock3.d.ts +22 -0
- package/libs/PanoTagPlugin/mocks/v1/mock3.js +32 -0
- package/libs/PanoTagPlugin/mocks/v1/mock4.d.ts +56 -0
- package/libs/PanoTagPlugin/mocks/v1/mock4.js +60 -0
- package/libs/PanoTagPlugin/mocks/v1/mock5.d.ts +13 -0
- package/libs/PanoTagPlugin/mocks/v1/mock5.js +17 -0
- package/libs/PanoTagPlugin/mocks/v1/mock6.d.ts +16 -0
- package/libs/PanoTagPlugin/mocks/v1/mock6.js +27 -0
- package/libs/PanoTagPlugin/mocks/v1/mock7.d.ts +22 -0
- package/libs/PanoTagPlugin/mocks/v1/mock7.js +228 -0
- package/libs/components/PaintBrush/Controller.js +98 -98
- package/libs/index.js +102 -100
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +15 -15
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +11 -25
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +19 -22
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.d.ts +4 -3
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +102 -112
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +25 -16
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +66 -88
- package/libs/shared-utils/Object3DHelper/typings/Hooks.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/utils/setObjectQuaternion.d.ts +8 -0
- package/libs/shared-utils/Object3DHelper/utils/setObjectQuaternion.js +11 -0
- package/libs/shared-utils/math/deg2Rad.d.ts +1 -0
- package/libs/shared-utils/math/deg2Rad.js +6 -0
- package/package.json +1 -1
package/components/index.js
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var g = (
|
|
1
|
+
var M = Object.defineProperty;
|
|
2
|
+
var U = (r, n, t) => n in r ? M(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
|
|
3
|
+
var g = (r, n, t) => (U(r, typeof n != "symbol" ? n + "" : n, t), t);
|
|
4
4
|
import { Tween as W, Easing as $ } from "@tweenjs/tween.js";
|
|
5
|
-
function
|
|
5
|
+
function j() {
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const L = () => Promise.resolve(), k = {
|
|
8
8
|
__queue: Promise.resolve()
|
|
9
9
|
};
|
|
10
|
-
function q(
|
|
11
|
-
k.__queue = k.__queue.then(
|
|
10
|
+
function q(r = L) {
|
|
11
|
+
k.__queue = k.__queue.then(r).catch(L);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const e =
|
|
13
|
+
function _(r, n, t) {
|
|
14
|
+
const e = r.x, s = r.y, i = Math.floor(e / n * 1e4) / 1e4, c = Math.floor(s / t * 1e4) / 1e4;
|
|
15
15
|
return { x: i, y: c };
|
|
16
16
|
}
|
|
17
|
-
function T(
|
|
18
|
-
const { x: e, y: s } =
|
|
17
|
+
function T(r, n, t) {
|
|
18
|
+
const { x: e, y: s } = r, i = e * n, c = s * t;
|
|
19
19
|
return { x: i, y: c };
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
if (
|
|
21
|
+
function b(r) {
|
|
22
|
+
if (r.length < 2)
|
|
23
23
|
return {};
|
|
24
|
-
const n =
|
|
24
|
+
const n = r.slice(-2), t = n[0], e = {
|
|
25
25
|
x: (n[0].x + n[1].x) / 2,
|
|
26
26
|
y: (n[0].y + n[1].y) / 2
|
|
27
27
|
};
|
|
28
28
|
return { control: t, end: e };
|
|
29
29
|
}
|
|
30
|
-
function O(
|
|
30
|
+
function O(r, n, t = j) {
|
|
31
31
|
new Promise((e) => {
|
|
32
32
|
setTimeout(() => {
|
|
33
33
|
t(), e(!0);
|
|
34
|
-
}, n *
|
|
34
|
+
}, n * r);
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
const I = window, H = window.requestAnimationFrame || I.webkitRequestAnimationFrame || ((
|
|
38
|
-
function
|
|
39
|
-
n <= 0 ? H(
|
|
37
|
+
const I = window, H = window.requestAnimationFrame || I.webkitRequestAnimationFrame || ((r) => setTimeout(r, 16));
|
|
38
|
+
function E(r, n = 0) {
|
|
39
|
+
n <= 0 ? H(r) : H(() => E(r, n - 1));
|
|
40
40
|
}
|
|
41
|
-
function A(
|
|
42
|
-
const s = new W(
|
|
41
|
+
function A(r, n, t, e = $.Linear.None) {
|
|
42
|
+
const s = new W(r).to(n, t).easing(e).start();
|
|
43
43
|
function i(c) {
|
|
44
44
|
!s.update(c) || requestAnimationFrame(i);
|
|
45
45
|
}
|
|
46
46
|
return requestAnimationFrame(i), s;
|
|
47
47
|
}
|
|
48
|
-
var v = /* @__PURE__ */ ((
|
|
48
|
+
var v = /* @__PURE__ */ ((r) => (r.Drawline = "Drawline", r.Undo = "Undo", r.Exit = "Exit", r))(v || {});
|
|
49
49
|
const C = Symbol("$$PAINT_BRUSH_EVENT$$");
|
|
50
|
-
function
|
|
51
|
-
return
|
|
50
|
+
function B(r) {
|
|
51
|
+
return r[C] || (r[C] = {}), r[C];
|
|
52
52
|
}
|
|
53
|
-
function F(
|
|
54
|
-
|
|
53
|
+
function F(r) {
|
|
54
|
+
r[C] || delete r[C];
|
|
55
55
|
}
|
|
56
56
|
class P {
|
|
57
57
|
hasListener(n) {
|
|
58
|
-
const t =
|
|
58
|
+
const t = B(this);
|
|
59
59
|
return t && t[n] && t[n].length > 0;
|
|
60
60
|
}
|
|
61
61
|
on(n, t, e) {
|
|
62
|
-
const s =
|
|
62
|
+
const s = B(this);
|
|
63
63
|
return s[n] || (s[n] = []), s[n].push([t, e || !1]), () => this.off(n, t);
|
|
64
64
|
}
|
|
65
65
|
once(n, t) {
|
|
@@ -70,7 +70,7 @@ class P {
|
|
|
70
70
|
F(this);
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
const e =
|
|
73
|
+
const e = B(this);
|
|
74
74
|
if (e[n] || (e[n] = []), t === void 0) {
|
|
75
75
|
e[n].length = 0;
|
|
76
76
|
return;
|
|
@@ -82,10 +82,10 @@ class P {
|
|
|
82
82
|
}
|
|
83
83
|
emit(n, ...t) {
|
|
84
84
|
let e = !1;
|
|
85
|
-
const i =
|
|
85
|
+
const i = B(this)[n] || [];
|
|
86
86
|
for (let c of i.slice()) {
|
|
87
|
-
const [
|
|
88
|
-
l && this.off(n,
|
|
87
|
+
const [o, l = !1] = c, f = o(...t);
|
|
88
|
+
l && this.off(n, o), f === !1 && (e = !0);
|
|
89
89
|
}
|
|
90
90
|
return e;
|
|
91
91
|
}
|
|
@@ -248,9 +248,9 @@ class X extends P {
|
|
|
248
248
|
const e = document.createElement("div");
|
|
249
249
|
e.className = "_paintBrush-ctrlinner";
|
|
250
250
|
const s = document.createElement("a");
|
|
251
|
-
s.className = "_paintBrush-ctrlitem _paintBrush-ctrlitem--undo", s.addEventListener("click", (
|
|
251
|
+
s.className = "_paintBrush-ctrlitem _paintBrush-ctrlitem--undo", s.addEventListener("click", (o) => {
|
|
252
252
|
var h;
|
|
253
|
-
if (
|
|
253
|
+
if (o.stopPropagation(), this.configs.onClickUndo && this.configs.onClickUndo(), !this.canvas[this.uuid] || !this.data[this.uuid] || this.data[this.uuid].length === 0)
|
|
254
254
|
return;
|
|
255
255
|
const l = this.data[this.uuid].pop();
|
|
256
256
|
l && this.emitStateChange({
|
|
@@ -267,13 +267,13 @@ class X extends P {
|
|
|
267
267
|
f && f.clearRect(0, 0, x, u), this.data[this.uuid].forEach((a) => this.handleDrawLine(this.uuid, a, { withUndo: !0 }));
|
|
268
268
|
});
|
|
269
269
|
const i = document.createElement("a");
|
|
270
|
-
return i.className = "_paintBrush-ctrlitem _paintBrush-ctrlitem--close", i.addEventListener("click", (
|
|
271
|
-
|
|
272
|
-
}), [s, i].forEach((
|
|
270
|
+
return i.className = "_paintBrush-ctrlitem _paintBrush-ctrlitem--close", i.addEventListener("click", (o) => {
|
|
271
|
+
o.stopPropagation(), this.closeBrush(), this.configs.onClickClose && this.configs.onClickClose();
|
|
272
|
+
}), [s, i].forEach((o) => {
|
|
273
273
|
const l = document.createElement("i");
|
|
274
274
|
l.className = "brush-icon";
|
|
275
275
|
const f = document.createElement("span");
|
|
276
|
-
f.className = "brush-txt", f.innerText =
|
|
276
|
+
f.className = "brush-txt", f.innerText = o.className.endsWith("undo") ? this.configs.onUndoText : this.configs.onExitText, o.appendChild(l), o.appendChild(f);
|
|
277
277
|
}), e.appendChild(s), e.appendChild(i), t.appendChild(e), this.container.appendChild(t), t;
|
|
278
278
|
}
|
|
279
279
|
openBrush() {
|
|
@@ -311,7 +311,7 @@ class X extends P {
|
|
|
311
311
|
return;
|
|
312
312
|
const s = this.color || "#6D92FF";
|
|
313
313
|
e.strokeStyle = s;
|
|
314
|
-
let i = null, c = [],
|
|
314
|
+
let i = null, c = [], o, l = [], f = 0;
|
|
315
315
|
const x = (u, h, a) => {
|
|
316
316
|
const p = this.color || "#ff0000";
|
|
317
317
|
e.strokeStyle = p, e.beginPath(), e.moveTo(u.x, u.y), e.quadraticCurveTo(h.x, h.y, a.x, a.y), e.stroke();
|
|
@@ -319,27 +319,27 @@ class X extends P {
|
|
|
319
319
|
t.onmousedown = (u) => {
|
|
320
320
|
u.preventDefault(), f = Date.now();
|
|
321
321
|
const h = u.clientX, a = u.clientY;
|
|
322
|
-
c = [], c.push({ x: h, y: a }), i = { x: h, y: a },
|
|
322
|
+
c = [], c.push({ x: h, y: a }), i = { x: h, y: a }, o = _({ x: h, y: a }, this.clientWidth, this.clientHeight), l = [];
|
|
323
323
|
}, t.onmousemove = (u) => {
|
|
324
324
|
if (u.preventDefault(), !i)
|
|
325
325
|
return;
|
|
326
326
|
const h = Number(u.clientX), a = Number(u.clientY);
|
|
327
|
-
if (Math.abs(h - i.x) < 5 && Math.abs(a - i.y) < 5 || (c.push({ x: h, y: a }), l.push(
|
|
327
|
+
if (Math.abs(h - i.x) < 5 && Math.abs(a - i.y) < 5 || (c.push({ x: h, y: a }), l.push(_({ x: h, y: a }, this.clientWidth, this.clientHeight)), c.length < 3))
|
|
328
328
|
return;
|
|
329
|
-
const { control: p, end: d } =
|
|
329
|
+
const { control: p, end: d } = b(c);
|
|
330
330
|
!p || !d || (x(i, p, d), i = d);
|
|
331
331
|
}, t.onmouseup = (u) => {
|
|
332
332
|
if (u.preventDefault(), i = null, c.length < 3)
|
|
333
333
|
return;
|
|
334
334
|
this.data[this.uuid] || (this.data[this.uuid] = []);
|
|
335
335
|
const h = Date.now() - f, a = {
|
|
336
|
-
move: Object.assign({},
|
|
336
|
+
move: Object.assign({}, o),
|
|
337
337
|
uuid: this.uuid,
|
|
338
338
|
line: [...l],
|
|
339
339
|
color: this.color,
|
|
340
340
|
duration: h < 1280 ? h : h < 2e3 ? 1280 : 0
|
|
341
341
|
};
|
|
342
|
-
this.data[this.uuid].push(a),
|
|
342
|
+
this.data[this.uuid].push(a), E(() => {
|
|
343
343
|
this.emitStateChange({
|
|
344
344
|
type: v.Drawline,
|
|
345
345
|
color: this.color,
|
|
@@ -351,27 +351,27 @@ class X extends P {
|
|
|
351
351
|
}, t.ontouchstart = (u) => {
|
|
352
352
|
u.preventDefault(), f = Date.now();
|
|
353
353
|
const h = u.touches[0].clientX, a = u.touches[0].clientY;
|
|
354
|
-
c = [], c.push({ x: h, y: a }), i = { x: h, y: a },
|
|
354
|
+
c = [], c.push({ x: h, y: a }), i = { x: h, y: a }, o = _({ x: h, y: a }, this.clientWidth, this.clientHeight), l = [];
|
|
355
355
|
}, t.ontouchmove = (u) => {
|
|
356
356
|
if (u.preventDefault(), !i)
|
|
357
357
|
return;
|
|
358
358
|
const h = Number(u.touches[0].clientX), a = Number(u.touches[0].clientY);
|
|
359
|
-
if (Math.abs(h - i.x) < 5 && Math.abs(a - i.y) < 5 || (c.push({ x: h, y: a }), l.push(
|
|
359
|
+
if (Math.abs(h - i.x) < 5 && Math.abs(a - i.y) < 5 || (c.push({ x: h, y: a }), l.push(_({ x: h, y: a }, this.clientWidth, this.clientHeight)), c.length < 3))
|
|
360
360
|
return;
|
|
361
|
-
const { control: p, end: d } =
|
|
361
|
+
const { control: p, end: d } = b(c);
|
|
362
362
|
!p || !d || (x(i, p, d), i = d);
|
|
363
363
|
}, t.ontouchend = t.ontouchcancel = (u) => {
|
|
364
364
|
if (u.preventDefault(), i = null, c.length < 3)
|
|
365
365
|
return;
|
|
366
366
|
this.data[this.uuid] || (this.data[this.uuid] = []);
|
|
367
367
|
const h = Date.now() - f, a = {
|
|
368
|
-
move: Object.assign({},
|
|
368
|
+
move: Object.assign({}, o),
|
|
369
369
|
line: [...l],
|
|
370
370
|
uuid: this.uuid,
|
|
371
371
|
color: this.color,
|
|
372
372
|
duration: h < 1280 ? h : h < 2e3 ? 1280 : 0
|
|
373
373
|
};
|
|
374
|
-
this.data[this.uuid].push(a),
|
|
374
|
+
this.data[this.uuid].push(a), E(() => {
|
|
375
375
|
this.emitStateChange({
|
|
376
376
|
type: v.Drawline,
|
|
377
377
|
color: this.color,
|
|
@@ -391,7 +391,7 @@ class X extends P {
|
|
|
391
391
|
if (!i || !i.line)
|
|
392
392
|
return;
|
|
393
393
|
const c = Math.ceil(i.line.length / 100);
|
|
394
|
-
for (let
|
|
394
|
+
for (let o = 0; o < c; o++) {
|
|
395
395
|
const l = {
|
|
396
396
|
uuid: this.uuid,
|
|
397
397
|
color: this.color,
|
|
@@ -402,12 +402,12 @@ class X extends P {
|
|
|
402
402
|
move: i.move,
|
|
403
403
|
duration: i.duration,
|
|
404
404
|
color: this.color,
|
|
405
|
-
line: i.line.slice(
|
|
405
|
+
line: i.line.slice(o * 100, (o + 1) * 100)
|
|
406
406
|
},
|
|
407
407
|
timestamp: s,
|
|
408
|
-
end:
|
|
408
|
+
end: o === c - 1
|
|
409
409
|
};
|
|
410
|
-
O(
|
|
410
|
+
O(o, 20, () => {
|
|
411
411
|
this.emit("stateChange", l, e);
|
|
412
412
|
});
|
|
413
413
|
}
|
|
@@ -425,40 +425,40 @@ class X extends P {
|
|
|
425
425
|
if (!!this.ready)
|
|
426
426
|
switch (s) {
|
|
427
427
|
case v.Drawline:
|
|
428
|
-
const { state: c, timestamp:
|
|
429
|
-
if (!
|
|
428
|
+
const { state: c, timestamp: o, end: l } = t;
|
|
429
|
+
if (!o || !c)
|
|
430
430
|
return;
|
|
431
|
-
this.tempLine[
|
|
431
|
+
this.tempLine[o] = [].concat(this.tempLine[o] || [], c.line), l && (Object.assign(c, { line: this.tempLine[o] }), this.handleDrawLine(i, c, {}, () => delete this.tempLine[o]));
|
|
432
432
|
break;
|
|
433
433
|
case v.Undo:
|
|
434
434
|
this.handleUndo(i);
|
|
435
435
|
break;
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
|
-
handleDrawLine(t, e, { withUndo: s = !1 }, i =
|
|
439
|
-
!e || Object.prototype.toString.call(e) != "[object Object]" || Object.keys(e).length === 0 ||
|
|
438
|
+
handleDrawLine(t, e, { withUndo: s = !1 }, i = j) {
|
|
439
|
+
!e || Object.prototype.toString.call(e) != "[object Object]" || Object.keys(e).length === 0 || q(() => new Promise((c) => {
|
|
440
440
|
if (s || (this.canvas[t] || (this.canvas[t] = this.initCanvas("_paintBrush-canvas--sync")), this.data[t] || (this.data[t] = []), this.data[t].push(e)), !this.canvas[t])
|
|
441
441
|
return;
|
|
442
|
-
const
|
|
443
|
-
if (!
|
|
442
|
+
const o = this.canvas[t].getContext("2d");
|
|
443
|
+
if (!o)
|
|
444
444
|
return;
|
|
445
445
|
const { line: l = [], color: f = "black", duration: x = 0, uuid: u } = e, h = T(e.move || {}, this.clientWidth, this.clientHeight);
|
|
446
446
|
let a = [h];
|
|
447
|
-
if (
|
|
447
|
+
if (o.strokeStyle = f, o.beginPath(), o.moveTo(h.x, h.y), x && !s) {
|
|
448
448
|
let p = [];
|
|
449
449
|
const d = this;
|
|
450
450
|
d.tween = A({ step: 0 }, { step: l.length - 1 }, x).onUpdate(({ step: y }) => {
|
|
451
|
-
var
|
|
451
|
+
var S;
|
|
452
452
|
if (d.tweening = !0, !d.ready)
|
|
453
|
-
return
|
|
454
|
-
const
|
|
455
|
-
if (!p.find((w) => w ===
|
|
456
|
-
if (p.push(
|
|
453
|
+
return o.clearRect(0, 0, d.canvas[u].width, d.canvas[u].height), (S = d.tween) == null ? void 0 : S.stop();
|
|
454
|
+
const D = Math.floor(y);
|
|
455
|
+
if (!p.find((w) => w === D)) {
|
|
456
|
+
if (p.push(D), a.push(T(l[D], d.clientWidth, d.clientHeight)), a.length < 3)
|
|
457
457
|
return;
|
|
458
|
-
const { control: w, end: N } =
|
|
458
|
+
const { control: w, end: N } = b(a);
|
|
459
459
|
if (!w || !N)
|
|
460
460
|
return;
|
|
461
|
-
|
|
461
|
+
o.quadraticCurveTo(w.x, w.y, N.x, N.y), o.stroke();
|
|
462
462
|
}
|
|
463
463
|
}).onComplete((y) => {
|
|
464
464
|
d.tween = void 0, d.tweening = !1, p = [], a = [], i && i(), c();
|
|
@@ -467,15 +467,15 @@ class X extends P {
|
|
|
467
467
|
for (let p = 0; p < l.length; p++) {
|
|
468
468
|
if (a.push(T(l[p], this.clientWidth, this.clientHeight)), a.length < 3)
|
|
469
469
|
continue;
|
|
470
|
-
const { control: d, end: y } =
|
|
471
|
-
!d || !y ||
|
|
470
|
+
const { control: d, end: y } = b(a);
|
|
471
|
+
!d || !y || o.quadraticCurveTo(d.x, d.y, y.x, y.y);
|
|
472
472
|
}
|
|
473
|
-
|
|
473
|
+
o.stroke(), a = [], i && i(), c();
|
|
474
474
|
}
|
|
475
|
-
}))
|
|
475
|
+
}));
|
|
476
476
|
}
|
|
477
477
|
handleUndo(t) {
|
|
478
|
-
if (
|
|
478
|
+
if (!this.canvas[t] || !this.data[t] || this.data[t].length === 0)
|
|
479
479
|
return;
|
|
480
480
|
this.data[t].pop();
|
|
481
481
|
const e = () => {
|
|
@@ -484,7 +484,7 @@ class X extends P {
|
|
|
484
484
|
s && s.clearRect(0, 0, this.canvas[t].width, this.canvas[t].height), this.data[t].forEach((c) => this.handleDrawLine(t, c, { withUndo: !0 }));
|
|
485
485
|
};
|
|
486
486
|
if (this.tween && this.tweening) {
|
|
487
|
-
this.tween.stop(),
|
|
487
|
+
this.tween.stop(), E(e, 60);
|
|
488
488
|
return;
|
|
489
489
|
}
|
|
490
490
|
e();
|
|
@@ -68,6 +68,7 @@ export declare class Object3DHelperController extends BasePlugin.Controller<Obje
|
|
|
68
68
|
yzCircleEnable?: boolean;
|
|
69
69
|
xzCircleEnable?: boolean;
|
|
70
70
|
xyCircleEnable?: boolean;
|
|
71
|
+
angleTipsEnable?: boolean;
|
|
71
72
|
}>;
|
|
72
73
|
scaleHelper?: HelperConfig;
|
|
73
74
|
boundingBoxHelper?: HelperConfig;
|