Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
bccaa60f
T
three.js
项目概览
车家大少爷
/
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,体验更适合开发者的 AI 搜索 >>
提交
bccaa60f
编写于
10月 28, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MeshPhongMaterial: Removed metal property. Now that we have MeshPhysicalMaterial...
上级
65174476
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
15 addition
and
24 deletion
+15
-24
docs/api/materials/MeshPhongMaterial.html
docs/api/materials/MeshPhongMaterial.html
+0
-7
src/Three.Legacy.js
src/Three.Legacy.js
+13
-1
src/materials/MeshPhongMaterial.js
src/materials/MeshPhongMaterial.js
+0
-4
src/renderers/shaders/ShaderLib.js
src/renderers/shaders/ShaderLib.js
+1
-9
src/renderers/webgl/WebGLProgram.js
src/renderers/webgl/WebGLProgram.js
+0
-1
src/renderers/webgl/WebGLPrograms.js
src/renderers/webgl/WebGLPrograms.js
+1
-2
未找到文件。
docs/api/materials/MeshPhongMaterial.html
浏览文件 @
bccaa60f
...
...
@@ -70,13 +70,6 @@
<h3>
[property:Float shininess]
</h3>
<div>
How shiny the specular highlight is; a higher value gives a sharper highlight. Default is *30*.
</div>
<h3>
[property:boolean metal]
</h3>
<div>
If set to true the shader multiplies the specular highlight by the underlying color of the object, making
it appear to be more metal-like and darker. If set to false the specular highlight is added ontop of the
underlying colors.
</div>
<h3>
[property:Texture map]
</h3>
<div>
Set color texture map. Default is null. The texture map color is modulated by the diffuse color.
</div>
...
...
src/Three.Legacy.js
浏览文件 @
bccaa60f
...
...
@@ -348,10 +348,22 @@ Object.defineProperties( THREE, {
}
}
);
Object
.
defineProperties
(
THREE
.
MeshPhongMaterial
.
prototype
,
{
metal
:
{
get
:
function
()
{
console
.
warn
(
'
THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshPhysicalMaterial instead.
'
);
return
false
;
},
set
:
function
(
value
)
{
console
.
warn
(
'
THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshPhysicalMaterial instead
'
);
}
}
}
);
Object
.
defineProperties
(
THREE
.
ShaderMaterial
.
prototype
,
{
derivatives
:
{
get
:
function
()
{
console
.
warn
(
'
THREE.
ShaderMaterial: .derivatives has been moved to .extensions.derivatives.
'
);
console
.
warn
(
'
THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.
'
);
return
this
.
extensions
.
derivatives
;
},
set
:
function
(
value
)
{
...
...
src/materials/MeshPhongMaterial.js
浏览文件 @
bccaa60f
...
...
@@ -67,8 +67,6 @@ THREE.MeshPhongMaterial = function ( parameters ) {
this
.
specular
=
new
THREE
.
Color
(
0x111111
);
this
.
shininess
=
30
;
this
.
metal
=
false
;
this
.
map
=
null
;
this
.
lightMap
=
null
;
...
...
@@ -129,8 +127,6 @@ THREE.MeshPhongMaterial.prototype.copy = function ( source ) {
this
.
specular
.
copy
(
source
.
specular
);
this
.
shininess
=
source
.
shininess
;
this
.
metal
=
source
.
metal
;
this
.
map
=
source
.
map
;
this
.
lightMap
=
source
.
lightMap
;
...
...
src/renderers/shaders/ShaderLib.js
浏览文件 @
bccaa60f
...
...
@@ -395,15 +395,7 @@ THREE.ShaderLib = {
"
reflectedLight.directDiffuse *= shadowMask;
"
,
"
reflectedLight.directSpecular *= shadowMask;
"
,
"
#ifdef METAL
"
,
"
vec3 outgoingLight = ( reflectedLight.directDiffuse + reflectedLight.indirectDiffuse ) * specular + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;
"
,
"
#else
"
,
"
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;
"
,
"
#endif
"
,
"
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveLight;
"
,
THREE
.
ShaderChunk
[
"
envmap_fragment
"
],
THREE
.
ShaderChunk
[
"
linear_to_gamma_fragment
"
],
...
...
src/renderers/webgl/WebGLProgram.js
浏览文件 @
bccaa60f
...
...
@@ -391,7 +391,6 @@ THREE.WebGLProgram = ( function () {
parameters
.
flatShading
?
'
#define FLAT_SHADED
'
:
''
,
parameters
.
metal
?
'
#define METAL
'
:
''
,
parameters
.
doubleSided
?
'
#define DOUBLE_SIDED
'
:
''
,
parameters
.
flipSided
?
'
#define FLIP_SIDED
'
:
''
,
...
...
src/renderers/webgl/WebGLPrograms.js
浏览文件 @
bccaa60f
...
...
@@ -23,7 +23,7 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
"
maxBones
"
,
"
useVertexTexture
"
,
"
morphTargets
"
,
"
morphNormals
"
,
"
maxMorphTargets
"
,
"
maxMorphNormals
"
,
"
maxDirLights
"
,
"
maxPointLights
"
,
"
maxSpotLights
"
,
"
maxHemiLights
"
,
"
maxShadows
"
,
"
shadowMapEnabled
"
,
"
pointLightShadows
"
,
"
shadowMapType
"
,
"
shadowMapDebug
"
,
"
alphaTest
"
,
"
metal
"
,
"
doubleSided
"
,
"
shadowMapType
"
,
"
shadowMapDebug
"
,
"
alphaTest
"
,
"
doubleSided
"
,
"
flipSided
"
];
...
...
@@ -144,7 +144,6 @@ THREE.WebGLPrograms = function ( renderer, capabilities ) {
shadowMapDebug
:
renderer
.
shadowMap
.
debug
,
alphaTest
:
material
.
alphaTest
,
metal
:
material
.
metal
,
doubleSided
:
material
.
side
===
THREE
.
DoubleSide
,
flipSided
:
material
.
side
===
THREE
.
BackSide
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录