浏览代码

fix default scope NormalNode.LOCAL

sunag 4 年之前
父节点
当前提交
09b36f444e
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 2 2
      examples/jsm/renderers/nodes/accessors/NormalNode.js
  2. 4 4
      examples/webgpu_nodes.html

+ 2 - 2
examples/jsm/renderers/nodes/accessors/NormalNode.js

@@ -8,11 +8,11 @@ import MathNode from '../math/MathNode.js';
 
 class NormalNode extends Node {
 
-	static VIEW = 'view';
 	static LOCAL = 'local';
 	static WORLD = 'world';
+	static VIEW = 'view';
 
-	constructor( scope = NormalNode.VIEW ) {
+	constructor( scope = NormalNode.LOCAL ) {
 
 		super( 'vec3' );
 

+ 4 - 4
examples/webgpu_nodes.html

@@ -133,14 +133,14 @@
 
 					case 'normal':
 
-						const normalNode = new NormalNode( NormalNode.VIEW );
+						const normalNode = new NormalNode( NormalNode.LOCAL );
 
 						material.colorNode = normalNode;
 
-						addGui( 'scope', {
-							view: NormalNode.VIEW,
+						addGui( 'scope', {							
 							local: NormalNode.LOCAL,
-							world: NormalNode.WORLD
+							world: NormalNode.WORLD,
+							view: NormalNode.VIEW
 						}, function ( val ) {
 
 							normalNode.scope = val;