bard-legends-framework 1.6.0 → 1.7.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 +240 -156
- package/dist/index.d.ts +240 -156
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +20 -9
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as actions_lib from 'actions-lib';
|
|
2
|
-
import { IDAttachable, Attachable, AttachmentID, IdleSingleEvent, IdleSequence, Sequence, SingleNotifier, Notifier, SingleEvent,
|
|
3
|
-
import { Vector,
|
|
2
|
+
import { IDAttachable, Attachable, AttachmentID, IdleSingleEvent, IdleSequence, Variable, Reducer, Sequence, SingleNotifier, Notifier, SingleEvent, Action, ClassID, NotifierCallbackFunction, IAttachment } from 'actions-lib';
|
|
3
|
+
import { Vector, DynamicID, Vec2, RGBColor, Radian, Rectangle, Grid, GridNeighborType, Line } from 'helpers-lib';
|
|
4
4
|
import p2$1 from 'p2';
|
|
5
5
|
import * as Pixi from 'pixi.js';
|
|
6
6
|
|
|
@@ -96,7 +96,6 @@ declare abstract class Scene<InputType, OutputType> extends IDAttachable {
|
|
|
96
96
|
readonly onClose: actions_lib.PersistentSingleNotifier<OutputType>;
|
|
97
97
|
constructor();
|
|
98
98
|
close(...args: void extends OutputType ? (OutputType extends void ? [] : [OutputType]) : [OutputType]): IdleSingleEvent<OutputType>;
|
|
99
|
-
private animateAndClose;
|
|
100
99
|
protected abstract init(input: InputType): IdleSingleEvent;
|
|
101
100
|
protected abstract update(time: number, delta: number): void;
|
|
102
101
|
protected abstract prepareToClose(): IdleSingleEvent;
|
|
@@ -144,6 +143,227 @@ declare abstract class View extends IDAttachable {
|
|
|
144
143
|
update(time: number, delta: number): void;
|
|
145
144
|
}
|
|
146
145
|
|
|
146
|
+
type AudioAppearTransitionType = 'ease' | 'instant';
|
|
147
|
+
declare class Audio {
|
|
148
|
+
private constructor();
|
|
149
|
+
setVolumes(volumes: {
|
|
150
|
+
master: number;
|
|
151
|
+
music: number;
|
|
152
|
+
sound: number;
|
|
153
|
+
}): void;
|
|
154
|
+
appear(on: boolean, type?: AudioAppearTransitionType): IdleSingleEvent;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
interface FocusingNewTargetInfo {
|
|
158
|
+
time: number;
|
|
159
|
+
duration: number;
|
|
160
|
+
position: Vector;
|
|
161
|
+
roundPosition: boolean;
|
|
162
|
+
roundPositionThreshold: number;
|
|
163
|
+
focusingAnimation: FocusingAnimation;
|
|
164
|
+
}
|
|
165
|
+
declare class CameraEntity extends SingletonEntity {
|
|
166
|
+
readonly position: Variable<Vector>;
|
|
167
|
+
readonly offset: Variable<Vector>;
|
|
168
|
+
readonly targetPosition: Variable<Vector | undefined>;
|
|
169
|
+
readonly focusingNewTargetInfo: Variable<FocusingNewTargetInfo | undefined>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
declare class CameraService {
|
|
173
|
+
createCamera(): CameraEntity;
|
|
174
|
+
getCameraPosition(): Vector;
|
|
175
|
+
setPosition(position: Vector): void;
|
|
176
|
+
setTransition(options: FocusingOptions): void;
|
|
177
|
+
update(time: number, delta: number): void;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
declare enum CameraLayer {
|
|
181
|
+
BackgroundScreen = "backgroundScreen",
|
|
182
|
+
Background = "background",
|
|
183
|
+
Main = "main",
|
|
184
|
+
Foreground = "foreground",
|
|
185
|
+
ForegroundScreen = "foregroundScreen"
|
|
186
|
+
}
|
|
187
|
+
declare enum FocusingAnimation {
|
|
188
|
+
Instant = 1,
|
|
189
|
+
EaseInOut = 2,
|
|
190
|
+
EaseOut = 3
|
|
191
|
+
}
|
|
192
|
+
interface FocusingOptions {
|
|
193
|
+
duration?: number;
|
|
194
|
+
animation?: FocusingAnimation;
|
|
195
|
+
roundPosition?: boolean;
|
|
196
|
+
roundPositionThreshold?: number;
|
|
197
|
+
}
|
|
198
|
+
type CameraAppearTransitionType = 'alpha' | 'pureBlack' | 'instant';
|
|
199
|
+
|
|
200
|
+
declare class CameraController {
|
|
201
|
+
constructor(_cameraService: CameraService);
|
|
202
|
+
createCamera(): number;
|
|
203
|
+
update(time: number, delta: number): void;
|
|
204
|
+
setPosition(position: Vector): void;
|
|
205
|
+
setTransition(options: FocusingOptions): void;
|
|
206
|
+
getCameraPosition(): Vector;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
declare const CameraGateway_base: new () => CameraController;
|
|
210
|
+
declare class CameraGateway extends CameraGateway_base {
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare class Camera {
|
|
214
|
+
readonly layers: Record<CameraLayer, number>;
|
|
215
|
+
get position(): Vector;
|
|
216
|
+
constructor();
|
|
217
|
+
setPosition(position: Vector): void;
|
|
218
|
+
setTransition(options: FocusingOptions): void;
|
|
219
|
+
appear(on: boolean, type?: CameraAppearTransitionType): IdleSingleEvent;
|
|
220
|
+
screenPositonToStagePosition(screenPosition: Vector): Vector;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
declare const DEFAULT_SHADER_RESOLUTION = 2;
|
|
224
|
+
interface AssetDefinition<T = string> {
|
|
225
|
+
readonly id: T;
|
|
226
|
+
readonly url: string;
|
|
227
|
+
}
|
|
228
|
+
declare enum BlendMode {
|
|
229
|
+
Normal = 0,
|
|
230
|
+
Add = 1,
|
|
231
|
+
Screen = 3,
|
|
232
|
+
Luminosity = 16,
|
|
233
|
+
ColorDodge = 7
|
|
234
|
+
}
|
|
235
|
+
interface SpriteIDRegistry {
|
|
236
|
+
}
|
|
237
|
+
type SpriteID = DynamicID<SpriteIDRegistry, 'SpriteID'>;
|
|
238
|
+
interface SpriteDefinition {
|
|
239
|
+
readonly id: SpriteID;
|
|
240
|
+
readonly scale: number;
|
|
241
|
+
readonly anchor: Vec2;
|
|
242
|
+
readonly size: Vec2;
|
|
243
|
+
readonly boundingShapes?: PolygonDefinition | undefined;
|
|
244
|
+
readonly destroyAssetOnDestroy?: boolean | undefined;
|
|
245
|
+
}
|
|
246
|
+
interface GlowingShapeDefinition {
|
|
247
|
+
readonly color: RGBColor;
|
|
248
|
+
readonly shapeAlpha: number;
|
|
249
|
+
readonly glowAlpha: number;
|
|
250
|
+
readonly glowOptions: GlowOptions;
|
|
251
|
+
readonly shapes: PolygonDefinition;
|
|
252
|
+
}
|
|
253
|
+
type PolygonDefinition = readonly (readonly Vec2[])[];
|
|
254
|
+
interface GlowOptions {
|
|
255
|
+
readonly color: RGBColor;
|
|
256
|
+
readonly blurRadius: number | Vector;
|
|
257
|
+
readonly expand: number;
|
|
258
|
+
readonly blendMode: BlendMode;
|
|
259
|
+
}
|
|
260
|
+
type GlowEffectOptions = Partial<GlowOptions> & {
|
|
261
|
+
glowAlpha?: number;
|
|
262
|
+
};
|
|
263
|
+
interface SoundIDRegistry {
|
|
264
|
+
}
|
|
265
|
+
type SoundID = DynamicID<SoundIDRegistry, 'SoundID'>;
|
|
266
|
+
interface SoundDefinition {
|
|
267
|
+
readonly id: SoundID;
|
|
268
|
+
readonly duration: number;
|
|
269
|
+
}
|
|
270
|
+
interface MusicIDRegistry {
|
|
271
|
+
}
|
|
272
|
+
type MusicID = DynamicID<MusicIDRegistry, 'MusicID'>;
|
|
273
|
+
interface MusicDefinition {
|
|
274
|
+
readonly id: MusicID;
|
|
275
|
+
readonly soundID: SoundID;
|
|
276
|
+
readonly loop: {
|
|
277
|
+
readonly from: number;
|
|
278
|
+
readonly to: number;
|
|
279
|
+
} | undefined;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
interface GameConfiguration {
|
|
283
|
+
readonly screenResolution: {
|
|
284
|
+
readonly width: number;
|
|
285
|
+
readonly height: number;
|
|
286
|
+
} | undefined;
|
|
287
|
+
readonly maxScreenResolution: {
|
|
288
|
+
readonly width: number;
|
|
289
|
+
readonly height: number;
|
|
290
|
+
} | undefined;
|
|
291
|
+
readonly devMode: boolean;
|
|
292
|
+
readonly backgroundColor: RGBColor;
|
|
293
|
+
readonly antialias: boolean;
|
|
294
|
+
readonly resolution: number;
|
|
295
|
+
}
|
|
296
|
+
interface GameSetupOptions {
|
|
297
|
+
readonly spriteAssetDefinitions: readonly AssetDefinition<SpriteID>[];
|
|
298
|
+
readonly spriteDefinitions: Readonly<Record<SpriteID, SpriteDefinition>>;
|
|
299
|
+
readonly fontAssetDefinitions: readonly AssetDefinition[];
|
|
300
|
+
readonly soundAssetDefinitions: readonly AssetDefinition<SoundID>[];
|
|
301
|
+
readonly soundDefinitions: Readonly<Record<SoundID, SoundDefinition>>;
|
|
302
|
+
readonly musicDefinitions: Readonly<Record<MusicID, MusicDefinition>>;
|
|
303
|
+
}
|
|
304
|
+
declare class Game {
|
|
305
|
+
static get instance(): Game;
|
|
306
|
+
static readonly pause: Reducer<boolean, boolean>;
|
|
307
|
+
static readonly freeze: Reducer<boolean, boolean>;
|
|
308
|
+
static get camera(): Camera;
|
|
309
|
+
static get audio(): Audio;
|
|
310
|
+
static appear(on: boolean, options?: {
|
|
311
|
+
camera?: CameraAppearTransitionType;
|
|
312
|
+
audio?: AudioAppearTransitionType;
|
|
313
|
+
}): IdleSingleEvent;
|
|
314
|
+
static get time(): number;
|
|
315
|
+
readonly renderer: Pixi.Renderer;
|
|
316
|
+
readonly _screenSize: Variable<Vector>;
|
|
317
|
+
readonly screenSize: actions_lib.PersistentNotifier<Vector>;
|
|
318
|
+
readonly _screenSizeCenter: Variable<Vector>;
|
|
319
|
+
readonly screenSizeCenter: actions_lib.PersistentNotifier<Vector>;
|
|
320
|
+
readonly devMode: boolean;
|
|
321
|
+
constructor(partialConfiguration?: Partial<GameConfiguration>);
|
|
322
|
+
setup(setupOptions: GameSetupOptions): Promise<void>;
|
|
323
|
+
setResolution(resolution: number): void;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
declare abstract class AudioContainer extends IDAttachable {
|
|
327
|
+
protected _source: AudioBufferSourceNode;
|
|
328
|
+
protected _gain: GainNode;
|
|
329
|
+
protected _startingTime: number;
|
|
330
|
+
protected readonly _time: Variable<number>;
|
|
331
|
+
readonly time: actions_lib.PersistentNotifier<number>;
|
|
332
|
+
constructor(output: AudioNode);
|
|
333
|
+
get volume(): number;
|
|
334
|
+
set volume(value: number);
|
|
335
|
+
setVolume(value: number): this;
|
|
336
|
+
/**
|
|
337
|
+
* @param time in seconds
|
|
338
|
+
* @returns IdleSingleEvent that resolves in the given time
|
|
339
|
+
*/
|
|
340
|
+
notifyOnTime(targetTime: number): IdleSingleEvent;
|
|
341
|
+
destroy(): void;
|
|
342
|
+
protected _play(options: {
|
|
343
|
+
readonly soundID: SoundID;
|
|
344
|
+
readonly start: number;
|
|
345
|
+
readonly end: number;
|
|
346
|
+
readonly loop: boolean;
|
|
347
|
+
readonly onComplete?: () => void;
|
|
348
|
+
}): void;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
interface MusicOptions {
|
|
352
|
+
readonly offset: number;
|
|
353
|
+
readonly muffle?: number;
|
|
354
|
+
}
|
|
355
|
+
declare class Music extends AudioContainer {
|
|
356
|
+
static createByName(musicName: MusicID, options?: MusicOptions): Music;
|
|
357
|
+
constructor(musicDefinition: MusicDefinition, options?: MusicOptions);
|
|
358
|
+
muffle(strength: number, transitionDuration?: number): IdleSingleEvent;
|
|
359
|
+
destroy(): void;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
declare class Sound extends AudioContainer {
|
|
363
|
+
static createByName(soundName: SoundID): Sound;
|
|
364
|
+
constructor(soundDefinition: SoundDefinition);
|
|
365
|
+
}
|
|
366
|
+
|
|
147
367
|
declare enum ContainerEventType {
|
|
148
368
|
Click = "click",
|
|
149
369
|
MouseOver = "mouseover",
|
|
@@ -260,51 +480,13 @@ declare class Filters {
|
|
|
260
480
|
removeColorFilter(): void;
|
|
261
481
|
}
|
|
262
482
|
|
|
263
|
-
declare const DEFAULT_SHADER_RESOLUTION = 2;
|
|
264
|
-
interface AssetDefinition<T extends string = string> {
|
|
265
|
-
readonly id: string;
|
|
266
|
-
readonly url: T;
|
|
267
|
-
}
|
|
268
|
-
declare enum BlendMode {
|
|
269
|
-
Normal = 0,
|
|
270
|
-
Add = 1,
|
|
271
|
-
Screen = 3,
|
|
272
|
-
Luminosity = 16,
|
|
273
|
-
ColorDodge = 7
|
|
274
|
-
}
|
|
275
|
-
interface SpriteDefinition {
|
|
276
|
-
readonly id: string;
|
|
277
|
-
readonly scale: number;
|
|
278
|
-
readonly anchor: Vec2;
|
|
279
|
-
readonly size: Vec2;
|
|
280
|
-
readonly boundingShapes?: PolygonDefinition | undefined;
|
|
281
|
-
readonly destroyAssetOnDestroy?: boolean | undefined;
|
|
282
|
-
}
|
|
283
|
-
interface GlowingShapeDefinition {
|
|
284
|
-
readonly color: RGBColor;
|
|
285
|
-
readonly shapeAlpha: number;
|
|
286
|
-
readonly glowAlpha: number;
|
|
287
|
-
readonly glowOptions: GlowOptions;
|
|
288
|
-
readonly shapes: PolygonDefinition;
|
|
289
|
-
}
|
|
290
|
-
type PolygonDefinition = readonly (readonly Vec2[])[];
|
|
291
|
-
interface GlowOptions {
|
|
292
|
-
readonly color: RGBColor;
|
|
293
|
-
readonly blurRadius: number | Vector;
|
|
294
|
-
readonly expand: number;
|
|
295
|
-
readonly blendMode: BlendMode;
|
|
296
|
-
}
|
|
297
|
-
type GlowEffectOptions = Partial<GlowOptions> & {
|
|
298
|
-
glowAlpha?: number;
|
|
299
|
-
};
|
|
300
|
-
|
|
301
483
|
interface SpriteOptions {
|
|
302
484
|
readonly textureSize?: Vector;
|
|
303
485
|
readonly texturePosition?: Vector;
|
|
304
486
|
readonly ignoreAnchor?: boolean;
|
|
305
487
|
}
|
|
306
488
|
declare class Sprite extends Container {
|
|
307
|
-
static createByName(spriteName:
|
|
489
|
+
static createByName(spriteName: SpriteID): Sprite;
|
|
308
490
|
static createSnapshotSprite(container: Container): Sprite;
|
|
309
491
|
readonly pixiSprite: Pixi.Sprite;
|
|
310
492
|
constructor(spriteDefinition: SpriteDefinition, options?: SpriteOptions);
|
|
@@ -480,7 +662,7 @@ declare class MenuUI extends Container {
|
|
|
480
662
|
readonly onCreate: actions_lib.PersistentSingleNotifier<void>;
|
|
481
663
|
readonly onOpen: actions_lib.PersistentSingleNotifier<void>;
|
|
482
664
|
readonly onClose: actions_lib.PersistentSingleNotifier<void>;
|
|
483
|
-
constructor(windowSprite:
|
|
665
|
+
constructor(windowSprite: SpriteID, partialOptions: Partial<MenuOptions>);
|
|
484
666
|
getBoundingMask(): Sprite;
|
|
485
667
|
close(): IdleSingleEvent;
|
|
486
668
|
}
|
|
@@ -489,7 +671,7 @@ interface MenuEntityOptions {
|
|
|
489
671
|
readonly closeOnBackgroundClick: boolean;
|
|
490
672
|
}
|
|
491
673
|
declare class MenuEntity extends SingletonEntity {
|
|
492
|
-
static subscribeIsOpen():
|
|
674
|
+
static subscribeIsOpen(): Sequence<boolean>;
|
|
493
675
|
constructor(partialOptions: Partial<MenuEntityOptions>);
|
|
494
676
|
onCreate(): IdleSingleEvent;
|
|
495
677
|
onOpen(): IdleSingleEvent;
|
|
@@ -505,7 +687,7 @@ declare class MenuView extends View {
|
|
|
505
687
|
readonly onCreate: SingleNotifier<Container>;
|
|
506
688
|
readonly onOpen: SingleNotifier;
|
|
507
689
|
readonly onClose: SingleNotifier;
|
|
508
|
-
constructor(entity: MenuEntity, windowSprite:
|
|
690
|
+
constructor(entity: MenuEntity, windowSprite: SpriteID, partialOptions: Partial<MenuViewOptions>);
|
|
509
691
|
}
|
|
510
692
|
|
|
511
693
|
interface ScrollAreaUIOptions {
|
|
@@ -532,6 +714,8 @@ declare class AnimationInterpolationFunctions {
|
|
|
532
714
|
static lineer(time: number): number;
|
|
533
715
|
static easeIn(time: number): number;
|
|
534
716
|
static easeOut(time: number): number;
|
|
717
|
+
static easeInCubic(time: number): number;
|
|
718
|
+
static easeOutCubic(time: number): number;
|
|
535
719
|
static easeInOut(time: number): number;
|
|
536
720
|
static easeInOutCubic(t: number): number;
|
|
537
721
|
static blink(t: number): number;
|
|
@@ -552,6 +736,14 @@ declare class AnimationEaseInOut implements AnimatorAnimation {
|
|
|
552
736
|
start(): void;
|
|
553
737
|
multiplierFunction(t: number): number;
|
|
554
738
|
}
|
|
739
|
+
declare class AnimationEaseInCubic implements AnimatorAnimation {
|
|
740
|
+
start(): void;
|
|
741
|
+
multiplierFunction(t: number): number;
|
|
742
|
+
}
|
|
743
|
+
declare class AnimationEaseOutCubic implements AnimatorAnimation {
|
|
744
|
+
start(): void;
|
|
745
|
+
multiplierFunction(t: number): number;
|
|
746
|
+
}
|
|
555
747
|
declare class AnimationEaseInOutCubic implements AnimatorAnimation {
|
|
556
748
|
start(): void;
|
|
557
749
|
multiplierFunction(t: number): number;
|
|
@@ -569,6 +761,8 @@ declare class Animations {
|
|
|
569
761
|
static easeIn: AnimationEaseIn;
|
|
570
762
|
static easeOut: AnimationEaseOut;
|
|
571
763
|
static easeInOut: AnimationEaseInOut;
|
|
764
|
+
static easeInCubic: AnimationEaseInCubic;
|
|
765
|
+
static easeOutCubic: AnimationEaseOutCubic;
|
|
572
766
|
static easeInOutCubic: AnimationEaseInOutCubic;
|
|
573
767
|
static blink: AnimationBlink;
|
|
574
768
|
}
|
|
@@ -747,115 +941,6 @@ declare class ScrollMaskUI extends Container {
|
|
|
747
941
|
constructor(container: Container, size: Vector, padding: number, direction?: ScrollDirection);
|
|
748
942
|
}
|
|
749
943
|
|
|
750
|
-
interface FocusingNewTargetInfo {
|
|
751
|
-
time: number;
|
|
752
|
-
duration: number;
|
|
753
|
-
position: Vector;
|
|
754
|
-
roundPosition: boolean;
|
|
755
|
-
roundPositionThreshold: number;
|
|
756
|
-
focusingAnimation: FocusingAnimation;
|
|
757
|
-
}
|
|
758
|
-
declare class CameraEntity extends SingletonEntity {
|
|
759
|
-
readonly position: Variable<Vector>;
|
|
760
|
-
readonly offset: Variable<Vector>;
|
|
761
|
-
readonly targetPosition: Variable<Vector | undefined>;
|
|
762
|
-
readonly focusingNewTargetInfo: Variable<FocusingNewTargetInfo | undefined>;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
declare class CameraService {
|
|
766
|
-
createCamera(): CameraEntity;
|
|
767
|
-
getCameraPosition(): Vector;
|
|
768
|
-
setPosition(position: Vector): void;
|
|
769
|
-
setTransition(options: FocusingOptions): void;
|
|
770
|
-
update(time: number, delta: number): void;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
declare enum CameraLayer {
|
|
774
|
-
BackgroundScreen = "backgroundScreen",
|
|
775
|
-
Background = "background",
|
|
776
|
-
Main = "main",
|
|
777
|
-
Foreground = "foreground",
|
|
778
|
-
ForegroundScreen = "foregroundScreen"
|
|
779
|
-
}
|
|
780
|
-
declare enum FocusingAnimation {
|
|
781
|
-
Instant = 1,
|
|
782
|
-
EaseInOut = 2,
|
|
783
|
-
EaseOut = 3
|
|
784
|
-
}
|
|
785
|
-
interface FocusingOptions {
|
|
786
|
-
duration?: number;
|
|
787
|
-
animation?: FocusingAnimation;
|
|
788
|
-
roundPosition?: boolean;
|
|
789
|
-
roundPositionThreshold?: number;
|
|
790
|
-
}
|
|
791
|
-
type CameraAppearTransitionType = 'alpha' | 'pureBlack' | 'instant';
|
|
792
|
-
|
|
793
|
-
declare class CameraController {
|
|
794
|
-
constructor(_cameraService: CameraService);
|
|
795
|
-
createCamera(): number;
|
|
796
|
-
update(time: number, delta: number): void;
|
|
797
|
-
setPosition(position: Vector): void;
|
|
798
|
-
setTransition(options: FocusingOptions): void;
|
|
799
|
-
getCameraPosition(): Vector;
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
declare const CameraGateway_base: new () => CameraController;
|
|
803
|
-
declare class CameraGateway extends CameraGateway_base {
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
declare class Camera {
|
|
807
|
-
readonly layers: Record<CameraLayer, number>;
|
|
808
|
-
get position(): Vector;
|
|
809
|
-
constructor();
|
|
810
|
-
setPosition(position: Vector): void;
|
|
811
|
-
setTransition(options: FocusingOptions): void;
|
|
812
|
-
appear(on: boolean, type?: CameraAppearTransitionType): IdleSingleEvent;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
interface GameConfiguration {
|
|
816
|
-
readonly screenResolution: {
|
|
817
|
-
readonly width: number;
|
|
818
|
-
readonly height: number;
|
|
819
|
-
} | undefined;
|
|
820
|
-
readonly maxScreenResolution: {
|
|
821
|
-
readonly width: number;
|
|
822
|
-
readonly height: number;
|
|
823
|
-
} | undefined;
|
|
824
|
-
readonly devMode: boolean;
|
|
825
|
-
readonly backgroundColor: RGBColor;
|
|
826
|
-
readonly antialias: boolean;
|
|
827
|
-
readonly resolution: number;
|
|
828
|
-
}
|
|
829
|
-
interface GameSetupOptions {
|
|
830
|
-
readonly assetDefinitions: readonly AssetDefinition<string>[];
|
|
831
|
-
readonly spriteDefinitions: Readonly<Record<string, SpriteDefinition>>;
|
|
832
|
-
}
|
|
833
|
-
declare class Game {
|
|
834
|
-
static get instance(): Game;
|
|
835
|
-
static readonly pause: Reducer<boolean, boolean>;
|
|
836
|
-
static get camera(): Camera;
|
|
837
|
-
static get time(): number;
|
|
838
|
-
readonly stage: Container;
|
|
839
|
-
readonly renderer: Pixi.Renderer;
|
|
840
|
-
readonly _screenSize: Variable<Vector>;
|
|
841
|
-
readonly screenSize: actions_lib.PersistentNotifier<Vector>;
|
|
842
|
-
readonly _screenSizeCenter: Variable<Vector>;
|
|
843
|
-
readonly screenSizeCenter: actions_lib.PersistentNotifier<Vector>;
|
|
844
|
-
readonly devMode: boolean;
|
|
845
|
-
constructor(partialConfiguration?: Partial<GameConfiguration>);
|
|
846
|
-
setup(setupOptions: GameSetupOptions): Promise<void>;
|
|
847
|
-
setResolution(resolution: number): void;
|
|
848
|
-
screenPositonToStagePosition(screenPosition: Vector): Vector;
|
|
849
|
-
setScreenPositionToStagePositionFunction(converterFunction: (screenPosition: Vector) => Vector): void;
|
|
850
|
-
resetScreenPositionToStagePositionFunction(): void;
|
|
851
|
-
destroyAsset(assetID: string): void;
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
declare class PositionConversionHelper {
|
|
855
|
-
static includeScaleInScreenPosition(screenPosition: Vector, gameInstanceScale: number, screenSizeCenter: Vector): Vector;
|
|
856
|
-
static normalizePolygonByAnchor(polygon: PolygonDefinition, frameSize: Vector, frameAnchor: Vector): PolygonDefinition;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
944
|
interface KeyboardKeyInfo {
|
|
860
945
|
readonly key: string;
|
|
861
946
|
readonly code: string;
|
|
@@ -883,7 +968,6 @@ declare class MouseService {
|
|
|
883
968
|
* accounting for canvas offset (e.g. letterboxing when max resolution is smaller than the window)
|
|
884
969
|
* and CSS scaling of the canvas.
|
|
885
970
|
*/
|
|
886
|
-
private clientPositionToScreenPosition;
|
|
887
971
|
}
|
|
888
972
|
|
|
889
973
|
declare class MouseTargetFocusService {
|
|
@@ -1216,4 +1300,4 @@ declare const PhysicsGateway_base: new () => PhysicsController;
|
|
|
1216
1300
|
declare class PhysicsGateway extends PhysicsGateway_base {
|
|
1217
1301
|
}
|
|
1218
1302
|
|
|
1219
|
-
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 CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, Entity, EntityDecorator, type ExplosionHit, FadeInContent, type FadeInContentOptions, FadeInStateAnimation, FocusingAnimation, Game, Gateway, 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,
|
|
1303
|
+
export { AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, type AudioAppearTransitionType, BORDER_MATERIAL_NAME, BardLegendsHardReset, BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, Entity, EntityDecorator, type ExplosionHit, FadeInContent, type FadeInContentOptions, FadeInStateAnimation, FocusingAnimation, Game, Gateway, 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, Music, type MusicDefinition, type MusicID, type MusicIDRegistry, type PartialTextOptions, PathFinder, type PathFinderResult, type PhysicsBodyDTO, PhysicsEntity, type PhysicsEntityDefinition, type PhysicsExplosionOptions, PhysicsGateway, PhysicsShapeType, Placeholder, type PolygonDefinition, type PolygonShapeData, 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, Sound, type SoundDefinition, type SoundID, type SoundIDRegistry, Sprite, type SpriteDefinition, type SpriteID, type SpriteIDRegistry, StateAnimation, type StateAnimationOptions, Text, type TextAlignment, type TextOptions, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|