lyb-pixi-js 1.9.12 → 1.9.14

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.
@@ -6,10 +6,8 @@ export interface LibPixiHtmlTextParams {
6
6
  fontSize?: number;
7
7
  /** 字体颜色 */
8
8
  fontColor?: any;
9
- /** 是否描边 */
10
- stroke?: boolean;
11
9
  /** 描边颜色 */
12
- strokeColor?: string | number;
10
+ stroke?: string | number;
13
11
  /** 描边宽度 */
14
12
  strokeThickness?: number;
15
13
  /** 字体样式 */
@@ -4,7 +4,7 @@ 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, strokeColor, strokeThickness, fontFamily = "Arial", fontWeight = "normal", wordWrap = false, wordWrapWidth = 100, lineHeight = 1.25, align = "left", shadow, } = options;
7
+ const { text, fontSize = 36, fontColor = 0xffffff, stroke, strokeThickness, fontFamily = "Arial", fontWeight = "normal", wordWrap = false, wordWrapWidth = 100, lineHeight = 1.25, align = "left", shadow, } = options;
8
8
  super(text.toString(), {
9
9
  fontSize,
10
10
  wordWrap,
@@ -16,8 +16,8 @@ export class LibPixiHtmlText extends HTMLText {
16
16
  align,
17
17
  whiteSpace: "pre-line",
18
18
  fontFamily: fontFamily,
19
- stroke: stroke ? strokeColor : "transparent",
20
- strokeThickness: stroke ? strokeThickness : 0,
19
+ stroke: stroke ? stroke : "transparent",
20
+ strokeThickness: strokeThickness ? strokeThickness : 0,
21
21
  });
22
22
  if (shadow) {
23
23
  this.style.dropShadow = true;
@@ -89,7 +89,7 @@ export class LibPixiParticleMove extends Container {
89
89
  const text = new LibPixiText({
90
90
  text: index + 1,
91
91
  fontSize: 20,
92
- strokeColor: "#000",
92
+ stroke: "#000",
93
93
  strokeThickness: 1,
94
94
  });
95
95
  text.position.set(item.x, item.y);
@@ -7,7 +7,7 @@ export interface LibPixiTextParams {
7
7
  /** 字体颜色 */
8
8
  fontColor?: any;
9
9
  /** 描边颜色 */
10
- strokeColor?: string | number;
10
+ stroke?: string | number;
11
11
  /** 描边宽度 */
12
12
  strokeThickness?: number;
13
13
  /** 字体样式 */
@@ -4,7 +4,7 @@ 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, strokeColor, strokeThickness, fontFamily = "Arial", fontWeight = "normal", wordWrap = false, wordWrapWidth = 100, lineHeight = 1.25, align = "left", indent = 0, shadow, } = options;
7
+ const { text, fontSize = 36, fontColor = 0xffffff, stroke, strokeThickness, fontFamily = "Arial", fontWeight = "normal", wordWrap = false, wordWrapWidth = 100, lineHeight = 1.25, align = "left", indent = 0, shadow, } = options;
8
8
  const style = new TextStyle({
9
9
  fontSize,
10
10
  wordWrap,
@@ -15,7 +15,7 @@ export class LibPixiText extends Text {
15
15
  fill: fontColor,
16
16
  align,
17
17
  fontFamily: fontFamily,
18
- stroke: strokeColor ? strokeColor : "transparent",
18
+ stroke: stroke ? stroke : "transparent",
19
19
  strokeThickness: strokeThickness ? strokeThickness : 0,
20
20
  lineJoin: "round",
21
21
  });
package/lyb-pixi.js CHANGED
@@ -31857,7 +31857,7 @@ void main(void)\r
31857
31857
  text,
31858
31858
  fontSize = 36,
31859
31859
  fontColor = 16777215,
31860
- strokeColor,
31860
+ stroke,
31861
31861
  strokeThickness,
31862
31862
  fontFamily = "Arial",
31863
31863
  fontWeight = "normal",
@@ -31878,7 +31878,7 @@ void main(void)\r
31878
31878
  fill: fontColor,
31879
31879
  align,
31880
31880
  fontFamily,
31881
- stroke: strokeColor ? strokeColor : "transparent",
31881
+ stroke: stroke ? stroke : "transparent",
31882
31882
  strokeThickness: strokeThickness ? strokeThickness : 0,
31883
31883
  lineJoin: "round"
31884
31884
  });
@@ -31989,7 +31989,7 @@ void main(void)\r
31989
31989
  const text = new LibPixiText({
31990
31990
  text: index + 1,
31991
31991
  fontSize: 20,
31992
- strokeColor: "#000",
31992
+ stroke: "#000",
31993
31993
  strokeThickness: 1
31994
31994
  });
31995
31995
  text.position.set(item.x, item.y);
@@ -55015,7 +55015,6 @@ void main(void){
55015
55015
  fontSize = 36,
55016
55016
  fontColor = 16777215,
55017
55017
  stroke,
55018
- strokeColor,
55019
55018
  strokeThickness,
55020
55019
  fontFamily = "Arial",
55021
55020
  fontWeight = "normal",
@@ -55036,8 +55035,8 @@ void main(void){
55036
55035
  align,
55037
55036
  whiteSpace: "pre-line",
55038
55037
  fontFamily,
55039
- stroke: stroke ? strokeColor : "transparent",
55040
- strokeThickness: stroke ? strokeThickness : 0
55038
+ stroke: stroke ? stroke : "transparent",
55039
+ strokeThickness: strokeThickness ? strokeThickness : 0
55041
55040
  });
55042
55041
  if (shadow) {
55043
55042
  this.style.dropShadow = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lyb-pixi-js",
3
- "version": "1.9.12",
3
+ "version": "1.9.14",
4
4
  "description": "自用Pixi.JS方法库",
5
5
  "license": "ISC",
6
6
  "exports": {