lyb-pixi-js 1.9.14 → 1.9.15
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.
|
@@ -4,14 +4,14 @@ import { HTMLText, } from "pixi.js";
|
|
|
4
4
|
*/
|
|
5
5
|
export class LibPixiHtmlText extends HTMLText {
|
|
6
6
|
constructor(options) {
|
|
7
|
-
const { text, fontSize = 36, fontColor = 0xffffff, stroke, strokeThickness, fontFamily = "Arial", fontWeight = "normal",
|
|
7
|
+
const { text, fontSize = 36, fontColor = 0xffffff, stroke, strokeThickness, fontFamily = "Arial", fontWeight = "normal", wordWrapWidth = 100, lineHeight = 1.25, align = "left", shadow, } = options;
|
|
8
8
|
super(text.toString(), {
|
|
9
9
|
fontSize,
|
|
10
|
-
wordWrap,
|
|
10
|
+
wordWrap: !!wordWrapWidth,
|
|
11
11
|
wordWrapWidth,
|
|
12
12
|
fontWeight,
|
|
13
13
|
lineHeight: lineHeight * fontSize,
|
|
14
|
-
breakWords:
|
|
14
|
+
breakWords: !!wordWrapWidth,
|
|
15
15
|
fill: fontColor,
|
|
16
16
|
align,
|
|
17
17
|
whiteSpace: "pre-line",
|
|
@@ -4,14 +4,14 @@ import { Text, TextStyle, } from "pixi.js";
|
|
|
4
4
|
*/
|
|
5
5
|
export class LibPixiText extends Text {
|
|
6
6
|
constructor(options) {
|
|
7
|
-
const { text, fontSize = 36, fontColor = 0xffffff, stroke, strokeThickness, fontFamily = "Arial", fontWeight = "normal",
|
|
7
|
+
const { text, fontSize = 36, fontColor = 0xffffff, stroke, strokeThickness, fontFamily = "Arial", fontWeight = "normal", wordWrapWidth, lineHeight = 1.25, align = "left", indent = 0, shadow, } = options;
|
|
8
8
|
const style = new TextStyle({
|
|
9
9
|
fontSize,
|
|
10
|
-
wordWrap,
|
|
10
|
+
wordWrap: !!wordWrapWidth,
|
|
11
11
|
wordWrapWidth,
|
|
12
12
|
fontWeight,
|
|
13
13
|
lineHeight: lineHeight * fontSize,
|
|
14
|
-
breakWords:
|
|
14
|
+
breakWords: !!wordWrapWidth,
|
|
15
15
|
fill: fontColor,
|
|
16
16
|
align,
|
|
17
17
|
fontFamily: fontFamily,
|
package/lyb-pixi.js
CHANGED
|
@@ -31861,8 +31861,7 @@ void main(void)\r
|
|
|
31861
31861
|
strokeThickness,
|
|
31862
31862
|
fontFamily = "Arial",
|
|
31863
31863
|
fontWeight = "normal",
|
|
31864
|
-
|
|
31865
|
-
wordWrapWidth = 100,
|
|
31864
|
+
wordWrapWidth,
|
|
31866
31865
|
lineHeight = 1.25,
|
|
31867
31866
|
align = "left",
|
|
31868
31867
|
indent = 0,
|
|
@@ -31870,11 +31869,11 @@ void main(void)\r
|
|
|
31870
31869
|
} = options;
|
|
31871
31870
|
const style = new TextStyle({
|
|
31872
31871
|
fontSize,
|
|
31873
|
-
wordWrap,
|
|
31872
|
+
wordWrap: !!wordWrapWidth,
|
|
31874
31873
|
wordWrapWidth,
|
|
31875
31874
|
fontWeight,
|
|
31876
31875
|
lineHeight: lineHeight * fontSize,
|
|
31877
|
-
breakWords:
|
|
31876
|
+
breakWords: !!wordWrapWidth,
|
|
31878
31877
|
fill: fontColor,
|
|
31879
31878
|
align,
|
|
31880
31879
|
fontFamily,
|
|
@@ -55018,7 +55017,6 @@ void main(void){
|
|
|
55018
55017
|
strokeThickness,
|
|
55019
55018
|
fontFamily = "Arial",
|
|
55020
55019
|
fontWeight = "normal",
|
|
55021
|
-
wordWrap = false,
|
|
55022
55020
|
wordWrapWidth = 100,
|
|
55023
55021
|
lineHeight = 1.25,
|
|
55024
55022
|
align = "left",
|
|
@@ -55026,11 +55024,11 @@ void main(void){
|
|
|
55026
55024
|
} = options;
|
|
55027
55025
|
super(text.toString(), {
|
|
55028
55026
|
fontSize,
|
|
55029
|
-
wordWrap,
|
|
55027
|
+
wordWrap: !!wordWrapWidth,
|
|
55030
55028
|
wordWrapWidth,
|
|
55031
55029
|
fontWeight,
|
|
55032
55030
|
lineHeight: lineHeight * fontSize,
|
|
55033
|
-
breakWords:
|
|
55031
|
+
breakWords: !!wordWrapWidth,
|
|
55034
55032
|
fill: fontColor,
|
|
55035
55033
|
align,
|
|
55036
55034
|
whiteSpace: "pre-line",
|