lyb-pixi-js 1.8.0 → 1.8.1
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/LibPixiCircular.d.ts +7 -0
- package/Components/Base/LibPixiCircular.js +12 -0
- package/Components/Base/LibPixiPolygon.d.ts +7 -0
- package/Components/Base/LibPixiPolygon.js +15 -0
- package/Components/Base/LibPixiRectBgColor.js +0 -1
- package/Components/Base/LibPixiRectangle.d.ts +7 -0
- package/Components/Base/LibPixiRectangle.js +15 -0
- package/libPixiJs.d.ts +16 -1
- package/libPixiJs.js +16 -1
- package/lyb-pixi.js +42 -1
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Graphics } from "pixi.js";
|
|
2
|
+
/** @description 圆形
|
|
3
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiCircular-圆形
|
|
4
|
+
*/
|
|
5
|
+
export class LibPixiCircular extends Graphics {
|
|
6
|
+
constructor(radius, color) {
|
|
7
|
+
super();
|
|
8
|
+
this.beginFill(color);
|
|
9
|
+
this.drawCircle(0, 0, radius);
|
|
10
|
+
this.endFill();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Graphics, type IPointData } from "pixi.js";
|
|
2
|
+
/** @description 多边形类,可用于一些场景的局部点击,传颜色是为了方便定位,最终可能需要将颜色隐藏掉
|
|
3
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiPolygon-多边形
|
|
4
|
+
*/
|
|
5
|
+
export declare class LibPixiPolygon extends Graphics {
|
|
6
|
+
constructor(points: IPointData[] | number[], color?: string);
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Graphics } from "pixi.js";
|
|
2
|
+
/** @description 多边形类,可用于一些场景的局部点击,传颜色是为了方便定位,最终可能需要将颜色隐藏掉
|
|
3
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiPolygon-多边形
|
|
4
|
+
*/
|
|
5
|
+
export class LibPixiPolygon extends Graphics {
|
|
6
|
+
constructor(points, color) {
|
|
7
|
+
super();
|
|
8
|
+
this.beginFill(color || 0x000000);
|
|
9
|
+
this.drawPolygon(points);
|
|
10
|
+
this.endFill();
|
|
11
|
+
if (!color) {
|
|
12
|
+
this.alpha = 0;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -40,7 +40,6 @@ export class LibPixiRectBgColor extends Graphics {
|
|
|
40
40
|
}
|
|
41
41
|
else {
|
|
42
42
|
this.beginFill(this.bgColor, this.bgAlpha);
|
|
43
|
-
this.borderWidth && this.lineStyle(this.borderWidth, this.borderColor, 1);
|
|
44
43
|
}
|
|
45
44
|
this.borderWidth && this.lineStyle(this.borderWidth, this.borderColor, 1);
|
|
46
45
|
if (this.radius !== 0) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Graphics } from "pixi.js";
|
|
2
|
+
/** @description 矩形类,可用于一些场景的局部点击,传颜色是为了方便定位,最终可能需要将颜色隐藏掉
|
|
3
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectangle-矩形
|
|
4
|
+
*/
|
|
5
|
+
export declare class LibPixiRectangle extends Graphics {
|
|
6
|
+
constructor(width: number, height: number, color?: string);
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Graphics } from "pixi.js";
|
|
2
|
+
/** @description 矩形类,可用于一些场景的局部点击,传颜色是为了方便定位,最终可能需要将颜色隐藏掉
|
|
3
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectangle-矩形
|
|
4
|
+
*/
|
|
5
|
+
export class LibPixiRectangle extends Graphics {
|
|
6
|
+
constructor(width, height, color) {
|
|
7
|
+
super();
|
|
8
|
+
this.beginFill(color || 0x000000);
|
|
9
|
+
this.drawRect(0, 0, width, height);
|
|
10
|
+
this.endFill();
|
|
11
|
+
if (!color) {
|
|
12
|
+
this.alpha = 0;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
package/libPixiJs.d.ts
CHANGED
|
@@ -19,7 +19,10 @@ import { LibPixiAudio } from "./Utils/LibPixiAudio";
|
|
|
19
19
|
import { LibPixiSlideInput } from "./Utils/LibPixiSlideInput";
|
|
20
20
|
import { LibPixiGlobalUpdater } from "./Utils/LibPixiGlobalUpdater";
|
|
21
21
|
import { LibPixiPolygonDrawTool } from "./Utils/LibPixiPolygonDrawTool";
|
|
22
|
-
import { LibPixiHtmlText } from
|
|
22
|
+
import { LibPixiHtmlText } from "./Components/Base/LibPixiHtmlText";
|
|
23
|
+
import { LibPixiRectangle } from "./Components/Base/LibPixiRectangle";
|
|
24
|
+
import { LibPixiPolygon } from "./Components/Base/LibPixiPolygon";
|
|
25
|
+
import { LibPixiCircular } from "./Components/Base/LibPixiCircular";
|
|
23
26
|
/** @description 组件 */
|
|
24
27
|
export declare const Components: {
|
|
25
28
|
Base: {
|
|
@@ -39,6 +42,18 @@ export declare const Components: {
|
|
|
39
42
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectBgColor-矩形
|
|
40
43
|
*/
|
|
41
44
|
LibPixiRectBgColor: typeof LibPixiRectBgColor;
|
|
45
|
+
/** @description 矩形类,可用于一些场景的局部点击,传颜色是为了方便定位,最终可能需要将颜色隐藏掉
|
|
46
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectangle-矩形
|
|
47
|
+
*/
|
|
48
|
+
LibPixiRectangle: typeof LibPixiRectangle;
|
|
49
|
+
/** @description 圆形
|
|
50
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiCircular-圆形
|
|
51
|
+
*/
|
|
52
|
+
LibPixiCircular: typeof LibPixiCircular;
|
|
53
|
+
/** @description 多边形类
|
|
54
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiPolygon-多边形
|
|
55
|
+
*/
|
|
56
|
+
LibPixiPolygon: typeof LibPixiPolygon;
|
|
42
57
|
/** @description 自定义 Spine 动画
|
|
43
58
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSpine-动画
|
|
44
59
|
*/
|
package/libPixiJs.js
CHANGED
|
@@ -29,7 +29,10 @@ import { libPixiTickerTimeout } from "./Utils/LibPixiTickerTimeout";
|
|
|
29
29
|
import { LibPixiSlideInput } from "./Utils/LibPixiSlideInput";
|
|
30
30
|
import { LibPixiGlobalUpdater } from "./Utils/LibPixiGlobalUpdater";
|
|
31
31
|
import { LibPixiPolygonDrawTool } from "./Utils/LibPixiPolygonDrawTool";
|
|
32
|
-
import { LibPixiHtmlText } from
|
|
32
|
+
import { LibPixiHtmlText } from "./Components/Base/LibPixiHtmlText";
|
|
33
|
+
import { LibPixiRectangle } from "./Components/Base/LibPixiRectangle";
|
|
34
|
+
import { LibPixiPolygon } from "./Components/Base/LibPixiPolygon";
|
|
35
|
+
import { LibPixiCircular } from "./Components/Base/LibPixiCircular";
|
|
33
36
|
/** @description 组件 */
|
|
34
37
|
export const Components = {
|
|
35
38
|
Base: {
|
|
@@ -49,6 +52,18 @@ export const Components = {
|
|
|
49
52
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectBgColor-矩形
|
|
50
53
|
*/
|
|
51
54
|
LibPixiRectBgColor,
|
|
55
|
+
/** @description 矩形类,可用于一些场景的局部点击,传颜色是为了方便定位,最终可能需要将颜色隐藏掉
|
|
56
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectangle-矩形
|
|
57
|
+
*/
|
|
58
|
+
LibPixiRectangle,
|
|
59
|
+
/** @description 圆形
|
|
60
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiCircular-圆形
|
|
61
|
+
*/
|
|
62
|
+
LibPixiCircular,
|
|
63
|
+
/** @description 多边形类
|
|
64
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiPolygon-多边形
|
|
65
|
+
*/
|
|
66
|
+
LibPixiPolygon,
|
|
52
67
|
/** @description 自定义 Spine 动画
|
|
53
68
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSpine-动画
|
|
54
69
|
*/
|
package/lyb-pixi.js
CHANGED
|
@@ -29781,7 +29781,6 @@ void main(void)\r
|
|
|
29781
29781
|
this.tint = this.bgColor;
|
|
29782
29782
|
} else {
|
|
29783
29783
|
this.beginFill(this.bgColor, this.bgAlpha);
|
|
29784
|
-
this.borderWidth && this.lineStyle(this.borderWidth, this.borderColor, 1);
|
|
29785
29784
|
}
|
|
29786
29785
|
this.borderWidth && this.lineStyle(this.borderWidth, this.borderColor, 1);
|
|
29787
29786
|
if (this.radius !== 0) {
|
|
@@ -54877,6 +54876,36 @@ void main(void){
|
|
|
54877
54876
|
}
|
|
54878
54877
|
}
|
|
54879
54878
|
}
|
|
54879
|
+
class LibPixiRectangle extends Graphics {
|
|
54880
|
+
constructor(width, height, color) {
|
|
54881
|
+
super();
|
|
54882
|
+
this.beginFill(color || 0);
|
|
54883
|
+
this.drawRect(0, 0, width, height);
|
|
54884
|
+
this.endFill();
|
|
54885
|
+
if (!color) {
|
|
54886
|
+
this.alpha = 0;
|
|
54887
|
+
}
|
|
54888
|
+
}
|
|
54889
|
+
}
|
|
54890
|
+
class LibPixiPolygon extends Graphics {
|
|
54891
|
+
constructor(points, color) {
|
|
54892
|
+
super();
|
|
54893
|
+
this.beginFill(color || 0);
|
|
54894
|
+
this.drawPolygon(points);
|
|
54895
|
+
this.endFill();
|
|
54896
|
+
if (!color) {
|
|
54897
|
+
this.alpha = 0;
|
|
54898
|
+
}
|
|
54899
|
+
}
|
|
54900
|
+
}
|
|
54901
|
+
class LibPixiCircular extends Graphics {
|
|
54902
|
+
constructor(radius, color) {
|
|
54903
|
+
super();
|
|
54904
|
+
this.beginFill(color);
|
|
54905
|
+
this.drawCircle(0, 0, radius);
|
|
54906
|
+
this.endFill();
|
|
54907
|
+
}
|
|
54908
|
+
}
|
|
54880
54909
|
const Components = {
|
|
54881
54910
|
Base: {
|
|
54882
54911
|
/** @description 自定义位图文本
|
|
@@ -54895,6 +54924,18 @@ void main(void){
|
|
|
54895
54924
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectBgColor-矩形
|
|
54896
54925
|
*/
|
|
54897
54926
|
LibPixiRectBgColor,
|
|
54927
|
+
/** @description 矩形类,可用于一些场景的局部点击,传颜色是为了方便定位,最终可能需要将颜色隐藏掉
|
|
54928
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiRectangle-矩形
|
|
54929
|
+
*/
|
|
54930
|
+
LibPixiRectangle,
|
|
54931
|
+
/** @description 圆形
|
|
54932
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiCircular-圆形
|
|
54933
|
+
*/
|
|
54934
|
+
LibPixiCircular,
|
|
54935
|
+
/** @description 多边形类
|
|
54936
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiPolygon-多边形
|
|
54937
|
+
*/
|
|
54938
|
+
LibPixiPolygon,
|
|
54898
54939
|
/** @description 自定义 Spine 动画
|
|
54899
54940
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSpine-动画
|
|
54900
54941
|
*/
|