add interpolation
This commit is contained in:
@@ -34,6 +34,10 @@ public:
|
||||
void add(ClassID class_id, timestamp begin, timestamp end, const PropertyValue &value) {
|
||||
properties.emplace_back(class_id, begin, end, value);
|
||||
}
|
||||
|
||||
bool hasTransitions() const {
|
||||
return properties.size() > 1;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ public:
|
||||
// of applied classes.
|
||||
void updateClasses();
|
||||
|
||||
bool hasTransitions() const;
|
||||
|
||||
public:
|
||||
std::shared_ptr<Sprite> sprite;
|
||||
std::shared_ptr<StyleLayerGroup> layers;
|
||||
|
||||
@@ -42,6 +42,8 @@ public:
|
||||
void setClasses(const std::vector<std::string> &class_names, timestamp now,
|
||||
const PropertyTransition &defaultTransition);
|
||||
|
||||
bool hasTransitions() const;
|
||||
|
||||
private:
|
||||
// Applies all properties from a class, if they haven't been applied already.
|
||||
void applyClassProperties(ClassID class_id, std::set<PropertyKey> &already_applied,
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
const PropertyTransition &defaultTransition);
|
||||
void updateProperties(float z, timestamp t);
|
||||
|
||||
bool hasTransitions() const;
|
||||
public:
|
||||
std::vector<std::shared_ptr<StyleLayer>> layers;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user