@galacean/effects-plugin-dom-content 2.9.2 → 2.9.4
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 +8 -4
- 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 +8 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects plugin for rendering HTML/CSS DOM content as texture
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 陈茉
|
|
6
|
-
* Version: v2.9.
|
|
6
|
+
* Version: v2.9.4
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as EFFECTS from '@galacean/effects';
|
|
@@ -946,7 +946,11 @@ function _inlineImageSources() {
|
|
|
946
946
|
];
|
|
947
947
|
}
|
|
948
948
|
urlToBase64 = new Map();
|
|
949
|
-
|
|
949
|
+
// 注意:不要写成 [...urlSet]。SWC 在 loose + ES5 下会把 `[...set]` 编译成
|
|
950
|
+
// `[].concat(urlSet)`,而 concat 不会展开 Set,会把整个 Set 当成单个元素塞进数组,
|
|
951
|
+
// 导致下方 urls.map 拿到的 url 是 Set 对象,decodeHtmlEntities(set) 报
|
|
952
|
+
// "value.replace is not a function"。Array.from 是运行时调用,SWC 不会改写它。
|
|
953
|
+
urls = Array.from(urlSet).slice(0, MAX_URLS);
|
|
950
954
|
if (urlSet.size > MAX_URLS) {
|
|
951
955
|
logger.warn("inlineImageSources: URL count (" + urlSet.size + ") exceeds limit (" + MAX_URLS + "), only processing first " + MAX_URLS + ".");
|
|
952
956
|
}
|
|
@@ -1044,7 +1048,7 @@ function _inlineFontSources() {
|
|
|
1044
1048
|
];
|
|
1045
1049
|
}
|
|
1046
1050
|
urlToBase64 = new Map();
|
|
1047
|
-
urls =
|
|
1051
|
+
urls = Array.from(urlSet).slice(0, MAX_URLS);
|
|
1048
1052
|
if (urlSet.size > MAX_URLS) {
|
|
1049
1053
|
logger.warn("inlineFontSources: URL count (" + urlSet.size + ") exceeds limit (" + MAX_URLS + "), only processing first " + MAX_URLS + ".");
|
|
1050
1054
|
}
|
|
@@ -1717,7 +1721,7 @@ DomContentComponent = __decorate([
|
|
|
1717
1721
|
effectsClass(DATA_TYPE)
|
|
1718
1722
|
], DomContentComponent);
|
|
1719
1723
|
|
|
1720
|
-
var version = "2.9.
|
|
1724
|
+
var version = "2.9.4";
|
|
1721
1725
|
registerPlugin("dom-content", DomContentLoader);
|
|
1722
1726
|
logger.info("Plugin dom-content version: " + version + ".");
|
|
1723
1727
|
if (version !== EFFECTS.version) {
|