Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
231a8a63
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,发现更多精彩内容 >>
提交
231a8a63
编写于
7月 08, 2018
作者:
S
sunag
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename .transform to .position ( .transform or .position = new PositionNode() )
上级
232cb3f4
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
47 addition
and
47 deletion
+47
-47
examples/js/nodes/materials/PhongNodeMaterial.js
examples/js/nodes/materials/PhongNodeMaterial.js
+1
-1
examples/js/nodes/materials/SpriteNodeMaterial.js
examples/js/nodes/materials/SpriteNodeMaterial.js
+1
-1
examples/js/nodes/materials/StandardNodeMaterial.js
examples/js/nodes/materials/StandardNodeMaterial.js
+1
-1
examples/js/nodes/materials/nodes/PhongNode.js
examples/js/nodes/materials/nodes/PhongNode.js
+6
-6
examples/js/nodes/materials/nodes/SpriteNode.js
examples/js/nodes/materials/nodes/SpriteNode.js
+7
-7
examples/js/nodes/materials/nodes/StandardNode.js
examples/js/nodes/materials/nodes/StandardNode.js
+6
-6
examples/js/nodes/utils/UVTransformNode.js
examples/js/nodes/utils/UVTransformNode.js
+6
-6
examples/nodes/displace.json
examples/nodes/displace.json
+1
-1
examples/nodes/wave.json
examples/nodes/wave.json
+1
-1
examples/webgl_materials_nodes.html
examples/webgl_materials_nodes.html
+16
-16
examples/webgl_sprites_nodes.html
examples/webgl_sprites_nodes.html
+1
-1
未找到文件。
examples/js/nodes/materials/PhongNodeMaterial.js
浏览文件 @
231a8a63
...
...
@@ -32,7 +32,7 @@ NodeUtils.addShortcuts( PhongNodeMaterial.prototype, 'fragment', [
'
ao
'
,
'
environment
'
,
'
environmentAlpha
'
,
'
transform
'
'
position
'
]
);
export
{
PhongNodeMaterial
};
examples/js/nodes/materials/SpriteNodeMaterial.js
浏览文件 @
231a8a63
...
...
@@ -22,7 +22,7 @@ SpriteNodeMaterial.prototype.constructor = SpriteNodeMaterial;
NodeUtils
.
addShortcuts
(
SpriteNodeMaterial
.
prototype
,
'
fragment
'
,
[
'
color
'
,
'
alpha
'
,
'
transform
'
,
'
position
'
,
'
spherical
'
]
);
...
...
examples/js/nodes/materials/StandardNodeMaterial.js
浏览文件 @
231a8a63
...
...
@@ -34,7 +34,7 @@ NodeUtils.addShortcuts( StandardNodeMaterial.prototype, 'fragment', [
'
shadow
'
,
'
ao
'
,
'
environment
'
,
'
transform
'
'
position
'
]
);
export
{
StandardNodeMaterial
};
examples/js/nodes/materials/nodes/PhongNode.js
浏览文件 @
231a8a63
...
...
@@ -31,7 +31,7 @@ PhongNode.prototype.build = function ( builder ) {
if
(
builder
.
isShader
(
'
vertex
'
)
)
{
var
transform
=
this
.
transform
?
this
.
transform
.
parseAndBuildCode
(
builder
,
'
v3
'
,
{
cache
:
'
transform
'
}
)
:
undefined
;
var
position
=
this
.
position
?
this
.
position
.
parseAndBuildCode
(
builder
,
'
v3
'
,
{
cache
:
'
position
'
}
)
:
undefined
;
builder
.
mergeUniform
(
THREE
.
UniformsUtils
.
merge
(
[
...
...
@@ -74,11 +74,11 @@ PhongNode.prototype.build = function ( builder ) {
"
#include <begin_vertex>
"
];
if
(
transform
)
{
if
(
position
)
{
output
.
push
(
transform
.
code
,
transform
.
result
?
"
transformed =
"
+
transform
.
result
+
"
;
"
:
''
position
.
code
,
position
.
result
?
"
transformed =
"
+
position
.
result
+
"
;
"
:
''
);
}
...
...
@@ -325,7 +325,7 @@ PhongNode.prototype.copy = function ( source ) {
// vertex
if
(
source
.
transform
)
this
.
transform
=
source
.
transform
;
if
(
source
.
position
)
this
.
position
=
source
.
position
;
// fragment
...
...
@@ -360,7 +360,7 @@ PhongNode.prototype.toJSON = function ( meta ) {
// vertex
if
(
this
.
transform
)
data
.
transform
=
this
.
transform
.
toJSON
(
meta
).
uuid
;
if
(
this
.
position
)
data
.
position
=
this
.
position
.
toJSON
(
meta
).
uuid
;
// fragment
...
...
examples/js/nodes/materials/nodes/SpriteNode.js
浏览文件 @
231a8a63
...
...
@@ -29,7 +29,7 @@ SpriteNode.prototype.build = function ( builder ) {
if
(
builder
.
isShader
(
'
vertex
'
)
)
{
var
transform
=
this
.
transform
?
this
.
transform
.
parseAndBuildCode
(
builder
,
'
v3
'
,
{
cache
:
'
transform
'
}
)
:
undefined
;
var
position
=
this
.
position
?
this
.
position
.
parseAndBuildCode
(
builder
,
'
v3
'
,
{
cache
:
'
position
'
}
)
:
undefined
;
builder
.
mergeUniform
(
THREE
.
UniformsUtils
.
merge
(
[
THREE
.
UniformsLib
[
"
fog
"
]
...
...
@@ -43,11 +43,11 @@ SpriteNode.prototype.build = function ( builder ) {
"
#include <begin_vertex>
"
];
if
(
transform
)
{
if
(
position
)
{
output
.
push
(
transform
.
code
,
transform
.
result
?
"
transformed =
"
+
transform
.
result
+
"
;
"
:
''
position
.
code
,
position
.
result
?
"
transformed =
"
+
position
.
result
+
"
;
"
:
''
);
}
...
...
@@ -148,13 +148,13 @@ SpriteNode.prototype.copy = function ( source ) {
// vertex
if
(
source
.
transform
)
this
.
transform
=
source
.
transform
;
if
(
source
.
position
)
this
.
position
=
source
.
position
;
// fragment
this
.
color
=
source
.
color
;
if
(
source
.
spherical
!==
undefined
)
this
.
spherical
=
source
.
transform
;
if
(
source
.
spherical
!==
undefined
)
this
.
spherical
=
source
.
position
;
if
(
source
.
alpha
)
this
.
alpha
=
source
.
alpha
;
...
...
@@ -170,7 +170,7 @@ SpriteNode.prototype.toJSON = function ( meta ) {
// vertex
if
(
this
.
transform
)
data
.
transform
=
this
.
transform
.
toJSON
(
meta
).
uuid
;
if
(
this
.
position
)
data
.
position
=
this
.
position
.
toJSON
(
meta
).
uuid
;
// fragment
...
...
examples/js/nodes/materials/nodes/StandardNode.js
浏览文件 @
231a8a63
...
...
@@ -34,7 +34,7 @@ StandardNode.prototype.build = function ( builder ) {
if
(
builder
.
isShader
(
'
vertex
'
)
)
{
var
transform
=
this
.
transform
?
this
.
transform
.
parseAndBuildCode
(
builder
,
'
v3
'
,
{
cache
:
'
transform
'
}
)
:
undefined
;
var
position
=
this
.
position
?
this
.
position
.
parseAndBuildCode
(
builder
,
'
v3
'
,
{
cache
:
'
position
'
}
)
:
undefined
;
builder
.
mergeUniform
(
THREE
.
UniformsUtils
.
merge
(
[
...
...
@@ -81,11 +81,11 @@ StandardNode.prototype.build = function ( builder ) {
"
#include <begin_vertex>
"
];
if
(
transform
)
{
if
(
position
)
{
output
.
push
(
transform
.
code
,
transform
.
result
?
"
transformed =
"
+
transform
.
result
+
"
;
"
:
''
position
.
code
,
position
.
result
?
"
transformed =
"
+
position
.
result
+
"
;
"
:
''
);
}
...
...
@@ -396,7 +396,7 @@ StandardNode.prototype.copy = function ( source ) {
// vertex
if
(
source
.
transform
)
this
.
transform
=
source
.
transform
;
if
(
source
.
position
)
this
.
position
=
source
.
position
;
// fragment
...
...
@@ -435,7 +435,7 @@ StandardNode.prototype.toJSON = function ( meta ) {
// vertex
if
(
this
.
transform
)
data
.
transform
=
this
.
transform
.
toJSON
(
meta
).
uuid
;
if
(
this
.
position
)
data
.
position
=
this
.
position
.
toJSON
(
meta
).
uuid
;
// fragment
...
...
examples/js/nodes/utils/UVTransformNode.js
浏览文件 @
231a8a63
...
...
@@ -6,12 +6,12 @@ import { ExpressionNode } from '../core/ExpressionNode.js';
import
{
Matrix3Node
}
from
'
../inputs/Matrix3Node.js
'
;
import
{
UVNode
}
from
'
../accessors/UVNode.js
'
;
function
UVTransformNode
(
uv
,
transform
)
{
function
UVTransformNode
(
uv
,
position
)
{
ExpressionNode
.
call
(
this
,
"
( uvTransform * vec3( uvNode, 1 ) ).xy
"
,
"
vec2
"
);
this
.
uv
=
uv
||
new
UVNode
();
this
.
transform
=
transform
||
new
Matrix3Node
();
this
.
position
=
position
||
new
Matrix3Node
();
};
...
...
@@ -22,7 +22,7 @@ UVTransformNode.prototype.nodeType = "UVTransform";
UVTransformNode
.
prototype
.
generate
=
function
(
builder
,
output
)
{
this
.
keywords
[
"
uvNode
"
]
=
this
.
uv
;
this
.
keywords
[
"
uvTransform
"
]
=
this
.
transform
;
this
.
keywords
[
"
uvTransform
"
]
=
this
.
position
;
return
ExpressionNode
.
prototype
.
generate
.
call
(
this
,
builder
,
output
);
...
...
@@ -33,7 +33,7 @@ UVTransformNode.prototype.setUvTransform = function ( tx, ty, sx, sy, rotation,
cx
=
cx
!==
undefined
?
cx
:
.
5
;
cy
=
cy
!==
undefined
?
cy
:
.
5
;
this
.
transform
.
value
.
setUvTransform
(
tx
,
ty
,
sx
,
sy
,
rotation
,
cx
,
cy
);
this
.
position
.
value
.
setUvTransform
(
tx
,
ty
,
sx
,
sy
,
rotation
,
cx
,
cy
);
};
...
...
@@ -42,7 +42,7 @@ UVTransformNode.prototype.copy = function ( source ) {
ExpressionNode
.
prototype
.
copy
.
call
(
this
,
source
);
this
.
uv
=
source
.
uv
;
this
.
transform
=
source
.
transform
;
this
.
position
=
source
.
position
;
};
...
...
@@ -55,7 +55,7 @@ UVTransformNode.prototype.toJSON = function ( meta ) {
data
=
this
.
createJSONNode
(
meta
);
data
.
uv
=
this
.
uv
.
toJSON
(
meta
).
uuid
;
data
.
transform
=
this
.
transform
.
toJSON
(
meta
).
uuid
;
data
.
position
=
this
.
position
.
toJSON
(
meta
).
uuid
;
}
...
...
examples/nodes/displace.json
浏览文件 @
231a8a63
{
"nodes"
:{
"A9543A4D-4036-4AB3-AEF1-0AE10CFDD4A6"
:{
"uuid"
:
"A9543A4D-4036-4AB3-AEF1-0AE10CFDD4A6"
,
"nodeType"
:
"Phong"
,
"transform"
:
"A298C150-1E98-425D-8552-CF4690C3238E"
,
"color"
:
"DCD2B815-345D-4600-BAFD-BE26925C60E6"
,
"specular"
:
"DCD2B815-345D-4600-BAFD-BE26925C60E6"
,
"shininess"
:
"5E1EEAA6-F057-4D5F-8607-E9F8265D2B0A"
,
"emissive"
:
"BF320EA1-F523-4314-9B87-07E33F39CC6C"
},
"A298C150-1E98-425D-8552-CF4690C3238E"
:{
"uuid"
:
"A298C150-1E98-425D-8552-CF4690C3238E"
,
"nodeType"
:
"Operator"
,
"a"
:
"6449FE7E-56E7-490E-9CA9-9F5E9A540AFD"
,
"b"
:
"09ECA9C2-8B78-422B-B3DA-2194BCBC5FCA"
,
"op"
:
"+"
},
"6449FE7E-56E7-490E-9CA9-9F5E9A540AFD"
:{
"uuid"
:
"6449FE7E-56E7-490E-9CA9-9F5E9A540AFD"
,
"nodeType"
:
"Position"
,
"scope"
:
"local"
},
"09ECA9C2-8B78-422B-B3DA-2194BCBC5FCA"
:{
"uuid"
:
"09ECA9C2-8B78-422B-B3DA-2194BCBC5FCA"
,
"nodeType"
:
"Operator"
,
"a"
:
"C4573235-0C78-460A-BB35-E41470304BD5"
,
"b"
:
"1FF6B149-BCA7-4F37-91E9-8AFA8770F084"
,
"op"
:
"*"
},
"C4573235-0C78-460A-BB35-E41470304BD5"
:{
"uuid"
:
"C4573235-0C78-460A-BB35-E41470304BD5"
,
"nodeType"
:
"Operator"
,
"a"
:
"0E355E3B-23AB-4225-9477-312295B18436"
,
"b"
:
"ABD03824-B7F8-46A4-9006-03FBA06618A9"
,
"op"
:
"*"
},
"0E355E3B-23AB-4225-9477-312295B18436"
:{
"uuid"
:
"0E355E3B-23AB-4225-9477-312295B18436"
,
"nodeType"
:
"Normal"
,
"scope"
:
"local"
},
"ABD03824-B7F8-46A4-9006-03FBA06618A9"
:{
"uuid"
:
"ABD03824-B7F8-46A4-9006-03FBA06618A9"
,
"nodeType"
:
"Switch"
,
"node"
:
"43D31AB8-1DD6-46BE-8969-0668FAB513E2"
,
"components"
:
"w"
},
"43D31AB8-1DD6-46BE-8969-0668FAB513E2"
:{
"uuid"
:
"43D31AB8-1DD6-46BE-8969-0668FAB513E2"
,
"nodeType"
:
"Texture"
,
"value"
:
"cloud"
,
"uv"
:
"273D729E-E18D-47AE-8299-F069FDB6C43A"
,
"project"
:
false
},
"273D729E-E18D-47AE-8299-F069FDB6C43A"
:{
"uuid"
:
"273D729E-E18D-47AE-8299-F069FDB6C43A"
,
"nodeType"
:
"Operator"
,
"a"
:
"C46D2A54-57A8-4649-AF9B-09D011AF3BFD"
,
"b"
:
"C43B8DA9-AFF5-4690-B2EA-3EED061C0662"
,
"op"
:
"+"
},
"C46D2A54-57A8-4649-AF9B-09D011AF3BFD"
:{
"uuid"
:
"C46D2A54-57A8-4649-AF9B-09D011AF3BFD"
,
"nodeType"
:
"Operator"
,
"a"
:
"F81EC887-A160-455B-B1DE-A0FA2B7FAC36"
,
"b"
:
"801913CD-EC7A-47BE-A54C-3D86020B0847"
,
"op"
:
"*"
},
"F81EC887-A160-455B-B1DE-A0FA2B7FAC36"
:{
"uuid"
:
"F81EC887-A160-455B-B1DE-A0FA2B7FAC36"
,
"nodeType"
:
"Timer"
,
"name"
:
"time"
,
"scope"
:
"global"
,
"scale"
:
1
,
"useTimeScale"
:
false
},
"801913CD-EC7A-47BE-A54C-3D86020B0847"
:{
"uuid"
:
"801913CD-EC7A-47BE-A54C-3D86020B0847"
,
"nodeType"
:
"Float"
,
"name"
:
"speed"
,
"value"
:
0.2
},
"C43B8DA9-AFF5-4690-B2EA-3EED061C0662"
:{
"uuid"
:
"C43B8DA9-AFF5-4690-B2EA-3EED061C0662"
,
"nodeType"
:
"UV"
,
"index"
:
0
},
"1FF6B149-BCA7-4F37-91E9-8AFA8770F084"
:{
"uuid"
:
"1FF6B149-BCA7-4F37-91E9-8AFA8770F084"
,
"nodeType"
:
"Float"
,
"value"
:
2
},
"DCD2B815-345D-4600-BAFD-BE26925C60E6"
:{
"uuid"
:
"DCD2B815-345D-4600-BAFD-BE26925C60E6"
,
"nodeType"
:
"Color"
,
"r"
:
0
,
"g"
:
0
,
"b"
:
0
},
"5E1EEAA6-F057-4D5F-8607-E9F8265D2B0A"
:{
"uuid"
:
"5E1EEAA6-F057-4D5F-8607-E9F8265D2B0A"
,
"nodeType"
:
"Float"
,
"value"
:
30
},
"BF320EA1-F523-4314-9B87-07E33F39CC6C"
:{
"uuid"
:
"BF320EA1-F523-4314-9B87-07E33F39CC6C"
,
"nodeType"
:
"Math3"
,
"a"
:
"F9EA5DC0-2BC8-4C38-A480-1DA3D0680AAE"
,
"b"
:
"65010573-EE24-42A3-B32C-3945F3CF2E93"
,
"c"
:
"ABD03824-B7F8-46A4-9006-03FBA06618A9"
,
"method"
:
"mix"
},
"F9EA5DC0-2BC8-4C38-A480-1DA3D0680AAE"
:{
"uuid"
:
"F9EA5DC0-2BC8-4C38-A480-1DA3D0680AAE"
,
"nodeType"
:
"Color"
,
"r"
:
0
,
"g"
:
0.32941176470588235
,
"b"
:
0.8745098039215686
},
"65010573-EE24-42A3-B32C-3945F3CF2E93"
:{
"uuid"
:
"65010573-EE24-42A3-B32C-3945F3CF2E93"
,
"nodeType"
:
"Color"
,
"r"
:
1
,
"g"
:
1
,
"b"
:
1
}},
"materials"
:{
"BCB86F69-822F-4F9C-838B-70F657904D05"
:{
"uuid"
:
"BCB86F69-822F-4F9C-838B-70F657904D05"
,
"type"
:
"PhongNodeMaterial"
,
"fog"
:
false
,
"lights"
:
true
,
"vertex"
:
"A9543A4D-4036-4AB3-AEF1-0AE10CFDD4A6"
,
"fragment"
:
"A9543A4D-4036-4AB3-AEF1-0AE10CFDD4A6"
}},
"material"
:
"BCB86F69-822F-4F9C-838B-70F657904D05"
}
\ No newline at end of file
{
"nodes"
:{
"A9543A4D-4036-4AB3-AEF1-0AE10CFDD4A6"
:{
"uuid"
:
"A9543A4D-4036-4AB3-AEF1-0AE10CFDD4A6"
,
"nodeType"
:
"Phong"
,
"position"
:
"A298C150-1E98-425D-8552-CF4690C3238E"
,
"color"
:
"DCD2B815-345D-4600-BAFD-BE26925C60E6"
,
"specular"
:
"DCD2B815-345D-4600-BAFD-BE26925C60E6"
,
"shininess"
:
"5E1EEAA6-F057-4D5F-8607-E9F8265D2B0A"
,
"emissive"
:
"BF320EA1-F523-4314-9B87-07E33F39CC6C"
},
"A298C150-1E98-425D-8552-CF4690C3238E"
:{
"uuid"
:
"A298C150-1E98-425D-8552-CF4690C3238E"
,
"nodeType"
:
"Operator"
,
"a"
:
"6449FE7E-56E7-490E-9CA9-9F5E9A540AFD"
,
"b"
:
"09ECA9C2-8B78-422B-B3DA-2194BCBC5FCA"
,
"op"
:
"+"
},
"6449FE7E-56E7-490E-9CA9-9F5E9A540AFD"
:{
"uuid"
:
"6449FE7E-56E7-490E-9CA9-9F5E9A540AFD"
,
"nodeType"
:
"Position"
,
"scope"
:
"local"
},
"09ECA9C2-8B78-422B-B3DA-2194BCBC5FCA"
:{
"uuid"
:
"09ECA9C2-8B78-422B-B3DA-2194BCBC5FCA"
,
"nodeType"
:
"Operator"
,
"a"
:
"C4573235-0C78-460A-BB35-E41470304BD5"
,
"b"
:
"1FF6B149-BCA7-4F37-91E9-8AFA8770F084"
,
"op"
:
"*"
},
"C4573235-0C78-460A-BB35-E41470304BD5"
:{
"uuid"
:
"C4573235-0C78-460A-BB35-E41470304BD5"
,
"nodeType"
:
"Operator"
,
"a"
:
"0E355E3B-23AB-4225-9477-312295B18436"
,
"b"
:
"ABD03824-B7F8-46A4-9006-03FBA06618A9"
,
"op"
:
"*"
},
"0E355E3B-23AB-4225-9477-312295B18436"
:{
"uuid"
:
"0E355E3B-23AB-4225-9477-312295B18436"
,
"nodeType"
:
"Normal"
,
"scope"
:
"local"
},
"ABD03824-B7F8-46A4-9006-03FBA06618A9"
:{
"uuid"
:
"ABD03824-B7F8-46A4-9006-03FBA06618A9"
,
"nodeType"
:
"Switch"
,
"node"
:
"43D31AB8-1DD6-46BE-8969-0668FAB513E2"
,
"components"
:
"w"
},
"43D31AB8-1DD6-46BE-8969-0668FAB513E2"
:{
"uuid"
:
"43D31AB8-1DD6-46BE-8969-0668FAB513E2"
,
"nodeType"
:
"Texture"
,
"value"
:
"cloud"
,
"uv"
:
"273D729E-E18D-47AE-8299-F069FDB6C43A"
,
"project"
:
false
},
"273D729E-E18D-47AE-8299-F069FDB6C43A"
:{
"uuid"
:
"273D729E-E18D-47AE-8299-F069FDB6C43A"
,
"nodeType"
:
"Operator"
,
"a"
:
"C46D2A54-57A8-4649-AF9B-09D011AF3BFD"
,
"b"
:
"C43B8DA9-AFF5-4690-B2EA-3EED061C0662"
,
"op"
:
"+"
},
"C46D2A54-57A8-4649-AF9B-09D011AF3BFD"
:{
"uuid"
:
"C46D2A54-57A8-4649-AF9B-09D011AF3BFD"
,
"nodeType"
:
"Operator"
,
"a"
:
"F81EC887-A160-455B-B1DE-A0FA2B7FAC36"
,
"b"
:
"801913CD-EC7A-47BE-A54C-3D86020B0847"
,
"op"
:
"*"
},
"F81EC887-A160-455B-B1DE-A0FA2B7FAC36"
:{
"uuid"
:
"F81EC887-A160-455B-B1DE-A0FA2B7FAC36"
,
"nodeType"
:
"Timer"
,
"name"
:
"time"
,
"scope"
:
"global"
,
"scale"
:
1
,
"useTimeScale"
:
false
},
"801913CD-EC7A-47BE-A54C-3D86020B0847"
:{
"uuid"
:
"801913CD-EC7A-47BE-A54C-3D86020B0847"
,
"nodeType"
:
"Float"
,
"name"
:
"speed"
,
"value"
:
0.2
},
"C43B8DA9-AFF5-4690-B2EA-3EED061C0662"
:{
"uuid"
:
"C43B8DA9-AFF5-4690-B2EA-3EED061C0662"
,
"nodeType"
:
"UV"
,
"index"
:
0
},
"1FF6B149-BCA7-4F37-91E9-8AFA8770F084"
:{
"uuid"
:
"1FF6B149-BCA7-4F37-91E9-8AFA8770F084"
,
"nodeType"
:
"Float"
,
"value"
:
2
},
"DCD2B815-345D-4600-BAFD-BE26925C60E6"
:{
"uuid"
:
"DCD2B815-345D-4600-BAFD-BE26925C60E6"
,
"nodeType"
:
"Color"
,
"r"
:
0
,
"g"
:
0
,
"b"
:
0
},
"5E1EEAA6-F057-4D5F-8607-E9F8265D2B0A"
:{
"uuid"
:
"5E1EEAA6-F057-4D5F-8607-E9F8265D2B0A"
,
"nodeType"
:
"Float"
,
"value"
:
30
},
"BF320EA1-F523-4314-9B87-07E33F39CC6C"
:{
"uuid"
:
"BF320EA1-F523-4314-9B87-07E33F39CC6C"
,
"nodeType"
:
"Math3"
,
"a"
:
"F9EA5DC0-2BC8-4C38-A480-1DA3D0680AAE"
,
"b"
:
"65010573-EE24-42A3-B32C-3945F3CF2E93"
,
"c"
:
"ABD03824-B7F8-46A4-9006-03FBA06618A9"
,
"method"
:
"mix"
},
"F9EA5DC0-2BC8-4C38-A480-1DA3D0680AAE"
:{
"uuid"
:
"F9EA5DC0-2BC8-4C38-A480-1DA3D0680AAE"
,
"nodeType"
:
"Color"
,
"r"
:
0
,
"g"
:
0.32941176470588235
,
"b"
:
0.8745098039215686
},
"65010573-EE24-42A3-B32C-3945F3CF2E93"
:{
"uuid"
:
"65010573-EE24-42A3-B32C-3945F3CF2E93"
,
"nodeType"
:
"Color"
,
"r"
:
1
,
"g"
:
1
,
"b"
:
1
}},
"materials"
:{
"BCB86F69-822F-4F9C-838B-70F657904D05"
:{
"uuid"
:
"BCB86F69-822F-4F9C-838B-70F657904D05"
,
"type"
:
"PhongNodeMaterial"
,
"fog"
:
false
,
"lights"
:
true
,
"vertex"
:
"A9543A4D-4036-4AB3-AEF1-0AE10CFDD4A6"
,
"fragment"
:
"A9543A4D-4036-4AB3-AEF1-0AE10CFDD4A6"
}},
"material"
:
"BCB86F69-822F-4F9C-838B-70F657904D05"
}
\ No newline at end of file
examples/nodes/wave.json
浏览文件 @
231a8a63
{
"nodes"
:{
"6BB91CE5-93BA-41BF-88C6-8D03721D4790"
:{
"uuid"
:
"6BB91CE5-93BA-41BF-88C6-8D03721D4790"
,
"nodeType"
:
"Phong"
,
"transform"
:
"39ED31F8-337B-49A4-9DBE-B43B1F5D180B"
,
"color"
:
"1628C697-A4FC-4F02-9746-1CFAC6C6E85B"
,
"specular"
:
"D730CA9D-A641-4289-BEF8-348CDD7218B6"
,
"shininess"
:
"73E26FEC-C8C2-4E9E-8A4A-209A88156348"
},
"39ED31F8-337B-49A4-9DBE-B43B1F5D180B"
:{
"uuid"
:
"39ED31F8-337B-49A4-9DBE-B43B1F5D180B"
,
"nodeType"
:
"Operator"
,
"a"
:
"28F9F474-E77F-4373-BA46-D39F8588A56B"
,
"b"
:
"B792813E-FC18-4440-8256-E4030E9D7E3A"
,
"op"
:
"+"
},
"28F9F474-E77F-4373-BA46-D39F8588A56B"
:{
"uuid"
:
"28F9F474-E77F-4373-BA46-D39F8588A56B"
,
"nodeType"
:
"Position"
,
"scope"
:
"local"
},
"B792813E-FC18-4440-8256-E4030E9D7E3A"
:{
"uuid"
:
"B792813E-FC18-4440-8256-E4030E9D7E3A"
,
"nodeType"
:
"Join"
,
"inputs"
:{
"x"
:
"F84376EF-6595-4A0F-AE1C-C183AE4D6392"
,
"y"
:
"B7A4178E-D407-4444-9633-741A8C2DAD09"
,
"z"
:
"F5785794-4DB6-47F6-AAB6-78DFC896B782"
}},
"F84376EF-6595-4A0F-AE1C-C183AE4D6392"
:{
"uuid"
:
"F84376EF-6595-4A0F-AE1C-C183AE4D6392"
,
"nodeType"
:
"Float"
,
"value"
:
0
},
"B7A4178E-D407-4444-9633-741A8C2DAD09"
:{
"uuid"
:
"B7A4178E-D407-4444-9633-741A8C2DAD09"
,
"nodeType"
:
"Operator"
,
"a"
:
"526B9B70-CBA1-47E4-9CEF-0CE5A9C4F041"
,
"b"
:
"0A80D285-164D-4857-B8B9-30CE5CEC6931"
,
"op"
:
"*"
},
"526B9B70-CBA1-47E4-9CEF-0CE5A9C4F041"
:{
"uuid"
:
"526B9B70-CBA1-47E4-9CEF-0CE5A9C4F041"
,
"nodeType"
:
"Switch"
,
"node"
:
"575F9E64-5B6D-4A95-9522-3A27919165BF"
,
"components"
:
"x"
},
"575F9E64-5B6D-4A95-9522-3A27919165BF"
:{
"uuid"
:
"575F9E64-5B6D-4A95-9522-3A27919165BF"
,
"nodeType"
:
"Math1"
,
"a"
:
"4EF09677-828F-4164-BE18-2E8E87A3E969"
,
"method"
:
"sin"
},
"4EF09677-828F-4164-BE18-2E8E87A3E969"
:{
"uuid"
:
"4EF09677-828F-4164-BE18-2E8E87A3E969"
,
"nodeType"
:
"Operator"
,
"a"
:
"DA817C54-9793-4850-9B90-A087050C6335"
,
"b"
:
"CE06CC57-FAFF-4EF7-A0E3-1D71ED0A4EFD"
,
"op"
:
"+"
},
"DA817C54-9793-4850-9B90-A087050C6335"
:{
"uuid"
:
"DA817C54-9793-4850-9B90-A087050C6335"
,
"nodeType"
:
"Operator"
,
"a"
:
"87304A41-2F18-4A98-92F1-9869F01786D3"
,
"b"
:
"ECE889D2-A244-49EF-9ECF-BB685CD84828"
,
"op"
:
"*"
},
"87304A41-2F18-4A98-92F1-9869F01786D3"
:{
"uuid"
:
"87304A41-2F18-4A98-92F1-9869F01786D3"
,
"nodeType"
:
"Position"
,
"scope"
:
"local"
},
"ECE889D2-A244-49EF-9ECF-BB685CD84828"
:{
"uuid"
:
"ECE889D2-A244-49EF-9ECF-BB685CD84828"
,
"nodeType"
:
"Float"
,
"value"
:
0.4
},
"CE06CC57-FAFF-4EF7-A0E3-1D71ED0A4EFD"
:{
"uuid"
:
"CE06CC57-FAFF-4EF7-A0E3-1D71ED0A4EFD"
,
"nodeType"
:
"Operator"
,
"a"
:
"D035D8DE-7C30-4372-A5E5-9A03169CFA96"
,
"b"
:
"2090FF81-9723-4F1F-BF10-2F223F879DA5"
,
"op"
:
"*"
},
"D035D8DE-7C30-4372-A5E5-9A03169CFA96"
:{
"uuid"
:
"D035D8DE-7C30-4372-A5E5-9A03169CFA96"
,
"nodeType"
:
"Timer"
,
"name"
:
"time"
,
"scope"
:
"global"
,
"scale"
:
1
,
"useTimeScale"
:
false
},
"2090FF81-9723-4F1F-BF10-2F223F879DA5"
:{
"uuid"
:
"2090FF81-9723-4F1F-BF10-2F223F879DA5"
,
"nodeType"
:
"Float"
,
"name"
:
"speed"
,
"value"
:
5
},
"0A80D285-164D-4857-B8B9-30CE5CEC6931"
:{
"uuid"
:
"0A80D285-164D-4857-B8B9-30CE5CEC6931"
,
"nodeType"
:
"Float"
,
"value"
:
1
},
"F5785794-4DB6-47F6-AAB6-78DFC896B782"
:{
"uuid"
:
"F5785794-4DB6-47F6-AAB6-78DFC896B782"
,
"nodeType"
:
"Float"
,
"value"
:
0
},
"1628C697-A4FC-4F02-9746-1CFAC6C6E85B"
:{
"uuid"
:
"1628C697-A4FC-4F02-9746-1CFAC6C6E85B"
,
"nodeType"
:
"Math3"
,
"a"
:
"48DEB7D7-83ED-4679-BB0B-45A11052AA5F"
,
"b"
:
"8C0EACD5-DEA2-431B-B083-06FB93DB7D2A"
,
"c"
:
"526B9B70-CBA1-47E4-9CEF-0CE5A9C4F041"
,
"method"
:
"mix"
},
"48DEB7D7-83ED-4679-BB0B-45A11052AA5F"
:{
"uuid"
:
"48DEB7D7-83ED-4679-BB0B-45A11052AA5F"
,
"nodeType"
:
"Color"
,
"r"
:
0
,
"g"
:
0.32941176470588235
,
"b"
:
0.8745098039215686
},
"8C0EACD5-DEA2-431B-B083-06FB93DB7D2A"
:{
"uuid"
:
"8C0EACD5-DEA2-431B-B083-06FB93DB7D2A"
,
"nodeType"
:
"Color"
,
"r"
:
1
,
"g"
:
1
,
"b"
:
1
},
"D730CA9D-A641-4289-BEF8-348CDD7218B6"
:{
"uuid"
:
"D730CA9D-A641-4289-BEF8-348CDD7218B6"
,
"nodeType"
:
"Color"
,
"r"
:
0.06666666666666667
,
"g"
:
0.06666666666666667
,
"b"
:
0.06666666666666667
},
"73E26FEC-C8C2-4E9E-8A4A-209A88156348"
:{
"uuid"
:
"73E26FEC-C8C2-4E9E-8A4A-209A88156348"
,
"nodeType"
:
"Float"
,
"value"
:
30
}},
"materials"
:{
"7DCC94F3-82FE-4A67-B5DB-8ACE85789BAA"
:{
"uuid"
:
"7DCC94F3-82FE-4A67-B5DB-8ACE85789BAA"
,
"type"
:
"PhongNodeMaterial"
,
"fog"
:
false
,
"lights"
:
true
,
"vertex"
:
"6BB91CE5-93BA-41BF-88C6-8D03721D4790"
,
"fragment"
:
"6BB91CE5-93BA-41BF-88C6-8D03721D4790"
}},
"material"
:
"7DCC94F3-82FE-4A67-B5DB-8ACE85789BAA"
}
\ No newline at end of file
{
"nodes"
:{
"6BB91CE5-93BA-41BF-88C6-8D03721D4790"
:{
"uuid"
:
"6BB91CE5-93BA-41BF-88C6-8D03721D4790"
,
"nodeType"
:
"Phong"
,
"position"
:
"39ED31F8-337B-49A4-9DBE-B43B1F5D180B"
,
"color"
:
"1628C697-A4FC-4F02-9746-1CFAC6C6E85B"
,
"specular"
:
"D730CA9D-A641-4289-BEF8-348CDD7218B6"
,
"shininess"
:
"73E26FEC-C8C2-4E9E-8A4A-209A88156348"
},
"39ED31F8-337B-49A4-9DBE-B43B1F5D180B"
:{
"uuid"
:
"39ED31F8-337B-49A4-9DBE-B43B1F5D180B"
,
"nodeType"
:
"Operator"
,
"a"
:
"28F9F474-E77F-4373-BA46-D39F8588A56B"
,
"b"
:
"B792813E-FC18-4440-8256-E4030E9D7E3A"
,
"op"
:
"+"
},
"28F9F474-E77F-4373-BA46-D39F8588A56B"
:{
"uuid"
:
"28F9F474-E77F-4373-BA46-D39F8588A56B"
,
"nodeType"
:
"Position"
,
"scope"
:
"local"
},
"B792813E-FC18-4440-8256-E4030E9D7E3A"
:{
"uuid"
:
"B792813E-FC18-4440-8256-E4030E9D7E3A"
,
"nodeType"
:
"Join"
,
"inputs"
:{
"x"
:
"F84376EF-6595-4A0F-AE1C-C183AE4D6392"
,
"y"
:
"B7A4178E-D407-4444-9633-741A8C2DAD09"
,
"z"
:
"F5785794-4DB6-47F6-AAB6-78DFC896B782"
}},
"F84376EF-6595-4A0F-AE1C-C183AE4D6392"
:{
"uuid"
:
"F84376EF-6595-4A0F-AE1C-C183AE4D6392"
,
"nodeType"
:
"Float"
,
"value"
:
0
},
"B7A4178E-D407-4444-9633-741A8C2DAD09"
:{
"uuid"
:
"B7A4178E-D407-4444-9633-741A8C2DAD09"
,
"nodeType"
:
"Operator"
,
"a"
:
"526B9B70-CBA1-47E4-9CEF-0CE5A9C4F041"
,
"b"
:
"0A80D285-164D-4857-B8B9-30CE5CEC6931"
,
"op"
:
"*"
},
"526B9B70-CBA1-47E4-9CEF-0CE5A9C4F041"
:{
"uuid"
:
"526B9B70-CBA1-47E4-9CEF-0CE5A9C4F041"
,
"nodeType"
:
"Switch"
,
"node"
:
"575F9E64-5B6D-4A95-9522-3A27919165BF"
,
"components"
:
"x"
},
"575F9E64-5B6D-4A95-9522-3A27919165BF"
:{
"uuid"
:
"575F9E64-5B6D-4A95-9522-3A27919165BF"
,
"nodeType"
:
"Math1"
,
"a"
:
"4EF09677-828F-4164-BE18-2E8E87A3E969"
,
"method"
:
"sin"
},
"4EF09677-828F-4164-BE18-2E8E87A3E969"
:{
"uuid"
:
"4EF09677-828F-4164-BE18-2E8E87A3E969"
,
"nodeType"
:
"Operator"
,
"a"
:
"DA817C54-9793-4850-9B90-A087050C6335"
,
"b"
:
"CE06CC57-FAFF-4EF7-A0E3-1D71ED0A4EFD"
,
"op"
:
"+"
},
"DA817C54-9793-4850-9B90-A087050C6335"
:{
"uuid"
:
"DA817C54-9793-4850-9B90-A087050C6335"
,
"nodeType"
:
"Operator"
,
"a"
:
"87304A41-2F18-4A98-92F1-9869F01786D3"
,
"b"
:
"ECE889D2-A244-49EF-9ECF-BB685CD84828"
,
"op"
:
"*"
},
"87304A41-2F18-4A98-92F1-9869F01786D3"
:{
"uuid"
:
"87304A41-2F18-4A98-92F1-9869F01786D3"
,
"nodeType"
:
"Position"
,
"scope"
:
"local"
},
"ECE889D2-A244-49EF-9ECF-BB685CD84828"
:{
"uuid"
:
"ECE889D2-A244-49EF-9ECF-BB685CD84828"
,
"nodeType"
:
"Float"
,
"value"
:
0.4
},
"CE06CC57-FAFF-4EF7-A0E3-1D71ED0A4EFD"
:{
"uuid"
:
"CE06CC57-FAFF-4EF7-A0E3-1D71ED0A4EFD"
,
"nodeType"
:
"Operator"
,
"a"
:
"D035D8DE-7C30-4372-A5E5-9A03169CFA96"
,
"b"
:
"2090FF81-9723-4F1F-BF10-2F223F879DA5"
,
"op"
:
"*"
},
"D035D8DE-7C30-4372-A5E5-9A03169CFA96"
:{
"uuid"
:
"D035D8DE-7C30-4372-A5E5-9A03169CFA96"
,
"nodeType"
:
"Timer"
,
"name"
:
"time"
,
"scope"
:
"global"
,
"scale"
:
1
,
"useTimeScale"
:
false
},
"2090FF81-9723-4F1F-BF10-2F223F879DA5"
:{
"uuid"
:
"2090FF81-9723-4F1F-BF10-2F223F879DA5"
,
"nodeType"
:
"Float"
,
"name"
:
"speed"
,
"value"
:
5
},
"0A80D285-164D-4857-B8B9-30CE5CEC6931"
:{
"uuid"
:
"0A80D285-164D-4857-B8B9-30CE5CEC6931"
,
"nodeType"
:
"Float"
,
"value"
:
1
},
"F5785794-4DB6-47F6-AAB6-78DFC896B782"
:{
"uuid"
:
"F5785794-4DB6-47F6-AAB6-78DFC896B782"
,
"nodeType"
:
"Float"
,
"value"
:
0
},
"1628C697-A4FC-4F02-9746-1CFAC6C6E85B"
:{
"uuid"
:
"1628C697-A4FC-4F02-9746-1CFAC6C6E85B"
,
"nodeType"
:
"Math3"
,
"a"
:
"48DEB7D7-83ED-4679-BB0B-45A11052AA5F"
,
"b"
:
"8C0EACD5-DEA2-431B-B083-06FB93DB7D2A"
,
"c"
:
"526B9B70-CBA1-47E4-9CEF-0CE5A9C4F041"
,
"method"
:
"mix"
},
"48DEB7D7-83ED-4679-BB0B-45A11052AA5F"
:{
"uuid"
:
"48DEB7D7-83ED-4679-BB0B-45A11052AA5F"
,
"nodeType"
:
"Color"
,
"r"
:
0
,
"g"
:
0.32941176470588235
,
"b"
:
0.8745098039215686
},
"8C0EACD5-DEA2-431B-B083-06FB93DB7D2A"
:{
"uuid"
:
"8C0EACD5-DEA2-431B-B083-06FB93DB7D2A"
,
"nodeType"
:
"Color"
,
"r"
:
1
,
"g"
:
1
,
"b"
:
1
},
"D730CA9D-A641-4289-BEF8-348CDD7218B6"
:{
"uuid"
:
"D730CA9D-A641-4289-BEF8-348CDD7218B6"
,
"nodeType"
:
"Color"
,
"r"
:
0.06666666666666667
,
"g"
:
0.06666666666666667
,
"b"
:
0.06666666666666667
},
"73E26FEC-C8C2-4E9E-8A4A-209A88156348"
:{
"uuid"
:
"73E26FEC-C8C2-4E9E-8A4A-209A88156348"
,
"nodeType"
:
"Float"
,
"value"
:
30
}},
"materials"
:{
"7DCC94F3-82FE-4A67-B5DB-8ACE85789BAA"
:{
"uuid"
:
"7DCC94F3-82FE-4A67-B5DB-8ACE85789BAA"
,
"type"
:
"PhongNodeMaterial"
,
"fog"
:
false
,
"lights"
:
true
,
"vertex"
:
"6BB91CE5-93BA-41BF-88C6-8D03721D4790"
,
"fragment"
:
"6BB91CE5-93BA-41BF-88C6-8D03721D4790"
}},
"material"
:
"7DCC94F3-82FE-4A67-B5DB-8ACE85789BAA"
}
\ No newline at end of file
examples/webgl_materials_nodes.html
浏览文件 @
231a8a63
...
...
@@ -291,7 +291,7 @@
//mtl.light = // input/output light (vec3)
//mtl.environment = // reflection/refraction (vec3)
//mtl.environmentAlpha = // environment alpha (float)
//mtl.
transform = // vertex transforma
tion (vec3)
//mtl.
position = // vertex local posi
tion (vec3)
var
mask
=
new
THREE
.
SwitchNode
(
new
THREE
.
TextureNode
(
getTexture
(
"
decalDiffuse
"
)
),
'
w
'
);
...
...
@@ -322,7 +322,7 @@
//mtl.light = // custom-light (vec3)
//mtl.ao = // ambient occlusion (float)
//mtl.environment = // reflection/refraction (vec3)
//mtl.
transform = // vertex transforma
tion (vec3)
//mtl.
position = // vertex local posi
tion (vec3)
var
mask
=
new
THREE
.
SwitchNode
(
new
THREE
.
TextureNode
(
getTexture
(
"
decalDiffuse
"
)
),
'
w
'
);
...
...
@@ -497,7 +497,7 @@
//mtl.light = // custom-light (vec3)
//mtl.ao = // ambient occlusion (float)
//mtl.environment = // reflection/refraction (vec3)
//mtl.
transform = // vertex transforma
tion (vec3)
//mtl.
position = // vertex local posi
tion (vec3)
var
mask
=
new
THREE
.
SwitchNode
(
new
THREE
.
TextureNode
(
getTexture
(
"
decalDiffuse
"
)
),
'
w
'
);
...
...
@@ -671,7 +671,7 @@
);
mtl
.
color
=
color
;
mtl
.
transform
=
blend
;
mtl
.
position
=
blend
;
// GUI
...
...
@@ -1250,7 +1250,7 @@
mtl
.
color
=
mtl
.
specular
=
new
THREE
.
ColorNode
(
0
);
mtl
.
emissive
=
color
;
mtl
.
transform
=
blend
;
mtl
.
position
=
blend
;
// GUI
...
...
@@ -1605,7 +1605,7 @@
);
mtl
.
color
=
colors
;
mtl
.
transform
=
softPosition
;
mtl
.
position
=
softPosition
;
// GUI
...
...
@@ -1945,8 +1945,8 @@
mtl
.
color
=
new
THREE
.
ExpressionNode
(
"
myCustomUv + (sin(time*speed)*.5) + (position * .05)
"
,
"
vec3
"
);
mtl
.
color
.
keywords
[
"
speed
"
]
=
speed
;
mtl
.
transform
=
new
THREE
.
ExpressionNode
(
"
mod(time*speed,1.0) < 0.5 ? position + (worldNormal*(1.0+sin(time*speed*1.0))*3.0) : position + sin( position.x * sin(time*speed*2.0))
"
,
"
vec3
"
);
mtl
.
transform
.
keywords
[
"
speed
"
]
=
speed
;
mtl
.
position
=
new
THREE
.
ExpressionNode
(
"
mod(time*speed,1.0) < 0.5 ? position + (worldNormal*(1.0+sin(time*speed*1.0))*3.0) : position + sin( position.x * sin(time*speed*2.0))
"
,
"
vec3
"
);
mtl
.
position
.
keywords
[
"
speed
"
]
=
speed
;
// add global keyword ( variable or const )
THREE
.
NodeLib
.
addKeyword
(
'
myCustomUv
'
,
function
(
builder
)
{
...
...
@@ -2010,16 +2010,16 @@
var
varying
=
new
THREE
.
VarNode
(
"
vec3
"
);
varying
.
value
=
new
THREE
.
NormalNode
(
THREE
.
NormalNode
.
VIEW
);
// using BypassNode the NormalNode not apply the value in .
transform
slot
// using BypassNode the NormalNode not apply the value in .
position
slot
// but set the NormalNode value in VarNode
// it can be useful to send values between vertex to fragment shader
// without affect vertex shader
mtl
.
transform
=
new
THREE
.
BypassNode
(
varying
);
mtl
.
position
=
new
THREE
.
BypassNode
(
varying
);
mtl
.
color
=
varying
;
// you can also set a independent value in .
transform
slot using BypassNode
// you can also set a independent value in .
position
slot using BypassNode
// such this expression using ExpressionNode
mtl
.
transform
.
value
=
new
THREE
.
ExpressionNode
(
"
position * ( .1 + abs( sin( time ) ) )
"
,
"
vec3
"
);
mtl
.
position
.
value
=
new
THREE
.
ExpressionNode
(
"
position * ( .1 + abs( sin( time ) ) )
"
,
"
vec3
"
);
break
;
...
...
@@ -2045,12 +2045,12 @@
// add keyword
setMyVar
.
keywords
[
"
myVar
"
]
=
varying
;
var
transform
=
new
THREE
.
ExpressionNode
(
"
setMyVar( position * .1 )
"
,
"
vec3
"
);
transform
.
includes
=
[
setMyVar
];
transform
.
keywords
[
"
tex
"
]
=
new
THREE
.
TextureNode
(
getTexture
(
"
brick
"
)
);
var
position
=
new
THREE
.
ExpressionNode
(
"
setMyVar( position * .1 )
"
,
"
vec3
"
);
position
.
includes
=
[
setMyVar
];
position
.
keywords
[
"
tex
"
]
=
new
THREE
.
TextureNode
(
getTexture
(
"
brick
"
)
);
// use BypassNode to "void" functions
mtl
.
transform
=
new
THREE
.
BypassNode
(
transform
);
mtl
.
position
=
new
THREE
.
BypassNode
(
position
);
// FRAGMENT
...
...
examples/webgl_sprites_nodes.html
浏览文件 @
231a8a63
...
...
@@ -152,7 +152,7 @@
sprite2
.
material
.
color
=
new
THREE
.
Math1Node
(
sprite2
.
material
.
color
,
THREE
.
Math1Node
.
INVERT
);
sprite2
.
material
.
spherical
=
false
;
// look at camera horizontally only, very used to vegetation
// horizontal zigzag sprite
sprite2
.
material
.
transform
=
new
THREE
.
OperatorNode
(
sprite2
.
material
.
position
=
new
THREE
.
OperatorNode
(
new
THREE
.
OperatorNode
(
new
THREE
.
Math1Node
(
new
THREE
.
TimerNode
(
3
),
THREE
.
Math1Node
.
SIN
),
// 3 is speed (time scale)
new
THREE
.
Vector2Node
(
.
3
,
0
),
// horizontal scale (position)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录