@safe-engine/cocos 1.10.3 → 2.1.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/README.md +2 -9
- package/dist/animation/index.d.ts.map +1 -1
- package/dist/animation/index.js +1 -2
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +5 -12
- package/dist/box2d-wasm/PhysicsComponent.d.ts +5 -5
- package/dist/box2d-wasm/PhysicsComponent.d.ts.map +1 -1
- package/dist/box2d-wasm/PhysicsComponent.js +5 -5
- package/dist/box2d-wasm/PhysicsSystem.d.ts +1 -1
- package/dist/box2d-wasm/PhysicsSystem.d.ts.map +1 -1
- package/dist/box2d-wasm/PhysicsSystem.js +9 -1
- package/dist/box2d-wasm/debugDraw.d.ts.map +1 -1
- package/dist/box2d-wasm/debugDraw.js +6 -3
- package/dist/box2d-wasm/index.d.ts.map +1 -1
- package/dist/box2d-wasm/index.js +3 -5
- package/dist/collider/CollideComponent.d.ts +7 -8
- package/dist/collider/CollideComponent.d.ts.map +1 -1
- package/dist/collider/CollideComponent.js +42 -42
- package/dist/collider/CollideSystem.d.ts +1 -1
- package/dist/collider/CollideSystem.d.ts.map +1 -1
- package/dist/collider/CollideSystem.js +8 -11
- package/dist/collider/index.d.ts.map +1 -1
- package/dist/collider/index.js +1 -4
- package/dist/core/EnhancedComponent.d.ts +0 -1
- package/dist/core/EnhancedComponent.d.ts.map +1 -1
- package/dist/core/EnhancedComponent.js +0 -1
- package/dist/core/NodeComp.d.ts +2 -4
- package/dist/core/NodeComp.d.ts.map +1 -1
- package/dist/core/NodeComp.js +9 -9
- package/dist/core/decorator.d.ts +1 -3
- package/dist/core/decorator.d.ts.map +1 -1
- package/dist/core/decorator.js +6 -9
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +5 -0
- package/dist/dragonbones/index.d.ts.map +1 -1
- package/dist/dragonbones/index.js +3 -4
- package/dist/gui/GUIComponent.d.ts +3 -3
- package/dist/gui/GUIComponent.d.ts.map +1 -1
- package/dist/gui/GUIComponent.js +7 -3
- package/dist/gworld/EnhancedComponent.d.ts +22 -0
- package/dist/gworld/EnhancedComponent.d.ts.map +1 -0
- package/dist/gworld/EnhancedComponent.js +44 -0
- package/dist/gworld/NodeComp.d.ts +153 -0
- package/dist/gworld/NodeComp.d.ts.map +1 -0
- package/dist/gworld/NodeComp.js +337 -0
- package/dist/gworld/NodePool.d.ts +9 -0
- package/dist/gworld/NodePool.d.ts.map +1 -0
- package/dist/gworld/NodePool.js +23 -0
- package/dist/gworld/Scene.d.ts +5 -0
- package/dist/gworld/Scene.d.ts.map +1 -0
- package/dist/gworld/Scene.js +14 -0
- package/dist/gworld/decorator.d.ts +8 -0
- package/dist/gworld/decorator.d.ts.map +1 -0
- package/dist/gworld/decorator.js +12 -0
- package/dist/gworld/index.d.ts +8 -0
- package/dist/gworld/index.d.ts.map +1 -0
- package/dist/gworld/index.js +14 -0
- package/dist/gworld.d.ts +2 -1
- package/dist/gworld.d.ts.map +1 -1
- package/dist/gworld.js +4 -1
- package/dist/helper/utils.d.ts +2 -2
- package/dist/helper/utils.d.ts.map +1 -1
- package/dist/helper/utils.js +1 -3
- package/dist/norender/NoRenderComponent.d.ts +5 -5
- package/dist/norender/NoRenderComponent.d.ts.map +1 -1
- package/dist/norender/NoRenderComponent.js +4 -4
- package/dist/render/RenderComponent.d.ts.map +1 -1
- package/dist/render/RenderComponent.js +7 -1
- package/dist/richtext/RichTextComp.d.ts.map +1 -1
- package/dist/richtext/RichTextComp.js +2 -1
- package/dist/richtext/index.d.ts.map +1 -1
- package/dist/richtext/index.js +1 -2
- package/dist/spine/index.d.ts.map +1 -1
- package/dist/spine/index.js +3 -3
- package/package.json +5 -5
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { instantiate } from '../helper/utils';
|
|
2
|
+
import { ExtraDataComp } from '../norender';
|
|
3
|
+
import { Vec2 } from '../polyfills';
|
|
4
|
+
export class NodeComp {
|
|
5
|
+
entity;
|
|
6
|
+
instance;
|
|
7
|
+
parent;
|
|
8
|
+
children = [];
|
|
9
|
+
name;
|
|
10
|
+
_group;
|
|
11
|
+
_active = true;
|
|
12
|
+
constructor(instance, entity) {
|
|
13
|
+
this.entity = entity;
|
|
14
|
+
this.instance = instance;
|
|
15
|
+
}
|
|
16
|
+
get uuid() {
|
|
17
|
+
return this.entity.id;
|
|
18
|
+
}
|
|
19
|
+
get position() {
|
|
20
|
+
return Vec2(this.instance.getPosition());
|
|
21
|
+
}
|
|
22
|
+
set position(val) {
|
|
23
|
+
this.instance.setPosition(val.x, val.y);
|
|
24
|
+
}
|
|
25
|
+
set xy(val) {
|
|
26
|
+
this.instance.setPosition(val[0], val[1]);
|
|
27
|
+
}
|
|
28
|
+
get posX() {
|
|
29
|
+
return this.instance.getPositionX();
|
|
30
|
+
}
|
|
31
|
+
set posX(val) {
|
|
32
|
+
this.instance.setPositionX(val);
|
|
33
|
+
}
|
|
34
|
+
get posY() {
|
|
35
|
+
return this.instance.getPositionY();
|
|
36
|
+
}
|
|
37
|
+
set posY(val) {
|
|
38
|
+
this.instance.setPositionY(val);
|
|
39
|
+
}
|
|
40
|
+
get scale() {
|
|
41
|
+
return this.instance.getScale();
|
|
42
|
+
}
|
|
43
|
+
set scale(val) {
|
|
44
|
+
this.instance.setScale(val, val);
|
|
45
|
+
}
|
|
46
|
+
get scaleX() {
|
|
47
|
+
return this.instance.getScaleX();
|
|
48
|
+
}
|
|
49
|
+
set scaleX(val) {
|
|
50
|
+
this.instance.setScaleX(val);
|
|
51
|
+
}
|
|
52
|
+
get scaleY() {
|
|
53
|
+
return this.instance.getScaleY();
|
|
54
|
+
}
|
|
55
|
+
set scaleY(val) {
|
|
56
|
+
this.instance.setScaleY(val);
|
|
57
|
+
}
|
|
58
|
+
get anchorX() {
|
|
59
|
+
return this.instance.anchorX;
|
|
60
|
+
}
|
|
61
|
+
set anchorX(val) {
|
|
62
|
+
this.instance.anchorX = val;
|
|
63
|
+
}
|
|
64
|
+
get anchorY() {
|
|
65
|
+
return this.instance.anchorY;
|
|
66
|
+
}
|
|
67
|
+
set anchorY(val) {
|
|
68
|
+
this.instance.anchorY = val;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Returns the angle of the node in degrees. 0 is the default rotation angle. Positive values rotate node clockwise.
|
|
72
|
+
* @function
|
|
73
|
+
* @return {Number} The rotation of the node in degrees.
|
|
74
|
+
*/
|
|
75
|
+
get rotation() {
|
|
76
|
+
return this.instance.getRotation();
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* Sets the X angle of the node in degrees which performs a horizontal rotational skew.
|
|
81
|
+
* (support only in WebGL rendering mode)
|
|
82
|
+
* 0 is the default rotation angle.
|
|
83
|
+
* Positive values rotate node clockwise, and negative values for anti-clockwise.
|
|
84
|
+
*
|
|
85
|
+
* @param {Number} degrees The X rotation in degrees which performs a horizontal rotational skew.
|
|
86
|
+
*/
|
|
87
|
+
set rotation(val) {
|
|
88
|
+
this.instance.setRotation(val);
|
|
89
|
+
}
|
|
90
|
+
get color() {
|
|
91
|
+
return this.instance.getColor();
|
|
92
|
+
}
|
|
93
|
+
set color(val) {
|
|
94
|
+
this.instance.setColor(val);
|
|
95
|
+
}
|
|
96
|
+
get opacity() {
|
|
97
|
+
return this.instance.getOpacity();
|
|
98
|
+
}
|
|
99
|
+
set opacity(val) {
|
|
100
|
+
this.instance.setOpacity(val);
|
|
101
|
+
}
|
|
102
|
+
get active() {
|
|
103
|
+
if (!cc.sys.isObjectValid(this.instance) || !this._active)
|
|
104
|
+
return false;
|
|
105
|
+
let p = this.parent;
|
|
106
|
+
while (p) {
|
|
107
|
+
if (!p.active)
|
|
108
|
+
return false;
|
|
109
|
+
p = p.parent;
|
|
110
|
+
}
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
set active(val) {
|
|
114
|
+
if (!cc.sys.isObjectValid(this.instance)) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
this._active = val;
|
|
118
|
+
if (this.instance instanceof ccui.Widget) {
|
|
119
|
+
this.instance.setEnabled(val);
|
|
120
|
+
}
|
|
121
|
+
this.instance.setVisible(val);
|
|
122
|
+
}
|
|
123
|
+
get group() {
|
|
124
|
+
return this._group;
|
|
125
|
+
}
|
|
126
|
+
set group(val) {
|
|
127
|
+
this._group = val;
|
|
128
|
+
}
|
|
129
|
+
get width() {
|
|
130
|
+
return this.instance.width;
|
|
131
|
+
}
|
|
132
|
+
set width(val) {
|
|
133
|
+
this.instance.setContentSize(val, this.height);
|
|
134
|
+
}
|
|
135
|
+
get height() {
|
|
136
|
+
return this.instance.height;
|
|
137
|
+
}
|
|
138
|
+
set height(val) {
|
|
139
|
+
this.instance.setContentSize(val, this.width);
|
|
140
|
+
}
|
|
141
|
+
get zIndex() {
|
|
142
|
+
return this.instance.zIndex;
|
|
143
|
+
}
|
|
144
|
+
set zIndex(val) {
|
|
145
|
+
this.instance.zIndex = val;
|
|
146
|
+
}
|
|
147
|
+
get childrenCount() {
|
|
148
|
+
return this.children.length;
|
|
149
|
+
}
|
|
150
|
+
destroy() {
|
|
151
|
+
this.removeFromParent(true);
|
|
152
|
+
}
|
|
153
|
+
addComponent(instance) {
|
|
154
|
+
return this.entity.assign(instance);
|
|
155
|
+
}
|
|
156
|
+
getComponent(component) {
|
|
157
|
+
return this.entity.getComponent(component);
|
|
158
|
+
}
|
|
159
|
+
getComponentsInChildren(component) {
|
|
160
|
+
if (!this.children.length) {
|
|
161
|
+
return [];
|
|
162
|
+
}
|
|
163
|
+
const listHave = this.children.filter((child) => {
|
|
164
|
+
return child.getComponent(component);
|
|
165
|
+
});
|
|
166
|
+
return listHave.map((node) => node.getComponent(component));
|
|
167
|
+
}
|
|
168
|
+
getComponentInChildren(component) {
|
|
169
|
+
return this.getComponentsInChildren(component)[0];
|
|
170
|
+
}
|
|
171
|
+
hasComponentInChildren(component) {
|
|
172
|
+
if (!this.children.length) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
return this.children.some((child) => {
|
|
176
|
+
return child.getComponent(component);
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
getPercent() {
|
|
180
|
+
if (this.instance instanceof ccui.LoadingBar) {
|
|
181
|
+
return this.instance.getPercent();
|
|
182
|
+
}
|
|
183
|
+
return 0;
|
|
184
|
+
}
|
|
185
|
+
setPercent(val) {
|
|
186
|
+
if (this.instance instanceof ccui.LoadingBar) {
|
|
187
|
+
return this.instance.setPercent(val);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
setTouchEnabled(enabled) {
|
|
191
|
+
if (!cc.sys.isObjectValid(this.instance)) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
if (this.instance instanceof ccui.Widget) {
|
|
195
|
+
this.instance.setTouchEnabled(enabled);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
addTouchEventListener(cb) {
|
|
199
|
+
if (!cc.sys.isObjectValid(this.instance)) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
if (this.instance instanceof ccui.Widget) {
|
|
203
|
+
this.instance.addTouchEventListener(cb);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
convertToNodeSpace(point) {
|
|
207
|
+
const { x, y } = this.instance.convertToNodeSpace(point);
|
|
208
|
+
return Vec2(x, y);
|
|
209
|
+
}
|
|
210
|
+
convertToNodeSpaceAR(point) {
|
|
211
|
+
const { x, y } = this.instance.convertToNodeSpaceAR(point);
|
|
212
|
+
return Vec2(x, y);
|
|
213
|
+
}
|
|
214
|
+
convertToWorldSpaceAR(point) {
|
|
215
|
+
const { x, y } = this.instance.convertToWorldSpaceAR(point);
|
|
216
|
+
return Vec2(x, y);
|
|
217
|
+
}
|
|
218
|
+
getPosition() {
|
|
219
|
+
return this.instance.getPosition();
|
|
220
|
+
}
|
|
221
|
+
setPosition(x, y) {
|
|
222
|
+
this.instance.setPosition(x, y);
|
|
223
|
+
}
|
|
224
|
+
setRotation(deg) {
|
|
225
|
+
this.instance.setRotation(deg);
|
|
226
|
+
}
|
|
227
|
+
getRotation() {
|
|
228
|
+
return this.instance.getRotation();
|
|
229
|
+
}
|
|
230
|
+
setAnchorPoint(point, y) {
|
|
231
|
+
this.instance.setAnchorPoint(point, y);
|
|
232
|
+
}
|
|
233
|
+
getAnchorPoint() {
|
|
234
|
+
return this.instance.getAnchorPoint();
|
|
235
|
+
}
|
|
236
|
+
getBoundingBox() {
|
|
237
|
+
const box = this.instance.getBoundingBox();
|
|
238
|
+
box.contains = function (point) {
|
|
239
|
+
return this.x <= point.x && this.x + this.width >= point.x && this.y <= point.y && this.y + this.height >= point.y;
|
|
240
|
+
};
|
|
241
|
+
return box;
|
|
242
|
+
}
|
|
243
|
+
getContentSize() {
|
|
244
|
+
return this.instance.getContentSize();
|
|
245
|
+
}
|
|
246
|
+
setContentSize(size, height) {
|
|
247
|
+
this.instance.setContentSize(size, height);
|
|
248
|
+
if (this.instance instanceof cc.ClippingNode) {
|
|
249
|
+
const hw = (size.width || size) * 0.5;
|
|
250
|
+
const hh = (size.height || height) * 0.5;
|
|
251
|
+
const stencil = new cc.DrawNode();
|
|
252
|
+
const rectangle = [cc.p(-hw, -hh), cc.p(hw, -hh), cc.p(hw, hh), cc.p(-hw, hh)];
|
|
253
|
+
stencil.drawPoly(rectangle, cc.Color.WHITE, 0, cc.Color.WHITE);
|
|
254
|
+
// stencil.drawDot(cc.p(-height * 0.5, -height * 0.5), height, cc.Color.WHITE);
|
|
255
|
+
this.instance.stencil = stencil;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
setColor(color) {
|
|
259
|
+
this.instance.setColor(color);
|
|
260
|
+
}
|
|
261
|
+
setScale(scaleX, scaleY) {
|
|
262
|
+
this.instance.setScale(scaleX, scaleY || scaleX);
|
|
263
|
+
}
|
|
264
|
+
runAction(atc) {
|
|
265
|
+
this.instance.runAction(atc);
|
|
266
|
+
}
|
|
267
|
+
stopAllActions() {
|
|
268
|
+
this.instance.stopAllActions();
|
|
269
|
+
}
|
|
270
|
+
pauseAllActionsAndSchedule() {
|
|
271
|
+
this.instance.pause();
|
|
272
|
+
this.instance.unscheduleUpdate();
|
|
273
|
+
}
|
|
274
|
+
resumeAllActionsAndSchedule() {
|
|
275
|
+
this.instance.resume();
|
|
276
|
+
this.instance.scheduleUpdate();
|
|
277
|
+
}
|
|
278
|
+
removeFromParent(cleanup) {
|
|
279
|
+
this.active = false;
|
|
280
|
+
if (this.parent) {
|
|
281
|
+
this.parent.children = this.parent.children.filter(({ entity }) => entity.id !== this.entity.id);
|
|
282
|
+
}
|
|
283
|
+
if (cleanup) {
|
|
284
|
+
this.children.forEach((child) => {
|
|
285
|
+
child.destroy();
|
|
286
|
+
});
|
|
287
|
+
this.parent = null;
|
|
288
|
+
this.entity.destroy();
|
|
289
|
+
this.stopAllActions();
|
|
290
|
+
this.instance.removeFromParent(cleanup);
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
this.stopAllActions();
|
|
294
|
+
this.instance.removeFromParent();
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
addChild(child) {
|
|
298
|
+
child._active = true;
|
|
299
|
+
child.parent = this;
|
|
300
|
+
this.children.push(child);
|
|
301
|
+
this.instance.addChild(child.instance);
|
|
302
|
+
}
|
|
303
|
+
removeAllChildren(cleanup) {
|
|
304
|
+
this.children.forEach((child) => {
|
|
305
|
+
child.removeFromParent(cleanup);
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
getData(key) {
|
|
309
|
+
const data = this.getComponent(ExtraDataComp);
|
|
310
|
+
if (!data)
|
|
311
|
+
throw Error('need add ExtraDataComp to Node');
|
|
312
|
+
return data.getData(key);
|
|
313
|
+
}
|
|
314
|
+
setData(key, value) {
|
|
315
|
+
const data = this.getComponent(ExtraDataComp);
|
|
316
|
+
if (!data) {
|
|
317
|
+
this.addComponent(instantiate(ExtraDataComp, { key, value }));
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
data.setData(key, value);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
removeData(key) {
|
|
324
|
+
const data = this.getComponent(ExtraDataComp);
|
|
325
|
+
if (data) {
|
|
326
|
+
data.removeData(key);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
resolveComponent(component) {
|
|
330
|
+
if (component.constructor.hasRender) {
|
|
331
|
+
this.addChild(component.node);
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
this.addComponent(component);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodePool.d.ts","sourceRoot":"","sources":["../../src/gworld/NodePool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,qBAAa,QAAQ;IACnB,KAAK,EAAE,QAAQ,EAAE,CAAK;IAEtB,GAAG,CAAC,IAAI,EAAE,QAAQ;IAQlB,GAAG,IAAI,QAAQ;IAOf,IAAI;IAIJ,KAAK;CAIN"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export class NodePool {
|
|
2
|
+
items = [];
|
|
3
|
+
put(node) {
|
|
4
|
+
if (node) {
|
|
5
|
+
node.removeFromParent();
|
|
6
|
+
node.entity.immortal = true;
|
|
7
|
+
this.items.push(node);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
get() {
|
|
11
|
+
const node = this.items.pop();
|
|
12
|
+
node.entity.immortal = false;
|
|
13
|
+
node.active = true;
|
|
14
|
+
return node;
|
|
15
|
+
}
|
|
16
|
+
size() {
|
|
17
|
+
return this.items.length;
|
|
18
|
+
}
|
|
19
|
+
clear() {
|
|
20
|
+
this.items.forEach((node) => node.destroy());
|
|
21
|
+
this.items.length = 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scene.d.ts","sourceRoot":"","sources":["../../src/gworld/Scene.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAGvD,qBAAa,cAAe,SAAQ,iBAAiB;IACnD,MAAM;CASP"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GameWorld } from '.';
|
|
2
|
+
import { EnhancedComponent } from './EnhancedComponent';
|
|
3
|
+
import { NodeComp } from './NodeComp';
|
|
4
|
+
export class SceneComponent extends EnhancedComponent {
|
|
5
|
+
render() {
|
|
6
|
+
const world = GameWorld.Instance;
|
|
7
|
+
world.entities.reset();
|
|
8
|
+
const root = world.entities.create();
|
|
9
|
+
const node = root.assign(new NodeComp(cc.director.getRunningScene(), root));
|
|
10
|
+
const sceneComponent = root.assign(this);
|
|
11
|
+
sceneComponent.node = node;
|
|
12
|
+
return sceneComponent;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EnhancedComponent, NodeComp } from '.';
|
|
2
|
+
export declare class NoRenderComponentX<Props = object, C extends cc.Node = cc.Node> extends EnhancedComponent<Props, NodeComp<C>> {
|
|
3
|
+
static hasRender: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare class ComponentX<Props = object, C extends cc.Node = cc.Node> extends EnhancedComponent<Props, NodeComp<C>> {
|
|
6
|
+
render?(): this;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=decorator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../../src/gworld/decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAa,QAAQ,EAAE,MAAM,GAAG,CAAA;AAE1D,qBAAa,kBAAkB,CAAC,KAAK,GAAG,MAAM,EAAE,CAAC,SAAS,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAE,SAAQ,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IACxH,MAAM,CAAC,SAAS,UAAQ;CACzB;AAED,qBAAa,UAAU,CAAC,KAAK,GAAG,MAAM,EAAE,CAAC,SAAS,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAE,SAAQ,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAChH,MAAM,CAAC;CAMR"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EnhancedComponent, GameWorld } from '.';
|
|
2
|
+
export class NoRenderComponentX extends EnhancedComponent {
|
|
3
|
+
static hasRender = false;
|
|
4
|
+
}
|
|
5
|
+
export class ComponentX extends EnhancedComponent {
|
|
6
|
+
render() {
|
|
7
|
+
const world = GameWorld.Instance;
|
|
8
|
+
const root = world.entities.create();
|
|
9
|
+
const comp = root.assign(this);
|
|
10
|
+
return comp;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Constructor, System, World } from 'entityx-ts';
|
|
2
|
+
export declare class GameWorld extends World {
|
|
3
|
+
listUpdate: (System | Constructor<System>)[];
|
|
4
|
+
update(dt: number): void;
|
|
5
|
+
private static _instance;
|
|
6
|
+
static get Instance(): GameWorld;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gworld/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvD,qBAAa,SAAU,SAAQ,KAAK;IAClC,UAAU,EAAE,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,CAAK;IACjD,MAAM,CAAC,EAAE,EAAE,MAAM;IAMjB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAW;IAEnC,WAAkB,QAAQ,cAGzB;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { World } from 'entityx-ts';
|
|
2
|
+
export class GameWorld extends World {
|
|
3
|
+
listUpdate = [];
|
|
4
|
+
update(dt) {
|
|
5
|
+
this.listUpdate.forEach((system) => {
|
|
6
|
+
this.systems.update(system, dt);
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
static _instance;
|
|
10
|
+
static get Instance() {
|
|
11
|
+
// Do you need arguments? Make it a regular static method instead.
|
|
12
|
+
return this._instance || (this._instance = new this());
|
|
13
|
+
}
|
|
14
|
+
}
|
package/dist/gworld.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Constructor, System, World } from 'entityx-ts';
|
|
2
2
|
export declare class GameWorld extends World {
|
|
3
|
-
listUpdate:
|
|
3
|
+
listUpdate: Constructor<System>[];
|
|
4
|
+
addSystemAndUpdate<T extends System>(system: Constructor<T>): T;
|
|
4
5
|
update(dt: number): void;
|
|
5
6
|
private static _instance;
|
|
6
7
|
static get Instance(): GameWorld;
|
package/dist/gworld.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gworld.d.ts","sourceRoot":"","sources":["../src/gworld.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvD,qBAAa,SAAU,SAAQ,KAAK;IAClC,UAAU,EAAE,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"gworld.d.ts","sourceRoot":"","sources":["../src/gworld.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvD,qBAAa,SAAU,SAAQ,KAAK;IAClC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,CAAK;IAEtC,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IAK3D,MAAM,CAAC,EAAE,EAAE,MAAM;IAMjB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAW;IAEnC,WAAkB,QAAQ,cAEzB;CACF"}
|
package/dist/gworld.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { World } from 'entityx-ts';
|
|
2
2
|
export class GameWorld extends World {
|
|
3
3
|
listUpdate = [];
|
|
4
|
+
addSystemAndUpdate(system) {
|
|
5
|
+
this.listUpdate.push(system);
|
|
6
|
+
return this.systems.addThenConfigure(system);
|
|
7
|
+
}
|
|
4
8
|
update(dt) {
|
|
5
9
|
this.listUpdate.forEach((system) => {
|
|
6
10
|
this.systems.update(system, dt);
|
|
@@ -8,7 +12,6 @@ export class GameWorld extends World {
|
|
|
8
12
|
}
|
|
9
13
|
static _instance;
|
|
10
14
|
static get Instance() {
|
|
11
|
-
// Do you need arguments? Make it a regular static method instead.
|
|
12
15
|
return this._instance || (this._instance = new this());
|
|
13
16
|
}
|
|
14
17
|
}
|
package/dist/helper/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Constructor, EntityManager, EventManager } from 'entityx-ts';
|
|
2
|
-
import { ComponentX
|
|
2
|
+
import { ComponentX } from '../core/decorator';
|
|
3
3
|
import { SceneComponent } from '../core/Scene';
|
|
4
4
|
export declare function registerSystem<T extends ComponentX>(component: Constructor<T>): {
|
|
5
5
|
new (): {
|
|
@@ -7,7 +7,7 @@ export declare function registerSystem<T extends ComponentX>(component: Construc
|
|
|
7
7
|
update(entities: EntityManager, events: EventManager, dt: number): void;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
export type GetProps<T> = T extends ComponentX<infer P> ? P :
|
|
10
|
+
export type GetProps<T> = T extends ComponentX<infer P> ? P : never;
|
|
11
11
|
export declare function instantiate<T extends ComponentX>(ComponentType: Constructor<T>, data?: GetProps<T>): T;
|
|
12
12
|
export declare function loadScene<T extends SceneComponent>(ComponentType: Constructor<T>): void;
|
|
13
13
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/helper/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAoC,MAAM,YAAY,CAAA;AAEvG,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/helper/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAoC,MAAM,YAAY,CAAA;AAEvG,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAG9C,wBAAgB,cAAc,CAAC,CAAC,SAAS,UAAU,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;;iCAKjD,YAAY;yBAepB,aAAa,UAAU,YAAY,MAAM,MAAM;;EAanE;AAED,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAEnE,wBAAgB,WAAW,CAAC,CAAC,SAAS,UAAU,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAOtG;AACD,wBAAgB,SAAS,CAAC,CAAC,SAAS,cAAc,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,QAKhF"}
|
package/dist/helper/utils.js
CHANGED
|
@@ -31,9 +31,7 @@ export function registerSystem(component) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
Object.defineProperty(NewSystem, 'name', { value: `${component.name}System` });
|
|
34
|
-
GameWorld.Instance.
|
|
35
|
-
GameWorld.Instance.systems.configureOnce(NewSystem);
|
|
36
|
-
GameWorld.Instance.listUpdate.push(NewSystem);
|
|
34
|
+
GameWorld.Instance.addSystemAndUpdate(NewSystem);
|
|
37
35
|
return NewSystem;
|
|
38
36
|
}
|
|
39
37
|
export function instantiate(ComponentType, data) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentX } from '../core/decorator';
|
|
2
2
|
import { EventCallbackType, NodeComp } from '../core/NodeComp';
|
|
3
3
|
import { Touch } from '../polyfills';
|
|
4
4
|
type TouchEVentCallback = (touch?: Touch, node?: NodeComp) => void;
|
|
5
5
|
export interface EventMap {
|
|
6
6
|
[key: string]: [EventCallbackType];
|
|
7
7
|
}
|
|
8
|
-
export declare class EventRegister extends
|
|
8
|
+
export declare class EventRegister extends ComponentX {
|
|
9
9
|
private events;
|
|
10
|
-
on(name: string, callback: EventCallbackType
|
|
10
|
+
on<T>(name: string, callback: EventCallbackType<T>, target?: any): void;
|
|
11
11
|
off(name: string, callback?: EventCallbackType, target?: any): any;
|
|
12
12
|
emit(name: string, ...params: any): void;
|
|
13
13
|
}
|
|
@@ -17,7 +17,7 @@ interface TouchEventProps {
|
|
|
17
17
|
onTouchEnd?: TouchEVentCallback;
|
|
18
18
|
onTouchCancel?: TouchEVentCallback;
|
|
19
19
|
}
|
|
20
|
-
export declare class TouchEventRegister extends
|
|
20
|
+
export declare class TouchEventRegister extends ComponentX<TouchEventProps> {
|
|
21
21
|
listener: cc.EventListener;
|
|
22
22
|
touch: cc.Touch;
|
|
23
23
|
setEnabled(enabled: boolean): void;
|
|
@@ -26,7 +26,7 @@ interface ExtraDataProps {
|
|
|
26
26
|
key: string;
|
|
27
27
|
value: Integer | Float | string;
|
|
28
28
|
}
|
|
29
|
-
export declare class ExtraDataComp extends
|
|
29
|
+
export declare class ExtraDataComp extends ComponentX<ExtraDataProps> {
|
|
30
30
|
data: {
|
|
31
31
|
[key: string]: any;
|
|
32
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoRenderComponent.d.ts","sourceRoot":"","sources":["../../src/norender/NoRenderComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"NoRenderComponent.d.ts","sourceRoot":"","sources":["../../src/norender/NoRenderComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,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,UAAU;IAC3C,OAAO,CAAC,MAAM,CAAe;IAE7B,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG;IAShE,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;CAMlC;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,UAAU,CAAC,eAAe,CAAC;IACjE,QAAQ,EAAE,EAAE,CAAC,aAAa,CAAA;IAC1B,KAAK,EAAE,EAAE,CAAC,KAAK,CAAA;IACf,UAAU,CAAC,OAAO,EAAE,OAAO;CAG5B;AAED,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;CAChC;AACD,qBAAa,aAAc,SAAQ,UAAU,CAAC,cAAc,CAAC;IAC3D,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;IAG9B,UAAU,CAAC,GAAG,EAAE,MAAM;CAGvB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export class EventRegister extends
|
|
1
|
+
import { ComponentX } from '../core/decorator';
|
|
2
|
+
export class EventRegister extends ComponentX {
|
|
3
3
|
events = {};
|
|
4
4
|
on(name, callback, target) {
|
|
5
5
|
const bound = target ? callback.bind(target) : callback;
|
|
@@ -20,14 +20,14 @@ export class EventRegister extends NoRenderComponentX {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
export class TouchEventRegister extends
|
|
23
|
+
export class TouchEventRegister extends ComponentX {
|
|
24
24
|
listener;
|
|
25
25
|
touch;
|
|
26
26
|
setEnabled(enabled) {
|
|
27
27
|
this.listener.setEnabled(enabled);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
export class ExtraDataComp extends
|
|
30
|
+
export class ExtraDataComp extends ComponentX {
|
|
31
31
|
data = {};
|
|
32
32
|
getData(key) {
|
|
33
33
|
return this.data[key];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderComponent.d.ts","sourceRoot":"","sources":["../../src/render/RenderComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"RenderComponent.d.ts","sourceRoot":"","sources":["../../src/render/RenderComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAU,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE1D,qBAAa,UAAW,SAAQ,UAAU;IACxC,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,UAAU,iBAAiB;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,YAAa,SAAQ,UAAU,CAAC,iBAAiB,GAAG,kBAAkB,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC;IAC3G,IAAI,WAAW,WAEd;IAED,IAAI,WAAW,CAAC,KAAK,QAAA,EAepB;CACF;AACD,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AACD,qBAAa,UAAW,SAAQ,UAAU,CAAC,eAAe,EAAE,EAAE,CAAC,YAAY,CAAC;CAAG;AAE/E,UAAU,iBAAiB;IACzB,SAAS,EAAE,MAAM,CAAA;CAClB;AACD,qBAAa,YAAa,SAAQ,UAAU,CAAC,iBAAiB,EAAE,EAAE,CAAC,cAAc,CAAC;CAAG;AAErF,UAAU,mBAAmB;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,SAAS,CAAC,EAAE,WAAW,CAAA;CACxB;AAED,qBAAa,cAAe,SAAQ,UAAU,CAAC,mBAAmB,GAAG,kBAAkB,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC;IACnH,OAAO,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,EAAE,CAAC,KAAA;IASf,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,OAAO;IAG5E,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,OAAO;IAMzD,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,SAAI,EAAE,QAAQ,SAAK,EAAE,gBAAgB,UAAO,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,OAAO;IAyB7H,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,KAAK;IAe3D,KAAK;CAKN;AAED,UAAU,aAAa;IACrB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,qBAAa,QAAS,SAAQ,UAAU,CAAC,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;CAAE,EAAE,EAAE,CAAC,WAAW,CAAC;CAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentX } from '../core/decorator';
|
|
1
|
+
import { ComponentX, render } from '../core/decorator';
|
|
2
2
|
export class NodeRender extends ComponentX {
|
|
3
3
|
nodeName;
|
|
4
4
|
}
|
|
@@ -78,3 +78,9 @@ export class GraphicsRender extends ComponentX {
|
|
|
78
78
|
}
|
|
79
79
|
export class TiledMap extends ComponentX {
|
|
80
80
|
}
|
|
81
|
+
Object.defineProperty(NodeRender.prototype, 'render', { value: render });
|
|
82
|
+
Object.defineProperty(SpriteRender.prototype, 'render', { value: render });
|
|
83
|
+
Object.defineProperty(MaskRender.prototype, 'render', { value: render });
|
|
84
|
+
Object.defineProperty(ParticleComp.prototype, 'render', { value: render });
|
|
85
|
+
Object.defineProperty(GraphicsRender.prototype, 'render', { value: render });
|
|
86
|
+
Object.defineProperty(TiledMap.prototype, 'render', { value: render });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextComp.d.ts","sourceRoot":"","sources":["../../src/richtext/RichTextComp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"RichTextComp.d.ts","sourceRoot":"","sources":["../../src/richtext/RichTextComp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAU,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAK7C,UAAU,iBAAiB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,YAAa,SAAQ,UAAU,CAAC,iBAAiB,GAAG,kBAAkB,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC;IAC/G,IAAI,MAAM,IAIM,MAAM,CAFrB;IAED,IAAI,MAAM,CAAC,GAAG,EAAE,MAAM,EAoBrB;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentX } from '../core/decorator';
|
|
1
|
+
import { ComponentX, render } from '../core/decorator';
|
|
2
2
|
import { HtmlTextParser } from './html-text-parser';
|
|
3
3
|
const _htmlTextParser = new HtmlTextParser();
|
|
4
4
|
export class RichTextComp extends ComponentX {
|
|
@@ -27,3 +27,4 @@ export class RichTextComp extends ComponentX {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
+
Object.defineProperty(RichTextComp.prototype, 'render', { value: render });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/richtext/index.ts"],"names":[],"mappings":"AAGA,cAAc,gBAAgB,CAAA;AAE9B,wBAAgB,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/richtext/index.ts"],"names":[],"mappings":"AAGA,cAAc,gBAAgB,CAAA;AAE9B,wBAAgB,aAAa,SAE5B"}
|
package/dist/richtext/index.js
CHANGED
|
@@ -2,6 +2,5 @@ import { GameWorld } from '../gworld';
|
|
|
2
2
|
import { RichTextSystem } from './RichTextSystem';
|
|
3
3
|
export * from './RichTextComp';
|
|
4
4
|
export function setupRichText() {
|
|
5
|
-
GameWorld.Instance.systems.
|
|
6
|
-
GameWorld.Instance.systems.configureOnce(RichTextSystem);
|
|
5
|
+
GameWorld.Instance.systems.addThenConfigure(RichTextSystem);
|
|
7
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spine/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAoC,MAAM,EAAE,MAAM,YAAY,CAAA;AAElG,OAAO,EAAE,kBAAkB,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spine/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAoC,MAAM,EAAE,MAAM,YAAY,CAAA;AAElG,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAA+B,MAAM,IAAI,CAAA;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAEzD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,UAAU,kBAAkB;IAC1B,IAAI,EAAE,SAAS,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AACD,qBAAa,aAAc,SAAQ,UAAU,CAAC,kBAAkB,GAAG,kBAAkB,CAAC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IACtH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,UAAQ;IAOvC,eAAe,CAAC,IAAI,EAAE,SAAS;CAKhC;AAED,qBAAa,WAAY,YAAW,MAAM;IACxC,SAAS,CAAC,aAAa,EAAE,YAAY;IAGrC,OAAO,CAAC,kBAAkB,CAYzB;IACD,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM;CAIjE;AAGD,wBAAgB,UAAU,SAGzB"}
|