/*
* This file is created with Netbeans 6 Plug-In for JavaFX
*/
import javafx.ui.*;
import javafx.ui.canvas.*;
import javafx.ui.filter.*;
var win = Frame {
width: 600
height: 400
content: Canvas {
content:
Morph {
morph: bind [0,.01..1] dur 2500
fill: blue
start: Rect {
x: 10
y: 10
width: 460
height: 140
}
end: Circle {cx: 200, cy: 200, radius: 100}
}
}
visible: true
};
This code should draw a blue-filled rectangle and then morph it into a blue circle taking 2.5 seconds to do it. Pretty simple and slick, although a rather trivial effect.
No comments:
Post a Comment