Search in sources :

Example 1 with GraphNode

use of com.gempukku.libgdx.graph.data.GraphNode in project gdx-graph by MarcinSc.

the class EndShadowShaderBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    final ModelShaderPreviewBoxPart previewBoxPart = new ModelShaderPreviewBoxPart();
    previewBoxPart.initialize(data);
    GraphBoxImpl result = new GraphBoxImpl(id, getConfiguration()) {

        @Override
        public void graphChanged(GraphChangedEvent event, boolean hasErrors, Graph<? extends GraphNode, ? extends GraphConnection, ? extends GraphProperty> graph) {
            if (event.isData() || event.isStructure()) {
                previewBoxPart.graphChanged(hasErrors, graph);
            }
        }
    };
    SelectBoxPart positionType = new SelectBoxPart("Position", "positionType", "Object space", "World space");
    positionType.initialize(data);
    result.addGraphBoxPart(positionType);
    addConfigurationInputsAndOutputs(result);
    EnumSelectBoxPart cullingBox = new EnumSelectBoxPart("Culling", "culling", new StringifyEnum<BasicShader.Culling>(), BasicShader.Culling.values());
    cullingBox.initialize(data);
    result.addGraphBoxPart(cullingBox);
    EnumSelectBoxPart depthTestBox = new EnumSelectBoxPart("DepthTest", "depthTest", new StringifyEnum<BasicShader.DepthTesting>(), BasicShader.DepthTesting.values());
    depthTestBox.initialize(data);
    result.addGraphBoxPart(depthTestBox);
    CheckboxBoxPart writeDepthBox = new CheckboxBoxPart("Write depth", "depthWrite");
    writeDepthBox.initialize(data);
    result.addGraphBoxPart(writeDepthBox);
    result.addGraphBoxPart(previewBoxPart);
    return result;
}
Also used : GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) GraphChangedEvent(com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent) CheckboxBoxPart(com.gempukku.libgdx.graph.ui.part.CheckboxBoxPart) EnumSelectBoxPart(com.gempukku.libgdx.graph.ui.part.EnumSelectBoxPart) SelectBoxPart(com.gempukku.libgdx.graph.ui.part.SelectBoxPart) GraphNode(com.gempukku.libgdx.graph.data.GraphNode) ModelShaderPreviewBoxPart(com.gempukku.libgdx.graph.plugin.models.design.producer.ModelShaderPreviewBoxPart) GraphProperty(com.gempukku.libgdx.graph.data.GraphProperty) Graph(com.gempukku.libgdx.graph.data.Graph) GraphConnection(com.gempukku.libgdx.graph.data.GraphConnection) EnumSelectBoxPart(com.gempukku.libgdx.graph.ui.part.EnumSelectBoxPart)

Example 2 with GraphNode

use of com.gempukku.libgdx.graph.data.GraphNode in project gdx-graph by MarcinSc.

the class EndModelShaderBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    final ModelShaderPreviewBoxPart previewBoxPart = new ModelShaderPreviewBoxPart();
    previewBoxPart.initialize(data);
    GraphBoxImpl result = new GraphBoxImpl(id, getConfiguration()) {

        @Override
        public void graphChanged(GraphChangedEvent event, boolean hasErrors, Graph<? extends GraphNode, ? extends GraphConnection, ? extends GraphProperty> graph) {
            if (event.isData() || event.isStructure()) {
                previewBoxPart.graphChanged(hasErrors, graph);
            }
        }
    };
    SelectBoxPart positionType = new SelectBoxPart("Position", "positionType", "Object space", "World space");
    positionType.initialize(data);
    result.addGraphBoxPart(positionType);
    addConfigurationInputsAndOutputs(result);
    result.addGraphBoxPart(new SectionBoxPart("Rendering config"));
    EnumSelectBoxPart cullingBox = new EnumSelectBoxPart("Culling", "culling", new StringifyEnum<BasicShader.Culling>(), BasicShader.Culling.values());
    cullingBox.initialize(data);
    result.addGraphBoxPart(cullingBox);
    BlendingBoxPart blendingBox = new BlendingBoxPart();
    blendingBox.initialize(data);
    result.addGraphBoxPart(blendingBox);
    EnumSelectBoxPart depthTestBox = new EnumSelectBoxPart("DepthTest", "depthTest", new StringifyEnum<BasicShader.DepthTesting>(), BasicShader.DepthTesting.values());
    depthTestBox.initialize(data);
    result.addGraphBoxPart(depthTestBox);
    CheckboxBoxPart writeDepthBox = new CheckboxBoxPart("Write depth", "depthWrite");
    writeDepthBox.initialize(data);
    result.addGraphBoxPart(writeDepthBox);
    result.addGraphBoxPart(new SectionBoxPart("Preview"));
    result.addGraphBoxPart(previewBoxPart);
    return result;
}
Also used : GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) GraphChangedEvent(com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent) GraphNode(com.gempukku.libgdx.graph.data.GraphNode) GraphProperty(com.gempukku.libgdx.graph.data.GraphProperty) Graph(com.gempukku.libgdx.graph.data.Graph) GraphConnection(com.gempukku.libgdx.graph.data.GraphConnection)

Example 3 with GraphNode

use of com.gempukku.libgdx.graph.data.GraphNode in project gdx-graph by MarcinSc.

the class EndParticlesShaderBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    final ParticlesShaderPreviewBoxPart previewBoxPart = new ParticlesShaderPreviewBoxPart();
    previewBoxPart.initialize(data);
    GraphBoxImpl result = new GraphBoxImpl(id, getConfiguration()) {

        @Override
        public void graphChanged(GraphChangedEvent event, boolean hasErrors, Graph<? extends GraphNode, ? extends GraphConnection, ? extends GraphProperty> graph) {
            if (event.isData() || event.isStructure()) {
                previewBoxPart.graphChanged(hasErrors, graph);
            }
        }
    };
    IntegerBoxPart particleCountBox = new IntegerBoxPart("Max particles ", "maxParticles", 100, new Validators.GreaterThanValidator(0, false));
    particleCountBox.initialize(data);
    result.addGraphBoxPart(particleCountBox);
    addConfigurationInputsAndOutputs(result);
    result.addGraphBoxPart(new SectionBoxPart("Rendering config"));
    EnumSelectBoxPart cullingBox = new EnumSelectBoxPart("Culling", "culling", new StringifyEnum<BasicShader.Culling>(), BasicShader.Culling.values());
    cullingBox.initialize(data);
    result.addGraphBoxPart(cullingBox);
    BlendingBoxPart blendingBox = new BlendingBoxPart();
    blendingBox.initialize(data);
    result.addGraphBoxPart(blendingBox);
    EnumSelectBoxPart depthTestBox = new EnumSelectBoxPart("DepthTest", "depthTest", new StringifyEnum<BasicShader.DepthTesting>(), BasicShader.DepthTesting.values());
    depthTestBox.initialize(data);
    result.addGraphBoxPart(depthTestBox);
    CheckboxBoxPart writeDepthBox = new CheckboxBoxPart("Write depth", "depthWrite");
    writeDepthBox.initialize(data);
    result.addGraphBoxPart(writeDepthBox);
    result.addGraphBoxPart(new SectionBoxPart("Preview"));
    result.addGraphBoxPart(previewBoxPart);
    return result;
}
Also used : GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) GraphChangedEvent(com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent) GraphNode(com.gempukku.libgdx.graph.data.GraphNode) GraphProperty(com.gempukku.libgdx.graph.data.GraphProperty) Graph(com.gempukku.libgdx.graph.data.Graph) GraphConnection(com.gempukku.libgdx.graph.data.GraphConnection) Validators(com.kotcrab.vis.ui.util.Validators)

Example 4 with GraphNode

use of com.gempukku.libgdx.graph.data.GraphNode in project gdx-graph by MarcinSc.

the class EndScreenShaderBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    final ScreenShaderPreviewBoxPart previewBoxPart = new ScreenShaderPreviewBoxPart();
    previewBoxPart.initialize(data);
    GraphBoxImpl result = new GraphBoxImpl(id, getConfiguration()) {

        @Override
        public void graphChanged(GraphChangedEvent event, boolean hasErrors, Graph<? extends GraphNode, ? extends GraphConnection, ? extends GraphProperty> graph) {
            if (event.isData() || event.isStructure()) {
                previewBoxPart.graphChanged(hasErrors, graph);
            }
        }
    };
    addConfigurationInputsAndOutputs(result);
    result.addGraphBoxPart(new SectionBoxPart("Rendering config"));
    BlendingBoxPart blendingBox = new BlendingBoxPart();
    blendingBox.initialize(data);
    result.addGraphBoxPart(blendingBox);
    result.addGraphBoxPart(new SectionBoxPart("Preview"));
    result.addGraphBoxPart(previewBoxPart);
    return result;
}
Also used : GraphProperty(com.gempukku.libgdx.graph.data.GraphProperty) GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) Graph(com.gempukku.libgdx.graph.data.Graph) GraphChangedEvent(com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent) ScreenShaderPreviewBoxPart(com.gempukku.libgdx.graph.plugin.screen.design.ScreenShaderPreviewBoxPart) GraphConnection(com.gempukku.libgdx.graph.data.GraphConnection) BlendingBoxPart(com.gempukku.libgdx.graph.ui.part.BlendingBoxPart) SectionBoxPart(com.gempukku.libgdx.graph.ui.part.SectionBoxPart) GraphNode(com.gempukku.libgdx.graph.data.GraphNode)

Aggregations

Graph (com.gempukku.libgdx.graph.data.Graph)4 GraphConnection (com.gempukku.libgdx.graph.data.GraphConnection)4 GraphNode (com.gempukku.libgdx.graph.data.GraphNode)4 GraphProperty (com.gempukku.libgdx.graph.data.GraphProperty)4 GraphBoxImpl (com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl)4 GraphChangedEvent (com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent)4 ModelShaderPreviewBoxPart (com.gempukku.libgdx.graph.plugin.models.design.producer.ModelShaderPreviewBoxPart)1 ScreenShaderPreviewBoxPart (com.gempukku.libgdx.graph.plugin.screen.design.ScreenShaderPreviewBoxPart)1 BlendingBoxPart (com.gempukku.libgdx.graph.ui.part.BlendingBoxPart)1 CheckboxBoxPart (com.gempukku.libgdx.graph.ui.part.CheckboxBoxPart)1 EnumSelectBoxPart (com.gempukku.libgdx.graph.ui.part.EnumSelectBoxPart)1 SectionBoxPart (com.gempukku.libgdx.graph.ui.part.SectionBoxPart)1 SelectBoxPart (com.gempukku.libgdx.graph.ui.part.SelectBoxPart)1 Validators (com.kotcrab.vis.ui.util.Validators)1