@safe-engine/cocos 1.0.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/@types/index.d.ts +61 -0
- package/@types/safex.d.ts +103 -0
- package/README.md +10 -0
- package/dist/app.d.ts +2 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +24 -0
- package/dist/dragonbones/cocos/CocosArmatureDisplay.d.ts +77 -0
- package/dist/dragonbones/cocos/CocosArmatureDisplay.d.ts.map +1 -0
- package/dist/dragonbones/cocos/CocosArmatureDisplay.js +227 -0
- package/dist/dragonbones/cocos/CocosFactory.d.ts +128 -0
- package/dist/dragonbones/cocos/CocosFactory.d.ts.map +1 -0
- package/dist/dragonbones/cocos/CocosFactory.js +231 -0
- package/dist/dragonbones/cocos/CocosSlot.d.ts +49 -0
- package/dist/dragonbones/cocos/CocosSlot.d.ts.map +1 -0
- package/dist/dragonbones/cocos/CocosSlot.js +385 -0
- package/dist/dragonbones/cocos/CocosTextureAtlasData.d.ts +53 -0
- package/dist/dragonbones/cocos/CocosTextureAtlasData.d.ts.map +1 -0
- package/dist/dragonbones/cocos/CocosTextureAtlasData.js +158 -0
- package/dist/dragonbones/dragonBones.d.ts +3 -0
- package/dist/dragonbones/dragonBones.d.ts.map +1 -0
- package/dist/dragonbones/dragonBones.js +4788 -0
- package/dist/dragonbones/index.d.ts +20 -0
- package/dist/dragonbones/index.d.ts.map +1 -0
- package/dist/dragonbones/index.js +112 -0
- package/dist/gworld/components/AnimationComponent.d.ts +65 -0
- package/dist/gworld/components/AnimationComponent.d.ts.map +1 -0
- package/dist/gworld/components/AnimationComponent.js +141 -0
- package/dist/gworld/components/CollideComponent.d.ts +64 -0
- package/dist/gworld/components/CollideComponent.d.ts.map +1 -0
- package/dist/gworld/components/CollideComponent.js +266 -0
- package/dist/gworld/components/EnhancedComponent.d.ts +21 -0
- package/dist/gworld/components/EnhancedComponent.d.ts.map +1 -0
- package/dist/gworld/components/EnhancedComponent.js +50 -0
- package/dist/gworld/components/GUIComponent.d.ts +62 -0
- package/dist/gworld/components/GUIComponent.d.ts.map +1 -0
- package/dist/gworld/components/GUIComponent.js +158 -0
- package/dist/gworld/components/NoRenderComponent.d.ts +36 -0
- package/dist/gworld/components/NoRenderComponent.d.ts.map +1 -0
- package/dist/gworld/components/NoRenderComponent.js +74 -0
- package/dist/gworld/components/NodeComp.d.ts +184 -0
- package/dist/gworld/components/NodeComp.d.ts.map +1 -0
- package/dist/gworld/components/NodeComp.js +425 -0
- package/dist/gworld/components/RenderComponent.d.ts +53 -0
- package/dist/gworld/components/RenderComponent.d.ts.map +1 -0
- package/dist/gworld/components/RenderComponent.js +158 -0
- package/dist/gworld/core/Scene.d.ts +5 -0
- package/dist/gworld/core/Scene.d.ts.map +1 -0
- package/dist/gworld/core/Scene.js +38 -0
- package/dist/gworld/core/decorator.d.ts +9 -0
- package/dist/gworld/core/decorator.d.ts.map +1 -0
- package/dist/gworld/core/decorator.js +43 -0
- package/dist/gworld/index.d.ts +8 -0
- package/dist/gworld/index.d.ts.map +1 -0
- package/dist/gworld/index.js +43 -0
- package/dist/gworld/systems/AnimationSystem.d.ts +7 -0
- package/dist/gworld/systems/AnimationSystem.d.ts.map +1 -0
- package/dist/gworld/systems/AnimationSystem.js +38 -0
- package/dist/gworld/systems/CollideSystem.d.ts +19 -0
- package/dist/gworld/systems/CollideSystem.d.ts.map +1 -0
- package/dist/gworld/systems/CollideSystem.js +183 -0
- package/dist/gworld/systems/GUISystem.d.ts +7 -0
- package/dist/gworld/systems/GUISystem.d.ts.map +1 -0
- package/dist/gworld/systems/GUISystem.js +147 -0
- package/dist/gworld/systems/NoRenderSystem.d.ts +7 -0
- package/dist/gworld/systems/NoRenderSystem.d.ts.map +1 -0
- package/dist/gworld/systems/NoRenderSystem.js +93 -0
- package/dist/gworld/systems/RenderSystem.d.ts +15 -0
- package/dist/gworld/systems/RenderSystem.d.ts.map +1 -0
- package/dist/gworld/systems/RenderSystem.js +115 -0
- package/dist/helper/Intersection.d.ts +6 -0
- package/dist/helper/Intersection.d.ts.map +1 -0
- package/dist/helper/Intersection.js +117 -0
- package/dist/helper/NodePool.d.ts +9 -0
- package/dist/helper/NodePool.d.ts.map +1 -0
- package/dist/helper/NodePool.js +29 -0
- package/dist/helper/action.d.ts +9 -0
- package/dist/helper/action.d.ts.map +1 -0
- package/dist/helper/action.js +34 -0
- package/dist/helper/director.d.ts +3 -0
- package/dist/helper/director.d.ts.map +1 -0
- package/dist/helper/director.js +10 -0
- package/dist/helper/html-text-parser.d.ts +30 -0
- package/dist/helper/html-text-parser.d.ts.map +1 -0
- package/dist/helper/html-text-parser.js +354 -0
- package/dist/helper/math.d.ts +4 -0
- package/dist/helper/math.d.ts.map +1 -0
- package/dist/helper/math.js +9 -0
- package/dist/helper/utils.d.ts +14 -0
- package/dist/helper/utils.d.ts.map +1 -0
- package/dist/helper/utils.js +81 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/polyfills.d.ts +54 -0
- package/dist/polyfills.d.ts.map +1 -0
- package/dist/polyfills.js +168 -0
- package/dist/spine/CCSkeleton.d.ts +2 -0
- package/dist/spine/CCSkeleton.d.ts.map +1 -0
- package/dist/spine/CCSkeleton.js +380 -0
- package/dist/spine/CCSkeletonAnimation.d.ts +16 -0
- package/dist/spine/CCSkeletonAnimation.d.ts.map +1 -0
- package/dist/spine/CCSkeletonAnimation.js +353 -0
- package/dist/spine/CCSkeletonCanvasRenderCmd.d.ts +2 -0
- package/dist/spine/CCSkeletonCanvasRenderCmd.d.ts.map +1 -0
- package/dist/spine/CCSkeletonCanvasRenderCmd.js +229 -0
- package/dist/spine/CCSkeletonTexture.d.ts +2 -0
- package/dist/spine/CCSkeletonTexture.d.ts.map +1 -0
- package/dist/spine/CCSkeletonTexture.js +98 -0
- package/dist/spine/CCSkeletonWebGLRenderCmd.d.ts +2 -0
- package/dist/spine/CCSkeletonWebGLRenderCmd.d.ts.map +1 -0
- package/dist/spine/CCSkeletonWebGLRenderCmd.js +317 -0
- package/package.json +32 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Constructor } from 'entityx-ts';
|
|
2
|
+
import { BaseComponentProps } from '../../../@types/safex';
|
|
3
|
+
import { NodeComp } from './NodeComp';
|
|
4
|
+
export declare class EnhancedComponent<Props = object, N extends NodeComp<any> = NodeComp<any>> {
|
|
5
|
+
props: Props;
|
|
6
|
+
constructor(data?: BaseComponentProps & Props);
|
|
7
|
+
init(data?: Props): void;
|
|
8
|
+
static hasRender: boolean;
|
|
9
|
+
node: N;
|
|
10
|
+
addComponent<T extends EnhancedComponent>(instance: T): T;
|
|
11
|
+
getComponent<T extends EnhancedComponent>(component: Constructor<T>): T;
|
|
12
|
+
schedule(callback: (arg: any) => void, interval: number, repeat?: number, delay?: number): void;
|
|
13
|
+
unschedule(callback: (arg: any) => void): void;
|
|
14
|
+
unscheduleAllCallbacks(): void;
|
|
15
|
+
scheduleOnce(callback: (arg: any) => void, delay: number, key?: string): void;
|
|
16
|
+
getComponentsInChildren<T extends ComponentType>(component: Constructor<T>): T[];
|
|
17
|
+
getComponentInChildren<T extends ComponentType>(component: Constructor<T>): T;
|
|
18
|
+
isEqual(other: EnhancedComponent): boolean;
|
|
19
|
+
}
|
|
20
|
+
export type ComponentType = EnhancedComponent | NodeComp;
|
|
21
|
+
//# sourceMappingURL=EnhancedComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnhancedComponent.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/EnhancedComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAExC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,qBAAa,iBAAiB,CAAC,KAAK,GAAG,MAAM,EAAE,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC;IACpF,KAAK,EAAE,KAAK,CAAY;gBACZ,IAAI,CAAC,EAAE,kBAAkB,GAAG,KAAK;IAG7C,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK;IAQjB,MAAM,CAAC,SAAS,UAAO;IACvB,IAAI,EAAE,CAAC,CAAA;IACP,YAAY,CAAC,CAAC,SAAS,iBAAiB,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC;IAGzD,YAAY,CAAC,CAAC,SAAS,iBAAiB,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC;IAGvE,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,MAAgC,EAAE,KAAK,SAAI;IAG5G,UAAU,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI;IAGvC,sBAAsB;IAGtB,YAAY,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;IAGtE,uBAAuB,CAAC,CAAC,SAAS,aAAa,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;IAGhF,sBAAsB,CAAC,CAAC,SAAS,aAAa,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC;IAG7E,OAAO,CAAC,KAAK,EAAE,iBAAiB;CAGjC;AAED,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,QAAQ,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnhancedComponent = void 0;
|
|
4
|
+
var EnhancedComponent = /** @class */ (function () {
|
|
5
|
+
function EnhancedComponent(data) {
|
|
6
|
+
this.props = {};
|
|
7
|
+
this.init(data);
|
|
8
|
+
}
|
|
9
|
+
EnhancedComponent.prototype.init = function (data) {
|
|
10
|
+
var _this = this;
|
|
11
|
+
if (data) {
|
|
12
|
+
// console.log('constructor', this.constructor.name, data)
|
|
13
|
+
Object.keys(data).forEach(function (key) {
|
|
14
|
+
_this.props[key] = data[key];
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
EnhancedComponent.prototype.addComponent = function (instance) {
|
|
19
|
+
return this.node.addComponent(instance);
|
|
20
|
+
};
|
|
21
|
+
EnhancedComponent.prototype.getComponent = function (component) {
|
|
22
|
+
return this.node.getComponent(component);
|
|
23
|
+
};
|
|
24
|
+
EnhancedComponent.prototype.schedule = function (callback, interval, repeat, delay) {
|
|
25
|
+
if (repeat === void 0) { repeat = cc.macro.REPEAT_FOREVER; }
|
|
26
|
+
if (delay === void 0) { delay = 0; }
|
|
27
|
+
this.node.instance.schedule(callback.bind(this), interval, repeat, delay);
|
|
28
|
+
};
|
|
29
|
+
EnhancedComponent.prototype.unschedule = function (callback) {
|
|
30
|
+
this.node.instance.unschedule(callback.bind(this));
|
|
31
|
+
};
|
|
32
|
+
EnhancedComponent.prototype.unscheduleAllCallbacks = function () {
|
|
33
|
+
this.node.instance.unscheduleAllCallbacks();
|
|
34
|
+
};
|
|
35
|
+
EnhancedComponent.prototype.scheduleOnce = function (callback, delay, key) {
|
|
36
|
+
this.node.instance.scheduleOnce(callback, delay, key);
|
|
37
|
+
};
|
|
38
|
+
EnhancedComponent.prototype.getComponentsInChildren = function (component) {
|
|
39
|
+
return this.node.getComponentsInChildren(component);
|
|
40
|
+
};
|
|
41
|
+
EnhancedComponent.prototype.getComponentInChildren = function (component) {
|
|
42
|
+
return this.node.getComponentInChildren(component);
|
|
43
|
+
};
|
|
44
|
+
EnhancedComponent.prototype.isEqual = function (other) {
|
|
45
|
+
return this.node.entity.id === other.node.entity.id;
|
|
46
|
+
};
|
|
47
|
+
EnhancedComponent.hasRender = true;
|
|
48
|
+
return EnhancedComponent;
|
|
49
|
+
}());
|
|
50
|
+
exports.EnhancedComponent = EnhancedComponent;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { LabelCompProps, LabelOutlineCompProps, LabelShadowCompProps, ProgressTimerProps } from '../../../@types/safex';
|
|
2
|
+
import { Color4B, Size, Vec2 } from '../../polyfills';
|
|
3
|
+
import { ComponentX, NoRenderComponentX } from '../core/decorator';
|
|
4
|
+
export declare const FillType: {
|
|
5
|
+
HORIZONTAL: number;
|
|
6
|
+
VERTICAL: number;
|
|
7
|
+
RADIAL: number;
|
|
8
|
+
};
|
|
9
|
+
type Keys = keyof typeof FillType;
|
|
10
|
+
type Values = (typeof FillType)[Keys];
|
|
11
|
+
interface ButtonCompProps {
|
|
12
|
+
normalImage?: string;
|
|
13
|
+
selectedImage?: string;
|
|
14
|
+
disableImage?: string;
|
|
15
|
+
zoomScale?: number;
|
|
16
|
+
onPress?: (target: ButtonComp) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare class ButtonComp extends NoRenderComponentX<ButtonCompProps> {
|
|
19
|
+
texType: ccui.Widget.TextureType;
|
|
20
|
+
clickEvents: any[];
|
|
21
|
+
setOnPress(cb: (target: ButtonComp) => void): void;
|
|
22
|
+
set enabled(val: any);
|
|
23
|
+
}
|
|
24
|
+
export declare class ProgressTimerComp extends ComponentX<ProgressTimerProps & {
|
|
25
|
+
$ref?: ProgressTimerComp;
|
|
26
|
+
}> {
|
|
27
|
+
spriteFrame: string;
|
|
28
|
+
fillType: Values;
|
|
29
|
+
fillRange: number;
|
|
30
|
+
fillCenter: Vec2;
|
|
31
|
+
isReverse: boolean;
|
|
32
|
+
getFillRange(): number;
|
|
33
|
+
setFillStart(val: number): void;
|
|
34
|
+
setFillRange(val: number): void;
|
|
35
|
+
}
|
|
36
|
+
export declare class LabelComp extends ComponentX<LabelCompProps & {
|
|
37
|
+
$ref?: LabelComp;
|
|
38
|
+
}, ccui.Text> {
|
|
39
|
+
getString(): string;
|
|
40
|
+
setString(val: string): void;
|
|
41
|
+
}
|
|
42
|
+
export declare class RichTextComp extends ComponentX<LabelCompProps, ccui.RichText> {
|
|
43
|
+
get string(): string;
|
|
44
|
+
set string(val: string);
|
|
45
|
+
}
|
|
46
|
+
export declare class LabelOutlineComp extends NoRenderComponentX<LabelOutlineCompProps> {
|
|
47
|
+
color: typeof Color4B;
|
|
48
|
+
width: Float;
|
|
49
|
+
}
|
|
50
|
+
export declare class LabelShadowComp extends NoRenderComponentX<LabelShadowCompProps> {
|
|
51
|
+
color: typeof Color4B;
|
|
52
|
+
blur: Float;
|
|
53
|
+
offset: Size;
|
|
54
|
+
}
|
|
55
|
+
export declare class ScrollViewComp extends ComponentX<cc.ScrollView> {
|
|
56
|
+
protected viewSize: Size;
|
|
57
|
+
protected contentSize: Size;
|
|
58
|
+
}
|
|
59
|
+
export declare class BlockInputEventsComp extends NoRenderComponentX {
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=GUIComponent.d.ts.map
|
|
@@ -0,0 +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;AAEvH,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,MAA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E,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,qBAAa,cAAe,SAAQ,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC;IAC3D,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAA;IACxB,SAAS,CAAC,WAAW,EAAE,IAAI,CAAA;CAC5B;AAED,qBAAa,oBAAqB,SAAQ,kBAAkB;CAAG"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.BlockInputEventsComp = exports.ScrollViewComp = exports.LabelShadowComp = exports.LabelOutlineComp = exports.RichTextComp = exports.LabelComp = exports.ProgressTimerComp = exports.ButtonComp = exports.FillType = void 0;
|
|
19
|
+
var html_text_parser_1 = require("../../helper/html-text-parser");
|
|
20
|
+
var polyfills_1 = require("../../polyfills");
|
|
21
|
+
var decorator_1 = require("../core/decorator");
|
|
22
|
+
exports.FillType = {
|
|
23
|
+
HORIZONTAL: 0,
|
|
24
|
+
VERTICAL: 1,
|
|
25
|
+
RADIAL: 2,
|
|
26
|
+
};
|
|
27
|
+
var _htmlTextParser = new html_text_parser_1.HtmlTextParser();
|
|
28
|
+
var ButtonComp = /** @class */ (function (_super) {
|
|
29
|
+
__extends(ButtonComp, _super);
|
|
30
|
+
function ButtonComp() {
|
|
31
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
32
|
+
_this.clickEvents = [];
|
|
33
|
+
return _this;
|
|
34
|
+
}
|
|
35
|
+
ButtonComp.prototype.setOnPress = function (cb) {
|
|
36
|
+
this.props.onPress = cb;
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(ButtonComp.prototype, "enabled", {
|
|
39
|
+
set: function (val) {
|
|
40
|
+
this.node.setTouchEnabled(val);
|
|
41
|
+
},
|
|
42
|
+
enumerable: false,
|
|
43
|
+
configurable: true
|
|
44
|
+
});
|
|
45
|
+
return ButtonComp;
|
|
46
|
+
}(decorator_1.NoRenderComponentX));
|
|
47
|
+
exports.ButtonComp = ButtonComp;
|
|
48
|
+
var ProgressTimerComp = /** @class */ (function (_super) {
|
|
49
|
+
__extends(ProgressTimerComp, _super);
|
|
50
|
+
function ProgressTimerComp() {
|
|
51
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
52
|
+
}
|
|
53
|
+
ProgressTimerComp.prototype.getFillRange = function () {
|
|
54
|
+
if (this.node.instance instanceof cc.ProgressTimer) {
|
|
55
|
+
return this.node.instance.getPercentage() * 0.01;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
ProgressTimerComp.prototype.setFillStart = function (val) {
|
|
59
|
+
if (this.node.instance instanceof cc.ProgressTimer) {
|
|
60
|
+
this.node.instance.setMidpoint((0, polyfills_1.Vec2)(val, val));
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
ProgressTimerComp.prototype.setFillRange = function (val) {
|
|
64
|
+
if (this.node.instance instanceof cc.ProgressTimer) {
|
|
65
|
+
this.node.instance.setPercentage(val * 100);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
return ProgressTimerComp;
|
|
69
|
+
}(decorator_1.ComponentX));
|
|
70
|
+
exports.ProgressTimerComp = ProgressTimerComp;
|
|
71
|
+
var LabelComp = /** @class */ (function (_super) {
|
|
72
|
+
__extends(LabelComp, _super);
|
|
73
|
+
function LabelComp() {
|
|
74
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
75
|
+
}
|
|
76
|
+
// protected font: string
|
|
77
|
+
// protected string: string
|
|
78
|
+
// protected size: number
|
|
79
|
+
LabelComp.prototype.getString = function () {
|
|
80
|
+
return this.props.string;
|
|
81
|
+
};
|
|
82
|
+
LabelComp.prototype.setString = function (val) {
|
|
83
|
+
this.props.string = val;
|
|
84
|
+
if (this.node.instance instanceof ccui.Text) {
|
|
85
|
+
this.node.instance.setString(val);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
return LabelComp;
|
|
89
|
+
}(decorator_1.ComponentX));
|
|
90
|
+
exports.LabelComp = LabelComp;
|
|
91
|
+
var RichTextComp = /** @class */ (function (_super) {
|
|
92
|
+
__extends(RichTextComp, _super);
|
|
93
|
+
function RichTextComp() {
|
|
94
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
95
|
+
}
|
|
96
|
+
Object.defineProperty(RichTextComp.prototype, "string", {
|
|
97
|
+
get: function () {
|
|
98
|
+
return this.props.string;
|
|
99
|
+
},
|
|
100
|
+
set: function (val) {
|
|
101
|
+
this.props.string = val;
|
|
102
|
+
if (this.node.instance instanceof ccui.RichText) {
|
|
103
|
+
var newTextArray = _htmlTextParser.parse(val);
|
|
104
|
+
console.log(newTextArray);
|
|
105
|
+
this.node.instance._richElements = [];
|
|
106
|
+
this.node.instance._formatTextDirty = true;
|
|
107
|
+
this.node.instance.formatText();
|
|
108
|
+
for (var index = 0; index < newTextArray.length; index++) {
|
|
109
|
+
var _a = newTextArray[index], style = _a.style, text = _a.text;
|
|
110
|
+
var color = style && style.color ? cc.hexToColor(style.color) : cc.Color.WHITE;
|
|
111
|
+
var fontName = cc.path.basename(this.props.font, '.ttf');
|
|
112
|
+
var richText = ccui.RichElementText.create(index, color, 255, text, fontName, this.props.size || 64);
|
|
113
|
+
// if (style && style.newline) {
|
|
114
|
+
// console.log('newline')
|
|
115
|
+
// this.node.instance._addNewLine()
|
|
116
|
+
// }
|
|
117
|
+
this.node.instance.pushBackElement(richText);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
enumerable: false,
|
|
122
|
+
configurable: true
|
|
123
|
+
});
|
|
124
|
+
return RichTextComp;
|
|
125
|
+
}(decorator_1.ComponentX));
|
|
126
|
+
exports.RichTextComp = RichTextComp;
|
|
127
|
+
var LabelOutlineComp = /** @class */ (function (_super) {
|
|
128
|
+
__extends(LabelOutlineComp, _super);
|
|
129
|
+
function LabelOutlineComp() {
|
|
130
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
131
|
+
}
|
|
132
|
+
return LabelOutlineComp;
|
|
133
|
+
}(decorator_1.NoRenderComponentX));
|
|
134
|
+
exports.LabelOutlineComp = LabelOutlineComp;
|
|
135
|
+
var LabelShadowComp = /** @class */ (function (_super) {
|
|
136
|
+
__extends(LabelShadowComp, _super);
|
|
137
|
+
function LabelShadowComp() {
|
|
138
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
139
|
+
}
|
|
140
|
+
return LabelShadowComp;
|
|
141
|
+
}(decorator_1.NoRenderComponentX));
|
|
142
|
+
exports.LabelShadowComp = LabelShadowComp;
|
|
143
|
+
var ScrollViewComp = /** @class */ (function (_super) {
|
|
144
|
+
__extends(ScrollViewComp, _super);
|
|
145
|
+
function ScrollViewComp() {
|
|
146
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
147
|
+
}
|
|
148
|
+
return ScrollViewComp;
|
|
149
|
+
}(decorator_1.ComponentX));
|
|
150
|
+
exports.ScrollViewComp = ScrollViewComp;
|
|
151
|
+
var BlockInputEventsComp = /** @class */ (function (_super) {
|
|
152
|
+
__extends(BlockInputEventsComp, _super);
|
|
153
|
+
function BlockInputEventsComp() {
|
|
154
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
155
|
+
}
|
|
156
|
+
return BlockInputEventsComp;
|
|
157
|
+
}(decorator_1.NoRenderComponentX));
|
|
158
|
+
exports.BlockInputEventsComp = BlockInputEventsComp;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Touch } from '../../polyfills';
|
|
2
|
+
import { NoRenderComponentX } from '../core/decorator';
|
|
3
|
+
import { EventCallbackType, NodeComp } from './NodeComp';
|
|
4
|
+
type TouchEVentCallback = (touch?: Touch, node?: NodeComp) => void;
|
|
5
|
+
export interface EventMap {
|
|
6
|
+
[key: string]: [EventCallbackType];
|
|
7
|
+
}
|
|
8
|
+
export declare class EventRegister extends NoRenderComponentX {
|
|
9
|
+
events: EventMap;
|
|
10
|
+
on(name: string, callback: EventCallbackType, target?: any): void;
|
|
11
|
+
off(name: string, callback?: EventCallbackType, target?: any): any;
|
|
12
|
+
emit(name: string, ...params: any): void;
|
|
13
|
+
}
|
|
14
|
+
interface TouchEventProps {
|
|
15
|
+
onTouchStart?: TouchEVentCallback;
|
|
16
|
+
onTouchMove?: TouchEVentCallback;
|
|
17
|
+
onTouchEnd?: TouchEVentCallback;
|
|
18
|
+
onTouchCancel?: TouchEVentCallback;
|
|
19
|
+
}
|
|
20
|
+
export declare class TouchEventRegister extends NoRenderComponentX<TouchEventProps> {
|
|
21
|
+
listener: cc.EventListener;
|
|
22
|
+
touch: cc.Touch;
|
|
23
|
+
}
|
|
24
|
+
interface ExtraDataProps {
|
|
25
|
+
key: string;
|
|
26
|
+
value: Integer | Float | string;
|
|
27
|
+
}
|
|
28
|
+
export declare class ExtraDataComp extends NoRenderComponentX<ExtraDataProps> {
|
|
29
|
+
data: {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
};
|
|
32
|
+
getData<T>(key: string): T;
|
|
33
|
+
setData<T>(key: string, val: T): void;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=NoRenderComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NoRenderComponent.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/NoRenderComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAExD,KAAK,kBAAkB,GAAG,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,QAAQ,KAAK,IAAI,CAAA;AAElE,MAAM,WAAW,QAAQ;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,iBAAiB,CAAC,CAAA;CACnC;AAED,qBAAa,aAAc,SAAQ,kBAAkB;IACnD,MAAM,EAAE,QAAQ,CAAK;IAErB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,GAAG;IAS1D,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,GAAG;IAK5D,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG;CAKlC;AAED,UAAU,eAAe;IACvB,YAAY,CAAC,EAAE,kBAAkB,CAAA;IACjC,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAChC,UAAU,CAAC,EAAE,kBAAkB,CAAA;IAC/B,aAAa,CAAC,EAAE,kBAAkB,CAAA;CACnC;AACD,qBAAa,kBAAmB,SAAQ,kBAAkB,CAAC,eAAe,CAAC;IACzE,QAAQ,EAAE,EAAE,CAAC,aAAa,CAAA;IAC1B,KAAK,EAAE,EAAE,CAAC,KAAK,CAAA;CAChB;AAED,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;CAChC;AACD,qBAAa,aAAc,SAAQ,kBAAkB,CAAC,cAAc,CAAC;IACnE,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAK;IACjC,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC;IAG1B,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;CAG/B"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ExtraDataComp = exports.TouchEventRegister = exports.EventRegister = void 0;
|
|
19
|
+
var decorator_1 = require("../core/decorator");
|
|
20
|
+
var EventRegister = /** @class */ (function (_super) {
|
|
21
|
+
__extends(EventRegister, _super);
|
|
22
|
+
function EventRegister() {
|
|
23
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
_this.events = {};
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
EventRegister.prototype.on = function (name, callback, target) {
|
|
28
|
+
var bound = target ? callback.bind(target) : callback;
|
|
29
|
+
if (this.events[name]) {
|
|
30
|
+
this.events[name].push(bound);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this.events[name] = [bound];
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
EventRegister.prototype.off = function (name) {
|
|
37
|
+
this.events[name] = undefined;
|
|
38
|
+
};
|
|
39
|
+
EventRegister.prototype.emit = function (name) {
|
|
40
|
+
var params = [];
|
|
41
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
42
|
+
params[_i - 1] = arguments[_i];
|
|
43
|
+
}
|
|
44
|
+
if (this.events[name]) {
|
|
45
|
+
this.events[name].forEach(function (fc) { return fc.apply(void 0, params); });
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
return EventRegister;
|
|
49
|
+
}(decorator_1.NoRenderComponentX));
|
|
50
|
+
exports.EventRegister = EventRegister;
|
|
51
|
+
var TouchEventRegister = /** @class */ (function (_super) {
|
|
52
|
+
__extends(TouchEventRegister, _super);
|
|
53
|
+
function TouchEventRegister() {
|
|
54
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
55
|
+
}
|
|
56
|
+
return TouchEventRegister;
|
|
57
|
+
}(decorator_1.NoRenderComponentX));
|
|
58
|
+
exports.TouchEventRegister = TouchEventRegister;
|
|
59
|
+
var ExtraDataComp = /** @class */ (function (_super) {
|
|
60
|
+
__extends(ExtraDataComp, _super);
|
|
61
|
+
function ExtraDataComp() {
|
|
62
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
63
|
+
_this.data = {};
|
|
64
|
+
return _this;
|
|
65
|
+
}
|
|
66
|
+
ExtraDataComp.prototype.getData = function (key) {
|
|
67
|
+
return this.data[key];
|
|
68
|
+
};
|
|
69
|
+
ExtraDataComp.prototype.setData = function (key, val) {
|
|
70
|
+
this.data[key] = val;
|
|
71
|
+
};
|
|
72
|
+
return ExtraDataComp;
|
|
73
|
+
}(decorator_1.NoRenderComponentX));
|
|
74
|
+
exports.ExtraDataComp = ExtraDataComp;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { Constructor, Entity } from 'entityx-ts';
|
|
2
|
+
import { Vec2 } from '../../polyfills';
|
|
3
|
+
import { ComponentType, EnhancedComponent } from './EnhancedComponent';
|
|
4
|
+
export type EventCallbackType = (...args: any[]) => void;
|
|
5
|
+
export declare class NodeComp<C extends cc.Node = cc.Node> {
|
|
6
|
+
entity: Entity;
|
|
7
|
+
instance: C;
|
|
8
|
+
parent: NodeComp;
|
|
9
|
+
children: NodeComp[];
|
|
10
|
+
name: string;
|
|
11
|
+
_group: any;
|
|
12
|
+
constructor(instance: C, entity: Entity);
|
|
13
|
+
get uuid(): number;
|
|
14
|
+
get position(): Vec2;
|
|
15
|
+
set position(val: Vec2);
|
|
16
|
+
get x(): number;
|
|
17
|
+
set x(val: number);
|
|
18
|
+
get y(): number;
|
|
19
|
+
set y(val: number);
|
|
20
|
+
get scale(): number;
|
|
21
|
+
set scale(val: number);
|
|
22
|
+
get scaleX(): number;
|
|
23
|
+
set scaleX(val: number);
|
|
24
|
+
get scaleY(): number;
|
|
25
|
+
set scaleY(val: number);
|
|
26
|
+
get anchorX(): number;
|
|
27
|
+
set anchorX(val: number);
|
|
28
|
+
get anchorY(): number;
|
|
29
|
+
set anchorY(val: number);
|
|
30
|
+
/**
|
|
31
|
+
* Returns the rotation of the node in radians. 0 is the default rotation angle. Positive values rotate node clockwise.
|
|
32
|
+
* @function
|
|
33
|
+
* @return {Number} The rotation of the node in radians.
|
|
34
|
+
*/
|
|
35
|
+
get rotation(): number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* Sets the X rotation of the node in radians which performs a horizontal rotational skew.
|
|
39
|
+
* (support only in WebGL rendering mode)
|
|
40
|
+
* 0 is the default rotation angle.
|
|
41
|
+
* Positive values rotate node clockwise, and negative values for anti-clockwise.
|
|
42
|
+
*
|
|
43
|
+
* @param {Number} radians The X rotation in radians which performs a horizontal rotational skew.
|
|
44
|
+
*/
|
|
45
|
+
set rotation(val: number);
|
|
46
|
+
/**
|
|
47
|
+
* Returns the angle of the node in degrees. 0 is the default rotation angle. Positive values rotate node clockwise.
|
|
48
|
+
* @function
|
|
49
|
+
* @return {Number} The rotation of the node in degrees.
|
|
50
|
+
*/
|
|
51
|
+
get angle(): number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* Sets the X angle of the node in degrees which performs a horizontal rotational skew.
|
|
55
|
+
* (support only in WebGL rendering mode)
|
|
56
|
+
* 0 is the default rotation angle.
|
|
57
|
+
* Positive values rotate node clockwise, and negative values for anti-clockwise.
|
|
58
|
+
*
|
|
59
|
+
* @param {Number} degrees The X rotation in degrees which performs a horizontal rotational skew.
|
|
60
|
+
*/
|
|
61
|
+
set angle(val: number);
|
|
62
|
+
get color(): cc.Color;
|
|
63
|
+
set color(val: cc.Color);
|
|
64
|
+
get opacity(): number;
|
|
65
|
+
set opacity(val: number);
|
|
66
|
+
get active(): boolean;
|
|
67
|
+
set active(val: boolean);
|
|
68
|
+
get group(): string | number;
|
|
69
|
+
set group(val: string | number);
|
|
70
|
+
get width(): number;
|
|
71
|
+
set width(val: number);
|
|
72
|
+
get height(): number;
|
|
73
|
+
set height(val: number);
|
|
74
|
+
get zIndex(): number;
|
|
75
|
+
set zIndex(val: number);
|
|
76
|
+
get childrenCount(): number;
|
|
77
|
+
destroy(): void;
|
|
78
|
+
addComponent<T extends ComponentType>(instance: T): T;
|
|
79
|
+
getComponent<T extends ComponentType>(component: Constructor<T>): T;
|
|
80
|
+
getComponentsInChildren<T extends ComponentType>(component: Constructor<T>): T[];
|
|
81
|
+
getComponentInChildren<T extends ComponentType>(component: Constructor<T>): T;
|
|
82
|
+
hasComponentInChildren<T extends ComponentType>(component: Constructor<T>): boolean;
|
|
83
|
+
getPercent(): number;
|
|
84
|
+
setPercent(val: number): void;
|
|
85
|
+
setTouchEnabled(enabled: boolean): void;
|
|
86
|
+
addTouchEventListener(cb: any): void;
|
|
87
|
+
convertToNodeSpace(point: cc.Point): {
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
equals(other: cc.Vec2): boolean;
|
|
91
|
+
add(value: cc.Point): cc.Vec2;
|
|
92
|
+
addSelf(value: cc.Point): cc.Vec2;
|
|
93
|
+
sub(value: cc.Point): cc.Vec2;
|
|
94
|
+
mul(multiply: number): cc.Vec2;
|
|
95
|
+
mulSelf(multiply: number): cc.Vec2;
|
|
96
|
+
mag(): number;
|
|
97
|
+
normalizeSelf(): cc.Vec2;
|
|
98
|
+
normalize(): cc.Vec2;
|
|
99
|
+
cross(other: Vec2): number;
|
|
100
|
+
signAngle(other: Vec2): number;
|
|
101
|
+
lengthSqr(): number;
|
|
102
|
+
dot(other: Vec2): number;
|
|
103
|
+
angle(other: Vec2): number;
|
|
104
|
+
distance(other: /*elided*/ any): number;
|
|
105
|
+
};
|
|
106
|
+
convertToNodeSpaceAR(point: cc.Point): {
|
|
107
|
+
x: number;
|
|
108
|
+
y: number;
|
|
109
|
+
equals(other: cc.Vec2): boolean;
|
|
110
|
+
add(value: cc.Point): cc.Vec2;
|
|
111
|
+
addSelf(value: cc.Point): cc.Vec2;
|
|
112
|
+
sub(value: cc.Point): cc.Vec2;
|
|
113
|
+
mul(multiply: number): cc.Vec2;
|
|
114
|
+
mulSelf(multiply: number): cc.Vec2;
|
|
115
|
+
mag(): number;
|
|
116
|
+
normalizeSelf(): cc.Vec2;
|
|
117
|
+
normalize(): cc.Vec2;
|
|
118
|
+
cross(other: Vec2): number;
|
|
119
|
+
signAngle(other: Vec2): number;
|
|
120
|
+
lengthSqr(): number;
|
|
121
|
+
dot(other: Vec2): number;
|
|
122
|
+
angle(other: Vec2): number;
|
|
123
|
+
distance(other: /*elided*/ any): number;
|
|
124
|
+
};
|
|
125
|
+
convertToWorldSpaceAR(point: cc.Vec2): {
|
|
126
|
+
x: number;
|
|
127
|
+
y: number;
|
|
128
|
+
equals(other: cc.Vec2): boolean;
|
|
129
|
+
add(value: cc.Point): cc.Vec2;
|
|
130
|
+
addSelf(value: cc.Point): cc.Vec2;
|
|
131
|
+
sub(value: cc.Point): cc.Vec2;
|
|
132
|
+
mul(multiply: number): cc.Vec2;
|
|
133
|
+
mulSelf(multiply: number): cc.Vec2;
|
|
134
|
+
mag(): number;
|
|
135
|
+
normalizeSelf(): cc.Vec2;
|
|
136
|
+
normalize(): cc.Vec2;
|
|
137
|
+
cross(other: Vec2): number;
|
|
138
|
+
signAngle(other: Vec2): number;
|
|
139
|
+
lengthSqr(): number;
|
|
140
|
+
dot(other: Vec2): number;
|
|
141
|
+
angle(other: Vec2): number;
|
|
142
|
+
distance(other: /*elided*/ any): number;
|
|
143
|
+
};
|
|
144
|
+
getPosition(): {
|
|
145
|
+
x: number;
|
|
146
|
+
y: number;
|
|
147
|
+
equals(other: cc.Vec2): boolean;
|
|
148
|
+
add(value: cc.Point): cc.Vec2;
|
|
149
|
+
addSelf(value: cc.Point): cc.Vec2;
|
|
150
|
+
sub(value: cc.Point): cc.Vec2;
|
|
151
|
+
mul(multiply: number): cc.Vec2;
|
|
152
|
+
mulSelf(multiply: number): cc.Vec2;
|
|
153
|
+
mag(): number;
|
|
154
|
+
normalizeSelf(): cc.Vec2;
|
|
155
|
+
normalize(): cc.Vec2;
|
|
156
|
+
cross(other: Vec2): number;
|
|
157
|
+
signAngle(other: Vec2): number;
|
|
158
|
+
lengthSqr(): number;
|
|
159
|
+
dot(other: Vec2): number;
|
|
160
|
+
angle(other: Vec2): number;
|
|
161
|
+
distance(other: /*elided*/ any): number;
|
|
162
|
+
};
|
|
163
|
+
setPosition(x: number | cc.Vec2 | cc.Vec3 | cc.Point, y?: number): void;
|
|
164
|
+
setRotation(deg: number): void;
|
|
165
|
+
getRotation(): number;
|
|
166
|
+
setAnchorPoint(point: number | cc.Point, y?: number): void;
|
|
167
|
+
getAnchorPoint(): cc.Point;
|
|
168
|
+
getBoundingBox(): cc.Rect;
|
|
169
|
+
getContentSize(): cc.Size;
|
|
170
|
+
setContentSize(size: cc.Size | number, height?: number): void;
|
|
171
|
+
setColor(color: cc.Color): void;
|
|
172
|
+
setScale(scaleX: number, scaleY?: number): void;
|
|
173
|
+
runAction(atc: cc.ActionInterval): void;
|
|
174
|
+
stopAllActions(): void;
|
|
175
|
+
pauseAllActionsAndSchedule(): void;
|
|
176
|
+
resumeAllActionsAndSchedule(): void;
|
|
177
|
+
removeFromParent(cleanup?: boolean): void;
|
|
178
|
+
addChild(child: NodeComp, zOrder?: number, tag?: number): any;
|
|
179
|
+
removeAllChildren(cleanup?: any): void;
|
|
180
|
+
getData<T>(key: string): T;
|
|
181
|
+
setData<T extends Integer | Float | string>(key: string, value: T): void;
|
|
182
|
+
resolveComponent(component: EnhancedComponent<object, NodeComp>): void;
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=NodeComp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeComp.d.ts","sourceRoot":"","sources":["../../../src/gworld/components/NodeComp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIhD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,IAAI,OAAA,KAAK,IAAI,CAAA;AACjD,qBAAa,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI;IAC/C,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,CAAA;IACX,MAAM,EAAE,QAAQ,CAAA;IAChB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