Added talkey to texty

This commit is contained in:
YourWishes committed 2023-01-22 14:00:30 -08:00
1 parent 3ee07af4db
commit 6f75e8b7a4
37 files changed
+289 -69

No files matched your search

+1 -1
View File
@@ -164,7 +164,7 @@ void RenderPipeline::renderSceneCamera(Scene *scene, Camera *camera) {
std::sort(
shaderPassItems.begin(),
shaderPassItems.end(),
[](struct ShaderPassItem &a, struct ShaderPassItem &b){
[](struct ShaderPassItem &a, struct ShaderPassItem &b) {
if(a.priority == b.priority) {
return a.w < b.w;
}
@@ -24,6 +24,19 @@ namespace Dawn {
}
/**
* Sorts internal keyframes by their time to make them conform correctly.
*/
void sortKeyframes() {
std::sort(
this->keyframes.begin(),
this->keyframes.end(),
[](struct SimpleKeyframe<T> &a, struct SimpleKeyframe<T> &b) {
return a.time < b.time;
}
);
}
public:
easefunction_t *easing = &easeLinear;
T *modifies;
@@ -54,6 +67,8 @@ namespace Dawn {
this->duration = mathMax<float_t>(this->duration, time);
this->finished = false;
this->keyframes.push_back(keyframe);
if(time < this->duration) this->sortKeyframes();
}
/**