Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
graph/include/cinematic.h

47 lines
788 B
C++
Executable file

#pragma once
#include <vector>
#include <glm/glm.hpp>
#include <json.hpp>
#include "ecs.h"
struct Keyframe {
int time = 0;
glm::vec3 valueVec3 = glm::vec3(0);
int valueInt = 0;
};
enum class AnimationProperty {
Position,
Target,
FoV
};
struct Animation {
EntityID target;
std::string targetName, targetComponent;
AnimationProperty property = AnimationProperty::Position;
std::vector<Keyframe> keyframes;
};
struct CinematicEntity {
nlohmann::json data;
};
struct Shot {
int start = 0, end = 0;
bool loaded = false;
std::string world;
std::vector<CinematicEntity> entities;
std::vector<EntityID> loadedEntities;
std::vector<Animation*> animations;
};
class Cinematic {
public:
std::vector<Shot*> shots;
};