#

#

Visual

Audio-Reactive

Three.js

SC ThreeJS Audio Particles

SC ThreeJS Audio Particles

SC ThreeJS Audio Particles

Aug 26, 2025

0 views

SC ThreeJS Audio Particles is an audio-reactive particle field powered by Three.js and custom GLSL shaders. Particles swirl with curl-noise motion, expand and pulse to live microphone input, and color-shift across low/mid/high bands. Supports mouse orbit or gyroscope look controls and runs as a full-bleed WebGL canvas inside Framer. Great for music heroes, landing backgrounds, VJ loops, or meditative reactive visuals.

Lilac Flower
Lilac Flower
Lilac Flower
Lilac Flower
#
Built With
React, Three.js, WebGL, GLSL, Framer Code Component API
#
Layout Support
Fully Responsive (fills container)
#
Orientation
Full-bleed canvas visualization
#
Ideal Use Case
Music visualizers, hero backgrounds, live show booths, generative art
#
Built With
React, Three.js, WebGL, GLSL, Framer Code Component API
#
Layout Support
Fully Responsive (fills container)
#
Orientation
Full-bleed canvas visualization
#
Ideal Use Case
Music visualizers, hero backgrounds, live show booths, generative art
#
Built With
React, Three.js, WebGL, GLSL, Framer Code Component API
#
Layout Support
Fully Responsive (fills container)
#
Orientation
Full-bleed canvas visualization
#
Ideal Use Case
Music visualizers, hero backgrounds, live show booths, generative art

//

Tags

three.js
webgl
glsl
particles
audio
analyser
shader
curl-noise
simplex
mic
gyro
//
Technologies
Three.js, Web Audio API, DeviceOrientation API (optional)
//
Notes
Requires HTTPS for mic/gyro permissions; no external state managers.
//
Technologies
Three.js, Web Audio API, DeviceOrientation API (optional)
//
Notes
Requires HTTPS for mic/gyro permissions; no external state managers.
//
Technologies
Three.js, Web Audio API, DeviceOrientation API (optional)
//
Notes
Requires HTTPS for mic/gyro permissions; no external state managers.
#
Logic Level
Medium–High (shaders + audio analysis)
#
Runtime Cost
Medium–High (GPU fragment/vertex + point sprites)
#
Component Size
~6–8 KB (raw TSX + shaders)
#
Notes
Throughput scales with particleCount; tune for target devices.
#
Logic Level
Medium–High (shaders + audio analysis)
#
Runtime Cost
Medium–High (GPU fragment/vertex + point sprites)
#
Component Size
~6–8 KB (raw TSX + shaders)
#
Notes
Throughput scales with particleCount; tune for target devices.
#
Logic Level
Medium–High (shaders + audio analysis)
#
Runtime Cost
Medium–High (GPU fragment/vertex + point sprites)
#
Component Size
~6–8 KB (raw TSX + shaders)
#
Notes
Throughput scales with particleCount; tune for target devices.
  1. Drop SC-ThreeJS AudioParticles into a frame (it auto-sizes to the container).

  2. Set particleCount (start 1500–3000 on laptops).

  3. Choose bgColor / lowColor / midColor / highColor as GLSL vec3(r,g,b) values (0–1).

  4. Adjust camera: cameraZ (orbit radius), FOV, near/far.

  5. Interaction: enable Mouse (desktop) or Gyro Control (mobile).

  6. Click once to grant mic permission and start audio reactivity.

  • Club Visual: particleCount=3500 · cameraZ=1.4 · low=vec3(0.1,0.4,1.0) · mid=vec3(1.0,0.4,0.1) · high=vec3(1.0,0.1,0.4)

  • Calm Ambient: particleCount=1800 · cameraZ=1.8 · low=vec3(0.2,0.6,0.9) · mid=vec3(0.2,0.9,0.6) · high=vec3(0.9,0.2,0.6)

  • Monochrome: particleCount=2200 · colors=vec3(1.0,1.0,1.0) · bg=vec3(0.0,0.0,0.0)

  • Geometry: random points on/in a sphere (cubic distribution with r = cbrt(rand)*2).

  • Attributes: positions also used as normals for directional cues.

  • Vertex Shader:


    • Curl noise field + simplex noise → ordered + chaotic displacement.

    • Audio uniforms (uAudioLow/Mid/High) modulate expansion, movement, and size.

    • gl_PointSize scales with audio and perspective.


  • Fragment Shader: soft circular sprite with inner glow; mixes base and audio-tinted colors.

  • Audio: Web Audio AnalyserNode (fftSize=512) → frequency averages for low/mid/high bands.

  • Controls: mouse maps to spherical angles; Gyro uses DeviceOrientation (permission-gated on iOS).

  • Loop: requestAnimationFrame updates uniforms, camera, and renders.

  • particleCount dominates cost. Targets:

    • Mobile: 1200–2200 · Laptops: 2000–4000 · Desktops: 4000–8000.

  • Prefer smaller pointSize via shader (already dynamic) over more particles.

  • Avoid excessive bg blur/overlays atop the canvas; they force compositing.

  • Run in a container sized to need; massive full-screen on 5K displays will be heavy.

  • Consider lowering analyser fftSize if you fork (256) for fewer allocations.


  • HTTPS required for mic + sensors.

  • User gesture required to start audio on Safari/iOS (first click handled).

  • Works in modern evergreen browsers with WebGL; no SSR rendering.

  • Decorative by default: wrap with aria-hidden="true" if it conveys no information.

  • If used behind text, ensure sufficient contrast and avoid rapid strobe effects.

  • Permissions: Mic access via getUserMedia({audio:true}); Gyro access via DeviceOrientationEvent.requestPermission() on iOS.

  • Data: Audio stays in-browser; no network calls, logging, or storage.

  • Hardening: Events are removed on unmount; consider disposing Three.js objects (renderer.dispose(), geometry.dispose(), material.dispose()) in a fork for long-lived pages.

Name

Type

Default

Description

particleCount

number

2500

Number of particles in the point cloud (higher = richer, slower)

enableMouse

boolean

true

Enable mouse-driven camera orbit on desktop

gyroControl

boolean

false

Enable device-orientation orbit on mobile (prompts for permission on iOS)

cameraZ

number

1

Camera radius/orbit distance from origin

cameraFov

number

75

Perspective field of view in degrees

cameraNear

number

0.1

Camera near clipping plane

cameraFar

number

5000

Camera far clipping plane

bgColor

string

vec3(0.0, 0.0, 0.0)

Scene background color (GLSL vec3)

lowColor

string

vec3(0.1, 0.4, 1.0)

Color influence for low frequencies

midColor

string

vec3(1.0, 0.4, 0.1)

Color influence for mid frequencies

highColor

string

vec3(1.0, 0.1, 0.4)

Color influence for high frequencies (use GLSL vec3)

name:particleCount
type:number
default:2500
desc:Number of particles in the point cloud (higher = richer, slower)
name:enableMouse
type:boolean
default:true
desc:Enable mouse-driven camera orbit on desktop
name:gyroControl
type:boolean
default:false
desc:Enable device-orientation orbit on mobile (prompts for permission on iOS)
name:cameraZ
type:number
default:1
desc:Camera radius/orbit distance from origin
name:cameraFov
type:number
default:75
desc:Perspective field of view in degrees
name:cameraNear
type:number
default:0.1
desc:Camera near clipping plane
name:cameraFar
type:number
default:5000
desc:Camera far clipping plane
name:bgColor
type:string
default:vec3(0.0, 0.0, 0.0)
desc:Scene background color (GLSL vec3)
name:lowColor
type:string
default:vec3(0.1, 0.4, 1.0)
desc:Color influence for low frequencies
name:midColor
type:string
default:vec3(1.0, 0.4, 0.1)
desc:Color influence for mid frequencies
name:highColor
type:string
default:vec3(1.0, 0.1, 0.4)
desc:Color influence for high frequencies (use GLSL vec3)

Name

Type

Default

Description

name:particleCount
type:number
default:2500
desc:Number of particles in the point cloud (higher = richer, slower)
name:enableMouse
type:boolean
default:true
desc:Enable mouse-driven camera orbit on desktop
name:gyroControl
type:boolean
default:false
desc:Enable device-orientation orbit on mobile (prompts for permission on iOS)
name:cameraZ
type:number
default:1
desc:Camera radius/orbit distance from origin
name:cameraFov
type:number
default:75
desc:Perspective field of view in degrees
name:cameraNear
type:number
default:0.1
desc:Camera near clipping plane
name:cameraFar
type:number
default:5000
desc:Camera far clipping plane
name:bgColor
type:string
default:vec3(0.0, 0.0, 0.0)
desc:Scene background color (GLSL vec3)
name:lowColor
type:string
default:vec3(0.1, 0.4, 1.0)
desc:Color influence for low frequencies
name:midColor
type:string
default:vec3(1.0, 0.4, 0.1)
desc:Color influence for mid frequencies
name:highColor
type:string
default:vec3(1.0, 0.1, 0.4)
desc:Color influence for high frequencies (use GLSL vec3)
  • Decorative by default: wrap with aria-hidden="true" if it conveys no information.

  • If used behind text, ensure sufficient contrast and avoid rapid strobe effects.

  • Permissions: Mic access via getUserMedia({audio:true}); Gyro access via DeviceOrientationEvent.requestPermission() on iOS.

  • Data: Audio stays in-browser; no network calls, logging, or storage.

  • Hardening: Events are removed on unmount; consider disposing Three.js objects (renderer.dispose(), geometry.dispose(), material.dispose()) in a fork for long-lived pages.

Original animation © Jared Stanley; Three.js/GLSL adaptation for Framer © SecretoCho Design (2025).

Jared Stanley

Source Link

SecretoCho Design 2025

Provided “as is” for visual/UX purposes. You’re responsible for obtaining user consent for microphone/sensor usage and validating performance, accessibility, and licensing in your environment.

Stay ahead of the curve with insights into emerging visualization trends and technologies.