@safe-engine/cocos 1.2.1 → 1.2.2
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 +7 -4
- package/dist/dragonbones/index.d.ts +3 -1
- package/dist/dragonbones/index.d.ts.map +1 -1
- package/dist/gworld/components/GUIComponent.d.ts +5 -9
- package/dist/gworld/components/GUIComponent.d.ts.map +1 -1
- package/dist/gworld/components/RenderComponent.d.ts +4 -8
- package/dist/gworld/components/RenderComponent.d.ts.map +1 -1
- package/package.json +1 -1
package/@types/safex.d.ts
CHANGED
|
@@ -2,10 +2,13 @@ import { Color4B, NodeComp } from '../src'
|
|
|
2
2
|
|
|
3
3
|
type ColorSource = ReturnType<typeof Color4B>
|
|
4
4
|
|
|
5
|
-
interface
|
|
6
|
-
$ref?:
|
|
7
|
-
$
|
|
8
|
-
|
|
5
|
+
interface RefComp<T> {
|
|
6
|
+
$ref?: T
|
|
7
|
+
$push?: T[]
|
|
8
|
+
}
|
|
9
|
+
interface BaseComponentProps extends RefComp<unknown> {
|
|
10
|
+
$refNode?: NodeComp
|
|
11
|
+
$pushNode?: NodeComp[]
|
|
9
12
|
node?: Partial<NodeComp>
|
|
10
13
|
// [$key: `$${string}`]: string
|
|
11
14
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { EntityManager, EventManager, EventReceive, System } from 'entityx-ts';
|
|
2
|
+
import { RefComp } from '../../@types/safex';
|
|
2
3
|
import { ComponentX } from '../gworld/core/decorator';
|
|
4
|
+
import { CocosArmatureDisplay } from './cocos/CocosArmatureDisplay';
|
|
3
5
|
export interface DragonBonesData {
|
|
4
6
|
atlas: string;
|
|
5
7
|
skeleton: string;
|
|
@@ -21,7 +23,7 @@ interface DragonBonesProps {
|
|
|
21
23
|
name: string;
|
|
22
24
|
}) => void;
|
|
23
25
|
}
|
|
24
|
-
export declare class DragonBonesComp extends ComponentX<DragonBonesProps> {
|
|
26
|
+
export declare class DragonBonesComp extends ComponentX<DragonBonesProps & RefComp<DragonBonesComp>, CocosArmatureDisplay> {
|
|
25
27
|
setAnimation(name: string, playTimes?: number): void;
|
|
26
28
|
}
|
|
27
29
|
export declare class DragonBonesSystem implements System {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dragonbones/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,MAAM,EACP,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dragonbones/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,MAAM,EACP,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG7C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,gBAAgB;IACxB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACrD,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACnD,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACzD;AACD,qBAAa,eAAgB,SAAQ,UAAU,CAAC,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,EAAE,oBAAoB,CAAC;IAChH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,SAAI;CAgBzC;AAED,qBAAa,iBAAkB,YAAW,MAAM;IAC9C,SAAS,CAAC,aAAa,EAAE,YAAY;IAMrC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY;IAoDzC,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM;CAKjE;AAED,wBAAgB,gBAAgB,SAI/B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LabelCompProps, LabelOutlineCompProps, LabelShadowCompProps, ProgressTimerProps } from '../../../@types/safex';
|
|
1
|
+
import { LabelCompProps, LabelOutlineCompProps, LabelShadowCompProps, ProgressTimerProps, RefComp } 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: {
|
|
@@ -20,9 +20,7 @@ export declare class ButtonComp extends NoRenderComponentX<ButtonCompProps> {
|
|
|
20
20
|
clickEvents: any[];
|
|
21
21
|
setOnPress(cb: (target: ButtonComp) => void): void;
|
|
22
22
|
}
|
|
23
|
-
export declare class ProgressTimerComp extends ComponentX<ProgressTimerProps & {
|
|
24
|
-
$ref?: ProgressTimerComp;
|
|
25
|
-
}> {
|
|
23
|
+
export declare class ProgressTimerComp extends ComponentX<ProgressTimerProps & RefComp<ProgressTimerComp>> {
|
|
26
24
|
spriteFrame: string;
|
|
27
25
|
fillType: Values;
|
|
28
26
|
fillRange: number;
|
|
@@ -32,13 +30,11 @@ export declare class ProgressTimerComp extends ComponentX<ProgressTimerProps & {
|
|
|
32
30
|
setFillStart(val: number): void;
|
|
33
31
|
setFillRange(val: number): void;
|
|
34
32
|
}
|
|
35
|
-
export declare class LabelComp extends ComponentX<LabelCompProps & {
|
|
36
|
-
$ref?: LabelComp;
|
|
37
|
-
}, ccui.Text> {
|
|
33
|
+
export declare class LabelComp extends ComponentX<LabelCompProps & RefComp<LabelComp>, ccui.Text> {
|
|
38
34
|
getString(): string;
|
|
39
35
|
setString(val: string): void;
|
|
40
36
|
}
|
|
41
|
-
export declare class RichTextComp extends ComponentX<LabelCompProps
|
|
37
|
+
export declare class RichTextComp extends ComponentX<LabelCompProps & RefComp<RichTextComp>, ccui.RichText> {
|
|
42
38
|
get string(): string;
|
|
43
39
|
set string(val: string);
|
|
44
40
|
}
|
|
@@ -62,7 +58,7 @@ interface ScrollViewProps {
|
|
|
62
58
|
contentSize: Size;
|
|
63
59
|
direction?: ScrollViewDirection;
|
|
64
60
|
}
|
|
65
|
-
export declare class ScrollViewComp extends ComponentX<ScrollViewProps
|
|
61
|
+
export declare class ScrollViewComp extends ComponentX<ScrollViewProps & RefComp<ScrollViewComp>, cc.ScrollView> {
|
|
66
62
|
zoom(scale: number): void;
|
|
67
63
|
}
|
|
68
64
|
export declare class BlockInputEventsComp extends NoRenderComponentX {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GUIComponent.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/GUIComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"GUIComponent.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/GUIComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAEhI,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,iBAA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CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC;IACjG,IAAI,MAAM,IAIM,MAAM,CAFrB;IAED,IAAI,MAAM,CAAC,GAAG,EAAE,MAAM,EAoBrB;CACF;AAED,qBAAa,gBAAiB,SAAQ,kBAAkB,CAAC,qBAAqB,CAAC;IAC7E,KAAK,EAAE,OAAO,OAAO,CAAA;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,OAAO,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC;IACtG,IAAI,CAAC,KAAK,EAAE,MAAM;CAKnB;AAED,qBAAa,oBAAqB,SAAQ,kBAAkB;CAAI"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GraphicsRenderProps, SpineData } from '../../../@types/safex';
|
|
1
|
+
import { GraphicsRenderProps, RefComp, SpineData } from '../../../@types/safex';
|
|
2
2
|
import { ComponentX } from '../core/decorator';
|
|
3
3
|
export declare class NodeRender extends ComponentX {
|
|
4
4
|
nodeName: string;
|
|
@@ -8,9 +8,7 @@ interface SpriteRenderProps {
|
|
|
8
8
|
texType?: number;
|
|
9
9
|
type?: number;
|
|
10
10
|
}
|
|
11
|
-
export declare class SpriteRender extends ComponentX<SpriteRenderProps & {
|
|
12
|
-
$ref?: SpriteRender;
|
|
13
|
-
}, cc.Sprite> {
|
|
11
|
+
export declare class SpriteRender extends ComponentX<SpriteRenderProps & RefComp<SpriteRender>, cc.Sprite> {
|
|
14
12
|
get spriteFrame(): string;
|
|
15
13
|
set spriteFrame(frame: string);
|
|
16
14
|
}
|
|
@@ -33,9 +31,7 @@ interface SpineSkeletonProps {
|
|
|
33
31
|
timeScale?: number;
|
|
34
32
|
loop?: boolean;
|
|
35
33
|
}
|
|
36
|
-
export declare class SpineSkeleton extends ComponentX<SpineSkeletonProps & {
|
|
37
|
-
$ref: SpineSkeleton;
|
|
38
|
-
}> {
|
|
34
|
+
export declare class SpineSkeleton extends ComponentX<SpineSkeletonProps & RefComp<SpineSkeleton>> {
|
|
39
35
|
data: SpineData;
|
|
40
36
|
skin: string;
|
|
41
37
|
animation: string;
|
|
@@ -44,7 +40,7 @@ export declare class SpineSkeleton extends ComponentX<SpineSkeletonProps & {
|
|
|
44
40
|
setAnimation(name: string, loop?: boolean): void;
|
|
45
41
|
setSkeletonData(data: string): void;
|
|
46
42
|
}
|
|
47
|
-
export declare class GraphicsRender extends ComponentX<GraphicsRenderProps
|
|
43
|
+
export declare class GraphicsRender extends ComponentX<GraphicsRenderProps & RefComp<GraphicsRender>, cc.DrawNode> {
|
|
48
44
|
lineWidth: number;
|
|
49
45
|
strokeColor: cc.Color;
|
|
50
46
|
fillColor: cc.Color;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderComponent.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/RenderComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"RenderComponent.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/RenderComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAE/E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,q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