Examples for dweetdiv
dweetdiv allows you to easily add a dweet to your webpage.
Here is the repo.
I am locked at 60, the way dweets usually are.
I am running at an unlocked framerate! It will just look like the 60 FPS
example unless you have a high refresh rate monitor. I am also showing
code and credits.
I may be small (I'm constrained to the width of my parent node) but I am
also locked at 15 FPS.
I won't draw when I'm not seen. Scroll up, scroll back down and you'll see
I don't count up when I'm not visible.
I have an FPS of zero, so I just do one draw call. I won't waste resources
by trying to draw myself every frame.
I depend on the last drawn frame since I trace a line. If there are frame
skips, I don't want to skip ahead in time, since that would change the
picture. I will only do up to four draw calls between animation frames.
My width is set to 960 instead of 1920. Like dwitter, I "zoom in" at the
corner and keep the same aspect ratio without stretching.
Scroll way down to see a dweet that is typically laggy on dwitter.
I'm probably not hitting 60 FPS (if you have a computer like I do) but I
am running at a constant time. That's because I won't draw every frame if
things are slowing down.