protected void update (float percent) { float r = startR + (end.r - startR) * percent; float g = startG + (end.g - startG) * percent; float b = startB + (end.b - startB) * percent; float a = startA + (end.a - startA) * percent; color.set(r, g, b, a); }
/** Sets the color to transition to. Required. */ public void setEndColor (Color color) { end.set(color); } }
public SelectBoxStyle (BitmapFont font, Color fontColor, Drawable background, ScrollPaneStyle scrollStyle, ListStyle listStyle) { this.font = font; this.fontColor.set(fontColor); this.background = background; this.scrollStyle = scrollStyle; this.listStyle = listStyle; }
/** Sets the default <code>color</code> of the whole {@link PixmapPacker.Page} when a new one created. Helps to avoid texture * bleeding or to highlight the page for debugging. * @see Page#Page(PixmapPacker packer) */ public void setTransparentColor (Color color) { this.transparentColor.set(color); }
/** Builds normal, tangent and binormal of a RenderableProvider with default colors (normal blue, tangent red, binormal green). * @param builder * @param renderableProvider * @param vectorSize Size of the normal vector */ public static void buildNormals (MeshPartBuilder builder, RenderableProvider renderableProvider, float vectorSize) { buildNormals(builder, renderableProvider, vectorSize, tmpColor0.set(0, 0, 1, 1), tmpColor1.set(1, 0, 0, 1), tmpColor2.set(0, 1, 0, 1)); }
@Override public void setColor (float r, float g, float b, float a) { color.set(r, g, b, a); hasColor = !color.equals(Color.WHITE); }
public void setColor (Color tint) { color.set(tint); float color = tint.toFloatBits(); final float[] vertices = this.vertices; for (int i = 2; i < vertices.length; i += Sprite.VERTEX_SIZE) vertices[i] = color; }
@Override public void setColor (float r, float g, float b, float a) { color.set(r, g, b, a); colorPacked = color.toFloatBits(); }
public PointLight set (final Color color, final Vector3 position, final float intensity) { if (color != null) this.color.set(color); if (position != null) this.position.set(position); this.intensity = intensity; return this; }
public PointLight set (final float r, final float g, final float b, final float x, final float y, final float z, final float intensity) { this.color.set(r, g, b, 1f); this.position.set(x, y, z); this.intensity = intensity; return this; }
@Override public void setColor (float r, float g, float b, float a) { color.set(r, g, b, a); colorPacked = color.toFloatBits(); }
public void setColor (Color tint) { color.set(tint); float color = tint.toFloatBits(); final float[] vertices = this.vertices; for (int i = 2; i < vertices.length; i += Sprite.VERTEX_SIZE) vertices[i] = color; }
@Override public void setColor (float r, float g, float b, float a) { color.set(r, g, b, a); hasColor = !color.equals(Color.WHITE); }
public DirectionalLight set (final Color color, final Vector3 direction) { if (color != null) this.color.set(color); if (direction != null) this.direction.set(direction).nor(); return this; }
public DirectionalLight set (final float r, final float g, final float b, final Vector3 direction) { this.color.set(r, g, b, 1f); if (direction != null) this.direction.set(direction).nor(); return this; }
@Override public void reset () { position.set(0, 0, 0); normal.set(0, 1, 0); color.set(1, 1, 1, 1); uv.set(0, 0); }
public SpotLight set (final Color color, final Vector3 position, final Vector3 direction, final float intensity, final float cutoffAngle, final float exponent) { if (color != null) this.color.set(color); if (position != null) this.position.set(position); if (direction != null) this.direction.set(direction).nor(); this.intensity = intensity; this.cutoffAngle = cutoffAngle; this.exponent = exponent; return this; }
public SpotLight set (final Color color, final float posX, final float posY, final float posZ, final float dirX, final float dirY, final float dirZ, final float intensity, final float cutoffAngle, final float exponent) { if (color != null) this.color.set(color); this.position.set(posX, posY, posZ); this.direction.set(dirX, dirY, dirZ).nor(); this.intensity = intensity; this.cutoffAngle = cutoffAngle; this.exponent = exponent; return this; }
public TiledDrawable tint (Color tint) { TiledDrawable drawable = new TiledDrawable(this); drawable.color.set(tint); drawable.setLeftWidth(getLeftWidth()); drawable.setRightWidth(getRightWidth()); drawable.setTopHeight(getTopHeight()); drawable.setBottomHeight(getBottomHeight()); return drawable; } }
public void draw (Batch batch, float x, float y, float width, float height) { Color spriteColor = sprite.getColor(); temp.set(spriteColor); sprite.setColor(spriteColor.mul(batch.getColor())); sprite.setRotation(0); sprite.setScale(1, 1); sprite.setBounds(x, y, width, height); sprite.draw(batch); sprite.setColor(temp); }