Browse Source

UVNode: Rename .value to .index (#23335)

* UVNode: rename .value to .index

* update rename: .value to .index
sunag 3 years ago
parent
commit
3a41724f61

+ 1 - 1
examples/jsm/node-editor/accessors/UVEditor.js

@@ -12,7 +12,7 @@ export class UVEditor extends BaseNode {
 
 		const optionsField = new SelectInput( [ '1', '2' ], 0 ).onChange( () => {
 
-			node.value = Number( optionsField.getValue() );
+			node.index = Number( optionsField.getValue() );
 
 			this.invalidate();
 

+ 4 - 4
examples/jsm/renderers/nodes/accessors/UVNode.js

@@ -2,19 +2,19 @@ import AttributeNode from '../core/AttributeNode.js';
 
 class UVNode extends AttributeNode {
 
-	constructor( value = 0 ) {
+	constructor( index = 0 ) {
 
 		super( null, 'vec2' );
 
-		this.value = value;
+		this.index = index;
 
 	}
 
 	getAttributeName( /*builder*/ ) {
 
-		const value = this.value;
+		const index = this.index;
 
-		return 'uv' + ( value > 0 ? value + 1 : '' );
+		return 'uv' + ( index > 0 ? index + 1 : '' );
 
 	}