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