提交 531b1b32 编写于 作者: M Mr.doob

Updated builds.

上级 68ceebdb
...@@ -39516,14 +39516,22 @@ ...@@ -39516,14 +39516,22 @@
updateMatrixWorld: ( function () { updateMatrixWorld: ( function () {
var position = new Vector3(); var position = new Vector3();
var quaternion = new Quaternion();
var scale = new Vector3();
var orientation = new Vector3();
return function updateMatrixWorld( force ) { return function updateMatrixWorld( force ) {
Object3D.prototype.updateMatrixWorld.call( this, force ); Object3D.prototype.updateMatrixWorld.call( this, force );
position.setFromMatrixPosition( this.matrixWorld ); var panner = this.panner;
this.matrixWorld.decompose( position, quaternion, scale );
orientation.set( 0, 0, 1 ).applyQuaternion( quaternion );
this.panner.setPosition( position.x, position.y, position.z ); panner.setPosition( position.x, position.y, position.z );
panner.setOrientation( orientation.x, orientation.y, orientation.z );
}; };
此差异已折叠。
...@@ -39510,14 +39510,22 @@ PositionalAudio.prototype = Object.assign( Object.create( Audio.prototype ), { ...@@ -39510,14 +39510,22 @@ PositionalAudio.prototype = Object.assign( Object.create( Audio.prototype ), {
updateMatrixWorld: ( function () { updateMatrixWorld: ( function () {
var position = new Vector3(); var position = new Vector3();
var quaternion = new Quaternion();
var scale = new Vector3();
var orientation = new Vector3();
return function updateMatrixWorld( force ) { return function updateMatrixWorld( force ) {
Object3D.prototype.updateMatrixWorld.call( this, force ); Object3D.prototype.updateMatrixWorld.call( this, force );
position.setFromMatrixPosition( this.matrixWorld ); var panner = this.panner;
this.matrixWorld.decompose( position, quaternion, scale );
orientation.set( 0, 0, 1 ).applyQuaternion( quaternion );
this.panner.setPosition( position.x, position.y, position.z ); panner.setPosition( position.x, position.y, position.z );
panner.setOrientation( orientation.x, orientation.y, orientation.z );
}; };
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册