@galacean/effects-threejs 2.2.0 → 2.2.1-alpha.0
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 +16 -8
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +16 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime threejs plugin for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v2.2.0
|
|
6
|
+
* Version: v2.2.1-alpha.0
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -16835,9 +16835,11 @@ function shouldIgnoreBouncing(arg, mul) {
|
|
|
16835
16835
|
*/ var MeshCollider = /*#__PURE__*/ function() {
|
|
16836
16836
|
function MeshCollider() {
|
|
16837
16837
|
this.triangles = [];
|
|
16838
|
+
this.worldMatrix = new Matrix4();
|
|
16838
16839
|
}
|
|
16839
16840
|
var _proto = MeshCollider.prototype;
|
|
16840
16841
|
_proto.getBoundingBoxData = function getBoundingBoxData() {
|
|
16842
|
+
this.applyWorldMatrix(this.boundingBoxData.area);
|
|
16841
16843
|
return this.boundingBoxData;
|
|
16842
16844
|
};
|
|
16843
16845
|
_proto.getBoundingBox = function getBoundingBox() {
|
|
@@ -16867,6 +16869,7 @@ function shouldIgnoreBouncing(arg, mul) {
|
|
|
16867
16869
|
p1: point2,
|
|
16868
16870
|
p2: point3
|
|
16869
16871
|
});
|
|
16872
|
+
this.applyWorldMatrix(area);
|
|
16870
16873
|
return {
|
|
16871
16874
|
type: exports.HitTestType.triangle,
|
|
16872
16875
|
area: area
|
|
@@ -16887,11 +16890,7 @@ function shouldIgnoreBouncing(arg, mul) {
|
|
|
16887
16890
|
});
|
|
16888
16891
|
}
|
|
16889
16892
|
if (worldMatrix) {
|
|
16890
|
-
|
|
16891
|
-
triangle.p0 = worldMatrix.transformPoint(triangle.p0, new Vector3());
|
|
16892
|
-
triangle.p1 = worldMatrix.transformPoint(triangle.p1, new Vector3());
|
|
16893
|
-
triangle.p2 = worldMatrix.transformPoint(triangle.p2, new Vector3());
|
|
16894
|
-
});
|
|
16893
|
+
this.worldMatrix.copyFrom(worldMatrix);
|
|
16895
16894
|
}
|
|
16896
16895
|
this.boundingBoxData = {
|
|
16897
16896
|
type: exports.HitTestType.triangle,
|
|
@@ -16931,6 +16930,15 @@ function shouldIgnoreBouncing(arg, mul) {
|
|
|
16931
16930
|
}
|
|
16932
16931
|
return res;
|
|
16933
16932
|
};
|
|
16933
|
+
_proto.applyWorldMatrix = function applyWorldMatrix(area) {
|
|
16934
|
+
var _this = this;
|
|
16935
|
+
area.forEach(function(triangle) {
|
|
16936
|
+
triangle.p0 = _this.worldMatrix.transformPoint(triangle.p0, new Vector3());
|
|
16937
|
+
triangle.p1 = _this.worldMatrix.transformPoint(triangle.p1, new Vector3());
|
|
16938
|
+
triangle.p2 = _this.worldMatrix.transformPoint(triangle.p2, new Vector3());
|
|
16939
|
+
});
|
|
16940
|
+
return area;
|
|
16941
|
+
};
|
|
16934
16942
|
return MeshCollider;
|
|
16935
16943
|
}();
|
|
16936
16944
|
|
|
@@ -31358,7 +31366,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem, true);
|
|
|
31358
31366
|
registerPlugin("particle", ParticleLoader, exports.VFXItem, true);
|
|
31359
31367
|
registerPlugin("cal", CalculateLoader, exports.VFXItem, true);
|
|
31360
31368
|
registerPlugin("interact", InteractLoader, exports.VFXItem, true);
|
|
31361
|
-
var version$1 = "2.2.0";
|
|
31369
|
+
var version$1 = "2.2.1-alpha.0";
|
|
31362
31370
|
logger.info("Core version: " + version$1 + ".");
|
|
31363
31371
|
|
|
31364
31372
|
var _obj;
|
|
@@ -32991,7 +32999,7 @@ setMaxSpriteMeshItemCount(8);
|
|
|
32991
32999
|
*/ Mesh.create = function(engine, props) {
|
|
32992
33000
|
return new ThreeMesh(engine, props);
|
|
32993
33001
|
};
|
|
32994
|
-
var version = "2.2.0";
|
|
33002
|
+
var version = "2.2.1-alpha.0";
|
|
32995
33003
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
32996
33004
|
|
|
32997
33005
|
exports.AbstractPlugin = AbstractPlugin;
|