@realsee/dnalogel 2.1.0-alpha.7 → 2.1.0-alpha.9
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/CSS3DRenderPlugin/index.js +1 -0
- package/dist/CSS3DRenderPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/CSS3DRenderPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/CameraMovementPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/CameraMovementPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/CruisePlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/CruisePlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/GuideLinePlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/GuideLinePlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/ItemLabelPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/ItemLabelPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/ModelChassisCompassPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/ModelChassisCompassPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/ModelEntryDoorGuidePlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/ModelEntryDoorGuidePlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/ModelItemLabelPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/ModelItemLabelPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/ModelRoomLabelPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/ModelRoomLabelPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/ModelTVVideoPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/ModelTVVideoPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/ModelViewPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/ModelViewPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/Object3DHelperPlugin/index.js +19 -16
- package/dist/Object3DHelperPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/Object3DHelperPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/PanoCompassPlugin/index.js +1 -0
- package/dist/PanoCompassPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/PanoCompassPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/PanoCursorRaycasterPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/PanoCursorRaycasterPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/PanoDoorLabelPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/PanoDoorLabelPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/PanoMeasurePlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/PanoMeasurePlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/PanoRulerPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/PanoRulerPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/PanoRulerProPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/PanoRulerProPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/PanoSpatialTagPlugin/index.js +1 -0
- package/dist/PanoSpatialTagPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/PanoTagPlugin/index.js +1 -0
- package/dist/PanoTagPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/PanoTagPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/floorplan/MapviewFloorplanPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/floorplan/MapviewFloorplanPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/floorplan/ModelFloorplanPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/floorplan/ModelFloorplanPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/floorplan/PanoFloorplanRadarPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/floorplan/PanoFloorplanRadarPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/floorplan/TopviewFloorplanPlugin/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/floorplan/TopviewFloorplanPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/dist/index.es.js +19 -16
- package/dist/index.js +19 -16
- package/dist/index.umd.js +19 -16
- package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/docs/classes/CruisePluginController.html +14 -14
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- package/docs/classes/Object3DHelperController.html +9 -9
- package/docs/classes/PanoTagPluginController.html +25 -25
- package/docs/enums/CameraMovementEffect.html +2 -2
- package/docs/enums/ContentType.html +7 -7
- package/docs/enums/DIRECTION.html +1 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/DimensionType.html +1 -1
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/LinkType.html +1 -1
- package/docs/enums/PointType.html +1 -1
- package/docs/enums/Rotation.html +2 -2
- package/docs/index.html +1 -1
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginState.html +2 -2
- package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
- package/docs/interfaces/FloorplanBounding.html +4 -4
- package/docs/interfaces/FloorplanData.html +2 -2
- package/docs/interfaces/FloorplanEntrance.html +7 -7
- package/docs/interfaces/FloorplanExtraObject.html +3 -3
- 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 +6 -6
- package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
- package/docs/interfaces/FloorplanServerBounding.html +4 -4
- package/docs/interfaces/FloorplanServerComputedData.html +1 -1
- package/docs/interfaces/FloorplanServerData.html +2 -2
- package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
- package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
- package/docs/interfaces/FloorplanServerEntrance.html +7 -7
- 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 +7 -7
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
- package/docs/interfaces/ItemLabelPluginData.html +1 -1
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
- 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/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/Object3DHelperState.html +1 -1
- package/docs/interfaces/OpenParameter.html +2 -2
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +1 -1
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginState.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/Scissor.html +5 -5
- package/docs/interfaces/TagConfig.html +3 -3
- package/docs/interfaces/Tags.html +3 -3
- package/docs/modules.html +21 -21
- package/libs/CSS3DRenderPlugin/CSS3DRender.js +1 -0
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +12 -14
- package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.js +4 -4
- package/libs/shared-utils/Object3DHelper/index.js +2 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -634,6 +634,7 @@ class CSS3DRender {
|
|
|
634
634
|
globalStore.frontModeStore = undefined;
|
|
635
635
|
if (mode === 'behind')
|
|
636
636
|
globalStore.behindModeStore = undefined;
|
|
637
|
+
globalStore.resizeObserver = undefined;
|
|
637
638
|
}
|
|
638
639
|
return true;
|
|
639
640
|
};
|
|
@@ -27813,17 +27814,17 @@ class RectangleScaleHelper extends RectangleScaleHelperAbstract {
|
|
|
27813
27814
|
writable: true,
|
|
27814
27815
|
value: void 0
|
|
27815
27816
|
});
|
|
27816
|
-
Object.defineProperty(this, "
|
|
27817
|
+
Object.defineProperty(this, "plane", {
|
|
27817
27818
|
enumerable: true,
|
|
27818
27819
|
configurable: true,
|
|
27819
27820
|
writable: true,
|
|
27820
|
-
value:
|
|
27821
|
+
value: void 0
|
|
27821
27822
|
});
|
|
27822
|
-
Object.defineProperty(this, "
|
|
27823
|
+
Object.defineProperty(this, "css3DRenderer", {
|
|
27823
27824
|
enumerable: true,
|
|
27824
27825
|
configurable: true,
|
|
27825
27826
|
writable: true,
|
|
27826
|
-
value:
|
|
27827
|
+
value: new CSS3DRender()
|
|
27827
27828
|
});
|
|
27828
27829
|
Object.defineProperty(this, "camera", {
|
|
27829
27830
|
enumerable: true,
|
|
@@ -28847,7 +28848,8 @@ class Object3DHelper {
|
|
|
28847
28848
|
(_a = this.controllers.moveController) === null || _a === void 0 ? void 0 : _a.setHelperMatrix4(matrix4);
|
|
28848
28849
|
if (controller !== this.controllers.rotateController)
|
|
28849
28850
|
(_b = this.controllers.rotateController) === null || _b === void 0 ? void 0 : _b.setHelperMatrix4(matrix4);
|
|
28850
|
-
(
|
|
28851
|
+
if (controller !== this.controllers.scaleController)
|
|
28852
|
+
(_c = this.controllers.scaleController) === null || _c === void 0 ? void 0 : _c.setHelperMatrix4(matrix4);
|
|
28851
28853
|
(_d = this.helpers.outlineHelper) === null || _d === void 0 ? void 0 : _d.applyMatrix4(matrix4);
|
|
28852
28854
|
}
|
|
28853
28855
|
// if (position?.position) {
|
|
@@ -29438,9 +29440,6 @@ class RectangleScaleController extends BaseController {
|
|
|
29438
29440
|
this.startInfo.dragPointInCenterLeft = xIsNegative || yIsNegative || zIsNegative;
|
|
29439
29441
|
}
|
|
29440
29442
|
const offset = new Vector3$1().subVectors(nowPositionProject, startPositionProject);
|
|
29441
|
-
// TODO
|
|
29442
|
-
if (offset.length() > 0.1)
|
|
29443
|
-
return defaultVector;
|
|
29444
29443
|
return offset;
|
|
29445
29444
|
};
|
|
29446
29445
|
const ewOffset = getOffset('ew');
|
|
@@ -29485,7 +29484,6 @@ class RectangleScaleController extends BaseController {
|
|
|
29485
29484
|
setEWScale();
|
|
29486
29485
|
setNSScale();
|
|
29487
29486
|
}
|
|
29488
|
-
(_b = (_a = this.helperObject3D).updatePoints) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
29489
29487
|
// this.helperObject3D.cornerPositions.forEach((position, index) => {
|
|
29490
29488
|
// this.scene.add(getPoint(position, index))
|
|
29491
29489
|
// })
|
|
@@ -29494,20 +29492,25 @@ class RectangleScaleController extends BaseController {
|
|
|
29494
29492
|
const scaleXY = new Vector3$1(scaleX, scaleY, 1);
|
|
29495
29493
|
console.log(scaleXY);
|
|
29496
29494
|
const scaleMatrix = new THREE.Matrix4().scale(scaleXY);
|
|
29497
|
-
const newScale = object.scale.clone().applyMatrix4(scaleMatrix)
|
|
29498
|
-
object.scale.copy(newScale)
|
|
29499
|
-
|
|
29495
|
+
// const newScale = object.scale.clone().applyMatrix4(scaleMatrix)
|
|
29496
|
+
// object.scale.copy(newScale) // 或者 object.scale.applyMatrix4(scaleMatrix)
|
|
29497
|
+
object.scale.applyMatrix4(scaleMatrix);
|
|
29500
29498
|
startPoint.position.copy(planeIntersection);
|
|
29501
29499
|
// =================================================================================================================================================================
|
|
29502
29500
|
// =================================================================================================================================================================
|
|
29503
29501
|
// 移动位置
|
|
29504
29502
|
const centerPosition = new Vector3$1().addVectors(cornerPositions[0], cornerPositions[2]).divideScalar(2);
|
|
29505
29503
|
const offset = new Vector3$1().subVectors(centerPosition, planeCenter);
|
|
29506
|
-
const
|
|
29507
|
-
object.applyMatrix4(
|
|
29508
|
-
|
|
29509
|
-
this.
|
|
29504
|
+
const transformMatrix4 = new THREE.Matrix4().setPosition(offset);
|
|
29505
|
+
object.applyMatrix4(transformMatrix4);
|
|
29506
|
+
(_a = this.helperObject3D.css3DInstance) === null || _a === void 0 ? void 0 : _a.css3DObject.applyMatrix4(transformMatrix4);
|
|
29507
|
+
(_b = this.helperObject3D.plane) === null || _b === void 0 ? void 0 : _b.applyMatrix4(transformMatrix4);
|
|
29508
|
+
this.hooks.emit('scaleUpdate', { matrix4: scaleMatrix, helperOrigin: planeCenter });
|
|
29509
|
+
this.hooks.emit('positionUpdate', { matrix4: transformMatrix4 });
|
|
29510
29510
|
// 移动位置end
|
|
29511
|
+
// this.helperObject3D.cornerPositions.forEach((position, index) => {
|
|
29512
|
+
// this.scene.add(getPoint(position, index))
|
|
29513
|
+
// })
|
|
29511
29514
|
this.needsRender();
|
|
29512
29515
|
}
|
|
29513
29516
|
dragEnd() {
|
package/dist/index.js
CHANGED
|
@@ -664,6 +664,7 @@ class CSS3DRender {
|
|
|
664
664
|
globalStore.frontModeStore = undefined;
|
|
665
665
|
if (mode === 'behind')
|
|
666
666
|
globalStore.behindModeStore = undefined;
|
|
667
|
+
globalStore.resizeObserver = undefined;
|
|
667
668
|
}
|
|
668
669
|
return true;
|
|
669
670
|
};
|
|
@@ -27843,17 +27844,17 @@ class RectangleScaleHelper extends RectangleScaleHelperAbstract {
|
|
|
27843
27844
|
writable: true,
|
|
27844
27845
|
value: void 0
|
|
27845
27846
|
});
|
|
27846
|
-
Object.defineProperty(this, "
|
|
27847
|
+
Object.defineProperty(this, "plane", {
|
|
27847
27848
|
enumerable: true,
|
|
27848
27849
|
configurable: true,
|
|
27849
27850
|
writable: true,
|
|
27850
|
-
value:
|
|
27851
|
+
value: void 0
|
|
27851
27852
|
});
|
|
27852
|
-
Object.defineProperty(this, "
|
|
27853
|
+
Object.defineProperty(this, "css3DRenderer", {
|
|
27853
27854
|
enumerable: true,
|
|
27854
27855
|
configurable: true,
|
|
27855
27856
|
writable: true,
|
|
27856
|
-
value:
|
|
27857
|
+
value: new CSS3DRender()
|
|
27857
27858
|
});
|
|
27858
27859
|
Object.defineProperty(this, "camera", {
|
|
27859
27860
|
enumerable: true,
|
|
@@ -28877,7 +28878,8 @@ class Object3DHelper {
|
|
|
28877
28878
|
(_a = this.controllers.moveController) === null || _a === void 0 ? void 0 : _a.setHelperMatrix4(matrix4);
|
|
28878
28879
|
if (controller !== this.controllers.rotateController)
|
|
28879
28880
|
(_b = this.controllers.rotateController) === null || _b === void 0 ? void 0 : _b.setHelperMatrix4(matrix4);
|
|
28880
|
-
(
|
|
28881
|
+
if (controller !== this.controllers.scaleController)
|
|
28882
|
+
(_c = this.controllers.scaleController) === null || _c === void 0 ? void 0 : _c.setHelperMatrix4(matrix4);
|
|
28881
28883
|
(_d = this.helpers.outlineHelper) === null || _d === void 0 ? void 0 : _d.applyMatrix4(matrix4);
|
|
28882
28884
|
}
|
|
28883
28885
|
// if (position?.position) {
|
|
@@ -29468,9 +29470,6 @@ class RectangleScaleController extends BaseController {
|
|
|
29468
29470
|
this.startInfo.dragPointInCenterLeft = xIsNegative || yIsNegative || zIsNegative;
|
|
29469
29471
|
}
|
|
29470
29472
|
const offset = new THREE.Vector3().subVectors(nowPositionProject, startPositionProject);
|
|
29471
|
-
// TODO
|
|
29472
|
-
if (offset.length() > 0.1)
|
|
29473
|
-
return defaultVector;
|
|
29474
29473
|
return offset;
|
|
29475
29474
|
};
|
|
29476
29475
|
const ewOffset = getOffset('ew');
|
|
@@ -29515,7 +29514,6 @@ class RectangleScaleController extends BaseController {
|
|
|
29515
29514
|
setEWScale();
|
|
29516
29515
|
setNSScale();
|
|
29517
29516
|
}
|
|
29518
|
-
(_b = (_a = this.helperObject3D).updatePoints) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
29519
29517
|
// this.helperObject3D.cornerPositions.forEach((position, index) => {
|
|
29520
29518
|
// this.scene.add(getPoint(position, index))
|
|
29521
29519
|
// })
|
|
@@ -29524,20 +29522,25 @@ class RectangleScaleController extends BaseController {
|
|
|
29524
29522
|
const scaleXY = new THREE.Vector3(scaleX, scaleY, 1);
|
|
29525
29523
|
console.log(scaleXY);
|
|
29526
29524
|
const scaleMatrix = new THREE__namespace.Matrix4().scale(scaleXY);
|
|
29527
|
-
const newScale = object.scale.clone().applyMatrix4(scaleMatrix)
|
|
29528
|
-
object.scale.copy(newScale)
|
|
29529
|
-
|
|
29525
|
+
// const newScale = object.scale.clone().applyMatrix4(scaleMatrix)
|
|
29526
|
+
// object.scale.copy(newScale) // 或者 object.scale.applyMatrix4(scaleMatrix)
|
|
29527
|
+
object.scale.applyMatrix4(scaleMatrix);
|
|
29530
29528
|
startPoint.position.copy(planeIntersection);
|
|
29531
29529
|
// =================================================================================================================================================================
|
|
29532
29530
|
// =================================================================================================================================================================
|
|
29533
29531
|
// 移动位置
|
|
29534
29532
|
const centerPosition = new THREE.Vector3().addVectors(cornerPositions[0], cornerPositions[2]).divideScalar(2);
|
|
29535
29533
|
const offset = new THREE.Vector3().subVectors(centerPosition, planeCenter);
|
|
29536
|
-
const
|
|
29537
|
-
object.applyMatrix4(
|
|
29538
|
-
|
|
29539
|
-
this.
|
|
29534
|
+
const transformMatrix4 = new THREE__namespace.Matrix4().setPosition(offset);
|
|
29535
|
+
object.applyMatrix4(transformMatrix4);
|
|
29536
|
+
(_a = this.helperObject3D.css3DInstance) === null || _a === void 0 ? void 0 : _a.css3DObject.applyMatrix4(transformMatrix4);
|
|
29537
|
+
(_b = this.helperObject3D.plane) === null || _b === void 0 ? void 0 : _b.applyMatrix4(transformMatrix4);
|
|
29538
|
+
this.hooks.emit('scaleUpdate', { matrix4: scaleMatrix, helperOrigin: planeCenter });
|
|
29539
|
+
this.hooks.emit('positionUpdate', { matrix4: transformMatrix4 });
|
|
29540
29540
|
// 移动位置end
|
|
29541
|
+
// this.helperObject3D.cornerPositions.forEach((position, index) => {
|
|
29542
|
+
// this.scene.add(getPoint(position, index))
|
|
29543
|
+
// })
|
|
29541
29544
|
this.needsRender();
|
|
29542
29545
|
}
|
|
29543
29546
|
dragEnd() {
|
package/dist/index.umd.js
CHANGED
|
@@ -650,6 +650,7 @@
|
|
|
650
650
|
globalStore.frontModeStore = undefined;
|
|
651
651
|
if (mode === 'behind')
|
|
652
652
|
globalStore.behindModeStore = undefined;
|
|
653
|
+
globalStore.resizeObserver = undefined;
|
|
653
654
|
}
|
|
654
655
|
return true;
|
|
655
656
|
};
|
|
@@ -27829,17 +27830,17 @@ void main() {
|
|
|
27829
27830
|
writable: true,
|
|
27830
27831
|
value: void 0
|
|
27831
27832
|
});
|
|
27832
|
-
Object.defineProperty(this, "
|
|
27833
|
+
Object.defineProperty(this, "plane", {
|
|
27833
27834
|
enumerable: true,
|
|
27834
27835
|
configurable: true,
|
|
27835
27836
|
writable: true,
|
|
27836
|
-
value:
|
|
27837
|
+
value: void 0
|
|
27837
27838
|
});
|
|
27838
|
-
Object.defineProperty(this, "
|
|
27839
|
+
Object.defineProperty(this, "css3DRenderer", {
|
|
27839
27840
|
enumerable: true,
|
|
27840
27841
|
configurable: true,
|
|
27841
27842
|
writable: true,
|
|
27842
|
-
value:
|
|
27843
|
+
value: new CSS3DRender()
|
|
27843
27844
|
});
|
|
27844
27845
|
Object.defineProperty(this, "camera", {
|
|
27845
27846
|
enumerable: true,
|
|
@@ -28863,7 +28864,8 @@ void main() {
|
|
|
28863
28864
|
(_a = this.controllers.moveController) === null || _a === void 0 ? void 0 : _a.setHelperMatrix4(matrix4);
|
|
28864
28865
|
if (controller !== this.controllers.rotateController)
|
|
28865
28866
|
(_b = this.controllers.rotateController) === null || _b === void 0 ? void 0 : _b.setHelperMatrix4(matrix4);
|
|
28866
|
-
(
|
|
28867
|
+
if (controller !== this.controllers.scaleController)
|
|
28868
|
+
(_c = this.controllers.scaleController) === null || _c === void 0 ? void 0 : _c.setHelperMatrix4(matrix4);
|
|
28867
28869
|
(_d = this.helpers.outlineHelper) === null || _d === void 0 ? void 0 : _d.applyMatrix4(matrix4);
|
|
28868
28870
|
}
|
|
28869
28871
|
// if (position?.position) {
|
|
@@ -29454,9 +29456,6 @@ void main() {
|
|
|
29454
29456
|
this.startInfo.dragPointInCenterLeft = xIsNegative || yIsNegative || zIsNegative;
|
|
29455
29457
|
}
|
|
29456
29458
|
const offset = new THREE.Vector3().subVectors(nowPositionProject, startPositionProject);
|
|
29457
|
-
// TODO
|
|
29458
|
-
if (offset.length() > 0.1)
|
|
29459
|
-
return defaultVector;
|
|
29460
29459
|
return offset;
|
|
29461
29460
|
};
|
|
29462
29461
|
const ewOffset = getOffset('ew');
|
|
@@ -29501,7 +29500,6 @@ void main() {
|
|
|
29501
29500
|
setEWScale();
|
|
29502
29501
|
setNSScale();
|
|
29503
29502
|
}
|
|
29504
|
-
(_b = (_a = this.helperObject3D).updatePoints) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
29505
29503
|
// this.helperObject3D.cornerPositions.forEach((position, index) => {
|
|
29506
29504
|
// this.scene.add(getPoint(position, index))
|
|
29507
29505
|
// })
|
|
@@ -29510,20 +29508,25 @@ void main() {
|
|
|
29510
29508
|
const scaleXY = new THREE.Vector3(scaleX, scaleY, 1);
|
|
29511
29509
|
console.log(scaleXY);
|
|
29512
29510
|
const scaleMatrix = new THREE__namespace.Matrix4().scale(scaleXY);
|
|
29513
|
-
const newScale = object.scale.clone().applyMatrix4(scaleMatrix)
|
|
29514
|
-
object.scale.copy(newScale)
|
|
29515
|
-
|
|
29511
|
+
// const newScale = object.scale.clone().applyMatrix4(scaleMatrix)
|
|
29512
|
+
// object.scale.copy(newScale) // 或者 object.scale.applyMatrix4(scaleMatrix)
|
|
29513
|
+
object.scale.applyMatrix4(scaleMatrix);
|
|
29516
29514
|
startPoint.position.copy(planeIntersection);
|
|
29517
29515
|
// =================================================================================================================================================================
|
|
29518
29516
|
// =================================================================================================================================================================
|
|
29519
29517
|
// 移动位置
|
|
29520
29518
|
const centerPosition = new THREE.Vector3().addVectors(cornerPositions[0], cornerPositions[2]).divideScalar(2);
|
|
29521
29519
|
const offset = new THREE.Vector3().subVectors(centerPosition, planeCenter);
|
|
29522
|
-
const
|
|
29523
|
-
object.applyMatrix4(
|
|
29524
|
-
|
|
29525
|
-
this.
|
|
29520
|
+
const transformMatrix4 = new THREE__namespace.Matrix4().setPosition(offset);
|
|
29521
|
+
object.applyMatrix4(transformMatrix4);
|
|
29522
|
+
(_a = this.helperObject3D.css3DInstance) === null || _a === void 0 ? void 0 : _a.css3DObject.applyMatrix4(transformMatrix4);
|
|
29523
|
+
(_b = this.helperObject3D.plane) === null || _b === void 0 ? void 0 : _b.applyMatrix4(transformMatrix4);
|
|
29524
|
+
this.hooks.emit('scaleUpdate', { matrix4: scaleMatrix, helperOrigin: planeCenter });
|
|
29525
|
+
this.hooks.emit('positionUpdate', { matrix4: transformMatrix4 });
|
|
29526
29526
|
// 移动位置end
|
|
29527
|
+
// this.helperObject3D.cornerPositions.forEach((position, index) => {
|
|
29528
|
+
// this.scene.add(getPoint(position, index))
|
|
29529
|
+
// })
|
|
29527
29530
|
this.needsRender();
|
|
29528
29531
|
}
|
|
29529
29532
|
dragEnd() {
|
|
@@ -83,6 +83,7 @@ export declare abstract class RectangleScaleHelperAbstract<OriginObject3D extend
|
|
|
83
83
|
}[];
|
|
84
84
|
abstract cornerPositions: Vector3[];
|
|
85
85
|
abstract css3DInstance?: NonVoid<Create3DElementReturnType>;
|
|
86
|
+
abstract plane?: THREE.Mesh;
|
|
86
87
|
abstract updatePoints(): void;
|
|
87
88
|
abstract enable(): void;
|
|
88
89
|
abstract disable(): void;
|
|
@@ -11,8 +11,8 @@ export declare class RectangleScaleHelper<T extends OriginObjectType = OriginObj
|
|
|
11
11
|
cornerPositions: Vector3[];
|
|
12
12
|
css3DInstance?: NonVoid<Create3DElementReturnType>;
|
|
13
13
|
get helperObject(): CSS3DObjectPlus<HTMLElement>;
|
|
14
|
+
plane?: THREE.Mesh<THREE.PlaneGeometry, THREE.MeshBasicMaterial>;
|
|
14
15
|
private css3DRenderer;
|
|
15
|
-
private plane?;
|
|
16
16
|
private camera;
|
|
17
17
|
private scene;
|
|
18
18
|
private container;
|