Canvas Library
 

texmove Library Method

Short Description: Texture animation

Signature: t.texmove (s,t,p,q)
Group: Texture
Class: transition Class
 

Animates the Texture that is mapped on the object and makes it move from position (s,t) to position (p,q). These coordinates refer to the position of HTML elements.

In order to make an HTML element's image move over the object, the object must be smaller than the element. Then at a certain point in time, only part of the element is shown on the object and that part changes as the animation is playing. An initially created transition usually exactly maps the associated HTML element on the animated object. So the image of the element is not bigger (but exactly matches) the object and texmove is not really useful. However, if the object has become smaller, e.g. using then texmove can be used to select what part of the element's image shown.

Examples

var a=taccgl.actor("testimg"); a.clipA (a.wx0/2,a.hy0/2,a.wx0/2,a.hy0/2).texmove(a.s0,a.t0,a.s0+a.ws0,a.t0+a.ht0); a.start();
RUN
Next Page:transition.blend - Set transparency values/set up blend animation
Previous Page: transition.texClear - Clear Portion of Texture Canvas