All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gempukku.libgdx.graph.plugin.particles.ParticlesShaderConfiguration Maven / Gradle / Ivy

The newest version!
package com.gempukku.libgdx.graph.plugin.particles;

import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.ObjectMap;
import com.gempukku.libgdx.graph.plugin.particles.particle.EndBillboardParticlesShaderNodeBuilder;
import com.gempukku.libgdx.graph.plugin.particles.particle.ParticleLifePercentageShaderNodeBuilder;
import com.gempukku.libgdx.graph.plugin.particles.particle.ParticleLifetimeShaderNodeBuilder;
import com.gempukku.libgdx.graph.plugin.particles.particle.ParticleLocationShaderNodeBuilder;
import com.gempukku.libgdx.graph.plugin.particles.particle.ParticleRandomShaderNodeBuilder;
import com.gempukku.libgdx.graph.plugin.particles.particle.ParticleUVShaderNodeBuilder;
import com.gempukku.libgdx.graph.shader.config.GraphConfiguration;
import com.gempukku.libgdx.graph.shader.node.GraphShaderNodeBuilder;
import com.gempukku.libgdx.graph.shader.property.GraphShaderPropertyProducer;

public class ParticlesShaderConfiguration implements GraphConfiguration {
    public static ObjectMap graphShaderNodeBuilders = new ObjectMap<>();
    public static Array graphShaderPropertyProducers = new Array<>();

    static {
        // End
        addGraphShaderNodeBuilder(new EndBillboardParticlesShaderNodeBuilder());

        // Particle
        addGraphShaderNodeBuilder(new ParticleLocationShaderNodeBuilder());
        addGraphShaderNodeBuilder(new ParticleUVShaderNodeBuilder());
        addGraphShaderNodeBuilder(new ParticleRandomShaderNodeBuilder());
        addGraphShaderNodeBuilder(new ParticleLifetimeShaderNodeBuilder());
        addGraphShaderNodeBuilder(new ParticleLifePercentageShaderNodeBuilder());
    }

    private static void addGraphShaderNodeBuilder(GraphShaderNodeBuilder builder) {
        graphShaderNodeBuilders.put(builder.getType(), builder);
    }

    @Override
    public Array getPropertyProducers() {
        return graphShaderPropertyProducers;
    }

    @Override
    public GraphShaderNodeBuilder getGraphShaderNodeBuilder(String type) {
        return graphShaderNodeBuilders.get(type);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy