@galacean/effects-plugin-editor-gizmo 2.0.0-alpha.26 → 2.0.0-alpha.28

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.mjs CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: Galacean Effects player editor gizmo plugin
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 茂安,旻诺
6
- * Version: v2.0.0-alpha.26
6
+ * Version: v2.0.0-alpha.28
7
7
  */
8
8
 
9
9
  import * as EFFECTS from '@galacean/effects';
@@ -2826,19 +2826,23 @@ var GizmoComponent = /*#__PURE__*/ function(ItemBehaviour) {
2826
2826
  worldMat4 = _this.transform.getWorldMatrix();
2827
2827
  var targetItem = _this.targetItem;
2828
2828
  if (targetItem) {
2829
- var _item_getComponent;
2830
2829
  //const targetTransform = this.targetItem.transform.clone();
2831
2830
  var worldPos = new Vector3();
2832
2831
  var worldQuat = new Quaternion();
2833
2832
  var worldSca = new Vector3(1, 1, 1);
2834
- targetItem.transform.assignWorldTRS(worldPos, worldQuat);
2833
+ var gizmoSubType = _this.subType;
2834
+ // Scale Gizmo 没有世界空间
2835
+ if (_this.coordinateSpace == 0 || gizmoSubType === GizmoSubType.scale) {
2836
+ _this.targetItem.transform.assignWorldTRS(worldPos, worldQuat);
2837
+ } else {
2838
+ _this.targetItem.transform.assignWorldTRS(worldPos);
2839
+ }
2835
2840
  var targetTransform = new Transform({
2836
2841
  position: worldPos,
2837
2842
  quat: worldQuat,
2838
2843
  scale: worldSca,
2839
2844
  valid: true
2840
2845
  });
2841
- var gizmoSubType = (_item_getComponent = item.getComponent(GizmoComponent)) == null ? void 0 : _item_getComponent.subType;
2842
2846
  // 移动\旋转\缩放gizmo去除近大远小
2843
2847
  if (gizmoSubType === GizmoSubType.rotation || gizmoSubType === GizmoSubType.scale || gizmoSubType === GizmoSubType.translation || gizmoSubType === GizmoSubType.camera || gizmoSubType === GizmoSubType.light) {
2844
2848
  var camera = item.composition.camera;
@@ -3080,12 +3084,7 @@ var GizmoComponent = /*#__PURE__*/ function(ItemBehaviour) {
3080
3084
  _proto.update = function update(dt) {
3081
3085
  this.updateRenderData();
3082
3086
  };
3083
- _proto.lateUpdate = function lateUpdate(dt) {
3084
- if (this.needCreateModelContent) {
3085
- this.createModelContent(this.targetItem, this.gizmoPlugin.meshToAdd);
3086
- this.needCreateModelContent = false;
3087
- }
3088
- };
3087
+ _proto.lateUpdate = function lateUpdate(dt) {};
3089
3088
  _proto.updateRenderData = function updateRenderData() {
3090
3089
  var item = this.item;
3091
3090
  var gizmoSubType = this.subType;
@@ -3691,11 +3690,11 @@ var EditorGizmoPlugin = /*#__PURE__*/ function(AbstractPlugin) {
3691
3690
  }(AbstractPlugin);
3692
3691
 
3693
3692
  registerPlugin("editor-gizmo", EditorGizmoPlugin, VFXItem);
3694
- var version = "2.0.0-alpha.26";
3693
+ var version = "2.0.0-alpha.28";
3695
3694
  logger.info("Plugin editor gizmo version: " + version + ".");
3696
3695
  if (version !== EFFECTS.version) {
3697
3696
  console.error("注意:请统一 Editor Gizmo 插件与 Player 版本,不统一的版本混用会有不可预知的后果!", "\nAttention: Please ensure the Editor Gizmo plugin is synchronized with the Player version. Mixing and matching incompatible versions may result in unpredictable consequences!");
3698
3697
  }
3699
3698
 
3700
- export { DirectionLightData, GeometryType, GizmoComponent, GizmoSubType, createGeometry, version };
3699
+ export { CoordinateSpace, DirectionLightData, GeometryType, GizmoComponent, GizmoSubType, createGeometry, version };
3701
3700
  //# sourceMappingURL=index.mjs.map