@galacean/engine-loader 1.4.2 → 1.4.4
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 +15 -8
- package/dist/main.js.map +1 -1
- package/dist/module.js +15 -8
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
package/dist/main.js
CHANGED
|
@@ -1051,11 +1051,11 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
|
|
|
1051
1051
|
|
|
1052
1052
|
/**
|
|
1053
1053
|
* The Prefab resource.
|
|
1054
|
-
*/ var PrefabResource = /*#__PURE__*/ function(
|
|
1055
|
-
_inherits(PrefabResource,
|
|
1054
|
+
*/ var PrefabResource = /*#__PURE__*/ function(ReferResource1) {
|
|
1055
|
+
_inherits(PrefabResource, ReferResource1);
|
|
1056
1056
|
function PrefabResource(engine, url) {
|
|
1057
1057
|
var _this;
|
|
1058
|
-
_this =
|
|
1058
|
+
_this = ReferResource1.call(this, engine) || this, _this.url = url, _this._dependenceAssets = new Set();
|
|
1059
1059
|
return _this;
|
|
1060
1060
|
}
|
|
1061
1061
|
var _proto = PrefabResource.prototype;
|
|
@@ -1070,16 +1070,23 @@ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
|
|
|
1070
1070
|
* @internal
|
|
1071
1071
|
*/ _proto._addDependenceAsset = function _addDependenceAsset(resource) {
|
|
1072
1072
|
this._dependenceAssets.add(resource);
|
|
1073
|
-
// @
|
|
1074
|
-
|
|
1073
|
+
// @todo: The PhysicsMaterial does not inherit from ReferResource. Currently,
|
|
1074
|
+
// ReferResource requires the engine to be passed as a parameter, which prevents cross-engine reuse.
|
|
1075
|
+
// A refactor of ReferResource will be needed in the future.
|
|
1076
|
+
if (_instanceof(resource, engineCore.ReferResource)) {
|
|
1077
|
+
// @ts-ignore
|
|
1078
|
+
resource._associationSuperResource(this);
|
|
1079
|
+
}
|
|
1075
1080
|
};
|
|
1076
1081
|
_proto._onDestroy = function _onDestroy() {
|
|
1077
1082
|
var _this = this;
|
|
1078
|
-
|
|
1083
|
+
ReferResource1.prototype._onDestroy.call(this);
|
|
1079
1084
|
this._root.destroy();
|
|
1080
1085
|
this._dependenceAssets.forEach(function(asset) {
|
|
1081
|
-
|
|
1082
|
-
|
|
1086
|
+
if (_instanceof(asset, engineCore.ReferResource)) {
|
|
1087
|
+
// @ts-ignore
|
|
1088
|
+
asset._disassociationSuperResource(_this);
|
|
1089
|
+
}
|
|
1083
1090
|
});
|
|
1084
1091
|
};
|
|
1085
1092
|
return PrefabResource;
|