Java Reference
In-Depth Information
insert holder before parent.content[index];
var timeline = Timeline{
keyFrames: [
KeyFrame{
time: 0s;
values: [
angle => 90.0 tween Interpolator.EASEOUT
]
},
KeyFrame{
time: 0.5s;
values: [
angle => 0.0
]
action: function(){
delete holder.content;
insert replacementNode into holder.content
}
},
KeyFrame{
time: 0.5s+1ms;
values: [
angle => 180.0
]
},
KeyFrame{
time: 1s;
values: [
angle => 90.0 tween Interpolator.EASEIN
]
action: function(){
delete holder.content;
replacementNode.translateX = startingX;
replacementNode.translateY = startingY;
insert replacementNode before parent.content[index];
doAfter();
}
}
]
}
timeline.play();
}
As shown in Listing 3-5, nodeToReplace is removed from its parent and wrapped with a new Group
called holder , which is added to the scene where nodeToReplace was located. A PerspectiveTransform is
created, bound to a number of variables that keep track of the left and right x values along with the
Search WWH ::




Custom Search