Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
878dca08
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,发现更多精彩内容 >>
提交
878dca08
编写于
7月 24, 2018
作者:
S
sunag
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix normal doubleSided
上级
a1be22fa
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
8 deletion
+11
-8
examples/js/nodes/accessors/NormalNode.js
examples/js/nodes/accessors/NormalNode.js
+2
-2
examples/js/nodes/misc/BumpMapNode.js
examples/js/nodes/misc/BumpMapNode.js
+1
-1
examples/js/nodes/misc/NormalMapNode.js
examples/js/nodes/misc/NormalMapNode.js
+1
-1
examples/webgl_materials_nodes.html
examples/webgl_materials_nodes.html
+7
-4
未找到文件。
examples/js/nodes/accessors/NormalNode.js
浏览文件 @
878dca08
...
@@ -45,7 +45,7 @@ NormalNode.prototype.generate = function ( builder, output ) {
...
@@ -45,7 +45,7 @@ NormalNode.prototype.generate = function ( builder, output ) {
builder
.
requires
.
normal
=
true
;
builder
.
requires
.
normal
=
true
;
result
=
builder
.
isShader
(
'
vertex
'
)
?
'
normal
'
:
'
vObjectN
ormal
'
;
result
=
'
n
ormal
'
;
break
;
break
;
...
@@ -59,7 +59,7 @@ NormalNode.prototype.generate = function ( builder, output ) {
...
@@ -59,7 +59,7 @@ NormalNode.prototype.generate = function ( builder, output ) {
case
NormalNode
.
VIEW
:
case
NormalNode
.
VIEW
:
result
=
'
n
ormal
'
;
result
=
'
vN
ormal
'
;
break
;
break
;
...
...
examples/js/nodes/misc/BumpMapNode.js
浏览文件 @
878dca08
...
@@ -114,7 +114,7 @@ BumpMapNode.prototype.generate = function ( builder, output ) {
...
@@ -114,7 +114,7 @@ BumpMapNode.prototype.generate = function ( builder, output ) {
var
derivativeHeight
=
builder
.
include
(
BumpMapNode
.
Nodes
.
dHdxy_fwd
),
var
derivativeHeight
=
builder
.
include
(
BumpMapNode
.
Nodes
.
dHdxy_fwd
),
perturbNormalArb
=
builder
.
include
(
BumpMapNode
.
Nodes
.
perturbNormalArb
);
perturbNormalArb
=
builder
.
include
(
BumpMapNode
.
Nodes
.
perturbNormalArb
);
this
.
normal
=
this
.
normal
||
new
NormalNode
(
NormalNode
.
VIEW
);
this
.
normal
=
this
.
normal
||
new
NormalNode
();
this
.
position
=
this
.
position
||
new
PositionNode
(
PositionNode
.
VIEW
);
this
.
position
=
this
.
position
||
new
PositionNode
(
PositionNode
.
VIEW
);
var
derivativeHeightCode
=
derivativeHeight
+
'
(
'
+
this
.
value
.
build
(
builder
,
'
sampler2D
'
)
+
'
,
'
+
var
derivativeHeightCode
=
derivativeHeight
+
'
(
'
+
this
.
value
.
build
(
builder
,
'
sampler2D
'
)
+
'
,
'
+
...
...
examples/js/nodes/misc/NormalMapNode.js
浏览文件 @
878dca08
...
@@ -68,7 +68,7 @@ NormalMapNode.prototype.generate = function ( builder, output ) {
...
@@ -68,7 +68,7 @@ NormalMapNode.prototype.generate = function ( builder, output ) {
var
perturbNormal2Arb
=
builder
.
include
(
NormalMapNode
.
Nodes
.
perturbNormal2Arb
);
var
perturbNormal2Arb
=
builder
.
include
(
NormalMapNode
.
Nodes
.
perturbNormal2Arb
);
this
.
normal
=
this
.
normal
||
new
NormalNode
(
NormalNode
.
VIEW
);
this
.
normal
=
this
.
normal
||
new
NormalNode
();
this
.
position
=
this
.
position
||
new
PositionNode
(
PositionNode
.
VIEW
);
this
.
position
=
this
.
position
||
new
PositionNode
(
PositionNode
.
VIEW
);
this
.
uv
=
this
.
uv
||
new
UVNode
();
this
.
uv
=
this
.
uv
||
new
UVNode
();
...
...
examples/webgl_materials_nodes.html
浏览文件 @
878dca08
...
@@ -764,7 +764,7 @@
...
@@ -764,7 +764,7 @@
var
color
=
new
THREE
.
ColorNode
(
0xFFFFFF
);
var
color
=
new
THREE
.
ColorNode
(
0xFFFFFF
);
var
viewZ
=
new
THREE
.
Math2Node
(
var
viewZ
=
new
THREE
.
Math2Node
(
new
THREE
.
NormalNode
(
THREE
.
NormalNode
.
VIEW
),
new
THREE
.
NormalNode
(),
new
THREE
.
Vector3Node
(
0
,
0
,
-
intensity
),
new
THREE
.
Vector3Node
(
0
,
0
,
-
intensity
),
THREE
.
Math2Node
.
DOT
THREE
.
Math2Node
.
DOT
);
);
...
@@ -1045,7 +1045,7 @@
...
@@ -1045,7 +1045,7 @@
var
color
=
new
THREE
.
CubeTextureNode
(
cubemap
);
var
color
=
new
THREE
.
CubeTextureNode
(
cubemap
);
var
viewZ
=
new
THREE
.
Math2Node
(
var
viewZ
=
new
THREE
.
Math2Node
(
new
THREE
.
NormalNode
(
THREE
.
NormalNode
.
VIEW
),
new
THREE
.
NormalNode
(),
new
THREE
.
Vector3Node
(
0
,
0
,
-
1
),
new
THREE
.
Vector3Node
(
0
,
0
,
-
1
),
THREE
.
Math2Node
.
DOT
THREE
.
Math2Node
.
DOT
);
);
...
@@ -1690,7 +1690,7 @@
...
@@ -1690,7 +1690,7 @@
var
fur
=
new
THREE
.
FloatNode
(
.
5
);
var
fur
=
new
THREE
.
FloatNode
(
.
5
);
var
posDirection
=
new
THREE
.
Math1Node
(
new
THREE
.
PositionNode
(
THREE
.
PositionNode
.
VIEW
),
THREE
.
Math1Node
.
NORMALIZE
);
var
posDirection
=
new
THREE
.
Math1Node
(
new
THREE
.
PositionNode
(
THREE
.
PositionNode
.
VIEW
),
THREE
.
Math1Node
.
NORMALIZE
);
var
norDirection
=
new
THREE
.
Math1Node
(
new
THREE
.
NormalNode
(
THREE
.
NormalNode
.
VIEW
),
THREE
.
Math1Node
.
NORMALIZE
);
var
norDirection
=
new
THREE
.
Math1Node
(
new
THREE
.
NormalNode
(),
THREE
.
Math1Node
.
NORMALIZE
);
var
viewZ
=
new
THREE
.
Math2Node
(
var
viewZ
=
new
THREE
.
Math2Node
(
posDirection
,
posDirection
,
...
@@ -1874,7 +1874,7 @@
...
@@ -1874,7 +1874,7 @@
// LINE
// LINE
var
posDirection
=
new
THREE
.
Math1Node
(
new
THREE
.
PositionNode
(
THREE
.
PositionNode
.
VIEW
),
THREE
.
Math1Node
.
NORMALIZE
);
var
posDirection
=
new
THREE
.
Math1Node
(
new
THREE
.
PositionNode
(
THREE
.
PositionNode
.
VIEW
),
THREE
.
Math1Node
.
NORMALIZE
);
var
norDirection
=
new
THREE
.
Math1Node
(
new
THREE
.
NormalNode
(
THREE
.
NormalNode
.
VIEW
),
THREE
.
Math1Node
.
NORMALIZE
);
var
norDirection
=
new
THREE
.
Math1Node
(
new
THREE
.
NormalNode
(),
THREE
.
Math1Node
.
NORMALIZE
);
var
viewZ
=
new
THREE
.
Math2Node
(
var
viewZ
=
new
THREE
.
Math2Node
(
posDirection
,
posDirection
,
...
@@ -2534,6 +2534,9 @@
...
@@ -2534,6 +2534,9 @@
}
}
// set material
// set material
mtl
.
side
=
THREE
.
DoubleSide
;
mesh
.
material
=
mtl
;
mesh
.
material
=
mtl
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录