@galacean/effects-plugin-model 2.0.0-alpha.14 → 2.0.0-alpha.16

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.
@@ -2,8 +2,8 @@ import { spec } from '@galacean/effects';
2
2
  import type { Texture, Engine, TextureSourceOptions } from '@galacean/effects';
3
3
  import type { LoaderOptions, SkyboxType, LoadSceneOptions, LoadSceneECSResult, LoaderECS } from './protocol';
4
4
  import type { ModelMeshComponentData, ModelSkyboxComponentData, ModelAnimationOptions, ModelCameraOptions, ModelLightOptions, ModelTreeOptions, ModelLightComponentData, ModelCameraComponentData } from '../index';
5
+ import { PSkyboxType } from '../runtime';
5
6
  import type { GLTFImage, GLTFTexture, GLTFScene, GLTFLight, GLTFCamera, GLTFAnimation, GLTFResources } from '@vvfx/resource-detection';
6
- import { PSkyboxType } from '../runtime/skybox';
7
7
  export declare class LoaderECSImpl implements LoaderECS {
8
8
  private sceneOptions;
9
9
  private loaderOptions;
@@ -16,7 +16,7 @@ export declare class LoaderECSImpl implements LoaderECS {
16
16
  private gltfTextures;
17
17
  private gltfMaterials;
18
18
  private gltfAnimations;
19
- composition: spec.Composition;
19
+ composition: spec.CompositionData;
20
20
  images: spec.Image[];
21
21
  textures: spec.TextureDefine[];
22
22
  items: spec.VFXItemData[];
@@ -26,7 +26,7 @@ export declare class LoaderECSImpl implements LoaderECS {
26
26
  geometries: spec.GeometryData[];
27
27
  animations: spec.AnimationClipData[];
28
28
  engine: Engine;
29
- constructor(composition?: spec.Composition);
29
+ constructor(composition?: spec.CompositionData);
30
30
  initial(engine: Engine, options?: LoaderOptions): void;
31
31
  loadScene(options: LoadSceneOptions): Promise<LoadSceneECSResult>;
32
32
  checkMeshComponentData(mesh: ModelMeshComponentData, resource: GLTFResources): void;
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: Galacean Effects player model plugin
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 飂兮
6
- * Version: v2.0.0-alpha.14
6
+ * Version: v2.0.0-alpha.16
7
7
  */
8
8
 
9
9
  'use strict';
@@ -203,7 +203,7 @@ function _extends() {
203
203
  return _extends.apply(this, arguments);
204
204
  }
205
205
 
206
- var Vector2 = effects.math.Vector2, Vector3 = effects.math.Vector3, Vector4 = effects.math.Vector4, Matrix3 = effects.math.Matrix3, Matrix4 = effects.math.Matrix4, Color = effects.math.Color, Euler = effects.math.Euler, EulerOrder = effects.math.EulerOrder, Quaternion = effects.math.Quaternion, Box3 = effects.math.Box3; effects.math.Sphere; effects.math.Ray; var DEG2RAD = effects.math.DEG2RAD;
206
+ var Vector2 = effects.math.Vector2, Vector3 = effects.math.Vector3, Vector4 = effects.math.Vector4, Matrix3 = effects.math.Matrix3, Matrix4 = effects.math.Matrix4, Color = effects.math.Color, Euler = effects.math.Euler, EulerOrder = effects.math.EulerOrder, Quaternion = effects.math.Quaternion, Box3 = effects.math.Box3, Sphere = effects.math.Sphere, Ray = effects.math.Ray, DEG2RAD = effects.math.DEG2RAD;
207
207
 
208
208
  exports.PObjectType = void 0;
209
209
  (function(PObjectType) {
@@ -2533,7 +2533,7 @@ function _assert_this_initialized(self) {
2533
2533
  _this.skin = proxy.getSkinObj(engine);
2534
2534
  _this.morph = proxy.getMorphObj();
2535
2535
  _this.hide = proxy.isHide();
2536
- _this.priority = (owner == null ? void 0 : (_owner_item = owner.item) == null ? void 0 : _owner_item.listIndex) || 0;
2536
+ _this.priority = (owner == null ? void 0 : (_owner_item = owner.item) == null ? void 0 : _owner_item.renderOrder) || 0;
2537
2537
  //
2538
2538
  _this.subMeshes = [];
2539
2539
  var geometry = proxy.getGeometry();
@@ -4438,7 +4438,7 @@ exports.ModelMeshComponent = /*#__PURE__*/ function(RendererComponent) {
4438
4438
  var _this_sceneManager;
4439
4439
  this.createContent();
4440
4440
  this.item.type = VFX_ITEM_TYPE_3D;
4441
- this.priority = this.item.listIndex;
4441
+ this.priority = this.item.renderOrder;
4442
4442
  this.sceneManager = getSceneManager(this);
4443
4443
  (_this_sceneManager = this.sceneManager) == null ? void 0 : _this_sceneManager.addItem(this.content);
4444
4444
  if (this.item.parentId && this.item.parent) {
@@ -4555,7 +4555,7 @@ exports.ModelSkyboxComponent = /*#__PURE__*/ function(RendererComponent) {
4555
4555
  var _this_sceneManager;
4556
4556
  this.createContent();
4557
4557
  this.item.type = VFX_ITEM_TYPE_3D;
4558
- this.priority = this.item.listIndex;
4558
+ this.priority = this.item.renderOrder;
4559
4559
  this.sceneManager = getSceneManager(this);
4560
4560
  (_this_sceneManager = this.sceneManager) == null ? void 0 : _this_sceneManager.addItem(this.content);
4561
4561
  this.setVisible(true);
@@ -8607,7 +8607,7 @@ exports.CullMode = void 0;
8607
8607
  _this.specularImage = data.specularImage;
8608
8608
  _this.specularImageSize = data.specularImageSize;
8609
8609
  _this.specularMipCount = data.specularMipCount;
8610
- _this.priority = (owner == null ? void 0 : (_owner_item = owner.item) == null ? void 0 : _owner_item.listIndex) || 0;
8610
+ _this.priority = (owner == null ? void 0 : (_owner_item = owner.item) == null ? void 0 : _owner_item.renderOrder) || 0;
8611
8611
  return _this;
8612
8612
  }
8613
8613
  var _proto = PSkybox.prototype;
@@ -12255,13 +12255,10 @@ var JSONConverter = /*#__PURE__*/ function() {
12255
12255
  newScene.compositionId = oldScene.compositionId;
12256
12256
  newScene.compositions = oldScene.compositions;
12257
12257
  newScene.items.forEach(function(item) {
12258
- // @ts-expect-error
12259
12258
  if (item.type === "root") {
12260
- // @ts-expect-error
12261
12259
  item.type = "ECS";
12262
12260
  }
12263
12261
  });
12264
- // @ts-expect-error
12265
12262
  newScene.compositions[0].items = newScene.items.map(function(item) {
12266
12263
  return {
12267
12264
  id: item.id
@@ -13372,17 +13369,22 @@ var vertexBufferSemanticMap = {
13372
13369
 
13373
13370
  effects.registerPlugin("tree", ModelTreePlugin, effects.VFXItem, true);
13374
13371
  effects.registerPlugin("model", ModelPlugin, effects.VFXItem);
13375
- var version = "2.0.0-alpha.14";
13372
+ var version = "2.0.0-alpha.16";
13376
13373
  effects.logger.info("plugin model version: " + version);
13377
13374
  if (version !== effects.version) {
13378
13375
  console.error("注意:请统一 Model 插件与 Player 版本,不统一的版本混用会有不可预知的后果!", "\nAttention: Please ensure the Model plugin is synchronized with the Player version. Mixing and matching incompatible versions may result in unpredictable consequences!");
13379
13376
  }
13380
13377
 
13378
+ exports.Box3 = Box3;
13381
13379
  exports.BoxMesh = BoxMesh;
13382
13380
  exports.CameraGestureHandlerImp = CameraGestureHandlerImp;
13383
13381
  exports.CheckerHelper = CheckerHelper;
13382
+ exports.Color = Color;
13384
13383
  exports.CompositionCache = CompositionCache;
13385
13384
  exports.CompositionHitTest = CompositionHitTest;
13385
+ exports.DEG2RAD = DEG2RAD;
13386
+ exports.Euler = Euler;
13387
+ exports.EulerOrder = EulerOrder;
13386
13388
  exports.FBOOptions = FBOOptions;
13387
13389
  exports.Float16ArrayWrapper = Float16ArrayWrapper;
13388
13390
  exports.GeometryBoxProxy = GeometryBoxProxy;
@@ -13392,6 +13394,8 @@ exports.InterpolationSampler = InterpolationSampler;
13392
13394
  exports.JSONConverter = JSONConverter;
13393
13395
  exports.LoaderHelper = LoaderHelper;
13394
13396
  exports.LoaderImpl = LoaderImpl;
13397
+ exports.Matrix3 = Matrix3;
13398
+ exports.Matrix4 = Matrix4;
13395
13399
  exports.MeshHelper = MeshHelper;
13396
13400
  exports.ModelPlugin = ModelPlugin;
13397
13401
  exports.ModelTreeItem = ModelTreeItem;
@@ -13424,13 +13428,19 @@ exports.PSkyboxCreator = PSkyboxCreator;
13424
13428
  exports.PSubMesh = PSubMesh;
13425
13429
  exports.PTransform = PTransform;
13426
13430
  exports.PluginHelper = PluginHelper;
13431
+ exports.Quaternion = Quaternion;
13432
+ exports.Ray = Ray;
13427
13433
  exports.RayBoxTesting = RayBoxTesting;
13428
13434
  exports.RayIntersectsBoxWithRotation = RayIntersectsBoxWithRotation;
13429
13435
  exports.RayTriangleTesting = RayTriangleTesting;
13436
+ exports.Sphere = Sphere;
13430
13437
  exports.ToggleItemBounding = ToggleItemBounding;
13431
13438
  exports.TwoStatesSet = TwoStatesSet;
13432
13439
  exports.UnlitShaderGUID = UnlitShaderGUID;
13433
13440
  exports.VFX_ITEM_TYPE_3D = VFX_ITEM_TYPE_3D;
13441
+ exports.Vector2 = Vector2;
13442
+ exports.Vector3 = Vector3;
13443
+ exports.Vector4 = Vector4;
13434
13444
  exports.VertexAttribBuffer = VertexAttribBuffer;
13435
13445
  exports.WebGLHelper = WebGLHelper;
13436
13446
  exports.WebHelper = WebHelper;