Skip to main content

getMasterSpatialPosition

Get the position last given to the master panner.

getMasterSpatialPosition(): { x: number; y: number; z: number };

Parameters​

This method takes no parameters.

Returns​

{ x: number; y: number; z: number }: the master position, { x: 0, y: 0, z: 0 } until you set one. It never returns null.

Example​

import { SoundHub } from 'soundhub';

const soundHub = new SoundHub();

soundHub.getMasterSpatialPosition(); // { x: 0, y: 0, z: 0 }

soundHub.setMasterSpatialPosition(4, 0, -2);
soundHub.getMasterSpatialPosition(); // { x: 4, y: 0, z: -2 }

Good to know​

See also​