随音乐呼吸的粒子球
ThreeJS Audio Reactive Visual,Francesco Michelini (kekkorider),2021 年

正在布展…
它是怎么做的
- 第 1 步MeshSurfaceSampler 在球面(或模型表面)上采样点位生成粒子
- 第 2 步THREE.AudioAnalyser 读取 128 段频谱并取平均
- 第 3 步频谱值作为 uniform 传入,顶点着色器用噪声+频谱位移粒子
- 第 4 步余弦调色板(palette.glsl)按位移量着色
复刻配方
一段技术配方,可以直接交给 AI 编程助手,也可以自己照着写。想指定技术栈、位置和性能预算,就把它加入实现方案。
Sample a few thousand points on the surface of a sphere or GLB model with MeshSurfaceSampler and store them in a Points geometry with a random attribute per point. Play a track through THREE.Audio and read frequency data from an AudioAnalyser each frame, reducing it to low, mid and high band averages. Pass these as uniforms and in the vertex shader displace each point along its normal by 3D noise scaled by the bass value. Color with a cosine palette indexed by displacement, and gate audio start behind a click to satisfy autoplay policies.


