use of com.gempukku.libgdx.graph.ui.graph.property.TextureSettingsGraphBoxPart in project gdx-graph by MarcinSc.
the class PropertyShaderGraphBoxProducer method createPipelineGraphBox.
@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
final String name = data.getString("name");
final String propertyType = data.getString("type");
GraphBoxImpl result = new GraphBoxImpl(id, new PropertyNodeConfiguration(name, propertyType)) {
@Override
public JsonValue getData() {
JsonValue result = super.getData();
if (result == null)
result = new JsonValue(JsonValue.ValueType.object);
result.addChild("name", new JsonValue(name));
result.addChild("type", new JsonValue(propertyType));
return result;
}
};
result.addOutputGraphPart(new ValueGraphNodeOutput(name, propertyType));
if (ShaderFieldTypeRegistry.findShaderFieldType(propertyType).isTexture()) {
TextureSettingsGraphBoxPart textureSettings = new TextureSettingsGraphBoxPart();
textureSettings.initialize(data);
result.addGraphBoxPart(textureSettings);
}
return result;
}
use of com.gempukku.libgdx.graph.ui.graph.property.TextureSettingsGraphBoxPart in project gdx-graph by MarcinSc.
the class SceneColorShaderBoxProducer method createPipelineGraphBox.
@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
GraphBoxImpl result = createGraphBox(id);
addConfigurationInputsAndOutputs(result);
TextureSettingsGraphBoxPart textureSettingsPart = new TextureSettingsGraphBoxPart();
textureSettingsPart.initialize(data);
result.addGraphBoxPart(textureSettingsPart);
return result;
}
Aggregations