coDing

View on GitHub

transformations

main functions

abt the functioning

drawings are based relative to origin, which is initially @ top left corner

however, translate accumulates. once done, it stays there and that point is considered origin. And then it resets @ draw

rotate also behaves the same accumulating way, reseting @ draw

scale is not relative, it just means how many pixels is 1 unit. and signs for direction.

origin’s coordinates are also relative to current running origin

co-ordinate system is left handed, so angles clockwise, and y increases downward.

push n pop are lil staccks , so the pushing popping is LIFO

rotateX,rotateY,rotateZ are specific axis rotn for WEBGL 3d renderer

applyMatrix() will apply a co-ordinate transform.