@safe-engine/pixi 8.2.3 → 8.2.5
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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/dist/@types/index.d.ts +0 -2
- package/dist/@types/safex.d.ts +0 -168
- package/dist/components/GUIComponent.d.ts +0 -96
- package/dist/components/GUIComponent.d.ts.map +0 -1
- package/dist/components/GUIComponent.js +0 -109
- package/dist/components/NoRenderComponent.d.ts +0 -33
- package/dist/components/RenderComponent.d.ts +0 -30
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { Vec2 } from 'planck';
|
|
|
4
4
|
export * from './app';
|
|
5
5
|
export * from './base';
|
|
6
6
|
export * from './collider';
|
|
7
|
+
export * from './collider/helper/Intersection';
|
|
7
8
|
export * from './components/BaseComponent';
|
|
8
9
|
export * from './components/NodeComp';
|
|
9
10
|
export * from './components/Scene';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,cAAc,OAAO,CAAA;AACrB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,UAAU,CAAA;AACxB,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,cAAc,OAAO,CAAA;AACrB,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,UAAU,CAAA;AACxB,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export { Vec2 } from 'planck';
|
|
|
4
4
|
export * from './app';
|
|
5
5
|
export * from './base';
|
|
6
6
|
export * from './collider';
|
|
7
|
+
export * from './collider/helper/Intersection';
|
|
7
8
|
export * from './components/BaseComponent';
|
|
8
9
|
export * from './components/NodeComp';
|
|
9
10
|
export * from './components/Scene';
|
package/package.json
CHANGED
package/dist/@types/index.d.ts
DELETED
package/dist/@types/safex.d.ts
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { ButtonComp, Collider, NodeComp, Point, TouchEventCallback, Vec2 } from "..";
|
|
2
|
-
import { Color4B } from "../core/Color";
|
|
3
|
-
|
|
4
|
-
interface BaseComponentProps {
|
|
5
|
-
$ref?: object;
|
|
6
|
-
$push?: object[];
|
|
7
|
-
node?: Partial<NodeComp>;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface NodeCompProps {
|
|
11
|
-
nodeName?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface SpriteRenderProps {
|
|
15
|
-
spriteFrame: string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface GraphicsRenderProps {
|
|
19
|
-
lineWidth?: number
|
|
20
|
-
strokeColor?: Color4B
|
|
21
|
-
fillColor?: Color4B
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
interface MaskRenderProps {
|
|
25
|
-
type?: number
|
|
26
|
-
segments?: number
|
|
27
|
-
inverted?: boolean
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
interface ProgressTimerProps {
|
|
31
|
-
spriteFrame: string
|
|
32
|
-
fillType?: number
|
|
33
|
-
fillRange?: number
|
|
34
|
-
fillCenter?: Point
|
|
35
|
-
isReverse?: boolean
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
interface LoadingBarProps {
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
interface LabelCompProps {
|
|
42
|
-
font?: string
|
|
43
|
-
string?: string
|
|
44
|
-
size?: number
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
interface ScrollViewProps {
|
|
48
|
-
width: number
|
|
49
|
-
height: number
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
interface LabelOutlineCompProps {
|
|
53
|
-
color: Color4B
|
|
54
|
-
width: number
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
interface LabelShadowCompProps {
|
|
58
|
-
color: Color4B
|
|
59
|
-
blur: number
|
|
60
|
-
offset: Point
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
interface ColliderProps {
|
|
64
|
-
offset?: Point
|
|
65
|
-
tag?: number
|
|
66
|
-
enabled?: boolean
|
|
67
|
-
onCollisionEnter?: (other: Collider) => void
|
|
68
|
-
onCollisionExit?: (other: Collider) => void
|
|
69
|
-
onCollisionStay?: (other: Collider) => void
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
interface BoxColliderProps extends ColliderProps {
|
|
73
|
-
width: number
|
|
74
|
-
height: number
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
interface CircleColliderProps extends ColliderProps {
|
|
78
|
-
radius: number
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
interface PolygonColliderProps extends ColliderProps {
|
|
82
|
-
points: Array<Point>
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
interface SpineData {
|
|
86
|
-
atlas: string
|
|
87
|
-
skeleton: string
|
|
88
|
-
texture?: string
|
|
89
|
-
}
|
|
90
|
-
interface SpineSkeletonProps {
|
|
91
|
-
data: SpineData
|
|
92
|
-
skin?: string
|
|
93
|
-
animation?: string
|
|
94
|
-
timeScale?: number
|
|
95
|
-
loop?: boolean
|
|
96
|
-
}
|
|
97
|
-
interface DragonBonesData {
|
|
98
|
-
atlas: string
|
|
99
|
-
skeleton: string
|
|
100
|
-
texture: string
|
|
101
|
-
}
|
|
102
|
-
interface DragonBonesProps {
|
|
103
|
-
data: DragonBonesData
|
|
104
|
-
skin?: string
|
|
105
|
-
animation?: string
|
|
106
|
-
playTimes?: number
|
|
107
|
-
timeScale?: number
|
|
108
|
-
onAnimationStart?: (event: { name: string }) => void
|
|
109
|
-
onAnimationEnd?: (event: { name: string }) => void
|
|
110
|
-
onAnimationComplete?: (event: { name: string }) => void
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
interface ExtraDataProps {
|
|
114
|
-
key: string
|
|
115
|
-
value: any
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
interface ButtonCompProps {
|
|
119
|
-
normalImage?: string
|
|
120
|
-
selectedImage?: string
|
|
121
|
-
disableImage?: string
|
|
122
|
-
zoomScale?: number
|
|
123
|
-
onPress: (target: ButtonComp) => void
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
interface TouchEventProps {
|
|
127
|
-
onTouchStart?: TouchEventCallback
|
|
128
|
-
onTouchMove?: TouchEventCallback
|
|
129
|
-
onTouchEnd?: TouchEventCallback
|
|
130
|
-
onTouchCancel?: TouchEventCallback
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export type BodyType = 'kinematic' | 'dynamic' | 'static'
|
|
134
|
-
interface RigidBodyProps {
|
|
135
|
-
type?: BodyType
|
|
136
|
-
density?: Float
|
|
137
|
-
restitution?: Float
|
|
138
|
-
friction?: Float
|
|
139
|
-
gravityScale?: Float
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
interface PhysicsMaterialProps {
|
|
143
|
-
friction?: number
|
|
144
|
-
restitution?: number
|
|
145
|
-
density?: number
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
interface ColliderPhysicsProps {
|
|
149
|
-
tag?: number
|
|
150
|
-
group?: number
|
|
151
|
-
offset?: Vec2
|
|
152
|
-
onCollisionEnter?: (other: Collider) => void
|
|
153
|
-
onCollisionExit?: (other: Collider) => void
|
|
154
|
-
onCollisionStay?: (other: Collider) => void
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
interface BoxColliderPhysicsProps extends ColliderPhysicsProps {
|
|
158
|
-
width: number
|
|
159
|
-
height: number
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
interface CircleColliderPhysicsProps extends ColliderPhysicsProps {
|
|
163
|
-
radius: number
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
interface PolygonColliderPhysicsProps extends ColliderPhysicsProps {
|
|
167
|
-
points: Array<Vec2>
|
|
168
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { CheckBox, CheckBoxOptions, Input, List, ProgressBar, RadioGroup, Slider, SliderOptions } from '@pixi/ui';
|
|
2
|
-
import { Container, FillInput, Point, Text } from 'pixi.js';
|
|
3
|
-
import { ButtonCompProps, LabelCompProps, LabelOutlineCompProps, LabelShadowCompProps, ProgressTimerProps, ScrollViewProps } from '../@types/safex';
|
|
4
|
-
import { Color4B } from '../core/Color';
|
|
5
|
-
import { LoadingBarMode, ProgressTimer } from '../core/LoadingBar';
|
|
6
|
-
import { ComponentX, NoRenderComponentX } from './BaseComponent';
|
|
7
|
-
export declare const FillType: {
|
|
8
|
-
HORIZONTAL: number;
|
|
9
|
-
VERTICAL: number;
|
|
10
|
-
RADIAL: number;
|
|
11
|
-
};
|
|
12
|
-
type Keys = keyof typeof FillType;
|
|
13
|
-
type Values = (typeof FillType)[Keys];
|
|
14
|
-
export declare class ButtonComp extends NoRenderComponentX<ButtonCompProps> {
|
|
15
|
-
normalImage: string;
|
|
16
|
-
selectedImage: string;
|
|
17
|
-
disableImage: string;
|
|
18
|
-
zoomScale: number;
|
|
19
|
-
onPress: (target: ButtonComp) => void;
|
|
20
|
-
setOnPress(cb: (target: ButtonComp) => void): void;
|
|
21
|
-
set enabled(val: any);
|
|
22
|
-
}
|
|
23
|
-
export declare class ProgressBarComp extends ComponentX<{}, ProgressBar> {
|
|
24
|
-
mode: LoadingBarMode;
|
|
25
|
-
isReverse: boolean;
|
|
26
|
-
bg: string;
|
|
27
|
-
fill: string;
|
|
28
|
-
get progress(): number;
|
|
29
|
-
set progress(val: number);
|
|
30
|
-
}
|
|
31
|
-
export declare class LabelComp extends ComponentX<LabelCompProps, Text> {
|
|
32
|
-
font: string;
|
|
33
|
-
string: string;
|
|
34
|
-
size: number;
|
|
35
|
-
getString(): string;
|
|
36
|
-
setString(val: string): void;
|
|
37
|
-
getSize(): number;
|
|
38
|
-
setSize(val: any): void;
|
|
39
|
-
getFont(): string;
|
|
40
|
-
setFont(val: string): void;
|
|
41
|
-
}
|
|
42
|
-
export declare class ScrollView extends NoRenderComponentX<ScrollViewProps> {
|
|
43
|
-
width: number;
|
|
44
|
-
height: number;
|
|
45
|
-
}
|
|
46
|
-
export declare class BlockInputEventsComp extends NoRenderComponentX {
|
|
47
|
-
}
|
|
48
|
-
export declare class ProgressTimerComp extends ComponentX<ProgressTimerProps & {
|
|
49
|
-
$ref?: ProgressTimerComp;
|
|
50
|
-
}, ProgressTimer> {
|
|
51
|
-
spriteFrame: string;
|
|
52
|
-
fillType?: Values;
|
|
53
|
-
fillRange?: number;
|
|
54
|
-
fillCenter?: Point;
|
|
55
|
-
isReverse?: boolean;
|
|
56
|
-
getFillRange(): number;
|
|
57
|
-
setFillStart(val: number): void;
|
|
58
|
-
setFillRange(val: number): void;
|
|
59
|
-
}
|
|
60
|
-
export declare class RichTextComp extends ComponentX<LabelCompProps, Text> {
|
|
61
|
-
protected font: string;
|
|
62
|
-
protected string: string;
|
|
63
|
-
protected size: number;
|
|
64
|
-
getString(): string;
|
|
65
|
-
setString(val: string): void;
|
|
66
|
-
}
|
|
67
|
-
export declare class LabelOutlineComp extends NoRenderComponentX<LabelOutlineCompProps> {
|
|
68
|
-
color: Color4B;
|
|
69
|
-
width: number;
|
|
70
|
-
}
|
|
71
|
-
export declare class LabelShadowComp extends NoRenderComponentX<LabelShadowCompProps> {
|
|
72
|
-
color: Color4B;
|
|
73
|
-
blur: number;
|
|
74
|
-
offset: Point;
|
|
75
|
-
}
|
|
76
|
-
export declare class InputComp extends ComponentX<{}, Input> {
|
|
77
|
-
bg: string;
|
|
78
|
-
fill: FillInput;
|
|
79
|
-
font: string;
|
|
80
|
-
string: string;
|
|
81
|
-
size: number;
|
|
82
|
-
}
|
|
83
|
-
export declare class ListComp extends ComponentX<{}, List> {
|
|
84
|
-
}
|
|
85
|
-
export declare class SliderComp extends ComponentX<{}, Slider> {
|
|
86
|
-
bg: string;
|
|
87
|
-
fill: SliderOptions['fill'];
|
|
88
|
-
slider: Container;
|
|
89
|
-
}
|
|
90
|
-
export declare class RadioGroupComp extends ComponentX<{}, RadioGroup> {
|
|
91
|
-
}
|
|
92
|
-
export declare class CheckBoxComp extends ComponentX<{}, CheckBox> {
|
|
93
|
-
style: CheckBoxOptions['style'];
|
|
94
|
-
}
|
|
95
|
-
export {};
|
|
96
|
-
//# sourceMappingURL=GUIComponent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GUIComponent.d.ts","sourceRoot":"","sources":["../../src/components/GUIComponent.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { Assets, Text } from 'pixi.js';
|
|
2
|
-
import { LoadingBarMode } from '../core/LoadingBar';
|
|
3
|
-
import { ComponentX, NoRenderComponentX } from './BaseComponent';
|
|
4
|
-
// const _htmlTextParser = new HtmlTextParser()
|
|
5
|
-
export const FillType = {
|
|
6
|
-
HORIZONTAL: 0,
|
|
7
|
-
VERTICAL: 1,
|
|
8
|
-
RADIAL: 2,
|
|
9
|
-
};
|
|
10
|
-
export class ButtonComp extends NoRenderComponentX {
|
|
11
|
-
setOnPress(cb) {
|
|
12
|
-
this.onPress = cb;
|
|
13
|
-
}
|
|
14
|
-
set enabled(val) {
|
|
15
|
-
this.node.instance.interactive = val;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export class ProgressBarComp extends ComponentX {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.mode = LoadingBarMode.BAR;
|
|
22
|
-
}
|
|
23
|
-
get progress() {
|
|
24
|
-
return this.node.instance.progress;
|
|
25
|
-
}
|
|
26
|
-
set progress(val) {
|
|
27
|
-
this.node.instance.progress = val;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export class LabelComp extends ComponentX {
|
|
31
|
-
constructor() {
|
|
32
|
-
super(...arguments);
|
|
33
|
-
this.size = 64;
|
|
34
|
-
}
|
|
35
|
-
getString() {
|
|
36
|
-
if (this.node.instance instanceof Text) {
|
|
37
|
-
return this.node.instance.text;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
setString(val) {
|
|
41
|
-
if (this.node.instance instanceof Text) {
|
|
42
|
-
this.node.instance.text = val;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
getSize() {
|
|
46
|
-
if (this.node.instance instanceof Text) {
|
|
47
|
-
return this.node.instance.style.fontSize;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
setSize(val) {
|
|
51
|
-
if (this.node.instance instanceof Text) {
|
|
52
|
-
this.node.instance.style.fontSize = val;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
getFont() {
|
|
56
|
-
if (this.node.instance instanceof Text) {
|
|
57
|
-
return this.node.instance.style.fontFamily;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
setFont(val) {
|
|
61
|
-
// console.log('set font', val, Assets.get(val))
|
|
62
|
-
if (this.node.instance instanceof Text) {
|
|
63
|
-
if (Assets.get(val))
|
|
64
|
-
this.node.instance.style.fontFamily = Assets.get(val).family;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
export class ScrollView extends NoRenderComponentX {
|
|
69
|
-
}
|
|
70
|
-
export class BlockInputEventsComp extends NoRenderComponentX {
|
|
71
|
-
}
|
|
72
|
-
export class ProgressTimerComp extends ComponentX {
|
|
73
|
-
getFillRange() {
|
|
74
|
-
return this.node.instance.progress;
|
|
75
|
-
}
|
|
76
|
-
setFillStart(val) {
|
|
77
|
-
this.node.instance.fillCenter.x = val;
|
|
78
|
-
}
|
|
79
|
-
setFillRange(val) {
|
|
80
|
-
// console.log('setFillRange', this.node.instance);
|
|
81
|
-
this.node.instance.progress = val;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
export class RichTextComp extends ComponentX {
|
|
85
|
-
getString() {
|
|
86
|
-
return this.string;
|
|
87
|
-
}
|
|
88
|
-
setString(val) {
|
|
89
|
-
this.string = val;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
export class LabelOutlineComp extends NoRenderComponentX {
|
|
93
|
-
}
|
|
94
|
-
export class LabelShadowComp extends NoRenderComponentX {
|
|
95
|
-
}
|
|
96
|
-
export class InputComp extends ComponentX {
|
|
97
|
-
constructor() {
|
|
98
|
-
super(...arguments);
|
|
99
|
-
this.size = 64;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
export class ListComp extends ComponentX {
|
|
103
|
-
}
|
|
104
|
-
export class SliderComp extends ComponentX {
|
|
105
|
-
}
|
|
106
|
-
export class RadioGroupComp extends ComponentX {
|
|
107
|
-
}
|
|
108
|
-
export class CheckBoxComp extends ComponentX {
|
|
109
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { FederatedPointerEvent } from 'pixi.js';
|
|
2
|
-
import { ExtraDataProps, TouchEventProps } from '../../src/@types/safex';
|
|
3
|
-
import { NoRenderComponentX } from './BaseComponent';
|
|
4
|
-
import { EventCallbackType, EventMap, NodeComp } from './NodeComp';
|
|
5
|
-
export type TouchEventCallback = (touch?: FederatedPointerEvent, node?: NodeComp) => void;
|
|
6
|
-
export declare class EventRegister extends NoRenderComponentX {
|
|
7
|
-
events: EventMap;
|
|
8
|
-
on(name: string, callback: EventCallbackType, target?: any): void;
|
|
9
|
-
off(name: string, callback?: EventCallbackType, target?: any): any;
|
|
10
|
-
emit(name: string, ...params: any): void;
|
|
11
|
-
}
|
|
12
|
-
export declare class TouchEventRegister extends NoRenderComponentX<TouchEventProps> {
|
|
13
|
-
onTouchStart?: TouchEventCallback;
|
|
14
|
-
onTouchMove?: TouchEventCallback;
|
|
15
|
-
onTouchEnd?: TouchEventCallback;
|
|
16
|
-
onTouchCancel?: TouchEventCallback;
|
|
17
|
-
listener: EventListener;
|
|
18
|
-
touch: Touch;
|
|
19
|
-
setOnTouchStart(cb: TouchEventCallback): void;
|
|
20
|
-
setOnTouchMove(cb: TouchEventCallback): void;
|
|
21
|
-
setOnTouchEnd(cb: TouchEventCallback): void;
|
|
22
|
-
setOnTouchCancel(cb: TouchEventCallback): void;
|
|
23
|
-
}
|
|
24
|
-
export declare class ExtraDataComp extends NoRenderComponentX<ExtraDataProps> {
|
|
25
|
-
key: string;
|
|
26
|
-
value: any;
|
|
27
|
-
data: {
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
};
|
|
30
|
-
getData<T>(key: string): T;
|
|
31
|
-
setData<T>(key: string, val: T): void;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=NoRenderComponent.d.ts.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ColorSource, Graphics, Point, Sprite } from 'pixi.js';
|
|
2
|
-
import { GraphicsRenderProps, MaskRenderProps, SpriteRenderProps } from '../../src/@types/safex';
|
|
3
|
-
import { LoadingBar, LoadingBarMode } from '../core/LoadingBar';
|
|
4
|
-
import { SpriteTypes } from '../systems/RenderSystem';
|
|
5
|
-
import { ComponentX } from './BaseComponent';
|
|
6
|
-
export declare class NodeRender extends ComponentX {
|
|
7
|
-
nodeName?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare class SpriteRender extends ComponentX<SpriteRenderProps, Sprite> {
|
|
10
|
-
spriteFrame: string;
|
|
11
|
-
type: SpriteTypes;
|
|
12
|
-
fillType: LoadingBarMode;
|
|
13
|
-
fillRange: number;
|
|
14
|
-
fillCenter: Point;
|
|
15
|
-
loadingBar: LoadingBar;
|
|
16
|
-
setFillRange(val: number): void;
|
|
17
|
-
getSpriteFrame(): string;
|
|
18
|
-
setSpriteFrame(frame: any): void;
|
|
19
|
-
}
|
|
20
|
-
export declare class GraphicsRender extends ComponentX<GraphicsRenderProps, Graphics> {
|
|
21
|
-
lineWidth: number;
|
|
22
|
-
strokeColor: ColorSource;
|
|
23
|
-
fillColor: ColorSource;
|
|
24
|
-
}
|
|
25
|
-
export declare class MaskRender extends ComponentX<MaskRenderProps> {
|
|
26
|
-
type: number;
|
|
27
|
-
segments: number;
|
|
28
|
-
inverted: boolean;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=RenderComponent.d.ts.map
|