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");
}
Aggregations