|
@@ -101,8 +101,25 @@ AudioListener.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
orientation.set( 0, 0, - 1 ).applyQuaternion( quaternion );
|
|
|
|
|
|
- listener.setPosition( position.x, position.y, position.z );
|
|
|
- listener.setOrientation( orientation.x, orientation.y, orientation.z, up.x, up.y, up.z );
|
|
|
+ if ( listener.positionX ) {
|
|
|
+
|
|
|
+ listener.positionX.setValueAtTime( position.x, this.context.currentTime );
|
|
|
+ listener.positionY.setValueAtTime( position.y, this.context.currentTime );
|
|
|
+ listener.positionZ.setValueAtTime( position.z, this.context.currentTime );
|
|
|
+ listener.forwardX.setValueAtTime( orientation.x, this.context.currentTime );
|
|
|
+ listener.forwardY.setValueAtTime( orientation.y, this.context.currentTime );
|
|
|
+ listener.forwardZ.setValueAtTime( orientation.z, this.context.currentTime );
|
|
|
+ listener.upX.setValueAtTime( up.x, this.context.currentTime );
|
|
|
+ listener.upY.setValueAtTime( up.y, this.context.currentTime );
|
|
|
+ listener.upZ.setValueAtTime( up.z, this.context.currentTime );
|
|
|
+
|
|
|
+ }
|
|
|
+ else {
|
|
|
+
|
|
|
+ listener.setPosition( position.x, position.y, position.z );
|
|
|
+ listener.setOrientation( orientation.x, orientation.y, orientation.z, up.x, up.y, up.z );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
};
|
|
|
|