use of com.gempukku.libgdx.graph.util.particles.CommonPropertiesParticleEffectAdapter 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");
}
use of com.gempukku.libgdx.graph.util.particles.CommonPropertiesParticleEffectAdapter in project gdx-graph by MarcinSc.
the class Episode18Scene method createExhaust.
private void createExhaust(GraphParticleEffects effects, Vector3 point1, Vector3 point2) {
final LinePositionGenerator positionGenerator = new LinePositionGenerator();
positionGenerator.getPoint1().set(point1);
positionGenerator.getPoint2().set(point2);
DefaultParticleGenerator particleGenerator = new DefaultParticleGenerator(timeKeeper, 0.5f, 0, 1000) {
@Override
protected void generateAttributes(ObjectMap attributes) {
attributes.put("Move X", MathUtils.random(-0.05f, 0.05f));
attributes.put("Move Y", MathUtils.random(-0.05f, 0.05f));
}
};
particleGenerator.setPositionGenerator(positionGenerator);
CommonPropertiesParticleEffectAdapter particleEffectAdapter = new CommonPropertiesParticleEffectAdapter(effects);
particleEffectAdapter.addTag("exhaust", particleGenerator);
particleEffectAdapter.startEffect("exhaust");
}
Aggregations