Kaynağa Gözat

Playground: UVEditor and remove nodes for programmers (#26345)

sunag 2 yıl önce
ebeveyn
işleme
c14136947a
2 değiştirilmiş dosya ile 3 ekleme ve 85 silme
  1. 0 84
      playground/Nodes.json
  2. 3 1
      playground/editors/UVEditor.js

+ 0 - 84
playground/Nodes.json

@@ -89,90 +89,6 @@
 						}
 					]
 				},
-				{
-					"name": "Material Elements",
-					"icon": "circles-filled",
-					"children": [
-						{
-							"name": "Material Alpha Test",
-							"icon": "circle-filled",
-							"description": "Return the `alphaTest` value of the Material.",
-							"nodeType": "float",
-							"shaderNode": "materialAlphaTest"
-						},
-						{
-							"name": "Material Color",
-							"icon": "circle-filled",
-							"description": "Return the `emissive * emissiveMap` value of the Material",
-							"nodeType": "color",
-							"shaderNode": "materialColor"
-						},
-						{
-							"name": "Material Emissive",
-							"icon": "circle-filled",
-							"description": "Return the `emissive * emissiveMap` value of the Material.",
-							"nodeType": "color",
-							"shaderNode": "materialEmissive"
-						},
-						{
-							"name": "Material Metalness",
-							"icon": "circle-filled",
-							"description": "Return the `metalness * metalnessMap.b` value of the Material.",
-							"nodeType": "float",
-							"shaderNode": "materialMetalness"
-						},
-						{
-							"name": "Material Normal",
-							"icon": "circle-filled",
-							"nodeType": "float",
-							"shaderNode": "materialNormal"
-						},
-						{
-							"name": "Material Opacity",
-							"icon": "circle-filled",
-							"description": "Return the `opacity * alphaMap` value of the Material.",
-							"nodeType": "float",
-							"shaderNode": "materialOpacity"
-						},
-						{
-							"name": "Material Reflectivity",
-							"icon": "circle-filled",
-							"nodeType": "float",
-							"shaderNode": "materialReflectivity"
-						},
-						{
-							"name": "Material Rotation",
-							"icon": "circle-filled",
-							"nodeType": "float",
-							"shaderNode": "materialRotation"
-						},
-						{
-							"name": "Material Roughness",
-							"icon": "circle-filled",
-							"description": "Return the `roughness * roughnessMap.g` value of the Material.",
-							"nodeType": "float",
-							"shaderNode": "materialRoughness"
-						},
-						{
-							"name": "Material Shininess",
-							"icon": "circle-filled",
-							"nodeType": "float",
-							"shaderNode": "materialShininess"
-						},
-						{
-							"name": "Material Specular Color",
-							"icon": "circle-filled",
-							"nodeType": "color",
-							"shaderNode": "materialSpecularColor"
-						},
-						{
-							"name": "Material UV",
-							"icon": "circle-filled",
-							"nodeType": "vec2",
-							"shaderNode": "materialUV"
-						}
-					]
-				},
 				{
 					"name": "Normal",
 					"icon": "arrow-bar-up",

+ 3 - 1
playground/editors/UVEditor.js

@@ -12,7 +12,9 @@ export class UVEditor extends BaseNodeEditor {
 
 		this.setOutputLength( 2 );
 
-		const optionsField = new SelectInput( [ '1', '2' ], 0 ).onChange( () => {
+		const options = Array.from( Array( 4 ).keys() ).map( String );
+
+		const optionsField = new SelectInput( options, 0 ).onChange( () => {
 
 			node.index = Number( optionsField.getValue() );