angry-pixel 2.0.13 → 2.0.15
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/lib/index.cjs.js +1 -1
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +80 -37
- package/lib/index.esm.js +1 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1289,12 +1289,14 @@ declare class SceneManager {
|
|
|
1289
1289
|
private currentSceneName;
|
|
1290
1290
|
private sceneNameToBeLoaded;
|
|
1291
1291
|
private _loadingScene;
|
|
1292
|
+
private _sceneLoadedThisFrame;
|
|
1292
1293
|
/** @internal */
|
|
1293
1294
|
constructor(systemManager: SystemManager, systemFactory: CreateSystemService, entityManager: EntityManager, assetManager: AssetManager);
|
|
1294
1295
|
addScene(sceneType: SceneType, name: string, openingScene?: boolean): void;
|
|
1295
1296
|
loadScene(name: string): void;
|
|
1296
1297
|
loadOpeningScene(): void;
|
|
1297
|
-
loadingScene(): boolean;
|
|
1298
|
+
get loadingScene(): boolean;
|
|
1299
|
+
get sceneLoadedThisFrame(): boolean;
|
|
1298
1300
|
/** @internal */
|
|
1299
1301
|
update(): void;
|
|
1300
1302
|
private destroyCurrentScene;
|
|
@@ -1428,9 +1430,15 @@ type AnimationSlice = {
|
|
|
1428
1430
|
* @category Components
|
|
1429
1431
|
*/
|
|
1430
1432
|
interface AudioPlayerOptions {
|
|
1433
|
+
/** The action to perform with the audio source. */
|
|
1431
1434
|
action: AudioPlayerAction;
|
|
1435
|
+
/** The audio source to play. */
|
|
1432
1436
|
audioSource: HTMLAudioElement;
|
|
1437
|
+
/** TRUE If the playback rate is fixed to the TimeManager time scale, default FALSE */
|
|
1438
|
+
fixedToTimeScale: boolean;
|
|
1439
|
+
/** TRUE If the audio source should loop. */
|
|
1433
1440
|
loop: boolean;
|
|
1441
|
+
/** The volume of the audio source. */
|
|
1434
1442
|
volume: number;
|
|
1435
1443
|
}
|
|
1436
1444
|
/**
|
|
@@ -1438,14 +1446,34 @@ interface AudioPlayerOptions {
|
|
|
1438
1446
|
* @category Components
|
|
1439
1447
|
*/
|
|
1440
1448
|
declare class AudioPlayer {
|
|
1449
|
+
/** The action to perform with the audio source. */
|
|
1441
1450
|
action: AudioPlayerAction;
|
|
1451
|
+
/** The audio source to play. */
|
|
1442
1452
|
audioSource: HTMLAudioElement;
|
|
1453
|
+
/** TRUE If the playback rate is fixed to the TimeManager time scale, default FALSE */
|
|
1454
|
+
fixedToTimeScale: boolean;
|
|
1455
|
+
/** TRUE If the audio source should loop. */
|
|
1443
1456
|
loop: boolean;
|
|
1457
|
+
/** READONLY, TRUE If the audio source is playing. */
|
|
1444
1458
|
playing: boolean;
|
|
1459
|
+
/** The volume of the audio source. */
|
|
1445
1460
|
volume: number;
|
|
1446
1461
|
/** @internal */
|
|
1447
|
-
|
|
1462
|
+
_currentAudioSrc: string;
|
|
1463
|
+
_playPromisePendind: boolean;
|
|
1448
1464
|
constructor(options?: Partial<AudioPlayerOptions>);
|
|
1465
|
+
/**
|
|
1466
|
+
* Play the audio source.
|
|
1467
|
+
*/
|
|
1468
|
+
play(audioSource?: HTMLAudioElement): void;
|
|
1469
|
+
/**
|
|
1470
|
+
* Pause the audio source.
|
|
1471
|
+
*/
|
|
1472
|
+
pause(): void;
|
|
1473
|
+
/**
|
|
1474
|
+
* Stop the audio source.
|
|
1475
|
+
*/
|
|
1476
|
+
stop(): void;
|
|
1449
1477
|
}
|
|
1450
1478
|
/**
|
|
1451
1479
|
* @public
|
|
@@ -2723,23 +2751,23 @@ type Chunk = {
|
|
|
2723
2751
|
* @category Components
|
|
2724
2752
|
*/
|
|
2725
2753
|
interface VideoRendererOptions {
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
height: number;
|
|
2729
|
-
offset: Vector2;
|
|
2730
|
-
rotation: number;
|
|
2754
|
+
action: "play" | "pause" | "stop";
|
|
2755
|
+
fixedToTimeScale: boolean;
|
|
2731
2756
|
flipHorizontally: boolean;
|
|
2732
2757
|
flipVertically: boolean;
|
|
2733
|
-
|
|
2758
|
+
height: number;
|
|
2759
|
+
layer: string;
|
|
2760
|
+
loop: boolean;
|
|
2734
2761
|
maskColor: string;
|
|
2735
2762
|
maskColorMix: number;
|
|
2736
|
-
|
|
2737
|
-
|
|
2763
|
+
offset: Vector2;
|
|
2764
|
+
opacity: number;
|
|
2765
|
+
rotation: number;
|
|
2738
2766
|
slice: Slice;
|
|
2739
|
-
|
|
2767
|
+
tintColor: string;
|
|
2768
|
+
video: HTMLVideoElement;
|
|
2740
2769
|
volume: number;
|
|
2741
|
-
|
|
2742
|
-
pause: boolean;
|
|
2770
|
+
width: number;
|
|
2743
2771
|
}
|
|
2744
2772
|
/**
|
|
2745
2773
|
* The VideoRenderer component plays and renders a video element,
|
|
@@ -2763,48 +2791,63 @@ interface VideoRendererOptions {
|
|
|
2763
2791
|
* videoRenderer.slice = {x: 0, y:0, width: 1920, height: 1080};
|
|
2764
2792
|
* videoRenderer.volume = 1;
|
|
2765
2793
|
* videoRenderer.loop = false;
|
|
2766
|
-
* videoRenderer.play
|
|
2767
|
-
* videoRenderer.pause = false;
|
|
2794
|
+
* videoRenderer.play();
|
|
2768
2795
|
* ```
|
|
2769
2796
|
*/
|
|
2770
2797
|
declare class VideoRenderer {
|
|
2771
|
-
/**The
|
|
2772
|
-
|
|
2773
|
-
/**
|
|
2774
|
-
|
|
2775
|
-
/** Overwrite the original video height */
|
|
2776
|
-
height: number;
|
|
2777
|
-
/** X-axis and Y-axis offset */
|
|
2778
|
-
offset: Vector2;
|
|
2779
|
-
/** Video rotation (degrees or radians) */
|
|
2780
|
-
rotation: number;
|
|
2798
|
+
/** The action to perform with the video */
|
|
2799
|
+
action: "play" | "pause" | "stop";
|
|
2800
|
+
/** TRUE If the playback rate is fixed to the TimeManager time scale, default FALSE */
|
|
2801
|
+
fixedToTimeScale: boolean;
|
|
2781
2802
|
/** Flip the video horizontally */
|
|
2782
2803
|
flipHorizontally: boolean;
|
|
2783
2804
|
/** Flip the video vertically */
|
|
2784
2805
|
flipVertically: boolean;
|
|
2785
|
-
/**
|
|
2786
|
-
|
|
2806
|
+
/** Overwrite the original video height */
|
|
2807
|
+
height: number;
|
|
2808
|
+
/** The render layer */
|
|
2809
|
+
layer: string;
|
|
2810
|
+
/** TRUE to play the video in loop */
|
|
2811
|
+
loop: boolean;
|
|
2787
2812
|
/** Define a mask color for the video */
|
|
2788
2813
|
maskColor: string;
|
|
2789
2814
|
/** Define the opacity of the mask color between 1 and 0 */
|
|
2790
2815
|
maskColorMix: number;
|
|
2791
|
-
/**
|
|
2792
|
-
|
|
2793
|
-
/**
|
|
2794
|
-
|
|
2816
|
+
/** X-axis and Y-axis offset */
|
|
2817
|
+
offset: Vector2;
|
|
2818
|
+
/** Change the opacity between 1 and 0 */
|
|
2819
|
+
opacity: number;
|
|
2820
|
+
/** READONLY, TRUE if the video is playing */
|
|
2821
|
+
playing: boolean;
|
|
2822
|
+
/** Video rotation (degrees or radians) */
|
|
2823
|
+
rotation: number;
|
|
2795
2824
|
/** Cut the video based on straight coordinates starting from the top left downward */
|
|
2796
2825
|
slice?: Slice;
|
|
2797
|
-
/**
|
|
2798
|
-
|
|
2826
|
+
/** Define a color for tinting the video */
|
|
2827
|
+
tintColor: string;
|
|
2828
|
+
/**The video element to render */
|
|
2829
|
+
video: HTMLVideoElement;
|
|
2799
2830
|
/** The volume of the video (between 1 and 0) */
|
|
2800
2831
|
volume: number;
|
|
2801
|
-
/**
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2832
|
+
/** Overwrite the original video width */
|
|
2833
|
+
width: number;
|
|
2834
|
+
_currentVideoSrc: string;
|
|
2835
|
+
_playPromisePendind: boolean;
|
|
2805
2836
|
/** @internal */
|
|
2806
2837
|
_renderData: VideoRenderData;
|
|
2807
2838
|
constructor(options?: Partial<VideoRendererOptions>);
|
|
2839
|
+
/**
|
|
2840
|
+
* Play the video source.
|
|
2841
|
+
*/
|
|
2842
|
+
play(videoSource?: HTMLVideoElement): void;
|
|
2843
|
+
/**
|
|
2844
|
+
* Pause the video source.
|
|
2845
|
+
*/
|
|
2846
|
+
pause(): void;
|
|
2847
|
+
/**
|
|
2848
|
+
* Stop the video source.
|
|
2849
|
+
*/
|
|
2850
|
+
stop(): void;
|
|
2808
2851
|
}
|
|
2809
2852
|
|
|
2810
2853
|
/**
|