提交 4f71b42f 编写于 作者: S sunag

2 single node examples

上级 878dca08
......@@ -192,6 +192,8 @@
'adv / expression': 'expression',
'adv / sss': 'sss',
'adv / translucent': 'translucent',
'node / position': 'node-position',
'node / normal': 'node-normal',
'misc / smoke': 'smoke',
'misc / firefly': 'firefly',
'misc / reserved-keywords': 'reserved-keywords',
......@@ -2039,6 +2041,56 @@
break;
case 'node-position':
// MATERIAL
var node = new THREE.PositionNode();
mtl = new THREE.PhongNodeMaterial();
mtl.color = node;
// GUI
addGui( 'scope', {
local: THREE.PositionNode.LOCAL,
world: THREE.PositionNode.WORLD,
view: THREE.PositionNode.VIEW
}, function ( val ) {
node.scope = val;
mtl.needsUpdate = true;
} );
break;
case 'node-normal':
// MATERIAL
var node = new THREE.NormalNode();
mtl = new THREE.PhongNodeMaterial();
mtl.color = node;
// GUI
addGui( 'scope', {
local: THREE.NormalNode.LOCAL,
world: THREE.NormalNode.WORLD,
view: THREE.NormalNode.VIEW
}, function ( val ) {
node.scope = val;
mtl.needsUpdate = true;
} );
break;
case 'varying':
// MATERIAL
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册