@glowjs/core 2024.6.11 → 2024.6.14

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.
@@ -3988,11 +3988,12 @@ export declare class ResPool extends Base {
3988
3988
  /**
3989
3989
  * 缓存
3990
3990
  */
3991
- private _cache;
3991
+ _cache: Map<string, ResCacheData>;
3992
3992
  /**
3993
3993
  * 加载中的资源列表
3994
3994
  */
3995
3995
  private _loadingList;
3996
+ private _assetContainerAdded;
3996
3997
  /**
3997
3998
  * 实例化一个资源池对象
3998
3999
  * @param app 应用
@@ -4002,7 +4003,7 @@ export declare class ResPool extends Base {
4002
4003
  * 加载指定资源
4003
4004
  * @param id 编号
4004
4005
  */
4005
- private _loadRes;
4006
+ _loadRes(info: ResOptions): Promise<void>;
4006
4007
  /**
4007
4008
  * 获取指定资源
4008
4009
  * @param id 编号
@@ -6123,6 +6124,19 @@ export type PropertyChangedData = {
6123
6124
  */
6124
6125
  newValue: any;
6125
6126
  };
6127
+ /**
6128
+ * 资源缓存数据
6129
+ */
6130
+ export type ResCacheData = {
6131
+ /**
6132
+ * 错误信息
6133
+ */
6134
+ err?: any;
6135
+ /**
6136
+ * 原始数据
6137
+ */
6138
+ data?: AssetContainer | NodeMaterial | any;
6139
+ };
6126
6140
  /**
6127
6141
  * 资产图片(字符串表示JSON字符串,对象表示文件)
6128
6142
  */
@@ -6213,6 +6227,10 @@ export type ResOptions = {
6213
6227
  * 贴图类型
6214
6228
  */
6215
6229
  textureType?: "panorama" | "background";
6230
+ /**
6231
+ * 资源类型
6232
+ */
6233
+ type?: string;
6216
6234
  };
6217
6235
  /**
6218
6236
  * 尺寸