@galacean/effects-core 2.2.0 → 2.2.1

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/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Description: Galacean Effects runtime core for the web
4
4
  * Author: Ant Group CO., Ltd.
5
5
  * Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
6
- * Version: v2.2.0
6
+ * Version: v2.2.1
7
7
  */
8
8
 
9
9
  'use strict';
@@ -16813,9 +16813,11 @@ function shouldIgnoreBouncing(arg, mul) {
16813
16813
  */ var MeshCollider = /*#__PURE__*/ function() {
16814
16814
  function MeshCollider() {
16815
16815
  this.triangles = [];
16816
+ this.worldMatrix = new Matrix4();
16816
16817
  }
16817
16818
  var _proto = MeshCollider.prototype;
16818
16819
  _proto.getBoundingBoxData = function getBoundingBoxData() {
16820
+ this.applyWorldMatrix(this.boundingBoxData.area);
16819
16821
  return this.boundingBoxData;
16820
16822
  };
16821
16823
  _proto.getBoundingBox = function getBoundingBox() {
@@ -16845,6 +16847,7 @@ function shouldIgnoreBouncing(arg, mul) {
16845
16847
  p1: point2,
16846
16848
  p2: point3
16847
16849
  });
16850
+ this.applyWorldMatrix(area);
16848
16851
  return {
16849
16852
  type: exports.HitTestType.triangle,
16850
16853
  area: area
@@ -16865,11 +16868,7 @@ function shouldIgnoreBouncing(arg, mul) {
16865
16868
  });
16866
16869
  }
16867
16870
  if (worldMatrix) {
16868
- area.forEach(function(triangle) {
16869
- triangle.p0 = worldMatrix.transformPoint(triangle.p0, new Vector3());
16870
- triangle.p1 = worldMatrix.transformPoint(triangle.p1, new Vector3());
16871
- triangle.p2 = worldMatrix.transformPoint(triangle.p2, new Vector3());
16872
- });
16871
+ this.worldMatrix.copyFrom(worldMatrix);
16873
16872
  }
16874
16873
  this.boundingBoxData = {
16875
16874
  type: exports.HitTestType.triangle,
@@ -16909,6 +16908,15 @@ function shouldIgnoreBouncing(arg, mul) {
16909
16908
  }
16910
16909
  return res;
16911
16910
  };
16911
+ _proto.applyWorldMatrix = function applyWorldMatrix(area) {
16912
+ var _this = this;
16913
+ area.forEach(function(triangle) {
16914
+ triangle.p0 = _this.worldMatrix.transformPoint(triangle.p0, new Vector3());
16915
+ triangle.p1 = _this.worldMatrix.transformPoint(triangle.p1, new Vector3());
16916
+ triangle.p2 = _this.worldMatrix.transformPoint(triangle.p2, new Vector3());
16917
+ });
16918
+ return area;
16919
+ };
16912
16920
  return MeshCollider;
16913
16921
  }();
16914
16922
 
@@ -31336,7 +31344,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
31336
31344
  registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
31337
31345
  registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
31338
31346
  registerPlugin("interact", InteractLoader, exports.VFXItem, true);
31339
- var version = "2.2.0";
31347
+ var version = "2.2.1";
31340
31348
  logger.info("Core version: " + version + ".");
31341
31349
 
31342
31350
  exports.AbstractPlugin = AbstractPlugin;