cacophony
    Preparing search index...

    Type Alias ThreeDOptions

    ThreeDOptions:
        | { panType: "stereo"; stereoPan: number }
        | { panType: "HRTF"; position?: Position } & Required<HrtfPannerOptions>

    Canonical type describing the 3D-audio configuration for a sound, discriminated by PanType.

    • For panType: "stereo" the only relevant field is stereoPan (-1..1). HRTF position/orientation fields are intentionally not present on this variant so that callers cannot accidentally set them on a stereo source.
    • For panType: "HRTF" the variant carries the HrtfPannerOptions subset plus an optional [x,y,z] position tuple.

    Containers / mixins exposing this type guarantee the HRTF variant is fully populated (Required) so callers can read fields without further narrowing. Inputs that only carry a partial override (e.g. clone calls) use the looser PanCloneOverrides shape.