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