HTML5 Canvas 2D Library
 

position Library Method

Short Description: Set Position of Object

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

Sets the position the animated object. (x,y,z) are Coordinates. Alternatively (p) is a Position Specification that will be resolved into coordinates. position specifies a fixed position of the animated object without "motion with constant acceleration" (in contrast to from/to). However, position can be combined with e.g. rotate. Default of the position is the position of the associated HTML element.

position may be used on a single transition unless the transition was created using certain forms of cont that do from implicitely. It may not be combined with from, flyHome, flyToElement, and to on a single transition.

Examples

taccgl.actor("testimg").position(100,200,0).start();
RUN
taccgl.actor("testimg").position(0,400,0).start();
RUN
taccgl.actor("testimg").position(0,0,1000).start();
RUN
taccgl.actor("testimg").position(0,0,-1000).start();
RUN
taccgl.actor("pgMiddleColumnTable").position(0,0,-3000).start();
RUN
taccgl.actor("pgMiddleColumnTable").position(0,0,-3000).start();
taccgl.actor("testimg").start();taccgl.actor("LeftcolumnDown").start();
RUN
var a=taccgl.actor("testimg"); a.position(a.x,a.y+500,0).start();
RUN
var a=taccgl.actor("pgMiddleColumnTable"); a.position(a.x,0,0).start();
RUN
Next Page:transition.flyHome - Move object from current position to home
Previous Page: transition.from - Set Start Point of Motion