From c14136947ae5e8518c4a2e0f94070965e6af8fb1 Mon Sep 17 00:00:00 2001 From: sunag Date: Wed, 28 Jun 2023 18:48:05 -0300 Subject: [PATCH] Playground: UVEditor and remove nodes for programmers (#26345) --- playground/Nodes.json | 84 ---------------------------------- playground/editors/UVEditor.js | 4 +- 2 files changed, 3 insertions(+), 85 deletions(-) diff --git a/playground/Nodes.json b/playground/Nodes.json index 9d694323b4d7c4..8712c13e37d6bd 100644 --- a/playground/Nodes.json +++ b/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", diff --git a/playground/editors/UVEditor.js b/playground/editors/UVEditor.js index 61ca767653380a..1ceea705192073 100644 --- a/playground/editors/UVEditor.js +++ b/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() );