Skip to content

Commit ed70516

Browse files
committed
Removed SphericalRefractionMapping. See mrdoob#5622.
1 parent 71d971f commit ed70516

13 files changed

Lines changed: 21 additions & 40 deletions

File tree

docs/api/constants/Textures.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ <h2>Mapping Modes</h2>
2121
THREE.UVMapping<br />
2222
THREE.CubeReflectionMapping<br />
2323
THREE.CubeRefractionMapping<br />
24-
THREE.SphericalReflectionMapping<br />
25-
THREE.SphericalRefractionMapping
24+
THREE.SphericalReflectionMapping
2625
</div>
2726

2827
<h2>Wrapping Modes</h2>

docs/api/extras/ImageUtils.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ <h3>[method:todo loadCompressedTexture]([page:todo url], [page:todo mapping], [p
5858
<h3>[method:todo loadTexture]([page:String url], [page:UVMapping mapping], [page:Function onLoad], [page:Function onError])</h3>
5959
<div>
6060
url -- the url of the texture<br />
61-
mapping -- Can be an instance of [page:UVMapping THREE.UVMapping], [page:CubeReflectionMapping THREE.CubeReflectionMapping], [page:SphericalReflectionMapping THREE.SphericalReflectionMapping] or [page:SphericalRefractionMapping THREE.SphericalRefractionMapping]. Describes how the image is applied to the object.<br />Use undefined instead of null as a default value. See mapping property of [page:Texture texture] for more details.
61+
mapping -- Can be an instance of [page:UVMapping THREE.UVMapping], [page:CubeReflectionMapping THREE.CubeReflectionMapping] or [page:SphericalReflectionMapping THREE.SphericalReflectionMapping]. Describes how the image is applied to the object.<br />Use undefined instead of null as a default value. See mapping property of [page:Texture texture] for more details.
6262
onLoad -- callback function<br />
6363
onError -- callback function
6464
</div>

docs/api/textures/CompressedTexture.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h3>[name]([page:Array mipmaps], [page:Number width], [page:Number height], [pag
2626
height -- The height of the biggest mipmap <br />
2727
format -- The format used in the mipmaps <br />
2828
type -- The type used in the mipmaps <br />
29-
mapping -- How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; THREE.SphericalReflectionMapping, a spherical reflection map projection; and THREE.SphericalRefractionMapping.<br />
29+
mapping -- How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; and THREE.SphericalReflectionMapping, a spherical reflection map projection.<br />
3030
wrapS -- The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.<br />
3131
wrapT -- The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.<br />
3232
magFilter -- How the texture is sampled when a texel covers more than one pixel. The default is THREE.LinearFilter, which takes the four closest texels and bilinearly interpolates among them. The other option is THREE.NearestFilter, which uses the value of the closest texels.<br />

docs/api/textures/DataTexture.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h3>[name]([page:ArraybufferView data], [page:Integer width], [page:Integer heig
2626
height -- The height of the image. <br />
2727
format -- The default is THREE.RGBAFormat for the texture. Other formats are: THREE.AlphaFormat, THREE.RGBFormat, THREE.LuminanceFormat, and THREE.LuminanceAlphaFormat. There are also compressed texture formats, if the S3TC extension is supported: THREE.RGB_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT1_Format, THREE.RGBA_S3TC_DXT3_Format, and THREE.RGBA_S3TC_DXT5_Format.<br />
2828
type -- The default is THREE.UnsignedByteType. Other valid types (as WebGL allows) are THREE.ByteType, THREE.ShortType, THREE.UnsignedShortType, THREE.IntType, THREE.UnsignedIntType, THREE.FloatType, THREE.UnsignedShort4444Type, THREE.UnsignedShort5551Type, and THREE.UnsignedShort565Type.<br />
29-
mapping -- How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; THREE.SphericalReflectionMapping, a spherical reflection map projection; and THREE.SphericalRefractionMapping.<br />
29+
mapping -- How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; and THREE.SphericalReflectionMapping, a spherical reflection map projection.<br />
3030
wrapS -- The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.<br />
3131
wrapT -- The default is THREE.ClampToEdgeWrapping, where the edge is clamped to the outer edge texels. The other two choices are THREE.RepeatWrapping and THREE.MirroredRepeatWrapping.<br />
3232
magFilter -- How the texture is sampled when a texel covers more than one pixel. The default is THREE.LinearFilter, which takes the four closest texels and bilinearly interpolates among them. The other option is THREE.NearestFilter, which uses the value of the closest texel.<br />

docs/api/textures/Texture.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h3>[property:Image image]</h3>
4040

4141
<h3>[property:object mapping]</h3>
4242
<div>
43-
How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; THREE.SphericalReflectionMapping, a spherical reflection map projection; and THREE.SphericalRefractionMapping.
43+
How the image is applied to the object. An object type of THREE.UVMapping() is the default, where the U,V coordinates are used to apply the map, and a single texture is expected. The other types are THREE.CubeReflectionMapping, for cube maps used as a reflection map; THREE.CubeRefractionMapping, refraction mapping; and THREE.SphericalReflectionMapping, a spherical reflection map projection.
4444
</div>
4545

4646
<h3>[property:number wrapS]</h3>

examples/canvas_materials.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@
7676
new THREE.MeshDepthMaterial( { overdraw: 0.5 } ),
7777
new THREE.MeshNormalMaterial( { overdraw: 0.5 } ),
7878
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/land_ocean_ice_cloud_2048.jpg' ) } ),
79-
new THREE.MeshBasicMaterial( { envMap: THREE.ImageUtils.loadTexture( 'textures/envmap.png', THREE.SphericalReflectionMapping ), overdraw: 0.5 } ),
80-
new THREE.MeshBasicMaterial( { envMap: THREE.ImageUtils.loadTexture( 'textures/envmap.png', THREE.SphericalRefractionMapping ), overdraw: 0.5 } )
79+
new THREE.MeshBasicMaterial( { envMap: THREE.ImageUtils.loadTexture( 'textures/envmap.png', THREE.SphericalReflectionMapping ), overdraw: 0.5 } )
8180

8281
];
8382

examples/js/renderers/CanvasRenderer.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -728,25 +728,8 @@ THREE.CanvasRenderer = function ( parameters ) {
728728

729729
patternPath( _v1x, _v1y, _v2x, _v2y, _v3x, _v3y, _uv1x, _uv1y, _uv2x, _uv2y, _uv3x, _uv3y, material.envMap );
730730

731-
} else if ( mapping === THREE.SphericalRefractionMapping ) {
732-
733-
_normal.copy( element.vertexNormalsModel[ uv1 ] ).applyMatrix3( _normalViewMatrix );
734-
_uv1x = - 0.5 * _normal.x + 0.5;
735-
_uv1y = - 0.5 * _normal.y + 0.5;
736-
737-
_normal.copy( element.vertexNormalsModel[ uv2 ] ).applyMatrix3( _normalViewMatrix );
738-
_uv2x = - 0.5 * _normal.x + 0.5;
739-
_uv2y = - 0.5 * _normal.y + 0.5;
740-
741-
_normal.copy( element.vertexNormalsModel[ uv3 ] ).applyMatrix3( _normalViewMatrix );
742-
_uv3x = - 0.5 * _normal.x + 0.5;
743-
_uv3y = - 0.5 * _normal.y + 0.5;
744-
745-
patternPath( _v1x, _v1y, _v2x, _v2y, _v3x, _v3y, _uv1x, _uv1y, _uv2x, _uv2y, _uv3x, _uv3y, material.envMap );
746-
747731
}
748732

749-
750733
} else {
751734

752735
_color.copy( material.color );

examples/webgl_environment_maps.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,9 @@
7272
if ( refract ) {
7373
textureEquirec.mapping = THREE.EquirectangularRefractionMapping;
7474
textureCube.mapping = THREE.CubeRefractionMapping;
75-
textureSphere.mapping = THREE.SphericalRefractionMapping;
7675
} else {
7776
textureEquirec.mapping = THREE.EquirectangularReflectionMapping;
7877
textureCube.mapping = THREE.CubeReflectionMapping;
79-
textureSphere.mapping = THREE.SphericalReflectionMapping;
8078
}
8179
sphereMaterial.needsUpdate = true;
8280
}

src/Three.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,10 @@ THREE.UVMapping = 300;
120120
THREE.CubeReflectionMapping = 301;
121121
THREE.CubeRefractionMapping = 302;
122122

123-
THREE.SphericalReflectionMapping = 303;
124-
THREE.SphericalRefractionMapping = 304;
123+
THREE.EquirectangularReflectionMapping = 303;
124+
THREE.EquirectangularRefractionMapping = 304;
125125

126-
THREE.EquirectangularReflectionMapping = 305;
127-
THREE.EquirectangularRefractionMapping = 306;
126+
THREE.SphericalReflectionMapping = 305;
128127

129128
// Wrapping modes
130129

src/renderers/WebGLRenderer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4786,7 +4786,6 @@ THREE.WebGLRenderer = function ( parameters ) {
47864786
uniforms.combine.value = material.combine;
47874787
uniforms.useRefract.value = material.envMap && (
47884788
material.envMap.mapping === THREE.CubeRefractionMapping ||
4789-
material.envMap.mapping === THREE.SphericalRefractionMapping ||
47904789
material.envMap.mapping === THREE.EquirectangularRefractionMapping );
47914790

47924791
}

0 commit comments

Comments
 (0)