@galacean/effects-core 2.7.0 → 2.7.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/fallback/migration.d.ts +1 -0
- package/dist/index.js +36 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ export declare function version31Migration(json: JSONScene): JSONScene;
|
|
|
16
16
|
export declare function version32Migration(json: JSONScene): JSONScene;
|
|
17
17
|
export declare function version33Migration(json: JSONScene): JSONScene;
|
|
18
18
|
export declare function version34Migration(json: JSONScene): JSONScene;
|
|
19
|
+
export declare function version35Migration(json: JSONScene): JSONScene;
|
|
19
20
|
export declare function processContent(composition: spec.CompositionData): void;
|
|
20
21
|
export declare function processMask(renderContent: any): void;
|
|
21
22
|
/**
|
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.7.
|
|
6
|
+
* Version: v2.7.1
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -30655,42 +30655,41 @@ function version34Migration(json) {
|
|
|
30655
30655
|
}
|
|
30656
30656
|
}
|
|
30657
30657
|
}
|
|
30658
|
-
// 处理富文本lineGap兼容性
|
|
30659
|
-
processRichTextLineGapCompatibility(json);
|
|
30660
30658
|
//@ts-expect-error
|
|
30661
30659
|
json.version = "3.5";
|
|
30662
30660
|
return json;
|
|
30663
30661
|
}
|
|
30664
|
-
|
|
30665
|
-
|
|
30666
|
-
|
|
30667
|
-
|
|
30668
|
-
|
|
30669
|
-
|
|
30670
|
-
|
|
30671
|
-
|
|
30672
|
-
|
|
30673
|
-
|
|
30674
|
-
|
|
30675
|
-
|
|
30662
|
+
function version35Migration(json) {
|
|
30663
|
+
// 处理富文本 lineGap 兼容性
|
|
30664
|
+
if (json.components) {
|
|
30665
|
+
// 遍历所有组件,处理富文本组件
|
|
30666
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(json.components), _step; !(_step = _iterator()).done;){
|
|
30667
|
+
var component = _step.value;
|
|
30668
|
+
// 识别富文本组件并处理 lineGap 兼容性
|
|
30669
|
+
if (component.dataType === DataType.RichTextComponent) {
|
|
30670
|
+
var richTextComponent = component;
|
|
30671
|
+
if (richTextComponent.options) {
|
|
30672
|
+
// 检查是否已经处理过
|
|
30673
|
+
//@ts-expect-error
|
|
30674
|
+
if (richTextComponent.options.useLegacyRichText === undefined) {
|
|
30675
|
+
// 根据是否存在 lineGap 字段来判断版本
|
|
30676
|
+
if (richTextComponent.options.lineGap === undefined) {
|
|
30677
|
+
// 旧版本(没有 lineGap 字段)
|
|
30678
|
+
//@ts-expect-error
|
|
30679
|
+
richTextComponent.options.useLegacyRichText = true;
|
|
30680
|
+
} else {
|
|
30681
|
+
// 新版本(有 lineGap 字段)
|
|
30682
|
+
//@ts-expect-error
|
|
30683
|
+
richTextComponent.options.useLegacyRichText = false;
|
|
30684
|
+
}
|
|
30685
|
+
}
|
|
30686
|
+
}
|
|
30687
|
+
}
|
|
30676
30688
|
}
|
|
30677
30689
|
}
|
|
30678
|
-
|
|
30679
|
-
|
|
30680
|
-
|
|
30681
|
-
*/ function ensureRichTextLineGap(options) {
|
|
30682
|
-
// 检查是否已经处理过
|
|
30683
|
-
if (!options || options.useLegacyRichText !== undefined) {
|
|
30684
|
-
return;
|
|
30685
|
-
}
|
|
30686
|
-
// 根据是否存在 lineGap 字段来判断版本
|
|
30687
|
-
if (options.lineGap === undefined) {
|
|
30688
|
-
// 旧版本(没有 lineGap 字段)
|
|
30689
|
-
options.useLegacyRichText = true;
|
|
30690
|
-
} else {
|
|
30691
|
-
// 新版本(有 lineGap 字段)
|
|
30692
|
-
options.useLegacyRichText = false;
|
|
30693
|
-
}
|
|
30690
|
+
//@ts-expect-error
|
|
30691
|
+
json.version = "3.6";
|
|
30692
|
+
return json;
|
|
30694
30693
|
}
|
|
30695
30694
|
/**
|
|
30696
30695
|
* 根据形状获取形状几何体数据
|
|
@@ -31614,7 +31613,7 @@ function getStandardSpriteContent(sprite, transform) {
|
|
|
31614
31613
|
return ret;
|
|
31615
31614
|
}
|
|
31616
31615
|
|
|
31617
|
-
var version$1 = "2.7.
|
|
31616
|
+
var version$1 = "2.7.1";
|
|
31618
31617
|
var v0 = /^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/;
|
|
31619
31618
|
var standardVersion = /^(\d+)\.(\d+)$/;
|
|
31620
31619
|
var reverseParticle = false;
|
|
@@ -31632,7 +31631,7 @@ function getStandardJSON(json) {
|
|
|
31632
31631
|
if (v0.test(json.version)) {
|
|
31633
31632
|
var _exec;
|
|
31634
31633
|
reverseParticle = ((_exec = /^(\d+)/.exec(json.version)) == null ? void 0 : _exec[0]) === "0";
|
|
31635
|
-
return version34Migration(version33Migration(version32Migration(version31Migration(version30Migration(version21Migration(getStandardJSONFromV0(json)))))));
|
|
31634
|
+
return version35Migration(version34Migration(version33Migration(version32Migration(version31Migration(version30Migration(version21Migration(getStandardJSONFromV0(json))))))));
|
|
31636
31635
|
}
|
|
31637
31636
|
reverseParticle = false;
|
|
31638
31637
|
var vs = standardVersion.exec(json.version) || [];
|
|
@@ -31663,6 +31662,9 @@ function getStandardJSON(json) {
|
|
|
31663
31662
|
if (minorVersion < 5) {
|
|
31664
31663
|
json = version34Migration(json);
|
|
31665
31664
|
}
|
|
31665
|
+
if (minorVersion < 6) {
|
|
31666
|
+
json = version35Migration(json);
|
|
31667
|
+
}
|
|
31666
31668
|
}
|
|
31667
31669
|
return json;
|
|
31668
31670
|
}
|
|
@@ -34887,7 +34889,7 @@ registerPlugin("sprite", SpriteLoader, exports.VFXItem);
|
|
|
34887
34889
|
registerPlugin("particle", ParticleLoader, exports.VFXItem);
|
|
34888
34890
|
registerPlugin("cal", CalculateLoader, exports.VFXItem);
|
|
34889
34891
|
registerPlugin("interact", InteractLoader, exports.VFXItem);
|
|
34890
|
-
var version = "2.7.
|
|
34892
|
+
var version = "2.7.1";
|
|
34891
34893
|
logger.info("Core version: " + version + ".");
|
|
34892
34894
|
|
|
34893
34895
|
exports.AbstractPlugin = AbstractPlugin;
|