@realsee/dnalogel 2.7.1 → 2.7.2
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/dist/index.cjs.js +19 -19
- package/dist/index.js +344 -351
- package/dist/index.umd.js +17 -17
- package/dist/shared-utils/Object3DHelper/Base/BaseController.d.ts +32 -4
- package/dist/shared-utils/Object3DHelper/Controller/MoveController.d.ts +1 -1
- package/dist/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +4 -1
- package/dist/shared-utils/Object3DHelper/Controller/RotateController.d.ts +1 -1
- package/dist/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.d.ts +0 -2
- package/dist/shared-utils/Object3DHelper/typings/Hooks.d.ts +2 -2
- 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 +24 -24
- 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 +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- 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 +14 -14
- 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/ModelItemLabelPlugin/ItemLabelItem.js +16 -16
- package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +23 -25
- 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/shared-utils/Object3DHelper/Base/BaseController.d.ts +32 -4
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +2 -2
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +35 -35
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +4 -1
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +56 -52
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +71 -72
- package/libs/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.d.ts +0 -2
- package/libs/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js +22 -30
- package/libs/shared-utils/Object3DHelper/typings/Hooks.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var O = Object.defineProperty;
|
|
2
|
-
var T = (f,
|
|
3
|
-
var m = (f,
|
|
4
|
-
import { BaseController as
|
|
5
|
-
import * as
|
|
6
|
-
import { getMouseRaycaster as
|
|
7
|
-
class
|
|
8
|
-
constructor(...
|
|
9
|
-
super(...
|
|
2
|
+
var T = (f, g, e) => g in f ? O(f, g, { enumerable: !0, configurable: !0, writable: !0, value: e }) : f[g] = e;
|
|
3
|
+
var m = (f, g, e) => (T(f, typeof g != "symbol" ? g + "" : g, e), e);
|
|
4
|
+
import { BaseController as A } from "../Base/BaseController.js";
|
|
5
|
+
import * as s from "three";
|
|
6
|
+
import { getMouseRaycaster as H } from "../utils/getMouseRaycaster.js";
|
|
7
|
+
class C extends A {
|
|
8
|
+
constructor(...e) {
|
|
9
|
+
super(...e);
|
|
10
10
|
m(this, "name", "RotateController");
|
|
11
11
|
m(this, "startInfo");
|
|
12
12
|
m(this, "lastRotation");
|
|
@@ -15,9 +15,9 @@ class Q extends R {
|
|
|
15
15
|
m(this, "removeListener");
|
|
16
16
|
const t = this.helperObject3D;
|
|
17
17
|
this.hoverListener([t.xyCircle, t.xzCircle, t.yzCircle]);
|
|
18
|
-
const
|
|
19
|
-
this.domEvents.addEventListener(this.helperObject3D, "mousedown",
|
|
20
|
-
this.domEvents.removeEventListener(this.helperObject3D, "mousedown",
|
|
18
|
+
const n = this.dragStart.bind(this), r = this.dragging.bind(this), i = this.dragEnd.bind(this), o = this.show.bind(this), c = this.hide.bind(this);
|
|
19
|
+
this.domEvents.addEventListener(this.helperObject3D, "mousedown", n), document.addEventListener("mousemove", r), document.addEventListener("mouseup", i), this.hooks.on("moveStart", c), this.hooks.on("moveEnd", o), this.hooks.on("moveByMouseEnable", c), this.hooks.on("moveByMouseDisable", o), this.removeListener = () => {
|
|
20
|
+
this.domEvents.removeEventListener(this.helperObject3D, "mousedown", n), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i), this.hooks.off("moveStart", c), this.hooks.off("moveEnd", o), this.hooks.off("moveByMouseEnable", c), this.hooks.off("moveByMouseDisable", o);
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
get rotateCenter() {
|
|
@@ -26,73 +26,72 @@ class Q extends R {
|
|
|
26
26
|
initialHelperQuaternion() {
|
|
27
27
|
this.helperObject3D.updateAngleHelperQuaternion(), this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion);
|
|
28
28
|
}
|
|
29
|
-
setRotateAngle(
|
|
30
|
-
const { x: t = 0, y:
|
|
31
|
-
if (this.hooks.emit("wantToRotate",
|
|
29
|
+
setRotateAngle(e) {
|
|
30
|
+
const { x: t = 0, y: n = 0, z: r = 0 } = e, i = new s.Euler(Math.PI * t / 180, Math.PI * n / 180, Math.PI * r / 180), o = new s.Quaternion().setFromEuler(i);
|
|
31
|
+
if (this.hooks.emit("wantToRotate", o))
|
|
32
32
|
return;
|
|
33
|
-
const { originObject3D: a, rotateCenter:
|
|
34
|
-
if (
|
|
35
|
-
const
|
|
36
|
-
a.position.copy(
|
|
33
|
+
const { originObject3D: a, rotateCenter: p } = this;
|
|
34
|
+
if (p) {
|
|
35
|
+
const h = new s.Vector3().subVectors(a.position, p).applyQuaternion(o).add(p);
|
|
36
|
+
a.position.copy(h);
|
|
37
37
|
}
|
|
38
|
-
a.quaternion.copy(
|
|
38
|
+
a.quaternion.copy(o), this.helperObject3DQuaternion.copy(o), this.hooks.emit("setObjectRotate", o, p), this.hooks.emit("rotate", o), this.render();
|
|
39
39
|
}
|
|
40
40
|
dispose() {
|
|
41
41
|
this.removeListener(), super.dispose();
|
|
42
42
|
}
|
|
43
|
-
onApplyOriginObjectScale(
|
|
43
|
+
onApplyOriginObjectScale(e) {
|
|
44
44
|
}
|
|
45
|
-
dragStart(
|
|
45
|
+
dragStart(e) {
|
|
46
46
|
if (this.isDragging)
|
|
47
47
|
return;
|
|
48
|
-
const t =
|
|
48
|
+
const t = e == null ? void 0 : e.intersect;
|
|
49
49
|
if (!t)
|
|
50
50
|
return this.dragEnd();
|
|
51
|
-
const
|
|
52
|
-
if (!
|
|
51
|
+
const n = (t == null ? void 0 : t.object).direction;
|
|
52
|
+
if (!n)
|
|
53
53
|
return this.dragEnd();
|
|
54
54
|
this.helperObject3D.updateAngleHelperQuaternion();
|
|
55
|
-
const r = t.point,
|
|
55
|
+
const r = t.point, i = this.getAngleHelper(n);
|
|
56
56
|
this.setTipsAngle(0);
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
const c = new
|
|
60
|
-
switch (
|
|
57
|
+
const o = r.clone();
|
|
58
|
+
o.y += 0.2, this.setTipsPosition(o);
|
|
59
|
+
const c = new s.Vector3(1, 0, 0).applyQuaternion(this.helperObject3DQuaternion), a = new s.Vector3(0, 1, 0).applyQuaternion(this.helperObject3DQuaternion), p = new s.Vector3(0, 0, 1).applyQuaternion(this.helperObject3DQuaternion), h = (() => {
|
|
60
|
+
switch (n) {
|
|
61
61
|
case "x":
|
|
62
62
|
return c;
|
|
63
63
|
case "y":
|
|
64
64
|
return a;
|
|
65
65
|
case "z":
|
|
66
|
-
return
|
|
66
|
+
return p;
|
|
67
67
|
}
|
|
68
|
-
})(), b = new
|
|
68
|
+
})(), b = new s.Plane().setFromNormalAndCoplanarPoint(h, r), u = new s.Vector3();
|
|
69
69
|
b.projectPoint(r.clone(), u);
|
|
70
|
-
const
|
|
71
|
-
this.setAngleHelperStart(
|
|
70
|
+
const l = u.clone().sub(this.rotateCenter), D = l.clone(), w = l.angleTo(i.baseAxes);
|
|
71
|
+
this.setAngleHelperStart(n, w), this.setAngleHelperLength(n, 0), this.rotations.push({ vector: l.clone(), direction: !0 }), this.startInfo = { direction: n, startVector: l, staticStartVector: D, plane: b, angleHelper: i }, this.helperObject3D.showDraggingHelper([n]), this.hooks.emit("rotateStart"), this.isDragging = !0;
|
|
72
72
|
}
|
|
73
|
-
dragging(
|
|
74
|
-
var e;
|
|
73
|
+
dragging(e) {
|
|
75
74
|
if (!this.isDragging)
|
|
76
75
|
return;
|
|
77
|
-
const t =
|
|
78
|
-
return t ? (
|
|
76
|
+
const t = H(this.camera, e, this.container);
|
|
77
|
+
return t ? (this.rotate(t), !1) : this.dragEnd();
|
|
79
78
|
}
|
|
80
|
-
rotate(
|
|
79
|
+
rotate(e) {
|
|
81
80
|
if (!this.startInfo)
|
|
82
81
|
return this.dragEnd();
|
|
83
|
-
const { startVector: t, plane:
|
|
82
|
+
const { startVector: t, plane: n, angleHelper: r, staticStartVector: i, direction: o } = this.startInfo, c = e.ray.intersectPlane(n, new s.Vector3());
|
|
84
83
|
if (!c)
|
|
85
84
|
return;
|
|
86
|
-
const a = this.rotateCenter,
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
if (t.angleTo(
|
|
85
|
+
const a = this.rotateCenter, p = new s.Vector3();
|
|
86
|
+
n.projectPoint(c.clone(), p);
|
|
87
|
+
const h = p.clone().sub(a);
|
|
88
|
+
if (t.angleTo(h) === 0 || (this.lastRotation === void 0 && (this.lastRotation = { angle: 0 }), this.rotations.length === 0))
|
|
90
89
|
return;
|
|
91
90
|
const b = (() => {
|
|
92
91
|
if (this.rotations.length === 1)
|
|
93
|
-
return
|
|
92
|
+
return h.angleTo(r.baseAxes) > i.angleTo(r.baseAxes);
|
|
94
93
|
{
|
|
95
|
-
const d = this.rotations[this.rotations.length - 1],
|
|
94
|
+
const d = this.rotations[this.rotations.length - 1], E = this.rotations[this.rotations.length - 2], y = h.angleTo(E.vector), v = h.angleTo(d.vector), j = d.vector.angleTo(E.vector);
|
|
96
95
|
if (j === 0 || v === 0 || y === 0)
|
|
97
96
|
return;
|
|
98
97
|
if (y > v && y > j)
|
|
@@ -103,20 +102,20 @@ class Q extends R {
|
|
|
103
102
|
})();
|
|
104
103
|
if (b === void 0)
|
|
105
104
|
return console.warn("rotationDirection is undefined");
|
|
106
|
-
const u = new
|
|
105
|
+
const u = new s.Quaternion().setFromUnitVectors(t.clone().normalize(), h.clone().normalize()), { originObject3D: l } = this, D = l.quaternion.clone().premultiply(u);
|
|
107
106
|
if (!this.hooks.emit("wantToRotate", D)) {
|
|
108
|
-
if (this.rotations.push({ vector:
|
|
109
|
-
const d = new
|
|
110
|
-
|
|
107
|
+
if (this.rotations.push({ vector: h, direction: b }), this.rotations = this.rotations.slice(-2), this.lastRotation.angle = this.lastRotation.angle + h.angleTo(t) * (b ? 1 : -1), this.setAngleHelperLength(o, this.lastRotation.angle), this.setTipsAngle(this.lastRotation.angle / Math.PI * 180), a) {
|
|
108
|
+
const d = new s.Vector3().subVectors(l.position, a).applyQuaternion(u).add(a);
|
|
109
|
+
l.position.copy(d);
|
|
111
110
|
}
|
|
112
|
-
|
|
111
|
+
l.applyQuaternion(u), this.helperObject3DQuaternion.premultiply(u), this.hooks.emit("applyObjectRotate", { quaternion: u, origin: a }), this.hooks.emit("rotate", l.quaternion), this.startInfo.startVector = h;
|
|
113
112
|
}
|
|
114
113
|
}
|
|
115
114
|
dragEnd() {
|
|
116
|
-
!this.isDragging || (
|
|
115
|
+
!this.isDragging || (this.startInfo = void 0, this.isDragging = !1, this.lastRotation = void 0, this.rotations = [], this.helperObject3D.show(), this.hooks.emit("rotateEnd"));
|
|
117
116
|
}
|
|
118
|
-
getAngleHelper(
|
|
119
|
-
switch (
|
|
117
|
+
getAngleHelper(e) {
|
|
118
|
+
switch (e) {
|
|
120
119
|
case "x":
|
|
121
120
|
return this.helperObject3D.xAngleHelper;
|
|
122
121
|
case "y":
|
|
@@ -125,38 +124,38 @@ class Q extends R {
|
|
|
125
124
|
return this.helperObject3D.zAngleHelper;
|
|
126
125
|
}
|
|
127
126
|
}
|
|
128
|
-
setAngleHelperStart(
|
|
129
|
-
const
|
|
130
|
-
if (
|
|
131
|
-
const { radius: r, segments:
|
|
132
|
-
|
|
127
|
+
setAngleHelperStart(e, t) {
|
|
128
|
+
const n = this.getAngleHelper(e);
|
|
129
|
+
if (n instanceof s.Mesh && n.geometry instanceof s.CircleGeometry) {
|
|
130
|
+
const { radius: r, segments: i, thetaLength: o } = n.geometry.parameters;
|
|
131
|
+
n.geometry = new s.CircleGeometry(r, i, t, o);
|
|
133
132
|
} else
|
|
134
133
|
console.warn("only support THREE.CircleGeometry");
|
|
135
134
|
}
|
|
136
|
-
setAngleHelperLength(
|
|
137
|
-
const r = t >= 0 ? Math.max(t, 1e-3) : Math.min(t, -1e-3),
|
|
138
|
-
if (
|
|
139
|
-
const { radius:
|
|
140
|
-
|
|
135
|
+
setAngleHelperLength(e, t) {
|
|
136
|
+
const r = t >= 0 ? Math.max(t, 1e-3) : Math.min(t, -1e-3), i = this.getAngleHelper(e);
|
|
137
|
+
if (i instanceof s.Mesh && i.geometry instanceof s.CircleGeometry) {
|
|
138
|
+
const { radius: o, thetaStart: c } = i.geometry.parameters, a = Math.ceil(Math.abs(r) * (40 / (2 * Math.PI)));
|
|
139
|
+
i.geometry = new s.CircleGeometry(o, a, c, r);
|
|
141
140
|
} else
|
|
142
141
|
console.warn("only support THREE.CircleGeometry");
|
|
143
142
|
}
|
|
144
|
-
setTipsAngle(
|
|
145
|
-
var
|
|
146
|
-
const t = (
|
|
147
|
-
!t || (t.innerText = `${
|
|
143
|
+
setTipsAngle(e) {
|
|
144
|
+
var n;
|
|
145
|
+
const t = (n = this.helperObject3D.angleTips) == null ? void 0 : n.element;
|
|
146
|
+
!t || (t.innerText = `${e.toFixed(0)}\xB0`);
|
|
148
147
|
}
|
|
149
|
-
setTipsPosition(
|
|
148
|
+
setTipsPosition(e) {
|
|
150
149
|
const t = this.helperObject3D.angleTips;
|
|
151
150
|
if (!t)
|
|
152
151
|
return;
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
152
|
+
const n = e.project(this.camera), { x: r, y: i, z: o } = n;
|
|
153
|
+
if (o > 1)
|
|
155
154
|
return;
|
|
156
|
-
const c = (r + 1) / 2 * 100 + "%", a = (-
|
|
155
|
+
const c = (r + 1) / 2 * 100 + "%", a = (-i + 1) / 2 * 100 + "%";
|
|
157
156
|
t.setLeftTop(c, a);
|
|
158
157
|
}
|
|
159
158
|
}
|
|
160
159
|
export {
|
|
161
|
-
|
|
160
|
+
C as RotateController
|
|
162
161
|
};
|
|
@@ -16,8 +16,6 @@ export declare class CSS3DScaleHelper<T extends CSS3DObjectPlus = CSS3DObjectPlu
|
|
|
16
16
|
private container;
|
|
17
17
|
private enabled;
|
|
18
18
|
constructor(originObject3D: T, container: HTMLElement, camera: THREE.Camera, scene: THREE.Scene);
|
|
19
|
-
updatePosition(): void;
|
|
20
|
-
updateQuaternion(): void;
|
|
21
19
|
applyMatrix4(matrix: THREE.Matrix4): void;
|
|
22
20
|
showDraggingHelper(): void;
|
|
23
21
|
applyHelperScaleMatrix4(matrix: THREE.Matrix4, origin?: Vector3): void;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var i = (c, n, e) => (
|
|
4
|
-
import { CSS3DRender as
|
|
1
|
+
var u = Object.defineProperty;
|
|
2
|
+
var D = (c, n, e) => n in c ? u(c, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[n] = e;
|
|
3
|
+
var i = (c, n, e) => (D(c, typeof n != "symbol" ? n + "" : n, e), e);
|
|
4
|
+
import { CSS3DRender as b } from "../../../CSS3DRenderPlugin/CSS3DRender.js";
|
|
5
5
|
import * as p from "three";
|
|
6
|
-
import { RectangleScaleHelperAbstract as
|
|
7
|
-
import { rectangleScaleDom as
|
|
8
|
-
class
|
|
9
|
-
constructor(e, t, s,
|
|
6
|
+
import { RectangleScaleHelperAbstract as f } from "../Base/BaseHelper.js";
|
|
7
|
+
import { rectangleScaleDom as y } from "./HTML/rectangleScaleDom.js";
|
|
8
|
+
class I extends f {
|
|
9
|
+
constructor(e, t, s, l) {
|
|
10
10
|
super(e);
|
|
11
11
|
i(this, "points", []);
|
|
12
12
|
i(this, "cornerPositions", []);
|
|
13
13
|
i(this, "css3DInstance");
|
|
14
14
|
i(this, "plane");
|
|
15
|
-
i(this, "css3DRenderer", new
|
|
15
|
+
i(this, "css3DRenderer", new b());
|
|
16
16
|
i(this, "camera");
|
|
17
17
|
i(this, "scene");
|
|
18
18
|
i(this, "container");
|
|
19
19
|
i(this, "enabled", !1);
|
|
20
|
-
this.camera = s, this.scene =
|
|
20
|
+
this.camera = s, this.scene = l, this.container = t, this.initRectangleScaleHelper();
|
|
21
21
|
}
|
|
22
22
|
get helperObject() {
|
|
23
23
|
var e;
|
|
@@ -25,14 +25,6 @@ class O extends b {
|
|
|
25
25
|
throw new Error("css3DInstance is not initialized");
|
|
26
26
|
return this.css3DInstance.css3DObject;
|
|
27
27
|
}
|
|
28
|
-
updatePosition() {
|
|
29
|
-
var e;
|
|
30
|
-
this.helperObject.position.copy(this.originObject3D.position), (e = this.plane) == null || e.position.copy(this.originObject3D.position);
|
|
31
|
-
}
|
|
32
|
-
updateQuaternion() {
|
|
33
|
-
var e;
|
|
34
|
-
(e = this.plane) == null || e.quaternion.copy(this.originObject3D.quaternion);
|
|
35
|
-
}
|
|
36
28
|
applyMatrix4(e) {
|
|
37
29
|
var t;
|
|
38
30
|
super.applyMatrix4(e), this.helperObject.applyMatrix4(e), (t = this.plane) == null || t.applyMatrix4(e), this.cornerPositions.forEach((s) => s.applyMatrix4(e));
|
|
@@ -50,8 +42,8 @@ class O extends b {
|
|
|
50
42
|
});
|
|
51
43
|
}
|
|
52
44
|
applyHelperQuaternion(e, t) {
|
|
53
|
-
var
|
|
54
|
-
const s = (
|
|
45
|
+
var l;
|
|
46
|
+
const s = (l = this.css3DInstance) == null ? void 0 : l.css3DObject;
|
|
55
47
|
if (s) {
|
|
56
48
|
const a = new p.Vector3().subVectors(s.position, t).applyQuaternion(e).add(t);
|
|
57
49
|
s.position.copy(a), s.applyQuaternion(e);
|
|
@@ -61,8 +53,8 @@ class O extends b {
|
|
|
61
53
|
this.plane.position.copy(a), this.plane.applyQuaternion(e);
|
|
62
54
|
}
|
|
63
55
|
this.cornerPositions.forEach((a) => {
|
|
64
|
-
const
|
|
65
|
-
a.copy(
|
|
56
|
+
const o = new p.Vector3().subVectors(a, t).applyQuaternion(e).add(t);
|
|
57
|
+
a.copy(o);
|
|
66
58
|
});
|
|
67
59
|
}
|
|
68
60
|
enable() {
|
|
@@ -85,7 +77,7 @@ class O extends b {
|
|
|
85
77
|
this.disable(), this.css3DRenderer.dispose();
|
|
86
78
|
}
|
|
87
79
|
initRectangleScaleHelper() {
|
|
88
|
-
var
|
|
80
|
+
var o, r;
|
|
89
81
|
const e = this.getCornerPositions();
|
|
90
82
|
if (!e)
|
|
91
83
|
return;
|
|
@@ -94,12 +86,12 @@ class O extends b {
|
|
|
94
86
|
if (!t)
|
|
95
87
|
return;
|
|
96
88
|
this.css3DInstance = t, t.appendToElement(this.container);
|
|
97
|
-
const s = t.css3DObject.container, { container:
|
|
98
|
-
this.points = a.map((
|
|
99
|
-
direction:
|
|
100
|
-
point:
|
|
101
|
-
position: this.calculatePointPosition(e)[
|
|
102
|
-
})), s.insertBefore(
|
|
89
|
+
const s = t.css3DObject.container, { container: l, squares: a } = y();
|
|
90
|
+
this.points = a.map((h, d) => ({
|
|
91
|
+
direction: h.direction,
|
|
92
|
+
point: h.element,
|
|
93
|
+
position: this.calculatePointPosition(e)[d]
|
|
94
|
+
})), s.insertBefore(l, (o = s.children[0]) != null ? o : null), this.helperObject.position.copy(this.originObject3D.position), (r = this.plane) == null || r.position.copy(this.originObject3D.position);
|
|
103
95
|
}
|
|
104
96
|
getCornerPositions() {
|
|
105
97
|
const { originObject3D: e } = this;
|
|
@@ -121,5 +113,5 @@ class O extends b {
|
|
|
121
113
|
}
|
|
122
114
|
}
|
|
123
115
|
export {
|
|
124
|
-
|
|
116
|
+
I as CSS3DScaleHelper
|
|
125
117
|
};
|
|
@@ -16,14 +16,14 @@ export declare type HelperEventMap = {
|
|
|
16
16
|
setObjectRotate: (quaternion: THREE.Quaternion, origin: THREE.Vector3) => void;
|
|
17
17
|
setObjectScale: (scale: THREE.Vector3) => void;
|
|
18
18
|
applyObjectPosition: (position: {
|
|
19
|
-
|
|
19
|
+
matrix: THREE.Matrix4;
|
|
20
20
|
}) => void;
|
|
21
21
|
applyObjectRotate: (rotate: {
|
|
22
22
|
quaternion: THREE.Quaternion;
|
|
23
23
|
origin: THREE.Vector3;
|
|
24
24
|
}) => void;
|
|
25
25
|
applyObjectScale: (scale: {
|
|
26
|
-
|
|
26
|
+
matrix: THREE.Matrix4;
|
|
27
27
|
origin?: THREE.Vector3;
|
|
28
28
|
}) => void;
|
|
29
29
|
moveByMouseEnable: () => void;
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"repository": "https://github.com/realsee-developer/dnalogel.git",
|
|
8
8
|
"description": "如视 VR 看房插件合集",
|
|
9
9
|
"private": false,
|
|
10
|
-
"version": "2.7.
|
|
10
|
+
"version": "2.7.2",
|
|
11
11
|
"license": "SEE LICENSE IN TERMS.txt",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",
|