use of org.jwildfire.create.tina.randomgradient.AllRandomGradientGenerator in project JWildfire by thargor6.
the class FlameControlsDelegate method randomizeLightColor.
public void randomizeLightColor() {
DistantLight light = getSolidRenderingSelectedLight();
if (light != null) {
owner.undoManager.saveUndoPoint(getCurrFlame());
List<RGBColor> rndColors = new AllRandomGradientGenerator().generateKeyFrames(7);
RGBColor rndColor = rndColors.get((int) (Math.random() * rndColors.size()));
Color selectedColor = new Color(rndColor.getRed(), rndColor.getGreen(), rndColor.getBlue());
setLightColor(light, selectedColor);
}
}
use of org.jwildfire.create.tina.randomgradient.AllRandomGradientGenerator in project JWildfire by thargor6.
the class RandomGradientMutation method execute.
@Override
public void execute(Layer pLayer) {
int keyFrames = 3 + Tools.randomInt(56);
boolean fadePaletteColors = Math.random() > 0.33;
boolean uniformWidth = Math.random() > 0.75;
RGBPalette palette = new AllRandomGradientGenerator().generatePalette(keyFrames, fadePaletteColors, uniformWidth);
pLayer.setPalette(palette);
}
Aggregations