1111 * by this class.
1212 */
1313
14- THREE . PMREMGenerator = function ( sourceTexture , samplesPerLevel , resolution ) {
14+ THREE . PMREMGenerator = function ( sourceTexture , samplesPerLevel , resolution ) {
1515
1616 this . sourceTexture = sourceTexture ;
1717 this . resolution = ( resolution !== undefined ) ? resolution : 256 ; // NODE: 256 is currently hard coded in the glsl code for performance reasons
@@ -38,7 +38,7 @@ THREE.PMREMGenerator = function( sourceTexture, samplesPerLevel, resolution ) {
3838 } ;
3939
4040 // how many LODs fit in the given CubeUV Texture.
41- this . numLods = Math . log ( size ) / Math . log ( 2 ) - 2 ; // IE11 doesn't support Math.log2
41+ this . numLods = Math . log ( size ) / Math . log ( 2 ) - 2 ; // IE11 doesn't support Math.log2
4242
4343 for ( var i = 0 ; i < this . numLods ; i ++ ) {
4444
@@ -52,7 +52,7 @@ THREE.PMREMGenerator = function( sourceTexture, samplesPerLevel, resolution ) {
5252 this . camera = new THREE . OrthographicCamera ( - 1 , 1 , 1 , - 1 , 0.0 , 1000 ) ;
5353
5454 this . shader = this . getShader ( ) ;
55- this . shader . defines [ 'SAMPLES_PER_LEVEL' ] = this . samplesPerLevel ;
55+ this . shader . defines [ 'SAMPLES_PER_LEVEL' ] = this . samplesPerLevel ;
5656 this . planeMesh = new THREE . Mesh ( new THREE . PlaneGeometry ( 2 , 2 , 0 ) , this . shader ) ;
5757 this . planeMesh . material . side = THREE . DoubleSide ;
5858 this . scene = new THREE . Scene ( ) ;
@@ -66,7 +66,7 @@ THREE.PMREMGenerator = function( sourceTexture, samplesPerLevel, resolution ) {
6666
6767THREE . PMREMGenerator . prototype = {
6868
69- constructor : THREE . PMREMGenerator ,
69+ constructor : THREE . PMREMGenerator ,
7070
7171 /*
7272 * Prashant Sharma / spidersharma03: More thought and work is needed here.
@@ -81,7 +81,7 @@ THREE.PMREMGenerator.prototype = {
8181 * This method requires the most amount of thinking I guess. Here is a paper which we could try to implement in future::
8282 * http://http.developer.nvidia.com/GPUGems3/gpugems3_ch20.html
8383 */
84- update : function ( renderer ) {
84+ update : function ( renderer ) {
8585
8686 this . shader . uniforms [ 'envMap' ] . value = this . sourceTexture ;
8787 this . shader . envMap = this . sourceTexture ;
@@ -101,7 +101,7 @@ THREE.PMREMGenerator.prototype = {
101101
102102 var r = i / ( this . numLods - 1 ) ;
103103 this . shader . uniforms [ 'roughness' ] . value = r * 0.9 ; // see comment above, pragmatic choice
104- this . shader . uniforms [ 'queryScale' ] . value . x = ( i == 0 ) ? - 1 : 1 ;
104+ this . shader . uniforms [ 'queryScale' ] . value . x = ( i == 0 ) ? - 1 : 1 ;
105105 var size = this . cubeLods [ i ] . width ;
106106 this . shader . uniforms [ 'mapSize' ] . value = size ;
107107 this . renderToCubeMapTarget ( renderer , this . cubeLods [ i ] ) ;
@@ -118,25 +118,25 @@ THREE.PMREMGenerator.prototype = {
118118
119119 } ,
120120
121- renderToCubeMapTarget : function ( renderer , renderTarget ) {
121+ renderToCubeMapTarget : function ( renderer , renderTarget ) {
122122
123123 for ( var i = 0 ; i < 6 ; i ++ ) {
124124
125- this . renderToCubeMapTargetFace ( renderer , renderTarget , i )
125+ this . renderToCubeMapTargetFace ( renderer , renderTarget , i ) ;
126126
127127 }
128128
129129 } ,
130130
131- renderToCubeMapTargetFace : function ( renderer , renderTarget , faceIndex ) {
131+ renderToCubeMapTargetFace : function ( renderer , renderTarget , faceIndex ) {
132132
133133 renderTarget . activeCubeFace = faceIndex ;
134134 this . shader . uniforms [ 'faceIndex' ] . value = faceIndex ;
135135 renderer . render ( this . scene , this . camera , renderTarget , true ) ;
136136
137137 } ,
138138
139- getShader : function ( ) {
139+ getShader : function ( ) {
140140
141141 return new THREE . ShaderMaterial ( {
142142
@@ -258,12 +258,14 @@ THREE.PMREMGenerator.prototype = {
258258 //rgbColor = testColorMap( roughness ).rgb;\n\
259259 gl_FragColor = linearToOutputTexel( vec4( rgbColor, 1.0 ) );\n\
260260 }" ,
261+
261262 blending : THREE . CustomBlending ,
262263 blendSrc : THREE . OneFactor ,
263264 blendDst : THREE . ZeroFactor ,
264265 blendSrcAlpha : THREE . OneFactor ,
265266 blendDstAlpha : THREE . ZeroFactor ,
266267 blendEquation : THREE . AddEquation
268+
267269 } ) ;
268270
269271 }
0 commit comments