1.4.2 • Published 3 years ago
r3f-equalizer v1.4.2
@react-three/fiber equalizer
r3f-equalizer is a 3d audio equalizer for React built using @react-three/fiber.
Quickstart
npm install r3f-equalizerr3f-equalizer exports a component Equalizer (as default), this component receives the following properties:
amplitude(type:number) — the amplitude of the volume. Default:1audio(type:RefObject<HTMLMediaElement>) — the HTML element where the audio comes frombackgroundColor(type:string) — the color of the background. If it's an empty string, the background will be transparent. Default:""cubeSideLength(type:number) — the side length of the "dancing cubes". Default:0.03cubeSpacing(type:number) — the spacing between the cubes. Default:4.5cameraFov(type:number) — the FOV of the camera. Default:45cameraPosition(type:number[3]) — the position of the camera in the 3d space (which the center is[0, 0, 0]). Default:[0, 5, 15]gridCols(type:number) — the number of columns of the "dancing cubes" grid. Default:80gridRows(type:number) — the number of rows of the "dancing cubes" grid. Default:12onCreatedCallback(type:function) — function called after the canvas is created. Default:() => {}
Example
import React, { useEffect, useRef } from "react"
import Equalizer from "r3f-equalizer"
function App() {
const audioRef = useRef()
return <>
<audio ref={audioRef} src="..." />
<Equalizer amplitude={5} audio={audioRef} />
</>
}1.4.2
3 years ago
1.4.1
4 years ago
1.4.0
4 years ago
1.3.1
4 years ago
1.3.0
4 years ago
1.2.1
4 years ago
1.2.0
4 years ago
1.1.0
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.2.0
4 years ago
0.1.11
4 years ago
0.1.10
4 years ago
0.1.9
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago