提交 82ad11e1 编写于 作者: M Mr.doob

AudioListener: Removed call to listener.setVelocity.

https://github.com/WebAudio/web-audio-api/issues/372
上级 8e11db2d
......@@ -22,9 +22,6 @@ THREE.AudioListener.prototype.updateMatrixWorld = ( function () {
var scale = new THREE.Vector3();
var orientation = new THREE.Vector3();
var velocity = new THREE.Vector3();
var positionPrev = new THREE.Vector3();
return function ( force ) {
......@@ -36,13 +33,9 @@ THREE.AudioListener.prototype.updateMatrixWorld = ( function () {
this.matrixWorld.decompose( position, quaternion, scale );
orientation.set( 0, 0, -1 ).applyQuaternion( quaternion );
velocity.subVectors( position, positionPrev );
listener.setPosition( position.x, position.y, position.z );
listener.setOrientation( orientation.x, orientation.y, orientation.z, up.x, up.y, up.z );
listener.setVelocity( velocity.x, velocity.y, velocity.z );
positionPrev.copy( position );
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册