@safe-engine/pixi 1.0.0 → 1.0.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 +4 -4
- package/dist/components/GUIComponent.d.ts +3 -3
- package/dist/components/GUIComponent.d.ts.map +1 -1
- package/dist/components/NodeComp.d.ts +1 -1
- package/dist/components/NodeComp.d.ts.map +1 -1
- package/dist/components/NodeComp.js +1 -1
- package/dist/helper/utils.d.ts +1 -7
- package/dist/helper/utils.d.ts.map +1 -1
- package/dist/helper/utils.js +5 -25
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/systems/GUISystem.d.ts +1 -2
- package/dist/systems/GUISystem.d.ts.map +1 -1
- package/dist/systems/GUISystem.js +52 -73
- package/dist/systems/RenderSystem.d.ts +1 -2
- package/dist/systems/RenderSystem.d.ts.map +1 -1
- package/dist/systems/RenderSystem.js +47 -70
- package/package.json +2 -3
- package/.github/workflows/npm-publish.yml +0 -35
- package/dist/core/Vec2.d.ts +0 -20
- package/dist/core/Vec2.d.ts.map +0 -1
- package/dist/core/Vec2.js +0 -70
- package/src/app.ts +0 -51
- package/src/components/EnhancedComponent.ts +0 -57
- package/src/components/GUIComponent.ts +0 -147
- package/src/components/NodeComp.ts +0 -409
- package/src/components/RenderComponent.ts +0 -65
- package/src/core/Color.ts +0 -3
- package/src/core/LoadingBar.ts +0 -33
- package/src/core/Scene.ts +0 -17
- package/src/core/Size.ts +0 -21
- package/src/core/Vec2.ts +0 -52
- package/src/core/decorator.ts +0 -18
- package/src/gworld.ts +0 -17
- package/src/helper/html-text-parser.ts +0 -364
- package/src/helper/utils.ts +0 -64
- package/src/index.ts +0 -10
- package/src/systems/GUISystem.ts +0 -95
- package/src/systems/RenderSystem.ts +0 -100
- package/tsconfig.json +0 -24
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Guide
|
|
2
|
-
- components must be in `tsx` extension
|
|
3
|
-
- `$ref` bind with current class property as string
|
|
4
|
-
- every property start with `$` will reference to current class property as string
|
|
1
|
+
# Guide
|
|
2
|
+
- components must be in `tsx` extension
|
|
3
|
+
- `$ref` bind with current class property as string
|
|
4
|
+
- every property start with `$` will reference to current class property as string
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Point } from 'pixi.js';
|
|
2
2
|
import { Color4B } from '../core/Color';
|
|
3
3
|
import { ComponentX, NoRenderComponentX } from '../core/decorator';
|
|
4
4
|
import { LoadingBarMode } from '../core/LoadingBar';
|
|
@@ -46,7 +46,7 @@ export declare class ProgressTimerComp extends ComponentX {
|
|
|
46
46
|
spriteFrame: string;
|
|
47
47
|
fillType: Values;
|
|
48
48
|
fillRange: number;
|
|
49
|
-
fillCenter:
|
|
49
|
+
fillCenter: Point;
|
|
50
50
|
isReverse: boolean;
|
|
51
51
|
getFillRange(): void;
|
|
52
52
|
setFillStart(val: number): void;
|
|
@@ -66,7 +66,7 @@ export declare class LabelOutlineComp extends NoRenderComponentX {
|
|
|
66
66
|
export declare class LabelShadowComp extends NoRenderComponentX {
|
|
67
67
|
color: typeof Color4B;
|
|
68
68
|
blur: number;
|
|
69
|
-
offset:
|
|
69
|
+
offset: Point;
|
|
70
70
|
}
|
|
71
71
|
export {};
|
|
72
72
|
//# sourceMappingURL=GUIComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GUIComponent.d.ts","sourceRoot":"","sources":["../../src/components/GUIComponent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GUIComponent.d.ts","sourceRoot":"","sources":["../../src/components/GUIComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,EAAQ,MAAM,SAAS,CAAA;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAClE,O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,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,KAAK,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;IAElB,YAAY;IAMZ,YAAY,CAAC,GAAG,EAAE,MAAM;IAMxB,YAAY,CAAC,GAAG,EAAE,MAAM;CAKzB;AAED,qBAAa,YAAa,SAAQ,UAAU;IAC1C,SAAS,CAAC,IAAI,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,IAAI,EAAE,MAAM,CAAA;IAEtB,SAAS;IAIT,SAAS,CAAC,GAAG,EAAE,MAAM;CAGtB;AAED,qBAAa,gBAAiB,SAAQ,kBAAkB;IACtD,KAAK,EAAE,OAAO,OAAO,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,eAAgB,SAAQ,kBAAkB;IACrD,KAAK,EAAE,OAAO,OAAO,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,KAAK,CAAA;CACd"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Constructor, Entity } from 'entityx-ts';
|
|
2
2
|
import { Color, ColorSource, Container, Point } from 'pixi.js';
|
|
3
3
|
import { Action, Animation } from 'pixi-action-ease';
|
|
4
|
-
import { Size } from '../helper/utils';
|
|
5
4
|
import { ComponentType, EnhancedComponent } from './EnhancedComponent';
|
|
5
|
+
import { Size } from '../core/Size';
|
|
6
6
|
export type EventCallbackType = (...args: any[]) => void;
|
|
7
7
|
export interface EventMap {
|
|
8
8
|
[key: string]: [EventCallbackType];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeComp.d.ts","sourceRoot":"","sources":["../../src/components/NodeComp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAC,MAAM,EAAE,MAAM,YAAY,CAAA;AAE/C,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE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B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;IAKxC,SAAS,CAAC,GAAG,EAAE,MAAM;IAKrB,cAAc;IAOd,eAAe;IAMf,gBAAgB;IAMhB,OAAO;IAaP,gBAAgB;IAMhB,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM;IAQzC,kBAAkB;IAMlB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,GAAG;IAS1D,GAAG,CAAC,IAAI,EAAE,MAAM;IAIhB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG;IAMjC,gBAAgB,CAAC,SAAS,EAAE,iBAAiB;IAU7C,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC;IAG1B,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;CAG/B"}
|
|
@@ -302,7 +302,7 @@ var NodeComp = /** @class */ (function () {
|
|
|
302
302
|
// return box
|
|
303
303
|
// }
|
|
304
304
|
NodeComp.prototype.getContentSize = function () {
|
|
305
|
-
return this.instance;
|
|
305
|
+
return this.instance.boundsArea;
|
|
306
306
|
};
|
|
307
307
|
// setContentSize(size: cc.Size | number, height?: number) {
|
|
308
308
|
// this.instance.setContentSize(size, height)
|
package/dist/helper/utils.d.ts
CHANGED
|
@@ -3,15 +3,9 @@ import { ComponentX } from '..';
|
|
|
3
3
|
export declare function registerSystem<T extends ComponentX>(component: Constructor<T>): {
|
|
4
4
|
new (): {
|
|
5
5
|
configure(event_manager: EventManager): void;
|
|
6
|
-
|
|
6
|
+
receiveComponentAddedEvent(event: EventReceive<T>): void;
|
|
7
7
|
update(entities: EntityManager, events: EventManager, dt: number): void;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
export declare function instantiate<T>(ComponentType: Constructor<T>, data?: any): T;
|
|
11
|
-
export declare class Size {
|
|
12
|
-
constructor(width: any, height: any);
|
|
13
|
-
width: number;
|
|
14
|
-
height: number;
|
|
15
|
-
}
|
|
16
|
-
export declare function size(width: number, height: number): Size;
|
|
17
11
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/helper/utils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/helper/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAGvD,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,UAAU,EAAY,MAAM,IAAI,CAAA;AAGzC,wBAAgB,cAAc,CAAC,CAAC,SAAS,UAAU,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;;iCAKjD,YAAY;0CAKH,YAAY,CAAC,CAAC,CAAC;yBAMhC,aAAa,UAAU,YAAY,MAAM,MAAM;;EAenE;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAE3E"}
|
package/dist/helper/utils.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Size = void 0;
|
|
4
3
|
exports.registerSystem = registerSystem;
|
|
5
4
|
exports.instantiate = instantiate;
|
|
6
|
-
exports.size = size;
|
|
7
5
|
var entityx_ts_1 = require("entityx-ts");
|
|
8
6
|
var __1 = require("..");
|
|
9
7
|
var gworld_1 = require("../gworld");
|
|
@@ -16,19 +14,12 @@ function registerSystem(component) {
|
|
|
16
14
|
}
|
|
17
15
|
NewSystem.prototype.configure = function (event_manager) {
|
|
18
16
|
console.log('configure registerSystem', component.name);
|
|
19
|
-
event_manager.subscribe(
|
|
17
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, component, this.receiveComponentAddedEvent.bind(this));
|
|
20
18
|
};
|
|
21
|
-
NewSystem.prototype.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var newComp = ett.getComponent(component);
|
|
26
|
-
newComp.node = ett.getComponent(__1.NodeComp);
|
|
27
|
-
break;
|
|
28
|
-
}
|
|
29
|
-
default:
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
19
|
+
NewSystem.prototype.receiveComponentAddedEvent = function (event) {
|
|
20
|
+
var ett = event.entity;
|
|
21
|
+
var newComp = ett.getComponent(component);
|
|
22
|
+
newComp.node = ett.getComponent(__1.NodeComp);
|
|
32
23
|
};
|
|
33
24
|
NewSystem.prototype.update = function (entities, events, dt) {
|
|
34
25
|
for (var _i = 0, _a = entities.entities_with_components(component); _i < _a.length; _i++) {
|
|
@@ -51,14 +42,3 @@ function registerSystem(component) {
|
|
|
51
42
|
function instantiate(ComponentType, data) {
|
|
52
43
|
return ComponentType.create(data);
|
|
53
44
|
}
|
|
54
|
-
var Size = /** @class */ (function () {
|
|
55
|
-
function Size(width, height) {
|
|
56
|
-
this.width = width;
|
|
57
|
-
this.height = height;
|
|
58
|
-
}
|
|
59
|
-
return Size;
|
|
60
|
-
}());
|
|
61
|
-
exports.Size = Size;
|
|
62
|
-
function size(width, height) {
|
|
63
|
-
return new Size(width, height);
|
|
64
|
-
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export * from './components/RenderComponent';
|
|
|
5
5
|
export { ComponentX, NoRenderComponentX } from './core/decorator';
|
|
6
6
|
export { SceneComponent } from './core/Scene';
|
|
7
7
|
export * from './core/Size';
|
|
8
|
-
export { Vec2 } from './core/Vec2';
|
|
9
8
|
export { GameWorld } from './gworld';
|
|
10
9
|
export { instantiate, registerSystem } from './helper/utils';
|
|
11
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,SAAS,EAAC,eAAe,EAAE,MAAM,OAAO,CAAA;AACvE,cAAc,2BAA2B,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,cAAc,aAAa,CAAA;AAC3B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,SAAS,EAAC,eAAe,EAAE,MAAM,OAAO,CAAA;AACvE,cAAc,2BAA2B,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.registerSystem = exports.instantiate = exports.GameWorld = exports.
|
|
17
|
+
exports.registerSystem = exports.instantiate = exports.GameWorld = exports.SceneComponent = exports.NoRenderComponentX = exports.ComponentX = exports.NodeComp = exports.setupResolution = exports.initWorld = exports.app = exports.addGameCanvasTo = void 0;
|
|
18
18
|
var app_1 = require("./app");
|
|
19
19
|
Object.defineProperty(exports, "addGameCanvasTo", { enumerable: true, get: function () { return app_1.addGameCanvasTo; } });
|
|
20
20
|
Object.defineProperty(exports, "app", { enumerable: true, get: function () { return app_1.app; } });
|
|
@@ -30,8 +30,6 @@ Object.defineProperty(exports, "NoRenderComponentX", { enumerable: true, get: fu
|
|
|
30
30
|
var Scene_1 = require("./core/Scene");
|
|
31
31
|
Object.defineProperty(exports, "SceneComponent", { enumerable: true, get: function () { return Scene_1.SceneComponent; } });
|
|
32
32
|
__exportStar(require("./core/Size"), exports);
|
|
33
|
-
var Vec2_1 = require("./core/Vec2");
|
|
34
|
-
Object.defineProperty(exports, "Vec2", { enumerable: true, get: function () { return Vec2_1.Vec2; } });
|
|
35
33
|
var gworld_1 = require("./gworld");
|
|
36
34
|
Object.defineProperty(exports, "GameWorld", { enumerable: true, get: function () { return gworld_1.GameWorld; } });
|
|
37
35
|
var utils_1 = require("./helper/utils");
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { EventManager,
|
|
1
|
+
import { EventManager, System } from 'entityx-ts';
|
|
2
2
|
export declare class GUISystem implements System {
|
|
3
3
|
configure(event_manager: EventManager): void;
|
|
4
|
-
receive(type: string, event: EventReceive): void;
|
|
5
4
|
update(): void;
|
|
6
5
|
}
|
|
7
6
|
//# sourceMappingURL=GUISystem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GUISystem.d.ts","sourceRoot":"","sources":["../../src/systems/GUISystem.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"GUISystem.d.ts","sourceRoot":"","sources":["../../src/systems/GUISystem.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EAEZ,MAAM,EACP,MAAM,YAAY,CAAA;AAQnB,qBAAa,SAAU,YAAW,MAAM;IACtC,SAAS,CAAC,aAAa,EAAE,YAAY;IAoDrC,MAAM;CAGP"}
|
|
@@ -12,79 +12,58 @@ var GUISystem = /** @class */ (function () {
|
|
|
12
12
|
function GUISystem() {
|
|
13
13
|
}
|
|
14
14
|
GUISystem.prototype.configure = function (event_manager) {
|
|
15
|
-
event_manager.subscribe(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
console.log('
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
node.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
scroll_1.node = ett.assign(new __1.NodeComp(view, ett));
|
|
68
|
-
break;
|
|
69
|
-
}
|
|
70
|
-
case (0, entityx_ts_1.ComponentAddedEvent)(GUIComponent_1.LabelComp): {
|
|
71
|
-
console.log('ComponentAddedEvent LabelComp', event);
|
|
72
|
-
var ett = event.entity;
|
|
73
|
-
var label = ett.getComponent(GUIComponent_1.LabelComp);
|
|
74
|
-
var node = new pixi_js_1.Text();
|
|
75
|
-
// node.texture.rotate = 8
|
|
76
|
-
node.style.fill = '#fff';
|
|
77
|
-
label.node = ett.assign(new __1.NodeComp(node, ett));
|
|
78
|
-
var _a = label.string, string = _a === void 0 ? '' : _a, _b = label.font, font = _b === void 0 ? '' : _b, size = label.size;
|
|
79
|
-
if (font)
|
|
80
|
-
label.setFont(font);
|
|
81
|
-
label.setSize(size);
|
|
82
|
-
label.setString(string);
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
default:
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
15
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, GUIComponent_1.ButtonComp, function (_a) {
|
|
16
|
+
var entity = _a.entity, component = _a.component;
|
|
17
|
+
var nodeComp = entity.getComponent(__1.NodeComp);
|
|
18
|
+
// const { normalImage, selectedImage, disableImage, texType, zoomScale } = button
|
|
19
|
+
var node = new ui_1.Button(nodeComp.instance);
|
|
20
|
+
// node.setZoomScale(zoomScale - 1)
|
|
21
|
+
component.node = nodeComp;
|
|
22
|
+
// component.node = entity.assign(new NodeComp(node, entity))
|
|
23
|
+
node.onPress.connect(function () {
|
|
24
|
+
// console.log('onPress.connect')
|
|
25
|
+
var scale = pixi_action_ease_1.ScaleTo.create(0.12, 1.2);
|
|
26
|
+
var scaleDown = pixi_action_ease_1.ScaleTo.create(0.12, 1);
|
|
27
|
+
var seq = pixi_action_ease_1.Sequence.create(scale, pixi_action_ease_1.CallFunc.create(function () {
|
|
28
|
+
if (Object.prototype.hasOwnProperty.call(component, 'onPress')) {
|
|
29
|
+
component.onPress(component);
|
|
30
|
+
}
|
|
31
|
+
}), scaleDown);
|
|
32
|
+
var ease = pixi_action_ease_1.EaseBackIn.create(seq);
|
|
33
|
+
component.node.runAction(ease);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, GUIComponent_1.ProgressBarComp, function (_a) {
|
|
37
|
+
var entity = _a.entity, component = _a.component;
|
|
38
|
+
var spriteComp = entity.getComponent(__1.SpriteRender);
|
|
39
|
+
if (!spriteComp)
|
|
40
|
+
throw Error('ProgressBarComp need SpriteRender');
|
|
41
|
+
var progress = component.progress, mode = component.mode;
|
|
42
|
+
var node = new LoadingBar_1.LoadingBar(mode, spriteComp.node.instance);
|
|
43
|
+
spriteComp.node.instance.mask = node;
|
|
44
|
+
component.node = entity.assign(new __1.NodeComp(node, entity));
|
|
45
|
+
node.progress = progress;
|
|
46
|
+
});
|
|
47
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, GUIComponent_1.ScrollView, function (_a) {
|
|
48
|
+
var entity = _a.entity, component = _a.component;
|
|
49
|
+
var width = component.width, height = component.height;
|
|
50
|
+
var view = new ui_1.ScrollBox({ width: width, height: height });
|
|
51
|
+
component.node = entity.assign(new __1.NodeComp(view, entity));
|
|
52
|
+
});
|
|
53
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, GUIComponent_1.LabelComp, function (_a) {
|
|
54
|
+
var entity = _a.entity, component = _a.component;
|
|
55
|
+
console.log('ComponentAddedEvent LabelComp', component);
|
|
56
|
+
var node = new pixi_js_1.Text();
|
|
57
|
+
// node.texture.rotate = 8
|
|
58
|
+
node.style.fill = '#fff';
|
|
59
|
+
component.node = entity.assign(new __1.NodeComp(node, entity));
|
|
60
|
+
var _b = component.string, string = _b === void 0 ? '' : _b, _c = component.font, font = _c === void 0 ? '' : _c, size = component.size;
|
|
61
|
+
if (font)
|
|
62
|
+
component.setFont(font);
|
|
63
|
+
component.setSize(size);
|
|
64
|
+
component.setString(string);
|
|
65
|
+
});
|
|
66
|
+
// event_manager.subscribe(EventTypes.ComponentAdded, BlockInputEventsComp), this);
|
|
88
67
|
};
|
|
89
68
|
GUISystem.prototype.update = function () {
|
|
90
69
|
// throw new Error('Method not implemented.');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventManager,
|
|
1
|
+
import { EventManager, System } from 'entityx-ts';
|
|
2
2
|
export declare enum SpriteTypes {
|
|
3
3
|
SIMPLE = 0,
|
|
4
4
|
SLICED = 1,
|
|
@@ -9,7 +9,6 @@ export declare enum SpriteTypes {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class RenderSystem implements System {
|
|
11
11
|
configure(event_manager: EventManager): void;
|
|
12
|
-
receive(type: string, event: EventReceive): void;
|
|
13
12
|
update(): void;
|
|
14
13
|
}
|
|
15
14
|
//# sourceMappingURL=RenderSystem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderSystem.d.ts","sourceRoot":"","sources":["../../src/systems/RenderSystem.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"RenderSystem.d.ts","sourceRoot":"","sources":["../../src/systems/RenderSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,MAAM,EACP,MAAM,YAAY,CAAA;AAOnB,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;IA6CrC,MAAM;CAGP"}
|
|
@@ -19,78 +19,55 @@ var RenderSystem = /** @class */ (function () {
|
|
|
19
19
|
function RenderSystem() {
|
|
20
20
|
}
|
|
21
21
|
RenderSystem.prototype.configure = function (event_manager) {
|
|
22
|
-
event_manager.subscribe(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
event_manager.subscribe(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// console.log('
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// console.log('ComponentAddedEvent SpriteRender', event)
|
|
42
|
-
var ett = event.entity;
|
|
43
|
-
var spriteComp = ett.getComponent(RenderComponent_1.SpriteRender);
|
|
44
|
-
var spriteFrame = spriteComp.spriteFrame, type_1 = spriteComp.type, fillType = spriteComp.fillType, fillRange = spriteComp.fillRange, fillCenter = spriteComp.fillCenter;
|
|
45
|
-
var node = pixi_js_1.Sprite.from(spriteFrame);
|
|
46
|
-
if (type_1 === SpriteTypes.FILLED) {
|
|
47
|
-
// console.log('fillType', fillType)
|
|
48
|
-
var loadingBar = new LoadingBar_1.LoadingBar(fillType, node);
|
|
49
|
-
if (fillRange)
|
|
50
|
-
loadingBar.progress = fillRange;
|
|
51
|
-
if (fillCenter)
|
|
52
|
-
loadingBar.fillCenter = fillCenter;
|
|
53
|
-
spriteComp.loadingBar = loadingBar;
|
|
54
|
-
// node.setMidpoint(fillCenter)
|
|
55
|
-
}
|
|
56
|
-
// node.texture.rotate = 8
|
|
57
|
-
spriteComp.node = ett.assign(new __1.NodeComp(node, ett));
|
|
58
|
-
// spriteComp.node.anchorX = 0.5
|
|
59
|
-
// spriteComp.node.anchorY = 0.5
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
// case ComponentAddedEvent(MaskRender): {
|
|
63
|
-
// console.log('MaskRender', event.component);
|
|
64
|
-
// const ett = event.entity
|
|
65
|
-
// const maskComp = event.entity.getComponent(MaskRender)
|
|
66
|
-
// const { type, segments, inverted } = maskComp
|
|
67
|
-
// const node = new cc.ClippingNode()
|
|
68
|
-
// node.setInverted(inverted)
|
|
69
|
-
// maskComp.node = ett.assign(new NodeComp(node, ett))
|
|
70
|
-
// break
|
|
71
|
-
// }
|
|
72
|
-
case (0, entityx_ts_1.ComponentAddedEvent)(RenderComponent_1.GraphicsRender): {
|
|
73
|
-
console.log('MaskRender', event.component);
|
|
74
|
-
var ett = event.entity;
|
|
75
|
-
var graphics = event.entity.getComponent(RenderComponent_1.GraphicsRender);
|
|
76
|
-
var lineWidth = graphics.lineWidth, strokeColor = graphics.strokeColor, fillColor = graphics.fillColor;
|
|
77
|
-
var node = new pixi_js_1.Graphics();
|
|
78
|
-
node.beginFill(fillColor);
|
|
79
|
-
node.lineStyle(lineWidth, strokeColor);
|
|
80
|
-
graphics.node = ett.assign(new __1.NodeComp(node, ett));
|
|
81
|
-
// node.drawCircle(0, 0, 100)
|
|
82
|
-
break;
|
|
22
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, RenderComponent_1.NodeRender, function (_a) {
|
|
23
|
+
var entity = _a.entity;
|
|
24
|
+
var nodeRenderComp = entity.getComponent(RenderComponent_1.NodeRender);
|
|
25
|
+
var node = new pixi_js_1.Container();
|
|
26
|
+
nodeRenderComp.node = entity.assign(new __1.NodeComp(node, entity));
|
|
27
|
+
});
|
|
28
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, RenderComponent_1.SpriteRender, function (_a) {
|
|
29
|
+
var entity = _a.entity, component = _a.component;
|
|
30
|
+
var spriteFrame = component.spriteFrame, type = component.type, fillType = component.fillType, fillRange = component.fillRange, fillCenter = component.fillCenter;
|
|
31
|
+
var node = pixi_js_1.Sprite.from(spriteFrame);
|
|
32
|
+
if (type === SpriteTypes.FILLED) {
|
|
33
|
+
// console.log('fillType', fillType)
|
|
34
|
+
var loadingBar = new LoadingBar_1.LoadingBar(fillType, node);
|
|
35
|
+
if (fillRange)
|
|
36
|
+
loadingBar.progress = fillRange;
|
|
37
|
+
if (fillCenter)
|
|
38
|
+
loadingBar.fillCenter = fillCenter;
|
|
39
|
+
component.loadingBar = loadingBar;
|
|
40
|
+
// node.setMidpoint(fillCenter)
|
|
83
41
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
42
|
+
// node.texture.rotate = 8
|
|
43
|
+
component.node = entity.assign(new __1.NodeComp(node, entity));
|
|
44
|
+
// component.node.anchorX = 0.5
|
|
45
|
+
// component.node.anchorY = 0.5
|
|
46
|
+
});
|
|
47
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, RenderComponent_1.MaskRender, function (_a) {
|
|
48
|
+
var component = _a.component;
|
|
49
|
+
console.log('MaskRender', component);
|
|
50
|
+
// const { type, segments, inverted } = maskComp
|
|
51
|
+
// const node = new cc.ClippingNode()
|
|
52
|
+
// node.setInverted(inverted)
|
|
53
|
+
// maskComp.node = ett.assign(new NodeComp(node, ett))
|
|
54
|
+
});
|
|
55
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentAdded, RenderComponent_1.GraphicsRender, function (_a) {
|
|
56
|
+
var entity = _a.entity, component = _a.component;
|
|
57
|
+
var lineWidth = component.lineWidth, strokeColor = component.strokeColor, fillColor = component.fillColor;
|
|
58
|
+
var node = new pixi_js_1.Graphics();
|
|
59
|
+
node.fill(fillColor);
|
|
60
|
+
node.fillStyle = strokeColor;
|
|
61
|
+
node.width = lineWidth;
|
|
62
|
+
component.node = entity.assign(new __1.NodeComp(node, entity));
|
|
63
|
+
// node.drawCircle(0, 0, 100)
|
|
64
|
+
});
|
|
65
|
+
event_manager.subscribe(entityx_ts_1.EventTypes.ComponentRemoved, __1.NodeComp, function (_a) {
|
|
66
|
+
var component = _a.component;
|
|
67
|
+
if (component) {
|
|
68
|
+
component.instance.removeFromParent();
|
|
90
69
|
}
|
|
91
|
-
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
70
|
+
});
|
|
94
71
|
};
|
|
95
72
|
RenderSystem.prototype.update = function () {
|
|
96
73
|
// throw new Error('Method not implemented.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@safe-engine/pixi",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
"license": "ISC",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@pixi/ui": "^2.1.5",
|
|
20
|
-
"entityx-ts": "^
|
|
21
|
-
"howler-pixi-loader-middleware": "^5.0.0",
|
|
20
|
+
"entityx-ts": "^2.0.2",
|
|
22
21
|
"lodash": "^4.17.21",
|
|
23
22
|
"pixi-action-ease": "^1.0.12",
|
|
24
23
|
"pixi.js": "^8.4.0"
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Publish NPM Package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
release:
|
|
8
|
-
types: [created]
|
|
9
|
-
workflow_dispatch: # Allows you to run this workflow manually
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
build:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v4
|
|
16
|
-
- uses: actions/setup-node@v3
|
|
17
|
-
with:
|
|
18
|
-
node-version: 20
|
|
19
|
-
- run: npm ci
|
|
20
|
-
- run: npm run build
|
|
21
|
-
|
|
22
|
-
publish-npm:
|
|
23
|
-
needs: build
|
|
24
|
-
runs-on: ubuntu-latest
|
|
25
|
-
steps:
|
|
26
|
-
- uses: actions/checkout@v4
|
|
27
|
-
- uses: actions/setup-node@v3
|
|
28
|
-
with:
|
|
29
|
-
node-version: 20
|
|
30
|
-
registry-url: https://registry.npmjs.org/
|
|
31
|
-
- run: npm ci
|
|
32
|
-
- run: npm run build
|
|
33
|
-
- run: npm publish
|
|
34
|
-
env:
|
|
35
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
package/dist/core/Vec2.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Point } from 'pixi.js';
|
|
2
|
-
declare class _Vec2 extends Point {
|
|
3
|
-
x: number;
|
|
4
|
-
y: number;
|
|
5
|
-
static ZERO: any;
|
|
6
|
-
equals(other: Point): boolean;
|
|
7
|
-
addSelf(value: Point): Point;
|
|
8
|
-
cross(other: Vec2): number;
|
|
9
|
-
signAngle(other: Vec2): number;
|
|
10
|
-
lengthSqr(): number;
|
|
11
|
-
dot(other: Vec2): number;
|
|
12
|
-
angle(other: Vec2): number;
|
|
13
|
-
}
|
|
14
|
-
export type Vec2 = _Vec2;
|
|
15
|
-
export declare function Vec2(x?: number, y?: number): Vec2;
|
|
16
|
-
export declare namespace Vec2 {
|
|
17
|
-
var ZERO: Readonly<_Vec2>;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=Vec2.d.ts.map
|
package/dist/core/Vec2.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Vec2.d.ts","sourceRoot":"","sources":["../../src/core/Vec2.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,cAAM,KAAM,SAAQ,KAAK;IACvB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,MAAM,CAAC,IAAI,MAAA;IAEX,MAAM,CAAC,KAAK,EAAE,KAAK;IAInB,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK;IAOrB,KAAK,CAAC,KAAK,EAAE,IAAI;IAGjB,SAAS,CAAC,KAAK,EAAE,IAAI;IAIrB,SAAS;IAGT,GAAG,CAAC,KAAK,EAAE,IAAI;IAGf,KAAK,CAAC,KAAK,EAAE,IAAI;CAczB;AACD,MAAM,MAAM,IAAI,GAAG,KAAK,CAAA;AACxB,wBAAgB,IAAI,CAAC,CAAC,SAAI,EAAE,CAAC,SAAI,GAAG,IAAI,CAEvC;yBAFe,IAAI"}
|