getMasterSpatialOrientation
Get the direction the master panner points in.
getMasterSpatialOrientation(): { x: number; y: number; z: number };
Parameters
This method takes no parameters.
Returns
{ x: number; y: number; z: number }: the master direction, { x: 1, y: 0, z: 0 } until you change it. You get a copy.
Example
import { SoundHub } from 'soundhub';
const soundHub = new SoundHub();
soundHub.getMasterSpatialOrientation(); // { x: 1, y: 0, z: 0 }
soundHub.setMasterSpatialOrientation(0, 0, 1);
soundHub.getMasterSpatialOrientation(); // { x: 0, y: 0, z: 1 }
Good to know
- It returns the stored value, which is not reset by
resetMasterSpatialPositionorcleanupGlobalPan. After either, a new master panner points along positive x again while this still returns the last direction you set.
See also
setMasterSpatialOrientation: point the master panner.getMasterSpatialPosition: where the master panner is.getSpatialOrientation: the direction of one sound.