public Single () { colorValue = new GradientColorValue(); alphaValue = new ScaledNumericValue(); alphaValue.setHigh(1); }
void updateColor () { Color color = new Color(Color.HSBtoRGB(hueSlider.getPercentage(), 1 - saturationSlider.getPercentage(), 1)); lightnessSlider.setColors(new Color[] {color, Color.black}); color = new Color(Color.HSBtoRGB(hueSlider.getPercentage(), 1 - saturationSlider.getPercentage(), 1 - lightnessSlider.getPercentage())); colorPanel.setBackground(color); gradientEditor.setColor(color); float[] colors = new float[gradientEditor.colors.size() * 3]; int i = 0; for (Color c : gradientEditor.colors) { colors[i++] = c.getRed() / 255f; colors[i++] = c.getGreen() / 255f; colors[i++] = c.getBlue() / 255f; } float[] percentages = new float[gradientEditor.percentages.size()]; i = 0; for (Float percent : gradientEditor.percentages) percentages[i++] = percent; value.setColors(colors); value.setTimeline(percentages); }
public float[] getColor (float percent) { getColor(percent, temp, 0); return temp; }
public GradientPanel (FlameMain editor, GradientColorValue value, String name, String description, boolean hideGradientEditor) { super(editor, name, description); setValue(value); if (hideGradientEditor) { gradientEditor.setVisible(false); } gradientEditor.percentages.clear(); for (float percent : value.getTimeline()) gradientEditor.percentages.add(percent); gradientEditor.colors.clear(); float[] colors = value.getColors(); for (int i = 0; i < colors.length;) { float r = colors[i++]; float g = colors[i++]; float b = colors[i++]; gradientEditor.colors.add(new Color(r, g, b)); } if (gradientEditor.colors.isEmpty() || gradientEditor.percentages.isEmpty()) { gradientEditor.percentages.clear(); gradientEditor.percentages.add(0f); gradientEditor.percentages.add(1f); gradientEditor.colors.clear(); gradientEditor.colors.add(Color.white); } setColor(gradientEditor.colors.get(0)); }
deltaMultiplier.setActive(true); backgroundColor = new GradientColorValue(); Color color = Color.valueOf("878787"); backgroundColor.setColors(new float[] { color.r, color.g, color.b});
public void set (Single colorInfluencer) { this.colorValue.load(colorInfluencer.colorValue); this.alphaValue.load(colorInfluencer.alphaValue); }
private void renderWorld () { float[] colors = backgroundColor.getColors(); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); Gdx.gl.glClearColor(colors[0], colors[1], colors[2], 0); modelBatch.begin(worldCamera); if(isDrawXYZ) modelBatch.render(xyzInstance); if(isDrawXZPlane) modelBatch.render(xzPlaneInstance); if(isDrawXYPlane) modelBatch.render(xyPlaneInstance); particleSystem.begin(); particleSystem.draw(); particleSystem.end(); //Draw modelBatch.render(particleSystem, environment); modelBatch.end(); ui.draw(); }
deltaMultiplier.setActive(true); backgroundColor = new GradientColorValue(); Color color = Color.valueOf("878787"); backgroundColor.setColors(new float[] { color.r, color.g, color.b});
public GradientPanel (FlameMain editor, GradientColorValue value, String name, String description, boolean hideGradientEditor) { super(editor, name, description); setValue(value); if (hideGradientEditor) { gradientEditor.setVisible(false); } gradientEditor.percentages.clear(); for (float percent : value.getTimeline()) gradientEditor.percentages.add(percent); gradientEditor.colors.clear(); float[] colors = value.getColors(); for (int i = 0; i < colors.length;) { float r = colors[i++]; float g = colors[i++]; float b = colors[i++]; gradientEditor.colors.add(new Color(r, g, b)); } if (gradientEditor.colors.isEmpty() || gradientEditor.percentages.isEmpty()) { gradientEditor.percentages.clear(); gradientEditor.percentages.add(0f); gradientEditor.percentages.add(1f); gradientEditor.colors.clear(); gradientEditor.colors.add(Color.white); } setColor(gradientEditor.colors.get(0)); }
public void set (Single colorInfluencer) { this.colorValue.load(colorInfluencer.colorValue); this.alphaValue.load(colorInfluencer.alphaValue); }
private void renderWorld () { float[] colors = backgroundColor.getColors(); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); Gdx.gl.glClearColor(colors[0], colors[1], colors[2], 0); modelBatch.begin(worldCamera); if(isDrawXYZ) modelBatch.render(xyzInstance); if(isDrawXZPlane) modelBatch.render(xzPlaneInstance); if(isDrawXYPlane) modelBatch.render(xyPlaneInstance); particleSystem.begin(); particleSystem.draw(); particleSystem.end(); //Draw modelBatch.render(particleSystem, environment); modelBatch.end(); ui.draw(); }
void updateColor () { Color color = new Color(Color.HSBtoRGB(hueSlider.getPercentage(), 1 - saturationSlider.getPercentage(), 1)); lightnessSlider.setColors(new Color[] {color, Color.black}); color = new Color(Color.HSBtoRGB(hueSlider.getPercentage(), 1 - saturationSlider.getPercentage(), 1 - lightnessSlider.getPercentage())); colorPanel.setBackground(color); gradientEditor.setColor(color); float[] colors = new float[gradientEditor.colors.size() * 3]; int i = 0; for (Color c : gradientEditor.colors) { colors[i++] = c.getRed() / 255f; colors[i++] = c.getGreen() / 255f; colors[i++] = c.getBlue() / 255f; } float[] percentages = new float[gradientEditor.percentages.size()]; i = 0; for (Float percent : gradientEditor.percentages) percentages[i++] = percent; value.setColors(colors); value.setTimeline(percentages); }
deltaMultiplier.setActive(true); backgroundColor = new GradientColorValue(); Color color = Color.valueOf("878787"); backgroundColor.setColors(new float[] { color.r, color.g, color.b});
public Single () { colorValue = new GradientColorValue(); alphaValue = new ScaledNumericValue(); alphaValue.setHigh(1); }
public GradientPanel (FlameMain editor, GradientColorValue value, String name, String description, boolean hideGradientEditor) { super(editor, name, description); setValue(value); if (hideGradientEditor) { gradientEditor.setVisible(false); } gradientEditor.percentages.clear(); for (float percent : value.getTimeline()) gradientEditor.percentages.add(percent); gradientEditor.colors.clear(); float[] colors = value.getColors(); for (int i = 0; i < colors.length;) { float r = colors[i++]; float g = colors[i++]; float b = colors[i++]; gradientEditor.colors.add(new Color(r, g, b)); } if (gradientEditor.colors.isEmpty() || gradientEditor.percentages.isEmpty()) { gradientEditor.percentages.clear(); gradientEditor.percentages.add(0f); gradientEditor.percentages.add(1f); gradientEditor.colors.clear(); gradientEditor.colors.add(Color.white); } setColor(gradientEditor.colors.get(0)); }
public float[] getColor (float percent) { getColor(percent, temp, 0); return temp; }
public void set (Single colorInfluencer) { this.colorValue.load(colorInfluencer.colorValue); this.alphaValue.load(colorInfluencer.alphaValue); }
private void renderWorld () { float[] colors = backgroundColor.getColors(); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); Gdx.gl.glClearColor(colors[0], colors[1], colors[2], 0); modelBatch.begin(worldCamera); if(isDrawXYZ) modelBatch.render(xyzInstance); if(isDrawXZPlane) modelBatch.render(xzPlaneInstance); if(isDrawXYPlane) modelBatch.render(xyPlaneInstance); particleSystem.begin(); particleSystem.draw(); particleSystem.end(); //Draw modelBatch.render(particleSystem, environment); modelBatch.end(); ui.draw(); }
colorInfluencer.colorValue.setColors(new float[] {1, 0.12156863f, 0.047058824f, 0,0,0}); colorInfluencer.colorValue.setTimeline(new float[] {0, 1}); colorInfluencer.alphaValue.setHigh(1); colorInfluencer.alphaValue.setTimeline(new float[] {0, 0.5f, 0.8f, 1});
public Single () { colorValue = new GradientColorValue(); alphaValue = new ScaledNumericValue(); alphaValue.setHigh(1); }