@vvfx/sdk 0.2.2-alpha.0 → 0.2.2-alpha.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 +17 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -5
- package/dist/index.mjs.map +1 -1
- package/dist/sdk-item/text-item.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: TODO
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 赤芍,何即,不择,意绮
|
|
6
|
-
* Version: v0.2.2-alpha.
|
|
6
|
+
* Version: v0.2.2-alpha.1
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -24032,9 +24032,21 @@ function getUniqueName(name, names) {
|
|
|
24032
24032
|
};
|
|
24033
24033
|
_create_class(TextItem, [
|
|
24034
24034
|
{
|
|
24035
|
-
key: "
|
|
24035
|
+
key: "pixelWidth",
|
|
24036
24036
|
get: // ==================== 便捷访问器 ====================
|
|
24037
|
-
|
|
24037
|
+
function get() {
|
|
24038
|
+
return this.width;
|
|
24039
|
+
}
|
|
24040
|
+
},
|
|
24041
|
+
{
|
|
24042
|
+
key: "pixelHeight",
|
|
24043
|
+
get: function get() {
|
|
24044
|
+
return this.height;
|
|
24045
|
+
}
|
|
24046
|
+
},
|
|
24047
|
+
{
|
|
24048
|
+
key: "text",
|
|
24049
|
+
get: /**
|
|
24038
24050
|
* @description 文本内容
|
|
24039
24051
|
*/ function get() {
|
|
24040
24052
|
return this.property.text;
|
|
@@ -64579,7 +64591,7 @@ var PageDataUtils = /*#__PURE__*/ function() {
|
|
|
64579
64591
|
};
|
|
64580
64592
|
addTextItemIntoNewScene = function addTextItemIntoNewScene(textCreateInfo, sceneSize, itemViewPosition) {
|
|
64581
64593
|
var _scene_fonts;
|
|
64582
|
-
var _textCreateInfo_id = textCreateInfo.id, id = _textCreateInfo_id === void 0 ? EFFECTS.generateGUID() : _textCreateInfo_id, _textCreateInfo_name = textCreateInfo.name, name = _textCreateInfo_name === void 0 ? '文本' : _textCreateInfo_name, _textCreateInfo_property = textCreateInfo.property, lineHeight = _textCreateInfo_property.lineHeight, textWidth = _textCreateInfo_property.width, tmp = _textCreateInfo_property.height, textHeight = tmp === void 0 ? lineHeight : tmp, fontFamily = _textCreateInfo_property.fontFamily, fontSize = _textCreateInfo_property.fontSize, _textCreateInfo_property_fontWeight = _textCreateInfo_property.fontWeight, fontWeight = _textCreateInfo_property_fontWeight === void 0 ? EFFECTS.spec.TextWeight.normal : _textCreateInfo_property_fontWeight, _textCreateInfo_property_fontStyle = _textCreateInfo_property.fontStyle, fontStyle = _textCreateInfo_property_fontStyle === void 0 ? EFFECTS.spec.FontStyle.normal : _textCreateInfo_property_fontStyle, _textCreateInfo_property_textAlign = _textCreateInfo_property.textAlign, textAlign = _textCreateInfo_property_textAlign === void 0 ? EFFECTS.spec.TextAlignment.left : _textCreateInfo_property_textAlign, text = _textCreateInfo_property.text, textColor = _textCreateInfo_property.color, tmp1 = _textCreateInfo_property.rotation, sourceRotation = tmp1 === void 0 ? 0 : tmp1, url = _textCreateInfo_property.fontUrl, outlineColor = _textCreateInfo_property.outlineColor, outlineWidth = _textCreateInfo_property.outlineWidth, outlineEnabled = _textCreateInfo_property.outlineEnabled;
|
|
64594
|
+
var _textCreateInfo_id = textCreateInfo.id, id = _textCreateInfo_id === void 0 ? EFFECTS.generateGUID() : _textCreateInfo_id, _textCreateInfo_name = textCreateInfo.name, name = _textCreateInfo_name === void 0 ? '文本' : _textCreateInfo_name, _textCreateInfo_property = textCreateInfo.property, lineHeight = _textCreateInfo_property.lineHeight, textWidth = _textCreateInfo_property.width, tmp = _textCreateInfo_property.height, textHeight = tmp === void 0 ? lineHeight : tmp, fontFamily = _textCreateInfo_property.fontFamily, fontSize = _textCreateInfo_property.fontSize, _textCreateInfo_property_fontWeight = _textCreateInfo_property.fontWeight, fontWeight = _textCreateInfo_property_fontWeight === void 0 ? EFFECTS.spec.TextWeight.normal : _textCreateInfo_property_fontWeight, _textCreateInfo_property_fontStyle = _textCreateInfo_property.fontStyle, fontStyle = _textCreateInfo_property_fontStyle === void 0 ? EFFECTS.spec.FontStyle.normal : _textCreateInfo_property_fontStyle, _textCreateInfo_property_textAlign = _textCreateInfo_property.textAlign, textAlign = _textCreateInfo_property_textAlign === void 0 ? EFFECTS.spec.TextAlignment.left : _textCreateInfo_property_textAlign, text = _textCreateInfo_property.text, textColor = _textCreateInfo_property.color, tmp1 = _textCreateInfo_property.rotation, sourceRotation = tmp1 === void 0 ? 0 : tmp1, url = _textCreateInfo_property.fontUrl, outlineColor = _textCreateInfo_property.outlineColor, outlineWidth = _textCreateInfo_property.outlineWidth, outlineEnabled = _textCreateInfo_property.outlineEnabled, letterSpacing = _textCreateInfo_property.letterSpacing;
|
|
64583
64595
|
var rotation = Array.isArray(sourceRotation) ? [].concat(sourceRotation) : [
|
|
64584
64596
|
0,
|
|
64585
64597
|
0,
|
|
@@ -64609,7 +64621,7 @@ var PageDataUtils = /*#__PURE__*/ function() {
|
|
|
64609
64621
|
fontSize: fontSize,
|
|
64610
64622
|
textColor: resutlTextColor,
|
|
64611
64623
|
fontWeight: fontWeight,
|
|
64612
|
-
letterSpace:
|
|
64624
|
+
letterSpace: letterSpacing,
|
|
64613
64625
|
textAlign: textAlign,
|
|
64614
64626
|
fontStyle: fontStyle,
|
|
64615
64627
|
textWidth: textWidth,
|