@galacean/effects-plugin-editor-gizmo 2.8.0-alpha.0 → 2.8.0-alpha.1

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,11 +3,11 @@
3
3
  * Description: Galacean Effects player editor gizmo plugin
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 茂安,旻诺
6
- * Version: v2.8.0-alpha.0
6
+ * Version: v2.8.0-alpha.1
7
7
  */
8
8
 
9
9
  import * as EFFECTS from '@galacean/effects';
10
- import { glContext, Texture, noop, math, Geometry, Transform, Mesh, Material, DestroyOptions, GLSLVersion, GLGeometry, serialize, effectsClass, RendererComponent, ParticleSystemRenderer, assertExist, RenderPass, RenderPassPriorityPostprocess, TextureLoadAction, RenderPassPriorityPrepare, HitTestType, spec, AbstractPlugin, registerPlugin, VFXItem, logger } from '@galacean/effects';
10
+ import { glContext, Texture, noop, math, Geometry, Transform, Mesh, Material, DestroyOptions, GLSLVersion, GLGeometry, serialize, effectsClass, RendererComponent, ParticleSystemRenderer, assertExist, TextureLoadAction, HitTestType, spec, RenderPassPriorityPostprocess, RenderPass, RenderPassPriorityPrepare, AbstractPlugin, registerPlugin, VFXItem, logger } from '@galacean/effects';
11
11
 
12
12
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
13
13
  try {
@@ -3462,13 +3462,7 @@ var GizmoComponent = /*#__PURE__*/ function(RendererComponent1) {
3462
3462
  return renderPass.name === behindRenderPassName;
3463
3463
  });
3464
3464
  if (!rp) {
3465
- rp = new RenderPass(pipeline.renderer, {
3466
- name: behindRenderPassName,
3467
- priority: RenderPassPriorityPostprocess + RenderPassPriorityPostprocess,
3468
- clearAction: {
3469
- depthAction: TextureLoadAction.clear
3470
- }
3471
- });
3465
+ rp = new DrawGizmoBehindPass(pipeline.renderer, {});
3472
3466
  pipeline.addRenderPass(rp);
3473
3467
  }
3474
3468
  return rp;
@@ -3478,10 +3472,7 @@ var GizmoComponent = /*#__PURE__*/ function(RendererComponent1) {
3478
3472
  return renderPass.name === editorRenderPassName;
3479
3473
  });
3480
3474
  if (!rp) {
3481
- rp = new RenderPass(pipeline.renderer, {
3482
- name: editorRenderPassName,
3483
- priority: RenderPassPriorityPostprocess + 2
3484
- });
3475
+ rp = new DrawGizmoEditorPass(pipeline.renderer, {});
3485
3476
  pipeline.addRenderPass(rp);
3486
3477
  }
3487
3478
  return rp;
@@ -3491,10 +3482,7 @@ var GizmoComponent = /*#__PURE__*/ function(RendererComponent1) {
3491
3482
  return renderPass.name === frontRenderPassName;
3492
3483
  });
3493
3484
  if (!rp) {
3494
- rp = new RenderPass(pipeline.renderer, {
3495
- name: frontRenderPassName,
3496
- priority: RenderPassPriorityPrepare + 2
3497
- });
3485
+ rp = new DrawGizmoFrontPass(pipeline.renderer, {});
3498
3486
  pipeline.addRenderPass(rp);
3499
3487
  }
3500
3488
  return rp;
@@ -3512,6 +3500,54 @@ var CoordinateSpace;
3512
3500
  CoordinateSpace[CoordinateSpace["Local"] = 0] = "Local";
3513
3501
  CoordinateSpace[CoordinateSpace["World"] = 1] = "World";
3514
3502
  })(CoordinateSpace || (CoordinateSpace = {}));
3503
+ var DrawGizmoBehindPass = /*#__PURE__*/ function(RenderPass) {
3504
+ _inherits(DrawGizmoBehindPass, RenderPass);
3505
+ function DrawGizmoBehindPass(renderer, options) {
3506
+ var _this;
3507
+ _this = RenderPass.call(this, renderer, options) || this;
3508
+ _this.priority = RenderPassPriorityPostprocess + RenderPassPriorityPostprocess;
3509
+ _this.name = behindRenderPassName;
3510
+ return _this;
3511
+ }
3512
+ var _proto = DrawGizmoBehindPass.prototype;
3513
+ _proto.execute = function execute(renderer) {
3514
+ renderer.clear({
3515
+ depthAction: TextureLoadAction.clear
3516
+ });
3517
+ renderer.renderMeshes(this.meshes);
3518
+ };
3519
+ return DrawGizmoBehindPass;
3520
+ }(RenderPass);
3521
+ var DrawGizmoFrontPass = /*#__PURE__*/ function(RenderPass) {
3522
+ _inherits(DrawGizmoFrontPass, RenderPass);
3523
+ function DrawGizmoFrontPass(renderer, options) {
3524
+ var _this;
3525
+ _this = RenderPass.call(this, renderer, options) || this;
3526
+ _this.priority = RenderPassPriorityPrepare + 2;
3527
+ _this.name = frontRenderPassName;
3528
+ return _this;
3529
+ }
3530
+ var _proto = DrawGizmoFrontPass.prototype;
3531
+ _proto.execute = function execute(renderer) {
3532
+ renderer.renderMeshes(this.meshes);
3533
+ };
3534
+ return DrawGizmoFrontPass;
3535
+ }(RenderPass);
3536
+ var DrawGizmoEditorPass = /*#__PURE__*/ function(RenderPass) {
3537
+ _inherits(DrawGizmoEditorPass, RenderPass);
3538
+ function DrawGizmoEditorPass(renderer, options) {
3539
+ var _this;
3540
+ _this = RenderPass.call(this, renderer, options) || this;
3541
+ _this.priority = RenderPassPriorityPostprocess + 2;
3542
+ _this.name = editorRenderPassName;
3543
+ return _this;
3544
+ }
3545
+ var _proto = DrawGizmoEditorPass.prototype;
3546
+ _proto.execute = function execute(renderer) {
3547
+ renderer.renderMeshes(this.meshes);
3548
+ };
3549
+ return DrawGizmoEditorPass;
3550
+ }(RenderPass);
3515
3551
 
3516
3552
  var iconImages = new Map();
3517
3553
  var iconTextures = new Map();
@@ -3599,7 +3635,7 @@ var EditorGizmoPlugin = /*#__PURE__*/ function(AbstractPlugin) {
3599
3635
  registerPlugin("editor-gizmo", EditorGizmoPlugin, VFXItem);
3600
3636
  /**
3601
3637
  * 插件版本号
3602
- */ var version = "2.8.0-alpha.0";
3638
+ */ var version = "2.8.0-alpha.1";
3603
3639
  logger.info("Plugin editor gizmo version: " + version + ".");
3604
3640
  if (version !== EFFECTS.version) {
3605
3641
  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!");