@safe-engine/cocos 2.6.3 → 2.6.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/dragonbones/DragonBonesSystem.js +3 -3
- package/dist/dragonbones/PixiDragonBonesSprite.d.ts +19 -0
- package/dist/dragonbones/PixiDragonBonesSprite.d.ts.map +1 -0
- package/dist/dragonbones/PixiDragonBonesSprite.js +75 -0
- package/dist/dragonbones/db-cocos/CocosFactory.d.ts.map +1 -1
- package/dist/dragonbones/db-cocos/CocosFactory.js +2 -1
- package/dist/dragonbones/db-cocos/SimpleMeshNode.d.ts +1 -1
- package/dist/dragonbones/db-cocos/SimpleMeshNode.d.ts.map +1 -1
- package/dist/dragonbones/db-cocos/SimpleMeshNode.js +1 -1
- package/dist/gui/GUISystem.js +1 -1
- 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 +269 -0
- package/dist/gworld/components/EnhancedComponent.d.ts +22 -0
- package/dist/gworld/components/EnhancedComponent.d.ts.map +1 -0
- package/dist/gworld/components/EnhancedComponent.js +51 -0
- package/dist/gworld/components/GUIComponent.d.ts +67 -0
- package/dist/gworld/components/GUIComponent.d.ts.map +1 -0
- package/dist/gworld/components/GUIComponent.js +166 -0
- package/dist/gworld/components/NoRenderComponent.d.ts +38 -0
- package/dist/gworld/components/NoRenderComponent.d.ts.map +1 -0
- package/dist/gworld/components/NoRenderComponent.js +81 -0
- package/dist/gworld/components/NodeComp.d.ts +152 -0
- package/dist/gworld/components/NodeComp.d.ts.map +1 -0
- package/dist/gworld/components/NodeComp.js +405 -0
- package/dist/gworld/components/RenderComponent.d.ts +58 -0
- package/dist/gworld/components/RenderComponent.d.ts.map +1 -0
- package/dist/gworld/components/RenderComponent.js +166 -0
- package/dist/gworld/core/NodePool.d.ts +9 -0
- package/dist/gworld/core/NodePool.d.ts.map +1 -0
- package/dist/gworld/core/NodePool.js +30 -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 +6 -0
- package/dist/gworld/systems/AnimationSystem.d.ts.map +1 -0
- package/dist/gworld/systems/AnimationSystem.js +30 -0
- package/dist/gworld/systems/CollideSystem.d.ts +20 -0
- package/dist/gworld/systems/CollideSystem.d.ts.map +1 -0
- package/dist/gworld/systems/CollideSystem.js +171 -0
- package/dist/gworld/systems/GUISystem.d.ts +15 -0
- package/dist/gworld/systems/GUISystem.d.ts.map +1 -0
- package/dist/gworld/systems/GUISystem.js +123 -0
- package/dist/gworld/systems/NoRenderSystem.d.ts +16 -0
- package/dist/gworld/systems/NoRenderSystem.d.ts.map +1 -0
- package/dist/gworld/systems/NoRenderSystem.js +85 -0
- package/dist/gworld/systems/RenderSystem.d.ts +22 -0
- package/dist/gworld/systems/RenderSystem.d.ts.map +1 -0
- package/dist/gworld/systems/RenderSystem.js +104 -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/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/index.d.ts +1 -0
- package/dist/helper/index.d.ts.map +1 -1
- package/dist/helper/index.js +1 -0
- package/dist/safex.d.ts +10 -0
- package/dist/safex.d.ts.map +1 -0
- package/dist/safex.js +25 -0
- package/dist/spine/CCSkeleton.d.ts +2 -0
- package/dist/spine/CCSkeleton.d.ts.map +1 -0
- package/dist/spine/CCSkeleton.js +344 -0
- package/dist/spine/CCSkeletonAnimation.d.ts +16 -0
- package/dist/spine/CCSkeletonAnimation.d.ts.map +1 -0
- package/dist/spine/CCSkeletonAnimation.js +317 -0
- package/dist/spine/CCSkeletonCanvasRenderCmd.d.ts +2 -0
- package/dist/spine/CCSkeletonCanvasRenderCmd.d.ts.map +1 -0
- package/dist/spine/CCSkeletonCanvasRenderCmd.js +225 -0
- package/dist/spine/CCSkeletonTexture.d.ts +2 -0
- package/dist/spine/CCSkeletonTexture.d.ts.map +1 -0
- package/dist/spine/CCSkeletonTexture.js +62 -0
- package/dist/spine/CCSkeletonWebGLRenderCmd.d.ts +2 -0
- package/dist/spine/CCSkeletonWebGLRenderCmd.d.ts.map +1 -0
- package/dist/spine/CCSkeletonWebGLRenderCmd.js +281 -0
- package/dist/spine/PixiSpineSprite.d.ts +19 -0
- package/dist/spine/PixiSpineSprite.d.ts.map +1 -0
- package/dist/spine/PixiSpineSprite.js +72 -0
- package/package.json +1 -1
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollideSystem = void 0;
|
|
4
|
+
var entityx_ts_1 = require("entityx-ts");
|
|
5
|
+
var utils_1 = require("../../helper/utils");
|
|
6
|
+
var CollideComponent_1 = require("../components/CollideComponent");
|
|
7
|
+
var NodeComp_1 = require("../components/NodeComp");
|
|
8
|
+
var CollideSystem = /** @class */ (function () {
|
|
9
|
+
function CollideSystem() {
|
|
10
|
+
var _this = this;
|
|
11
|
+
this.listColliders = [];
|
|
12
|
+
this._contracts = [];
|
|
13
|
+
this.removeColliders = [];
|
|
14
|
+
this.enabledDebugDraw = false;
|
|
15
|
+
this.enabled = true;
|
|
16
|
+
this.colliderMatrix = [[true]];
|
|
17
|
+
this.onAddCollider = function (_a) {
|
|
18
|
+
var entity = _a.entity, component = _a.component;
|
|
19
|
+
var collider = entity.assign(new CollideComponent_1.Collider(component));
|
|
20
|
+
collider.node = entity.getComponent(NodeComp_1.NodeComp);
|
|
21
|
+
collider.props = component.props;
|
|
22
|
+
// collider.props.enable = true
|
|
23
|
+
component.node = entity.getComponent(NodeComp_1.NodeComp);
|
|
24
|
+
_this.addCollider(collider);
|
|
25
|
+
};
|
|
26
|
+
this.onRemoveCollider = function (_a) {
|
|
27
|
+
var entity = _a.entity, component = _a.component;
|
|
28
|
+
_this.removeColliders.push(component.getComponent(CollideComponent_1.Collider));
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
CollideSystem.prototype.configure = function (event_manager) {
|
|
32
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, CollideComponent_1.BoxCollider, this.onAddCollider.bind(this));
|
|
33
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, CollideComponent_1.CircleCollider, this.onAddCollider.bind(this));
|
|
34
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, CollideComponent_1.PolygonCollider, this.onAddCollider.bind(this));
|
|
35
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentRemoved, CollideComponent_1.BoxCollider, this.onRemoveCollider.bind(this));
|
|
36
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentRemoved, CollideComponent_1.CircleCollider, this.onRemoveCollider.bind(this));
|
|
37
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentRemoved, CollideComponent_1.PolygonCollider, this.onRemoveCollider.bind(this));
|
|
38
|
+
};
|
|
39
|
+
CollideSystem.prototype.update = function (entities, events, dt) {
|
|
40
|
+
var _this = this;
|
|
41
|
+
if (!this.enabled) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.listColliders.forEach(function (collider) {
|
|
45
|
+
if (!cc.sys.isObjectValid(collider.node.instance)) {
|
|
46
|
+
_this.removeColliders.push(collider);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
// this.removeColliders.forEach(comp => {
|
|
50
|
+
// this.listColliders = this.listColliders.filter(col => !col.isEqual(comp)
|
|
51
|
+
// && cc.sys.isObjectValid(col.node.instance));
|
|
52
|
+
// this._contracts = this._contracts.filter(contract => {
|
|
53
|
+
// const col1 = contract._collider1;
|
|
54
|
+
// const col2 = contract._collider2;
|
|
55
|
+
// if (col1.isEqual(comp) || !cc.sys.isObjectValid(col1.node.instance)) {
|
|
56
|
+
// if (contract._touching) {
|
|
57
|
+
// col2.node.emit('onCollisionExit', col1, col2);
|
|
58
|
+
// }
|
|
59
|
+
// return false;
|
|
60
|
+
// }
|
|
61
|
+
// if (col2.isEqual(comp) || !cc.sys.isObjectValid(col2.node.instance)) {
|
|
62
|
+
// if (contract._touching) {
|
|
63
|
+
// col1.node.emit('onCollisionExit', col2, col1);
|
|
64
|
+
// }
|
|
65
|
+
// return false;
|
|
66
|
+
// }
|
|
67
|
+
// return true;
|
|
68
|
+
// }
|
|
69
|
+
// );
|
|
70
|
+
// });
|
|
71
|
+
this.removeColliders = [];
|
|
72
|
+
var draw;
|
|
73
|
+
var _a = this, enabledDebugDraw = _a.enabledDebugDraw, debugGraphics = _a.debugGraphics;
|
|
74
|
+
if (enabledDebugDraw) {
|
|
75
|
+
draw = debugGraphics;
|
|
76
|
+
draw.clear();
|
|
77
|
+
// this.listColliders.forEach(collider => {
|
|
78
|
+
// if (collider.node && collider.node.active) {
|
|
79
|
+
// collider.update(dt, draw);
|
|
80
|
+
// }
|
|
81
|
+
// });
|
|
82
|
+
// } else {
|
|
83
|
+
// this.listColliders.forEach(collider => {
|
|
84
|
+
// if (collider.node && collider.node.active) {
|
|
85
|
+
// collider.update(dt);
|
|
86
|
+
// }
|
|
87
|
+
// });
|
|
88
|
+
}
|
|
89
|
+
for (var _i = 0, _b = entities.entities_with_components(CollideComponent_1.BoxCollider); _i < _b.length; _i++) {
|
|
90
|
+
var entt = _b[_i];
|
|
91
|
+
var comp = entt.getComponent(CollideComponent_1.BoxCollider);
|
|
92
|
+
comp.update(dt, draw);
|
|
93
|
+
}
|
|
94
|
+
for (var _c = 0, _d = entities.entities_with_components(CollideComponent_1.CircleCollider); _c < _d.length; _c++) {
|
|
95
|
+
var entt = _d[_c];
|
|
96
|
+
var comp = entt.getComponent(CollideComponent_1.CircleCollider);
|
|
97
|
+
comp.update(dt, draw);
|
|
98
|
+
}
|
|
99
|
+
for (var _e = 0, _f = entities.entities_with_components(CollideComponent_1.PolygonCollider); _e < _f.length; _e++) {
|
|
100
|
+
var entt = _f[_e];
|
|
101
|
+
var comp = entt.getComponent(CollideComponent_1.PolygonCollider);
|
|
102
|
+
comp.update(dt, draw);
|
|
103
|
+
}
|
|
104
|
+
this._contracts.forEach(function (contract) {
|
|
105
|
+
var col1 = contract._collider1;
|
|
106
|
+
var col2 = contract._collider2;
|
|
107
|
+
if (!cc.sys.isObjectValid(col1.node.instance) ||
|
|
108
|
+
!cc.sys.isObjectValid(col2.node.instance) ||
|
|
109
|
+
!col1.node ||
|
|
110
|
+
!col2.node ||
|
|
111
|
+
!col1.node.active ||
|
|
112
|
+
!col2.node.active) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
var type = contract.updateState();
|
|
116
|
+
switch (type) {
|
|
117
|
+
case CollideComponent_1.CollisionType.ENTER: {
|
|
118
|
+
if (col1.props.onCollisionEnter) {
|
|
119
|
+
col1.props.onCollisionEnter(col2);
|
|
120
|
+
}
|
|
121
|
+
if (col2.props.onCollisionEnter) {
|
|
122
|
+
col2.props.onCollisionEnter(col1);
|
|
123
|
+
}
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
case CollideComponent_1.CollisionType.STAY:
|
|
127
|
+
if (col1.props.onCollisionStay) {
|
|
128
|
+
col1.props.onCollisionStay(col2);
|
|
129
|
+
}
|
|
130
|
+
if (col2.props.onCollisionStay) {
|
|
131
|
+
col2.props.onCollisionStay(col1);
|
|
132
|
+
}
|
|
133
|
+
break;
|
|
134
|
+
case CollideComponent_1.CollisionType.EXIT:
|
|
135
|
+
if (col1.props.onCollisionExit) {
|
|
136
|
+
col1.props.onCollisionExit(col2);
|
|
137
|
+
}
|
|
138
|
+
if (col2.props.onCollisionExit) {
|
|
139
|
+
col2.props.onCollisionExit(col1);
|
|
140
|
+
}
|
|
141
|
+
break;
|
|
142
|
+
default:
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
CollideSystem.prototype.addCollider = function (collider) {
|
|
148
|
+
var _this = this;
|
|
149
|
+
this.listColliders.forEach(function (col) {
|
|
150
|
+
if ((0, utils_1.shouldCollider)(col, collider)) {
|
|
151
|
+
_this._contracts.push(new CollideComponent_1.Contract(col, collider));
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
this.listColliders.push(collider);
|
|
155
|
+
};
|
|
156
|
+
CollideSystem.prototype.removeCollider = function (collider) {
|
|
157
|
+
this.removeColliders.push(collider);
|
|
158
|
+
};
|
|
159
|
+
CollideSystem.prototype.addDebugNode = function (root) {
|
|
160
|
+
this.debugGraphics = new cc.DrawNode();
|
|
161
|
+
this.debugGraphics.zIndex = 1000;
|
|
162
|
+
root.addChild(this.debugGraphics);
|
|
163
|
+
};
|
|
164
|
+
CollideSystem.prototype.toggleDebugDraw = function (enable) {
|
|
165
|
+
if (enable === void 0) { enable = true; }
|
|
166
|
+
this.enabledDebugDraw = enable;
|
|
167
|
+
this.addDebugNode(cc.director.getRunningScene());
|
|
168
|
+
};
|
|
169
|
+
return CollideSystem;
|
|
170
|
+
}());
|
|
171
|
+
exports.CollideSystem = CollideSystem;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EntityManager, EventManager, System } from 'entityx-ts';
|
|
2
|
+
export declare class GUISystem implements System {
|
|
3
|
+
defaultFont: string;
|
|
4
|
+
configure(event_manager: EventManager): void;
|
|
5
|
+
private onAddButtonComp;
|
|
6
|
+
private onAddProgressTimerComp;
|
|
7
|
+
private onAddLabelComp;
|
|
8
|
+
private onAddLabelOutlineComp;
|
|
9
|
+
private onAddLabelShadowComp;
|
|
10
|
+
private onAddRichTextComp;
|
|
11
|
+
private onAddScrollViewComp;
|
|
12
|
+
private onAddBlockInputEventsComp;
|
|
13
|
+
update(entities: EntityManager, events: EventManager, dt: number): any;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=GUISystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GUISystem.d.ts","sourceRoot":"","sources":["../../../src/gworld/systems/GUISystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAoC,MAAM,EAAE,MAAM,YAAY,CAAA;AAiBlG,qBAAa,SAAU,YAAW,MAAM;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,aAAa,EAAE,YAAY;IAWrC,OAAO,CAAC,eAAe,CAuBtB;IAED,OAAO,CAAC,sBAAsB,CAa7B;IAED,OAAO,CAAC,cAAc,CAMrB;IAED,OAAO,CAAC,qBAAqB,CAM5B;IAED,OAAO,CAAC,oBAAoB,CAM3B;IAED,OAAO,CAAC,iBAAiB,CAQxB;IAED,OAAO,CAAC,mBAAmB,CAU1B;IAED,OAAO,CAAC,yBAAyB,CAOhC;IAED,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM;CAIjE"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GUISystem = void 0;
|
|
4
|
+
var entityx_ts_1 = require("entityx-ts");
|
|
5
|
+
var __1 = require("../..");
|
|
6
|
+
var polyfills_1 = require("../../polyfills");
|
|
7
|
+
var GUIComponent_1 = require("../components/GUIComponent");
|
|
8
|
+
var NodeComp_1 = require("../components/NodeComp");
|
|
9
|
+
var GUISystem = /** @class */ (function () {
|
|
10
|
+
function GUISystem() {
|
|
11
|
+
var _this = this;
|
|
12
|
+
this.onAddButtonComp = function (_a) {
|
|
13
|
+
var entity = _a.entity, button = _a.component;
|
|
14
|
+
var nodeComp = entity.getComponent(NodeComp_1.NodeComp);
|
|
15
|
+
// const { normalImage, selectedImage, disableImage, texType, zoomScale } = button
|
|
16
|
+
button.node = nodeComp;
|
|
17
|
+
var touchComp = entity.assign(new __1.TouchEventRegister());
|
|
18
|
+
touchComp.props.onTouchStart = function (touch) {
|
|
19
|
+
var p = touch.getLocation();
|
|
20
|
+
// console.log('onTouchBegan', p, nodeComp)
|
|
21
|
+
var rect = nodeComp.getBoundingBox();
|
|
22
|
+
var nodeSpaceLocation = nodeComp.parent.convertToNodeSpace(p);
|
|
23
|
+
if (rect.contains(nodeSpaceLocation) && button.enabled && nodeComp.active) {
|
|
24
|
+
var scale = cc.scaleTo(0.3, 1.2);
|
|
25
|
+
nodeComp.runAction(scale);
|
|
26
|
+
button.props.onPress(button);
|
|
27
|
+
// return true
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
touchComp.props.onTouchEnd = function () {
|
|
31
|
+
var scale = cc.scaleTo(0.3, 1);
|
|
32
|
+
nodeComp.runAction(scale);
|
|
33
|
+
// return true
|
|
34
|
+
};
|
|
35
|
+
touchComp.props.onTouchCancel = touchComp.props.onTouchEnd;
|
|
36
|
+
};
|
|
37
|
+
this.onAddProgressTimerComp = function (_a) {
|
|
38
|
+
var entity = _a.entity, bar = _a.component;
|
|
39
|
+
var _b = bar.props, spriteFrame = _b.spriteFrame, _c = _b.fillType, fillType = _c === void 0 ? GUIComponent_1.FillType.HORIZONTAL : _c, _d = _b.fillRange, fillRange = _d === void 0 ? 1 : _d, _e = _b.fillCenter, fillCenter = _e === void 0 ? (0, polyfills_1.Vec2)(1, 0) : _e;
|
|
40
|
+
var sprite = new cc.Sprite(spriteFrame);
|
|
41
|
+
var pTimer = new cc.ProgressTimer(sprite);
|
|
42
|
+
var ptt = fillType === GUIComponent_1.FillType.RADIAL ? cc.ProgressTimer.TYPE_RADIAL : cc.ProgressTimer.TYPE_BAR;
|
|
43
|
+
pTimer.setType(ptt);
|
|
44
|
+
if (fillType !== GUIComponent_1.FillType.RADIAL) {
|
|
45
|
+
var rate = fillType === GUIComponent_1.FillType.HORIZONTAL ? cc.p(1, 0) : cc.p(0, 1);
|
|
46
|
+
pTimer.setBarChangeRate(rate);
|
|
47
|
+
}
|
|
48
|
+
pTimer.setPercentage(fillRange * 100);
|
|
49
|
+
pTimer.setMidpoint(fillCenter);
|
|
50
|
+
bar.node = entity.assign(new NodeComp_1.NodeComp(pTimer, entity));
|
|
51
|
+
};
|
|
52
|
+
this.onAddLabelComp = function (_a) {
|
|
53
|
+
var entity = _a.entity, label = _a.component;
|
|
54
|
+
var _b = label.props, _c = _b.string, string = _c === void 0 ? '' : _c, _d = _b.font, font = _d === void 0 ? _this.defaultFont : _d, _e = _b.size, size = _e === void 0 ? 64 : _e;
|
|
55
|
+
var fontName = cc.path.basename(font, '.ttf');
|
|
56
|
+
var node = new ccui.Text(string, fontName, size);
|
|
57
|
+
node.setTextVerticalAlignment(cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM);
|
|
58
|
+
label.node = entity.assign(new NodeComp_1.NodeComp(node, entity));
|
|
59
|
+
};
|
|
60
|
+
this.onAddLabelOutlineComp = function (_a) {
|
|
61
|
+
var entity = _a.entity, outline = _a.component;
|
|
62
|
+
var _b = outline.props, color = _b.color, width = _b.width;
|
|
63
|
+
var node = entity.getComponent(NodeComp_1.NodeComp);
|
|
64
|
+
if (node.instance instanceof ccui.Text) {
|
|
65
|
+
node.instance.enableOutline(color, width);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
this.onAddLabelShadowComp = function (_a) {
|
|
69
|
+
var entity = _a.entity, shadow = _a.component;
|
|
70
|
+
var _b = shadow.props, color = _b.color, blur = _b.blur, offset = _b.offset;
|
|
71
|
+
var node = entity.getComponent(NodeComp_1.NodeComp);
|
|
72
|
+
if (node.instance instanceof ccui.Text) {
|
|
73
|
+
node.instance.enableShadow(color, offset, blur);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
this.onAddRichTextComp = function (_a) {
|
|
77
|
+
var entity = _a.entity, rich = _a.component;
|
|
78
|
+
var _b = rich.props.string, string = _b === void 0 ? '' : _b;
|
|
79
|
+
var node = new ccui.RichText();
|
|
80
|
+
node.width = 500;
|
|
81
|
+
node.height = 300;
|
|
82
|
+
node.ignoreContentAdaptWithSize(false);
|
|
83
|
+
rich.node = entity.assign(new NodeComp_1.NodeComp(node, entity));
|
|
84
|
+
rich.string = string;
|
|
85
|
+
};
|
|
86
|
+
this.onAddScrollViewComp = function (_a) {
|
|
87
|
+
var entity = _a.entity, scrollView = _a.component;
|
|
88
|
+
var _b = scrollView.props, viewSize = _b.viewSize, contentSize = _b.contentSize, _c = _b.direction, direction = _c === void 0 ? cc.SCROLLVIEW_DIRECTION_VERTICAL : _c;
|
|
89
|
+
var node = new cc.ScrollView(viewSize);
|
|
90
|
+
node.setContentSize(contentSize);
|
|
91
|
+
node.setViewSize(viewSize);
|
|
92
|
+
node.setDirection(direction);
|
|
93
|
+
// node.setContentOffset(cc.p(0, viewSize.height - contentSize.height))
|
|
94
|
+
// node.setTouchEnabled(false)
|
|
95
|
+
node.setBounceable(false);
|
|
96
|
+
scrollView.node = entity.assign(new NodeComp_1.NodeComp(node, entity));
|
|
97
|
+
};
|
|
98
|
+
this.onAddBlockInputEventsComp = function (_a) {
|
|
99
|
+
var entity = _a.entity, blockInput = _a.component;
|
|
100
|
+
var node = entity.getComponent(NodeComp_1.NodeComp);
|
|
101
|
+
if (node.instance instanceof ccui.ImageView) {
|
|
102
|
+
node.instance.setTouchEnabled(true);
|
|
103
|
+
node.instance.setScale9Enabled(true);
|
|
104
|
+
}
|
|
105
|
+
blockInput.node = node;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
GUISystem.prototype.configure = function (event_manager) {
|
|
109
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, GUIComponent_1.ButtonComp, this.onAddButtonComp);
|
|
110
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, GUIComponent_1.ProgressTimerComp, this.onAddProgressTimerComp);
|
|
111
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, GUIComponent_1.LabelComp, this.onAddLabelComp);
|
|
112
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, GUIComponent_1.LabelOutlineComp, this.onAddLabelOutlineComp);
|
|
113
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, GUIComponent_1.LabelShadowComp, this.onAddLabelShadowComp);
|
|
114
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, GUIComponent_1.RichTextComp, this.onAddRichTextComp);
|
|
115
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, GUIComponent_1.ScrollViewComp, this.onAddScrollViewComp);
|
|
116
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, GUIComponent_1.BlockInputEventsComp, this.onAddBlockInputEventsComp);
|
|
117
|
+
};
|
|
118
|
+
GUISystem.prototype.update = function () {
|
|
119
|
+
// throw new Error('Method not implemented.');
|
|
120
|
+
};
|
|
121
|
+
return GUISystem;
|
|
122
|
+
}());
|
|
123
|
+
exports.GUISystem = GUISystem;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EntityManager, EventManager, System } from 'entityx-ts';
|
|
2
|
+
export declare class NoRenderSystem implements System {
|
|
3
|
+
configure(event_manager: EventManager): void;
|
|
4
|
+
onAddTouchEventRegister: ({ entity, component }: {
|
|
5
|
+
entity: any;
|
|
6
|
+
component: any;
|
|
7
|
+
}) => void;
|
|
8
|
+
onAddExtraDataComp: ({ component }: {
|
|
9
|
+
component: any;
|
|
10
|
+
}) => void;
|
|
11
|
+
onRemovedTouchEventRegister: ({ component }: {
|
|
12
|
+
component: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
update(entities: EntityManager, events: EventManager, dt: number): any;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=NoRenderSystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NoRenderSystem.d.ts","sourceRoot":"","sources":["../../../src/gworld/systems/NoRenderSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAc,MAAM,EAAE,MAAM,YAAY,CAAA;AAM5E,qBAAa,cAAe,YAAW,MAAM;IAC3C,SAAS,CAAC,aAAa,EAAE,YAAY;IAMrC,uBAAuB;;;eAiDtB;IAED,kBAAkB;;eAIjB;IAED,2BAA2B;;eAM1B;IAED,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM;CAIjE"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoRenderSystem = void 0;
|
|
4
|
+
var entityx_ts_1 = require("entityx-ts");
|
|
5
|
+
var NodeComp_1 = require("../components/NodeComp");
|
|
6
|
+
var NoRenderComponent_1 = require("../components/NoRenderComponent");
|
|
7
|
+
var NoRenderSystem = /** @class */ (function () {
|
|
8
|
+
function NoRenderSystem() {
|
|
9
|
+
this.onAddTouchEventRegister = function (_a) {
|
|
10
|
+
var entity = _a.entity, component = _a.component;
|
|
11
|
+
var ett = entity;
|
|
12
|
+
var touchComp = component;
|
|
13
|
+
var nodeComp = ett.getComponent(NodeComp_1.NodeComp);
|
|
14
|
+
touchComp.node = nodeComp;
|
|
15
|
+
touchComp.listener = cc.eventManager.addListener({
|
|
16
|
+
event: cc.EventListener.TOUCH_ONE_BY_ONE,
|
|
17
|
+
swallowTouches: true,
|
|
18
|
+
onTouchBegan: function (touch) {
|
|
19
|
+
var onTouchStart = touchComp.props.onTouchStart;
|
|
20
|
+
// console.log('onTouchBegan', onTouchStart)
|
|
21
|
+
if (!nodeComp.parent) {
|
|
22
|
+
if (onTouchStart) {
|
|
23
|
+
onTouchStart(touch, nodeComp);
|
|
24
|
+
}
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
var p = touch.getLocation();
|
|
28
|
+
var rect = nodeComp.getBoundingBox();
|
|
29
|
+
var nodeSpaceLocation = nodeComp.parent.convertToNodeSpace(p);
|
|
30
|
+
if (rect.contains(nodeSpaceLocation)) {
|
|
31
|
+
if (onTouchStart) {
|
|
32
|
+
onTouchStart(touch, nodeComp);
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
onTouchMoved: function (touch) {
|
|
38
|
+
var onTouchMove = touchComp.props.onTouchMove;
|
|
39
|
+
if (!onTouchMove)
|
|
40
|
+
return false;
|
|
41
|
+
onTouchMove(touch, nodeComp);
|
|
42
|
+
return true;
|
|
43
|
+
},
|
|
44
|
+
onTouchEnded: function (touch) {
|
|
45
|
+
var onTouchEnd = touchComp.props.onTouchEnd;
|
|
46
|
+
if (!onTouchEnd)
|
|
47
|
+
return false;
|
|
48
|
+
onTouchEnd(touch, nodeComp);
|
|
49
|
+
return true;
|
|
50
|
+
},
|
|
51
|
+
onTouchCancelled: function (touch) {
|
|
52
|
+
var onTouchCancel = touchComp.props.onTouchCancel;
|
|
53
|
+
if (!onTouchCancel)
|
|
54
|
+
return false;
|
|
55
|
+
onTouchCancel(touch, nodeComp);
|
|
56
|
+
return true;
|
|
57
|
+
},
|
|
58
|
+
}, nodeComp.instance);
|
|
59
|
+
};
|
|
60
|
+
this.onAddExtraDataComp = function (_a) {
|
|
61
|
+
var component = _a.component;
|
|
62
|
+
var extra = component;
|
|
63
|
+
var _b = extra.props, key = _b.key, value = _b.value;
|
|
64
|
+
extra.data[key] = value;
|
|
65
|
+
};
|
|
66
|
+
this.onRemovedTouchEventRegister = function (_a) {
|
|
67
|
+
var component = _a.component;
|
|
68
|
+
var touchComp = component;
|
|
69
|
+
if (touchComp.listener) {
|
|
70
|
+
cc.eventManager.removeListener(touchComp.listener);
|
|
71
|
+
touchComp.listener = null;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
NoRenderSystem.prototype.configure = function (event_manager) {
|
|
76
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, NoRenderComponent_1.ExtraDataComp, this.onAddExtraDataComp);
|
|
77
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, NoRenderComponent_1.TouchEventRegister, this.onAddTouchEventRegister);
|
|
78
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentRemoved, NoRenderComponent_1.TouchEventRegister, this.onRemovedTouchEventRegister);
|
|
79
|
+
};
|
|
80
|
+
NoRenderSystem.prototype.update = function () {
|
|
81
|
+
// throw new Error('Method not implemented.');
|
|
82
|
+
};
|
|
83
|
+
return NoRenderSystem;
|
|
84
|
+
}());
|
|
85
|
+
exports.NoRenderSystem = NoRenderSystem;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EntityManager, EventManager, System } from 'entityx-ts';
|
|
2
|
+
export declare enum SpriteTypes {
|
|
3
|
+
SIMPLE = 0,
|
|
4
|
+
SLICED = 1,
|
|
5
|
+
TILED = 2,
|
|
6
|
+
FILLED = 3,
|
|
7
|
+
MESH = 4,
|
|
8
|
+
ANIMATION = 5
|
|
9
|
+
}
|
|
10
|
+
export declare class RenderSystem implements System {
|
|
11
|
+
configure(event_manager: EventManager): void;
|
|
12
|
+
private onAddNodeRender;
|
|
13
|
+
private onAddSpriteRender;
|
|
14
|
+
private onAddMaskRender;
|
|
15
|
+
private onAddSpineSkeleton;
|
|
16
|
+
private onAddGraphicsRender;
|
|
17
|
+
private onAddParticleComp;
|
|
18
|
+
private onAddTiledMap;
|
|
19
|
+
private onRemovedNodeComp;
|
|
20
|
+
update(entities: EntityManager, events: EventManager, dt: number): void;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=RenderSystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderSystem.d.ts","sourceRoot":"","sources":["../../../src/gworld/systems/RenderSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAoC,MAAM,EAAE,MAAM,YAAY,CAAA;AAMlG,oBAAY,WAAW;IACrB,MAAM,IAAA;IACN,MAAM,IAAA;IACN,KAAK,IAAA;IACL,MAAM,IAAA;IACN,IAAI,IAAA;IACJ,SAAS,IAAA;CACV;AAED,qBAAa,YAAa,YAAW,MAAM;IACzC,SAAS,CAAC,aAAa,EAAE,YAAY;IAWrC,OAAO,CAAC,eAAe,CAKtB;IAED,OAAO,CAAC,iBAAiB,CAOxB;IAED,OAAO,CAAC,eAAe,CAKtB;IACD,OAAO,CAAC,kBAAkB,CAazB;IAED,OAAO,CAAC,mBAAmB,CAQ1B;IAED,OAAO,CAAC,iBAAiB,CAKxB;IAED,OAAO,CAAC,aAAa,CAKpB;IAED,OAAO,CAAC,iBAAiB,CAKxB;IAED,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM;CAGjE"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RenderSystem = exports.SpriteTypes = void 0;
|
|
4
|
+
var entityx_ts_1 = require("entityx-ts");
|
|
5
|
+
var CCSkeletonAnimation_1 = require("../../spine/CCSkeletonAnimation");
|
|
6
|
+
var NodeComp_1 = require("../components/NodeComp");
|
|
7
|
+
var RenderComponent_1 = require("../components/RenderComponent");
|
|
8
|
+
var SpriteTypes;
|
|
9
|
+
(function (SpriteTypes) {
|
|
10
|
+
SpriteTypes[SpriteTypes["SIMPLE"] = 0] = "SIMPLE";
|
|
11
|
+
SpriteTypes[SpriteTypes["SLICED"] = 1] = "SLICED";
|
|
12
|
+
SpriteTypes[SpriteTypes["TILED"] = 2] = "TILED";
|
|
13
|
+
SpriteTypes[SpriteTypes["FILLED"] = 3] = "FILLED";
|
|
14
|
+
SpriteTypes[SpriteTypes["MESH"] = 4] = "MESH";
|
|
15
|
+
SpriteTypes[SpriteTypes["ANIMATION"] = 5] = "ANIMATION";
|
|
16
|
+
})(SpriteTypes || (exports.SpriteTypes = SpriteTypes = {}));
|
|
17
|
+
var RenderSystem = /** @class */ (function () {
|
|
18
|
+
function RenderSystem() {
|
|
19
|
+
this.onAddNodeRender = function (_a) {
|
|
20
|
+
var entity = _a.entity;
|
|
21
|
+
var nodeRenderComp = entity.getComponent(RenderComponent_1.NodeRender);
|
|
22
|
+
var node = new cc.Node();
|
|
23
|
+
var ett = entity;
|
|
24
|
+
nodeRenderComp.node = ett.assign(new NodeComp_1.NodeComp(node, ett));
|
|
25
|
+
};
|
|
26
|
+
this.onAddSpriteRender = function (_a) {
|
|
27
|
+
var entity = _a.entity, spriteComp = _a.component;
|
|
28
|
+
var spriteFrame = spriteComp.props.spriteFrame;
|
|
29
|
+
var frame = cc.spriteFrameCache.getSpriteFrame(spriteFrame);
|
|
30
|
+
// console.log('frame', spriteFrame, frame)
|
|
31
|
+
var node = new cc.Sprite(frame);
|
|
32
|
+
var ett = entity;
|
|
33
|
+
spriteComp.node = ett.assign(new NodeComp_1.NodeComp(node, ett));
|
|
34
|
+
};
|
|
35
|
+
this.onAddMaskRender = function (_a) {
|
|
36
|
+
var entity = _a.entity, maskComp = _a.component;
|
|
37
|
+
var inverted = maskComp.props.inverted;
|
|
38
|
+
var node = new cc.ClippingNode();
|
|
39
|
+
node.setInverted(inverted);
|
|
40
|
+
maskComp.node = entity.assign(new NodeComp_1.NodeComp(node, entity));
|
|
41
|
+
};
|
|
42
|
+
this.onAddSpineSkeleton = function (_a) {
|
|
43
|
+
var entity = _a.entity;
|
|
44
|
+
var spineComp = entity.getComponent(RenderComponent_1.SpineSkeleton);
|
|
45
|
+
var _b = spineComp.props, data = _b.data, skin = _b.skin, animation = _b.animation, loop = _b.loop, _c = _b.timeScale, timeScale = _c === void 0 ? 1 : _c;
|
|
46
|
+
var atlas = data.atlas, skeleton = data.skeleton;
|
|
47
|
+
// cc.log(skel, atlas);
|
|
48
|
+
var node = CCSkeletonAnimation_1.SkeletonAnimation.createWithJsonFile(skeleton, atlas, timeScale);
|
|
49
|
+
if (skin) {
|
|
50
|
+
node.setSkin(skin);
|
|
51
|
+
}
|
|
52
|
+
if (animation) {
|
|
53
|
+
node.setAnimation(0, animation, loop);
|
|
54
|
+
}
|
|
55
|
+
spineComp.node = entity.assign(new NodeComp_1.NodeComp(node, entity));
|
|
56
|
+
};
|
|
57
|
+
this.onAddGraphicsRender = function (_a) {
|
|
58
|
+
var entity = _a.entity;
|
|
59
|
+
var graphicsComp = entity.getComponent(RenderComponent_1.GraphicsRender);
|
|
60
|
+
var _b = graphicsComp.props, lineWidth = _b.lineWidth, strokeColor = _b.strokeColor, fillColor = _b.fillColor;
|
|
61
|
+
var node = new cc.DrawNode();
|
|
62
|
+
node.setColor(strokeColor);
|
|
63
|
+
node.setDrawColor(fillColor);
|
|
64
|
+
node.setLineWidth(lineWidth);
|
|
65
|
+
graphicsComp.node = entity.assign(new NodeComp_1.NodeComp(node, entity));
|
|
66
|
+
};
|
|
67
|
+
this.onAddParticleComp = function (_a) {
|
|
68
|
+
var entity = _a.entity;
|
|
69
|
+
var particleComp = entity.getComponent(RenderComponent_1.ParticleComp);
|
|
70
|
+
var plistFile = particleComp.props.plistFile;
|
|
71
|
+
var node = new cc.ParticleSystem(plistFile);
|
|
72
|
+
particleComp.node = entity.assign(new NodeComp_1.NodeComp(node, entity));
|
|
73
|
+
};
|
|
74
|
+
this.onAddTiledMap = function (_a) {
|
|
75
|
+
var entity = _a.entity;
|
|
76
|
+
var tiledMapComp = entity.getComponent(RenderComponent_1.TiledMap);
|
|
77
|
+
var mapFile = tiledMapComp.props.mapFile;
|
|
78
|
+
var node = new cc.TMXTiledMap(mapFile);
|
|
79
|
+
tiledMapComp.node = entity.assign(new NodeComp_1.NodeComp(node, entity));
|
|
80
|
+
};
|
|
81
|
+
this.onRemovedNodeComp = function (_a) {
|
|
82
|
+
var component = _a.component;
|
|
83
|
+
var node = component;
|
|
84
|
+
if (node.instance) {
|
|
85
|
+
node.instance.removeFromParent(true);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
RenderSystem.prototype.configure = function (event_manager) {
|
|
90
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, RenderComponent_1.NodeRender, this.onAddNodeRender);
|
|
91
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, RenderComponent_1.SpriteRender, this.onAddSpriteRender);
|
|
92
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, RenderComponent_1.MaskRender, this.onAddMaskRender);
|
|
93
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, RenderComponent_1.SpineSkeleton, this.onAddSpineSkeleton);
|
|
94
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, RenderComponent_1.GraphicsRender, this.onAddGraphicsRender);
|
|
95
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, RenderComponent_1.ParticleComp, this.onAddParticleComp);
|
|
96
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, RenderComponent_1.TiledMap, this.onAddTiledMap);
|
|
97
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentRemoved, NodeComp_1.NodeComp, this.onRemovedNodeComp);
|
|
98
|
+
};
|
|
99
|
+
RenderSystem.prototype.update = function (entities, events, dt) {
|
|
100
|
+
// throw new Error('Method not implemented.');
|
|
101
|
+
};
|
|
102
|
+
return RenderSystem;
|
|
103
|
+
}());
|
|
104
|
+
exports.RenderSystem = RenderSystem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodePool.d.ts","sourceRoot":"","sources":["../../src/helper/NodePool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAExD,qBAAa,QAAQ;IACnB,KAAK,EAAE,QAAQ,EAAE,CAAK;IAEtB,GAAG,CAAC,IAAI,EAAE,QAAQ;IAQlB,GAAG,IAAI,QAAQ;IAMf,IAAI;IAIJ,KAAK;CAIN"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodePool = void 0;
|
|
4
|
+
var NodePool = /** @class */ (function () {
|
|
5
|
+
function NodePool() {
|
|
6
|
+
this.items = [];
|
|
7
|
+
}
|
|
8
|
+
NodePool.prototype.put = function (node) {
|
|
9
|
+
if (node) {
|
|
10
|
+
node.active = false;
|
|
11
|
+
node.removeFromParent();
|
|
12
|
+
this.items.push(node);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
NodePool.prototype.get = function () {
|
|
16
|
+
var node = this.items.pop();
|
|
17
|
+
node.active = true;
|
|
18
|
+
return node;
|
|
19
|
+
};
|
|
20
|
+
NodePool.prototype.size = function () {
|
|
21
|
+
return this.items.length;
|
|
22
|
+
};
|
|
23
|
+
NodePool.prototype.clear = function () {
|
|
24
|
+
this.items.forEach(function (node) { return node.destroy(); });
|
|
25
|
+
this.items.length = 0;
|
|
26
|
+
};
|
|
27
|
+
return NodePool;
|
|
28
|
+
}());
|
|
29
|
+
exports.NodePool = NodePool;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
|
3
|
+
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
|
4
|
+
|
|
5
|
+
https://www.cocos.com/
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated engine source code (the "Software"), a limited,
|
|
9
|
+
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
|
|
10
|
+
to use Cocos Creator solely to develop games on your target platforms. You shall
|
|
11
|
+
not use Cocos Creator software for developing other software or tools that's
|
|
12
|
+
used for developing games. You are not granted to publish, distribute,
|
|
13
|
+
sublicense, and/or sell copies of Cocos Creator.
|
|
14
|
+
|
|
15
|
+
The software or tools in this License Agreement are licensed, not sold.
|
|
16
|
+
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
|
25
|
+
****************************************************************************/
|
|
26
|
+
/**
|
|
27
|
+
* A utils class for parsing HTML texts. The parsed results will be an object array.
|
|
28
|
+
*/
|
|
29
|
+
export declare const HtmlTextParser: () => void;
|
|
30
|
+
//# sourceMappingURL=html-text-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-text-parser.d.ts","sourceRoot":"","sources":["../../src/helper/html-text-parser.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;8EAwB8E;AAK9E;;GAEG;AACH,eAAO,MAAM,cAAc,YAS1B,CAAA"}
|