    # Position Specification

Various taccgl™-Methods (e.g. position, from, to) receive parameters denoting a point in 3D space. These methods either take 2 or 3 numerical parameters ((x,y) or (x,y,z)) or an object usually written using curley brackets as {positioning options}. In the case of 2 numerical parameters z=0 is assumed.

Position calculation is based on a transition t per default the transition object, whose method was called. Calculation per default starts with the current from value of t or if given the value of the x,y, or z option, or if given the position of el.

option Meaning
x:number, y:number, z:number Specifies coordinate values directly.
ox:number, oy:number, oz:number Specifies coordinate offsets that are added to the coordinates at the end.
rx:number, ry:number, rz:number Specifies relative coordinates within the coordinate system of the current transition. So {rx:1,ry:0,rz:0} refers to the top right corner; {rx:0,ry:1,rz:0} to the bottom left corner, {rx:0.5,ry:0.5,rz:0.5} to the point in the center.
el:id, ex:number, ey:number id must be the id of an HTML element (or a DOM node). The coordinates specify relative coordinates within the coordinate system of the specified HTML element. So {ex:1,ey:0} refers to the top right corner; {ex:0,ey:1} to the bottom left corner, {ex:0.5,ey:0.5} to the point in the center.
t:transition Makes position calculation based on the specified transition.
pt:number Usually the calculation is based on the from value of t. For pt:1 calculation is based on the to value. In general it is based on from*(1-pt) + to*pt .
rt:number If this is a resizing transition, then rt:1 means to take the destination size as basis for the calculation. In general from_size*(1-rt) + to_size*pt is used as size. The size of the current transition is important for scaling rx, ry, rz.
Next Page:Lighting
Previous Page: Animations and Transitions

# taccgl Transitions

taccgl™ - Canvas Animation Library