원클릭으로
javafx-animation-canvas-render-loop
Animate JavaFX UIs with Timeline, Transition, Canvas, and AnimationTimer-based render loops.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Animate JavaFX UIs with Timeline, Transition, Canvas, and AnimationTimer-based render loops.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Build JavaFX 3D modeling tools and print/export workflows with isolated geometry generation and preview rendering.
Choose and integrate mature third-party JavaFX control libraries for forms, productivity widgets, theming, and developer workflow support.
Build JavaFX terminal emulators or shell-style console panes with background process I/O, ANSI handling, and safe FX-thread updates.
Build node-based JavaFX workflow editors, graph canvases, and visual programming surfaces with clean model separation.
Manage the JavaFX Application lifecycle, primary stage setup, startup sequencing, and shutdown behavior.
Choose JavaFX architecture patterns such as plain scene-graph, MVP, MVVM, MVCI, DI, and routed shells.
| name | javafx-animation-canvas-render-loop |
| description | Animate JavaFX UIs with Timeline, Transition, Canvas, and AnimationTimer-based render loops. |
| triggers | ["animationtimer javafx","timeline javafx","canvas javafx","render loop javafx"] |
| compatibility | {"java":"17+","javafx":"21+"} |
| category | ui-advanced |
| tags | ["animation","canvas","animationtimer","timeline","rendering"] |
| metadata | {"scope":"repository","maturity":"starter"} |
| allowed-tools | ["view","rg","apply_patch"] |
Use this skill when the UI needs property animation, custom per-frame drawing, or deterministic render/update loops built on top of JavaFX primitives.
import javafx.animation.AnimationTimer;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
public class RenderLoopView extends StackPane {
public RenderLoopView() {
var canvas = new Canvas(640, 360);
var gc = canvas.getGraphicsContext2D();
AnimationTimer timer = new AnimationTimer() {
private long lastUpdate;
private double x;
@Override
public void handle(long now) {
if (lastUpdate == 0L) {
lastUpdate = now;
return;
}
double deltaSeconds = (now - lastUpdate) / 1_000_000_000.0;
lastUpdate = now;
x = (x + 120 * deltaSeconds) % canvas.getWidth();
render(gc, canvas.getWidth(), canvas.getHeight(), x);
}
};
timer.start();
getChildren().add(canvas);
}
private void render(GraphicsContext gc, double width, double height, double x) {
gc.setFill(Color.BLACK);
gc.fillRect(0, 0, width, height);
gc.setFill(Color.CORNFLOWERBLUE);
gc.fillOval(x, height / 2 - 20, 40, 40);
}
}
Timeline or Transition when a standard property animation is enough.AnimationTimer only for explicit per-frame control.Canvas is immediate-mode rendering, so redraw responsibility is entirely yours.