Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
db2af928
T
three.js
项目概览
Ablesons
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
db2af928
编写于
5月 30, 2020
作者:
W
WestLangley
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove SphericalReflectionMapping
上级
b040a7e5
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
3 addition
and
74 deletion
+3
-74
docs/api/en/constants/Textures.html
docs/api/en/constants/Textures.html
+0
-5
docs/api/zh/constants/Textures.html
docs/api/zh/constants/Textures.html
+0
-4
editor/js/Sidebar.Material.js
editor/js/Sidebar.Material.js
+1
-1
examples/jsm/loaders/MMDLoader.js
examples/jsm/loaders/MMDLoader.js
+0
-1
examples/textures/metal.jpg
examples/textures/metal.jpg
+0
-0
examples/webgl_materials_envmaps.html
examples/webgl_materials_envmaps.html
+1
-13
examples/webgl_materials_envmaps_parallax.html
examples/webgl_materials_envmaps_parallax.html
+0
-16
src/constants.d.ts
src/constants.d.ts
+0
-1
src/constants.js
src/constants.js
+0
-1
src/loaders/ObjectLoader.js
src/loaders/ObjectLoader.js
+0
-2
src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.js
src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.js
+0
-8
src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js
...shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js
+0
-16
src/renderers/webgl/WebGLProgram.js
src/renderers/webgl/WebGLProgram.js
+1
-5
test/unit/src/constants.tests.js
test/unit/src/constants.tests.js
+0
-1
未找到文件。
docs/api/en/constants/Textures.html
浏览文件 @
db2af928
...
...
@@ -17,7 +17,6 @@
THREE.CubeRefractionMapping
THREE.EquirectangularReflectionMapping
THREE.EquirectangularRefractionMapping
THREE.SphericalReflectionMapping
THREE.CubeUVReflectionMapping
THREE.CubeUVRefractionMapping
</code>
...
...
@@ -38,10 +37,6 @@
vertical axis, with the top and bottom edges of the image corresponding to the north and south poles
of a mapped sphere.
<br
/><br
/>
[page:Constant SphericalReflectionMapping] is for use with a spherical reflection map such as may be obtained
by cropping a photograph of a mirrored ball. Sphere maps will be rendered "facing" the camera, irrespective
of the position of the camera relative to the cubemapped object or surface.
<br
/><br
/>
See the [example:webgl_materials_envmaps materials / envmaps] example.
</p>
...
...
docs/api/zh/constants/Textures.html
浏览文件 @
db2af928
...
...
@@ -19,7 +19,6 @@
THREE.CubeRefractionMapping
THREE.EquirectangularReflectionMapping
THREE.EquirectangularRefractionMapping
THREE.SphericalReflectionMapping
THREE.CubeUVReflectionMapping
THREE.CubeUVRefractionMapping
</code>
...
...
@@ -38,9 +37,6 @@
用于等距圆柱投影的环境贴图,也被叫做经纬线映射贴图。等距圆柱投影贴图表示沿着其水平中线360°的视角,以及沿着其垂直轴向180°的视角。贴图顶部和底部的边缘分别对应于它所映射的球体的北极和南极。
<br
/><br
/>
[page:Constant SphericalReflectionMapping] 用球形反射贴图,例如它可以通过剪裁镜面球的照片来获得。
无论摄像机相对于立方贴图对象或者表面的位置时怎样的,球形贴图被渲染时将会“面朝”摄像机。
<br
/><br
/>
请查看示例:[example:webgl_materials_envmaps materials / envmaps] 。
</p>
...
...
editor/js/Sidebar.Material.js
浏览文件 @
db2af928
...
...
@@ -427,7 +427,7 @@ var SidebarMaterial = function ( editor ) {
var
materialEnvMapRow
=
new
UIRow
();
var
materialEnvMapEnabled
=
new
UICheckbox
(
false
).
onChange
(
update
);
var
materialEnvMap
=
new
UITexture
(
THREE
.
Spherical
ReflectionMapping
).
onChange
(
updateMaterial
);
var
materialEnvMap
=
new
UITexture
(
THREE
.
Equirectangular
ReflectionMapping
).
onChange
(
updateMaterial
);
var
materialReflectivity
=
new
UINumber
(
1
).
setWidth
(
'
30px
'
).
onChange
(
update
);
materialEnvMapRow
.
add
(
new
UIText
(
strings
.
getKey
(
'
sidebar/material/envmap
'
)
).
setWidth
(
'
90px
'
)
);
...
...
examples/jsm/loaders/MMDLoader.js
浏览文件 @
db2af928
...
...
@@ -55,7 +55,6 @@ import {
RepeatWrapping
,
Skeleton
,
SkinnedMesh
,
SphericalReflectionMapping
,
SrcAlphaFactor
,
TextureLoader
,
Uint16BufferAttribute
,
...
...
examples/textures/metal.jpg
已删除
100644 → 0
浏览文件 @
b040a7e5
57.2 KB
examples/webgl_materials_envmaps.html
浏览文件 @
db2af928
...
...
@@ -23,7 +23,7 @@
var
controls
,
camera
,
scene
,
renderer
;
var
cameraCube
,
sceneCube
;
var
textureEquirec
,
textureCube
,
textureSphere
;
var
textureEquirec
,
textureCube
;
var
cubeMesh
,
sphereMesh
;
var
sphereMaterial
;
...
...
@@ -64,10 +64,6 @@
textureEquirec
.
mapping
=
THREE
.
EquirectangularReflectionMapping
;
textureEquirec
.
encoding
=
THREE
.
sRGBEncoding
;
textureSphere
=
textureLoader
.
load
(
'
textures/metal.jpg
'
);
textureSphere
.
mapping
=
THREE
.
SphericalReflectionMapping
;
textureSphere
.
encoding
=
THREE
.
sRGBEncoding
;
// Materials
var
equirectShader
=
THREE
.
ShaderLib
[
'
equirect
'
];
...
...
@@ -152,13 +148,6 @@
sphereMaterial
.
envMap
=
textureEquirec
;
sphereMaterial
.
needsUpdate
=
true
;
},
Spherical
:
function
()
{
cubeMesh
.
visible
=
false
;
sphereMaterial
.
envMap
=
textureSphere
;
sphereMaterial
.
needsUpdate
=
true
;
},
Refraction
:
false
};
...
...
@@ -166,7 +155,6 @@
var
gui
=
new
GUI
();
gui
.
add
(
params
,
'
Cube
'
);
gui
.
add
(
params
,
'
Equirectangular
'
);
gui
.
add
(
params
,
'
Spherical
'
);
gui
.
add
(
params
,
'
Refraction
'
).
onChange
(
function
(
value
)
{
if
(
value
)
{
...
...
examples/webgl_materials_envmaps_parallax.html
浏览文件 @
db2af928
...
...
@@ -189,22 +189,6 @@
envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;
#elif defined( ENVMAP_TYPE_SPHERE )
vec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );
#ifdef TEXTURE_LOD_EXT
vec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );
#else
vec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );
#endif
envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;
#endif
return envMapColor.rgb * envMapIntensity;
...
...
src/constants.d.ts
浏览文件 @
db2af928
...
...
@@ -118,7 +118,6 @@ export const CubeReflectionMapping: Mapping;
export
const
CubeRefractionMapping
:
Mapping
;
export
const
EquirectangularReflectionMapping
:
Mapping
;
export
const
EquirectangularRefractionMapping
:
Mapping
;
export
const
SphericalReflectionMapping
:
Mapping
;
export
const
CubeUVReflectionMapping
:
Mapping
;
export
const
CubeUVRefractionMapping
:
Mapping
;
...
...
src/constants.js
浏览文件 @
db2af928
...
...
@@ -61,7 +61,6 @@ export const CubeReflectionMapping = 301;
export
const
CubeRefractionMapping
=
302
;
export
const
EquirectangularReflectionMapping
=
303
;
export
const
EquirectangularRefractionMapping
=
304
;
export
const
SphericalReflectionMapping
=
305
;
export
const
CubeUVReflectionMapping
=
306
;
export
const
CubeUVRefractionMapping
=
307
;
export
const
RepeatWrapping
=
1000
;
...
...
src/loaders/ObjectLoader.js
浏览文件 @
db2af928
...
...
@@ -4,7 +4,6 @@ import {
CubeRefractionMapping
,
EquirectangularReflectionMapping
,
EquirectangularRefractionMapping
,
SphericalReflectionMapping
,
CubeUVReflectionMapping
,
CubeUVRefractionMapping
,
...
...
@@ -986,7 +985,6 @@ const TEXTURE_MAPPING = {
CubeRefractionMapping
:
CubeRefractionMapping
,
EquirectangularReflectionMapping
:
EquirectangularReflectionMapping
,
EquirectangularRefractionMapping
:
EquirectangularRefractionMapping
,
SphericalReflectionMapping
:
SphericalReflectionMapping
,
CubeUVReflectionMapping
:
CubeUVReflectionMapping
,
CubeUVRefractionMapping
:
CubeUVRefractionMapping
};
...
...
src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.js
浏览文件 @
db2af928
...
...
@@ -50,14 +50,6 @@ export default /* glsl */`
vec4 envColor = texture2D( envMap, sampleUV );
#elif defined( ENVMAP_TYPE_SPHERE )
reflectVec = normalize( reflectVec );
vec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );
vec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );
#else
vec4 envColor = vec4( 0.0 );
...
...
src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js
浏览文件 @
db2af928
...
...
@@ -111,22 +111,6 @@ export default /* glsl */`
envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;
#elif defined( ENVMAP_TYPE_SPHERE )
vec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );
#ifdef TEXTURE_LOD_EXT
vec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );
#else
vec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );
#endif
envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;
#endif
return envMapColor.rgb * envMapIntensity;
...
...
src/renderers/webgl/WebGLProgram.js
浏览文件 @
db2af928
...
...
@@ -5,7 +5,7 @@
import
{
WebGLUniforms
}
from
'
./WebGLUniforms.js
'
;
import
{
WebGLShader
}
from
'
./WebGLShader.js
'
;
import
{
ShaderChunk
}
from
'
../shaders/ShaderChunk.js
'
;
import
{
NoToneMapping
,
AddOperation
,
MixOperation
,
MultiplyOperation
,
EquirectangularRefractionMapping
,
CubeRefractionMapping
,
SphericalReflectionMapping
,
EquirectangularReflectionMapping
,
CubeUVRefractionMapping
,
CubeUVReflectionMapping
,
CubeReflectionMapping
,
PCFSoftShadowMap
,
PCFShadowMap
,
VSMShadowMap
,
ACESFilmicToneMapping
,
CineonToneMapping
,
Uncharted2ToneMapping
,
ReinhardToneMapping
,
LinearToneMapping
,
GammaEncoding
,
RGBDEncoding
,
RGBM16Encoding
,
RGBM7Encoding
,
RGBEEncoding
,
sRGBEncoding
,
LinearEncoding
,
LogLuvEncoding
}
from
'
../../constants.js
'
;
import
{
NoToneMapping
,
AddOperation
,
MixOperation
,
MultiplyOperation
,
EquirectangularRefractionMapping
,
CubeRefractionMapping
,
EquirectangularReflectionMapping
,
CubeUVRefractionMapping
,
CubeUVReflectionMapping
,
CubeReflectionMapping
,
PCFSoftShadowMap
,
PCFShadowMap
,
VSMShadowMap
,
ACESFilmicToneMapping
,
CineonToneMapping
,
Uncharted2ToneMapping
,
ReinhardToneMapping
,
LinearToneMapping
,
GammaEncoding
,
RGBDEncoding
,
RGBM16Encoding
,
RGBM7Encoding
,
RGBEEncoding
,
sRGBEncoding
,
LinearEncoding
,
LogLuvEncoding
}
from
'
../../constants.js
'
;
let
programIdCount
=
0
;
...
...
@@ -324,10 +324,6 @@ function generateEnvMapTypeDefine( parameters ) {
envMapTypeDefine
=
'
ENVMAP_TYPE_EQUIREC
'
;
break
;
case
SphericalReflectionMapping
:
envMapTypeDefine
=
'
ENVMAP_TYPE_SPHERE
'
;
break
;
}
}
...
...
test/unit/src/constants.tests.js
浏览文件 @
db2af928
...
...
@@ -68,7 +68,6 @@ export default QUnit.module( 'Constants', () => {
assert
.
equal
(
Constants
.
CubeRefractionMapping
,
302
,
'
CubeRefractionMapping is equal to 302
'
);
assert
.
equal
(
Constants
.
EquirectangularReflectionMapping
,
303
,
'
EquirectangularReflectionMapping is equal to 303
'
);
assert
.
equal
(
Constants
.
EquirectangularRefractionMapping
,
304
,
'
EquirectangularRefractionMapping is equal to 304
'
);
assert
.
equal
(
Constants
.
SphericalReflectionMapping
,
305
,
'
SphericalReflectionMapping is equal to 305
'
);
assert
.
equal
(
Constants
.
CubeUVReflectionMapping
,
306
,
'
CubeUVReflectionMapping is equal to 306
'
);
assert
.
equal
(
Constants
.
CubeUVRefractionMapping
,
307
,
'
CubeUVRefractionMapping is equal to 307
'
);
assert
.
equal
(
Constants
.
RepeatWrapping
,
1000
,
'
RepeatWrapping is equal to 1000
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录