lyb-pixi-js 1.11.32 → 1.12.0
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/Base/LibPixiArc.d.ts +16 -0
- package/Components/Base/LibPixiArc.js +14 -0
- package/Components/Base/LibPixiOval.d.ts +5 -0
- package/Components/Base/LibPixiOval.js +10 -0
- package/Components/Base/LibPixiRound.d.ts +5 -0
- package/Components/Base/LibPixiRound.js +9 -0
- package/Components/Base/LibPixiRoundedRect.d.ts +5 -0
- package/Components/Base/LibPixiRoundedRect.js +10 -0
- package/Components/Custom/LibPixiScrollNum.js +1 -1
- package/Components/Custom/LibPixiTurntable.d.ts +6 -0
- package/Components/Custom/LibPixiTurntable.js +14 -0
- package/README.md +62 -27
- package/Utils/LibPixiDialogManager/ui/LibPixiDialog.js +1 -1
- package/libPixiJs.d.ts +52 -32
- package/libPixiJs.js +53 -32
- package/lyb-pixi.js +299 -251
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Graphics } from "pixi.js";
|
|
2
|
+
interface Params {
|
|
3
|
+
start: number;
|
|
4
|
+
end: number;
|
|
5
|
+
radius: number;
|
|
6
|
+
color: string;
|
|
7
|
+
strokeColor?: string;
|
|
8
|
+
thickness?: number;
|
|
9
|
+
alpha?: number;
|
|
10
|
+
anticlockwise?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** @description 弧形 */
|
|
13
|
+
export declare class LibPixiArc extends Graphics {
|
|
14
|
+
constructor(params: Params);
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Graphics } from "pixi.js";
|
|
2
|
+
/** @description 弧形 */
|
|
3
|
+
export class LibPixiArc extends Graphics {
|
|
4
|
+
constructor(params) {
|
|
5
|
+
super();
|
|
6
|
+
const { start, end, radius, color, strokeColor, thickness, alpha = 1, anticlockwise = false } = params;
|
|
7
|
+
this.beginFill(color, alpha); // 半透明绿色填充
|
|
8
|
+
strokeColor && this.lineStyle(thickness, strokeColor); // 线宽为2,红色
|
|
9
|
+
this.moveTo(0, 0);
|
|
10
|
+
this.arc(0, 0, radius, start, end, anticlockwise);
|
|
11
|
+
this.closePath();
|
|
12
|
+
this.endFill();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Graphics } from "pixi.js";
|
|
2
|
+
/** @description 圆角矩形 */
|
|
3
|
+
export class LibPixiRoundedRect extends Graphics {
|
|
4
|
+
constructor(width, height, radius, color) {
|
|
5
|
+
super();
|
|
6
|
+
this.beginFill(color);
|
|
7
|
+
this.drawRoundedRect(0, 0, width, height, radius);
|
|
8
|
+
this.endFill();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Graphics } from "pixi.js";
|
|
2
2
|
import gsap from "gsap";
|
|
3
3
|
import { LibPixiContainer } from "../Base/LibPixiContainer";
|
|
4
|
-
import { LibJsLerp } from "lyb-js/Math/LibJsLerp";
|
|
4
|
+
import { LibJsLerp } from "lyb-js/Math/LibJsLerp.js";
|
|
5
5
|
/** @description 通过鼠标或手指拖动数字列选择数字
|
|
6
6
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiScrollNum-数字滑动
|
|
7
7
|
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { libJsConvertAngle } from "lyb-js/Math/LibJsConvertAngle.js";
|
|
2
|
+
/** @description 转盘布局
|
|
3
|
+
* @param num 份数
|
|
4
|
+
* @param distance 中心距离
|
|
5
|
+
* @param layoutCallback 定位计算回调
|
|
6
|
+
*/
|
|
7
|
+
export const LibPixiTurntable = (num, distance, layoutCallback) => {
|
|
8
|
+
for (let i = 0; i < num; i++) {
|
|
9
|
+
const rotation = libJsConvertAngle((360 / num) * i, "rad");
|
|
10
|
+
const cos = Math.cos(rotation + libJsConvertAngle(-90, "rad"));
|
|
11
|
+
const sin = Math.sin(rotation + libJsConvertAngle(-90, "rad"));
|
|
12
|
+
layoutCallback(cos * distance, sin * distance, rotation, i);
|
|
13
|
+
}
|
|
14
|
+
};
|
package/README.md
CHANGED
|
@@ -343,6 +343,28 @@ const polygonVertices = new LibPixiPolygon(
|
|
|
343
343
|
const libPixiCircular = new LibPixiCircular(100, "#fff");
|
|
344
344
|
```
|
|
345
345
|
|
|
346
|
+
### LibPixiCapsule-胶囊体
|
|
347
|
+
|
|
348
|
+
> 胶囊形状图形
|
|
349
|
+
|
|
350
|
+
### LibPixiTriangle-三角形
|
|
351
|
+
|
|
352
|
+
> 三角形
|
|
353
|
+
|
|
354
|
+
### LibPixiArc-弧形
|
|
355
|
+
|
|
356
|
+
> 扇形
|
|
357
|
+
|
|
358
|
+
### LibPixiOval-椭圆
|
|
359
|
+
|
|
360
|
+
> 椭圆
|
|
361
|
+
|
|
362
|
+
### LibPixiRound-圆圈
|
|
363
|
+
|
|
364
|
+
> 圆圈
|
|
365
|
+
|
|
366
|
+
### LibPixiRoundedRect-圆角矩形
|
|
367
|
+
|
|
346
368
|
### LibPixiSpine-动画
|
|
347
369
|
|
|
348
370
|
> 自定义 Spine 动画,内置挂点
|
|
@@ -765,33 +787,34 @@ scrollNum.slideTo(2);
|
|
|
765
787
|
|
|
766
788
|
> 类似轮播图,但是不会自动轮播
|
|
767
789
|
|
|
768
|
-
```ts
|
|
769
|
-
import { Container } from "pixi.js";
|
|
770
|
-
import { LibPixiSlider } from "./path/to/LibPixiSlider";
|
|
771
|
-
|
|
772
|
-
//创建滑动内容容器
|
|
773
|
-
const slideContent = new Container();
|
|
774
|
-
//在这里添加幻灯片内容,例如图片、文本等
|
|
775
|
-
//slideContent.addChild(someImageOrText);
|
|
776
|
-
|
|
777
|
-
//创建幻灯片
|
|
778
|
-
const slider = new LibPixiSlider({
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
});
|
|
787
|
-
|
|
788
|
-
//将幻灯片添加到场景
|
|
789
|
-
app.stage.addChild(slider);
|
|
790
|
-
|
|
791
|
-
//手动滑动到上一页或下一页
|
|
792
|
-
slider.prev();
|
|
793
|
-
slider.next();
|
|
794
|
-
```
|
|
790
|
+
> ```ts
|
|
791
|
+
> import { Container } from "pixi.js";
|
|
792
|
+
> import { LibPixiSlider } from "./path/to/LibPixiSlider";
|
|
793
|
+
>
|
|
794
|
+
> //创建滑动内容容器
|
|
795
|
+
> const slideContent = new Container();
|
|
796
|
+
> //在这里添加幻灯片内容,例如图片、文本等
|
|
797
|
+
> //slideContent.addChild(someImageOrText);
|
|
798
|
+
>
|
|
799
|
+
> //创建幻灯片
|
|
800
|
+
> const slider = new LibPixiSlider({
|
|
801
|
+
> width: 400,
|
|
802
|
+
> height: 300,
|
|
803
|
+
> slideContent,
|
|
804
|
+
> enableDepth: true,
|
|
805
|
+
> slideCallback: (pageIndex, pageNum) => {
|
|
806
|
+
> console.log(`当前页: ${pageIndex + 1} / ${pageNum + 1}`);
|
|
807
|
+
> },
|
|
808
|
+
> });
|
|
809
|
+
>
|
|
810
|
+
> //将幻灯片添加到场景
|
|
811
|
+
> app.stage.addChild(slider);
|
|
812
|
+
>
|
|
813
|
+
> //手动滑动到上一页或下一页
|
|
814
|
+
> slider.prev();
|
|
815
|
+
> slider.next();
|
|
816
|
+
> ```
|
|
817
|
+
>
|
|
795
818
|
|
|
796
819
|
### LibPixiSlide-滑动页
|
|
797
820
|
|
|
@@ -880,6 +903,18 @@ const amountContainer = new LibLabelValue({
|
|
|
880
903
|
});
|
|
881
904
|
```
|
|
882
905
|
|
|
906
|
+
### LibPixiPuzzleBg-设计图背景拼接
|
|
907
|
+
|
|
908
|
+
> 将设计图盖在游戏上层,对游戏内的元素进行对齐
|
|
909
|
+
|
|
910
|
+
### LibPixiDragLocate-元素拖拽定位
|
|
911
|
+
|
|
912
|
+
> 可通过快捷键呼出输入框搜索组件类名或 `name`,选中后可进行拖拽定位
|
|
913
|
+
|
|
914
|
+
### LibPixiTurntable-转盘布局
|
|
915
|
+
|
|
916
|
+
> 转盘上的元素布局
|
|
917
|
+
|
|
883
918
|
## Utils-工具方法
|
|
884
919
|
|
|
885
920
|
### LibPixiAudio-音频播放器
|
|
@@ -12,7 +12,7 @@ import gsap from "gsap";
|
|
|
12
12
|
import { LibPixiRectBgColor } from "../../../Components/Base/LibPixiRectBgColor";
|
|
13
13
|
import { libPixiEvent } from "../../LibPixiEvent";
|
|
14
14
|
import { LibPixiBaseContainer } from "./LibPixiBaseContainer";
|
|
15
|
-
import { LibJsResizeWatcher } from "lyb-js/Base/LibJsResizeWatcher";
|
|
15
|
+
import { LibJsResizeWatcher } from "lyb-js/Base/LibJsResizeWatcher.js";
|
|
16
16
|
/** @description 弹窗组件 */
|
|
17
17
|
export class LibPixiDialog extends LibPixiBaseContainer {
|
|
18
18
|
constructor(params) {
|
package/libPixiJs.d.ts
CHANGED
|
@@ -28,25 +28,31 @@ import { LibPixiPuzzleBg } from "./Components/Custom/LibPixiPuzzleBg";
|
|
|
28
28
|
import { LibPixiTriangle } from "./Components/Custom/LibPixiTriangle";
|
|
29
29
|
import { LibPixiCapsule } from "./Components/Custom/LibPixiCapsule";
|
|
30
30
|
import { LibPixiDragLocate } from "./Components/Custom/LibPixiDragLocate";
|
|
31
|
+
import { LibPixiArc } from "./Components/Base/LibPixiArc";
|
|
32
|
+
import { LibPixiOval } from "./Components/Base/LibPixiOval";
|
|
33
|
+
import { LibPixiRound } from "./Components/Base/LibPixiRound";
|
|
34
|
+
import { LibPixiRoundedRect } from "./Components/Base/LibPixiRoundedRect";
|
|
31
35
|
/** @description 组件 */
|
|
32
36
|
export declare const Components: {
|
|
33
37
|
Base: {
|
|
38
|
+
/** (已废弃)
|
|
39
|
+
* @description 自定义容器大小及背景色
|
|
40
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiContainer-容器
|
|
41
|
+
*/
|
|
42
|
+
LibPixiContainer: typeof LibPixiContainer;
|
|
43
|
+
/** (已废弃)
|
|
44
|
+
* @description 自定义矩形背景色
|
|
45
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectBgColor-矩形
|
|
46
|
+
*/
|
|
47
|
+
LibPixiRectBgColor: typeof LibPixiRectBgColor;
|
|
34
48
|
/** @description 自定义位图文本
|
|
35
49
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiBitText-位图
|
|
36
50
|
*/
|
|
37
51
|
LibPixiBitText: typeof LibPixiBitText;
|
|
38
|
-
/** @description 自定义容器大小及背景色
|
|
39
|
-
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiContainer-容器
|
|
40
|
-
*/
|
|
41
|
-
LibPixiContainer: typeof LibPixiContainer;
|
|
42
52
|
/** @description 利用贝塞尔曲线实现粒子移动
|
|
43
53
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiParticleMove-粒子容器
|
|
44
54
|
*/
|
|
45
55
|
LibPixiParticleMove: typeof LibPixiParticleMove;
|
|
46
|
-
/** @description 自定义矩形背景色
|
|
47
|
-
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectBgColor-矩形
|
|
48
|
-
*/
|
|
49
|
-
LibPixiRectBgColor: typeof LibPixiRectBgColor;
|
|
50
56
|
/** @description 矩形类,可用于一些场景的局部点击,传颜色是为了方便定位,最终可能需要将颜色隐藏掉
|
|
51
57
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectangle-矩形
|
|
52
58
|
*/
|
|
@@ -59,6 +65,18 @@ export declare const Components: {
|
|
|
59
65
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiPolygon-多边形
|
|
60
66
|
*/
|
|
61
67
|
LibPixiPolygon: typeof LibPixiPolygon;
|
|
68
|
+
/** @description 胶囊体 */
|
|
69
|
+
LibPixiCapsule: typeof LibPixiCapsule;
|
|
70
|
+
/** @description 三角形 */
|
|
71
|
+
LibPixiTriangle: typeof LibPixiTriangle;
|
|
72
|
+
/** @description 弧形 */
|
|
73
|
+
LibPixiArc: typeof LibPixiArc;
|
|
74
|
+
/** @description 椭圆 */
|
|
75
|
+
LibPixiOval: typeof LibPixiOval;
|
|
76
|
+
/** @description 圆圈 */
|
|
77
|
+
LibPixiRound: typeof LibPixiRound;
|
|
78
|
+
/** @description 圆角矩形 */
|
|
79
|
+
LibPixiRoundedRect: typeof LibPixiRoundedRect;
|
|
62
80
|
/** @description 自定义 Spine 动画
|
|
63
81
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSpine-动画
|
|
64
82
|
*/
|
|
@@ -123,16 +141,38 @@ export declare const Components: {
|
|
|
123
141
|
LibPixiLabelValue: typeof LibPixiLabelValue;
|
|
124
142
|
/** @description 设计图背景拼接 */
|
|
125
143
|
LibPixiPuzzleBg: typeof LibPixiPuzzleBg;
|
|
126
|
-
/** @description 胶囊体 */
|
|
127
|
-
LibPixiCapsule: typeof LibPixiCapsule;
|
|
128
|
-
/** @description 三角形 */
|
|
129
|
-
LibPixiTriangle: typeof LibPixiTriangle;
|
|
130
144
|
/** @description 元素拖拽定位 */
|
|
131
145
|
LibPixiDragLocate: typeof LibPixiDragLocate;
|
|
146
|
+
/** @description 转盘布局 */
|
|
147
|
+
LibPixiTurntable: (num: number, distance: number, layoutCallback: (x: number, y: number, rotation: number, index: number) => void) => void;
|
|
132
148
|
};
|
|
133
149
|
};
|
|
134
150
|
/** @description 方法 */
|
|
135
151
|
export declare const Utils: {
|
|
152
|
+
/** (已废弃)
|
|
153
|
+
* @description 为容器创建并应用一个矩形遮罩,用于隐藏溢出的内容,函数会返回遮罩,可控制是否显示遮罩
|
|
154
|
+
* @param container 需要设置遮罩裁剪的容器
|
|
155
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiOverflowHidden-溢出裁剪
|
|
156
|
+
*/
|
|
157
|
+
libPixiOverflowHidden: (container: import("pixi.js").Container) => import("pixi.js").Graphics;
|
|
158
|
+
/** (已废弃)
|
|
159
|
+
* @description 当前容器在父容器居中
|
|
160
|
+
*/
|
|
161
|
+
libContainerCenter: (parent: import("pixi.js").Container, item: import("pixi.js").Container, centerType?: "x" | "y" | "xy") => void;
|
|
162
|
+
/** (已废弃)
|
|
163
|
+
* @description 列表居中
|
|
164
|
+
* @param parent 父容器
|
|
165
|
+
* @param items 子元素数组
|
|
166
|
+
* @param direction 方向数组,"x"表示水平,"y"表示垂直
|
|
167
|
+
*/
|
|
168
|
+
libPixiHVCenter: (parent: import("pixi.js").Container, items: import("pixi.js").Container[], direction: ("x" | "y")[]) => void;
|
|
169
|
+
/**(已废弃)
|
|
170
|
+
* @description 按照指定方向(水平或垂直)排列元素,支持固定间隔或自定义每个间隔
|
|
171
|
+
* @param items 要排列的元素数组。
|
|
172
|
+
* @param gap 元素之间的间隔,可以是固定间隔或自定义的间隔数组。
|
|
173
|
+
* @param direction 排列方向,"x"表示水平,"y"表示垂直,默认为水平。
|
|
174
|
+
*/
|
|
175
|
+
libPixiHVGap: (items: import("pixi.js").Container[], gap: number | number[], direction?: "x" | "y") => void;
|
|
136
176
|
/** @description 音频播放器
|
|
137
177
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiAudio-音频播放器
|
|
138
178
|
*/
|
|
@@ -168,11 +208,6 @@ export declare const Utils: {
|
|
|
168
208
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiOutsideClick-失焦隐藏
|
|
169
209
|
*/
|
|
170
210
|
libPixiOutsideClick: (container: import("pixi.js").Container, btn: import("pixi.js").Container, onClose: () => void) => () => void;
|
|
171
|
-
/** @description 为容器创建并应用一个矩形遮罩,用于隐藏溢出的内容,函数会返回遮罩,可控制是否显示遮罩
|
|
172
|
-
* @param container 需要设置遮罩裁剪的容器
|
|
173
|
-
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiOverflowHidden-溢出裁剪
|
|
174
|
-
*/
|
|
175
|
-
libPixiOverflowHidden: (container: import("pixi.js").Container) => import("pixi.js").Graphics;
|
|
176
211
|
/** @description 基于 Ticker 和 Promise 的定时器
|
|
177
212
|
* @param delay 延迟时间
|
|
178
213
|
* @param callback 延迟后执行的函数
|
|
@@ -243,19 +278,4 @@ export declare const Utils: {
|
|
|
243
278
|
* @param payload 事件携带数据
|
|
244
279
|
*/
|
|
245
280
|
LibPixiEmitContainerEvent: (container: import("pixi.js").Container, event: string, payload?: any) => void;
|
|
246
|
-
/** @description 当前容器在父容器居中 */
|
|
247
|
-
libContainerCenter: (parent: import("pixi.js").Container, item: import("pixi.js").Container, centerType?: "x" | "y" | "xy") => void;
|
|
248
|
-
/** @description 列表居中
|
|
249
|
-
* @param parent 父容器
|
|
250
|
-
* @param items 子元素数组
|
|
251
|
-
* @param direction 方向数组,"x"表示水平,"y"表示垂直
|
|
252
|
-
*/
|
|
253
|
-
libPixiHVCenter: (parent: import("pixi.js").Container, items: import("pixi.js").Container[], direction: ("x" | "y")[]) => void;
|
|
254
|
-
/**
|
|
255
|
-
* @description 按照指定方向(水平或垂直)排列元素,支持固定间隔或自定义每个间隔。
|
|
256
|
-
* @param items 要排列的元素数组。
|
|
257
|
-
* @param gap 元素之间的间隔,可以是固定间隔或自定义的间隔数组。
|
|
258
|
-
* @param direction 排列方向,"x"表示水平,"y"表示垂直,默认为水平。
|
|
259
|
-
*/
|
|
260
|
-
libPixiHVGap: (items: import("pixi.js").Container[], gap: number | number[], direction?: "x" | "y") => void;
|
|
261
281
|
};
|
package/libPixiJs.js
CHANGED
|
@@ -46,25 +46,32 @@ import { libPixiHVGap } from "./Utils/LibPixiHVGap";
|
|
|
46
46
|
import { LibPixiTriangle } from "./Components/Custom/LibPixiTriangle";
|
|
47
47
|
import { LibPixiCapsule } from "./Components/Custom/LibPixiCapsule";
|
|
48
48
|
import { LibPixiDragLocate } from "./Components/Custom/LibPixiDragLocate";
|
|
49
|
+
import { LibPixiTurntable } from "./Components/Custom/LibPixiTurntable";
|
|
50
|
+
import { LibPixiArc } from "./Components/Base/LibPixiArc";
|
|
51
|
+
import { LibPixiOval } from "./Components/Base/LibPixiOval";
|
|
52
|
+
import { LibPixiRound } from "./Components/Base/LibPixiRound";
|
|
53
|
+
import { LibPixiRoundedRect } from "./Components/Base/LibPixiRoundedRect";
|
|
49
54
|
/** @description 组件 */
|
|
50
55
|
export const Components = {
|
|
51
56
|
Base: {
|
|
57
|
+
/** (已废弃)
|
|
58
|
+
* @description 自定义容器大小及背景色
|
|
59
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiContainer-容器
|
|
60
|
+
*/
|
|
61
|
+
LibPixiContainer,
|
|
62
|
+
/** (已废弃)
|
|
63
|
+
* @description 自定义矩形背景色
|
|
64
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectBgColor-矩形
|
|
65
|
+
*/
|
|
66
|
+
LibPixiRectBgColor,
|
|
52
67
|
/** @description 自定义位图文本
|
|
53
68
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiBitText-位图
|
|
54
69
|
*/
|
|
55
70
|
LibPixiBitText,
|
|
56
|
-
/** @description 自定义容器大小及背景色
|
|
57
|
-
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiContainer-容器
|
|
58
|
-
*/
|
|
59
|
-
LibPixiContainer,
|
|
60
71
|
/** @description 利用贝塞尔曲线实现粒子移动
|
|
61
72
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiParticleMove-粒子容器
|
|
62
73
|
*/
|
|
63
74
|
LibPixiParticleMove,
|
|
64
|
-
/** @description 自定义矩形背景色
|
|
65
|
-
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectBgColor-矩形
|
|
66
|
-
*/
|
|
67
|
-
LibPixiRectBgColor,
|
|
68
75
|
/** @description 矩形类,可用于一些场景的局部点击,传颜色是为了方便定位,最终可能需要将颜色隐藏掉
|
|
69
76
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectangle-矩形
|
|
70
77
|
*/
|
|
@@ -77,6 +84,18 @@ export const Components = {
|
|
|
77
84
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiPolygon-多边形
|
|
78
85
|
*/
|
|
79
86
|
LibPixiPolygon,
|
|
87
|
+
/** @description 胶囊体 */
|
|
88
|
+
LibPixiCapsule,
|
|
89
|
+
/** @description 三角形 */
|
|
90
|
+
LibPixiTriangle,
|
|
91
|
+
/** @description 弧形 */
|
|
92
|
+
LibPixiArc,
|
|
93
|
+
/** @description 椭圆 */
|
|
94
|
+
LibPixiOval,
|
|
95
|
+
/** @description 圆圈 */
|
|
96
|
+
LibPixiRound,
|
|
97
|
+
/** @description 圆角矩形 */
|
|
98
|
+
LibPixiRoundedRect,
|
|
80
99
|
/** @description 自定义 Spine 动画
|
|
81
100
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSpine-动画
|
|
82
101
|
*/
|
|
@@ -141,16 +160,38 @@ export const Components = {
|
|
|
141
160
|
LibPixiLabelValue,
|
|
142
161
|
/** @description 设计图背景拼接 */
|
|
143
162
|
LibPixiPuzzleBg,
|
|
144
|
-
/** @description 胶囊体 */
|
|
145
|
-
LibPixiCapsule,
|
|
146
|
-
/** @description 三角形 */
|
|
147
|
-
LibPixiTriangle,
|
|
148
163
|
/** @description 元素拖拽定位 */
|
|
149
164
|
LibPixiDragLocate,
|
|
165
|
+
/** @description 转盘布局 */
|
|
166
|
+
LibPixiTurntable,
|
|
150
167
|
},
|
|
151
168
|
};
|
|
152
169
|
/** @description 方法 */
|
|
153
170
|
export const Utils = {
|
|
171
|
+
/** (已废弃)
|
|
172
|
+
* @description 为容器创建并应用一个矩形遮罩,用于隐藏溢出的内容,函数会返回遮罩,可控制是否显示遮罩
|
|
173
|
+
* @param container 需要设置遮罩裁剪的容器
|
|
174
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiOverflowHidden-溢出裁剪
|
|
175
|
+
*/
|
|
176
|
+
libPixiOverflowHidden,
|
|
177
|
+
/** (已废弃)
|
|
178
|
+
* @description 当前容器在父容器居中
|
|
179
|
+
*/
|
|
180
|
+
libContainerCenter,
|
|
181
|
+
/** (已废弃)
|
|
182
|
+
* @description 列表居中
|
|
183
|
+
* @param parent 父容器
|
|
184
|
+
* @param items 子元素数组
|
|
185
|
+
* @param direction 方向数组,"x"表示水平,"y"表示垂直
|
|
186
|
+
*/
|
|
187
|
+
libPixiHVCenter,
|
|
188
|
+
/**(已废弃)
|
|
189
|
+
* @description 按照指定方向(水平或垂直)排列元素,支持固定间隔或自定义每个间隔
|
|
190
|
+
* @param items 要排列的元素数组。
|
|
191
|
+
* @param gap 元素之间的间隔,可以是固定间隔或自定义的间隔数组。
|
|
192
|
+
* @param direction 排列方向,"x"表示水平,"y"表示垂直,默认为水平。
|
|
193
|
+
*/
|
|
194
|
+
libPixiHVGap,
|
|
154
195
|
/** @description 音频播放器
|
|
155
196
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiAudio-音频播放器
|
|
156
197
|
*/
|
|
@@ -186,11 +227,6 @@ export const Utils = {
|
|
|
186
227
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiOutsideClick-失焦隐藏
|
|
187
228
|
*/
|
|
188
229
|
libPixiOutsideClick,
|
|
189
|
-
/** @description 为容器创建并应用一个矩形遮罩,用于隐藏溢出的内容,函数会返回遮罩,可控制是否显示遮罩
|
|
190
|
-
* @param container 需要设置遮罩裁剪的容器
|
|
191
|
-
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiOverflowHidden-溢出裁剪
|
|
192
|
-
*/
|
|
193
|
-
libPixiOverflowHidden,
|
|
194
230
|
/** @description 基于 Ticker 和 Promise 的定时器
|
|
195
231
|
* @param delay 延迟时间
|
|
196
232
|
* @param callback 延迟后执行的函数
|
|
@@ -261,19 +297,4 @@ export const Utils = {
|
|
|
261
297
|
* @param payload 事件携带数据
|
|
262
298
|
*/
|
|
263
299
|
LibPixiEmitContainerEvent,
|
|
264
|
-
/** @description 当前容器在父容器居中 */
|
|
265
|
-
libContainerCenter,
|
|
266
|
-
/** @description 列表居中
|
|
267
|
-
* @param parent 父容器
|
|
268
|
-
* @param items 子元素数组
|
|
269
|
-
* @param direction 方向数组,"x"表示水平,"y"表示垂直
|
|
270
|
-
*/
|
|
271
|
-
libPixiHVCenter,
|
|
272
|
-
/**
|
|
273
|
-
* @description 按照指定方向(水平或垂直)排列元素,支持固定间隔或自定义每个间隔。
|
|
274
|
-
* @param items 要排列的元素数组。
|
|
275
|
-
* @param gap 元素之间的间隔,可以是固定间隔或自定义的间隔数组。
|
|
276
|
-
* @param direction 排列方向,"x"表示水平,"y"表示垂直,默认为水平。
|
|
277
|
-
*/
|
|
278
|
-
libPixiHVGap,
|
|
279
300
|
};
|