@galacean/effects-threejs 2.7.0 → 2.7.2
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 +37 -35
- 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 +37 -35
- 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.7.
|
|
6
|
+
* Version: v2.7.2
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -30677,42 +30677,41 @@ function version34Migration(json) {
|
|
|
30677
30677
|
}
|
|
30678
30678
|
}
|
|
30679
30679
|
}
|
|
30680
|
-
// 处理富文本lineGap兼容性
|
|
30681
|
-
processRichTextLineGapCompatibility(json);
|
|
30682
30680
|
//@ts-expect-error
|
|
30683
30681
|
json.version = "3.5";
|
|
30684
30682
|
return json;
|
|
30685
30683
|
}
|
|
30686
|
-
|
|
30687
|
-
|
|
30688
|
-
|
|
30689
|
-
|
|
30690
|
-
|
|
30691
|
-
|
|
30692
|
-
|
|
30693
|
-
|
|
30694
|
-
|
|
30695
|
-
|
|
30696
|
-
|
|
30697
|
-
|
|
30684
|
+
function version35Migration(json) {
|
|
30685
|
+
// 处理富文本 lineGap 兼容性
|
|
30686
|
+
if (json.components) {
|
|
30687
|
+
// 遍历所有组件,处理富文本组件
|
|
30688
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(json.components), _step; !(_step = _iterator()).done;){
|
|
30689
|
+
var component = _step.value;
|
|
30690
|
+
// 识别富文本组件并处理 lineGap 兼容性
|
|
30691
|
+
if (component.dataType === DataType.RichTextComponent) {
|
|
30692
|
+
var richTextComponent = component;
|
|
30693
|
+
if (richTextComponent.options) {
|
|
30694
|
+
// 检查是否已经处理过
|
|
30695
|
+
//@ts-expect-error
|
|
30696
|
+
if (richTextComponent.options.useLegacyRichText === undefined) {
|
|
30697
|
+
// 根据是否存在 lineGap 字段来判断版本
|
|
30698
|
+
if (richTextComponent.options.lineGap === undefined) {
|
|
30699
|
+
// 旧版本(没有 lineGap 字段)
|
|
30700
|
+
//@ts-expect-error
|
|
30701
|
+
richTextComponent.options.useLegacyRichText = true;
|
|
30702
|
+
} else {
|
|
30703
|
+
// 新版本(有 lineGap 字段)
|
|
30704
|
+
//@ts-expect-error
|
|
30705
|
+
richTextComponent.options.useLegacyRichText = false;
|
|
30706
|
+
}
|
|
30707
|
+
}
|
|
30708
|
+
}
|
|
30709
|
+
}
|
|
30698
30710
|
}
|
|
30699
30711
|
}
|
|
30700
|
-
|
|
30701
|
-
|
|
30702
|
-
|
|
30703
|
-
*/ function ensureRichTextLineGap(options) {
|
|
30704
|
-
// 检查是否已经处理过
|
|
30705
|
-
if (!options || options.useLegacyRichText !== undefined) {
|
|
30706
|
-
return;
|
|
30707
|
-
}
|
|
30708
|
-
// 根据是否存在 lineGap 字段来判断版本
|
|
30709
|
-
if (options.lineGap === undefined) {
|
|
30710
|
-
// 旧版本(没有 lineGap 字段)
|
|
30711
|
-
options.useLegacyRichText = true;
|
|
30712
|
-
} else {
|
|
30713
|
-
// 新版本(有 lineGap 字段)
|
|
30714
|
-
options.useLegacyRichText = false;
|
|
30715
|
-
}
|
|
30712
|
+
//@ts-expect-error
|
|
30713
|
+
json.version = "3.6";
|
|
30714
|
+
return json;
|
|
30716
30715
|
}
|
|
30717
30716
|
/**
|
|
30718
30717
|
* 根据形状获取形状几何体数据
|
|
@@ -31636,7 +31635,7 @@ function getStandardSpriteContent(sprite, transform) {
|
|
|
31636
31635
|
return ret;
|
|
31637
31636
|
}
|
|
31638
31637
|
|
|
31639
|
-
var version$2 = "2.7.
|
|
31638
|
+
var version$2 = "2.7.2";
|
|
31640
31639
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
31641
31640
|
var standardVersion = /^(\d+)\.(\d+)$/;
|
|
31642
31641
|
var reverseParticle = false;
|
|
@@ -31654,7 +31653,7 @@ function getStandardJSON(json) {
|
|
|
31654
31653
|
if (v0.test(json.version)) {
|
|
31655
31654
|
var _exec;
|
|
31656
31655
|
reverseParticle = ((_exec = /^(\d+)/.exec(json.version)) == null ? void 0 : _exec[0]) === "0";
|
|
31657
|
-
return version34Migration(version33Migration(version32Migration(version31Migration(version30Migration(version21Migration(getStandardJSONFromV0(json)))))));
|
|
31656
|
+
return version35Migration(version34Migration(version33Migration(version32Migration(version31Migration(version30Migration(version21Migration(getStandardJSONFromV0(json))))))));
|
|
31658
31657
|
}
|
|
31659
31658
|
reverseParticle = false;
|
|
31660
31659
|
var vs = standardVersion.exec(json.version) || [];
|
|
@@ -31685,6 +31684,9 @@ function getStandardJSON(json) {
|
|
|
31685
31684
|
if (minorVersion < 5) {
|
|
31686
31685
|
json = version34Migration(json);
|
|
31687
31686
|
}
|
|
31687
|
+
if (minorVersion < 6) {
|
|
31688
|
+
json = version35Migration(json);
|
|
31689
|
+
}
|
|
31688
31690
|
}
|
|
31689
31691
|
return json;
|
|
31690
31692
|
}
|
|
@@ -34909,7 +34911,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
|
|
|
34909
34911
|
registerPlugin("particle", ParticleLoader, exports.VFXItem);
|
|
34910
34912
|
registerPlugin("cal", CalculateLoader, exports.VFXItem);
|
|
34911
34913
|
registerPlugin("interact", InteractLoader, exports.VFXItem);
|
|
34912
|
-
var version$1 = "2.7.
|
|
34914
|
+
var version$1 = "2.7.2";
|
|
34913
34915
|
logger.info("Core version: " + version$1 + ".");
|
|
34914
34916
|
|
|
34915
34917
|
var _obj;
|
|
@@ -36490,7 +36492,7 @@ setMaxSpriteMeshItemCount(8);
|
|
|
36490
36492
|
*/ Mesh.create = function(engine, props) {
|
|
36491
36493
|
return new ThreeMesh(engine, props);
|
|
36492
36494
|
};
|
|
36493
|
-
var version = "2.7.
|
|
36495
|
+
var version = "2.7.2";
|
|
36494
36496
|
logger.info("THREEJS plugin version: " + version + ".");
|
|
36495
36497
|
|
|
36496
36498
|
exports.AbstractPlugin = AbstractPlugin;
|