This describes how animation graphics is created on the client side (spritesheets).
This is sub-layout for documentation pages
Top
TODO
Spritesheet is an image, containing \(N\) frames of some animation, let's number them \(1 ... N\).
If we draw frames \(1 ... N\) in time, with some time delay \(\delta t\), then we create effect of animation.
Class that allows to draw any frame from prite sheet and dvance to next frame /
draw infinite or backwards animations, is called GraphicsAnimation
The amount of frames in sprite sheet might differ, aswell as the number
of frames per line, and width / height of one frame.
We settle down, however, that all frames will have same dimensions.
Therefore, this information is contained within related json file,
which might look as follows:
{
"framesTotal": 30,
"frameWidth": 232,
"frameHeight": 310,
"framesPerLine": 17,
"animationSpeed": 100
}
Allows to draw one specific frame (cuts it out from entire spritesheet) to target position on canvas.
Also allows to automatically draw frames to create animation effect, can animate backwards,
forwards, or from fome frame to another frame only.