API Reference Overview
Complete reference for all public APIs exported by the WebGPU FFT Library.
Core APIs
| API | Description |
|---|---|
FFTEngine | Main GPU-accelerated FFT engine |
cpuFFT | CPU-based FFT fallback |
Application APIs
| API | Description |
|---|---|
SpectrumAnalyzer | Real-time audio frequency analysis |
ImageFilter | Frequency domain image filtering |
Utilities
| API | Description |
|---|---|
Window Functions | Hann, Hamming, Blackman windows |
Complex Numbers | Complex arithmetic helpers |
GPU Detection | WebGPU availability checks |
Bit Reversal | Bit-reversal permutation utilities |
Types
All TypeScript types are exported for use in your applications:
ts
import type {
FFTEngineConfig,
SpectrumAnalyzerConfig,
FilterType,
FilterShape,
ImageFilterConfig,
Complex,
} from 'webgpu-fft';1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Error Handling
The library uses custom error classes for clear error messages:
ts
import { FFTError, FFTErrorCode } from 'webgpu-fft';
try {
await engine.fft1D(invalidData, FFTDirection.Forward);
} catch (error) {
if (error instanceof FFTError) {
console.error(`FFT Error [${error.code}]: ${error.message}`);
}
}1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Next Steps
- Explore specific API pages from the sidebar
- See the Quick Start Guide for getting started
- Read the Architecture Overview for internal design