@galacean/engine-loader 0.9.12 → 0.9.13

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
@@ -1744,6 +1744,10 @@ var EntityParser = /*#__PURE__*/ function(Parser) {
1744
1744
  }
1745
1745
  glTFResource.sceneRoots = sceneRoots;
1746
1746
  glTFResource.defaultSceneRoot = sceneRoots[sceneID];
1747
+ // @ts-ignore
1748
+ glTFResource.defaultSceneRoot._hookResource = glTFResource;
1749
+ // @ts-ignore
1750
+ glTFResource._addRefCount(1);
1747
1751
  };
1748
1752
  return EntityParser;
1749
1753
  }(Parser);
@@ -2481,36 +2485,20 @@ var GLTFParser = /*#__PURE__*/ function() {
2481
2485
 
2482
2486
  /**
2483
2487
  * Product after GLTF parser, usually, `defaultSceneRoot` is only needed to use.
2484
- */ var GLTFResource = /*#__PURE__*/ function(EngineObject) {
2485
- _inherits(GLTFResource, EngineObject);
2488
+ */ var GLTFResource = /*#__PURE__*/ function(RefObject) {
2489
+ _inherits(GLTFResource, RefObject);
2486
2490
  function GLTFResource(engine, url) {
2487
2491
  var _this;
2488
- _this = EngineObject.call(this, engine) || this;
2492
+ _this = RefObject.call(this, engine) || this;
2489
2493
  _this.url = url;
2490
2494
  return _this;
2491
2495
  }
2492
2496
  var _proto = GLTFResource.prototype;
2493
2497
  /**
2494
- * @override
2495
- */ _proto.destroy = function destroy() {
2496
- if (this._destroyed) {
2497
- return;
2498
- }
2499
- EngineObject.prototype.destroy.call(this);
2500
- this.defaultSceneRoot.destroy();
2501
- this.textures = null;
2502
- this.materials = null;
2503
- this.meshes = null;
2504
- this.skins = null;
2505
- this.animations = null;
2506
- this.entities = null;
2507
- this.cameras = null;
2508
- this.lights = null;
2509
- this.sceneRoots = null;
2510
- this.variants = null;
2511
- };
2498
+ * @internal
2499
+ */ _proto._onDestroy = function _onDestroy() {};
2512
2500
  return GLTFResource;
2513
- }(engineCore.EngineObject);
2501
+ }(engineCore.RefObject);
2514
2502
 
2515
2503
  var GLTFLoader = /*#__PURE__*/ function(Loader) {
2516
2504
  _inherits(GLTFLoader, Loader);