@galacean/engine-core 0.9.0-beta.80 → 0.9.0-beta.81

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/main.js CHANGED
@@ -2191,6 +2191,21 @@ var /** @internal */ PromiseState;
2191
2191
  });
2192
2192
  return AssetPromise.all(promises);
2193
2193
  };
2194
+ /**
2195
+ * Get the resource from cache by asset url, return the resource object if it loaded, otherwise return null.
2196
+ * @param url - Resource url
2197
+ * @returns Resource object
2198
+ */ _proto.getFromCache = function getFromCache(url) {
2199
+ var _this__assetUrlPool_url;
2200
+ return (_this__assetUrlPool_url = this._assetUrlPool[url]) != null ? _this__assetUrlPool_url : null;
2201
+ };
2202
+ /**
2203
+ * Get asset url from instanceId.
2204
+ * @param instanceId - Engine instance id
2205
+ * @returns Asset url
2206
+ */ _proto.getAssetPath = function getAssetPath(instanceId) {
2207
+ return this._assetPool[instanceId];
2208
+ };
2194
2209
  _proto.cancelNotLoaded = function cancelNotLoaded(url) {
2195
2210
  var _this = this;
2196
2211
  if (!url) {
@@ -2214,13 +2229,6 @@ var /** @internal */ PromiseState;
2214
2229
  this._gc(false);
2215
2230
  };
2216
2231
  /**
2217
- * Get asset url from instanceId.
2218
- * @param instanceId - Engine instance id
2219
- * @returns Asset url
2220
- */ _proto.getAssetPath = function getAssetPath(instanceId) {
2221
- return this._assetPool[instanceId];
2222
- };
2223
- /**
2224
2232
  * @internal
2225
2233
  */ _proto._addAsset = function _addAsset(path, asset) {
2226
2234
  this._assetPool[asset.instanceId] = path;
@@ -19013,7 +19021,6 @@ exports.TextVerticalAlignment = void 0;
19013
19021
  * @returns Cloned sprite
19014
19022
  */ _proto.clone = function clone() {
19015
19023
  var cloneSprite = new Sprite(this._engine, this._texture, this._region, this._pivot, this._border, this.name);
19016
- cloneSprite._assetID = this._assetID;
19017
19024
  cloneSprite._atlasRotated = this._atlasRotated;
19018
19025
  cloneSprite._atlasRegion.copyFrom(this._atlasRegion);
19019
19026
  cloneSprite._atlasRegionOffset.copyFrom(this._atlasRegionOffset);