lyb-pixi-js 1.12.18 → 1.12.20

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.
@@ -0,0 +1,25 @@
1
+ import { Container } from "pixi.js";
2
+ export interface GridLayoutParams {
3
+ gap?: number | number[];
4
+ direction?: "x" | "y";
5
+ colNum?: number;
6
+ elementList?: any[];
7
+ anchorX?: number;
8
+ anchorY?: number;
9
+ }
10
+ /** @description 线性排列 */
11
+ export declare class LibPixiArrangeLinearV2<T extends Container> extends Container {
12
+ /** 参数 */
13
+ private _params;
14
+ /** 元素列表 */
15
+ private _elementList;
16
+ constructor(params?: GridLayoutParams);
17
+ /** @description 追加元素 */
18
+ push(element: T): void;
19
+ /** @description 布局 */
20
+ layout(): void;
21
+ /** @description 获取列表元素 */
22
+ getList(): T[];
23
+ /** @description 销毁列表元素 */
24
+ destroyList(): void;
25
+ }
@@ -0,0 +1,80 @@
1
+ import { Container } from "pixi.js";
2
+ /** @description 线性排列 */
3
+ export class LibPixiArrangeLinearV2 extends Container {
4
+ constructor(params) {
5
+ super();
6
+ /** 元素列表 */
7
+ this._elementList = [];
8
+ this._params = params || {};
9
+ this._elementList = this._params.elementList || [];
10
+ }
11
+ /** @description 追加元素 */
12
+ push(element) {
13
+ this.addChild(element);
14
+ this._elementList.push(element);
15
+ }
16
+ /** @description 布局 */
17
+ layout() {
18
+ const { colNum = this._elementList.length, gap = 10, direction = "x", anchorX = 0, anchorY = 0, } = this._params;
19
+ let lastRowMax = 0; // 当前行(或列)的最大高度(或宽度),用于多行/多列换行时计算偏移
20
+ let rowOffset = 0; // 累计偏移量,控制换行后的整体偏移位置
21
+ this._elementList.forEach((item, index) => {
22
+ var _a, _b;
23
+ const row = Math.floor(index / colNum); // 当前行号
24
+ const col = index % colNum; // 当前列号
25
+ if (direction === "x") {
26
+ //间隔
27
+ const gapValue = Array.isArray(gap) ? (_a = gap[index - 1]) !== null && _a !== void 0 ? _a : 0 : gap;
28
+ //在每行第一列重置列偏移量
29
+ if (col === 0 && row > 0) {
30
+ rowOffset += lastRowMax + gapValue;
31
+ lastRowMax = 0;
32
+ }
33
+ // 横向位置 = 前一个元素的右侧 + 间隔;首列则从 0 开始
34
+ item.x =
35
+ col === 0
36
+ ? 0
37
+ : this._elementList[index - 1].x +
38
+ this._elementList[index - 1].width +
39
+ gapValue;
40
+ // 纵向位置 = 当前累计的行偏移
41
+ rowOffset && (item.y = rowOffset);
42
+ // 更新当前行的最大高度
43
+ lastRowMax = Math.max(lastRowMax, item.height);
44
+ }
45
+ else {
46
+ //间隔
47
+ const gapValue = Array.isArray(gap) ? (_b = gap[index - 1]) !== null && _b !== void 0 ? _b : 0 : gap;
48
+ //在每列第一行重置行偏移
49
+ if (col === 0 && row > 0) {
50
+ rowOffset += lastRowMax + gapValue;
51
+ lastRowMax = 0;
52
+ }
53
+ // 纵向位置 = 首列则从 0 开始,其余从前一个元素的y坐标 + 高度 + 间隔;
54
+ item.y =
55
+ col === 0
56
+ ? 0
57
+ : this._elementList[index - 1].y +
58
+ this._elementList[index - 1].height +
59
+ gapValue;
60
+ // 横向位置 = 当前累计的列偏移
61
+ rowOffset && (item.x = rowOffset);
62
+ // 更新当前列的最大宽度
63
+ lastRowMax = Math.max(lastRowMax, item.width);
64
+ }
65
+ });
66
+ const bounds = this.getLocalBounds();
67
+ this.pivot.set(bounds.x + bounds.width * anchorX, bounds.y + bounds.height * anchorY);
68
+ }
69
+ /** @description 获取列表元素 */
70
+ getList() {
71
+ return this._elementList;
72
+ }
73
+ /** @description 销毁列表元素 */
74
+ destroyList() {
75
+ this._elementList.forEach((item) => {
76
+ item.destroy();
77
+ });
78
+ this._elementList = [];
79
+ }
80
+ }
@@ -1,4 +1,4 @@
1
- import { Container } from "pixi.js";
1
+ import { Container, Texture } from "pixi.js";
2
2
  import { LibPixiContainer } from "../Base/LibPixiContainer";
3
3
  export interface LibPixiScrollContainerYParams {
4
4
  /** 宽度 */
@@ -7,10 +7,6 @@ export interface LibPixiScrollContainerYParams {
7
7
  height: number;
8
8
  /** 滚动内容 */
9
9
  scrollContent: Container;
10
- /** 顶部边距 */
11
- topMargin?: number;
12
- /** 底部边距 */
13
- bottomMargin?: number;
14
10
  /** 背景色,用于定位 */
15
11
  bgColor?: string;
16
12
  /** 是否需要滚动条 */
@@ -21,6 +17,12 @@ export interface LibPixiScrollContainerYParams {
21
17
  scrollbarWidth?: number;
22
18
  /** 滚动条颜色 */
23
19
  scrollbarColor?: string;
20
+ /** 自定义遮罩贴图 */
21
+ maskTexture?: Texture;
22
+ /** 遮罩X坐标 */
23
+ maskX?: number;
24
+ /** 遮罩Y坐标 */
25
+ maskY?: number;
24
26
  /** 滚动触发 */
25
27
  onScroll?: (y: number) => void;
26
28
  }
@@ -8,7 +8,7 @@ import { LibPixiRectangle } from "../Base/LibPixiRectangle";
8
8
  */
9
9
  export class LibPixiScrollContainerY extends LibPixiContainer {
10
10
  constructor(params) {
11
- const { width, height, scrollbar = false, scrollContent, scrollbarRgiht = 0, scrollbarWidth = 10, scrollbarColor = "#ffffff", onScroll, bgColor, } = params;
11
+ const { width, height, scrollbar = false, scrollContent, scrollbarRgiht = 0, scrollbarWidth = 10, scrollbarColor = "#ffffff", onScroll, bgColor, maskTexture, maskX = 0, maskY = 0, } = params;
12
12
  super(width, height, bgColor);
13
13
  /** 开始位置 */
14
14
  this._startY = 0;
@@ -36,10 +36,20 @@ export class LibPixiScrollContainerY extends LibPixiContainer {
36
36
  this._content = new Container();
37
37
  this.addChild(this._content);
38
38
  this._content.addChild(this._scrollContent);
39
- // 创建遮罩
40
- this._maskGraphics = new LibPixiRectangle(width, height, "#000");
41
- this.addChild(this._maskGraphics);
42
- this.mask = this._maskGraphics;
39
+ //自定义遮罩
40
+ if (maskTexture) {
41
+ this._maskGraphics = new Sprite(maskTexture);
42
+ this.addChild(this._maskGraphics);
43
+ this._maskGraphics.width = width;
44
+ this._maskGraphics.height = height;
45
+ this._maskGraphics.position.set(maskX, maskY);
46
+ this.mask = this._maskGraphics;
47
+ }
48
+ else {
49
+ this._maskGraphics = new LibPixiRectangle(width, height, "#000");
50
+ this.addChild(this._maskGraphics);
51
+ this.mask = this._maskGraphics;
52
+ }
43
53
  // 创建滚动条
44
54
  this._scrollbar = new LibPixiRectangle(scrollbarWidth, height, this._scrollbarColor);
45
55
  this._scrollbar.x = width - (scrollbarRgiht || scrollbarWidth);
@@ -104,11 +114,8 @@ export class LibPixiScrollContainerY extends LibPixiContainer {
104
114
  * @param height 高度
105
115
  */
106
116
  setDimensions(width, height) {
107
- // 更新遮罩尺寸
108
- this._maskGraphics.clear();
109
- this._maskGraphics.beginFill(0x000000);
110
- this._maskGraphics.drawRect(0, 0, width, height);
111
- this._maskGraphics.endFill();
117
+ this._maskGraphics.width = width;
118
+ this._maskGraphics.height = height;
112
119
  this.setSize(width, height);
113
120
  this._scrollbar.x = width - (this._scrollbarRgiht || this._scrollbarWidth);
114
121
  }
@@ -0,0 +1,20 @@
1
+ import { Container, type ITextStyle } from "pixi.js";
2
+ interface TextItem {
3
+ text: string;
4
+ style?: Partial<ITextStyle>;
5
+ }
6
+ interface TextGroupOptions {
7
+ items: TextItem[];
8
+ defaultStyle?: Partial<ITextStyle>;
9
+ wordWrapWidth?: number;
10
+ paddingX?: number;
11
+ paddingY?: number;
12
+ align?: "left" | "center" | "right";
13
+ anchorX?: number;
14
+ anchorY?: number;
15
+ }
16
+ /** @description 文本组换行 */
17
+ export declare class LibPixiTextGroupWrap extends Container {
18
+ constructor({ items, defaultStyle, wordWrapWidth, paddingX, paddingY, align, anchorX, anchorY, }: TextGroupOptions);
19
+ }
20
+ export {};
@@ -0,0 +1,50 @@
1
+ import { Container, Text } from "pixi.js";
2
+ /** @description 文本组换行 */
3
+ export class LibPixiTextGroupWrap extends Container {
4
+ constructor({ items, defaultStyle = {}, wordWrapWidth, paddingX = 0, paddingY = 0, align = "left", anchorX = 0, anchorY = 0, }) {
5
+ super();
6
+ if (!items.length)
7
+ return;
8
+ const lineGroups = [];
9
+ let currentLine = [];
10
+ let x = 0;
11
+ // 分行
12
+ for (const { text, style = {} } of items) {
13
+ const instance = new Text(text, Object.assign(Object.assign({}, defaultStyle), style));
14
+ const w = instance.width;
15
+ if (wordWrapWidth && x + w > wordWrapWidth && x > 0) {
16
+ lineGroups.push(currentLine);
17
+ currentLine = [];
18
+ x = 0;
19
+ }
20
+ currentLine.push(instance);
21
+ x += w + paddingX;
22
+ }
23
+ if (currentLine.length)
24
+ lineGroups.push(currentLine);
25
+ // 布局每行
26
+ let y = 0;
27
+ for (const line of lineGroups) {
28
+ const totalWidth = line.reduce((sum, i) => sum + i.width + paddingX, -paddingX);
29
+ let offsetX = 0;
30
+ if (align === "center" && wordWrapWidth)
31
+ offsetX = (wordWrapWidth - totalWidth) / 2;
32
+ else if (align === "right" && wordWrapWidth)
33
+ offsetX = wordWrapWidth - totalWidth;
34
+ let currentX = offsetX;
35
+ let maxHeight = 0;
36
+ for (const item of line) {
37
+ item.x = currentX;
38
+ item.y = y;
39
+ this.addChild(item);
40
+ currentX += item.width + paddingX;
41
+ if (item.height > maxHeight)
42
+ maxHeight = item.height;
43
+ }
44
+ y += maxHeight + paddingY;
45
+ }
46
+ // 根据 anchor 调整整体偏移
47
+ const bounds = this.getLocalBounds();
48
+ this.pivot.set(bounds.x + bounds.width * anchorX, bounds.y + bounds.height * anchorY);
49
+ }
50
+ }
@@ -0,0 +1,20 @@
1
+ import { Container, type ITextStyle } from "pixi.js";
2
+ interface TextItem {
3
+ text: string;
4
+ style?: Partial<ITextStyle>;
5
+ }
6
+ interface TextGroupOptions {
7
+ items: TextItem[];
8
+ defaultStyle?: Partial<ITextStyle>;
9
+ wordWrapWidth?: number;
10
+ paddingX?: number;
11
+ paddingY?: number;
12
+ align?: "left" | "center" | "right";
13
+ anchorX?: number;
14
+ anchorY?: number;
15
+ }
16
+ /** @description 文本组换行 */
17
+ export declare class LibPixiTextGroupWrap extends Container {
18
+ constructor({ items, defaultStyle, wordWrapWidth, paddingX, paddingY, align, anchorX, anchorY, }: TextGroupOptions);
19
+ }
20
+ export {};
@@ -0,0 +1,50 @@
1
+ import { Container, Text } from "pixi.js";
2
+ /** @description 文本组换行 */
3
+ export class LibPixiTextGroupWrap extends Container {
4
+ constructor({ items, defaultStyle = {}, wordWrapWidth, paddingX = 0, paddingY = 0, align = "left", anchorX = 0, anchorY = 0, }) {
5
+ super();
6
+ if (!items.length)
7
+ return;
8
+ const lineGroups = [];
9
+ let currentLine = [];
10
+ let x = 0;
11
+ // 分行
12
+ for (const { text, style = {} } of items) {
13
+ const instance = new Text(text, Object.assign(Object.assign({}, defaultStyle), style));
14
+ const w = instance.width;
15
+ if (wordWrapWidth && x + w > wordWrapWidth && x > 0) {
16
+ lineGroups.push(currentLine);
17
+ currentLine = [];
18
+ x = 0;
19
+ }
20
+ currentLine.push(instance);
21
+ x += w + paddingX;
22
+ }
23
+ if (currentLine.length)
24
+ lineGroups.push(currentLine);
25
+ // 布局每行
26
+ let y = 0;
27
+ for (const line of lineGroups) {
28
+ const totalWidth = line.reduce((sum, i) => sum + i.width + paddingX, -paddingX);
29
+ let offsetX = 0;
30
+ if (align === "center" && wordWrapWidth)
31
+ offsetX = (wordWrapWidth - totalWidth) / 2;
32
+ else if (align === "right" && wordWrapWidth)
33
+ offsetX = wordWrapWidth - totalWidth;
34
+ let currentX = offsetX;
35
+ let maxHeight = 0;
36
+ for (const item of line) {
37
+ item.x = currentX;
38
+ item.y = y;
39
+ this.addChild(item);
40
+ currentX += item.width + paddingX;
41
+ if (item.height > maxHeight)
42
+ maxHeight = item.height;
43
+ }
44
+ y += maxHeight + paddingY;
45
+ }
46
+ // 根据 anchor 调整整体偏移
47
+ const bounds = this.getLocalBounds();
48
+ this.pivot.set(bounds.x + bounds.width * anchorX, bounds.y + bounds.height * anchorY);
49
+ }
50
+ }
package/README.md CHANGED
@@ -919,6 +919,14 @@ const amountContainer = new LibLabelValue({
919
919
 
920
920
  > 基于 `HTML` 输入框实现,失焦时隐藏
921
921
 
922
+ ### LibPixiArrangeLinearV2-线性排列
923
+
924
+ > 从左到右从上到下或从上到下从左到右排列,下一个元素的位置基于上一个元素的坐标及宽度,锚点要求在左边
925
+
926
+ ### LibPixiTextGroupWrap-文本组换行
927
+
928
+ > 内部创建文本类组,公共样式和单个设置样式,并整体支持换行
929
+
922
930
  ## Utils-工具方法
923
931
 
924
932
  ### LibPixiAudio-音频播放器
package/libPixiJs.d.ts CHANGED
@@ -35,6 +35,8 @@ import { LibPixiRoundedRect } from "./Components/Base/LibPixiRoundedRect";
35
35
  import { LibPixiInput } from "./Components/Custom/LibPixiInput";
36
36
  import { LibPixiGridLayoutV2 } from "./Utils/LibPixiGridLayoutV2";
37
37
  import { LibPixiTicker } from "./Utils/LibPixiTicker";
38
+ import { LibPixiArrangeLinearV2 } from "./Components/Custom/LibPixiArrangeLinearV2";
39
+ import { LibPixiTextGroupWrap } from "./Components/Custom/LibPixiTextGroupWrap";
38
40
  /** @description 组件 */
39
41
  export declare const Components: {
40
42
  Base: {
@@ -150,6 +152,10 @@ export declare const Components: {
150
152
  LibPixiTurntable: (num: number, distance: number, layoutCallback: (x: number, y: number, rotation: number, index: number) => void) => void;
151
153
  /** @description 输入框 */
152
154
  LibPixiInput: typeof LibPixiInput;
155
+ /** @description 线性排列 */
156
+ LibPixiArrangeLinearV2: typeof LibPixiArrangeLinearV2;
157
+ /** @description 文本组换行 */
158
+ LibPixiTextGroupWrap: typeof LibPixiTextGroupWrap;
153
159
  };
154
160
  };
155
161
  /** @description 方法 */
package/libPixiJs.js CHANGED
@@ -54,6 +54,8 @@ import { LibPixiRoundedRect } from "./Components/Base/LibPixiRoundedRect";
54
54
  import { LibPixiInput } from "./Components/Custom/LibPixiInput";
55
55
  import { LibPixiGridLayoutV2 } from "./Utils/LibPixiGridLayoutV2";
56
56
  import { LibPixiTicker } from "./Utils/LibPixiTicker";
57
+ import { LibPixiArrangeLinearV2 } from "./Components/Custom/LibPixiArrangeLinearV2";
58
+ import { LibPixiTextGroupWrap } from "./Components/Custom/LibPixiTextGroupWrap";
57
59
  /** @description 组件 */
58
60
  export const Components = {
59
61
  Base: {
@@ -169,6 +171,10 @@ export const Components = {
169
171
  LibPixiTurntable,
170
172
  /** @description 输入框 */
171
173
  LibPixiInput,
174
+ /** @description 线性排列 */
175
+ LibPixiArrangeLinearV2,
176
+ /** @description 文本组换行 */
177
+ LibPixiTextGroupWrap,
172
178
  },
173
179
  };
174
180
  /** @description 方法 */
package/lyb-pixi.js CHANGED
@@ -49335,7 +49335,10 @@ void main(void)\r
49335
49335
  scrollbarWidth = 10,
49336
49336
  scrollbarColor = "#ffffff",
49337
49337
  onScroll,
49338
- bgColor
49338
+ bgColor,
49339
+ maskTexture,
49340
+ maskX = 0,
49341
+ maskY = 0
49339
49342
  } = params;
49340
49343
  super(width, height, bgColor);
49341
49344
  this._startY = 0;
@@ -49355,9 +49358,18 @@ void main(void)\r
49355
49358
  this._content = new Container();
49356
49359
  this.addChild(this._content);
49357
49360
  this._content.addChild(this._scrollContent);
49358
- this._maskGraphics = new LibPixiRectangle(width, height, "#000");
49359
- this.addChild(this._maskGraphics);
49360
- this.mask = this._maskGraphics;
49361
+ if (maskTexture) {
49362
+ this._maskGraphics = new Sprite(maskTexture);
49363
+ this.addChild(this._maskGraphics);
49364
+ this._maskGraphics.width = width;
49365
+ this._maskGraphics.height = height;
49366
+ this._maskGraphics.position.set(maskX, maskY);
49367
+ this.mask = this._maskGraphics;
49368
+ } else {
49369
+ this._maskGraphics = new LibPixiRectangle(width, height, "#000");
49370
+ this.addChild(this._maskGraphics);
49371
+ this.mask = this._maskGraphics;
49372
+ }
49361
49373
  this._scrollbar = new LibPixiRectangle(
49362
49374
  scrollbarWidth,
49363
49375
  height,
@@ -49427,10 +49439,8 @@ void main(void)\r
49427
49439
  * @param height 高度
49428
49440
  */
49429
49441
  setDimensions(width, height) {
49430
- this._maskGraphics.clear();
49431
- this._maskGraphics.beginFill(0);
49432
- this._maskGraphics.drawRect(0, 0, width, height);
49433
- this._maskGraphics.endFill();
49442
+ this._maskGraphics.width = width;
49443
+ this._maskGraphics.height = height;
49434
49444
  this.setSize(width, height);
49435
49445
  this._scrollbar.x = width - (this._scrollbarRgiht || this._scrollbarWidth);
49436
49446
  }
@@ -58401,6 +58411,130 @@ void main(void){
58401
58411
  };
58402
58412
  _LibPixiTicker._callbacks = /* @__PURE__ */ new Map();
58403
58413
  let LibPixiTicker = _LibPixiTicker;
58414
+ class LibPixiArrangeLinearV2 extends Container {
58415
+ constructor(params) {
58416
+ super();
58417
+ this._elementList = [];
58418
+ this._params = params || {};
58419
+ this._elementList = this._params.elementList || [];
58420
+ }
58421
+ /** @description 追加元素 */
58422
+ push(element) {
58423
+ this.addChild(element);
58424
+ this._elementList.push(element);
58425
+ }
58426
+ /** @description 布局 */
58427
+ layout() {
58428
+ const {
58429
+ colNum = this._elementList.length,
58430
+ gap = 10,
58431
+ direction = "x",
58432
+ anchorX = 0,
58433
+ anchorY = 0
58434
+ } = this._params;
58435
+ let lastRowMax = 0;
58436
+ let rowOffset = 0;
58437
+ this._elementList.forEach((item, index) => {
58438
+ const row = Math.floor(index / colNum);
58439
+ const col = index % colNum;
58440
+ if (direction === "x") {
58441
+ const gapValue = Array.isArray(gap) ? gap[index - 1] ?? 0 : gap;
58442
+ if (col === 0 && row > 0) {
58443
+ rowOffset += lastRowMax + gapValue;
58444
+ lastRowMax = 0;
58445
+ }
58446
+ item.x = col === 0 ? 0 : this._elementList[index - 1].x + this._elementList[index - 1].width + gapValue;
58447
+ rowOffset && (item.y = rowOffset);
58448
+ lastRowMax = Math.max(lastRowMax, item.height);
58449
+ } else {
58450
+ const gapValue = Array.isArray(gap) ? gap[index - 1] ?? 0 : gap;
58451
+ if (col === 0 && row > 0) {
58452
+ rowOffset += lastRowMax + gapValue;
58453
+ lastRowMax = 0;
58454
+ }
58455
+ item.y = col === 0 ? 0 : this._elementList[index - 1].y + this._elementList[index - 1].height + gapValue;
58456
+ rowOffset && (item.x = rowOffset);
58457
+ lastRowMax = Math.max(lastRowMax, item.width);
58458
+ }
58459
+ });
58460
+ const bounds = this.getLocalBounds();
58461
+ this.pivot.set(
58462
+ bounds.x + bounds.width * anchorX,
58463
+ bounds.y + bounds.height * anchorY
58464
+ );
58465
+ }
58466
+ /** @description 获取列表元素 */
58467
+ getList() {
58468
+ return this._elementList;
58469
+ }
58470
+ /** @description 销毁列表元素 */
58471
+ destroyList() {
58472
+ this._elementList.forEach((item) => {
58473
+ item.destroy();
58474
+ });
58475
+ this._elementList = [];
58476
+ }
58477
+ }
58478
+ class LibPixiTextGroupWrap extends Container {
58479
+ constructor({
58480
+ items,
58481
+ defaultStyle = {},
58482
+ wordWrapWidth,
58483
+ paddingX = 0,
58484
+ paddingY = 0,
58485
+ align = "left",
58486
+ anchorX = 0,
58487
+ anchorY = 0
58488
+ }) {
58489
+ super();
58490
+ if (!items.length)
58491
+ return;
58492
+ const lineGroups = [];
58493
+ let currentLine = [];
58494
+ let x2 = 0;
58495
+ for (const { text, style = {} } of items) {
58496
+ const instance2 = new Text(text, { ...defaultStyle, ...style });
58497
+ const w2 = instance2.width;
58498
+ if (wordWrapWidth && x2 + w2 > wordWrapWidth && x2 > 0) {
58499
+ lineGroups.push(currentLine);
58500
+ currentLine = [];
58501
+ x2 = 0;
58502
+ }
58503
+ currentLine.push(instance2);
58504
+ x2 += w2 + paddingX;
58505
+ }
58506
+ if (currentLine.length)
58507
+ lineGroups.push(currentLine);
58508
+ let y2 = 0;
58509
+ for (const line of lineGroups) {
58510
+ const totalWidth = line.reduce(
58511
+ (sum2, i2) => sum2 + i2.width + paddingX,
58512
+ -paddingX
58513
+ );
58514
+ let offsetX = 0;
58515
+ if (align === "center" && wordWrapWidth)
58516
+ offsetX = (wordWrapWidth - totalWidth) / 2;
58517
+ else if (align === "right" && wordWrapWidth)
58518
+ offsetX = wordWrapWidth - totalWidth;
58519
+ let currentX = offsetX;
58520
+ let maxHeight = 0;
58521
+ for (const item of line) {
58522
+ item.x = currentX;
58523
+ item.y = y2;
58524
+ this.addChild(item);
58525
+ currentX += item.width + paddingX;
58526
+ if (item.height > maxHeight)
58527
+ maxHeight = item.height;
58528
+ }
58529
+ y2 += maxHeight + paddingY;
58530
+ }
58531
+ const bounds = this.getLocalBounds();
58532
+ this.pivot.set(
58533
+ bounds.x + bounds.width * anchorX,
58534
+ bounds.y + bounds.height * anchorY
58535
+ );
58536
+ }
58537
+ }
58404
58538
  const Components = {
58405
58539
  Base: {
58406
58540
  /** (已废弃)
@@ -58514,7 +58648,11 @@ void main(void){
58514
58648
  /** @description 转盘布局 */
58515
58649
  LibPixiTurntable,
58516
58650
  /** @description 输入框 */
58517
- LibPixiInput
58651
+ LibPixiInput,
58652
+ /** @description 线性排列 */
58653
+ LibPixiArrangeLinearV2,
58654
+ /** @description 文本组换行 */
58655
+ LibPixiTextGroupWrap
58518
58656
  }
58519
58657
  };
58520
58658
  const Utils = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lyb-pixi-js",
3
- "version": "1.12.18",
3
+ "version": "1.12.20",
4
4
  "description": "自用Pixi.JS方法库",
5
5
  "license": "ISC",
6
6
  "exports": {