GitHub - TiagoCavalcante/r3f-equalizer: An audio visualizer built with @react-th...
source link: https://github.com/TiagoCavalcante/r3f-equalizer
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
@react-three/fiber equalizer
r3f-equalizer is a 3d audio equalizer for React built using @react-three/fiber.
Quickstart
npm install r3f-equalizer
r3f-equalizer exports a component Equalizer
(as default), this component receives the following properties:
amplitude
(type:number
) — the amplitude of the volume. Default:1
audio
(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.03
cubeSpacing
(type:number
) — the spacing between the cubes. Default:4.5
cameraFov
(type:number
) — the FOV of the camera. Default:45
cameraPosition
(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:80
gridRows
(type:number
) — the number of rows of the "dancing cubes" grid. Default:12
onCreatedCallback
(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} />
</>
}
Recommend
-
55
Last month, the YouTube Music team detailed bi-weekly updates and other upcoming features to help address early user complains. Google’s latest streaming service is now preparing an equalizer to focus on audio quality criticism, while work conti...
-
7
-
12
闪电贷平台Equalizer Finance完成私募轮融资 律动 BlockBeats 消息,4 月 2 日,闪电贷平台 Equalizer Finance 宣布,通过出售 2750 万枚 EQZ 代币完成私募轮融资。该私募轮融资于 2021 年 3 月 1 日-3 月 15 日进行。投资方包括 NGC Ventures、LD Capit...
-
5
Features Current System-wide audio source Volume Booster Volume Balance support for all devices Basic EQ - 3 band (Bass, Mids, Treble) Advanced EQ - 10 bands Roadmap
-
8
Bridge Mutual 为 Equalizer 闪电贷平衡协议提供风险保护Bridge Mutual ($BMI) 很高兴宣布与行业首家致力于平衡去中心化市场的平台 Equalizer Finance ($EQZ) 建立合作伙伴关系,以保护 Equalizer 平台用户的交易活动。…· 1 小时前
-
3
What Are the Best Spotify Equalizer Settings? By Quina Baterna Published 5 hours ago If you want the best Spotify listening expe...
-
3
System audio equalizer and volume mixer for macOSRanked #13 for todayeqMacSystem audio equalizer and volume mixer for macOS
-
8
-
2
r3f-native-orbitcontrols OrbitControls for React Three Fiber in React Native Install r3f-native-orbitcontrols is distributed as a npm package...
-
5
Live Streaming and Audio Equalizer with ExoPlayer in Jetpack ComposePublished in
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK