visual-song 0.13.0 → 0.13.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.ts +20 -10
- package/dist/index.js +319 -229
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
4
|
|
|
3
5
|
declare enum EasingType {
|
|
4
6
|
Linear = 0,
|
|
@@ -27,20 +29,27 @@ declare enum EasingType {
|
|
|
27
29
|
OutBounce = 23,
|
|
28
30
|
InOutBounce = 24
|
|
29
31
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
declare enum RenderMode {
|
|
33
|
+
CONTINUOUS = "CONTINUOUS",
|
|
34
|
+
ONCE = "ONCE",
|
|
35
|
+
PAUSED = "PAUSED"
|
|
36
|
+
}
|
|
37
|
+
declare function VisualSongProvider({ children }: PropsWithChildren<{}>): react_jsx_runtime.JSX.Element;
|
|
38
|
+
type VisualSongAudioRef = {
|
|
35
39
|
play(): void;
|
|
36
40
|
pause(): void;
|
|
37
41
|
stop(): void;
|
|
38
|
-
setCurrentTime(time: number): void;
|
|
39
42
|
getCurrentTime(): number;
|
|
40
|
-
|
|
43
|
+
setCurrentTime(time: number): void;
|
|
41
44
|
getIsPlay(): boolean;
|
|
45
|
+
getAudioDuration(): number;
|
|
46
|
+
loadAudioFile(file: File): void;
|
|
42
47
|
getLoop(): boolean;
|
|
43
48
|
setLoop(loop: boolean): void;
|
|
49
|
+
};
|
|
50
|
+
declare function useVisualSongAudio(file?: File): VisualSongAudioRef;
|
|
51
|
+
type VisualSongRef = {
|
|
52
|
+
IsInitialized(): boolean;
|
|
44
53
|
getBackgroundColor(): Float32Array;
|
|
45
54
|
setBackgroundColor(color: Float32Array): void;
|
|
46
55
|
setVertexShader(shader: string): boolean;
|
|
@@ -63,10 +72,11 @@ type Props = {
|
|
|
63
72
|
vertexShader?: string;
|
|
64
73
|
primitiveMode?: number;
|
|
65
74
|
vertexCount?: number;
|
|
66
|
-
|
|
75
|
+
useSinWaveOnly?: boolean;
|
|
76
|
+
renderMode?: RenderMode;
|
|
67
77
|
initializedCallback?: () => void;
|
|
68
78
|
};
|
|
69
79
|
declare const VisualSong: react.ForwardRefExoticComponent<Props & react.RefAttributes<VisualSongRef>>;
|
|
70
80
|
|
|
71
|
-
export { EasingType,
|
|
72
|
-
export type { VisualSongRef };
|
|
81
|
+
export { EasingType, RenderMode, VisualSong, VisualSongProvider, useVisualSongAudio };
|
|
82
|
+
export type { VisualSongAudioRef, VisualSongRef };
|