bard-legends-framework 1.7.0 → 1.7.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/dist/index.d.mts +85 -70
- package/dist/index.d.ts +85 -70
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -144,6 +144,7 @@ declare abstract class View extends IDAttachable {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
type AudioAppearTransitionType = 'ease' | 'instant';
|
|
147
|
+
declare const SOUND_TRANSITION_DURATION = 800;
|
|
147
148
|
declare class Audio {
|
|
148
149
|
private constructor();
|
|
149
150
|
setVolumes(volumes: {
|
|
@@ -216,7 +217,7 @@ declare class Camera {
|
|
|
216
217
|
constructor();
|
|
217
218
|
setPosition(position: Vector): void;
|
|
218
219
|
setTransition(options: FocusingOptions): void;
|
|
219
|
-
appear(on: boolean, type?: CameraAppearTransitionType): IdleSingleEvent;
|
|
220
|
+
appear(on: boolean, type?: CameraAppearTransitionType, delay?: number): IdleSingleEvent;
|
|
220
221
|
screenPositonToStagePosition(screenPosition: Vector): Vector;
|
|
221
222
|
}
|
|
222
223
|
|
|
@@ -266,17 +267,10 @@ type SoundID = DynamicID<SoundIDRegistry, 'SoundID'>;
|
|
|
266
267
|
interface SoundDefinition {
|
|
267
268
|
readonly id: SoundID;
|
|
268
269
|
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: {
|
|
270
|
+
readonly loop?: {
|
|
277
271
|
readonly from: number;
|
|
278
272
|
readonly to: number;
|
|
279
|
-
}
|
|
273
|
+
};
|
|
280
274
|
}
|
|
281
275
|
|
|
282
276
|
interface GameConfiguration {
|
|
@@ -299,7 +293,6 @@ interface GameSetupOptions {
|
|
|
299
293
|
readonly fontAssetDefinitions: readonly AssetDefinition[];
|
|
300
294
|
readonly soundAssetDefinitions: readonly AssetDefinition<SoundID>[];
|
|
301
295
|
readonly soundDefinitions: Readonly<Record<SoundID, SoundDefinition>>;
|
|
302
|
-
readonly musicDefinitions: Readonly<Record<MusicID, MusicDefinition>>;
|
|
303
296
|
}
|
|
304
297
|
declare class Game {
|
|
305
298
|
static get instance(): Game;
|
|
@@ -323,45 +316,75 @@ declare class Game {
|
|
|
323
316
|
setResolution(resolution: number): void;
|
|
324
317
|
}
|
|
325
318
|
|
|
326
|
-
|
|
319
|
+
interface SoundOptions {
|
|
320
|
+
readonly offset?: number;
|
|
321
|
+
}
|
|
322
|
+
declare class Sound extends IDAttachable {
|
|
323
|
+
static createByName(soundName: SoundID, options?: SoundOptions): Sound;
|
|
327
324
|
protected _source: AudioBufferSourceNode;
|
|
328
325
|
protected _gain: GainNode;
|
|
329
|
-
protected
|
|
330
|
-
protected
|
|
331
|
-
|
|
332
|
-
constructor(output: AudioNode);
|
|
326
|
+
protected _head: AudioNode;
|
|
327
|
+
protected _soundDefinition: SoundDefinition;
|
|
328
|
+
protected _start: number;
|
|
333
329
|
get volume(): number;
|
|
334
330
|
set volume(value: number);
|
|
335
331
|
setVolume(value: number): this;
|
|
332
|
+
constructor(soundDefinition: SoundDefinition, options?: SoundOptions);
|
|
333
|
+
destroy(): void;
|
|
334
|
+
protected _play(offset: number): void;
|
|
335
|
+
protected _stop(): void;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
interface AdvancedSoundOptions extends SoundOptions {
|
|
339
|
+
readonly fade?: number;
|
|
340
|
+
readonly muffle?: number;
|
|
341
|
+
}
|
|
342
|
+
declare class AdvancedSound extends Sound {
|
|
343
|
+
static createByName(soundName: SoundID, options?: AdvancedSoundOptions): AdvancedSound;
|
|
344
|
+
readonly time: actions_lib.PersistentNotifier<number>;
|
|
345
|
+
constructor(soundDefinition: SoundDefinition, options?: AdvancedSoundOptions);
|
|
346
|
+
close(): IdleSingleEvent;
|
|
336
347
|
/**
|
|
337
348
|
* @param time in seconds
|
|
338
349
|
* @returns IdleSingleEvent that resolves in the given time
|
|
339
350
|
*/
|
|
340
351
|
notifyOnTime(targetTime: number): IdleSingleEvent;
|
|
352
|
+
setFade(strength: number): void;
|
|
353
|
+
fade(strength: number, transitionDuration?: number): IdleSingleEvent;
|
|
354
|
+
setMuffle(strength: number): void;
|
|
355
|
+
muffle(strength: number, transitionDuration?: number): IdleSingleEvent;
|
|
341
356
|
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
357
|
}
|
|
350
358
|
|
|
351
|
-
interface MusicOptions {
|
|
352
|
-
readonly
|
|
353
|
-
readonly muffle?: number;
|
|
359
|
+
interface MusicOptions extends SoundOptions {
|
|
360
|
+
readonly stopPlayingOnPause: boolean;
|
|
354
361
|
}
|
|
355
|
-
declare class Music extends
|
|
356
|
-
static createByName(
|
|
357
|
-
constructor(
|
|
358
|
-
|
|
359
|
-
|
|
362
|
+
declare class Music extends IDAttachable {
|
|
363
|
+
static createByName(soundName: SoundID, options?: MusicOptions): Music;
|
|
364
|
+
constructor(soundDefinition: SoundDefinition, partialOptions?: Partial<MusicOptions>);
|
|
365
|
+
/**
|
|
366
|
+
* Note: If then music time should stay synced with the game time, "stopPlayingOnPause" option has to be set true.
|
|
367
|
+
* @param time in seconds
|
|
368
|
+
* @returns IdleSingleEvent that resolves in the given time
|
|
369
|
+
*/
|
|
370
|
+
notifyOnTime(targetTime: number): IdleSingleEvent;
|
|
371
|
+
close(): IdleSingleEvent;
|
|
360
372
|
}
|
|
361
373
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
374
|
+
interface MusicPlayerOptionsNoPause extends MusicOptions {
|
|
375
|
+
readonly stopPlayingOnPause: false;
|
|
376
|
+
readonly playWhenPaused: undefined;
|
|
377
|
+
}
|
|
378
|
+
interface MusicPlayerOptionsWithPause extends MusicOptions {
|
|
379
|
+
readonly stopPlayingOnPause: true;
|
|
380
|
+
readonly playWhenPaused: SoundID | undefined;
|
|
381
|
+
}
|
|
382
|
+
type MusicPlayerOptions = MusicPlayerOptionsNoPause | MusicPlayerOptionsWithPause;
|
|
383
|
+
declare class MusicPlayer extends IDAttachable {
|
|
384
|
+
constructor(partialOptions?: Partial<MusicPlayerOptions>);
|
|
385
|
+
play(soundID: SoundID): IdleSingleEvent<Music | undefined>;
|
|
386
|
+
stop(): IdleSingleEvent;
|
|
387
|
+
close(): IdleSingleEvent;
|
|
365
388
|
}
|
|
366
389
|
|
|
367
390
|
declare enum ContainerEventType {
|
|
@@ -791,6 +814,8 @@ declare class Animator<T extends object = any, K extends NumericKeys<T> = Numeri
|
|
|
791
814
|
get animating(): boolean;
|
|
792
815
|
get target(): T;
|
|
793
816
|
get value(): Notifier<T>;
|
|
817
|
+
get paused(): boolean;
|
|
818
|
+
set paused(value: boolean);
|
|
794
819
|
constructor(target: T & Record<K, number>, animatedProperties: K | K[], partialOptions?: Partial<AnimationOptions>);
|
|
795
820
|
animate(values: Record<K, number>, partialOptions?: Partial<AnimationOptions>): SingleEvent<void>;
|
|
796
821
|
set(values: Record<K, number>): void;
|
|
@@ -815,52 +840,40 @@ interface StateAnimationOptions {
|
|
|
815
840
|
readonly duration: number;
|
|
816
841
|
readonly animation: AnimatorAnimation;
|
|
817
842
|
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
843
|
+
type AnimationState$2 = 'idle' | 'transitioning' | 'reverting';
|
|
844
|
+
interface StateAnimationState<T, A> {
|
|
845
|
+
readonly value: number;
|
|
846
|
+
readonly item: T | undefined;
|
|
847
|
+
readonly nextItem: T | undefined;
|
|
848
|
+
readonly queuedItem: T | undefined;
|
|
849
|
+
readonly animationState: A;
|
|
822
850
|
}
|
|
823
851
|
declare class StateAnimation<T> extends Attachable {
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
animationState: AnimationState$1;
|
|
830
|
-
};
|
|
852
|
+
onStateChange(callback: (item: T, nextItem?: T) => void): this;
|
|
853
|
+
onValueChange(callback: (value: number) => void): this;
|
|
854
|
+
get state(): StateAnimationState<T, AnimationState$2>;
|
|
855
|
+
get paused(): boolean;
|
|
856
|
+
set paused(value: boolean);
|
|
831
857
|
constructor(partialOptions?: Partial<StateAnimationOptions>);
|
|
832
|
-
|
|
858
|
+
setItem(item: T, options?: {
|
|
833
859
|
instant?: boolean;
|
|
834
860
|
}): void;
|
|
835
|
-
onStateChange(callback: (state: T, nextState?: T) => void): this;
|
|
836
|
-
onValueChange(callback: (value: number) => void): this;
|
|
837
861
|
}
|
|
838
862
|
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
DisappearToChange = 5
|
|
845
|
-
}
|
|
846
|
-
declare class FadeInStateAnimation<T> extends Attachable {
|
|
847
|
-
get currentState(): {
|
|
848
|
-
value: number;
|
|
849
|
-
state: T | undefined;
|
|
850
|
-
queuedState: T | undefined;
|
|
851
|
-
animationState: AnimationState;
|
|
852
|
-
};
|
|
863
|
+
type AnimationState$1 = 'hidden' | 'visible' | 'appearing' | 'disappearing' | 'disappearToChange';
|
|
864
|
+
declare class ThroughEmptyStateAnimation<T> extends Attachable {
|
|
865
|
+
onStateChange(callback: (state: T | undefined) => void): this;
|
|
866
|
+
onValueChange(callback: (value: number) => void): this;
|
|
867
|
+
get state(): StateAnimationState<T, AnimationState$1>;
|
|
853
868
|
constructor(partialOptions?: Partial<StateAnimationOptions>);
|
|
854
869
|
/**
|
|
855
|
-
* @param
|
|
870
|
+
* @param item - The new item to set. Keep in mind falsy values are also considered as a new item. To set the item to "disappear" use undefined.
|
|
856
871
|
* @param options - Optional options.
|
|
857
|
-
* @param options.instant - If true, the
|
|
872
|
+
* @param options.instant - If true, the item will be set immediately.
|
|
858
873
|
*/
|
|
859
|
-
|
|
874
|
+
setItem(item: T | undefined, options?: {
|
|
860
875
|
instant?: boolean;
|
|
861
876
|
}): void;
|
|
862
|
-
onStateChange(callback: (state: T | undefined) => void): this;
|
|
863
|
-
onValueChange(callback: (value: number) => void): this;
|
|
864
877
|
}
|
|
865
878
|
|
|
866
879
|
declare enum ScrollDirection {
|
|
@@ -900,13 +913,15 @@ declare enum SlideStateAnimationState {
|
|
|
900
913
|
Appear = 1,
|
|
901
914
|
Disappear = 2
|
|
902
915
|
}
|
|
916
|
+
type AnimationState = 'idle' | 'transitionForward' | 'transitionBackward' | 'reverting';
|
|
903
917
|
declare class SlideStateAnimation extends Attachable {
|
|
918
|
+
onStateChange(callback: (state: SlideStateAnimationState, index: number) => void): this;
|
|
919
|
+
onValueChange(callback: (value: number, index: number) => void): this;
|
|
920
|
+
get state(): StateAnimationState<number, AnimationState>;
|
|
904
921
|
constructor(partialOptions?: Partial<StateAnimationOptions>);
|
|
905
922
|
setIndex(index: number, options?: {
|
|
906
923
|
instant?: boolean;
|
|
907
924
|
}): void;
|
|
908
|
-
onStateChange(callback: (state: SlideStateAnimationState, index: number) => void): this;
|
|
909
|
-
onValueChange(callback: (value: number, index: number) => void): this;
|
|
910
925
|
}
|
|
911
926
|
|
|
912
927
|
declare class VectorSet {
|
|
@@ -1300,4 +1315,4 @@ declare const PhysicsGateway_base: new () => PhysicsController;
|
|
|
1300
1315
|
declare class PhysicsGateway extends PhysicsGateway_base {
|
|
1301
1316
|
}
|
|
1302
1317
|
|
|
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,
|
|
1318
|
+
export { AdvancedSound, type AdvancedSoundOptions, 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, 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, MusicPlayer, type MusicPlayerOptions, 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, SOUND_TRANSITION_DURATION, 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, type SoundOptions, Sprite, type SpriteDefinition, type SpriteID, type SpriteIDRegistry, StateAnimation, type StateAnimationOptions, type StateAnimationState, Text, type TextAlignment, type TextOptions, ThroughEmptyStateAnimation, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|
package/dist/index.d.ts
CHANGED
|
@@ -144,6 +144,7 @@ declare abstract class View extends IDAttachable {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
type AudioAppearTransitionType = 'ease' | 'instant';
|
|
147
|
+
declare const SOUND_TRANSITION_DURATION = 800;
|
|
147
148
|
declare class Audio {
|
|
148
149
|
private constructor();
|
|
149
150
|
setVolumes(volumes: {
|
|
@@ -216,7 +217,7 @@ declare class Camera {
|
|
|
216
217
|
constructor();
|
|
217
218
|
setPosition(position: Vector): void;
|
|
218
219
|
setTransition(options: FocusingOptions): void;
|
|
219
|
-
appear(on: boolean, type?: CameraAppearTransitionType): IdleSingleEvent;
|
|
220
|
+
appear(on: boolean, type?: CameraAppearTransitionType, delay?: number): IdleSingleEvent;
|
|
220
221
|
screenPositonToStagePosition(screenPosition: Vector): Vector;
|
|
221
222
|
}
|
|
222
223
|
|
|
@@ -266,17 +267,10 @@ type SoundID = DynamicID<SoundIDRegistry, 'SoundID'>;
|
|
|
266
267
|
interface SoundDefinition {
|
|
267
268
|
readonly id: SoundID;
|
|
268
269
|
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: {
|
|
270
|
+
readonly loop?: {
|
|
277
271
|
readonly from: number;
|
|
278
272
|
readonly to: number;
|
|
279
|
-
}
|
|
273
|
+
};
|
|
280
274
|
}
|
|
281
275
|
|
|
282
276
|
interface GameConfiguration {
|
|
@@ -299,7 +293,6 @@ interface GameSetupOptions {
|
|
|
299
293
|
readonly fontAssetDefinitions: readonly AssetDefinition[];
|
|
300
294
|
readonly soundAssetDefinitions: readonly AssetDefinition<SoundID>[];
|
|
301
295
|
readonly soundDefinitions: Readonly<Record<SoundID, SoundDefinition>>;
|
|
302
|
-
readonly musicDefinitions: Readonly<Record<MusicID, MusicDefinition>>;
|
|
303
296
|
}
|
|
304
297
|
declare class Game {
|
|
305
298
|
static get instance(): Game;
|
|
@@ -323,45 +316,75 @@ declare class Game {
|
|
|
323
316
|
setResolution(resolution: number): void;
|
|
324
317
|
}
|
|
325
318
|
|
|
326
|
-
|
|
319
|
+
interface SoundOptions {
|
|
320
|
+
readonly offset?: number;
|
|
321
|
+
}
|
|
322
|
+
declare class Sound extends IDAttachable {
|
|
323
|
+
static createByName(soundName: SoundID, options?: SoundOptions): Sound;
|
|
327
324
|
protected _source: AudioBufferSourceNode;
|
|
328
325
|
protected _gain: GainNode;
|
|
329
|
-
protected
|
|
330
|
-
protected
|
|
331
|
-
|
|
332
|
-
constructor(output: AudioNode);
|
|
326
|
+
protected _head: AudioNode;
|
|
327
|
+
protected _soundDefinition: SoundDefinition;
|
|
328
|
+
protected _start: number;
|
|
333
329
|
get volume(): number;
|
|
334
330
|
set volume(value: number);
|
|
335
331
|
setVolume(value: number): this;
|
|
332
|
+
constructor(soundDefinition: SoundDefinition, options?: SoundOptions);
|
|
333
|
+
destroy(): void;
|
|
334
|
+
protected _play(offset: number): void;
|
|
335
|
+
protected _stop(): void;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
interface AdvancedSoundOptions extends SoundOptions {
|
|
339
|
+
readonly fade?: number;
|
|
340
|
+
readonly muffle?: number;
|
|
341
|
+
}
|
|
342
|
+
declare class AdvancedSound extends Sound {
|
|
343
|
+
static createByName(soundName: SoundID, options?: AdvancedSoundOptions): AdvancedSound;
|
|
344
|
+
readonly time: actions_lib.PersistentNotifier<number>;
|
|
345
|
+
constructor(soundDefinition: SoundDefinition, options?: AdvancedSoundOptions);
|
|
346
|
+
close(): IdleSingleEvent;
|
|
336
347
|
/**
|
|
337
348
|
* @param time in seconds
|
|
338
349
|
* @returns IdleSingleEvent that resolves in the given time
|
|
339
350
|
*/
|
|
340
351
|
notifyOnTime(targetTime: number): IdleSingleEvent;
|
|
352
|
+
setFade(strength: number): void;
|
|
353
|
+
fade(strength: number, transitionDuration?: number): IdleSingleEvent;
|
|
354
|
+
setMuffle(strength: number): void;
|
|
355
|
+
muffle(strength: number, transitionDuration?: number): IdleSingleEvent;
|
|
341
356
|
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
357
|
}
|
|
350
358
|
|
|
351
|
-
interface MusicOptions {
|
|
352
|
-
readonly
|
|
353
|
-
readonly muffle?: number;
|
|
359
|
+
interface MusicOptions extends SoundOptions {
|
|
360
|
+
readonly stopPlayingOnPause: boolean;
|
|
354
361
|
}
|
|
355
|
-
declare class Music extends
|
|
356
|
-
static createByName(
|
|
357
|
-
constructor(
|
|
358
|
-
|
|
359
|
-
|
|
362
|
+
declare class Music extends IDAttachable {
|
|
363
|
+
static createByName(soundName: SoundID, options?: MusicOptions): Music;
|
|
364
|
+
constructor(soundDefinition: SoundDefinition, partialOptions?: Partial<MusicOptions>);
|
|
365
|
+
/**
|
|
366
|
+
* Note: If then music time should stay synced with the game time, "stopPlayingOnPause" option has to be set true.
|
|
367
|
+
* @param time in seconds
|
|
368
|
+
* @returns IdleSingleEvent that resolves in the given time
|
|
369
|
+
*/
|
|
370
|
+
notifyOnTime(targetTime: number): IdleSingleEvent;
|
|
371
|
+
close(): IdleSingleEvent;
|
|
360
372
|
}
|
|
361
373
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
374
|
+
interface MusicPlayerOptionsNoPause extends MusicOptions {
|
|
375
|
+
readonly stopPlayingOnPause: false;
|
|
376
|
+
readonly playWhenPaused: undefined;
|
|
377
|
+
}
|
|
378
|
+
interface MusicPlayerOptionsWithPause extends MusicOptions {
|
|
379
|
+
readonly stopPlayingOnPause: true;
|
|
380
|
+
readonly playWhenPaused: SoundID | undefined;
|
|
381
|
+
}
|
|
382
|
+
type MusicPlayerOptions = MusicPlayerOptionsNoPause | MusicPlayerOptionsWithPause;
|
|
383
|
+
declare class MusicPlayer extends IDAttachable {
|
|
384
|
+
constructor(partialOptions?: Partial<MusicPlayerOptions>);
|
|
385
|
+
play(soundID: SoundID): IdleSingleEvent<Music | undefined>;
|
|
386
|
+
stop(): IdleSingleEvent;
|
|
387
|
+
close(): IdleSingleEvent;
|
|
365
388
|
}
|
|
366
389
|
|
|
367
390
|
declare enum ContainerEventType {
|
|
@@ -791,6 +814,8 @@ declare class Animator<T extends object = any, K extends NumericKeys<T> = Numeri
|
|
|
791
814
|
get animating(): boolean;
|
|
792
815
|
get target(): T;
|
|
793
816
|
get value(): Notifier<T>;
|
|
817
|
+
get paused(): boolean;
|
|
818
|
+
set paused(value: boolean);
|
|
794
819
|
constructor(target: T & Record<K, number>, animatedProperties: K | K[], partialOptions?: Partial<AnimationOptions>);
|
|
795
820
|
animate(values: Record<K, number>, partialOptions?: Partial<AnimationOptions>): SingleEvent<void>;
|
|
796
821
|
set(values: Record<K, number>): void;
|
|
@@ -815,52 +840,40 @@ interface StateAnimationOptions {
|
|
|
815
840
|
readonly duration: number;
|
|
816
841
|
readonly animation: AnimatorAnimation;
|
|
817
842
|
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
843
|
+
type AnimationState$2 = 'idle' | 'transitioning' | 'reverting';
|
|
844
|
+
interface StateAnimationState<T, A> {
|
|
845
|
+
readonly value: number;
|
|
846
|
+
readonly item: T | undefined;
|
|
847
|
+
readonly nextItem: T | undefined;
|
|
848
|
+
readonly queuedItem: T | undefined;
|
|
849
|
+
readonly animationState: A;
|
|
822
850
|
}
|
|
823
851
|
declare class StateAnimation<T> extends Attachable {
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
animationState: AnimationState$1;
|
|
830
|
-
};
|
|
852
|
+
onStateChange(callback: (item: T, nextItem?: T) => void): this;
|
|
853
|
+
onValueChange(callback: (value: number) => void): this;
|
|
854
|
+
get state(): StateAnimationState<T, AnimationState$2>;
|
|
855
|
+
get paused(): boolean;
|
|
856
|
+
set paused(value: boolean);
|
|
831
857
|
constructor(partialOptions?: Partial<StateAnimationOptions>);
|
|
832
|
-
|
|
858
|
+
setItem(item: T, options?: {
|
|
833
859
|
instant?: boolean;
|
|
834
860
|
}): void;
|
|
835
|
-
onStateChange(callback: (state: T, nextState?: T) => void): this;
|
|
836
|
-
onValueChange(callback: (value: number) => void): this;
|
|
837
861
|
}
|
|
838
862
|
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
DisappearToChange = 5
|
|
845
|
-
}
|
|
846
|
-
declare class FadeInStateAnimation<T> extends Attachable {
|
|
847
|
-
get currentState(): {
|
|
848
|
-
value: number;
|
|
849
|
-
state: T | undefined;
|
|
850
|
-
queuedState: T | undefined;
|
|
851
|
-
animationState: AnimationState;
|
|
852
|
-
};
|
|
863
|
+
type AnimationState$1 = 'hidden' | 'visible' | 'appearing' | 'disappearing' | 'disappearToChange';
|
|
864
|
+
declare class ThroughEmptyStateAnimation<T> extends Attachable {
|
|
865
|
+
onStateChange(callback: (state: T | undefined) => void): this;
|
|
866
|
+
onValueChange(callback: (value: number) => void): this;
|
|
867
|
+
get state(): StateAnimationState<T, AnimationState$1>;
|
|
853
868
|
constructor(partialOptions?: Partial<StateAnimationOptions>);
|
|
854
869
|
/**
|
|
855
|
-
* @param
|
|
870
|
+
* @param item - The new item to set. Keep in mind falsy values are also considered as a new item. To set the item to "disappear" use undefined.
|
|
856
871
|
* @param options - Optional options.
|
|
857
|
-
* @param options.instant - If true, the
|
|
872
|
+
* @param options.instant - If true, the item will be set immediately.
|
|
858
873
|
*/
|
|
859
|
-
|
|
874
|
+
setItem(item: T | undefined, options?: {
|
|
860
875
|
instant?: boolean;
|
|
861
876
|
}): void;
|
|
862
|
-
onStateChange(callback: (state: T | undefined) => void): this;
|
|
863
|
-
onValueChange(callback: (value: number) => void): this;
|
|
864
877
|
}
|
|
865
878
|
|
|
866
879
|
declare enum ScrollDirection {
|
|
@@ -900,13 +913,15 @@ declare enum SlideStateAnimationState {
|
|
|
900
913
|
Appear = 1,
|
|
901
914
|
Disappear = 2
|
|
902
915
|
}
|
|
916
|
+
type AnimationState = 'idle' | 'transitionForward' | 'transitionBackward' | 'reverting';
|
|
903
917
|
declare class SlideStateAnimation extends Attachable {
|
|
918
|
+
onStateChange(callback: (state: SlideStateAnimationState, index: number) => void): this;
|
|
919
|
+
onValueChange(callback: (value: number, index: number) => void): this;
|
|
920
|
+
get state(): StateAnimationState<number, AnimationState>;
|
|
904
921
|
constructor(partialOptions?: Partial<StateAnimationOptions>);
|
|
905
922
|
setIndex(index: number, options?: {
|
|
906
923
|
instant?: boolean;
|
|
907
924
|
}): void;
|
|
908
|
-
onStateChange(callback: (state: SlideStateAnimationState, index: number) => void): this;
|
|
909
|
-
onValueChange(callback: (value: number, index: number) => void): this;
|
|
910
925
|
}
|
|
911
926
|
|
|
912
927
|
declare class VectorSet {
|
|
@@ -1300,4 +1315,4 @@ declare const PhysicsGateway_base: new () => PhysicsController;
|
|
|
1300
1315
|
declare class PhysicsGateway extends PhysicsGateway_base {
|
|
1301
1316
|
}
|
|
1302
1317
|
|
|
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,
|
|
1318
|
+
export { AdvancedSound, type AdvancedSoundOptions, 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, 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, MusicPlayer, type MusicPlayerOptions, 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, SOUND_TRANSITION_DURATION, 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, type SoundOptions, Sprite, type SpriteDefinition, type SpriteID, type SpriteIDRegistry, StateAnimation, type StateAnimationOptions, type StateAnimationState, Text, type TextAlignment, type TextOptions, ThroughEmptyStateAnimation, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|