|
@@ -7106,9 +7106,7 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
|
|
|
},
|
|
|
|
|
|
- copy: function ( source, recursive ) {
|
|
|
-
|
|
|
- if ( recursive === undefined ) recursive = true;
|
|
|
+ copy: function ( source, recursive = true ) {
|
|
|
|
|
|
this.name = source.name;
|
|
|
|
|
@@ -7996,9 +7994,7 @@ class Color {
|
|
|
|
|
|
}
|
|
|
|
|
|
- copyGammaToLinear( color, gammaFactor ) {
|
|
|
-
|
|
|
- if ( gammaFactor === undefined ) gammaFactor = 2.0;
|
|
|
+ copyGammaToLinear( color, gammaFactor = 2.0 ) {
|
|
|
|
|
|
this.r = Math.pow( color.r, gammaFactor );
|
|
|
this.g = Math.pow( color.g, gammaFactor );
|
|
@@ -8008,9 +8004,7 @@ class Color {
|
|
|
|
|
|
}
|
|
|
|
|
|
- copyLinearToGamma( color, gammaFactor ) {
|
|
|
-
|
|
|
- if ( gammaFactor === undefined ) gammaFactor = 2.0;
|
|
|
+ copyLinearToGamma( color, gammaFactor = 2.0 ) {
|
|
|
|
|
|
const safeInverse = ( gammaFactor > 0 ) ? ( 1.0 / gammaFactor ) : 1.0;
|
|
|
|
|
@@ -9178,9 +9172,7 @@ Object.assign( BufferAttribute.prototype, {
|
|
|
|
|
|
},
|
|
|
|
|
|
- set: function ( value, offset ) {
|
|
|
-
|
|
|
- if ( offset === undefined ) offset = 0;
|
|
|
+ set: function ( value, offset = 0 ) {
|
|
|
|
|
|
this.array.set( value, offset );
|
|
|
|
|
@@ -25020,9 +25012,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
- this.copyFramebufferToTexture = function ( position, texture, level ) {
|
|
|
-
|
|
|
- if ( level === undefined ) level = 0;
|
|
|
+ this.copyFramebufferToTexture = function ( position, texture, level = 0 ) {
|
|
|
|
|
|
const levelScale = Math.pow( 2, - level );
|
|
|
const width = Math.floor( texture.image.width * levelScale );
|
|
@@ -25037,9 +25027,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
- this.copyTextureToTexture = function ( position, srcTexture, dstTexture, level ) {
|
|
|
-
|
|
|
- if ( level === undefined ) level = 0;
|
|
|
+ this.copyTextureToTexture = function ( position, srcTexture, dstTexture, level = 0 ) {
|
|
|
|
|
|
const width = srcTexture.image.width;
|
|
|
const height = srcTexture.image.height;
|
|
@@ -25296,9 +25284,7 @@ Object.assign( InterleavedBuffer.prototype, {
|
|
|
|
|
|
},
|
|
|
|
|
|
- set: function ( value, offset ) {
|
|
|
-
|
|
|
- if ( offset === undefined ) offset = 0;
|
|
|
+ set: function ( value, offset = 0 ) {
|
|
|
|
|
|
this.array.set( value, offset );
|
|
|
|
|
@@ -25915,9 +25901,7 @@ LOD.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
},
|
|
|
|
|
|
- addLevel: function ( object, distance ) {
|
|
|
-
|
|
|
- if ( distance === undefined ) distance = 0;
|
|
|
+ addLevel: function ( object, distance = 0 ) {
|
|
|
|
|
|
distance = Math.abs( distance );
|
|
|
|
|
@@ -27728,9 +27712,7 @@ Geometry.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
|
|
|
},
|
|
|
|
|
|
- computeVertexNormals: function ( areaWeighted ) {
|
|
|
-
|
|
|
- if ( areaWeighted === undefined ) areaWeighted = true;
|
|
|
+ computeVertexNormals: function ( areaWeighted = true ) {
|
|
|
|
|
|
const vertices = new Array( this.vertices.length );
|
|
|
|
|
@@ -27986,7 +27968,7 @@ Geometry.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
|
|
|
},
|
|
|
|
|
|
- merge: function ( geometry, matrix, materialIndexOffset ) {
|
|
|
+ merge: function ( geometry, matrix, materialIndexOffset = 0 ) {
|
|
|
|
|
|
if ( ! ( geometry && geometry.isGeometry ) ) {
|
|
|
|
|
@@ -28004,8 +27986,6 @@ Geometry.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
colors1 = this.colors,
|
|
|
colors2 = geometry.colors;
|
|
|
|
|
|
- if ( materialIndexOffset === undefined ) materialIndexOffset = 0;
|
|
|
-
|
|
|
if ( matrix !== undefined ) {
|
|
|
|
|
|
normalMatrix = new Matrix3().getNormalMatrix( matrix );
|
|
@@ -34488,11 +34468,9 @@ const AnimationUtils = {
|
|
|
|
|
|
},
|
|
|
|
|
|
- makeClipAdditive: function ( targetClip, referenceFrame, referenceClip, fps ) {
|
|
|
+ makeClipAdditive: function ( targetClip, referenceFrame = 0, referenceClip = targetClip, fps = 30 ) {
|
|
|
|
|
|
- if ( referenceFrame === undefined ) referenceFrame = 0;
|
|
|
- if ( referenceClip === undefined ) referenceClip = targetClip;
|
|
|
- if ( fps === undefined || fps <= 0 ) fps = 30;
|
|
|
+ if ( fps <= 0 ) fps = 30;
|
|
|
|
|
|
const numTracks = referenceClip.tracks.length;
|
|
|
const referenceTime = referenceFrame / fps;
|
|
@@ -37239,9 +37217,7 @@ Object.assign( Curve.prototype, {
|
|
|
|
|
|
// Get sequence of points using getPoint( t )
|
|
|
|
|
|
- getPoints: function ( divisions ) {
|
|
|
-
|
|
|
- if ( divisions === undefined ) divisions = 5;
|
|
|
+ getPoints: function ( divisions = 5 ) {
|
|
|
|
|
|
const points = [];
|
|
|
|
|
@@ -37257,9 +37233,7 @@ Object.assign( Curve.prototype, {
|
|
|
|
|
|
// Get sequence of points using getPointAt( u )
|
|
|
|
|
|
- getSpacedPoints: function ( divisions ) {
|
|
|
-
|
|
|
- if ( divisions === undefined ) divisions = 5;
|
|
|
+ getSpacedPoints: function ( divisions = 5 ) {
|
|
|
|
|
|
const points = [];
|
|
|
|
|
@@ -38766,9 +38740,7 @@ CurvePath.prototype = Object.assign( Object.create( Curve.prototype ), {
|
|
|
|
|
|
},
|
|
|
|
|
|
- getSpacedPoints: function ( divisions ) {
|
|
|
-
|
|
|
- if ( divisions === undefined ) divisions = 40;
|
|
|
+ getSpacedPoints: function ( divisions = 40 ) {
|
|
|
|
|
|
const points = [];
|
|
|
|
|
@@ -39536,9 +39508,7 @@ PointLightShadow.prototype = Object.assign( Object.create( LightShadow.prototype
|
|
|
|
|
|
isPointLightShadow: true,
|
|
|
|
|
|
- updateMatrices: function ( light, viewportIndex ) {
|
|
|
-
|
|
|
- if ( viewportIndex === undefined ) viewportIndex = 0;
|
|
|
+ updateMatrices: function ( light, viewportIndex = 0 ) {
|
|
|
|
|
|
const camera = this.camera,
|
|
|
shadowMatrix = this.matrix,
|
|
@@ -42218,9 +42188,7 @@ Object.assign( Font.prototype, {
|
|
|
|
|
|
isFont: true,
|
|
|
|
|
|
- generateShapes: function ( text, size ) {
|
|
|
-
|
|
|
- if ( size === undefined ) size = 100;
|
|
|
+ generateShapes: function ( text, size = 100 ) {
|
|
|
|
|
|
const shapes = [];
|
|
|
const paths = createPaths( text, size, this.data );
|
|
@@ -42937,9 +42905,7 @@ class Audio extends Object3D {
|
|
|
|
|
|
}
|
|
|
|
|
|
- play( delay ) {
|
|
|
-
|
|
|
- if ( delay === undefined ) delay = 0;
|
|
|
+ play( delay = 0 ) {
|
|
|
|
|
|
if ( this.isPlaying === true ) {
|
|
|
|
|
@@ -47924,9 +47890,9 @@ class Box3Helper extends LineSegments {
|
|
|
|
|
|
class PlaneHelper extends Line {
|
|
|
|
|
|
- constructor( plane, size, hex ) {
|
|
|
+ constructor( plane, size = 1, hex = 0xffff00 ) {
|
|
|
|
|
|
- const color = ( hex !== undefined ) ? hex : 0xffff00;
|
|
|
+ const color = hex;
|
|
|
|
|
|
const positions = [ 1, - 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0 ];
|
|
|
|
|
@@ -47940,7 +47906,7 @@ class PlaneHelper extends Line {
|
|
|
|
|
|
this.plane = plane;
|
|
|
|
|
|
- this.size = ( size === undefined ) ? 1 : size;
|
|
|
+ this.size = size;
|
|
|
|
|
|
const positions2 = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, 1, 1, - 1, - 1, 1, 1, - 1, 1 ];
|
|
|
|
|
@@ -49110,9 +49076,7 @@ function MeshFaceMaterial( materials ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
-function MultiMaterial( materials ) {
|
|
|
-
|
|
|
- if ( materials === undefined ) materials = [];
|
|
|
+function MultiMaterial( materials = [] ) {
|
|
|
|
|
|
console.warn( 'THREE.MultiMaterial has been removed. Use an Array instead.' );
|
|
|
materials.isMultiMaterial = true;
|