blob: de65c1ad4a973f10c5a4ab4517a3241882937cc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include <llmr/renderer/frame_history.hpp>
using namespace llmr;
// Record frame history that will be used to calculate fading params
void FrameHistory::record(float zoom) {
// first frame ever
if (!history.size()) {
history.emplace_back(FrameSnapshot{0.0f, zoom});
history.emplace_back(FrameSnapshot{0.0f, zoom});
}
if (history.size() == 2 || history.back().z != zoom) {
history.emplace_back(FrameSnapshot{static_cast<float>(platform::time() * 1000), zoom});
}
}
|