@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.js
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
|
import * as EFFECTS from '@galacean/effects';
|
|
@@ -24013,9 +24013,21 @@ function getUniqueName(name, names) {
|
|
|
24013
24013
|
};
|
|
24014
24014
|
_create_class(TextItem, [
|
|
24015
24015
|
{
|
|
24016
|
-
key: "
|
|
24016
|
+
key: "pixelWidth",
|
|
24017
24017
|
get: // ==================== 便捷访问器 ====================
|
|
24018
|
-
|
|
24018
|
+
function get() {
|
|
24019
|
+
return this.width;
|
|
24020
|
+
}
|
|
24021
|
+
},
|
|
24022
|
+
{
|
|
24023
|
+
key: "pixelHeight",
|
|
24024
|
+
get: function get() {
|
|
24025
|
+
return this.height;
|
|
24026
|
+
}
|
|
24027
|
+
},
|
|
24028
|
+
{
|
|
24029
|
+
key: "text",
|
|
24030
|
+
get: /**
|
|
24019
24031
|
* @description 文本内容
|
|
24020
24032
|
*/ function get() {
|
|
24021
24033
|
return this.property.text;
|
|
@@ -64560,7 +64572,7 @@ var PageDataUtils = /*#__PURE__*/ function() {
|
|
|
64560
64572
|
};
|
|
64561
64573
|
addTextItemIntoNewScene = function addTextItemIntoNewScene(textCreateInfo, sceneSize, itemViewPosition) {
|
|
64562
64574
|
var _scene_fonts;
|
|
64563
|
-
var _textCreateInfo_id = textCreateInfo.id, id = _textCreateInfo_id === void 0 ? 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 ? spec.TextWeight.normal : _textCreateInfo_property_fontWeight, _textCreateInfo_property_fontStyle = _textCreateInfo_property.fontStyle, fontStyle = _textCreateInfo_property_fontStyle === void 0 ? spec.FontStyle.normal : _textCreateInfo_property_fontStyle, _textCreateInfo_property_textAlign = _textCreateInfo_property.textAlign, textAlign = _textCreateInfo_property_textAlign === void 0 ? 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;
|
|
64575
|
+
var _textCreateInfo_id = textCreateInfo.id, id = _textCreateInfo_id === void 0 ? 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 ? spec.TextWeight.normal : _textCreateInfo_property_fontWeight, _textCreateInfo_property_fontStyle = _textCreateInfo_property.fontStyle, fontStyle = _textCreateInfo_property_fontStyle === void 0 ? spec.FontStyle.normal : _textCreateInfo_property_fontStyle, _textCreateInfo_property_textAlign = _textCreateInfo_property.textAlign, textAlign = _textCreateInfo_property_textAlign === void 0 ? 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;
|
|
64564
64576
|
var rotation = Array.isArray(sourceRotation) ? [].concat(sourceRotation) : [
|
|
64565
64577
|
0,
|
|
64566
64578
|
0,
|
|
@@ -64590,7 +64602,7 @@ var PageDataUtils = /*#__PURE__*/ function() {
|
|
|
64590
64602
|
fontSize: fontSize,
|
|
64591
64603
|
textColor: resutlTextColor,
|
|
64592
64604
|
fontWeight: fontWeight,
|
|
64593
|
-
letterSpace:
|
|
64605
|
+
letterSpace: letterSpacing,
|
|
64594
64606
|
textAlign: textAlign,
|
|
64595
64607
|
fontStyle: fontStyle,
|
|
64596
64608
|
textWidth: textWidth,
|