Search in sources :

Example 1 with SpherePositionGenerator

use of com.gempukku.libgdx.graph.util.particles.generator.SpherePositionGenerator in project gdx-graph by MarcinSc.

the class ParticlesShaderTestScene method createEffect.

private void createEffect(GraphParticleEffects particleEffects, Vector3 center, float size) {
    SpherePositionGenerator positionGenerator = new SpherePositionGenerator();
    positionGenerator.getCenter().set(center);
    positionGenerator.setRadius(0.3f);
    DefaultParticleGenerator particleGenerator = new DefaultParticleGenerator(timeKeeper, 1f, 0, 10);
    particleGenerator.setPositionGenerator(positionGenerator);
    MapWritablePropertyContainer properties = new MapWritablePropertyContainer();
    properties.setValue("Size", size);
    CommonPropertiesParticleEffectAdapter particleEffectAdapter = new CommonPropertiesParticleEffectAdapter(particleEffects, Vector3.Zero, null, properties);
    particleEffectAdapter.addTag("Test", particleGenerator);
    particleEffectAdapter.startEffect("Test");
}
Also used : DefaultParticleGenerator(com.gempukku.libgdx.graph.util.particles.generator.DefaultParticleGenerator) SpherePositionGenerator(com.gempukku.libgdx.graph.util.particles.generator.SpherePositionGenerator) CommonPropertiesParticleEffectAdapter(com.gempukku.libgdx.graph.util.particles.CommonPropertiesParticleEffectAdapter) MapWritablePropertyContainer(com.gempukku.libgdx.graph.shader.property.MapWritablePropertyContainer)

Aggregations

MapWritablePropertyContainer (com.gempukku.libgdx.graph.shader.property.MapWritablePropertyContainer)1 CommonPropertiesParticleEffectAdapter (com.gempukku.libgdx.graph.util.particles.CommonPropertiesParticleEffectAdapter)1 DefaultParticleGenerator (com.gempukku.libgdx.graph.util.particles.generator.DefaultParticleGenerator)1 SpherePositionGenerator (com.gempukku.libgdx.graph.util.particles.generator.SpherePositionGenerator)1