lyb-pixi-js 1.9.5 → 1.9.7
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/Components/Custom/LibPixiSlide.d.ts +92 -0
- package/Components/Custom/LibPixiSlide.js +281 -0
- package/README.md +38 -0
- package/Utils/LibArrangeLinear.d.ts +9 -0
- package/Utils/LibArrangeLinear.js +29 -0
- package/libPixiJs.d.ts +13 -0
- package/libPixiJs.js +14 -0
- package/lyb-pixi.js +265 -1
- package/package.json +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Container } from "pixi.js";
|
|
2
|
+
import { LibPixiContainer } from "../Base/LibPixiContainer";
|
|
3
|
+
export interface LibPixiSlideParams {
|
|
4
|
+
/** 舞台 */
|
|
5
|
+
stage: Container;
|
|
6
|
+
/** 当前方向 */
|
|
7
|
+
direction: "x" | "y";
|
|
8
|
+
/** 滚动区域宽度 */
|
|
9
|
+
width: number;
|
|
10
|
+
/** 滚动区域高度 */
|
|
11
|
+
height: number;
|
|
12
|
+
/** 一页宽度 */
|
|
13
|
+
pageWidth?: number;
|
|
14
|
+
/** 一页高度 */
|
|
15
|
+
pageHeight?: number;
|
|
16
|
+
/** 滚动的容器 */
|
|
17
|
+
content: Container;
|
|
18
|
+
/** 元素列表 */
|
|
19
|
+
itemList: Container[];
|
|
20
|
+
/** 是否启用循环 */
|
|
21
|
+
loop?: boolean;
|
|
22
|
+
/** 景深定制回调,第二参数函数参数景深衰减值,可视区三个元素时,建议0.5,五个元素时,建议0.2 */
|
|
23
|
+
depthCallback?: (container: Container, getValue: (depthAtten: number) => number) => void;
|
|
24
|
+
/** 松手回调 */
|
|
25
|
+
slideCallback?: (index: number) => void;
|
|
26
|
+
/** 滚动回调 */
|
|
27
|
+
scrollCallback?: (x: number, index: number) => void;
|
|
28
|
+
}
|
|
29
|
+
/** @description 滑动页
|
|
30
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSlide-滑动页
|
|
31
|
+
*/
|
|
32
|
+
export declare class LibPixiSlide extends LibPixiContainer {
|
|
33
|
+
/** 滑动加速度触发翻页 */
|
|
34
|
+
private _SPEED_THRESHOLD;
|
|
35
|
+
/** 滑动比例翻页 */
|
|
36
|
+
private _SCROLL_THRESHOLD;
|
|
37
|
+
/** 当前方向 */
|
|
38
|
+
private _direction;
|
|
39
|
+
/** 元素列表 */
|
|
40
|
+
private _itemList;
|
|
41
|
+
/** 一页宽度 */
|
|
42
|
+
private _pageWidth;
|
|
43
|
+
/** 一页高度 */
|
|
44
|
+
private _pageHeight;
|
|
45
|
+
/** 是否循环 */
|
|
46
|
+
private _loop;
|
|
47
|
+
/** 两侧预留格数,如可视区有三个,则两侧预留为1 */
|
|
48
|
+
private _freeGridNum;
|
|
49
|
+
/** 当前幻灯片索引 */
|
|
50
|
+
private _currentIndex;
|
|
51
|
+
/** 记录拖动开始时的X坐标 */
|
|
52
|
+
private _startX;
|
|
53
|
+
/** 记录拖动开始时的Y坐标 */
|
|
54
|
+
private _startY;
|
|
55
|
+
/** 偏移量 */
|
|
56
|
+
private _offsetX;
|
|
57
|
+
/** 偏移量 */
|
|
58
|
+
private _offsetY;
|
|
59
|
+
/** 最大索引 */
|
|
60
|
+
private _pageNum;
|
|
61
|
+
/** 记录开始时间 */
|
|
62
|
+
private _startTime;
|
|
63
|
+
/** 是否正在拖动 */
|
|
64
|
+
private _isDragging;
|
|
65
|
+
/** 滑动内容 */
|
|
66
|
+
private _slideArea;
|
|
67
|
+
/** 景深定制回调 */
|
|
68
|
+
private _depthCallback?;
|
|
69
|
+
/** 滑动回调 */
|
|
70
|
+
private _slideCallback?;
|
|
71
|
+
/** 滚动回调 */
|
|
72
|
+
private _scrollCallback?;
|
|
73
|
+
constructor(params: LibPixiSlideParams);
|
|
74
|
+
/** @description 更新坐标 */
|
|
75
|
+
updatePosition(v: number, index: number): void;
|
|
76
|
+
/** @description 上一页 */
|
|
77
|
+
prev(): void;
|
|
78
|
+
/** @description 下一页 */
|
|
79
|
+
next(): void;
|
|
80
|
+
/** @description 滑动到指定索引 */
|
|
81
|
+
slideTo(index: number): void;
|
|
82
|
+
/** @description 设置滚动景深 */
|
|
83
|
+
private _setDepth;
|
|
84
|
+
/** @description 开始拖动 */
|
|
85
|
+
private _onDragStart;
|
|
86
|
+
/** @description 拖动中 */
|
|
87
|
+
private _onDragMove;
|
|
88
|
+
/** @description 滚动触发 */
|
|
89
|
+
private _onScroll;
|
|
90
|
+
/** @description 结束拖动 */
|
|
91
|
+
private _onDragEnd;
|
|
92
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { Graphics } from "pixi.js";
|
|
2
|
+
import gsap from "gsap";
|
|
3
|
+
import { LibPixiContainer } from "../Base/LibPixiContainer";
|
|
4
|
+
import { libPixiEvent } from "../../Utils/LibPixiEvent";
|
|
5
|
+
/** @description 滑动页
|
|
6
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSlide-滑动页
|
|
7
|
+
*/
|
|
8
|
+
export class LibPixiSlide extends LibPixiContainer {
|
|
9
|
+
constructor(params) {
|
|
10
|
+
const { stage, width, height, content, depthCallback, slideCallback, scrollCallback, pageWidth = 0, pageHeight = 0, itemList, loop = false, direction, } = params;
|
|
11
|
+
super(width, height);
|
|
12
|
+
/** 滑动加速度触发翻页 */
|
|
13
|
+
this._SPEED_THRESHOLD = 0.35;
|
|
14
|
+
/** 滑动比例翻页 */
|
|
15
|
+
this._SCROLL_THRESHOLD = 0.5;
|
|
16
|
+
/** 一页宽度 */
|
|
17
|
+
this._pageWidth = 0;
|
|
18
|
+
/** 一页高度 */
|
|
19
|
+
this._pageHeight = 0;
|
|
20
|
+
/** 是否循环 */
|
|
21
|
+
this._loop = false;
|
|
22
|
+
/** 两侧预留格数,如可视区有三个,则两侧预留为1 */
|
|
23
|
+
this._freeGridNum = 0;
|
|
24
|
+
/** 当前幻灯片索引 */
|
|
25
|
+
this._currentIndex = 0;
|
|
26
|
+
/** 记录拖动开始时的X坐标 */
|
|
27
|
+
this._startX = 0;
|
|
28
|
+
/** 记录拖动开始时的Y坐标 */
|
|
29
|
+
this._startY = 0;
|
|
30
|
+
/** 偏移量 */
|
|
31
|
+
this._offsetX = 0;
|
|
32
|
+
/** 偏移量 */
|
|
33
|
+
this._offsetY = 0;
|
|
34
|
+
/** 最大索引 */
|
|
35
|
+
this._pageNum = 0;
|
|
36
|
+
/** 记录开始时间 */
|
|
37
|
+
this._startTime = new Date().getTime();
|
|
38
|
+
/** 是否正在拖动 */
|
|
39
|
+
this._isDragging = false;
|
|
40
|
+
const mask = new Graphics();
|
|
41
|
+
mask.beginFill(0xffffff);
|
|
42
|
+
mask.drawRect(0, 0, this.width, this.height);
|
|
43
|
+
mask.endFill();
|
|
44
|
+
this.addChild(mask);
|
|
45
|
+
this.mask = mask;
|
|
46
|
+
this._direction = direction;
|
|
47
|
+
this._pageWidth = pageWidth;
|
|
48
|
+
this._pageHeight = pageHeight;
|
|
49
|
+
this._slideArea = content;
|
|
50
|
+
this._itemList = itemList;
|
|
51
|
+
this._loop = loop;
|
|
52
|
+
this._depthCallback = depthCallback;
|
|
53
|
+
this._slideCallback = slideCallback;
|
|
54
|
+
this._scrollCallback = scrollCallback;
|
|
55
|
+
this._pageNum = itemList.length;
|
|
56
|
+
this.addChild(this._slideArea);
|
|
57
|
+
if (this._direction === "x") {
|
|
58
|
+
this._freeGridNum = Math.floor(width / this._pageWidth / 2);
|
|
59
|
+
this._slideArea.x = this._pageWidth * this._freeGridNum;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
this._freeGridNum = Math.floor(height / pageHeight / 2);
|
|
63
|
+
this._slideArea.y = this._pageHeight * this._freeGridNum;
|
|
64
|
+
}
|
|
65
|
+
this.eventMode = "static";
|
|
66
|
+
this.cursor = "pointer";
|
|
67
|
+
this._setDepth();
|
|
68
|
+
libPixiEvent(this, "pointerdown", this._onDragStart.bind(this));
|
|
69
|
+
libPixiEvent(stage, "pointermove", this._onDragMove.bind(this));
|
|
70
|
+
window.addEventListener("pointerup", this._onDragEnd.bind(this));
|
|
71
|
+
}
|
|
72
|
+
/** @description 更新坐标 */
|
|
73
|
+
updatePosition(v, index) {
|
|
74
|
+
this._currentIndex = index;
|
|
75
|
+
this._setDepth();
|
|
76
|
+
if (this._direction === "x") {
|
|
77
|
+
this._slideArea.x = v;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
this._slideArea.y = v;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/** @description 上一页 */
|
|
84
|
+
prev() {
|
|
85
|
+
this.slideTo(this._currentIndex - 1);
|
|
86
|
+
}
|
|
87
|
+
/** @description 下一页 */
|
|
88
|
+
next() {
|
|
89
|
+
this.slideTo(this._currentIndex + 1);
|
|
90
|
+
}
|
|
91
|
+
/** @description 滑动到指定索引 */
|
|
92
|
+
slideTo(index) {
|
|
93
|
+
var _a;
|
|
94
|
+
this._currentIndex = index;
|
|
95
|
+
//首尾限制
|
|
96
|
+
if (this._currentIndex < 0) {
|
|
97
|
+
if (this._loop) {
|
|
98
|
+
this._currentIndex = this._pageNum - 1;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
this._currentIndex = 0;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else if (this._currentIndex >= this._pageNum) {
|
|
105
|
+
this._currentIndex = this._pageNum;
|
|
106
|
+
if (this._loop) {
|
|
107
|
+
this._currentIndex = 0;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
this._currentIndex--;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (this._direction === "x") {
|
|
114
|
+
gsap.to(this._slideArea, {
|
|
115
|
+
x: -this._currentIndex * this._pageWidth +
|
|
116
|
+
this._pageWidth * this._freeGridNum,
|
|
117
|
+
duration: 0.25,
|
|
118
|
+
onUpdate: () => {
|
|
119
|
+
this._onScroll();
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
gsap.to(this._slideArea, {
|
|
125
|
+
y: -this._currentIndex * this._pageHeight +
|
|
126
|
+
this._pageHeight * this._freeGridNum,
|
|
127
|
+
duration: 0.25,
|
|
128
|
+
onUpdate: () => {
|
|
129
|
+
this._onScroll();
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
// 触发滑动结束回调
|
|
134
|
+
(_a = this._slideCallback) === null || _a === void 0 ? void 0 : _a.call(this, this._currentIndex);
|
|
135
|
+
}
|
|
136
|
+
/** @description 设置滚动景深 */
|
|
137
|
+
_setDepth() {
|
|
138
|
+
if (!this._depthCallback)
|
|
139
|
+
return;
|
|
140
|
+
let t = 0;
|
|
141
|
+
let currentIndex = 0;
|
|
142
|
+
if (this._direction === "x") {
|
|
143
|
+
const x = this._slideArea.x;
|
|
144
|
+
const startX = this._freeGridNum * this._pageWidth;
|
|
145
|
+
//设置起始位置,获取当前绝对坐标
|
|
146
|
+
const absX = Math.abs(x - startX);
|
|
147
|
+
// 根据滑动宽度计算出当前位置对应的索引
|
|
148
|
+
currentIndex = Math.floor(absX / this._pageWidth);
|
|
149
|
+
// 计算当前索引在一页中的比例,越靠近当前索引的x坐标,值越小,范围0-1
|
|
150
|
+
t = (absX % this._pageWidth) / this._pageWidth;
|
|
151
|
+
//如果在起点的时候还在向左滑,则取反,避免distance显示效果计算错误
|
|
152
|
+
if (x - startX > 0) {
|
|
153
|
+
t = -t;
|
|
154
|
+
currentIndex = -currentIndex;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
const y = this._slideArea.y;
|
|
159
|
+
const startY = this._freeGridNum * this._pageHeight;
|
|
160
|
+
//设置起始位置,获取当前绝对坐标
|
|
161
|
+
const absY = Math.abs(y - startY);
|
|
162
|
+
// 根据滑动宽度计算出当前位置对应的索引
|
|
163
|
+
currentIndex = Math.floor(absY / this._pageHeight);
|
|
164
|
+
// 计算当前索引在一页中的比例,越靠近当前索引的x坐标,值越小,范围0-1
|
|
165
|
+
t = (absY % this._pageHeight) / this._pageHeight;
|
|
166
|
+
//如果在起点的时候还在向左滑,则取反,避免distance显示效果计算错误
|
|
167
|
+
if (y - startY > 0) {
|
|
168
|
+
t = -t;
|
|
169
|
+
currentIndex = -currentIndex;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
this._itemList.forEach((item, i) => {
|
|
173
|
+
var _a;
|
|
174
|
+
// 计算当前项与目标索引之间的索引距离
|
|
175
|
+
const distance = Math.abs(i - currentIndex - t);
|
|
176
|
+
(_a = this._depthCallback) === null || _a === void 0 ? void 0 : _a.call(this, item, (depthAtten) => {
|
|
177
|
+
return Math.max(0, 1 - distance * depthAtten);
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/** @description 开始拖动 */
|
|
182
|
+
_onDragStart(event) {
|
|
183
|
+
this._isDragging = true;
|
|
184
|
+
gsap.killTweensOf(this._slideArea);
|
|
185
|
+
this._startTime = new Date().getTime();
|
|
186
|
+
if (this._direction === "x") {
|
|
187
|
+
this._startX = event.global.x;
|
|
188
|
+
this._offsetX = this._slideArea.x;
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
this._startY = event.global.y;
|
|
192
|
+
this._offsetY = this._slideArea.y;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/** @description 拖动中 */
|
|
196
|
+
_onDragMove(event) {
|
|
197
|
+
if (!this._isDragging)
|
|
198
|
+
return;
|
|
199
|
+
if (this._direction === "x") {
|
|
200
|
+
const moveX = event.pageX - this._startX;
|
|
201
|
+
this._slideArea.x = this._offsetX + moveX;
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
const moveY = event.pageY - this._startY;
|
|
205
|
+
this._slideArea.y = this._offsetY + moveY;
|
|
206
|
+
}
|
|
207
|
+
this._onScroll();
|
|
208
|
+
}
|
|
209
|
+
/** @description 滚动触发 */
|
|
210
|
+
_onScroll() {
|
|
211
|
+
var _a, _b;
|
|
212
|
+
this._setDepth();
|
|
213
|
+
if (this._direction === "x") {
|
|
214
|
+
(_a = this._scrollCallback) === null || _a === void 0 ? void 0 : _a.call(this, this._slideArea.x, this._currentIndex);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
(_b = this._scrollCallback) === null || _b === void 0 ? void 0 : _b.call(this, this._slideArea.y, this._currentIndex);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
/** @description 结束拖动 */
|
|
221
|
+
_onDragEnd(event) {
|
|
222
|
+
if (this._direction === "x") {
|
|
223
|
+
if (!this._isDragging)
|
|
224
|
+
return;
|
|
225
|
+
this._isDragging = false;
|
|
226
|
+
//滑动耗时
|
|
227
|
+
const slideTime = new Date().getTime() - this._startTime;
|
|
228
|
+
//滑动距离
|
|
229
|
+
const slide = this._startX - event.pageX;
|
|
230
|
+
//滑动速度
|
|
231
|
+
const slideSpeed = Math.abs(slide) / slideTime;
|
|
232
|
+
//要滑动的页数
|
|
233
|
+
const pageChange = Math.round(slide / this._pageWidth);
|
|
234
|
+
//如果滑动超过阈值,则翻页
|
|
235
|
+
if (Math.abs(slide) > this._pageWidth * this._SCROLL_THRESHOLD) {
|
|
236
|
+
this._currentIndex += pageChange;
|
|
237
|
+
}
|
|
238
|
+
//如果滑动速度大于阈值,则翻页
|
|
239
|
+
else if (slideSpeed > this._SPEED_THRESHOLD) {
|
|
240
|
+
let addIndex = slide / this._pageWidth;
|
|
241
|
+
if (addIndex > 0) {
|
|
242
|
+
addIndex = Math.ceil(addIndex);
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
addIndex = Math.floor(addIndex);
|
|
246
|
+
}
|
|
247
|
+
this._currentIndex += addIndex;
|
|
248
|
+
}
|
|
249
|
+
this.slideTo(this._currentIndex);
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
if (!this._isDragging)
|
|
253
|
+
return;
|
|
254
|
+
this._isDragging = false;
|
|
255
|
+
//滑动耗时
|
|
256
|
+
const slideTime = new Date().getTime() - this._startTime;
|
|
257
|
+
//滑动距离
|
|
258
|
+
const slide = this._startY - event.pageY;
|
|
259
|
+
//滑动速度
|
|
260
|
+
const slideSpeed = Math.abs(slide) / slideTime;
|
|
261
|
+
//要滑动的页数
|
|
262
|
+
const pageChange = Math.round(slide / this._pageHeight);
|
|
263
|
+
//如果滑动超过阈值,则翻页
|
|
264
|
+
if (Math.abs(slide) > this._pageHeight * this._SCROLL_THRESHOLD) {
|
|
265
|
+
this._currentIndex += pageChange;
|
|
266
|
+
}
|
|
267
|
+
//如果滑动速度大于阈值,则翻页
|
|
268
|
+
else if (slideSpeed > this._SPEED_THRESHOLD) {
|
|
269
|
+
let addIndex = slide / this._pageHeight;
|
|
270
|
+
if (addIndex > 0) {
|
|
271
|
+
addIndex = Math.ceil(addIndex);
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
addIndex = Math.floor(addIndex);
|
|
275
|
+
}
|
|
276
|
+
this._currentIndex += addIndex;
|
|
277
|
+
}
|
|
278
|
+
this.slideTo(this._currentIndex);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
package/README.md
CHANGED
|
@@ -120,6 +120,8 @@ app.stage.addChild(box);
|
|
|
120
120
|
|
|
121
121
|
\- [LibPixiSlider-横向滑动图](#LibPixiSlider-横向滑动图)
|
|
122
122
|
|
|
123
|
+
\- [LibPixiSlide-滑动页](#LibPixiSlide-滑动页)
|
|
124
|
+
|
|
123
125
|
\- [LibPixiSubAddMinMax-数字控制器](#LibPixiSubAddMinMax-数字控制器)
|
|
124
126
|
|
|
125
127
|
\- [LibPixiTable-数字表格](#LibPixiTable-数字表格)
|
|
@@ -162,6 +164,8 @@ app.stage.addChild(box);
|
|
|
162
164
|
|
|
163
165
|
\- [LibPixiGridLayout-网格布局](#LibPixiGridLayout-网格布局)
|
|
164
166
|
|
|
167
|
+
\- [LibArrangeLinear-间隔布局](#LibArrangeLinear-间隔布局)
|
|
168
|
+
|
|
165
169
|
## Base-基础
|
|
166
170
|
|
|
167
171
|
### LibPixiText-文本
|
|
@@ -787,6 +791,32 @@ slider.prev();
|
|
|
787
791
|
slider.next();
|
|
788
792
|
```
|
|
789
793
|
|
|
794
|
+
### LibPixiSlide-滑动页
|
|
795
|
+
|
|
796
|
+
> `LibPixiSlider-横向滑动图`和`LibPixiScrollNum-数字滑动`的替代品,支持`X`和`Y`配置,景深
|
|
797
|
+
|
|
798
|
+
```ts
|
|
799
|
+
const three = new LibPixiSlide({
|
|
800
|
+
stage: gameMount.gameStage,
|
|
801
|
+
direction: "y",
|
|
802
|
+
width: 255,
|
|
803
|
+
height: 320,
|
|
804
|
+
pageHeight: 70,
|
|
805
|
+
content: threeList,
|
|
806
|
+
itemList: threeTextList,
|
|
807
|
+
|
|
808
|
+
scrollCallback: (y, index) => {
|
|
809
|
+
two.updatePosition(y, index);
|
|
810
|
+
},
|
|
811
|
+
depthCallback(container, getValue) {
|
|
812
|
+
const alpha = getValue(0.4);
|
|
813
|
+
const scaleY = getValue(0.1);
|
|
814
|
+
container.alpha = alpha;
|
|
815
|
+
container.scale.y = scaleY;
|
|
816
|
+
},
|
|
817
|
+
});
|
|
818
|
+
```
|
|
819
|
+
|
|
790
820
|
### LibPixiSubAddMinMax-数字控制器
|
|
791
821
|
|
|
792
822
|
> 最小、最大按钮和增减按钮功能及置灰逻辑
|
|
@@ -1164,3 +1194,11 @@ LibPixiDownScaleAnimation(sprite);
|
|
|
1164
1194
|
LibPixiGridLayout(cardList, 20, 3); //间隔20,一行三个
|
|
1165
1195
|
```
|
|
1166
1196
|
|
|
1197
|
+
### LibArrangeLinear-间隔布局
|
|
1198
|
+
|
|
1199
|
+
> 按照指定方向(水平或垂直)排列元素,支持固定间隔或自定义每个间隔
|
|
1200
|
+
|
|
1201
|
+
```ts
|
|
1202
|
+
LibArrangeLinear(cardList, 20, "y"); //间隔20,y轴排列
|
|
1203
|
+
```
|
|
1204
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Container } from "pixi.js";
|
|
2
|
+
/**
|
|
3
|
+
* @description 按照指定方向(水平或垂直)排列元素,支持固定间隔或自定义每个间隔。
|
|
4
|
+
* @param items 要排列的元素数组。
|
|
5
|
+
* @param gap 元素之间的间隔,可以是固定间隔或自定义的间隔数组。
|
|
6
|
+
* @param direction 排列方向,"x"表示水平,"y"表示垂直,默认为水平。
|
|
7
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibArrangeLinear-间隔布局
|
|
8
|
+
*/
|
|
9
|
+
export declare const LibArrangeLinear: (items: Container[], gap: number | number[], direction?: "x" | "y") => void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description 按照指定方向(水平或垂直)排列元素,支持固定间隔或自定义每个间隔。
|
|
3
|
+
* @param items 要排列的元素数组。
|
|
4
|
+
* @param gap 元素之间的间隔,可以是固定间隔或自定义的间隔数组。
|
|
5
|
+
* @param direction 排列方向,"x"表示水平,"y"表示垂直,默认为水平。
|
|
6
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibArrangeLinear-间隔布局
|
|
7
|
+
*/
|
|
8
|
+
export const LibArrangeLinear = (items, gap, direction = "x") => {
|
|
9
|
+
if (Array.isArray(gap)) {
|
|
10
|
+
if (gap.length !== items.length - 1) {
|
|
11
|
+
console.error(new Error("间隔的数组长度只能等于元素数组长度-1"));
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
let lastPosition = 0;
|
|
16
|
+
items.forEach((item, index) => {
|
|
17
|
+
const position = index === 0
|
|
18
|
+
? 0
|
|
19
|
+
: lastPosition + (Array.isArray(gap) ? gap[index - 1] : gap);
|
|
20
|
+
if (direction === "x") {
|
|
21
|
+
item.x = position;
|
|
22
|
+
lastPosition = item.x + item.width;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
item.y = position;
|
|
26
|
+
lastPosition = item.y + item.height;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
};
|
package/libPixiJs.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ import { LibPixiHtmlText } from "./Components/Base/LibPixiHtmlText";
|
|
|
23
23
|
import { LibPixiRectangle } from "./Components/Base/LibPixiRectangle";
|
|
24
24
|
import { LibPixiPolygon } from "./Components/Base/LibPixiPolygon";
|
|
25
25
|
import { LibPixiCircular } from "./Components/Base/LibPixiCircular";
|
|
26
|
+
import { LibPixiSlide } from "./Components/Custom/LibPixiSlide";
|
|
26
27
|
/** @description 组件 */
|
|
27
28
|
export declare const Components: {
|
|
28
29
|
Base: {
|
|
@@ -104,6 +105,10 @@ export declare const Components: {
|
|
|
104
105
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSlider-横向滑动图
|
|
105
106
|
*/
|
|
106
107
|
LibPixiSlider: typeof LibPixiSlider;
|
|
108
|
+
/** @description 滑动页
|
|
109
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSlide-滑动页
|
|
110
|
+
*/
|
|
111
|
+
LibPixiSlide: typeof LibPixiSlide;
|
|
107
112
|
/** @description 最小、最大按钮和增减按钮功能及置灰逻辑
|
|
108
113
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSubAddMinMax-数字控制器
|
|
109
114
|
*/
|
|
@@ -212,4 +217,12 @@ export declare const Utils: {
|
|
|
212
217
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiGridLayout-网格布局
|
|
213
218
|
*/
|
|
214
219
|
LibPixiGridLayout: (items: import("pixi.js").Container[], gap: number, cols?: number) => void;
|
|
220
|
+
/**
|
|
221
|
+
* @description 按照指定方向(水平或垂直)排列元素,支持固定间隔或自定义每个间隔。
|
|
222
|
+
* @param items 要排列的元素数组。
|
|
223
|
+
* @param gap 元素之间的间隔,可以是固定间隔或自定义的间隔数组。
|
|
224
|
+
* @param direction 排列方向,"x"表示水平,"y"表示垂直,默认为水平。
|
|
225
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibArrangeLinear-间隔布局
|
|
226
|
+
*/
|
|
227
|
+
LibArrangeLinear: (items: import("pixi.js").Container[], gap: number | number[], direction?: "x" | "y") => void;
|
|
215
228
|
};
|
package/libPixiJs.js
CHANGED
|
@@ -36,6 +36,8 @@ import { LibPixiCircular } from "./Components/Base/LibPixiCircular";
|
|
|
36
36
|
import { LibPixiDigitalIncreasingAnimation } from "./Utils/LibPixiDigitalIncreasingAnimation";
|
|
37
37
|
import { LibPixiDownScaleAnimation } from "./Utils/LibPixiDownScaleAnimation";
|
|
38
38
|
import { LibPixiGridLayout } from "./Utils/LibPixiGridLayout";
|
|
39
|
+
import { LibArrangeLinear } from "./Utils/LibArrangeLinear";
|
|
40
|
+
import { LibPixiSlide } from "./Components/Custom/LibPixiSlide";
|
|
39
41
|
/** @description 组件 */
|
|
40
42
|
export const Components = {
|
|
41
43
|
Base: {
|
|
@@ -117,6 +119,10 @@ export const Components = {
|
|
|
117
119
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSlider-横向滑动图
|
|
118
120
|
*/
|
|
119
121
|
LibPixiSlider,
|
|
122
|
+
/** @description 滑动页
|
|
123
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSlide-滑动页
|
|
124
|
+
*/
|
|
125
|
+
LibPixiSlide,
|
|
120
126
|
/** @description 最小、最大按钮和增减按钮功能及置灰逻辑
|
|
121
127
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSubAddMinMax-数字控制器
|
|
122
128
|
*/
|
|
@@ -225,4 +231,12 @@ export const Utils = {
|
|
|
225
231
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiGridLayout-网格布局
|
|
226
232
|
*/
|
|
227
233
|
LibPixiGridLayout,
|
|
234
|
+
/**
|
|
235
|
+
* @description 按照指定方向(水平或垂直)排列元素,支持固定间隔或自定义每个间隔。
|
|
236
|
+
* @param items 要排列的元素数组。
|
|
237
|
+
* @param gap 元素之间的间隔,可以是固定间隔或自定义的间隔数组。
|
|
238
|
+
* @param direction 排列方向,"x"表示水平,"y"表示垂直,默认为水平。
|
|
239
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibArrangeLinear-间隔布局
|
|
240
|
+
*/
|
|
241
|
+
LibArrangeLinear,
|
|
228
242
|
};
|
package/lyb-pixi.js
CHANGED
|
@@ -55124,6 +55124,258 @@ void main(void){
|
|
|
55124
55124
|
}
|
|
55125
55125
|
});
|
|
55126
55126
|
};
|
|
55127
|
+
const LibArrangeLinear = (items, gap, direction = "x") => {
|
|
55128
|
+
if (Array.isArray(gap)) {
|
|
55129
|
+
if (gap.length !== items.length - 1) {
|
|
55130
|
+
console.error(new Error("间隔的数组长度只能等于元素数组长度-1"));
|
|
55131
|
+
return;
|
|
55132
|
+
}
|
|
55133
|
+
}
|
|
55134
|
+
let lastPosition = 0;
|
|
55135
|
+
items.forEach((item, index) => {
|
|
55136
|
+
const position = index === 0 ? 0 : lastPosition + (Array.isArray(gap) ? gap[index - 1] : gap);
|
|
55137
|
+
if (direction === "x") {
|
|
55138
|
+
item.x = position;
|
|
55139
|
+
lastPosition = item.x + item.width;
|
|
55140
|
+
} else {
|
|
55141
|
+
item.y = position;
|
|
55142
|
+
lastPosition = item.y + item.height;
|
|
55143
|
+
}
|
|
55144
|
+
});
|
|
55145
|
+
};
|
|
55146
|
+
class LibPixiSlide extends LibPixiContainer {
|
|
55147
|
+
constructor(params) {
|
|
55148
|
+
const {
|
|
55149
|
+
stage,
|
|
55150
|
+
width,
|
|
55151
|
+
height,
|
|
55152
|
+
content,
|
|
55153
|
+
depthCallback,
|
|
55154
|
+
slideCallback,
|
|
55155
|
+
scrollCallback,
|
|
55156
|
+
pageWidth = 0,
|
|
55157
|
+
pageHeight = 0,
|
|
55158
|
+
itemList,
|
|
55159
|
+
loop = false,
|
|
55160
|
+
direction
|
|
55161
|
+
} = params;
|
|
55162
|
+
super(width, height);
|
|
55163
|
+
this._SPEED_THRESHOLD = 0.35;
|
|
55164
|
+
this._SCROLL_THRESHOLD = 0.5;
|
|
55165
|
+
this._pageWidth = 0;
|
|
55166
|
+
this._pageHeight = 0;
|
|
55167
|
+
this._loop = false;
|
|
55168
|
+
this._freeGridNum = 0;
|
|
55169
|
+
this._currentIndex = 0;
|
|
55170
|
+
this._startX = 0;
|
|
55171
|
+
this._startY = 0;
|
|
55172
|
+
this._offsetX = 0;
|
|
55173
|
+
this._offsetY = 0;
|
|
55174
|
+
this._pageNum = 0;
|
|
55175
|
+
this._startTime = (/* @__PURE__ */ new Date()).getTime();
|
|
55176
|
+
this._isDragging = false;
|
|
55177
|
+
const mask = new Graphics();
|
|
55178
|
+
mask.beginFill(16777215);
|
|
55179
|
+
mask.drawRect(0, 0, this.width, this.height);
|
|
55180
|
+
mask.endFill();
|
|
55181
|
+
this.addChild(mask);
|
|
55182
|
+
this.mask = mask;
|
|
55183
|
+
this._direction = direction;
|
|
55184
|
+
this._pageWidth = pageWidth;
|
|
55185
|
+
this._pageHeight = pageHeight;
|
|
55186
|
+
this._slideArea = content;
|
|
55187
|
+
this._itemList = itemList;
|
|
55188
|
+
this._loop = loop;
|
|
55189
|
+
this._depthCallback = depthCallback;
|
|
55190
|
+
this._slideCallback = slideCallback;
|
|
55191
|
+
this._scrollCallback = scrollCallback;
|
|
55192
|
+
this._pageNum = itemList.length;
|
|
55193
|
+
this.addChild(this._slideArea);
|
|
55194
|
+
if (this._direction === "x") {
|
|
55195
|
+
this._freeGridNum = Math.floor(width / this._pageWidth / 2);
|
|
55196
|
+
this._slideArea.x = this._pageWidth * this._freeGridNum;
|
|
55197
|
+
} else {
|
|
55198
|
+
this._freeGridNum = Math.floor(height / pageHeight / 2);
|
|
55199
|
+
this._slideArea.y = this._pageHeight * this._freeGridNum;
|
|
55200
|
+
}
|
|
55201
|
+
this.eventMode = "static";
|
|
55202
|
+
this.cursor = "pointer";
|
|
55203
|
+
this._setDepth();
|
|
55204
|
+
libPixiEvent(this, "pointerdown", this._onDragStart.bind(this));
|
|
55205
|
+
libPixiEvent(stage, "pointermove", this._onDragMove.bind(this));
|
|
55206
|
+
window.addEventListener("pointerup", this._onDragEnd.bind(this));
|
|
55207
|
+
}
|
|
55208
|
+
/** @description 更新坐标 */
|
|
55209
|
+
updatePosition(v2, index) {
|
|
55210
|
+
this._currentIndex = index;
|
|
55211
|
+
this._setDepth();
|
|
55212
|
+
if (this._direction === "x") {
|
|
55213
|
+
this._slideArea.x = v2;
|
|
55214
|
+
} else {
|
|
55215
|
+
this._slideArea.y = v2;
|
|
55216
|
+
}
|
|
55217
|
+
}
|
|
55218
|
+
/** @description 上一页 */
|
|
55219
|
+
prev() {
|
|
55220
|
+
this.slideTo(this._currentIndex - 1);
|
|
55221
|
+
}
|
|
55222
|
+
/** @description 下一页 */
|
|
55223
|
+
next() {
|
|
55224
|
+
this.slideTo(this._currentIndex + 1);
|
|
55225
|
+
}
|
|
55226
|
+
/** @description 滑动到指定索引 */
|
|
55227
|
+
slideTo(index) {
|
|
55228
|
+
var _a;
|
|
55229
|
+
this._currentIndex = index;
|
|
55230
|
+
if (this._currentIndex < 0) {
|
|
55231
|
+
if (this._loop) {
|
|
55232
|
+
this._currentIndex = this._pageNum - 1;
|
|
55233
|
+
} else {
|
|
55234
|
+
this._currentIndex = 0;
|
|
55235
|
+
}
|
|
55236
|
+
} else if (this._currentIndex >= this._pageNum) {
|
|
55237
|
+
this._currentIndex = this._pageNum;
|
|
55238
|
+
if (this._loop) {
|
|
55239
|
+
this._currentIndex = 0;
|
|
55240
|
+
} else {
|
|
55241
|
+
this._currentIndex--;
|
|
55242
|
+
}
|
|
55243
|
+
}
|
|
55244
|
+
if (this._direction === "x") {
|
|
55245
|
+
gsapWithCSS.to(this._slideArea, {
|
|
55246
|
+
x: -this._currentIndex * this._pageWidth + this._pageWidth * this._freeGridNum,
|
|
55247
|
+
duration: 0.25,
|
|
55248
|
+
onUpdate: () => {
|
|
55249
|
+
this._onScroll();
|
|
55250
|
+
}
|
|
55251
|
+
});
|
|
55252
|
+
} else {
|
|
55253
|
+
gsapWithCSS.to(this._slideArea, {
|
|
55254
|
+
y: -this._currentIndex * this._pageHeight + this._pageHeight * this._freeGridNum,
|
|
55255
|
+
duration: 0.25,
|
|
55256
|
+
onUpdate: () => {
|
|
55257
|
+
this._onScroll();
|
|
55258
|
+
}
|
|
55259
|
+
});
|
|
55260
|
+
}
|
|
55261
|
+
(_a = this._slideCallback) == null ? void 0 : _a.call(this, this._currentIndex);
|
|
55262
|
+
}
|
|
55263
|
+
/** @description 设置滚动景深 */
|
|
55264
|
+
_setDepth() {
|
|
55265
|
+
if (!this._depthCallback)
|
|
55266
|
+
return;
|
|
55267
|
+
let t2 = 0;
|
|
55268
|
+
let currentIndex = 0;
|
|
55269
|
+
if (this._direction === "x") {
|
|
55270
|
+
const x2 = this._slideArea.x;
|
|
55271
|
+
const startX = this._freeGridNum * this._pageWidth;
|
|
55272
|
+
const absX = Math.abs(x2 - startX);
|
|
55273
|
+
currentIndex = Math.floor(absX / this._pageWidth);
|
|
55274
|
+
t2 = absX % this._pageWidth / this._pageWidth;
|
|
55275
|
+
if (x2 - startX > 0) {
|
|
55276
|
+
t2 = -t2;
|
|
55277
|
+
currentIndex = -currentIndex;
|
|
55278
|
+
}
|
|
55279
|
+
} else {
|
|
55280
|
+
const y2 = this._slideArea.y;
|
|
55281
|
+
const startY = this._freeGridNum * this._pageHeight;
|
|
55282
|
+
const absY = Math.abs(y2 - startY);
|
|
55283
|
+
currentIndex = Math.floor(absY / this._pageHeight);
|
|
55284
|
+
t2 = absY % this._pageHeight / this._pageHeight;
|
|
55285
|
+
if (y2 - startY > 0) {
|
|
55286
|
+
t2 = -t2;
|
|
55287
|
+
currentIndex = -currentIndex;
|
|
55288
|
+
}
|
|
55289
|
+
}
|
|
55290
|
+
this._itemList.forEach((item, i2) => {
|
|
55291
|
+
var _a;
|
|
55292
|
+
const distance = Math.abs(i2 - currentIndex - t2);
|
|
55293
|
+
(_a = this._depthCallback) == null ? void 0 : _a.call(this, item, (depthAtten) => {
|
|
55294
|
+
return Math.max(0, 1 - distance * depthAtten);
|
|
55295
|
+
});
|
|
55296
|
+
});
|
|
55297
|
+
}
|
|
55298
|
+
/** @description 开始拖动 */
|
|
55299
|
+
_onDragStart(event) {
|
|
55300
|
+
this._isDragging = true;
|
|
55301
|
+
gsapWithCSS.killTweensOf(this._slideArea);
|
|
55302
|
+
this._startTime = (/* @__PURE__ */ new Date()).getTime();
|
|
55303
|
+
if (this._direction === "x") {
|
|
55304
|
+
this._startX = event.global.x;
|
|
55305
|
+
this._offsetX = this._slideArea.x;
|
|
55306
|
+
} else {
|
|
55307
|
+
this._startY = event.global.y;
|
|
55308
|
+
this._offsetY = this._slideArea.y;
|
|
55309
|
+
}
|
|
55310
|
+
}
|
|
55311
|
+
/** @description 拖动中 */
|
|
55312
|
+
_onDragMove(event) {
|
|
55313
|
+
if (!this._isDragging)
|
|
55314
|
+
return;
|
|
55315
|
+
if (this._direction === "x") {
|
|
55316
|
+
const moveX = event.pageX - this._startX;
|
|
55317
|
+
this._slideArea.x = this._offsetX + moveX;
|
|
55318
|
+
} else {
|
|
55319
|
+
const moveY = event.pageY - this._startY;
|
|
55320
|
+
this._slideArea.y = this._offsetY + moveY;
|
|
55321
|
+
}
|
|
55322
|
+
this._onScroll();
|
|
55323
|
+
}
|
|
55324
|
+
/** @description 滚动触发 */
|
|
55325
|
+
_onScroll() {
|
|
55326
|
+
var _a, _b;
|
|
55327
|
+
this._setDepth();
|
|
55328
|
+
if (this._direction === "x") {
|
|
55329
|
+
(_a = this._scrollCallback) == null ? void 0 : _a.call(this, this._slideArea.x, this._currentIndex);
|
|
55330
|
+
} else {
|
|
55331
|
+
(_b = this._scrollCallback) == null ? void 0 : _b.call(this, this._slideArea.y, this._currentIndex);
|
|
55332
|
+
}
|
|
55333
|
+
}
|
|
55334
|
+
/** @description 结束拖动 */
|
|
55335
|
+
_onDragEnd(event) {
|
|
55336
|
+
if (this._direction === "x") {
|
|
55337
|
+
if (!this._isDragging)
|
|
55338
|
+
return;
|
|
55339
|
+
this._isDragging = false;
|
|
55340
|
+
const slideTime = (/* @__PURE__ */ new Date()).getTime() - this._startTime;
|
|
55341
|
+
const slide = this._startX - event.pageX;
|
|
55342
|
+
const slideSpeed = Math.abs(slide) / slideTime;
|
|
55343
|
+
const pageChange = Math.round(slide / this._pageWidth);
|
|
55344
|
+
if (Math.abs(slide) > this._pageWidth * this._SCROLL_THRESHOLD) {
|
|
55345
|
+
this._currentIndex += pageChange;
|
|
55346
|
+
} else if (slideSpeed > this._SPEED_THRESHOLD) {
|
|
55347
|
+
let addIndex = slide / this._pageWidth;
|
|
55348
|
+
if (addIndex > 0) {
|
|
55349
|
+
addIndex = Math.ceil(addIndex);
|
|
55350
|
+
} else {
|
|
55351
|
+
addIndex = Math.floor(addIndex);
|
|
55352
|
+
}
|
|
55353
|
+
this._currentIndex += addIndex;
|
|
55354
|
+
}
|
|
55355
|
+
this.slideTo(this._currentIndex);
|
|
55356
|
+
} else {
|
|
55357
|
+
if (!this._isDragging)
|
|
55358
|
+
return;
|
|
55359
|
+
this._isDragging = false;
|
|
55360
|
+
const slideTime = (/* @__PURE__ */ new Date()).getTime() - this._startTime;
|
|
55361
|
+
const slide = this._startY - event.pageY;
|
|
55362
|
+
const slideSpeed = Math.abs(slide) / slideTime;
|
|
55363
|
+
const pageChange = Math.round(slide / this._pageHeight);
|
|
55364
|
+
if (Math.abs(slide) > this._pageHeight * this._SCROLL_THRESHOLD) {
|
|
55365
|
+
this._currentIndex += pageChange;
|
|
55366
|
+
} else if (slideSpeed > this._SPEED_THRESHOLD) {
|
|
55367
|
+
let addIndex = slide / this._pageHeight;
|
|
55368
|
+
if (addIndex > 0) {
|
|
55369
|
+
addIndex = Math.ceil(addIndex);
|
|
55370
|
+
} else {
|
|
55371
|
+
addIndex = Math.floor(addIndex);
|
|
55372
|
+
}
|
|
55373
|
+
this._currentIndex += addIndex;
|
|
55374
|
+
}
|
|
55375
|
+
this.slideTo(this._currentIndex);
|
|
55376
|
+
}
|
|
55377
|
+
}
|
|
55378
|
+
}
|
|
55127
55379
|
const Components = {
|
|
55128
55380
|
Base: {
|
|
55129
55381
|
/** @description 自定义位图文本
|
|
@@ -55204,6 +55456,10 @@ void main(void){
|
|
|
55204
55456
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSlider-横向滑动图
|
|
55205
55457
|
*/
|
|
55206
55458
|
LibPixiSlider,
|
|
55459
|
+
/** @description 滑动页
|
|
55460
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSlide-滑动页
|
|
55461
|
+
*/
|
|
55462
|
+
LibPixiSlide,
|
|
55207
55463
|
/** @description 最小、最大按钮和增减按钮功能及置灰逻辑
|
|
55208
55464
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSubAddMinMax-数字控制器
|
|
55209
55465
|
*/
|
|
@@ -55310,7 +55566,15 @@ void main(void){
|
|
|
55310
55566
|
* @param cols 网格的列数,默认为元素数量
|
|
55311
55567
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiGridLayout-网格布局
|
|
55312
55568
|
*/
|
|
55313
|
-
LibPixiGridLayout
|
|
55569
|
+
LibPixiGridLayout,
|
|
55570
|
+
/**
|
|
55571
|
+
* @description 按照指定方向(水平或垂直)排列元素,支持固定间隔或自定义每个间隔。
|
|
55572
|
+
* @param items 要排列的元素数组。
|
|
55573
|
+
* @param gap 元素之间的间隔,可以是固定间隔或自定义的间隔数组。
|
|
55574
|
+
* @param direction 排列方向,"x"表示水平,"y"表示垂直,默认为水平。
|
|
55575
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibArrangeLinear-间隔布局
|
|
55576
|
+
*/
|
|
55577
|
+
LibArrangeLinear
|
|
55314
55578
|
};
|
|
55315
55579
|
const LibPixiJs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
55316
55580
|
__proto__: null,
|