ID:2009564
 
(See the best response by Ter13.)
just wondering is there anyone who has made or could make a demo project for some basic guidelines and usage of the animate feature cause i don't fully understand all the scaling/transforming etc and what not

the reference has examples...
Best response
http://stattrek.com/tutorials/matrix-algebra-tutorial.aspx

Transforms are basically 2x3 matrices.

xx yx xo
xy yy yo


Basically, when each pixel of an image is drawn, the final coordinates of the image are determined by a really simple equation:

ox = ix * xx + iy * yx + xo
oy = ix * xy + iy * yy + yo


The consequences of this should be obvious. For a really simple explanation, the matrix is broken up into 6 values:

a b c
d e f


Where a and e can be thought of very simply as scaling factors along the x and y axis respectively.

b and d can be thought of as shearing factors along the x and y axis respectively.

c and f can be thought of as offset factors along the x and y axis respectively.

However, it's not quite this simple, as a, b, d, and e are changed during rotation of the matrix via sin/cos factors.

The matrix datum provides very simple functions for manipulating matrices, however, sometimes when performing operations, if you understand the underlying math you are performing, it's entirely possible to simplify multiple operations to reduce the amount of work being done by the engine.

As for animate() itself. animate() basically sends a batch of instructions to the client that tell it what visual values to change at what times, and when to repeat. Some values smoothly change over time, while others change instantly. The first time you call animate(), you need to specify the object you are attempting to animate. Every step after that should not specify an object or it will attempt to create a new animation and wipe out the old one.

Not really much else to it.