@safe-engine/cocos 1.4.8 → 1.4.9
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/@types/safex.d.ts +0 -31
- package/dist/gworld/components/GUIComponent.d.ts +24 -3
- package/dist/gworld/components/GUIComponent.d.ts.map +1 -1
- package/dist/gworld/components/GUIComponent.js +13 -12
- package/dist/gworld/components/RenderComponent.d.ts +6 -1
- package/dist/gworld/components/RenderComponent.d.ts.map +1 -1
- package/dist/gworld/components/RenderComponent.js +0 -25
- package/package.json +1 -1
package/@types/safex.d.ts
CHANGED
|
@@ -15,39 +15,8 @@ interface NodeCompProps {
|
|
|
15
15
|
nodeName?: string
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
interface GraphicsRenderProps {
|
|
19
|
-
lineWidth?: number
|
|
20
|
-
strokeColor?: ColorSource
|
|
21
|
-
fillColor?: ColorSource
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
interface ProgressTimerProps {
|
|
25
|
-
spriteFrame: string
|
|
26
|
-
fillType?: LoadingBarMode
|
|
27
|
-
fillRange?: number
|
|
28
|
-
fillCenter?: Point
|
|
29
|
-
isReverse?: boolean
|
|
30
|
-
}
|
|
31
|
-
|
|
32
18
|
// interface LoadingBarProps {}
|
|
33
19
|
|
|
34
|
-
interface LabelCompProps {
|
|
35
|
-
font?: string
|
|
36
|
-
string?: string
|
|
37
|
-
size?: number
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
interface LabelOutlineCompProps {
|
|
41
|
-
color: ColorSource
|
|
42
|
-
width: number
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
interface LabelShadowCompProps {
|
|
46
|
-
color: ColorSource
|
|
47
|
-
blur: number
|
|
48
|
-
offset: Point
|
|
49
|
-
}
|
|
50
|
-
|
|
51
20
|
interface SpineData {
|
|
52
21
|
atlas: string
|
|
53
22
|
skeleton: string
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseComponentProps,
|
|
1
|
+
import { BaseComponentProps, ColorSource } from '../../../@types/safex';
|
|
2
2
|
import { Color4B, Size, Vec2 } from '../../polyfills';
|
|
3
3
|
import { ComponentX, NoRenderComponentX } from '../core/decorator';
|
|
4
4
|
export declare const FillType: {
|
|
@@ -19,6 +19,13 @@ export declare class ButtonComp extends NoRenderComponentX<ButtonCompProps> {
|
|
|
19
19
|
clickEvents: any[];
|
|
20
20
|
setOnPress(cb: (target: ButtonComp) => void): void;
|
|
21
21
|
}
|
|
22
|
+
interface ProgressTimerProps {
|
|
23
|
+
spriteFrame: string;
|
|
24
|
+
fillType?: number;
|
|
25
|
+
fillRange?: number;
|
|
26
|
+
fillCenter?: Vec2;
|
|
27
|
+
isReverse?: boolean;
|
|
28
|
+
}
|
|
22
29
|
export declare class ProgressTimerComp extends ComponentX<ProgressTimerProps & BaseComponentProps<ProgressTimerComp>, cc.ProgressTimer & cc.Node> {
|
|
23
30
|
spriteFrame: string;
|
|
24
31
|
fillType: Values;
|
|
@@ -29,9 +36,23 @@ export declare class ProgressTimerComp extends ComponentX<ProgressTimerProps & B
|
|
|
29
36
|
setFillStart(val: number): void;
|
|
30
37
|
setFillRange(val: number): void;
|
|
31
38
|
}
|
|
39
|
+
interface LabelCompProps {
|
|
40
|
+
font?: string;
|
|
41
|
+
string?: string;
|
|
42
|
+
size?: number;
|
|
43
|
+
}
|
|
44
|
+
interface LabelOutlineCompProps {
|
|
45
|
+
color: ColorSource;
|
|
46
|
+
width: number;
|
|
47
|
+
}
|
|
48
|
+
interface LabelShadowCompProps {
|
|
49
|
+
color: ColorSource;
|
|
50
|
+
blur: number;
|
|
51
|
+
offset: Vec2;
|
|
52
|
+
}
|
|
32
53
|
export declare class LabelComp extends ComponentX<LabelCompProps & BaseComponentProps<LabelComp>, ccui.Text> {
|
|
33
|
-
|
|
34
|
-
|
|
54
|
+
get string(): string;
|
|
55
|
+
set string(val: string);
|
|
35
56
|
}
|
|
36
57
|
export declare class RichTextComp extends ComponentX<LabelCompProps & BaseComponentProps<RichTextComp>, ccui.RichText> {
|
|
37
58
|
get string(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GUIComponent.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/GUIComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"GUIComponent.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/GUIComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEvE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAElE,eAAO,MAAM,QAAQ;;;;CAIpB,CAAA;AACD,KAAK,IAAI,GAAG,MAAM,OAAO,QAAQ,CAAA;AACjC,KAAK,MAAM,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAA;AAGrC,UAAU,eAAe;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAA;CACvC;AACD,qBAAa,UAAW,SAAQ,kBAAkB,CAAC,eAAe,CAAC;IAEjE,WAAW,QAAK;IAEhB,UAAU,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI;CAO5C;AAED,UAAU,kBAAkB;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,IAAI,CAAA;IACjB,SAA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;IACrB,KAAK,EAAE,KAAK,CAAA;CACb;AAED,qBAAa,eAAgB,SAAQ,kBAAkB,CAAC,oBAAoB,CAAC;IAC3E,KAAK,EAAE,OAAO,OAAO,CAAA;IACrB,IAAI,EAAE,KAAK,CAAA;IACX,MAAM,EAAE,IAAI,CAAA;CACb;AAED,oBAAY,mBAAmB;IAC7B,IAAmC;IACnC,UAA+C;IAC/C,QAA2C;IAC3C,IAAmC;CACpC;AACD,UAAU,eAAe;IACvB,QAAQ,EAAE,IAAI,CAAA;IACd,WAAW,EAAE,IAAI,CAAA;IACjB,SAAS,CAAC,EAAE,mBAAmB,CAAA;CAChC;AACD,qBAAa,cAAe,SAAQ,UAAU,CAAC,eAAe,GAAG,kBAAkB,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC;IACjH,IAAI,CAAC,KAAK,EAAE,MAAM;CAKnB;AAED,UAAU,cAAc;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AACD,qBAAa,SAAU,SAAQ,UAAU,CAAC,cAAc,GAAG,kBAAkB,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC;IACvG,IAAI,MAAM,WAET;CACF;AAED,qBAAa,oBAAqB,SAAQ,kBAAkB;CAAG"}
|
|
@@ -70,18 +70,19 @@ var LabelComp = /** @class */ (function (_super) {
|
|
|
70
70
|
function LabelComp() {
|
|
71
71
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
72
72
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
73
|
+
Object.defineProperty(LabelComp.prototype, "string", {
|
|
74
|
+
get: function () {
|
|
75
|
+
return this.props.string;
|
|
76
|
+
},
|
|
77
|
+
set: function (val) {
|
|
78
|
+
this.props.string = val;
|
|
79
|
+
if (this.node.instance instanceof ccui.Text) {
|
|
80
|
+
this.node.instance.setString(val);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
enumerable: false,
|
|
84
|
+
configurable: true
|
|
85
|
+
});
|
|
85
86
|
return LabelComp;
|
|
86
87
|
}(decorator_1.ComponentX));
|
|
87
88
|
exports.LabelComp = LabelComp;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseComponentProps,
|
|
1
|
+
import { BaseComponentProps, ColorSource } from '../../../@types/safex';
|
|
2
2
|
import { ComponentX } from '../core/decorator';
|
|
3
3
|
export declare class NodeRender extends ComponentX {
|
|
4
4
|
nodeName: string;
|
|
@@ -24,6 +24,11 @@ interface ParticleCompProps {
|
|
|
24
24
|
}
|
|
25
25
|
export declare class ParticleComp extends ComponentX<ParticleCompProps, cc.ParticleSystem> {
|
|
26
26
|
}
|
|
27
|
+
interface GraphicsRenderProps {
|
|
28
|
+
lineWidth?: number;
|
|
29
|
+
strokeColor?: ColorSource;
|
|
30
|
+
fillColor?: ColorSource;
|
|
31
|
+
}
|
|
27
32
|
export declare class GraphicsRender extends ComponentX<GraphicsRenderProps & BaseComponentProps<GraphicsRender>, cc.DrawNode> {
|
|
28
33
|
lineWidth: number;
|
|
29
34
|
strokeColor: cc.Color;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderComponent.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/RenderComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"RenderComponent.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/RenderComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEvE,O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AQ,UAAU,CAAC,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;CAAE,EAAE,EAAE,CAAC,WAAW,CAAC;CAAG"}
|
|
@@ -73,31 +73,6 @@ var ParticleComp = /** @class */ (function (_super) {
|
|
|
73
73
|
return ParticleComp;
|
|
74
74
|
}(decorator_1.ComponentX));
|
|
75
75
|
exports.ParticleComp = ParticleComp;
|
|
76
|
-
// interface SpineSkeletonProps {
|
|
77
|
-
// data: SpineData
|
|
78
|
-
// skin?: string
|
|
79
|
-
// animation?: string
|
|
80
|
-
// timeScale?: number
|
|
81
|
-
// loop?: boolean
|
|
82
|
-
// }
|
|
83
|
-
// export class SpineSkeleton extends ComponentX<SpineSkeletonProps & BaseComponentProps<SpineSkeleton>> {
|
|
84
|
-
// data: SpineData
|
|
85
|
-
// skin: string
|
|
86
|
-
// animation: string
|
|
87
|
-
// loop: boolean
|
|
88
|
-
// timeScale: number
|
|
89
|
-
// setAnimation(name: string, loop = false) {
|
|
90
|
-
// const skel: any = this.node.instance
|
|
91
|
-
// if (skel.setAnimation) {
|
|
92
|
-
// skel.setAnimation(0, name, loop)
|
|
93
|
-
// }
|
|
94
|
-
// }
|
|
95
|
-
// setSkeletonData(data: string) {
|
|
96
|
-
// const skel: any = this.node.instance
|
|
97
|
-
// const atlas = data.replace('.json', '.atlas')
|
|
98
|
-
// skel.initWithArgs(data, atlas, this.node.scale)
|
|
99
|
-
// }
|
|
100
|
-
// }
|
|
101
76
|
var GraphicsRender = /** @class */ (function (_super) {
|
|
102
77
|
__extends(GraphicsRender, _super);
|
|
103
78
|
function GraphicsRender() {
|