提交 b4eaa9d1 编写于 作者: B Berend Klein Haneveld

Updated builds

上级 a18c6ad0
...@@ -2436,19 +2436,21 @@ ...@@ -2436,19 +2436,21 @@
} }
var sinHalfTheta = Math.sqrt( 1.0 - cosHalfTheta * cosHalfTheta ); var sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta;
if ( Math.abs( sinHalfTheta ) < 0.001 ) { if ( sqrSinHalfTheta <= Number.EPSILON ) {
this._w = 0.5 * ( w + this._w ); var s = 1 - t;
this._x = 0.5 * ( x + this._x ); this._w = s * w + t * this._w;
this._y = 0.5 * ( y + this._y ); this._x = s * x + t * this._x;
this._z = 0.5 * ( z + this._z ); this._y = s * y + t * this._y;
this._z = s * z + t * this._z;
return this; return this.normalize();
} }
var sinHalfTheta = Math.sqrt( sqrSinHalfTheta );
var halfTheta = Math.atan2( sinHalfTheta, cosHalfTheta ); var halfTheta = Math.atan2( sinHalfTheta, cosHalfTheta );
var ratioA = Math.sin( ( 1 - t ) * halfTheta ) / sinHalfTheta, var ratioA = Math.sin( ( 1 - t ) * halfTheta ) / sinHalfTheta,
ratioB = Math.sin( t * halfTheta ) / sinHalfTheta; ratioB = Math.sin( t * halfTheta ) / sinHalfTheta;
...@@ -22681,7 +22683,7 @@ ...@@ -22681,7 +22683,7 @@
this.renderBufferDirect = function ( camera, fog, geometry, material, object, group ) { this.renderBufferDirect = function ( camera, fog, geometry, material, object, group ) {
var frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 ); var frontFaceCW = ( object.isMesh && object.normalMatrix.determinant() < 0 );
state.setMaterial( material, frontFaceCW ); state.setMaterial( material, frontFaceCW );
...@@ -23411,7 +23413,7 @@ ...@@ -23411,7 +23413,7 @@
if ( object.isImmediateRenderObject ) { if ( object.isImmediateRenderObject ) {
var frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 ); var frontFaceCW = ( object.isMesh && object.normalMatrix.determinant() < 0 );
state.setMaterial( material, frontFaceCW ); state.setMaterial( material, frontFaceCW );
...@@ -39436,6 +39438,8 @@ ...@@ -39436,6 +39438,8 @@
} }
return this;
}, },
getFilter: function () { getFilter: function () {
...@@ -39461,6 +39465,8 @@ ...@@ -39461,6 +39465,8 @@
this.gain.connect( this.filter ); this.gain.connect( this.filter );
this.filter.connect( this.context.destination ); this.filter.connect( this.context.destination );
return this;
}, },
getMasterVolume: function () { getMasterVolume: function () {
...@@ -39473,6 +39479,8 @@ ...@@ -39473,6 +39479,8 @@
this.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 ); this.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 );
return this;
}, },
updateMatrixWorld: ( function () { updateMatrixWorld: ( function () {
...@@ -39866,6 +39874,8 @@ ...@@ -39866,6 +39874,8 @@
this.panner.refDistance = value; this.panner.refDistance = value;
return this;
}, },
getRolloffFactor: function () { getRolloffFactor: function () {
...@@ -39878,6 +39888,8 @@ ...@@ -39878,6 +39888,8 @@
this.panner.rolloffFactor = value; this.panner.rolloffFactor = value;
return this;
}, },
getDistanceModel: function () { getDistanceModel: function () {
...@@ -39890,6 +39902,8 @@ ...@@ -39890,6 +39902,8 @@
this.panner.distanceModel = value; this.panner.distanceModel = value;
return this;
}, },
getMaxDistance: function () { getMaxDistance: function () {
...@@ -39902,6 +39916,8 @@ ...@@ -39902,6 +39916,8 @@
this.panner.maxDistance = value; this.panner.maxDistance = value;
return this;
}, },
updateMatrixWorld: ( function () { updateMatrixWorld: ( function () {
此差异已折叠。
...@@ -2430,19 +2430,21 @@ Object.assign( Quaternion.prototype, { ...@@ -2430,19 +2430,21 @@ Object.assign( Quaternion.prototype, {
} }
var sinHalfTheta = Math.sqrt( 1.0 - cosHalfTheta * cosHalfTheta ); var sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta;
if ( Math.abs( sinHalfTheta ) < 0.001 ) { if ( sqrSinHalfTheta <= Number.EPSILON ) {
this._w = 0.5 * ( w + this._w ); var s = 1 - t;
this._x = 0.5 * ( x + this._x ); this._w = s * w + t * this._w;
this._y = 0.5 * ( y + this._y ); this._x = s * x + t * this._x;
this._z = 0.5 * ( z + this._z ); this._y = s * y + t * this._y;
this._z = s * z + t * this._z;
return this; return this.normalize();
} }
var sinHalfTheta = Math.sqrt( sqrSinHalfTheta );
var halfTheta = Math.atan2( sinHalfTheta, cosHalfTheta ); var halfTheta = Math.atan2( sinHalfTheta, cosHalfTheta );
var ratioA = Math.sin( ( 1 - t ) * halfTheta ) / sinHalfTheta, var ratioA = Math.sin( ( 1 - t ) * halfTheta ) / sinHalfTheta,
ratioB = Math.sin( t * halfTheta ) / sinHalfTheta; ratioB = Math.sin( t * halfTheta ) / sinHalfTheta;
...@@ -22675,7 +22677,7 @@ function WebGLRenderer( parameters ) { ...@@ -22675,7 +22677,7 @@ function WebGLRenderer( parameters ) {
this.renderBufferDirect = function ( camera, fog, geometry, material, object, group ) { this.renderBufferDirect = function ( camera, fog, geometry, material, object, group ) {
var frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 ); var frontFaceCW = ( object.isMesh && object.normalMatrix.determinant() < 0 );
state.setMaterial( material, frontFaceCW ); state.setMaterial( material, frontFaceCW );
...@@ -23405,7 +23407,7 @@ function WebGLRenderer( parameters ) { ...@@ -23405,7 +23407,7 @@ function WebGLRenderer( parameters ) {
if ( object.isImmediateRenderObject ) { if ( object.isImmediateRenderObject ) {
var frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 ); var frontFaceCW = ( object.isMesh && object.normalMatrix.determinant() < 0 );
state.setMaterial( material, frontFaceCW ); state.setMaterial( material, frontFaceCW );
...@@ -39430,6 +39432,8 @@ AudioListener.prototype = Object.assign( Object.create( Object3D.prototype ), { ...@@ -39430,6 +39432,8 @@ AudioListener.prototype = Object.assign( Object.create( Object3D.prototype ), {
} }
return this;
}, },
getFilter: function () { getFilter: function () {
...@@ -39455,6 +39459,8 @@ AudioListener.prototype = Object.assign( Object.create( Object3D.prototype ), { ...@@ -39455,6 +39459,8 @@ AudioListener.prototype = Object.assign( Object.create( Object3D.prototype ), {
this.gain.connect( this.filter ); this.gain.connect( this.filter );
this.filter.connect( this.context.destination ); this.filter.connect( this.context.destination );
return this;
}, },
getMasterVolume: function () { getMasterVolume: function () {
...@@ -39467,6 +39473,8 @@ AudioListener.prototype = Object.assign( Object.create( Object3D.prototype ), { ...@@ -39467,6 +39473,8 @@ AudioListener.prototype = Object.assign( Object.create( Object3D.prototype ), {
this.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 ); this.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 );
return this;
}, },
updateMatrixWorld: ( function () { updateMatrixWorld: ( function () {
...@@ -39860,6 +39868,8 @@ PositionalAudio.prototype = Object.assign( Object.create( Audio.prototype ), { ...@@ -39860,6 +39868,8 @@ PositionalAudio.prototype = Object.assign( Object.create( Audio.prototype ), {
this.panner.refDistance = value; this.panner.refDistance = value;
return this;
}, },
getRolloffFactor: function () { getRolloffFactor: function () {
...@@ -39872,6 +39882,8 @@ PositionalAudio.prototype = Object.assign( Object.create( Audio.prototype ), { ...@@ -39872,6 +39882,8 @@ PositionalAudio.prototype = Object.assign( Object.create( Audio.prototype ), {
this.panner.rolloffFactor = value; this.panner.rolloffFactor = value;
return this;
}, },
getDistanceModel: function () { getDistanceModel: function () {
...@@ -39884,6 +39896,8 @@ PositionalAudio.prototype = Object.assign( Object.create( Audio.prototype ), { ...@@ -39884,6 +39896,8 @@ PositionalAudio.prototype = Object.assign( Object.create( Audio.prototype ), {
this.panner.distanceModel = value; this.panner.distanceModel = value;
return this;
}, },
getMaxDistance: function () { getMaxDistance: function () {
...@@ -39896,6 +39910,8 @@ PositionalAudio.prototype = Object.assign( Object.create( Audio.prototype ), { ...@@ -39896,6 +39910,8 @@ PositionalAudio.prototype = Object.assign( Object.create( Audio.prototype ), {
this.panner.maxDistance = value; this.panner.maxDistance = value;
return this;
}, },
updateMatrixWorld: ( function () { updateMatrixWorld: ( function () {
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册