|
@@ -8384,7 +8384,7 @@ Object.assign( Matrix3.prototype, {
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
- setFromMatrix4: function( m ) {
|
|
|
|
|
|
+ setFromMatrix4: function ( m ) {
|
|
|
|
|
|
var me = m.elements;
|
|
var me = m.elements;
|
|
|
|
|
|
@@ -8484,6 +8484,7 @@ Object.assign( Matrix3.prototype, {
|
|
}
|
|
}
|
|
|
|
|
|
return this.identity();
|
|
return this.identity();
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
var detInv = 1 / det;
|
|
var detInv = 1 / det;
|
|
@@ -8544,7 +8545,7 @@ Object.assign( Matrix3.prototype, {
|
|
|
|
|
|
if ( offset === undefined ) offset = 0;
|
|
if ( offset === undefined ) offset = 0;
|
|
|
|
|
|
- for( var i = 0; i < 9; i ++ ) {
|
|
|
|
|
|
+ for ( var i = 0; i < 9; i ++ ) {
|
|
|
|
|
|
this.elements[ i ] = array[ i + offset ];
|
|
this.elements[ i ] = array[ i + offset ];
|
|
|
|
|
|
@@ -8571,7 +8572,7 @@ Object.assign( Matrix3.prototype, {
|
|
|
|
|
|
array[ offset + 6 ] = te[ 6 ];
|
|
array[ offset + 6 ] = te[ 6 ];
|
|
array[ offset + 7 ] = te[ 7 ];
|
|
array[ offset + 7 ] = te[ 7 ];
|
|
- array[ offset + 8 ] = te[ 8 ];
|
|
|
|
|
|
+ array[ offset + 8 ] = te[ 8 ];
|
|
|
|
|
|
return array;
|
|
return array;
|
|
|
|
|
|
@@ -15014,7 +15015,7 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
uvB.fromBufferAttribute( uv, b );
|
|
uvB.fromBufferAttribute( uv, b );
|
|
uvC.fromBufferAttribute( uv, c );
|
|
uvC.fromBufferAttribute( uv, c );
|
|
|
|
|
|
- intersection.uv = uvIntersection( intersectionPoint, vA, vB, vC, uvA, uvB, uvC );
|
|
|
|
|
|
+ intersection.uv = uvIntersection( intersectionPoint, vA, vB, vC, uvA, uvB, uvC );
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -22661,35 +22662,37 @@ function Scene () {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-Scene.prototype = Object.create( Object3D.prototype );
|
|
|
|
|
|
+Scene.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
-Scene.prototype.constructor = Scene;
|
|
|
|
|
|
+ constructor: Scene,
|
|
|
|
|
|
-Scene.prototype.copy = function ( source, recursive ) {
|
|
|
|
|
|
+ copy: function ( source, recursive ) {
|
|
|
|
|
|
- Object3D.prototype.copy.call( this, source, recursive );
|
|
|
|
|
|
+ Object3D.prototype.copy.call( this, source, recursive );
|
|
|
|
|
|
- if ( source.background !== null ) this.background = source.background.clone();
|
|
|
|
- if ( source.fog !== null ) this.fog = source.fog.clone();
|
|
|
|
- if ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone();
|
|
|
|
|
|
+ if ( source.background !== null ) this.background = source.background.clone();
|
|
|
|
+ if ( source.fog !== null ) this.fog = source.fog.clone();
|
|
|
|
+ if ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone();
|
|
|
|
|
|
- this.autoUpdate = source.autoUpdate;
|
|
|
|
- this.matrixAutoUpdate = source.matrixAutoUpdate;
|
|
|
|
|
|
+ this.autoUpdate = source.autoUpdate;
|
|
|
|
+ this.matrixAutoUpdate = source.matrixAutoUpdate;
|
|
|
|
|
|
- return this;
|
|
|
|
|
|
+ return this;
|
|
|
|
|
|
-};
|
|
|
|
|
|
+ },
|
|
|
|
|
|
-Scene.prototype.toJSON = function ( meta ) {
|
|
|
|
|
|
+ toJSON: function ( meta ) {
|
|
|
|
|
|
- var data = Object3D.prototype.toJSON.call( this, meta );
|
|
|
|
|
|
+ var data = Object3D.prototype.toJSON.call( this, meta );
|
|
|
|
|
|
- if ( this.background !== null ) data.object.background = this.background.toJSON( meta );
|
|
|
|
- if ( this.fog !== null ) data.object.fog = this.fog.toJSON();
|
|
|
|
|
|
+ if ( this.background !== null ) data.object.background = this.background.toJSON( meta );
|
|
|
|
+ if ( this.fog !== null ) data.object.fog = this.fog.toJSON();
|
|
|
|
|
|
- return data;
|
|
|
|
|
|
+ return data;
|
|
|
|
|
|
-};
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+} );
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author mikael emtinger / http://gomo.se/
|
|
* @author mikael emtinger / http://gomo.se/
|
|
@@ -35437,7 +35440,7 @@ Object.assign( StereoCamera.prototype, {
|
|
|
|
|
|
update: ( function () {
|
|
update: ( function () {
|
|
|
|
|
|
- var instance, focus, fov, aspect, near, far, zoom;
|
|
|
|
|
|
+ var instance, focus, fov, aspect, near, far, zoom, eyeSep;
|
|
|
|
|
|
var eyeRight = new Matrix4();
|
|
var eyeRight = new Matrix4();
|
|
var eyeLeft = new Matrix4();
|
|
var eyeLeft = new Matrix4();
|
|
@@ -35446,7 +35449,7 @@ Object.assign( StereoCamera.prototype, {
|
|
|
|
|
|
var needsUpdate = instance !== this || focus !== camera.focus || fov !== camera.fov ||
|
|
var needsUpdate = instance !== this || focus !== camera.focus || fov !== camera.fov ||
|
|
aspect !== camera.aspect * this.aspect || near !== camera.near ||
|
|
aspect !== camera.aspect * this.aspect || near !== camera.near ||
|
|
- far !== camera.far || zoom !== camera.zoom;
|
|
|
|
|
|
+ far !== camera.far || zoom !== camera.zoom || eyeSep !== this.eyeSep;
|
|
|
|
|
|
if ( needsUpdate ) {
|
|
if ( needsUpdate ) {
|
|
|
|
|
|
@@ -35462,7 +35465,7 @@ Object.assign( StereoCamera.prototype, {
|
|
// http://paulbourke.net/stereographics/stereorender/
|
|
// http://paulbourke.net/stereographics/stereorender/
|
|
|
|
|
|
var projectionMatrix = camera.projectionMatrix.clone();
|
|
var projectionMatrix = camera.projectionMatrix.clone();
|
|
- var eyeSep = this.eyeSep / 2;
|
|
|
|
|
|
+ eyeSep = this.eyeSep / 2;
|
|
var eyeSepOnProjection = eyeSep * near / focus;
|
|
var eyeSepOnProjection = eyeSep * near / focus;
|
|
var ymax = ( near * Math.tan( _Math.DEG2RAD * fov * 0.5 ) ) / zoom;
|
|
var ymax = ( near * Math.tan( _Math.DEG2RAD * fov * 0.5 ) ) / zoom;
|
|
var xmin, xmax;
|
|
var xmin, xmax;
|