Java Reference
In-Depth Information
var atX = half;
var atY = half;
var rect1 = Rectangle{
width: rectSize
height: rectSize
fill: Color.GRAY
effect: Lighting {
light: SpotLight{
x: bind x,
//y: bind rectSize - y + 20, <-- in case of bug. see side bar
y: bind y,
z: bind z
pointsAtX: bind atX;
pointsAtY: bind rectSize - atY + 20
}
specularConstant: 0.0
specularExponent: 1.0
surfaceScale: 0
}
}
var dot1 = Circle{
radius: 2;
translateX: bind x
translateY: bind y;
scaleX: bind 1.0 + (z/50.0);
scaleY: bind 1.0 + (z/50.0);
fill: Color.BLUE;
}
var dot2 = Rectangle{
width: 4;
height: 4;
translateX: bind atX - 2
translateY: bind atY - 2;
fill: Color.RED;
}
var animation = Timeline{
repeatCount: Timeline.INDEFINITE
autoReverse: true;
keyFrames: [
KeyFrame{time:0s,values:[x=>half,y=>half,z=>20.0,atX=>half,atY=>half]},
KeyFrame{time:2s,values:[atX=>half/2.0,atY=>half]},
KeyFrame{time:8s,values:[atX=>half/2.0*3]},
KeyFrame{time:5s,values:[atY=>half/2.0]},
KeyFrame{time:8s,values:[x=>half,y=>half,z=>20.0,atY=>half/2.0*3]},
KeyFrame{time:10s,values:[x=>half,y=>half,z=>20.0,atX=>half,atY=>half]},
KeyFrame{time:12s,values:[x=>half,y=>half,z=>50.0]},
KeyFrame{time:14s,values:[x=>half/2.0,y=>half,z=>50.0]},
KeyFrame{time:16s,values:[x=>half/2.0,y=>half/2.0,z=>50.0]},
Search WWH ::




Custom Search