HTML5 Canvas 3D WebGL (TM) javaScript Library
 

to Library Method

Short Description: Set End Point of Motion

Signature: t.to (x,y,z) or (p)
Group: Motion
Class: transition Class
 

Makes the object move to the given position. The method sets the end position of the motion of the animated object. (x,y,z) are Coordinates. Alternatively (p) is a Position Specification that will be resolved into coordinates. Default of the to-position is the position of the animated HTML element.

If only to is used the object performes a motion flying out of its normal position moving to the given Coordinates. If from is used as well begin and end coordinates of the motion to be performed can be specified explicitly.

Only one of flyHome, flyToElement, and to may be used once on a single transition.

Examples

taccgl.actor("testimg").to(1000,2000,0).start();
RUN
taccgl.actor("testimg").to(0,0,1000).start();
RUN
taccgl.actor("testimg").to(0,0,-1000).start();
RUN
taccgl.actor("pgMiddleColumnTable").to(0,0,-30000).dur(5).start();
RUN
taccgl.actor("pgMiddleColumnTable").to(0,0,-30000).dur(5).start();
taccgl.actor("testimg").dur(5).start();taccgl.actor("LeftcolumnDown").dur(5).start();
RUN
var a=taccgl.actor("testimg"); a.to(a.x0,a.y0+500,0).start();
RUN
var a=taccgl.actor("testimg"); a.to(a.x0,a.y0+1000,0).start();
a.cont().flyHome().start();
RUN
var a=taccgl.actor("pgMiddleColumnTable"); a.to(a.x0,0,0).start();
a.cont().flyHome().start();
RUN
var a=taccgl.actor("pgMiddleColumnTable"); a.to(a.x0,a.y0-a.hy0,0).start();
var b=taccgl.actor("LeftcolumnDown"); b.to(b.x0+a.wx0,b.y0,0).startTime(1).
showBefore().showAfter().start();
var c=a.cont().to(b.x0,a.y1,0).start();
var d=c.cont().to(b.x0,b.y0,0).start();
RUN

WebGL™ is a trademark of the Khronos Group Inc.

Next Page:transition.from - Set Start Point of Motion
Previous Page: Motion