@galacean/effects-plugin-editor-gizmo 2.0.0-alpha.29 → 2.0.0-alpha.30

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.
@@ -1,12 +1,12 @@
1
- import type { GeometryDrawMode, Texture, VFXItem } from '@galacean/effects';
1
+ import type { GeometryDrawMode, Renderer, Texture, VFXItem } from '@galacean/effects';
2
2
  import { Mesh } from '@galacean/effects';
3
- import { ItemBehaviour, Transform, math, spec } from '@galacean/effects';
3
+ import { RendererComponent, Transform, math, spec } from '@galacean/effects';
4
4
  import { GizmoSubType } from './define';
5
5
  import { type EditorGizmoPlugin } from './gizmo-loader';
6
6
  import type { GizmoItemBounding } from './gizmo-vfx-item';
7
7
  type Vector3 = math.Vector3;
8
8
  declare const Vector3: typeof math.Vector3;
9
- export declare class GizmoComponent extends ItemBehaviour {
9
+ export declare class GizmoComponent extends RendererComponent {
10
10
  gizmoPlugin: EditorGizmoPlugin;
11
11
  targetItem: VFXItem;
12
12
  needCreateModelContent: boolean;
@@ -27,8 +27,7 @@ export declare class GizmoComponent extends ItemBehaviour {
27
27
  mat: math.Matrix4;
28
28
  wireframeMeshes: Mesh[];
29
29
  start(): void;
30
- update(dt: number): void;
31
- lateUpdate(dt: number): void;
30
+ render(renderer: Renderer): void;
32
31
  updateRenderData(): void;
33
32
  /**
34
33
  * 获取默认绘制模式
package/dist/index.js 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.29
6
+ * Version: v2.0.0-alpha.30
7
7
  */
8
8
 
9
9
  'use strict';
@@ -2828,11 +2828,11 @@ function createMesh(engine, points, indices, color, depthTest, name) {
2828
2828
 
2829
2829
  var Vector2 = EFFECTS.math.Vector2, Vector3 = EFFECTS.math.Vector3, Matrix4 = EFFECTS.math.Matrix4, Quaternion = EFFECTS.math.Quaternion;
2830
2830
  var constants = EFFECTS.glContext;
2831
- exports.GizmoComponent = /*#__PURE__*/ function(ItemBehaviour) {
2832
- _inherits(GizmoComponent, ItemBehaviour);
2831
+ exports.GizmoComponent = /*#__PURE__*/ function(RendererComponent1) {
2832
+ _inherits(GizmoComponent, RendererComponent1);
2833
2833
  function GizmoComponent() {
2834
2834
  var _this;
2835
- _this = ItemBehaviour.apply(this, arguments) || this;
2835
+ _this = RendererComponent1.apply(this, arguments) || this;
2836
2836
  _this.boundingMap = new Map();
2837
2837
  _this.coordinateSpace = 0;
2838
2838
  _this.mat = Matrix4.fromIdentity();
@@ -3104,10 +3104,9 @@ exports.GizmoComponent = /*#__PURE__*/ function(ItemBehaviour) {
3104
3104
  }
3105
3105
  composition.loaderData.gizmoItems.push(this.item);
3106
3106
  };
3107
- _proto.update = function update(dt) {
3107
+ _proto.render = function render(renderer) {
3108
3108
  this.updateRenderData();
3109
3109
  };
3110
- _proto.lateUpdate = function lateUpdate(dt) {};
3111
3110
  _proto.updateRenderData = function updateRenderData() {
3112
3111
  var item = this.item;
3113
3112
  var gizmoSubType = this.subType;
@@ -3409,7 +3408,7 @@ exports.GizmoComponent = /*#__PURE__*/ function(ItemBehaviour) {
3409
3408
  this.targetItem = item;
3410
3409
  };
3411
3410
  _proto.fromData = function fromData(data) {
3412
- ItemBehaviour.prototype.fromData.call(this, data);
3411
+ RendererComponent1.prototype.fromData.call(this, data);
3413
3412
  var item = this.item;
3414
3413
  item.duration = 999;
3415
3414
  var _data_options = data.options, target = _data_options.target, subType = _data_options.subType, renderMode = _data_options.renderMode, size = _data_options.size, depthTest = _data_options.depthTest, _data_options_color = _data_options.color, color = _data_options_color === void 0 ? [
@@ -3433,7 +3432,7 @@ exports.GizmoComponent = /*#__PURE__*/ function(ItemBehaviour) {
3433
3432
  }
3434
3433
  };
3435
3434
  return GizmoComponent;
3436
- }(EFFECTS.ItemBehaviour);
3435
+ }(EFFECTS.RendererComponent);
3437
3436
  __decorate([
3438
3437
  EFFECTS.serialize()
3439
3438
  ], exports.GizmoComponent.prototype, "coordinateSpace", void 0);
@@ -3713,7 +3712,7 @@ var EditorGizmoPlugin = /*#__PURE__*/ function(AbstractPlugin) {
3713
3712
  }(EFFECTS.AbstractPlugin);
3714
3713
 
3715
3714
  EFFECTS.registerPlugin("editor-gizmo", EditorGizmoPlugin, EFFECTS.VFXItem);
3716
- var version = "2.0.0-alpha.29";
3715
+ var version = "2.0.0-alpha.30";
3717
3716
  EFFECTS.logger.info("Plugin editor gizmo version: " + version + ".");
3718
3717
  if (version !== EFFECTS__namespace.version) {
3719
3718
  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!");