bard-legends-framework 1.4.7 → 1.5.0
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/index.d.mts +45 -50
- package/dist/index.d.ts +45 -50
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as actions_lib from 'actions-lib';
|
|
2
|
-
import { IDAttachable, Attachable,
|
|
2
|
+
import { IDAttachable, Attachable, AttachmentID, IdleSingleEvent, IdleSequence, Sequence, SingleNotifier, Notifier, SingleEvent, Reducer, Variable, Action, ClassID } from 'actions-lib';
|
|
3
3
|
import { Vector, Radian, Rectangle, Vec2, RGBColor, Grid, GridNeighborType, Line } from 'helpers-lib';
|
|
4
4
|
import * as Pixi from 'pixi.js';
|
|
5
5
|
|
|
@@ -22,7 +22,7 @@ declare abstract class Entity extends IDAttachable {
|
|
|
22
22
|
constructor();
|
|
23
23
|
destroy(): void;
|
|
24
24
|
attach(parent: Attachable): this;
|
|
25
|
-
attachByID(id:
|
|
25
|
+
attachByID(id: AttachmentID): this;
|
|
26
26
|
attachToRoot(): this;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -30,8 +30,8 @@ type SingletonEntityClassType<T extends SingletonEntity = SingletonEntity> = (ne
|
|
|
30
30
|
id: number;
|
|
31
31
|
};
|
|
32
32
|
declare abstract class SingletonEntity extends Entity {
|
|
33
|
-
static getInstanceAsync<T extends SingletonEntity>(this: SingletonEntityClassType<T>):
|
|
34
|
-
static continuesSubscription<T extends SingletonEntity>(this: SingletonEntityClassType<T>):
|
|
33
|
+
static getInstanceAsync<T extends SingletonEntity>(this: SingletonEntityClassType<T>): IdleSingleEvent<T>;
|
|
34
|
+
static continuesSubscription<T extends SingletonEntity>(this: SingletonEntityClassType<T>): IdleSequence<{
|
|
35
35
|
type: 'open' | 'close';
|
|
36
36
|
value: T;
|
|
37
37
|
}>;
|
|
@@ -49,23 +49,21 @@ type SceneClassType = new (...services: unknown[]) => Scene<unknown, unknown>;
|
|
|
49
49
|
type SceneInput<T> = T extends Scene<infer I, any> ? I : never;
|
|
50
50
|
declare function SceneDecorator(): (SceneClass: SceneClassType) => any;
|
|
51
51
|
declare abstract class Scene<InputType, OutputType> extends IDAttachable {
|
|
52
|
-
static readonly isTransitioning: actions_lib.
|
|
53
|
-
static
|
|
54
|
-
static readonly activeScene: actions_lib.Notifier<Scene<unknown, unknown> | undefined>;
|
|
55
|
-
static getActiveScene(this: typeof Scene): Scene<unknown, unknown> | undefined;
|
|
52
|
+
static readonly isTransitioning: actions_lib.PersistentNotifier<boolean>;
|
|
53
|
+
static readonly activeScene: actions_lib.PersistentNotifier<Scene<unknown, unknown> | undefined>;
|
|
56
54
|
static getActiveSceneOrFail(this: typeof Scene): Scene<unknown, unknown>;
|
|
57
|
-
static cancelActiveScene():
|
|
55
|
+
static cancelActiveScene(): IdleSingleEvent;
|
|
58
56
|
static isActive<T extends Scene<unknown, unknown>>(this: new (...args: unknown[]) => T): boolean;
|
|
59
57
|
static getInstance<T extends Scene<unknown, unknown>>(this: new (...args: unknown[]) => T): T | undefined;
|
|
60
58
|
static getInstanceOrFail<T extends Scene<unknown, unknown>>(this: new (...args: unknown[]) => T): T;
|
|
61
|
-
static open<T extends Scene<any, any>>(this: new (...args1: unknown[]) => T, ...args2: T extends Scene<void, any> ? [] : [SceneInput<T>]):
|
|
62
|
-
readonly onClose: actions_lib.
|
|
59
|
+
static open<T extends Scene<any, any>>(this: new (...args1: unknown[]) => T, ...args2: T extends Scene<void, any> ? [] : [SceneInput<T>]): IdleSingleEvent<T>;
|
|
60
|
+
readonly onClose: actions_lib.PersistentSingleNotifier<OutputType>;
|
|
63
61
|
constructor();
|
|
64
|
-
close(...args: void extends OutputType ? (OutputType extends void ? [] : [OutputType]) : [OutputType]):
|
|
62
|
+
close(...args: void extends OutputType ? (OutputType extends void ? [] : [OutputType]) : [OutputType]): IdleSingleEvent<OutputType>;
|
|
65
63
|
private animateAndClose;
|
|
66
|
-
protected abstract init(input: InputType):
|
|
64
|
+
protected abstract init(input: InputType): IdleSingleEvent;
|
|
67
65
|
protected abstract update(time: number, delta: number): void;
|
|
68
|
-
protected abstract prepareToClose():
|
|
66
|
+
protected abstract prepareToClose(): IdleSingleEvent;
|
|
69
67
|
/**
|
|
70
68
|
* @deprecated
|
|
71
69
|
*/
|
|
@@ -90,7 +88,7 @@ declare class UpdateCycle {
|
|
|
90
88
|
time: number;
|
|
91
89
|
delta: number;
|
|
92
90
|
}>;
|
|
93
|
-
static wait(duration: number):
|
|
91
|
+
static wait(duration: number): IdleSingleEvent;
|
|
94
92
|
static registerUpdateModifier(callback: (time: number, delta: number) => number): void;
|
|
95
93
|
static cleanUpdateModifier(): void;
|
|
96
94
|
static triggerUpdateTick(delta: number): void;
|
|
@@ -442,26 +440,25 @@ interface MenuOptions {
|
|
|
442
440
|
readonly backgroundDarkeningRatio: number;
|
|
443
441
|
}
|
|
444
442
|
declare class MenuUI extends Container {
|
|
445
|
-
static isAnyMenuTransitioning: actions_lib.
|
|
446
|
-
|
|
447
|
-
readonly
|
|
448
|
-
readonly
|
|
449
|
-
readonly onClose: actions_lib.SingleNotifier<void>;
|
|
443
|
+
static isAnyMenuTransitioning: actions_lib.PersistentNotifier<boolean>;
|
|
444
|
+
readonly onCreate: actions_lib.PersistentSingleNotifier<void>;
|
|
445
|
+
readonly onOpen: actions_lib.PersistentSingleNotifier<void>;
|
|
446
|
+
readonly onClose: actions_lib.PersistentSingleNotifier<void>;
|
|
450
447
|
constructor(windowSprite: string, partialOptions: Partial<MenuOptions>);
|
|
451
448
|
getBoundingMask(): Sprite;
|
|
452
|
-
close():
|
|
449
|
+
close(): IdleSingleEvent;
|
|
453
450
|
}
|
|
454
451
|
|
|
455
452
|
interface MenuEntityOptions {
|
|
456
453
|
readonly closeOnBackgroundClick: boolean;
|
|
457
454
|
}
|
|
458
455
|
declare class MenuEntity extends SingletonEntity {
|
|
459
|
-
static subscribeIsOpen():
|
|
456
|
+
static subscribeIsOpen(): IdleSequence<boolean>;
|
|
460
457
|
constructor(partialOptions: Partial<MenuEntityOptions>);
|
|
461
|
-
onCreate():
|
|
462
|
-
onOpen():
|
|
463
|
-
onClose():
|
|
464
|
-
close():
|
|
458
|
+
onCreate(): IdleSingleEvent;
|
|
459
|
+
onOpen(): IdleSingleEvent;
|
|
460
|
+
onClose(): IdleSingleEvent;
|
|
461
|
+
close(): IdleSingleEvent;
|
|
465
462
|
}
|
|
466
463
|
|
|
467
464
|
interface MenuViewOptions {
|
|
@@ -748,7 +745,7 @@ declare class Camera {
|
|
|
748
745
|
constructor();
|
|
749
746
|
setPosition(position: Vector): void;
|
|
750
747
|
setTransition(options: FocusingOptions): void;
|
|
751
|
-
appear(on: boolean, type?: CameraAppearTransitionType):
|
|
748
|
+
appear(on: boolean, type?: CameraAppearTransitionType): IdleSingleEvent;
|
|
752
749
|
}
|
|
753
750
|
|
|
754
751
|
interface GameConfiguration {
|
|
@@ -777,11 +774,9 @@ declare class Game {
|
|
|
777
774
|
readonly stage: Container;
|
|
778
775
|
readonly renderer: Pixi.Renderer;
|
|
779
776
|
readonly _screenSize: Variable<Vector>;
|
|
780
|
-
readonly screenSize: actions_lib.
|
|
781
|
-
getScreenSize(): Vector;
|
|
777
|
+
readonly screenSize: actions_lib.PersistentNotifier<Vector>;
|
|
782
778
|
readonly _screenSizeCenter: Variable<Vector>;
|
|
783
|
-
readonly screenSizeCenter: actions_lib.
|
|
784
|
-
getScreenSizeCenter(): Vector;
|
|
779
|
+
readonly screenSizeCenter: actions_lib.PersistentNotifier<Vector>;
|
|
785
780
|
readonly devMode: boolean;
|
|
786
781
|
constructor(partialConfiguration?: Partial<GameConfiguration>);
|
|
787
782
|
setup(setupOptions: GameSetupOptions): Promise<void>;
|
|
@@ -797,27 +792,27 @@ declare class PositionConversionHelper {
|
|
|
797
792
|
static normalizePolygonByAnchor(polygon: PolygonDefinition, frameSize: Vector, frameAnchor: Vector): PolygonDefinition;
|
|
798
793
|
}
|
|
799
794
|
|
|
795
|
+
interface KeyboardKeyInfo {
|
|
796
|
+
readonly key: string;
|
|
797
|
+
readonly code: string;
|
|
798
|
+
}
|
|
800
799
|
declare class KeyboardService {
|
|
801
|
-
readonly _keyPressed: Action<
|
|
802
|
-
readonly keyPressed: actions_lib.Notifier<
|
|
803
|
-
readonly _keyReleased: Action<
|
|
804
|
-
readonly keyReleased: actions_lib.Notifier<
|
|
800
|
+
readonly _keyPressed: Action<KeyboardKeyInfo>;
|
|
801
|
+
readonly keyPressed: actions_lib.Notifier<KeyboardKeyInfo>;
|
|
802
|
+
readonly _keyReleased: Action<KeyboardKeyInfo>;
|
|
803
|
+
readonly keyReleased: actions_lib.Notifier<KeyboardKeyInfo>;
|
|
805
804
|
constructor();
|
|
806
|
-
isKeyDown(
|
|
807
|
-
|
|
805
|
+
isKeyDown(code: string, options?: {
|
|
806
|
+
onlyPressedThisFrame?: boolean;
|
|
807
|
+
}): boolean;
|
|
808
808
|
}
|
|
809
809
|
|
|
810
810
|
declare class MouseService {
|
|
811
|
-
readonly
|
|
812
|
-
|
|
813
|
-
readonly
|
|
814
|
-
|
|
815
|
-
readonly
|
|
816
|
-
getScreenPosition(): Vector;
|
|
817
|
-
readonly mainButtonState: actions_lib.Notifier<boolean>;
|
|
818
|
-
getMainButtonState(): boolean;
|
|
819
|
-
readonly secondaryButtonState: actions_lib.Notifier<boolean>;
|
|
820
|
-
getSecondaryButtonState(): boolean;
|
|
811
|
+
readonly initialMouseMovementHappened: actions_lib.PersistentNotifier<boolean>;
|
|
812
|
+
readonly stagePosition: actions_lib.PersistentNotifier<Vector>;
|
|
813
|
+
readonly screenPosition: actions_lib.PersistentNotifier<Vector>;
|
|
814
|
+
readonly mainButtonState: actions_lib.PersistentNotifier<boolean>;
|
|
815
|
+
readonly secondaryButtonState: actions_lib.PersistentNotifier<boolean>;
|
|
821
816
|
constructor();
|
|
822
817
|
/**
|
|
823
818
|
* Maps viewport (DOM) coordinates to Pixi logical screen space (`renderer.screen`),
|
|
@@ -841,7 +836,7 @@ declare const SPEED_LIMIT = 10.8;
|
|
|
841
836
|
declare const ROTATIONAL_SPEED_LIMIT = 10.01;
|
|
842
837
|
interface PhysicsBodyDTO {
|
|
843
838
|
readonly entityID: number;
|
|
844
|
-
readonly classID:
|
|
839
|
+
readonly classID: ClassID;
|
|
845
840
|
readonly position: Vector;
|
|
846
841
|
readonly rotation: Radian;
|
|
847
842
|
readonly velocity: Vector;
|
|
@@ -952,7 +947,7 @@ interface BorderProperties {
|
|
|
952
947
|
|
|
953
948
|
type InteractingBodyGroups = readonly (readonly [PhysicsBodyGroup, PhysicsBodyGroup])[];
|
|
954
949
|
interface CreatePhysicsWorldRequestDTO {
|
|
955
|
-
readonly attachTo:
|
|
950
|
+
readonly attachTo: AttachmentID;
|
|
956
951
|
readonly mapSize: Vector;
|
|
957
952
|
readonly modifyUpdateCycle: boolean;
|
|
958
953
|
readonly borderProperties: BorderProperties;
|
|
@@ -1013,4 +1008,4 @@ declare class PhysicsGateway {
|
|
|
1013
1008
|
printPathfindingTestGrid(physicsWorldID: number, testLayerID: number, target: Vector | number, physicsBodyGroup: PhysicsBodyGroup, area: Rectangle, gridCellSize?: number): void;
|
|
1014
1009
|
}
|
|
1015
1010
|
|
|
1016
|
-
export { AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, BORDER_MATERIAL_NAME, BardLegendsHardReset, BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type ControllerDecoratorMeta, ControllerLink, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, Entity, EntityDecorator, type ExplosionHit, FadeInContent, type FadeInContentOptions, FadeInStateAnimation, FocusingAnimation, Game, type GlowEffectOptions, type GlowOptions, type GlowingShapeDefinition, Graphics, type HitTestOptions, ImmovablePhysicsEntity, type InteractingBodyGroups, KeyboardService, type MapSizeDTO, type MaterialContactDefinition, type MaterialDefinition, MenuEntity, type MenuOptions, MenuUI, MenuView, MouseService, MouseTargetFocusService, MovableEntity, MovablePhysicsEntity, type PartialTextOptions, PathFinder, type PathFinderResult, type PhysicsBodyDTO, PhysicsEntity, type PhysicsEntityDefinition, type PhysicsExplosionOptions, PhysicsGateway, PhysicsShapeType, Placeholder, type PolygonDefinition, type PolygonShapeData, PositionConversionHelper, ROTATIONAL_SPEED_LIMIT, type RayCast, type RayCastHit, ReAnimateHandlingType, type RectangleShapeData, RichText, type RichTextOptions, type RichTextRectangleCut, type RichTextStyles, SPEED_LIMIT, Scene, SceneDecorator, ScrollAreaUI, ScrollDirection, type ScrollInContentOptions, ScrollMaskUI, Service, ServiceDecorator, type SetParentOptions, type ShapeDefinition, SingletonEntity, SlideInContent, SlideInContentByIndex, SlideStateAnimation, SlideStateAnimationState, Sprite, type SpriteDefinition, StateAnimation, type StateAnimationOptions, Text, type TextAlignment, type TextOptions, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|
|
1011
|
+
export { AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, BORDER_MATERIAL_NAME, BardLegendsHardReset, BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type ControllerDecoratorMeta, ControllerLink, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, Entity, EntityDecorator, type ExplosionHit, FadeInContent, type FadeInContentOptions, FadeInStateAnimation, FocusingAnimation, Game, type GlowEffectOptions, type GlowOptions, type GlowingShapeDefinition, Graphics, type HitTestOptions, ImmovablePhysicsEntity, type InteractingBodyGroups, type KeyboardKeyInfo, KeyboardService, type MapSizeDTO, type MaterialContactDefinition, type MaterialDefinition, MenuEntity, type MenuOptions, MenuUI, MenuView, MouseService, MouseTargetFocusService, MovableEntity, MovablePhysicsEntity, type PartialTextOptions, PathFinder, type PathFinderResult, type PhysicsBodyDTO, PhysicsEntity, type PhysicsEntityDefinition, type PhysicsExplosionOptions, PhysicsGateway, PhysicsShapeType, Placeholder, type PolygonDefinition, type PolygonShapeData, PositionConversionHelper, ROTATIONAL_SPEED_LIMIT, type RayCast, type RayCastHit, ReAnimateHandlingType, type RectangleShapeData, RichText, type RichTextOptions, type RichTextRectangleCut, type RichTextStyles, SPEED_LIMIT, Scene, SceneDecorator, ScrollAreaUI, ScrollDirection, type ScrollInContentOptions, ScrollMaskUI, Service, ServiceDecorator, type SetParentOptions, type ShapeDefinition, SingletonEntity, SlideInContent, SlideInContentByIndex, SlideStateAnimation, SlideStateAnimationState, Sprite, type SpriteDefinition, StateAnimation, type StateAnimationOptions, Text, type TextAlignment, type TextOptions, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as actions_lib from 'actions-lib';
|
|
2
|
-
import { IDAttachable, Attachable,
|
|
2
|
+
import { IDAttachable, Attachable, AttachmentID, IdleSingleEvent, IdleSequence, Sequence, SingleNotifier, Notifier, SingleEvent, Reducer, Variable, Action, ClassID } from 'actions-lib';
|
|
3
3
|
import { Vector, Radian, Rectangle, Vec2, RGBColor, Grid, GridNeighborType, Line } from 'helpers-lib';
|
|
4
4
|
import * as Pixi from 'pixi.js';
|
|
5
5
|
|
|
@@ -22,7 +22,7 @@ declare abstract class Entity extends IDAttachable {
|
|
|
22
22
|
constructor();
|
|
23
23
|
destroy(): void;
|
|
24
24
|
attach(parent: Attachable): this;
|
|
25
|
-
attachByID(id:
|
|
25
|
+
attachByID(id: AttachmentID): this;
|
|
26
26
|
attachToRoot(): this;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -30,8 +30,8 @@ type SingletonEntityClassType<T extends SingletonEntity = SingletonEntity> = (ne
|
|
|
30
30
|
id: number;
|
|
31
31
|
};
|
|
32
32
|
declare abstract class SingletonEntity extends Entity {
|
|
33
|
-
static getInstanceAsync<T extends SingletonEntity>(this: SingletonEntityClassType<T>):
|
|
34
|
-
static continuesSubscription<T extends SingletonEntity>(this: SingletonEntityClassType<T>):
|
|
33
|
+
static getInstanceAsync<T extends SingletonEntity>(this: SingletonEntityClassType<T>): IdleSingleEvent<T>;
|
|
34
|
+
static continuesSubscription<T extends SingletonEntity>(this: SingletonEntityClassType<T>): IdleSequence<{
|
|
35
35
|
type: 'open' | 'close';
|
|
36
36
|
value: T;
|
|
37
37
|
}>;
|
|
@@ -49,23 +49,21 @@ type SceneClassType = new (...services: unknown[]) => Scene<unknown, unknown>;
|
|
|
49
49
|
type SceneInput<T> = T extends Scene<infer I, any> ? I : never;
|
|
50
50
|
declare function SceneDecorator(): (SceneClass: SceneClassType) => any;
|
|
51
51
|
declare abstract class Scene<InputType, OutputType> extends IDAttachable {
|
|
52
|
-
static readonly isTransitioning: actions_lib.
|
|
53
|
-
static
|
|
54
|
-
static readonly activeScene: actions_lib.Notifier<Scene<unknown, unknown> | undefined>;
|
|
55
|
-
static getActiveScene(this: typeof Scene): Scene<unknown, unknown> | undefined;
|
|
52
|
+
static readonly isTransitioning: actions_lib.PersistentNotifier<boolean>;
|
|
53
|
+
static readonly activeScene: actions_lib.PersistentNotifier<Scene<unknown, unknown> | undefined>;
|
|
56
54
|
static getActiveSceneOrFail(this: typeof Scene): Scene<unknown, unknown>;
|
|
57
|
-
static cancelActiveScene():
|
|
55
|
+
static cancelActiveScene(): IdleSingleEvent;
|
|
58
56
|
static isActive<T extends Scene<unknown, unknown>>(this: new (...args: unknown[]) => T): boolean;
|
|
59
57
|
static getInstance<T extends Scene<unknown, unknown>>(this: new (...args: unknown[]) => T): T | undefined;
|
|
60
58
|
static getInstanceOrFail<T extends Scene<unknown, unknown>>(this: new (...args: unknown[]) => T): T;
|
|
61
|
-
static open<T extends Scene<any, any>>(this: new (...args1: unknown[]) => T, ...args2: T extends Scene<void, any> ? [] : [SceneInput<T>]):
|
|
62
|
-
readonly onClose: actions_lib.
|
|
59
|
+
static open<T extends Scene<any, any>>(this: new (...args1: unknown[]) => T, ...args2: T extends Scene<void, any> ? [] : [SceneInput<T>]): IdleSingleEvent<T>;
|
|
60
|
+
readonly onClose: actions_lib.PersistentSingleNotifier<OutputType>;
|
|
63
61
|
constructor();
|
|
64
|
-
close(...args: void extends OutputType ? (OutputType extends void ? [] : [OutputType]) : [OutputType]):
|
|
62
|
+
close(...args: void extends OutputType ? (OutputType extends void ? [] : [OutputType]) : [OutputType]): IdleSingleEvent<OutputType>;
|
|
65
63
|
private animateAndClose;
|
|
66
|
-
protected abstract init(input: InputType):
|
|
64
|
+
protected abstract init(input: InputType): IdleSingleEvent;
|
|
67
65
|
protected abstract update(time: number, delta: number): void;
|
|
68
|
-
protected abstract prepareToClose():
|
|
66
|
+
protected abstract prepareToClose(): IdleSingleEvent;
|
|
69
67
|
/**
|
|
70
68
|
* @deprecated
|
|
71
69
|
*/
|
|
@@ -90,7 +88,7 @@ declare class UpdateCycle {
|
|
|
90
88
|
time: number;
|
|
91
89
|
delta: number;
|
|
92
90
|
}>;
|
|
93
|
-
static wait(duration: number):
|
|
91
|
+
static wait(duration: number): IdleSingleEvent;
|
|
94
92
|
static registerUpdateModifier(callback: (time: number, delta: number) => number): void;
|
|
95
93
|
static cleanUpdateModifier(): void;
|
|
96
94
|
static triggerUpdateTick(delta: number): void;
|
|
@@ -442,26 +440,25 @@ interface MenuOptions {
|
|
|
442
440
|
readonly backgroundDarkeningRatio: number;
|
|
443
441
|
}
|
|
444
442
|
declare class MenuUI extends Container {
|
|
445
|
-
static isAnyMenuTransitioning: actions_lib.
|
|
446
|
-
|
|
447
|
-
readonly
|
|
448
|
-
readonly
|
|
449
|
-
readonly onClose: actions_lib.SingleNotifier<void>;
|
|
443
|
+
static isAnyMenuTransitioning: actions_lib.PersistentNotifier<boolean>;
|
|
444
|
+
readonly onCreate: actions_lib.PersistentSingleNotifier<void>;
|
|
445
|
+
readonly onOpen: actions_lib.PersistentSingleNotifier<void>;
|
|
446
|
+
readonly onClose: actions_lib.PersistentSingleNotifier<void>;
|
|
450
447
|
constructor(windowSprite: string, partialOptions: Partial<MenuOptions>);
|
|
451
448
|
getBoundingMask(): Sprite;
|
|
452
|
-
close():
|
|
449
|
+
close(): IdleSingleEvent;
|
|
453
450
|
}
|
|
454
451
|
|
|
455
452
|
interface MenuEntityOptions {
|
|
456
453
|
readonly closeOnBackgroundClick: boolean;
|
|
457
454
|
}
|
|
458
455
|
declare class MenuEntity extends SingletonEntity {
|
|
459
|
-
static subscribeIsOpen():
|
|
456
|
+
static subscribeIsOpen(): IdleSequence<boolean>;
|
|
460
457
|
constructor(partialOptions: Partial<MenuEntityOptions>);
|
|
461
|
-
onCreate():
|
|
462
|
-
onOpen():
|
|
463
|
-
onClose():
|
|
464
|
-
close():
|
|
458
|
+
onCreate(): IdleSingleEvent;
|
|
459
|
+
onOpen(): IdleSingleEvent;
|
|
460
|
+
onClose(): IdleSingleEvent;
|
|
461
|
+
close(): IdleSingleEvent;
|
|
465
462
|
}
|
|
466
463
|
|
|
467
464
|
interface MenuViewOptions {
|
|
@@ -748,7 +745,7 @@ declare class Camera {
|
|
|
748
745
|
constructor();
|
|
749
746
|
setPosition(position: Vector): void;
|
|
750
747
|
setTransition(options: FocusingOptions): void;
|
|
751
|
-
appear(on: boolean, type?: CameraAppearTransitionType):
|
|
748
|
+
appear(on: boolean, type?: CameraAppearTransitionType): IdleSingleEvent;
|
|
752
749
|
}
|
|
753
750
|
|
|
754
751
|
interface GameConfiguration {
|
|
@@ -777,11 +774,9 @@ declare class Game {
|
|
|
777
774
|
readonly stage: Container;
|
|
778
775
|
readonly renderer: Pixi.Renderer;
|
|
779
776
|
readonly _screenSize: Variable<Vector>;
|
|
780
|
-
readonly screenSize: actions_lib.
|
|
781
|
-
getScreenSize(): Vector;
|
|
777
|
+
readonly screenSize: actions_lib.PersistentNotifier<Vector>;
|
|
782
778
|
readonly _screenSizeCenter: Variable<Vector>;
|
|
783
|
-
readonly screenSizeCenter: actions_lib.
|
|
784
|
-
getScreenSizeCenter(): Vector;
|
|
779
|
+
readonly screenSizeCenter: actions_lib.PersistentNotifier<Vector>;
|
|
785
780
|
readonly devMode: boolean;
|
|
786
781
|
constructor(partialConfiguration?: Partial<GameConfiguration>);
|
|
787
782
|
setup(setupOptions: GameSetupOptions): Promise<void>;
|
|
@@ -797,27 +792,27 @@ declare class PositionConversionHelper {
|
|
|
797
792
|
static normalizePolygonByAnchor(polygon: PolygonDefinition, frameSize: Vector, frameAnchor: Vector): PolygonDefinition;
|
|
798
793
|
}
|
|
799
794
|
|
|
795
|
+
interface KeyboardKeyInfo {
|
|
796
|
+
readonly key: string;
|
|
797
|
+
readonly code: string;
|
|
798
|
+
}
|
|
800
799
|
declare class KeyboardService {
|
|
801
|
-
readonly _keyPressed: Action<
|
|
802
|
-
readonly keyPressed: actions_lib.Notifier<
|
|
803
|
-
readonly _keyReleased: Action<
|
|
804
|
-
readonly keyReleased: actions_lib.Notifier<
|
|
800
|
+
readonly _keyPressed: Action<KeyboardKeyInfo>;
|
|
801
|
+
readonly keyPressed: actions_lib.Notifier<KeyboardKeyInfo>;
|
|
802
|
+
readonly _keyReleased: Action<KeyboardKeyInfo>;
|
|
803
|
+
readonly keyReleased: actions_lib.Notifier<KeyboardKeyInfo>;
|
|
805
804
|
constructor();
|
|
806
|
-
isKeyDown(
|
|
807
|
-
|
|
805
|
+
isKeyDown(code: string, options?: {
|
|
806
|
+
onlyPressedThisFrame?: boolean;
|
|
807
|
+
}): boolean;
|
|
808
808
|
}
|
|
809
809
|
|
|
810
810
|
declare class MouseService {
|
|
811
|
-
readonly
|
|
812
|
-
|
|
813
|
-
readonly
|
|
814
|
-
|
|
815
|
-
readonly
|
|
816
|
-
getScreenPosition(): Vector;
|
|
817
|
-
readonly mainButtonState: actions_lib.Notifier<boolean>;
|
|
818
|
-
getMainButtonState(): boolean;
|
|
819
|
-
readonly secondaryButtonState: actions_lib.Notifier<boolean>;
|
|
820
|
-
getSecondaryButtonState(): boolean;
|
|
811
|
+
readonly initialMouseMovementHappened: actions_lib.PersistentNotifier<boolean>;
|
|
812
|
+
readonly stagePosition: actions_lib.PersistentNotifier<Vector>;
|
|
813
|
+
readonly screenPosition: actions_lib.PersistentNotifier<Vector>;
|
|
814
|
+
readonly mainButtonState: actions_lib.PersistentNotifier<boolean>;
|
|
815
|
+
readonly secondaryButtonState: actions_lib.PersistentNotifier<boolean>;
|
|
821
816
|
constructor();
|
|
822
817
|
/**
|
|
823
818
|
* Maps viewport (DOM) coordinates to Pixi logical screen space (`renderer.screen`),
|
|
@@ -841,7 +836,7 @@ declare const SPEED_LIMIT = 10.8;
|
|
|
841
836
|
declare const ROTATIONAL_SPEED_LIMIT = 10.01;
|
|
842
837
|
interface PhysicsBodyDTO {
|
|
843
838
|
readonly entityID: number;
|
|
844
|
-
readonly classID:
|
|
839
|
+
readonly classID: ClassID;
|
|
845
840
|
readonly position: Vector;
|
|
846
841
|
readonly rotation: Radian;
|
|
847
842
|
readonly velocity: Vector;
|
|
@@ -952,7 +947,7 @@ interface BorderProperties {
|
|
|
952
947
|
|
|
953
948
|
type InteractingBodyGroups = readonly (readonly [PhysicsBodyGroup, PhysicsBodyGroup])[];
|
|
954
949
|
interface CreatePhysicsWorldRequestDTO {
|
|
955
|
-
readonly attachTo:
|
|
950
|
+
readonly attachTo: AttachmentID;
|
|
956
951
|
readonly mapSize: Vector;
|
|
957
952
|
readonly modifyUpdateCycle: boolean;
|
|
958
953
|
readonly borderProperties: BorderProperties;
|
|
@@ -1013,4 +1008,4 @@ declare class PhysicsGateway {
|
|
|
1013
1008
|
printPathfindingTestGrid(physicsWorldID: number, testLayerID: number, target: Vector | number, physicsBodyGroup: PhysicsBodyGroup, area: Rectangle, gridCellSize?: number): void;
|
|
1014
1009
|
}
|
|
1015
1010
|
|
|
1016
|
-
export { AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, BORDER_MATERIAL_NAME, BardLegendsHardReset, BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type ControllerDecoratorMeta, ControllerLink, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, Entity, EntityDecorator, type ExplosionHit, FadeInContent, type FadeInContentOptions, FadeInStateAnimation, FocusingAnimation, Game, type GlowEffectOptions, type GlowOptions, type GlowingShapeDefinition, Graphics, type HitTestOptions, ImmovablePhysicsEntity, type InteractingBodyGroups, KeyboardService, type MapSizeDTO, type MaterialContactDefinition, type MaterialDefinition, MenuEntity, type MenuOptions, MenuUI, MenuView, MouseService, MouseTargetFocusService, MovableEntity, MovablePhysicsEntity, type PartialTextOptions, PathFinder, type PathFinderResult, type PhysicsBodyDTO, PhysicsEntity, type PhysicsEntityDefinition, type PhysicsExplosionOptions, PhysicsGateway, PhysicsShapeType, Placeholder, type PolygonDefinition, type PolygonShapeData, PositionConversionHelper, ROTATIONAL_SPEED_LIMIT, type RayCast, type RayCastHit, ReAnimateHandlingType, type RectangleShapeData, RichText, type RichTextOptions, type RichTextRectangleCut, type RichTextStyles, SPEED_LIMIT, Scene, SceneDecorator, ScrollAreaUI, ScrollDirection, type ScrollInContentOptions, ScrollMaskUI, Service, ServiceDecorator, type SetParentOptions, type ShapeDefinition, SingletonEntity, SlideInContent, SlideInContentByIndex, SlideStateAnimation, SlideStateAnimationState, Sprite, type SpriteDefinition, StateAnimation, type StateAnimationOptions, Text, type TextAlignment, type TextOptions, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|
|
1011
|
+
export { AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, BORDER_MATERIAL_NAME, BardLegendsHardReset, BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type ControllerDecoratorMeta, ControllerLink, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, Entity, EntityDecorator, type ExplosionHit, FadeInContent, type FadeInContentOptions, FadeInStateAnimation, FocusingAnimation, Game, type GlowEffectOptions, type GlowOptions, type GlowingShapeDefinition, Graphics, type HitTestOptions, ImmovablePhysicsEntity, type InteractingBodyGroups, type KeyboardKeyInfo, KeyboardService, type MapSizeDTO, type MaterialContactDefinition, type MaterialDefinition, MenuEntity, type MenuOptions, MenuUI, MenuView, MouseService, MouseTargetFocusService, MovableEntity, MovablePhysicsEntity, type PartialTextOptions, PathFinder, type PathFinderResult, type PhysicsBodyDTO, PhysicsEntity, type PhysicsEntityDefinition, type PhysicsExplosionOptions, PhysicsGateway, PhysicsShapeType, Placeholder, type PolygonDefinition, type PolygonShapeData, PositionConversionHelper, ROTATIONAL_SPEED_LIMIT, type RayCast, type RayCastHit, ReAnimateHandlingType, type RectangleShapeData, RichText, type RichTextOptions, type RichTextRectangleCut, type RichTextStyles, SPEED_LIMIT, Scene, SceneDecorator, ScrollAreaUI, ScrollDirection, type ScrollInContentOptions, ScrollMaskUI, Service, ServiceDecorator, type SetParentOptions, type ShapeDefinition, SingletonEntity, SlideInContent, SlideInContentByIndex, SlideStateAnimation, SlideStateAnimationState, Sprite, type SpriteDefinition, StateAnimation, type StateAnimationOptions, Text, type TextAlignment, type TextOptions, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|