Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
8fb84d74
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,发现更多精彩内容 >>
提交
8fb84d74
编写于
4月 30, 2016
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Materials: Promoted shading.
上级
0400493a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
2 addition
and
23 deletion
+2
-23
src/materials/Material.js
src/materials/Material.js
+2
-1
src/materials/MeshBasicMaterial.js
src/materials/MeshBasicMaterial.js
+0
-4
src/materials/MeshPhongMaterial.js
src/materials/MeshPhongMaterial.js
+0
-6
src/materials/MeshStandardMaterial.js
src/materials/MeshStandardMaterial.js
+0
-6
src/materials/ShaderMaterial.js
src/materials/ShaderMaterial.js
+0
-6
未找到文件。
src/materials/Material.js
浏览文件 @
8fb84d74
...
...
@@ -16,6 +16,7 @@ THREE.Material = function () {
this
.
blending
=
THREE
.
NormalBlending
;
this
.
side
=
THREE
.
FrontSide
;
this
.
shading
=
THREE
.
SmoothShading
;
// THREE.FlatShading, THREE.SmoothShading
this
.
vertexColors
=
THREE
.
NoColors
;
// THREE.NoColors, THREE.VertexColors, THREE.FaceColors
this
.
opacity
=
1
;
...
...
@@ -194,7 +195,7 @@ THREE.Material.prototype = {
if
(
this
.
sizeAttenuation
!==
undefined
)
data
.
sizeAttenuation
=
this
.
sizeAttenuation
;
if
(
this
.
blending
!==
THREE
.
NormalBlending
)
data
.
blending
=
this
.
blending
;
if
(
this
.
shading
!==
undefined
&&
this
.
shading
!==
THREE
.
SmoothShading
)
data
.
shading
=
this
.
shading
;
if
(
this
.
shading
!==
THREE
.
SmoothShading
)
data
.
shading
=
this
.
shading
;
if
(
this
.
side
!==
THREE
.
FrontSide
)
data
.
side
=
this
.
side
;
if
(
this
.
vertexColors
!==
THREE
.
NoColors
)
data
.
vertexColors
=
this
.
vertexColors
;
...
...
src/materials/MeshBasicMaterial.js
浏览文件 @
8fb84d74
...
...
@@ -53,8 +53,6 @@ THREE.MeshBasicMaterial = function ( parameters ) {
this
.
reflectivity
=
1
;
this
.
refractionRatio
=
0.98
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinecap
=
'
round
'
;
...
...
@@ -90,8 +88,6 @@ THREE.MeshBasicMaterial.prototype.copy = function ( source ) {
this
.
reflectivity
=
source
.
reflectivity
;
this
.
refractionRatio
=
source
.
refractionRatio
;
this
.
shading
=
source
.
shading
;
this
.
wireframe
=
source
.
wireframe
;
this
.
wireframeLinewidth
=
source
.
wireframeLinewidth
;
this
.
wireframeLinecap
=
source
.
wireframeLinecap
;
...
...
src/materials/MeshPhongMaterial.js
浏览文件 @
8fb84d74
...
...
@@ -39,8 +39,6 @@
* reflectivity: <float>,
* refractionRatio: <float>,
*
* shading: THREE.SmoothShading,
*
* wireframe: <boolean>,
* wireframeLinewidth: <float>,
*
...
...
@@ -91,8 +89,6 @@ THREE.MeshPhongMaterial = function ( parameters ) {
this
.
reflectivity
=
1
;
this
.
refractionRatio
=
0.98
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinecap
=
'
round
'
;
...
...
@@ -148,8 +144,6 @@ THREE.MeshPhongMaterial.prototype.copy = function ( source ) {
this
.
reflectivity
=
source
.
reflectivity
;
this
.
refractionRatio
=
source
.
refractionRatio
;
this
.
shading
=
source
.
shading
;
this
.
wireframe
=
source
.
wireframe
;
this
.
wireframeLinewidth
=
source
.
wireframeLinewidth
;
this
.
wireframeLinecap
=
source
.
wireframeLinecap
;
...
...
src/materials/MeshStandardMaterial.js
浏览文件 @
8fb84d74
...
...
@@ -40,8 +40,6 @@
*
* refractionRatio: <float>,
*
* shading: THREE.SmoothShading,
*
* wireframe: <boolean>,
* wireframeLinewidth: <float>,
*
...
...
@@ -96,8 +94,6 @@ THREE.MeshStandardMaterial = function ( parameters ) {
this
.
refractionRatio
=
0.98
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
wireframe
=
false
;
this
.
wireframeLinewidth
=
1
;
this
.
wireframeLinecap
=
'
round
'
;
...
...
@@ -157,8 +153,6 @@ THREE.MeshStandardMaterial.prototype.copy = function ( source ) {
this
.
refractionRatio
=
source
.
refractionRatio
;
this
.
shading
=
source
.
shading
;
this
.
wireframe
=
source
.
wireframe
;
this
.
wireframeLinewidth
=
source
.
wireframeLinewidth
;
this
.
wireframeLinecap
=
source
.
wireframeLinecap
;
...
...
src/materials/ShaderMaterial.js
浏览文件 @
8fb84d74
...
...
@@ -8,8 +8,6 @@
* fragmentShader: <string>,
* vertexShader: <string>,
*
* shading: THREE.SmoothShading,
*
* wireframe: <boolean>,
* wireframeLinewidth: <float>,
*
...
...
@@ -33,8 +31,6 @@ THREE.ShaderMaterial = function ( parameters ) {
this
.
vertexShader
=
'
void main() {
\n\t
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
\n
}
'
;
this
.
fragmentShader
=
'
void main() {
\n\t
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
\n
}
'
;
this
.
shading
=
THREE
.
SmoothShading
;
this
.
linewidth
=
1
;
this
.
wireframe
=
false
;
...
...
@@ -94,8 +90,6 @@ THREE.ShaderMaterial.prototype.copy = function ( source ) {
this
.
defines
=
source
.
defines
;
this
.
shading
=
source
.
shading
;
this
.
wireframe
=
source
.
wireframe
;
this
.
wireframeLinewidth
=
source
.
wireframeLinewidth
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录