Skip to content

Support the z coordinate when following spatial audio sources - #7369

Open
ICOM725 wants to merge 1 commit into
phaserjs:masterfrom
ICOM725:fix/audio-follow-z
Open

Support the z coordinate when following spatial audio sources#7369
ICOM725 wants to merge 1 commit into
phaserjs:masterfrom
ICOM725:fix/audio-follow-z

Conversation

@ICOM725

@ICOM725 ICOM725 commented Sep 7, 2026

Copy link
Copy Markdown

This PR

  • Adds a new feature

Describe the changes below:

Follow the source object's optional z coordinate when updating a spatial sound, including zero and negative values. Keep the existing depth when z is absent or undefined, and document that follow accepts a Vector3Like object.

Add regression coverage for changing coordinates, zero depth, two-dimensional targets, undefined depth, paused playback and unchanged coordinates. This change is limited to following a source; it does not add a new WebAudioSound.z accessor.

Fixes #7135.

Validation:

  • Before the implementation, the initial five new tests produced three failures and two passing compatibility checks.
  • Sound tests: 6 files, 378 tests passed, including the final six new tests.
  • ESLint 8.57.1 passed for the three changed files with the repository configuration, test globals and lines-around-comment disabled. Without that override, the existing test at line 321 fails the same rule on both the baseline and this branch.
  • git diff --check passed.

The JSDoc -X check could not complete because the installed JSDoc 3 calls util.isRegExp, which is unavailable in Node 25. No dependency changes or generated files are included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

audio follow does not honor the Z axis of the object

1 participant