@SafeVarargs public final Builder radius(Animation<?, Float>... animations) { return replaceAnimations(radius, animations); }
private KyrieDrawable createLapsDrawable() { final KyrieDrawable.Builder builder = KyrieDrawable.builder().viewport(VIEWPORT_WIDTH, VIEWPORT_HEIGHT); for (Polygon polygon : polygons) { builder.child( PathNode.builder() .pathData(PathData.parse(polygon.pathData)) .strokeWidth(4f) .strokeColor(polygon.color)); } for (Polygon polygon : polygons) { final PathData pathData = PathData.parse(TextUtils.join(" ", Collections.nCopies(polygon.laps, polygon.pathData))); final Animation<PointF, PointF> pathMotion = Animation.ofPathMotion(PathData.toPath(pathData)) .repeatCount(Animation.INFINITE) .duration(DURATION); builder.child( CircleNode.builder() .fillColor(Color.BLACK) .radius(8) .centerX(pathMotion.transform(p -> p.x)) .centerY(pathMotion.transform(p -> p.y))); } return builder.build(); }
public Builder radius(List<Animation<?, Float>> animations) { return replaceAnimations(radius, animations); }
public Builder centerX(List<Animation<?, Float>> animations) { return replaceAnimations(centerX, animations); }
public Builder centerX(float initialCenterX) { return replaceFirstAnimation(centerX, Node.asAnimation(initialCenterX)); }
@SafeVarargs public final Builder centerY(Animation<?, Float>... animations) { return replaceAnimations(centerY, animations); }
@SafeVarargs public final Builder centerX(Animation<?, Float>... animations) { return replaceAnimations(centerX, animations); }
public Builder centerY(List<Animation<?, Float>> animations) { return replaceAnimations(centerY, animations); }
public static Builder builder() { return new Builder(); }
public Builder radius(@FloatRange(from = 0f) float initialRadius) { return replaceFirstAnimation(radius, Node.asAnimation(initialRadius)); }
public Builder centerY(float initialCenterY) { return replaceFirstAnimation(centerY, Node.asAnimation(initialCenterY)); }