@galacean/engine-physics-lite 0.9.5 → 0.9.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.
@@ -14273,7 +14273,7 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
14273
14273
  // vertices
14274
14274
  this._vertexBuffers[index] = new Buffer(engine, exports.BufferBindFlag.VertexBuffer, MAX_VERTEX_COUNT * 4 * vertexStride, exports.BufferUsage.Dynamic);
14275
14275
  // indices
14276
- this._indiceBuffers[index] = new Buffer(engine, exports.BufferBindFlag.IndexBuffer, MAX_VERTEX_COUNT * 3, exports.BufferUsage.Dynamic);
14276
+ this._indiceBuffers[index] = new Buffer(engine, exports.BufferBindFlag.IndexBuffer, MAX_VERTEX_COUNT * 2 * 3, exports.BufferUsage.Dynamic);
14277
14277
  mesh.setVertexBufferBinding(this._vertexBuffers[index], vertexStride);
14278
14278
  mesh.setIndexBufferBinding(this._indiceBuffers[index], exports.IndexFormat.UInt16);
14279
14279
  mesh.setVertexElements(vertexElements);
@@ -16949,7 +16949,7 @@ var /**
16949
16949
  // prepare render target
16950
16950
  var renderTarget = this._getAvailableRenderTarget();
16951
16951
  // @todo: shouldn't set viewport and scissor in activeRenderTarget
16952
- rhi.activeRenderTarget(renderTarget, null, 0);
16952
+ rhi.activeRenderTarget(renderTarget, CascadedShadowCasterPass._viewport, 0);
16953
16953
  if (this._supportDepthTexture) {
16954
16954
  rhi.clearRenderTarget(engine, exports.CameraClearFlags.Depth, null);
16955
16955
  } else {
@@ -17153,6 +17153,9 @@ var /**
17153
17153
  (function() {
17154
17154
  CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17155
17155
  })();
17156
+ (function() {
17157
+ CascadedShadowCasterPass._viewport = new miniprogram$7.Vector4(0, 0, 1, 1);
17158
+ })();
17156
17159
  (function() {
17157
17160
  CascadedShadowCasterPass._clearColor = new miniprogram$7.Color(1, 1, 1, 1);
17158
17161
  })();
@@ -28852,6 +28855,29 @@ TextureCubeLoader = __decorate([
28852
28855
  ""
28853
28856
  ])
28854
28857
  ], TextureCubeLoader);
28858
+ var AnimationClipLoader = /*#__PURE__*/ function(Loader) {
28859
+ var AnimationClipLoader = function AnimationClipLoader() {
28860
+ return Loader.apply(this, arguments);
28861
+ };
28862
+ _inherits$1(AnimationClipLoader, Loader);
28863
+ var _proto = AnimationClipLoader.prototype;
28864
+ _proto.load = function load(item, resourceManager) {
28865
+ var _this = this;
28866
+ return new miniprogram$5.AssetPromise(function(resolve, reject) {
28867
+ _this.request(item.url, _extends$1({}, item, {
28868
+ type: "arraybuffer"
28869
+ })).then(function(data) {
28870
+ return decode(data, resourceManager.engine).then(resolve);
28871
+ }).catch(reject);
28872
+ });
28873
+ };
28874
+ return AnimationClipLoader;
28875
+ }(miniprogram$5.Loader);
28876
+ AnimationClipLoader = __decorate([
28877
+ miniprogram$5.resourceLoader(miniprogram$5.AssetType.AnimationClip, [
28878
+ "ani"
28879
+ ])
28880
+ ], AnimationClipLoader);
28855
28881
  var SceneLoader = /*#__PURE__*/ function(Loader) {
28856
28882
  var SceneLoader = function SceneLoader() {
28857
28883
  return Loader.apply(this, arguments);
@@ -28920,6 +28946,14 @@ var SceneLoader = /*#__PURE__*/ function(Loader) {
28920
28946
  if (shadow.shadowDistance != undefined) scene.shadowDistance = shadow.shadowDistance;
28921
28947
  if (shadow.shadowCascades != undefined) scene.shadowCascades = shadow.shadowCascades;
28922
28948
  }
28949
+ var fog = data.scene.fog;
28950
+ if (fog) {
28951
+ if (fog.fogMode != undefined) scene.fogMode = fog.fogMode;
28952
+ if (fog.fogStart != undefined) scene.fogStart = fog.fogStart;
28953
+ if (fog.fogEnd != undefined) scene.fogEnd = fog.fogEnd;
28954
+ if (fog.fogDensity != undefined) scene.fogDensity = fog.fogDensity;
28955
+ if (fog.fogColor != undefined) scene.fogColor.copyFrom(fog.fogColor);
28956
+ }
28923
28957
  return Promise.all([
28924
28958
  ambientLightPromise,
28925
28959
  backgroundPromise
@@ -35718,7 +35752,7 @@ function _interopNamespace(e) {
35718
35752
  }
35719
35753
  var CoreObjects__namespace = /*#__PURE__*/ _interopNamespace(CoreObjects);
35720
35754
  //@ts-ignore
35721
- var version = "0.9.5";
35755
+ var version = "0.9.7";
35722
35756
  console.log("Galacean engine version: " + version);
35723
35757
  for(var key in CoreObjects__namespace){
35724
35758
  CoreObjects.Loader.registerClass(key, CoreObjects__namespace[key]);