audiomotion-analyzer 4.2.0 → 4.4.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/README.md +95 -27
- package/package.json +1 -1
- package/src/audioMotion-analyzer.js +426 -312
- package/src/index.d.ts +13 -1
package/src/index.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ export interface Options {
|
|
|
49
49
|
overlay?: boolean;
|
|
50
50
|
peakLine?: boolean;
|
|
51
51
|
radial?: boolean;
|
|
52
|
+
radialInvert?: boolean;
|
|
53
|
+
radius?: number;
|
|
52
54
|
reflexAlpha?: number;
|
|
53
55
|
reflexBright?: number;
|
|
54
56
|
reflexFit?: boolean;
|
|
@@ -83,12 +85,13 @@ export interface AnalyzerBarData {
|
|
|
83
85
|
|
|
84
86
|
export interface ConstructorOptions extends Options {
|
|
85
87
|
audioCtx?: AudioContext;
|
|
88
|
+
canvas?: HTMLCanvasElement;
|
|
86
89
|
connectSpeakers?: boolean;
|
|
87
90
|
fsElement?: HTMLElement;
|
|
88
91
|
source?: HTMLMediaElement | AudioNode;
|
|
89
92
|
}
|
|
90
93
|
|
|
91
|
-
export type ChannelLayout = "single" | "dual-vertical" | "dual-combined";
|
|
94
|
+
export type ChannelLayout = "single" | "dual-horizontal" | "dual-vertical" | "dual-combined";
|
|
92
95
|
|
|
93
96
|
export type ColorMode = "gradient" | "bar-index" | "bar-level";
|
|
94
97
|
|
|
@@ -114,6 +117,7 @@ export interface LedParameters {
|
|
|
114
117
|
|
|
115
118
|
declare class AudioMotionAnalyzer {
|
|
116
119
|
constructor(container?: HTMLElement, options?: ConstructorOptions);
|
|
120
|
+
constructor(options?: ConstructorOptions);
|
|
117
121
|
|
|
118
122
|
get alphaBars(): boolean;
|
|
119
123
|
set alphaBars(value: boolean);
|
|
@@ -234,6 +238,12 @@ declare class AudioMotionAnalyzer {
|
|
|
234
238
|
get radial(): boolean;
|
|
235
239
|
set radial(value: boolean);
|
|
236
240
|
|
|
241
|
+
get radialInvert(): boolean;
|
|
242
|
+
set radialInvert(value: boolean);
|
|
243
|
+
|
|
244
|
+
get radius(): number;
|
|
245
|
+
set radius(value: number);
|
|
246
|
+
|
|
237
247
|
public reflexAlpha: number;
|
|
238
248
|
public reflexBright: number;
|
|
239
249
|
public reflexFit: boolean;
|
|
@@ -292,6 +302,8 @@ declare class AudioMotionAnalyzer {
|
|
|
292
302
|
public getEnergy(preset?: EnergyPreset): number;
|
|
293
303
|
public getEnergy(startFreq: number, endFreq?: number): number;
|
|
294
304
|
|
|
305
|
+
public getOptions(ignore?: string | string[]): Options;
|
|
306
|
+
|
|
295
307
|
public registerGradient(name: string, options: GradientOptions): void;
|
|
296
308
|
|
|
297
309
|
public setCanvasSize(width: number, height: number): void;
|