@galacean/engine-loader 2.0.0-alpha.6 → 2.0.0-alpha.7
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 +3 -5
- package/dist/main.js.map +1 -1
- package/dist/module.js +4 -6
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
package/dist/module.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Utils, AssetPromise, AnimationClip, AnimationEvent, Loader, AnimationStringCurve, Keyframe, AnimationBoolCurve, AnimationRefCurve, AnimationQuaternionCurve, AnimationColorCurve, AnimationVector4Curve, AnimationVector3Curve, AnimationVector2Curve, AnimationFloatArrayCurve, AnimationArrayCurve, AnimationFloatCurve, ModelMesh, BlendShape, Entity, Transform, Texture2D, ReferResource, DiffuseMode, BackgroundMode, resourceLoader, AssetType, AnimatorController, AnimatorControllerLayer, AnimatorStateTransition, BufferAsset, AmbientLight, TextureCube, TextureFilterMode, TextureCubeFace, ContentRestorer, Font, SystemInfo, Animator, Logger, IndexFormat, VertexElementFormat, GLCapabilityType,
|
|
1
|
+
import { Utils, AssetPromise, AnimationClip, AnimationEvent, Loader, AnimationStringCurve, Keyframe, AnimationBoolCurve, AnimationRefCurve, AnimationQuaternionCurve, AnimationColorCurve, AnimationVector4Curve, AnimationVector3Curve, AnimationVector2Curve, AnimationFloatArrayCurve, AnimationArrayCurve, AnimationFloatCurve, ModelMesh, BlendShape, Entity, Transform, Texture2D, ReferResource, DiffuseMode, BackgroundMode, resourceLoader, AssetType, AnimatorController, AnimatorControllerLayer, AnimatorStateTransition, BufferAsset, AmbientLight, TextureCube, TextureFormat, TextureFilterMode, TextureCubeFace, ContentRestorer, Font, SystemInfo, Animator, Logger, IndexFormat, VertexElementFormat, GLCapabilityType, request, InterpolationType, SkinnedMeshRenderer, PBRMaterial, TextureCoordinate, RenderFace, VertexElement, Buffer, BufferBindFlag, BufferUsage, Camera, MeshRenderer, Skin, TextureWrapMode as TextureWrapMode$1, TextureUtils, AnimatorStateMachine, JSONAsset, Shader, Material, PrimitiveMesh, SpriteAtlas, Sprite, TextAsset, AudioClip, AudioManager, ShaderFactory, ShaderLib, PhysicsMaterial, Scene, DirectLight, PointLight, SpotLight, UnlitMaterial } from '@galacean/engine-core';
|
|
2
2
|
import { Quaternion, Vector4, Color, Vector3, Vector2, SphericalHarmonics3, MathUtil, BoundingBox, Matrix, Rect } from '@galacean/engine-math';
|
|
3
3
|
import { GLCompressedTextureInternalFormat } from '@galacean/engine-rhi-webgl';
|
|
4
4
|
|
|
@@ -1720,7 +1720,6 @@ var EnvLoader = /*#__PURE__*/ function(Loader) {
|
|
|
1720
1720
|
sh.copyFromArray(new Float32Array(arraybuffer, 0, 27));
|
|
1721
1721
|
ambientLight.diffuseSphericalHarmonics = sh;
|
|
1722
1722
|
ambientLight.specularTexture = texture;
|
|
1723
|
-
ambientLight.specularTextureDecodeRGBM = true;
|
|
1724
1723
|
resolve(ambientLight);
|
|
1725
1724
|
}).catch(function(e) {
|
|
1726
1725
|
reject(e);
|
|
@@ -1733,7 +1732,7 @@ var EnvLoader = /*#__PURE__*/ function(Loader) {
|
|
|
1733
1732
|
var _this;
|
|
1734
1733
|
var shByteLength = 27 * 4;
|
|
1735
1734
|
var size = (_this = new Uint16Array(buffer, shByteLength, 1)) == null ? void 0 : _this[0];
|
|
1736
|
-
texture || (texture = new TextureCube(engine, size,
|
|
1735
|
+
texture || (texture = new TextureCube(engine, size, TextureFormat.R16G16B16A16, true, false));
|
|
1737
1736
|
texture.filterMode = TextureFilterMode.Trilinear;
|
|
1738
1737
|
var mipmapCount = texture.mipmapCount;
|
|
1739
1738
|
var offset = shByteLength + 2;
|
|
@@ -1741,8 +1740,8 @@ var EnvLoader = /*#__PURE__*/ function(Loader) {
|
|
|
1741
1740
|
var mipSize = size >> mipLevel;
|
|
1742
1741
|
for(var face = 0; face < 6; face++){
|
|
1743
1742
|
var dataSize = mipSize * mipSize * 4;
|
|
1744
|
-
var data = new
|
|
1745
|
-
offset += dataSize;
|
|
1743
|
+
var data = new Uint16Array(buffer, offset, dataSize);
|
|
1744
|
+
offset += dataSize * 2;
|
|
1746
1745
|
texture.setPixelBuffer(TextureCubeFace.PositiveX + face, data, mipLevel);
|
|
1747
1746
|
}
|
|
1748
1747
|
}
|
|
@@ -6719,7 +6718,6 @@ var SceneLoader = /*#__PURE__*/ function(Loader) {
|
|
|
6719
6718
|
scene.ambientLight.specularIntensity = ambient.specularIntensity;
|
|
6720
6719
|
scene.ambientLight.diffuseMode = ambient.diffuseMode;
|
|
6721
6720
|
scene.ambientLight.diffuseSolidColor.copyFrom(ambient.diffuseSolidColor);
|
|
6722
|
-
scene.ambientLight.specularTextureDecodeRGBM = true;
|
|
6723
6721
|
if (useCustomAmbient && ambient.customAmbientLight) {
|
|
6724
6722
|
promises.push(// @ts-ignore
|
|
6725
6723
|
resourceManager.getResourceByRef(ambient.customAmbientLight).then(function(ambientLight) {
|