@galacean/engine-loader 1.0.0-beta.10 → 1.0.0-beta.12
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/miniprogram.js
CHANGED
|
@@ -1628,6 +1628,10 @@ var GLTFEntityParser = /*#__PURE__*/ function(GLTFParser) {
|
|
|
1628
1628
|
}
|
|
1629
1629
|
glTFResource.sceneRoots = sceneRoots;
|
|
1630
1630
|
glTFResource.defaultSceneRoot = sceneRoots[sceneID];
|
|
1631
|
+
// @ts-ignore
|
|
1632
|
+
glTFResource.defaultSceneRoot._hookResource = glTFResource;
|
|
1633
|
+
// @ts-ignore
|
|
1634
|
+
glTFResource._addReferCount(1);
|
|
1631
1635
|
};
|
|
1632
1636
|
return GLTFEntityParser;
|
|
1633
1637
|
}(GLTFParser);
|
|
@@ -2367,33 +2371,16 @@ var GLTFValidator = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
2367
2371
|
|
|
2368
2372
|
/**
|
|
2369
2373
|
* Product after glTF parser, usually, `defaultSceneRoot` is only needed to use.
|
|
2370
|
-
*/ var GLTFResource = /*#__PURE__*/ function(
|
|
2371
|
-
_inherits(GLTFResource,
|
|
2374
|
+
*/ var GLTFResource = /*#__PURE__*/ function(ReferResource) {
|
|
2375
|
+
_inherits(GLTFResource, ReferResource);
|
|
2372
2376
|
function GLTFResource(engine, url) {
|
|
2373
2377
|
var _this;
|
|
2374
|
-
_this =
|
|
2378
|
+
_this = ReferResource.call(this, engine) || this;
|
|
2375
2379
|
_this.url = url;
|
|
2376
2380
|
return _this;
|
|
2377
2381
|
}
|
|
2378
|
-
var _proto = GLTFResource.prototype;
|
|
2379
|
-
/**
|
|
2380
|
-
* @internal
|
|
2381
|
-
*/ _proto._onDestroy = function _onDestroy() {
|
|
2382
|
-
EngineObject.prototype._onDestroy.call(this);
|
|
2383
|
-
this.defaultSceneRoot.destroy();
|
|
2384
|
-
this.textures = null;
|
|
2385
|
-
this.materials = null;
|
|
2386
|
-
this.meshes = null;
|
|
2387
|
-
this.skins = null;
|
|
2388
|
-
this.animations = null;
|
|
2389
|
-
this.entities = null;
|
|
2390
|
-
this.cameras = null;
|
|
2391
|
-
this.lights = null;
|
|
2392
|
-
this.sceneRoots = null;
|
|
2393
|
-
this.extensionsData = null;
|
|
2394
|
-
};
|
|
2395
2382
|
return GLTFResource;
|
|
2396
|
-
}(miniprogram.
|
|
2383
|
+
}(miniprogram.ReferResource);
|
|
2397
2384
|
|
|
2398
2385
|
var GLTFLoader = /*#__PURE__*/ function(Loader) {
|
|
2399
2386
|
_inherits(GLTFLoader, Loader);
|
package/dist/module.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resourceLoader, AssetType, AssetPromise, AnimatorController, AnimatorControllerLayer, AnimatorStateMachine, Loader, AnimatorStateTransition, TextureCube, TextureFilterMode, TextureCubeFace, AmbientLight, DiffuseMode, Font, request, ContentRestorer, IndexFormat, VertexElementFormat, Utils, AnimationClip, InterpolationType, AnimationFloatArrayCurve, Keyframe, AnimationQuaternionCurve, AnimationVector3Curve, SkinnedMeshRenderer, Transform, Entity, PBRMaterial, Logger, PBRSpecularMaterial, TextureCoordinate, RenderFace, VertexElement, Buffer, BufferBindFlag, BufferUsage, BlendShape, ModelMesh, Camera, Animator, BlinnPhongMaterial, MeshRenderer, Skin, TextureWrapMode as TextureWrapMode$1, Texture2D,
|
|
1
|
+
import { resourceLoader, AssetType, AssetPromise, AnimatorController, AnimatorControllerLayer, AnimatorStateMachine, Loader, AnimatorStateTransition, TextureCube, TextureFilterMode, TextureCubeFace, AmbientLight, DiffuseMode, Font, request, ContentRestorer, IndexFormat, VertexElementFormat, Utils, AnimationClip, InterpolationType, AnimationFloatArrayCurve, Keyframe, AnimationQuaternionCurve, AnimationVector3Curve, SkinnedMeshRenderer, Transform, Entity, PBRMaterial, Logger, PBRSpecularMaterial, TextureCoordinate, RenderFace, VertexElement, Buffer, BufferBindFlag, BufferUsage, BlendShape, ModelMesh, Camera, Animator, BlinnPhongMaterial, MeshRenderer, Skin, TextureWrapMode as TextureWrapMode$1, Texture2D, ReferResource, TextureFormat, Material, Shader, DirectLight, ParticleRenderer, PointLight, SpotLight, Script, SpriteMask, SpriteRenderer, TextRenderer, AnimationEvent, AnimationColorCurve, AnimationVector4Curve, AnimationVector2Curve, AnimationArrayCurve, AnimationFloatCurve, Scene, SpriteAtlas, Sprite, BackgroundMode, UnlitMaterial } from '@galacean/engine-core';
|
|
2
2
|
import { SphericalHarmonics3, Vector2, Vector3, Vector4, Color, Quaternion, Matrix, Rect } from '@galacean/engine-math';
|
|
3
3
|
import { GLCompressedTextureInternalFormat } from '@galacean/engine-rhi-webgl';
|
|
4
4
|
import { DRACODecoder } from '@galacean/engine-draco';
|
|
@@ -1623,6 +1623,10 @@ var GLTFEntityParser = /*#__PURE__*/ function(GLTFParser) {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
glTFResource.sceneRoots = sceneRoots;
|
|
1625
1625
|
glTFResource.defaultSceneRoot = sceneRoots[sceneID];
|
|
1626
|
+
// @ts-ignore
|
|
1627
|
+
glTFResource.defaultSceneRoot._hookResource = glTFResource;
|
|
1628
|
+
// @ts-ignore
|
|
1629
|
+
glTFResource._addReferCount(1);
|
|
1626
1630
|
};
|
|
1627
1631
|
return GLTFEntityParser;
|
|
1628
1632
|
}(GLTFParser);
|
|
@@ -2362,33 +2366,16 @@ var GLTFValidator = /*#__PURE__*/ function(GLTFParser1) {
|
|
|
2362
2366
|
|
|
2363
2367
|
/**
|
|
2364
2368
|
* Product after glTF parser, usually, `defaultSceneRoot` is only needed to use.
|
|
2365
|
-
*/ var GLTFResource = /*#__PURE__*/ function(
|
|
2366
|
-
_inherits(GLTFResource,
|
|
2369
|
+
*/ var GLTFResource = /*#__PURE__*/ function(ReferResource) {
|
|
2370
|
+
_inherits(GLTFResource, ReferResource);
|
|
2367
2371
|
function GLTFResource(engine, url) {
|
|
2368
2372
|
var _this;
|
|
2369
|
-
_this =
|
|
2373
|
+
_this = ReferResource.call(this, engine) || this;
|
|
2370
2374
|
_this.url = url;
|
|
2371
2375
|
return _this;
|
|
2372
2376
|
}
|
|
2373
|
-
var _proto = GLTFResource.prototype;
|
|
2374
|
-
/**
|
|
2375
|
-
* @internal
|
|
2376
|
-
*/ _proto._onDestroy = function _onDestroy() {
|
|
2377
|
-
EngineObject.prototype._onDestroy.call(this);
|
|
2378
|
-
this.defaultSceneRoot.destroy();
|
|
2379
|
-
this.textures = null;
|
|
2380
|
-
this.materials = null;
|
|
2381
|
-
this.meshes = null;
|
|
2382
|
-
this.skins = null;
|
|
2383
|
-
this.animations = null;
|
|
2384
|
-
this.entities = null;
|
|
2385
|
-
this.cameras = null;
|
|
2386
|
-
this.lights = null;
|
|
2387
|
-
this.sceneRoots = null;
|
|
2388
|
-
this.extensionsData = null;
|
|
2389
|
-
};
|
|
2390
2377
|
return GLTFResource;
|
|
2391
|
-
}(
|
|
2378
|
+
}(ReferResource);
|
|
2392
2379
|
|
|
2393
2380
|
var GLTFLoader = /*#__PURE__*/ function(Loader) {
|
|
2394
2381
|
_inherits(GLTFLoader, Loader);
|