Java Reference
In-Depth Information
translateY: startingY
content: [Circle{
translateX: startWidth/2.0;
translateY: startHeight/2.0;
opacity: 0.0;
radius: maxRadius;
},replacementNode]
clip: clip;
}
insert holder after parent.content[index];
var t = Timeline{
keyFrames: [
KeyFrame{
time: 0s
values: radius => 0.0 tween Interpolator.EASEBOTH
},
KeyFrame{
time: 1s
values: radius => maxRadius tween Interpolator.EASEBOTH
action: function(){
delete nodeToReplace from parent.content;
delete holder.content;
replacementNode.translateX = startingX;
replacementNode.translateY = startingY;
insert replacementNode before parent.content[index];
}
},
KeyFrame{
time: 1s + 1ms
action: doAfter
}
]
}
t.play();
}
In Listing 3-6, the variable holder is used to contain replacementNode . The node holder also contains
a second node of type Circle . This Circle is used to expand the bounds of holder to accommodate a clip
region that will expand beyond the bounds of replacementNode .
The Timeline in this example is very simple. It adjusts the value of radius from 0.0 to maxRadius ,
which is the distance from the center of replacementNode to the farthest corner. This ensures that the
bounds of clip will be big enough to expose replacementNode entirely.
Search WWH ::




Custom Search