@safe-engine/pixi 8.10.0 → 8.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gui/GUIComponent.d.ts +0 -8
- package/dist/gui/GUIComponent.d.ts.map +1 -1
- package/dist/gui/GUIComponent.js +0 -4
- package/dist/gui/GUISystem.d.ts.map +1 -1
- package/dist/gui/GUISystem.js +2 -7
- package/dist/gui/ScrollViewComp.d.ts +12 -0
- package/dist/gui/ScrollViewComp.d.ts.map +1 -0
- package/dist/gui/ScrollViewComp.js +15 -0
- package/dist/spine/SpineSystem.js +1 -1
- package/package.json +1 -1
|
@@ -16,14 +16,6 @@ export declare class ProgressBarComp extends ComponentX<{}, ProgressBar> {
|
|
|
16
16
|
get progress(): number;
|
|
17
17
|
set progress(val: number);
|
|
18
18
|
}
|
|
19
|
-
interface ScrollViewProps {
|
|
20
|
-
width: number;
|
|
21
|
-
height: number;
|
|
22
|
-
}
|
|
23
|
-
export declare class ScrollView extends ComponentX<ScrollViewProps> {
|
|
24
|
-
}
|
|
25
|
-
export declare class BlockInputEventsComp extends ComponentX {
|
|
26
|
-
}
|
|
27
19
|
interface InputCompProps extends BaseComponentProps<InputComp> {
|
|
28
20
|
placeHolder?: string;
|
|
29
21
|
font?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GUIComponent.d.ts","sourceRoot":"","sources":["../../src/gui/GUIComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACjH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAA;AACvC,OAAO,EAAE,UAAU,EAAU,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,M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A;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,EAAE,CAAC,EAAE,MAAM,CAAA;CAEZ;AACD,qBAAa,SAAU,SAAQ,UAAU,CAAC,cAAc,EAAE,KAAK,CAAC;IAC9D,IAAI,MAAM,WAET;CACF;AAED,qBAAa,QAAS,SAAQ,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC;CAAI;AACtD,qBAAa,UAAW,SAAQ,UAAU,CAAC,EAAE,EAAE,MAAM,CAAC;IACpD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC3B,MAAM,EAAE,SAAS,CAAA;CAClB;AACD,qBAAa,cAAe,SAAQ,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC;CAAI;AAClE,qBAAa,YAAa,SAAQ,UAAU,CAAC;IAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAA;CAAE,EAAE,QAAQ,CAAC;CAAI"}
|
package/dist/gui/GUIComponent.js
CHANGED
|
@@ -19,10 +19,6 @@ export class ProgressBarComp extends ComponentX {
|
|
|
19
19
|
this.node.instance.progress = val;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
export class ScrollView extends ComponentX {
|
|
23
|
-
}
|
|
24
|
-
export class BlockInputEventsComp extends ComponentX {
|
|
25
|
-
}
|
|
26
22
|
export class InputComp extends ComponentX {
|
|
27
23
|
get string() {
|
|
28
24
|
return this.node.instance.value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GUISystem.d.ts","sourceRoot":"","sources":["../../src/gui/GUISystem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAc,MAAM,EAAE,MAAM,YAAY,CAAA;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGnC,qBAAa,SAAU,YAAW,MAAM;IACtC,SAAS,CAAC,aAAa,EAAE,YAAY,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"GUISystem.d.ts","sourceRoot":"","sources":["../../src/gui/GUISystem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAc,MAAM,EAAE,MAAM,YAAY,CAAA;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGnC,qBAAa,SAAU,YAAW,MAAM;IACtC,SAAS,CAAC,aAAa,EAAE,YAAY,CAAC,SAAS,CAAC;CAmCjD"}
|
package/dist/gui/GUISystem.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CheckBox, Input, List, RadioGroup
|
|
1
|
+
import { CheckBox, Input, List, RadioGroup } from '@pixi/ui';
|
|
2
2
|
import { EventTypes } from 'entityx-ts';
|
|
3
3
|
import { Color4B, NodeComp } from '..';
|
|
4
|
-
import { CheckBoxComp, InputComp, ListComp, RadioGroupComp
|
|
4
|
+
import { CheckBoxComp, InputComp, ListComp, RadioGroupComp } from './GUIComponent';
|
|
5
5
|
export class GUISystem {
|
|
6
6
|
configure(event_manager) {
|
|
7
7
|
// event_manager.subscribe(EventTypes.ComponentAdded, ProgressBarComp, ({ entity, component }) => {
|
|
@@ -9,11 +9,6 @@ export class GUISystem {
|
|
|
9
9
|
// const node = new ProgressBar({ bg, fill, progress })
|
|
10
10
|
// component.node = entity.assign(new NodeComp(node, entity))
|
|
11
11
|
// })
|
|
12
|
-
event_manager.subscribe(EventTypes.ComponentAdded, ScrollView, ({ entity, component }) => {
|
|
13
|
-
const { width, height } = component.props;
|
|
14
|
-
const view = new ScrollBox({ width, height });
|
|
15
|
-
component.node = entity.assign(new NodeComp(view, entity));
|
|
16
|
-
});
|
|
17
12
|
event_manager.subscribe(EventTypes.ComponentAdded, ListComp, ({ entity, component }) => {
|
|
18
13
|
const view = new List();
|
|
19
14
|
component.node = entity.assign(new NodeComp(view, entity));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FancyButton } from '@pixi/ui';
|
|
2
|
+
import { BaseComponentProps } from '..';
|
|
3
|
+
import { ComponentX } from '../components/BaseComponent';
|
|
4
|
+
interface ScrollViewCompProps extends BaseComponentProps<ScrollViewComp> {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class ScrollViewComp extends ComponentX<ScrollViewCompProps, FancyButton> {
|
|
9
|
+
render(): this;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=ScrollViewComp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScrollViewComp.d.ts","sourceRoot":"","sources":["../../src/gui/ScrollViewComp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAa,MAAM,UAAU,CAAA;AACjD,OAAO,EAAE,kBAAkB,EAAuC,MAAM,IAAI,CAAA;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAExD,UAAU,mBAAoB,SAAQ,kBAAkB,CAAC,cAAc,CAAC;IACtE,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,qBAAa,cAAe,SAAQ,UAAU,CAAC,mBAAmB,EAAE,WAAW,CAAC;IAC9E,MAAM;CASP"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ScrollBox } from '@pixi/ui';
|
|
2
|
+
import { GameWorld, NodeComp, registerSystem } from '..';
|
|
3
|
+
import { ComponentX } from '../components/BaseComponent';
|
|
4
|
+
export class ScrollViewComp extends ComponentX {
|
|
5
|
+
render() {
|
|
6
|
+
const { width, height } = this.props;
|
|
7
|
+
const view = new ScrollBox({ width, height });
|
|
8
|
+
const world = GameWorld.Instance;
|
|
9
|
+
const entity = world.entities.create();
|
|
10
|
+
entity.assign(new NodeComp(view, entity));
|
|
11
|
+
const comp = entity.assign(this);
|
|
12
|
+
return comp;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
registerSystem(ScrollViewComp);
|
|
@@ -7,7 +7,7 @@ export class SpineSystem {
|
|
|
7
7
|
event_manager.subscribe(EventTypes.ComponentAdded, SpineSkeleton, ({ entity, component }) => {
|
|
8
8
|
// console.log('SpineSkeleton', component)
|
|
9
9
|
// const spine = entity.getComponent(SpineSkeleton)
|
|
10
|
-
const { data, skin, animation, loop, timeScale } = component.props;
|
|
10
|
+
const { data, skin, animation, loop = true, timeScale } = component.props;
|
|
11
11
|
const node = Spine.from(data);
|
|
12
12
|
// node.skeleton.scaleY = -1
|
|
13
13
|
if (skin) {
|