Skip to content

Commit 6f9b2b3

Browse files
authored
Merge pull request #15424 from Artyom17/dev
PositionalAudio: Skip updating WebAudio API when audio is not playing.
2 parents 96ca78e + 59c923a commit 6f9b2b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/audio/PositionalAudio.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ PositionalAudio.prototype = Object.assign( Object.create( Audio.prototype ), {
104104

105105
Object3D.prototype.updateMatrixWorld.call( this, force );
106106

107+
if ( ! this.isPlaying ) {
108+
109+
return;
110+
111+
}
112+
107113
var panner = this.panner;
108114
this.matrixWorld.decompose( position, quaternion, scale );
109115

0 commit comments

Comments
 (0)