@galacean/engine-loader 1.0.0-beta.10 → 1.0.0-beta.11
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 +8 -21
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +8 -21
- package/dist/module.js +9 -22
- package/dist/module.js.map +1 -1
- package/package.json +5 -5
- package/types/gltf/GLTFResource.d.ts +2 -6
- package/types/gltf/GLTFUtil.d.ts +3 -3
- package/types/resource-deserialize/resources/prefab/PrefabDesign.d.ts +4 -4
package/dist/main.js
CHANGED
|
@@ -1627,6 +1627,10 @@ var GLTFEntityParser = /*#__PURE__*/ function(GLTFParser) {
|
|
|
1627
1627
|
}
|
|
1628
1628
|
glTFResource.sceneRoots = sceneRoots;
|
|
1629
1629
|
glTFResource.defaultSceneRoot = sceneRoots[sceneID];
|
|
1630
|
+
// @ts-ignore
|
|
1631
|
+
glTFResource.defaultSceneRoot._hookResource = glTFResource;
|
|
1632
|
+
// @ts-ignore
|
|
1633
|
+
glTFResource._addReferCount(1);
|
|
1630
1634
|
};
|
|
1631
1635
|
return GLTFEntityParser;
|
|
1632
1636
|
}(GLTFParser);
|
|
@@ -2366,33 +2370,16 @@ var GLTFValidator = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
2366
2370
|
|
|
2367
2371
|
/**
|
|
2368
2372
|
* Product after glTF parser, usually, `defaultSceneRoot` is only needed to use.
|
|
2369
|
-
*/ var GLTFResource = /*#__PURE__*/ function(
|
|
2370
|
-
_inherits(GLTFResource,
|
|
2373
|
+
*/ var GLTFResource = /*#__PURE__*/ function(ReferResource) {
|
|
2374
|
+
_inherits(GLTFResource, ReferResource);
|
|
2371
2375
|
function GLTFResource(engine, url) {
|
|
2372
2376
|
var _this;
|
|
2373
|
-
_this =
|
|
2377
|
+
_this = ReferResource.call(this, engine) || this;
|
|
2374
2378
|
_this.url = url;
|
|
2375
2379
|
return _this;
|
|
2376
2380
|
}
|
|
2377
|
-
var _proto = GLTFResource.prototype;
|
|
2378
|
-
/**
|
|
2379
|
-
* @internal
|
|
2380
|
-
*/ _proto._onDestroy = function _onDestroy() {
|
|
2381
|
-
EngineObject.prototype._onDestroy.call(this);
|
|
2382
|
-
this.defaultSceneRoot.destroy();
|
|
2383
|
-
this.textures = null;
|
|
2384
|
-
this.materials = null;
|
|
2385
|
-
this.meshes = null;
|
|
2386
|
-
this.skins = null;
|
|
2387
|
-
this.animations = null;
|
|
2388
|
-
this.entities = null;
|
|
2389
|
-
this.cameras = null;
|
|
2390
|
-
this.lights = null;
|
|
2391
|
-
this.sceneRoots = null;
|
|
2392
|
-
this.extensionsData = null;
|
|
2393
|
-
};
|
|
2394
2381
|
return GLTFResource;
|
|
2395
|
-
}(engineCore.
|
|
2382
|
+
}(engineCore.ReferResource);
|
|
2396
2383
|
|
|
2397
2384
|
var GLTFLoader = /*#__PURE__*/ function(Loader) {
|
|
2398
2385
|
_inherits(GLTFLoader, Loader);
|