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

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.8.0-alpha.5
6
+ * Version: v2.8.0
7
7
  */
8
8
 
9
9
  import * as EFFECTS from '@galacean/effects';
@@ -3637,13 +3637,12 @@ var EditorGizmoPlugin = /*#__PURE__*/ function(Plugin) {
3637
3637
  return _this;
3638
3638
  }
3639
3639
  var _proto = EditorGizmoPlugin.prototype;
3640
- _proto.onCompositionCreated = function onCompositionCreated(composition, scene) {
3640
+ _proto.onAssetsLoadStart = function onAssetsLoadStart(scene, options) {
3641
3641
  return _async_to_generator(function() {
3642
- var engine, _iterator, _step, _step_value, name, data, _, _tmp, items, targetMap, i, item, gizmoComponent;
3642
+ var _iterator, _step, _step_value, name, data, _, _tmp;
3643
3643
  return __generator(this, function(_state) {
3644
3644
  switch(_state.label){
3645
3645
  case 0:
3646
- engine = composition.renderer.engine;
3647
3646
  iconTextures.clear();
3648
3647
  if (!(iconImages.size !== axisIconMap.size)) return [
3649
3648
  3,
@@ -3676,24 +3675,6 @@ var EditorGizmoPlugin = /*#__PURE__*/ function(Plugin) {
3676
3675
  1
3677
3676
  ];
3678
3677
  case 4:
3679
- iconImages.forEach(function(image, name) {
3680
- iconTextures.set(name, createTexture(engine, image));
3681
- });
3682
- iconImages.clear();
3683
- items = composition.items;
3684
- targetMap = {};
3685
- for(i = 0; i < items.length; i++){
3686
- item = items[i];
3687
- gizmoComponent = item.getComponent(GizmoComponent);
3688
- if (gizmoComponent) {
3689
- if (!targetMap[gizmoComponent.target]) {
3690
- targetMap[gizmoComponent.target] = [];
3691
- }
3692
- targetMap[gizmoComponent.target].push(item);
3693
- }
3694
- }
3695
- composition.loaderData.gizmoTarget = targetMap;
3696
- composition.loaderData.gizmoItems = [];
3697
3678
  return [
3698
3679
  2
3699
3680
  ];
@@ -3701,13 +3682,34 @@ var EditorGizmoPlugin = /*#__PURE__*/ function(Plugin) {
3701
3682
  });
3702
3683
  })();
3703
3684
  };
3685
+ _proto.onCompositionCreated = function onCompositionCreated(composition, scene) {
3686
+ var engine = composition.renderer.engine;
3687
+ iconImages.forEach(function(image, name) {
3688
+ iconTextures.set(name, createTexture(engine, image));
3689
+ });
3690
+ iconImages.clear();
3691
+ var items = composition.items;
3692
+ var targetMap = {};
3693
+ for(var i = 0; i < items.length; i++){
3694
+ var item = items[i];
3695
+ var gizmoComponent = item.getComponent(GizmoComponent);
3696
+ if (gizmoComponent) {
3697
+ if (!targetMap[gizmoComponent.target]) {
3698
+ targetMap[gizmoComponent.target] = [];
3699
+ }
3700
+ targetMap[gizmoComponent.target].push(item);
3701
+ }
3702
+ }
3703
+ composition.loaderData.gizmoTarget = targetMap;
3704
+ composition.loaderData.gizmoItems = [];
3705
+ };
3704
3706
  return EditorGizmoPlugin;
3705
3707
  }(_wrap_native_super(Plugin));
3706
3708
 
3707
3709
  registerPlugin("editor-gizmo", EditorGizmoPlugin);
3708
3710
  /**
3709
3711
  * 插件版本号
3710
- */ var version = "2.8.0-alpha.5";
3712
+ */ var version = "2.8.0";
3711
3713
  logger.info("Plugin editor gizmo version: " + version + ".");
3712
3714
  if (version !== EFFECTS.version) {
3713
3715
  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!");