← API
Class

Spatializer

PannerNode + occlusion biquad wrapper. Inserted between a Voice and its Bus when a play call passes a `spatializer` option. - 2D pan uses `StereoPannerNode` (cheap, just left/right shift). - 3D uses `PannerNode` in HRTF mode (one node per voice — fine for the dozens of simultaneous voices a typical game holds, expensive past hundreds), followed by a biquad lowpass for occlusion plus a gain stage so occlusion can also drop level slightly. 3D config ( `refDistance` , `maxDistance` , `rolloffFactor` , `distanceModel` ) is configurable per voice via `SpatialOptions` and tunable live via the `set*` methods. Occlusion is a single 0..1 knob that drives the lowpass cutoff plus a small gain dip.

Members

  • constructor
  • connectInto
  • dispose
  • setDistanceModel
  • setMaxDistance
  • setOcclusion
  • setPan
  • setPosition
  • setRefDistance
  • setRolloffFactor