clipR Library Method
Short Description: Select Relative Part / Clip-To Part
Signature: t.clipR (s,t,ws,wt,hs,ht)
Group: Shape
Class: transition Class
In most cases, clipT is used to animate a part of the
(image of the) element associated with the transition. As
parameters it receives relative coordinates of three points.
Coordinates are releative to the animated element, (0,0) refers to the top left
point and (1,1) to the bottom right.
HTML Element With some text.
If the transition is of class triangle, then the 3 points are the 3 corners
of the triangle. If the transition is of the "Transition Class" then
the selected portion is a parallelogram whereby the 3 points are 3 corners
of the parallelogram and the fourth is calculated automatically.
Although often coordintats are in the range 0..1 this is not strictly required.
If this is not the case, parts of the texture canvas outside the selected elements will be shown.
It is the responsibility of the user to paint the texture canvas accordingly.
Triangle Examples
taccgl.actor("htmlel40",taccgl.triangle).clipR(0,0,1,0,0,1). dur(3). start(); | RUN |
taccgl.actor("htmlel40",taccgl.triangle).clipR(1,1,-1,0,0,-1). dur(3). start(); | RUN |
taccgl.actor("htmlel40",taccgl.triangle).clipR(1,0,-1,0,0,1). dur(3). start(); | RUN |
taccgl.actor("htmlel40",taccgl.triangle).clipR(0,1,1,0,0,-1). dur(3). start(); | RUN |
taccgl.actor("htmlel40",taccgl.triangle).clipR(0,0,1,0,0.5,0.5). dur(3). start(); | RUN |
taccgl.actor("htmlel40",taccgl.triangle).clipR(1,0,0,1,-0.5,0.5). dur(3). start(); | RUN |
Parallelogram Examples
taccgl.actor("htmlel40") . clipR (0,0, 0.5,0, 0.5,1) . dur(3). start(); | RUN |
taccgl.actor("htmlel40") . clipR (0.5,0, 0.5,0, -0.5,1) . dur(3). start(); | RUN |
taccgl.actor("htmlel40") . clipR (0.5,0,-0.5,0,0.5,1) . dur(3). start(); | RUN |
HTML Element With some text.
Rectangle Examples
taccgl.actor("htmlel50") . clipR (0,0, 0.5,0, 0,1) . dur(3). start(); | RUN |
taccgl.actor("htmlel50") . clipR (0.5,0.5, .5,0, 0,.5) . dur(3). start(); | RUN |
taccgl.actor("htmlel50") . clipR (0,0, 0.5,0, 0,0.5) . dur(3). start(); | RUN |
taccgl.actor("htmlel50") . clipR (0,0, 0.5,0, 0,0.5) . clipR (0,0, 0.5,0, 0,0.5). dur(3). start(); | RUN |
taccgl.actor("htmlel50") . clipR (0.5,0.5, .5,0, 0,.5) . clipR (0,0, 0.5,0, 0,0.5). dur(3). start(); | RUN |
taccgl.actor("htmlel50") . clipR (0,0, 0.5,0, 0,0.5) . clipR (0.5,0.5, .5,0, 0,.5). dur(3). start(); | RUN |
WebGL™ is a trademark of the Khronos Group Inc.
|