Java Reference
In-Depth Information
var rect1 = Rectangle{
width: rectSize
height: rectSize
fill: Color.GRAY
effect: Lighting {
light: PointLight{
x: bind x,
//y: bind rectSize - y + 20, <-- in case of bug. see side bar
y: bind y,
z: bind z
}
specularConstant: 0.0
specularExponent: 1.0
surfaceScale: 0
}
}
var dot = 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 half = rectSize/2.0;
var animation = Timeline{
repeatCount: Timeline.INDEFINITE
autoReverse: true;
keyFrames: [
KeyFrame{time:0s,values:[x=>0.0,y=>0.0,z=>0.0]},
KeyFrame{time:2s,values:[x=>0.0,y=>0.0,z=>10.0]},
KeyFrame{time:4s,values:[x=>half,y=>0.0,z=>10.0]},
KeyFrame{time:6s,values:[x=>half,y=>half,z=>10.0]},
KeyFrame{time:7s,values:[x=>half,y=>half,z=>0.0]},
KeyFrame{time:9s,values:[x=>half,y=>half,z=>100.0]},
KeyFrame{time:11s,values:[x=>rectSize,y=>half,z=>30.0]},
KeyFrame{time:13s,values:[x=>rectSize,y=>rectSize,z=>0.0]},
KeyFrame{time:16s,values:[x=>half,y=>half,z=>100.0]},
KeyFrame{time:19s,values:[x=>0.0,y=>0.0,z=>0.0]}
]
}
var group = Group{
translateX: 640/2.0 - rectSize/2.0
translateY: 480/2.0 - rectSize/2.0
content:[rect1,dot]
}
Search WWH ::




Custom Search