@galacean/effects-core 2.2.0-alpha.0 → 2.2.1-alpha.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.
@@ -22,10 +22,6 @@ export declare class AssetManager implements Disposable {
22
22
  * TextureSource 来源
23
23
  */
24
24
  private sourceFrom;
25
- /**
26
- * Texture 选项,用于创建 ImageBitmap
27
- */
28
- private imageBitmapOptions;
29
25
  /**
30
26
  * 自定义文本缓存,随页面销毁而销毁
31
27
  */
@@ -68,7 +64,6 @@ export declare class AssetManager implements Disposable {
68
64
  private loadJSON;
69
65
  private loadBins;
70
66
  private assignImagesToAssets;
71
- private assignImageBitmapOptions;
72
67
  private removeTimer;
73
68
  /**
74
69
  * 销毁方法
package/dist/config.d.ts CHANGED
@@ -2,6 +2,5 @@ export declare const RUNTIME_ENV = "runtime_env";
2
2
  export declare const RENDER_PREFER_LOOKUP_TEXTURE = "lookup_texture";
3
3
  export declare const TEMPLATE_USE_OFFSCREEN_CANVAS = "offscreen_canvas";
4
4
  export declare const POST_PROCESS_SETTINGS = "post_process_settings";
5
- export declare const LOAD_PREFER_IMAGE_BITMAP = "load_image_bitmap";
6
5
  export declare function getConfig<T extends number | boolean | string | Record<string, any>>(name: string): T;
7
6
  export declare function setConfig<T extends number | boolean | string | Record<string, any>>(name: string, value: T): string | number | boolean | Record<string, any>;
@@ -46,8 +46,8 @@ export declare class Downloader {
46
46
  * @param png - PNG 图片文件的 URL
47
47
  * @param webp - WebP 图片文件的 URL
48
48
  */
49
- export declare function loadWebPOptional(png: string, webp?: string, options?: ImageBitmapOptions): Promise<{
50
- image: HTMLImageElement | ImageBitmap;
49
+ export declare function loadWebPOptional(png: string, webp?: string): Promise<{
50
+ image: HTMLImageElement;
51
51
  url: string;
52
52
  }>;
53
53
  /**
@@ -55,8 +55,8 @@ export declare function loadWebPOptional(png: string, webp?: string, options?: I
55
55
  * @param png - PNG 图片文件的 URL
56
56
  * @param avif - AVIF 图片文件的 URL
57
57
  */
58
- export declare function loadAVIFOptional(png: string, avif?: string, options?: ImageBitmapOptions): Promise<{
59
- image: HTMLImageElement | ImageBitmap;
58
+ export declare function loadAVIFOptional(png: string, avif?: string): Promise<{
59
+ image: HTMLImageElement;
60
60
  url: string;
61
61
  }>;
62
62
  /**
@@ -80,16 +80,4 @@ export declare function loadBlob(url: string): Promise<Blob>;
80
80
  */
81
81
  export declare function loadVideo(url: string | MediaProvider): Promise<HTMLVideoElement>;
82
82
  export declare function loadMedia(url: string | string[], loadFn: (url: string) => Promise<HTMLImageElement | HTMLVideoElement>): Promise<HTMLImageElement | HTMLVideoElement>;
83
- /**
84
- * 异步加载一个图片文件,如果支持 ImageBitmap 则返回 ImageBitmap 对象
85
- * @param source
86
- * @param options
87
- * @returns
88
- */
89
- export declare function loadImageBitmap(source: string | Blob | HTMLImageElement, options?: ImageBitmapOptions): Promise<ImageBitmap | HTMLImageElement>;
90
- /**
91
- * 关闭 ImageBitMap,释放内存
92
- * @param imgs
93
- */
94
- export declare function closeImageBitMap(imgs: any): void;
95
83
  export {};
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: Galacean Effects runtime core for the web
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
6
- * Version: v2.2.0-alpha.0
6
+ * Version: v2.2.1-alpha.0
7
7
  */
8
8
 
9
9
  'use strict';
@@ -5721,22 +5721,6 @@ exports.TextureSourceType = void 0;
5721
5721
  TextureSourceType[TextureSourceType["mipmaps"] = 7] = "mipmaps";
5722
5722
  })(exports.TextureSourceType || (exports.TextureSourceType = {}));
5723
5723
 
5724
- var RUNTIME_ENV = "runtime_env";
5725
- var RENDER_PREFER_LOOKUP_TEXTURE = "lookup_texture";
5726
- // 文本元素使用 offscreen canvas 绘制
5727
- var TEMPLATE_USE_OFFSCREEN_CANVAS = "offscreen_canvas";
5728
- // 后处理配置相关
5729
- var POST_PROCESS_SETTINGS = "post_process_settings";
5730
- // 加载图片时是否使用 ImageBitmap
5731
- var LOAD_PREFER_IMAGE_BITMAP = "load_image_bitmap";
5732
- var config = {};
5733
- function getConfig(name) {
5734
- return config[name];
5735
- }
5736
- function setConfig(name, value) {
5737
- return config[name] = value;
5738
- }
5739
-
5740
5724
  /**
5741
5725
  * 负责下载各种资源,并提供了一些异步加载和缓存管理的功能
5742
5726
  */ var Downloader = /*#__PURE__*/ function() {
@@ -5825,11 +5809,11 @@ var avifFailed = false;
5825
5809
  * 异步加载一个 WebP 图片文件,如果不支持 WebP,则加载 PNG 图片文件
5826
5810
  * @param png - PNG 图片文件的 URL
5827
5811
  * @param webp - WebP 图片文件的 URL
5828
- */ function loadWebPOptional(png, webp, options) {
5812
+ */ function loadWebPOptional(png, webp) {
5829
5813
  return _loadWebPOptional.apply(this, arguments);
5830
5814
  }
5831
5815
  function _loadWebPOptional() {
5832
- _loadWebPOptional = _async_to_generator(function(png, webp, options) {
5816
+ _loadWebPOptional = _async_to_generator(function(png, webp) {
5833
5817
  var image, image1, image2;
5834
5818
  return __generator(this, function(_state) {
5835
5819
  switch(_state.label){
@@ -5840,7 +5824,7 @@ function _loadWebPOptional() {
5840
5824
  ];
5841
5825
  return [
5842
5826
  4,
5843
- loadImageBitmap(png, options)
5827
+ loadImage(png)
5844
5828
  ];
5845
5829
  case 1:
5846
5830
  image = _state.sent();
@@ -5860,7 +5844,7 @@ function _loadWebPOptional() {
5860
5844
  ]);
5861
5845
  return [
5862
5846
  4,
5863
- loadImageBitmap(webp, options)
5847
+ loadImage(webp)
5864
5848
  ];
5865
5849
  case 3:
5866
5850
  image1 = _state.sent();
@@ -5876,7 +5860,7 @@ function _loadWebPOptional() {
5876
5860
  webPFailed = true;
5877
5861
  return [
5878
5862
  4,
5879
- loadImageBitmap(png, options)
5863
+ loadImage(png)
5880
5864
  ];
5881
5865
  case 5:
5882
5866
  image2 = _state.sent();
@@ -5900,11 +5884,11 @@ function _loadWebPOptional() {
5900
5884
  * 异步加载一个 AVIF 图片文件,如果不支持 AVIF,则加载 PNG 图片文件
5901
5885
  * @param png - PNG 图片文件的 URL
5902
5886
  * @param avif - AVIF 图片文件的 URL
5903
- */ function loadAVIFOptional(png, avif, options) {
5887
+ */ function loadAVIFOptional(png, avif) {
5904
5888
  return _loadAVIFOptional.apply(this, arguments);
5905
5889
  }
5906
5890
  function _loadAVIFOptional() {
5907
- _loadAVIFOptional = _async_to_generator(function(png, avif, options) {
5891
+ _loadAVIFOptional = _async_to_generator(function(png, avif) {
5908
5892
  var image, image1, image2;
5909
5893
  return __generator(this, function(_state) {
5910
5894
  switch(_state.label){
@@ -5915,7 +5899,7 @@ function _loadAVIFOptional() {
5915
5899
  ];
5916
5900
  return [
5917
5901
  4,
5918
- loadImageBitmap(png, options)
5902
+ loadImage(png)
5919
5903
  ];
5920
5904
  case 1:
5921
5905
  image = _state.sent();
@@ -5935,7 +5919,7 @@ function _loadAVIFOptional() {
5935
5919
  ]);
5936
5920
  return [
5937
5921
  4,
5938
- loadImageBitmap(avif, options)
5922
+ loadImage(avif)
5939
5923
  ];
5940
5924
  case 3:
5941
5925
  image1 = _state.sent();
@@ -5951,7 +5935,7 @@ function _loadAVIFOptional() {
5951
5935
  avifFailed = true;
5952
5936
  return [
5953
5937
  4,
5954
- loadImageBitmap(png, options)
5938
+ loadImage(png)
5955
5939
  ];
5956
5940
  case 5:
5957
5941
  image2 = _state.sent();
@@ -6166,80 +6150,6 @@ function _loadMedia() {
6166
6150
  });
6167
6151
  return _loadMedia.apply(this, arguments);
6168
6152
  }
6169
- var imageBitMapAvailable = typeof createImageBitmap === "function";
6170
- /**
6171
- * 异步加载一个图片文件,如果支持 ImageBitmap 则返回 ImageBitmap 对象
6172
- * @param source
6173
- * @param options
6174
- * @returns
6175
- */ function loadImageBitmap(source, options) {
6176
- return _loadImageBitmap.apply(this, arguments);
6177
- }
6178
- function _loadImageBitmap() {
6179
- _loadImageBitmap = _async_to_generator(function(source, options) {
6180
- var blob;
6181
- return __generator(this, function(_state) {
6182
- switch(_state.label){
6183
- case 0:
6184
- if (!(imageBitMapAvailable && getConfig(LOAD_PREFER_IMAGE_BITMAP))) return [
6185
- 3,
6186
- 4
6187
- ];
6188
- if (!(typeof source === "string")) return [
6189
- 3,
6190
- 2
6191
- ];
6192
- return [
6193
- 4,
6194
- loadBlob(source)
6195
- ];
6196
- case 1:
6197
- blob = _state.sent();
6198
- return [
6199
- 3,
6200
- 3
6201
- ];
6202
- case 2:
6203
- if (_instanceof1(source, Blob)) {
6204
- blob = source;
6205
- } else {
6206
- return [
6207
- 2,
6208
- loadImage(source)
6209
- ];
6210
- }
6211
- _state.label = 3;
6212
- case 3:
6213
- return [
6214
- 2,
6215
- createImageBitmap(blob, options)
6216
- ];
6217
- case 4:
6218
- return [
6219
- 2,
6220
- loadImage(source)
6221
- ];
6222
- case 5:
6223
- return [
6224
- 2
6225
- ];
6226
- }
6227
- });
6228
- });
6229
- return _loadImageBitmap.apply(this, arguments);
6230
- }
6231
- /**
6232
- * 关闭 ImageBitMap,释放内存
6233
- * @param imgs
6234
- */ function closeImageBitMap(imgs) {
6235
- if (imageBitMapAvailable) {
6236
- if (_instanceof1(imgs, ImageBitmap)) {
6237
- imgs.close();
6238
- } else if (_instanceof1(imgs, Array)) {
6239
- imgs.forEach(closeImageBitMap);
6240
- }
6241
- }
6242
- }
6243
6153
 
6244
6154
  function deserializeMipmapTexture(textureOptions, bins, assets) {
6245
6155
  return _deserializeMipmapTexture.apply(this, arguments);
@@ -16903,9 +16813,11 @@ function shouldIgnoreBouncing(arg, mul) {
16903
16813
  */ var MeshCollider = /*#__PURE__*/ function() {
16904
16814
  function MeshCollider() {
16905
16815
  this.triangles = [];
16816
+ this.worldMatrix = new Matrix4();
16906
16817
  }
16907
16818
  var _proto = MeshCollider.prototype;
16908
16819
  _proto.getBoundingBoxData = function getBoundingBoxData() {
16820
+ this.applyWorldMatrix(this.boundingBoxData.area);
16909
16821
  return this.boundingBoxData;
16910
16822
  };
16911
16823
  _proto.getBoundingBox = function getBoundingBox() {
@@ -16935,6 +16847,7 @@ function shouldIgnoreBouncing(arg, mul) {
16935
16847
  p1: point2,
16936
16848
  p2: point3
16937
16849
  });
16850
+ this.applyWorldMatrix(area);
16938
16851
  return {
16939
16852
  type: exports.HitTestType.triangle,
16940
16853
  area: area
@@ -16955,11 +16868,7 @@ function shouldIgnoreBouncing(arg, mul) {
16955
16868
  });
16956
16869
  }
16957
16870
  if (worldMatrix) {
16958
- area.forEach(function(triangle) {
16959
- triangle.p0 = worldMatrix.transformPoint(triangle.p0, new Vector3());
16960
- triangle.p1 = worldMatrix.transformPoint(triangle.p1, new Vector3());
16961
- triangle.p2 = worldMatrix.transformPoint(triangle.p2, new Vector3());
16962
- });
16871
+ this.worldMatrix.copyFrom(worldMatrix);
16963
16872
  }
16964
16873
  this.boundingBoxData = {
16965
16874
  type: exports.HitTestType.triangle,
@@ -16999,6 +16908,15 @@ function shouldIgnoreBouncing(arg, mul) {
16999
16908
  }
17000
16909
  return res;
17001
16910
  };
16911
+ _proto.applyWorldMatrix = function applyWorldMatrix(area) {
16912
+ var _this = this;
16913
+ area.forEach(function(triangle) {
16914
+ triangle.p0 = _this.worldMatrix.transformPoint(triangle.p0, new Vector3());
16915
+ triangle.p1 = _this.worldMatrix.transformPoint(triangle.p1, new Vector3());
16916
+ triangle.p2 = _this.worldMatrix.transformPoint(triangle.p2, new Vector3());
16917
+ });
16918
+ return area;
16919
+ };
17002
16920
  return MeshCollider;
17003
16921
  }();
17004
16922
 
@@ -17894,7 +17812,7 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
17894
17812
  };
17895
17813
  /**
17896
17814
  * 添加组件
17897
- * @param classConstructor - 要添加的组件类型
17815
+ * @param classConstructor - 要添加的组件
17898
17816
  */ _proto.addComponent = function addComponent(classConstructor) {
17899
17817
  var newComponent = new classConstructor(this.engine);
17900
17818
  this.components.push(newComponent);
@@ -18137,7 +18055,7 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
18137
18055
  };
18138
18056
  _proto.fromData = function fromData(data) {
18139
18057
  EffectsObject.prototype.fromData.call(this, data);
18140
- var id = data.id, name = data.name, delay = data.delay, parentId = data.parentId, endBehavior = data.endBehavior, transform = data.transform, _data_listIndex = data.listIndex, listIndex = _data_listIndex === void 0 ? 0 : _data_listIndex, _data_duration = data.duration, duration = _data_duration === void 0 ? 0 : _data_duration;
18058
+ var id = data.id, name = data.name, delay = data.delay, parentId = data.parentId, endBehavior = data.endBehavior, transform = data.transform, _data_duration = data.duration, duration = _data_duration === void 0 ? 0 : _data_duration;
18141
18059
  this.props = data;
18142
18060
  //@ts-expect-error
18143
18061
  this.type = data.type;
@@ -18199,8 +18117,6 @@ exports.VFXItem = /*#__PURE__*/ function(EffectsObject) {
18199
18117
  this.rendererComponents.push(component.renderer);
18200
18118
  }
18201
18119
  }
18202
- // renderOrder 在 component 初始化后设置。确保能拿到 rendererComponent。
18203
- this.renderOrder = listIndex;
18204
18120
  };
18205
18121
  _proto.toData = function toData() {
18206
18122
  var _this_parent;
@@ -18808,6 +18724,20 @@ exports.SpriteComponent = __decorate([
18808
18724
  effectsClass(DataType.SpriteComponent)
18809
18725
  ], exports.SpriteComponent);
18810
18726
 
18727
+ var RUNTIME_ENV = "runtime_env";
18728
+ var RENDER_PREFER_LOOKUP_TEXTURE = "lookup_texture";
18729
+ // 文本元素使用 offscreen canvas 绘制
18730
+ var TEMPLATE_USE_OFFSCREEN_CANVAS = "offscreen_canvas";
18731
+ // 后处理配置相关
18732
+ var POST_PROCESS_SETTINGS = "post_process_settings";
18733
+ var config = {};
18734
+ function getConfig(name) {
18735
+ return config[name];
18736
+ }
18737
+ function setConfig(name, value) {
18738
+ return config[name] = value;
18739
+ }
18740
+
18811
18741
  var Cone = /*#__PURE__*/ function() {
18812
18742
  function Cone(props) {
18813
18743
  var _this = this;
@@ -23879,6 +23809,20 @@ var SerializationHelper = /*#__PURE__*/ function() {
23879
23809
  }
23880
23810
  return regions;
23881
23811
  };
23812
+ /**
23813
+ * 设置当前合成子元素的渲染顺序
23814
+ * @internal
23815
+ */ _proto.setChildrenRenderOrder = function setChildrenRenderOrder(startOrder) {
23816
+ for(var _iterator = _create_for_of_iterator_helper_loose(this.items), _step; !(_step = _iterator()).done;){
23817
+ var item = _step.value;
23818
+ item.renderOrder = startOrder++;
23819
+ var subCompositionComponent = item.getComponent(CompositionComponent);
23820
+ if (subCompositionComponent) {
23821
+ startOrder = subCompositionComponent.setChildrenRenderOrder(startOrder);
23822
+ }
23823
+ }
23824
+ return startOrder;
23825
+ };
23882
23826
  _proto.fromData = function fromData(data) {
23883
23827
  Behaviour.prototype.fromData.call(this, data);
23884
23828
  this.items = data.items;
@@ -24693,7 +24637,7 @@ var TextLayout = /*#__PURE__*/ function() {
24693
24637
  function TextLayout(options) {
24694
24638
  this.width = 0;
24695
24639
  this.height = 0;
24696
- var _options_textHeight = options.textHeight, textHeight = _options_textHeight === void 0 ? 100 : _options_textHeight, _options_textWidth = options.textWidth, textWidth = _options_textWidth === void 0 ? 100 : _options_textWidth, _options_textOverflow = options.textOverflow, textOverflow = _options_textOverflow === void 0 ? TextOverflow.display : _options_textOverflow, _options_textBaseline = options.textBaseline, textBaseline = _options_textBaseline === void 0 ? TextBaseline.top : _options_textBaseline, _options_textAlign = options.textAlign, textAlign = _options_textAlign === void 0 ? TextAlignment.left : _options_textAlign, _options_text = options.text, text = _options_text === void 0 ? " " : _options_text, _options_letterSpace = options.letterSpace, letterSpace = _options_letterSpace === void 0 ? 0 : _options_letterSpace, _options_autoWidth = options.autoWidth, autoWidth = _options_autoWidth === void 0 ? false : _options_autoWidth, fontSize = options.fontSize, _options_lineHeight = options.lineHeight, lineHeight = _options_lineHeight === void 0 ? fontSize : _options_lineHeight;
24640
+ var _options_textHeight = options.textHeight, textHeight = _options_textHeight === void 0 ? 100 : _options_textHeight, _options_textWidth = options.textWidth, textWidth = _options_textWidth === void 0 ? 100 : _options_textWidth, _options_textOverflow = options.textOverflow, textOverflow = _options_textOverflow === void 0 ? TextOverflow.clip : _options_textOverflow, _options_textBaseline = options.textBaseline, textBaseline = _options_textBaseline === void 0 ? TextBaseline.top : _options_textBaseline, _options_textAlign = options.textAlign, textAlign = _options_textAlign === void 0 ? TextAlignment.left : _options_textAlign, _options_text = options.text, text = _options_text === void 0 ? " " : _options_text, _options_letterSpace = options.letterSpace, letterSpace = _options_letterSpace === void 0 ? 0 : _options_letterSpace, _options_autoWidth = options.autoWidth, autoWidth = _options_autoWidth === void 0 ? false : _options_autoWidth, fontSize = options.fontSize, _options_lineHeight = options.lineHeight, lineHeight = _options_lineHeight === void 0 ? fontSize : _options_lineHeight;
24697
24641
  var tempWidth = fontSize + letterSpace;
24698
24642
  this.autoWidth = autoWidth;
24699
24643
  this.maxTextWidth = text.length * tempWidth;
@@ -27315,7 +27259,6 @@ var seed = 1;
27315
27259
  this.downloader = downloader;
27316
27260
  this.assets = {};
27317
27261
  this.sourceFrom = {};
27318
- this.imageBitmapOptions = {};
27319
27262
  this.id = seed++;
27320
27263
  this.timers = [];
27321
27264
  this.updateOptions(options);
@@ -27573,12 +27516,12 @@ var seed = 1;
27573
27516
  _proto.processJSON = function processJSON(json) {
27574
27517
  var _this = this;
27575
27518
  return _async_to_generator(function() {
27576
- var jsonScene, _jsonScene_plugins, plugins, textures, pluginSystem;
27519
+ var jsonScene, _jsonScene_plugins, plugins, pluginSystem;
27577
27520
  return __generator(this, function(_state) {
27578
27521
  switch(_state.label){
27579
27522
  case 0:
27580
27523
  jsonScene = getStandardJSON(json);
27581
- _jsonScene_plugins = jsonScene.plugins, plugins = _jsonScene_plugins === void 0 ? [] : _jsonScene_plugins, textures = jsonScene.textures;
27524
+ _jsonScene_plugins = jsonScene.plugins, plugins = _jsonScene_plugins === void 0 ? [] : _jsonScene_plugins;
27582
27525
  pluginSystem = new PluginSystem(plugins);
27583
27526
  return [
27584
27527
  4,
@@ -27586,7 +27529,6 @@ var seed = 1;
27586
27529
  ];
27587
27530
  case 1:
27588
27531
  _state.sent();
27589
- _this.assignImageBitmapOptions(textures);
27590
27532
  return [
27591
27533
  2,
27592
27534
  {
@@ -27818,7 +27760,7 @@ var seed = 1;
27818
27760
  ];
27819
27761
  return [
27820
27762
  4,
27821
- loadAVIFOptional(imageURL, avifURL, _this.imageBitmapOptions[id])
27763
+ loadAVIFOptional(imageURL, avifURL)
27822
27764
  ];
27823
27765
  case 10:
27824
27766
  _tmp = _state.sent();
@@ -27829,7 +27771,7 @@ var seed = 1;
27829
27771
  case 11:
27830
27772
  return [
27831
27773
  4,
27832
- loadWebPOptional(imageURL, webpURL, _this.imageBitmapOptions[id])
27774
+ loadWebPOptional(imageURL, webpURL)
27833
27775
  ];
27834
27776
  case 12:
27835
27777
  _tmp = _state.sent();
@@ -28041,21 +27983,6 @@ var seed = 1;
28041
27983
  this.assets[images[i].id] = loadedImages[i];
28042
27984
  }
28043
27985
  };
28044
- _proto.assignImageBitmapOptions = function assignImageBitmapOptions(textures) {
28045
- var _this = this;
28046
- if (textures === void 0) textures = [];
28047
- textures.forEach(function(texture) {
28048
- if (!(_instanceof1(texture, Texture) || "mipmaps" in texture)) {
28049
- var source = texture.source;
28050
- if (isObject(source)) {
28051
- _this.imageBitmapOptions[source.id] = {
28052
- imageOrientation: texture.flipY ? "flipY" : "none",
28053
- premultiplyAlpha: texture.premultiplyAlpha ? "premultiply" : "none"
28054
- };
28055
- }
28056
- }
28057
- });
28058
- };
28059
27986
  _proto.removeTimer = function removeTimer(id) {
28060
27987
  var index = this.timers.indexOf(id);
28061
27988
  if (index !== -1) {
@@ -28065,15 +27992,11 @@ var seed = 1;
28065
27992
  /**
28066
27993
  * 销毁方法
28067
27994
  */ _proto.dispose = function dispose() {
28068
- var _this = this;
28069
27995
  if (this.timers.length) {
28070
27996
  this.timers.map(function(id) {
28071
27997
  return window.clearTimeout(id);
28072
27998
  });
28073
27999
  }
28074
- closeImageBitMap(Object.keys(this.assets).map(function(key) {
28075
- return _this.assets[key];
28076
- }));
28077
28000
  this.assets = {};
28078
28001
  this.sourceFrom = {};
28079
28002
  this.timers = [];
@@ -28090,7 +28013,7 @@ function createTextureOptionsBySource(image, sourceFrom, id) {
28090
28013
  };
28091
28014
  if (_instanceof1(image, Texture)) {
28092
28015
  return _extends({}, image.source, options);
28093
- } else if (_instanceof1(image, HTMLImageElement) || _instanceof1(image, ImageBitmap) || isCanvas(image)) {
28016
+ } else if (_instanceof1(image, HTMLImageElement) || isCanvas(image)) {
28094
28017
  return _extends({
28095
28018
  image: image,
28096
28019
  sourceType: exports.TextureSourceType.image,
@@ -28417,7 +28340,6 @@ var tmpScale = new Vector3(1, 1, 1);
28417
28340
  return Camera;
28418
28341
  }();
28419
28342
 
28420
- var listOrder = 0;
28421
28343
  /**
28422
28344
  * 合成资源管理
28423
28345
  */ var CompositionSourceManager = /*#__PURE__*/ function() {
@@ -28450,7 +28372,6 @@ var listOrder = 0;
28450
28372
  this.pluginSystem = pluginSystem;
28451
28373
  this.totalTime = totalTime != null ? totalTime : 0;
28452
28374
  this.textures = cachedTextures;
28453
- listOrder = 0;
28454
28375
  this.sourceContent = this.getContent(this.composition);
28455
28376
  }
28456
28377
  var _proto = CompositionSourceManager.prototype;
@@ -28481,7 +28402,6 @@ var listOrder = 0;
28481
28402
  var sourceItemData = this.engine.jsonSceneData[itemDataPath.id];
28482
28403
  var itemProps = sourceItemData;
28483
28404
  if (passRenderLevel(sourceItemData.renderLevel, this.renderLevel)) {
28484
- itemProps.listIndex = listOrder++;
28485
28405
  if (itemProps.type === ItemType.sprite || itemProps.type === ItemType.particle || itemProps.type === ItemType.spine || //@ts-expect-error
28486
28406
  itemProps.type === ItemType.shape) {
28487
28407
  for(var _iterator2 = _create_for_of_iterator_helper_loose(itemProps.components), _step2; !(_step2 = _iterator2()).done;){
@@ -28784,6 +28704,7 @@ var LateUpdateTickData = /*#__PURE__*/ function(TickData) {
28784
28704
  SerializationHelper.deserialize(sourceContent, _this.rootComposition);
28785
28705
  _this.rootComposition.createContent();
28786
28706
  _this.buildItemTree(_this.rootItem);
28707
+ _this.rootComposition.setChildrenRenderOrder(0);
28787
28708
  _this.pluginSystem.resetComposition(_assert_this_initialized(_this), _this.renderFrame);
28788
28709
  return _this;
28789
28710
  }
@@ -31423,7 +31344,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
31423
31344
  registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
31424
31345
  registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
31425
31346
  registerPlugin("interact", InteractLoader, exports.VFXItem, true);
31426
- var version = "2.2.0-alpha.0";
31347
+ var version = "2.2.1-alpha.0";
31427
31348
  logger.info("Core version: " + version + ".");
31428
31349
 
31429
31350
  exports.AbstractPlugin = AbstractPlugin;
@@ -31473,7 +31394,6 @@ exports.HELP_LINK = HELP_LINK;
31473
31394
  exports.InteractLoader = InteractLoader;
31474
31395
  exports.InteractMesh = InteractMesh;
31475
31396
  exports.KTXTexture = KTXTexture;
31476
- exports.LOAD_PREFER_IMAGE_BITMAP = LOAD_PREFER_IMAGE_BITMAP;
31477
31397
  exports.LineSegments = LineSegments;
31478
31398
  exports.LinearValue = LinearValue;
31479
31399
  exports.Material = Material;
@@ -31544,7 +31464,6 @@ exports.base64ToFile = base64ToFile;
31544
31464
  exports.blend = blend;
31545
31465
  exports.calculateTranslation = calculateTranslation;
31546
31466
  exports.canvasPool = canvasPool;
31547
- exports.closeImageBitMap = closeImageBitMap;
31548
31467
  exports.colorGradingFrag = colorGradingFrag;
31549
31468
  exports.colorStopsFromGradient = colorStopsFromGradient;
31550
31469
  exports.colorToArr = colorToArr$1;
@@ -31623,7 +31542,6 @@ exports.loadAVIFOptional = loadAVIFOptional;
31623
31542
  exports.loadBinary = loadBinary;
31624
31543
  exports.loadBlob = loadBlob;
31625
31544
  exports.loadImage = loadImage;
31626
- exports.loadImageBitmap = loadImageBitmap;
31627
31545
  exports.loadMedia = loadMedia;
31628
31546
  exports.loadVideo = loadVideo;
31629
31547
  exports.loadWebPOptional = loadWebPOptional;