@realsee/dnalogel 2.1.0-alpha.8 → 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/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 +18 -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/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/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +1 -0
- package/dist/PanoSpatialTagPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -1
- 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 +18 -16
- package/dist/index.js +18 -16
- package/dist/index.umd.js +18 -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 +1 -1
- 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 +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 +3 -3
- package/docs/interfaces/FloorplanData.html +1 -1
- package/docs/interfaces/FloorplanEntrance.html +6 -6
- package/docs/interfaces/FloorplanExtraObject.html +2 -2
- package/docs/interfaces/FloorplanExtraObject3D.html +1 -1
- package/docs/interfaces/FloorplanFloorData.html +1 -1
- package/docs/interfaces/FloorplanImagePosition.html +1 -1
- package/docs/interfaces/FloorplanObserver.html +1 -1
- package/docs/interfaces/FloorplanOutlineItem.html +1 -1
- package/docs/interfaces/FloorplanPosition.html +1 -1
- package/docs/interfaces/FloorplanRoomItem.html +5 -5
- package/docs/interfaces/FloorplanRoomLabelItem.html +2 -2
- package/docs/interfaces/FloorplanServerBounding.html +3 -3
- package/docs/interfaces/FloorplanServerComputedData.html +1 -1
- package/docs/interfaces/FloorplanServerData.html +1 -1
- package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
- package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
- package/docs/interfaces/FloorplanServerEntrance.html +6 -6
- package/docs/interfaces/FloorplanServerFloorData.html +1 -1
- package/docs/interfaces/FloorplanServerImagePosition.html +1 -1
- package/docs/interfaces/FloorplanServerObserver.html +1 -1
- package/docs/interfaces/FloorplanServerOutlineItem.html +1 -1
- package/docs/interfaces/FloorplanServerPosition.html +1 -1
- package/docs/interfaces/FloorplanServerRoomItem.html +6 -6
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +2 -2
- 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 +1 -1
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- 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/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/Scissor.html +4 -4
- package/docs/interfaces/TagConfig.html +3 -3
- package/docs/interfaces/Tags.html +3 -3
- package/docs/modules.html +21 -21
- 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
|
@@ -27814,17 +27814,17 @@ class RectangleScaleHelper extends RectangleScaleHelperAbstract {
|
|
|
27814
27814
|
writable: true,
|
|
27815
27815
|
value: void 0
|
|
27816
27816
|
});
|
|
27817
|
-
Object.defineProperty(this, "
|
|
27817
|
+
Object.defineProperty(this, "plane", {
|
|
27818
27818
|
enumerable: true,
|
|
27819
27819
|
configurable: true,
|
|
27820
27820
|
writable: true,
|
|
27821
|
-
value:
|
|
27821
|
+
value: void 0
|
|
27822
27822
|
});
|
|
27823
|
-
Object.defineProperty(this, "
|
|
27823
|
+
Object.defineProperty(this, "css3DRenderer", {
|
|
27824
27824
|
enumerable: true,
|
|
27825
27825
|
configurable: true,
|
|
27826
27826
|
writable: true,
|
|
27827
|
-
value:
|
|
27827
|
+
value: new CSS3DRender()
|
|
27828
27828
|
});
|
|
27829
27829
|
Object.defineProperty(this, "camera", {
|
|
27830
27830
|
enumerable: true,
|
|
@@ -28848,7 +28848,8 @@ class Object3DHelper {
|
|
|
28848
28848
|
(_a = this.controllers.moveController) === null || _a === void 0 ? void 0 : _a.setHelperMatrix4(matrix4);
|
|
28849
28849
|
if (controller !== this.controllers.rotateController)
|
|
28850
28850
|
(_b = this.controllers.rotateController) === null || _b === void 0 ? void 0 : _b.setHelperMatrix4(matrix4);
|
|
28851
|
-
(
|
|
28851
|
+
if (controller !== this.controllers.scaleController)
|
|
28852
|
+
(_c = this.controllers.scaleController) === null || _c === void 0 ? void 0 : _c.setHelperMatrix4(matrix4);
|
|
28852
28853
|
(_d = this.helpers.outlineHelper) === null || _d === void 0 ? void 0 : _d.applyMatrix4(matrix4);
|
|
28853
28854
|
}
|
|
28854
28855
|
// if (position?.position) {
|
|
@@ -29439,9 +29440,6 @@ class RectangleScaleController extends BaseController {
|
|
|
29439
29440
|
this.startInfo.dragPointInCenterLeft = xIsNegative || yIsNegative || zIsNegative;
|
|
29440
29441
|
}
|
|
29441
29442
|
const offset = new Vector3$1().subVectors(nowPositionProject, startPositionProject);
|
|
29442
|
-
// TODO
|
|
29443
|
-
if (offset.length() > 0.1)
|
|
29444
|
-
return defaultVector;
|
|
29445
29443
|
return offset;
|
|
29446
29444
|
};
|
|
29447
29445
|
const ewOffset = getOffset('ew');
|
|
@@ -29486,7 +29484,6 @@ class RectangleScaleController extends BaseController {
|
|
|
29486
29484
|
setEWScale();
|
|
29487
29485
|
setNSScale();
|
|
29488
29486
|
}
|
|
29489
|
-
(_b = (_a = this.helperObject3D).updatePoints) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
29490
29487
|
// this.helperObject3D.cornerPositions.forEach((position, index) => {
|
|
29491
29488
|
// this.scene.add(getPoint(position, index))
|
|
29492
29489
|
// })
|
|
@@ -29495,20 +29492,25 @@ class RectangleScaleController extends BaseController {
|
|
|
29495
29492
|
const scaleXY = new Vector3$1(scaleX, scaleY, 1);
|
|
29496
29493
|
console.log(scaleXY);
|
|
29497
29494
|
const scaleMatrix = new THREE.Matrix4().scale(scaleXY);
|
|
29498
|
-
const newScale = object.scale.clone().applyMatrix4(scaleMatrix)
|
|
29499
|
-
object.scale.copy(newScale)
|
|
29500
|
-
|
|
29495
|
+
// const newScale = object.scale.clone().applyMatrix4(scaleMatrix)
|
|
29496
|
+
// object.scale.copy(newScale) // 或者 object.scale.applyMatrix4(scaleMatrix)
|
|
29497
|
+
object.scale.applyMatrix4(scaleMatrix);
|
|
29501
29498
|
startPoint.position.copy(planeIntersection);
|
|
29502
29499
|
// =================================================================================================================================================================
|
|
29503
29500
|
// =================================================================================================================================================================
|
|
29504
29501
|
// 移动位置
|
|
29505
29502
|
const centerPosition = new Vector3$1().addVectors(cornerPositions[0], cornerPositions[2]).divideScalar(2);
|
|
29506
29503
|
const offset = new Vector3$1().subVectors(centerPosition, planeCenter);
|
|
29507
|
-
const
|
|
29508
|
-
object.applyMatrix4(
|
|
29509
|
-
|
|
29510
|
-
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 });
|
|
29511
29510
|
// 移动位置end
|
|
29511
|
+
// this.helperObject3D.cornerPositions.forEach((position, index) => {
|
|
29512
|
+
// this.scene.add(getPoint(position, index))
|
|
29513
|
+
// })
|
|
29512
29514
|
this.needsRender();
|
|
29513
29515
|
}
|
|
29514
29516
|
dragEnd() {
|
package/dist/index.js
CHANGED
|
@@ -27844,17 +27844,17 @@ class RectangleScaleHelper extends RectangleScaleHelperAbstract {
|
|
|
27844
27844
|
writable: true,
|
|
27845
27845
|
value: void 0
|
|
27846
27846
|
});
|
|
27847
|
-
Object.defineProperty(this, "
|
|
27847
|
+
Object.defineProperty(this, "plane", {
|
|
27848
27848
|
enumerable: true,
|
|
27849
27849
|
configurable: true,
|
|
27850
27850
|
writable: true,
|
|
27851
|
-
value:
|
|
27851
|
+
value: void 0
|
|
27852
27852
|
});
|
|
27853
|
-
Object.defineProperty(this, "
|
|
27853
|
+
Object.defineProperty(this, "css3DRenderer", {
|
|
27854
27854
|
enumerable: true,
|
|
27855
27855
|
configurable: true,
|
|
27856
27856
|
writable: true,
|
|
27857
|
-
value:
|
|
27857
|
+
value: new CSS3DRender()
|
|
27858
27858
|
});
|
|
27859
27859
|
Object.defineProperty(this, "camera", {
|
|
27860
27860
|
enumerable: true,
|
|
@@ -28878,7 +28878,8 @@ class Object3DHelper {
|
|
|
28878
28878
|
(_a = this.controllers.moveController) === null || _a === void 0 ? void 0 : _a.setHelperMatrix4(matrix4);
|
|
28879
28879
|
if (controller !== this.controllers.rotateController)
|
|
28880
28880
|
(_b = this.controllers.rotateController) === null || _b === void 0 ? void 0 : _b.setHelperMatrix4(matrix4);
|
|
28881
|
-
(
|
|
28881
|
+
if (controller !== this.controllers.scaleController)
|
|
28882
|
+
(_c = this.controllers.scaleController) === null || _c === void 0 ? void 0 : _c.setHelperMatrix4(matrix4);
|
|
28882
28883
|
(_d = this.helpers.outlineHelper) === null || _d === void 0 ? void 0 : _d.applyMatrix4(matrix4);
|
|
28883
28884
|
}
|
|
28884
28885
|
// if (position?.position) {
|
|
@@ -29469,9 +29470,6 @@ class RectangleScaleController extends BaseController {
|
|
|
29469
29470
|
this.startInfo.dragPointInCenterLeft = xIsNegative || yIsNegative || zIsNegative;
|
|
29470
29471
|
}
|
|
29471
29472
|
const offset = new THREE.Vector3().subVectors(nowPositionProject, startPositionProject);
|
|
29472
|
-
// TODO
|
|
29473
|
-
if (offset.length() > 0.1)
|
|
29474
|
-
return defaultVector;
|
|
29475
29473
|
return offset;
|
|
29476
29474
|
};
|
|
29477
29475
|
const ewOffset = getOffset('ew');
|
|
@@ -29516,7 +29514,6 @@ class RectangleScaleController extends BaseController {
|
|
|
29516
29514
|
setEWScale();
|
|
29517
29515
|
setNSScale();
|
|
29518
29516
|
}
|
|
29519
|
-
(_b = (_a = this.helperObject3D).updatePoints) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
29520
29517
|
// this.helperObject3D.cornerPositions.forEach((position, index) => {
|
|
29521
29518
|
// this.scene.add(getPoint(position, index))
|
|
29522
29519
|
// })
|
|
@@ -29525,20 +29522,25 @@ class RectangleScaleController extends BaseController {
|
|
|
29525
29522
|
const scaleXY = new THREE.Vector3(scaleX, scaleY, 1);
|
|
29526
29523
|
console.log(scaleXY);
|
|
29527
29524
|
const scaleMatrix = new THREE__namespace.Matrix4().scale(scaleXY);
|
|
29528
|
-
const newScale = object.scale.clone().applyMatrix4(scaleMatrix)
|
|
29529
|
-
object.scale.copy(newScale)
|
|
29530
|
-
|
|
29525
|
+
// const newScale = object.scale.clone().applyMatrix4(scaleMatrix)
|
|
29526
|
+
// object.scale.copy(newScale) // 或者 object.scale.applyMatrix4(scaleMatrix)
|
|
29527
|
+
object.scale.applyMatrix4(scaleMatrix);
|
|
29531
29528
|
startPoint.position.copy(planeIntersection);
|
|
29532
29529
|
// =================================================================================================================================================================
|
|
29533
29530
|
// =================================================================================================================================================================
|
|
29534
29531
|
// 移动位置
|
|
29535
29532
|
const centerPosition = new THREE.Vector3().addVectors(cornerPositions[0], cornerPositions[2]).divideScalar(2);
|
|
29536
29533
|
const offset = new THREE.Vector3().subVectors(centerPosition, planeCenter);
|
|
29537
|
-
const
|
|
29538
|
-
object.applyMatrix4(
|
|
29539
|
-
|
|
29540
|
-
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 });
|
|
29541
29540
|
// 移动位置end
|
|
29541
|
+
// this.helperObject3D.cornerPositions.forEach((position, index) => {
|
|
29542
|
+
// this.scene.add(getPoint(position, index))
|
|
29543
|
+
// })
|
|
29542
29544
|
this.needsRender();
|
|
29543
29545
|
}
|
|
29544
29546
|
dragEnd() {
|
package/dist/index.umd.js
CHANGED
|
@@ -27830,17 +27830,17 @@ void main() {
|
|
|
27830
27830
|
writable: true,
|
|
27831
27831
|
value: void 0
|
|
27832
27832
|
});
|
|
27833
|
-
Object.defineProperty(this, "
|
|
27833
|
+
Object.defineProperty(this, "plane", {
|
|
27834
27834
|
enumerable: true,
|
|
27835
27835
|
configurable: true,
|
|
27836
27836
|
writable: true,
|
|
27837
|
-
value:
|
|
27837
|
+
value: void 0
|
|
27838
27838
|
});
|
|
27839
|
-
Object.defineProperty(this, "
|
|
27839
|
+
Object.defineProperty(this, "css3DRenderer", {
|
|
27840
27840
|
enumerable: true,
|
|
27841
27841
|
configurable: true,
|
|
27842
27842
|
writable: true,
|
|
27843
|
-
value:
|
|
27843
|
+
value: new CSS3DRender()
|
|
27844
27844
|
});
|
|
27845
27845
|
Object.defineProperty(this, "camera", {
|
|
27846
27846
|
enumerable: true,
|
|
@@ -28864,7 +28864,8 @@ void main() {
|
|
|
28864
28864
|
(_a = this.controllers.moveController) === null || _a === void 0 ? void 0 : _a.setHelperMatrix4(matrix4);
|
|
28865
28865
|
if (controller !== this.controllers.rotateController)
|
|
28866
28866
|
(_b = this.controllers.rotateController) === null || _b === void 0 ? void 0 : _b.setHelperMatrix4(matrix4);
|
|
28867
|
-
(
|
|
28867
|
+
if (controller !== this.controllers.scaleController)
|
|
28868
|
+
(_c = this.controllers.scaleController) === null || _c === void 0 ? void 0 : _c.setHelperMatrix4(matrix4);
|
|
28868
28869
|
(_d = this.helpers.outlineHelper) === null || _d === void 0 ? void 0 : _d.applyMatrix4(matrix4);
|
|
28869
28870
|
}
|
|
28870
28871
|
// if (position?.position) {
|
|
@@ -29455,9 +29456,6 @@ void main() {
|
|
|
29455
29456
|
this.startInfo.dragPointInCenterLeft = xIsNegative || yIsNegative || zIsNegative;
|
|
29456
29457
|
}
|
|
29457
29458
|
const offset = new THREE.Vector3().subVectors(nowPositionProject, startPositionProject);
|
|
29458
|
-
// TODO
|
|
29459
|
-
if (offset.length() > 0.1)
|
|
29460
|
-
return defaultVector;
|
|
29461
29459
|
return offset;
|
|
29462
29460
|
};
|
|
29463
29461
|
const ewOffset = getOffset('ew');
|
|
@@ -29502,7 +29500,6 @@ void main() {
|
|
|
29502
29500
|
setEWScale();
|
|
29503
29501
|
setNSScale();
|
|
29504
29502
|
}
|
|
29505
|
-
(_b = (_a = this.helperObject3D).updatePoints) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
29506
29503
|
// this.helperObject3D.cornerPositions.forEach((position, index) => {
|
|
29507
29504
|
// this.scene.add(getPoint(position, index))
|
|
29508
29505
|
// })
|
|
@@ -29511,20 +29508,25 @@ void main() {
|
|
|
29511
29508
|
const scaleXY = new THREE.Vector3(scaleX, scaleY, 1);
|
|
29512
29509
|
console.log(scaleXY);
|
|
29513
29510
|
const scaleMatrix = new THREE__namespace.Matrix4().scale(scaleXY);
|
|
29514
|
-
const newScale = object.scale.clone().applyMatrix4(scaleMatrix)
|
|
29515
|
-
object.scale.copy(newScale)
|
|
29516
|
-
|
|
29511
|
+
// const newScale = object.scale.clone().applyMatrix4(scaleMatrix)
|
|
29512
|
+
// object.scale.copy(newScale) // 或者 object.scale.applyMatrix4(scaleMatrix)
|
|
29513
|
+
object.scale.applyMatrix4(scaleMatrix);
|
|
29517
29514
|
startPoint.position.copy(planeIntersection);
|
|
29518
29515
|
// =================================================================================================================================================================
|
|
29519
29516
|
// =================================================================================================================================================================
|
|
29520
29517
|
// 移动位置
|
|
29521
29518
|
const centerPosition = new THREE.Vector3().addVectors(cornerPositions[0], cornerPositions[2]).divideScalar(2);
|
|
29522
29519
|
const offset = new THREE.Vector3().subVectors(centerPosition, planeCenter);
|
|
29523
|
-
const
|
|
29524
|
-
object.applyMatrix4(
|
|
29525
|
-
|
|
29526
|
-
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 });
|
|
29527
29526
|
// 移动位置end
|
|
29527
|
+
// this.helperObject3D.cornerPositions.forEach((position, index) => {
|
|
29528
|
+
// this.scene.add(getPoint(position, index))
|
|
29529
|
+
// })
|
|
29528
29530
|
this.needsRender();
|
|
29529
29531
|
}
|
|
29530
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;
|