THREE.JS / FOUNDATIONS 187

Touch the rhythm.

Map controller contact to one observable contract: a bar glows, a tone plays, and an available gamepad actuator receives pulse(intensity, duration). The desktop harness uses a virtual actuator; only a headset can prove physical vibration.

Initializing Preparing renderer

Preparing WebXR controllers, grip models, audio, and haptic feature detection...

mode
-
connected
-
haptic
-
impacts
-
pulses
-
tones
-
bar
-
draws
-
XR entry pointdesktop

The virtual connection dispatches the same connected / disconnected events as a controller grip, with a test gamepad and actuator.

Impact harnesssame pulse path

Connect a virtual controller, then strike a bar. Haptics remain explicitly labeled virtual until an immersive session supplies a native Gamepad.

Pulse tracewaiting
No controller events yet.
active source-
actuator contract-

The trace records controller lifecycle, impact, and pulse results. Unsupported haptics fall back to visual and audio feedback.

Capability boundaryprobing
WebXR API-
immersive VR-
native haptics-
reference space-

A desktop harness can verify the event and promise-handling contract; controller pose, input profiles, actuator support, and vibration still require a headset.

The XR button is a real session entry point. Use ?forceWebGL=1 for the WebGL2 companion. No physical haptic result is claimed by desktop simulation.

THREE.JS FOUNDATIONS LAB